hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
3d848b4eafadbca03ac4d7389a0cb1ec8409e795
1,406
py
Python
interview-cake/reverse-letters-inplace.py
RichardEsquivel/-Practice-CS-Questions
a5089049cba76692634f170851c0315ef2406af6
[ "MIT" ]
null
null
null
interview-cake/reverse-letters-inplace.py
RichardEsquivel/-Practice-CS-Questions
a5089049cba76692634f170851c0315ef2406af6
[ "MIT" ]
null
null
null
interview-cake/reverse-letters-inplace.py
RichardEsquivel/-Practice-CS-Questions
a5089049cba76692634f170851c0315ef2406af6
[ "MIT" ]
null
null
null
def reverse(list): # swap last element len[-1] with first element [0] and so on until you reach the middle. # we are taking the list and modifying in place left_index = 0 # index value would be 1 less than length right_index = len(list) - 1 # while will continue swap until values meet in the middle while left_index < right_index: list[left_index], list[right_index] = ( list[right_index], list[left_index], ) # left index starts at 0 and moves towards middle left_index += 1 # right index starts at end and moves towards middle right_index -= 1 def reverse_words(list): # swap last element len[-1] with first element [0] and so on until you reach the middle. # we are taking the list and modifying in place left_index = 0 # index value would be 1 less than length right_index = len(list) - 1 # while will continue swap until values meet in the middle while left_index < right_index: list[left_index], list[right_index] = ( list[right_index], list[left_index], ) # left index starts at 0 and moves towards middle left_index += 1 # right index starts at end and moves towards middle right_index -= 1 '''The letters within the list are in the correct order
33.47619
93
0.622333
203
1,406
4.206897
0.241379
0.126464
0.098361
0.084309
0.920375
0.920375
0.920375
0.920375
0.920375
0.920375
0
0.016701
0.318634
1,406
42
94
33.47619
0.874739
0
0
0.761905
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
3de0900138a022f8bd384c26036afacad1c05450
9,289
py
Python
test_autofit/unit/graphical/test_transform.py
arfon/PyAutoFit
5926b13eefd97e089ee468cbec33452766edbd22
[ "MIT" ]
1
2021-01-18T23:20:31.000Z
2021-01-18T23:20:31.000Z
test_autofit/unit/graphical/test_transform.py
arfon/PyAutoFit
5926b13eefd97e089ee468cbec33452766edbd22
[ "MIT" ]
null
null
null
test_autofit/unit/graphical/test_transform.py
arfon/PyAutoFit
5926b13eefd97e089ee468cbec33452766edbd22
[ "MIT" ]
null
null
null
import numpy as np import pytest import numpy as np from scipy import stats, linalg, optimize import autofit.graphical as graph import autofit.graphical.factor_graphs.transform as transform def test_cholesky_transform(): d = 10 A = stats.wishart(d, np.eye(d)).rvs() cho_factor = transform.CholeskyTransform(linalg.cho_factor(A)) U = np.triu(cho_factor.U) iU = np.linalg.inv(U) b = np.random.rand(d) assert np.allclose(cho_factor * b, U @ b) assert np.allclose(b * cho_factor, b @ U) assert np.allclose(cho_factor.ldiv(b), iU @ b) assert np.allclose(b / cho_factor, b @ iU) b = np.random.rand(d, d) assert np.allclose(cho_factor * b, U @ b) assert np.allclose(b * cho_factor, b @ U) assert np.allclose(cho_factor.ldiv(b), iU @ b) assert np.allclose(b / cho_factor, b @ iU) b = np.random.rand(d, d + 1) assert np.allclose(cho_factor * b, U @ b) assert np.allclose(cho_factor.ldiv(b), iU @ b) b = np.random.rand(d + 1, d) assert np.allclose(b * cho_factor, b @ U) assert np.allclose(b / cho_factor, b @ iU) def test_diagonal_transform(): d = 3 scale = np.random.rand(d) D = np.diag(scale**-1) iD = np.diag(scale) diag_scale = transform.DiagonalTransform(scale) b = np.random.rand(d) assert np.allclose(diag_scale * b, D @ b) assert np.allclose(b * diag_scale, b @ D) assert np.allclose(diag_scale.ldiv(b), iD @ b) assert np.allclose(b / diag_scale, b @ iD) b = np.random.rand(d, d) assert np.allclose(diag_scale * b, D @ b) assert np.allclose(b * diag_scale, b @ D) assert np.allclose(diag_scale.ldiv(b), iD @ b) assert np.allclose(b / diag_scale, b @ iD) b = np.random.rand(d, d + 1) assert np.allclose(diag_scale * b, D @ b) assert np.allclose(diag_scale.ldiv(b), iD @ b) b = np.random.rand(d + 1, d) assert np.allclose(b * diag_scale, b @ D) assert np.allclose(b / diag_scale, b @ iD) def test_simple_transform_cholesky(): np.random.seed(0) d = 5 A = stats.wishart(d, np.eye(d)).rvs() b = np.random.rand(d) def likelihood(x): x = x - b return 0.5 * np.linalg.multi_dot((x, A, x)) x = graph.Variable('x', graph.Plate()) x0 = np.random.randn(d) factor = graph.Factor(likelihood, x=x, is_scalar=True) param_shapes = graph.utils.FlattenArrays({x: (d,)}) func = factor.flatten(param_shapes) res = optimize.minimize(func, x0) assert np.allclose(res.x, b, rtol=1e-2) H, iA = res.hess_inv, np.linalg.inv(A) # check R2 score assert 1 - np.square(H - iA).mean()/np.square(iA).mean() > 0.95 # cho = transform.CholeskyTransform(linalg.cho_factor(A)) cho = transform.CholeskyTransform.from_dense(A) whiten = transform.VariableTransform({x: cho}) white_factor = transform.TransformedNode(factor, whiten) white_func = white_factor.flatten(param_shapes) y0 = cho * x0 res = optimize.minimize(white_func, y0) assert np.allclose(res.x, cho * b, atol=1e-3, rtol=1e-3) assert np.allclose(res.hess_inv, np.eye(d), atol=1e-3, rtol=1e-3) # testing gradients grad = white_func.jacobian(y0) ngrad = optimize.approx_fprime(y0, white_func, 1e-6) assert np.allclose(grad, ngrad, atol=1e-3, rtol=1e-3) # testing CovarianceTransform, cho = transform.CovarianceTransform.from_dense(iA) whiten = transform.VariableTransform({x: cho}) white_factor = transform.TransformedNode(factor, whiten) white_func = white_factor.flatten(param_shapes) y0 = cho * x0 res = optimize.minimize(white_func, y0) assert np.allclose(res.x, cho * b, atol=1e-3, rtol=1e-3) assert np.allclose(res.hess_inv, np.eye(d), atol=1e-3, rtol=1e-3) # testing gradients grad = white_func.jacobian(y0) ngrad = optimize.approx_fprime(y0, white_func, 1e-6) assert np.allclose(grad, ngrad, atol=1e-3, rtol=1e-3) # testing FullCholeskyTransform whiten = transform.FullCholeskyTransform(cho, param_shapes) white_factor = transform.TransformedNode(factor, whiten) white_func = white_factor.flatten(param_shapes) y0 = cho * x0 res = optimize.minimize(white_func, y0) assert np.allclose(res.x, cho * b, atol=1e-3, rtol=1e-3) assert np.allclose(res.hess_inv, np.eye(d), atol=1e-3, rtol=1e-3) # testing gradients grad = white_func.jacobian(y0) ngrad = optimize.approx_fprime(y0, white_func, 1e-6) assert np.allclose(grad, ngrad, atol=1e-3, rtol=1e-3) def test_simple_transform_diagonal(): # testing DiagonalTransform d = 5 scale = np.random.exponential(size=d) A = np.diag(scale**-1) b = np.random.randn(d) x = graph.Variable('x', graph.Plate()) x0 = np.random.randn(d) param_shapes = graph.utils.FlattenArrays({x: (d,)}) def likelihood(x): x = x - b return 0.5 * np.linalg.multi_dot((x, A, x)) factor = graph.Factor(likelihood, x=x, is_scalar=True) func = factor.flatten(param_shapes) res = optimize.minimize(func, x0) assert np.allclose(res.x, b, rtol=1e-2, atol=1e-2) H, iA = res.hess_inv, np.linalg.inv(A) # check R2 score assert 1 - np.square(H - iA).mean()/np.square(iA).mean() > 0.95 scale = np.random.exponential(size=d) A = np.diag(scale**-2) diag = transform.DiagonalTransform(scale) whiten = transform.VariableTransform({x: diag}) white_factor = transform.TransformedNode(factor, whiten) white_func = white_factor.flatten(param_shapes) y0 = diag * x0 res = optimize.minimize(white_func, y0) assert np.allclose(res.x, diag * b) H, iA = res.hess_inv, np.eye(d) # check R2 score assert 1 - np.square(H - iA).mean()/np.square(iA).mean() > 0.95 # testing gradients grad = white_func.jacobian(y0) ngrad = optimize.approx_fprime(y0, white_func, 1e-6) assert np.allclose(grad, ngrad, atol=1e-3, rtol=1e-3) def test_complex_transform(): n1, n2, n3 = 2, 3, 2 d = n1 + n2 * n3 A = stats.wishart(d, np.eye(d)).rvs() b = np.random.rand(d) p1, p2, p3 = (graph.Plate() for i in range(3)) x1 = graph.Variable('x1', p1) x2 = graph.Variable('x2', p2, p3) mean_field = graph.MeanField({ x1: graph.NormalMessage(np.zeros(n1),100*np.ones(n1)), x2: graph.NormalMessage(np.zeros((n2, n3)),100*np.ones((n2, n3))), }) values = mean_field.sample() param_shapes = graph.utils.FlattenArrays( {v: x.shape for v, x in values.items()}) def likelihood(x1, x2): x = np.r_[x1, x2.ravel()] - b return 0.5 * np.linalg.multi_dot((x, A, x)) factor = graph.Factor(likelihood, x1=x1, x2=x2, is_scalar=True) cho = transform.CholeskyTransform(linalg.cho_factor(A)) whiten = transform.FullCholeskyTransform(cho, param_shapes) trans_factor = transform.TransformedNode(factor, whiten) values = mean_field.sample() transformed = whiten * values assert np.allclose(factor(values), trans_factor(transformed)) njac = trans_factor._numerical_func_jacobian(transformed)[1] jac = trans_factor.jacobian(transformed) ngrad = param_shapes.flatten(njac) grad = param_shapes.flatten(jac) assert np.allclose(grad, ngrad, atol=1e-3, rtol=1e-3) # test VariableTransform with CholeskyTransform var_cov = { v: (X.reshape((int(X.size**0.5),)*2)) for v, X in param_shapes.unflatten(linalg.inv(A)).items() } cho_factors = { v: transform.CholeskyTransform( linalg.cho_factor(linalg.inv(cov))) for v, cov in var_cov.items() } whiten = transform.VariableTransform(cho_factors) trans_factor = transform.TransformedNode(factor, whiten) values = mean_field.sample() transformed = whiten * values assert np.allclose(factor(values), trans_factor(transformed)) njac = trans_factor._numerical_func_jacobian(transformed)[1] jac = trans_factor.jacobian(transformed) ngrad = param_shapes.flatten(njac) grad = param_shapes.flatten(jac) assert np.allclose(grad, ngrad, atol=1e-3, rtol=1e-3) res = optimize.minimize( trans_factor.flatten(param_shapes).func_jacobian, param_shapes.flatten(transformed), method='BFGS', jac=True ) assert res.hess_inv.diagonal() == pytest.approx(1., rel=1e-1) # test VariableTransform with CholeskyTransform diag_factors = { v: transform.DiagonalTransform(cov.diagonal()**0.5) for v, cov in var_cov.items() } whiten = transform.VariableTransform(diag_factors) trans_factor = transform.TransformedNode(factor, whiten) values = mean_field.sample() transformed = whiten * values assert np.allclose(factor(values), trans_factor(transformed)) njac = trans_factor._numerical_func_jacobian(transformed)[1] jac = trans_factor.jacobian(transformed) ngrad = param_shapes.flatten(njac) grad = param_shapes.flatten(jac) assert np.allclose(grad, ngrad, atol=1e-3, rtol=1e-3) res = optimize.minimize( trans_factor.flatten(param_shapes).func_jacobian, param_shapes.flatten(transformed), method='BFGS', jac=True ) assert res.hess_inv.diagonal() == pytest.approx(1., rel=1e-1)
31.171141
74
0.656583
1,365
9,289
4.359707
0.102564
0.057805
0.115611
0.02403
0.802554
0.787599
0.760544
0.73349
0.720887
0.706268
0
0.024476
0.208311
9,289
298
75
31.171141
0.784743
0.037571
0
0.702439
0
0
0.001568
0
0
0
0
0
0.234146
1
0.039024
false
0
0.029268
0
0.082927
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9af066db1fceaaab6a6c2408392dcc71f4d54f29
4,257
py
Python
xkcd/db.py
galenguyer/xkcd
f1c642f690fbfa5007128e8a7a77e4da404ae580
[ "MIT" ]
null
null
null
xkcd/db.py
galenguyer/xkcd
f1c642f690fbfa5007128e8a7a77e4da404ae580
[ "MIT" ]
null
null
null
xkcd/db.py
galenguyer/xkcd
f1c642f690fbfa5007128e8a7a77e4da404ae580
[ "MIT" ]
null
null
null
import sqlite3 from config import Config def create_tables(): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() cursor.execute('create virtual table if not exists xkcd using fts5(title, number, alt_text, transcript, image, year, month, day, tokenize="porter")') db.commit() db.close() def insert_comic(comic): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() cursor.execute("insert into xkcd (title, number, alt_text, transcript, image, year, month, day) values (?, ?, ?, ?, ?, ?, ?, ?);", (comic["title"], comic["number"], comic["alt_text"], comic["transcript"], comic["image"], comic["year"], comic["month"], comic["day"]) ) db.commit() db.close() def get_comic_by_id(id: int): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() r = cursor.execute(f"SELECT * FROM xkcd WHERE number IS {id} LIMIT 1").fetchone() db.close() if r is None: return None comic = {} comic["title"] = r[0] comic["number"] = r[1] comic["alt_text"] = r[2] comic["transcript"] = r[3] comic["image"] = r[4] comic["year"] = r[5] comic["month"] = r[6] comic["day"] = r[7] return comic def get_comic_by_title(query: str): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() res = cursor.execute(f"SELECT *, rank FROM xkcd WHERE title MATCH \"{query}\" ORDER BY rank LIMIT 10").fetchall() db.close() comics = [] for r in res: comic = {} comic["title"] = r[0] comic["number"] = r[1] comic["alt_text"] = r[2] comic["transcript"] = r[3] comic["image"] = r[4] comic["year"] = r[5] comic["month"] = r[6] comic["day"] = r[7] comics.append(comic) return comics def get_comic_by_transcript(query: str): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() res = cursor.execute(f"SELECT *, rank FROM xkcd WHERE transcript MATCH \"{query}\" ORDER BY rank LIMIT 10").fetchall() db.close() comics = [] for r in res: comic = {} comic["title"] = r[0] comic["number"] = r[1] comic["alt_text"] = r[2] comic["transcript"] = r[3] comic["image"] = r[4] comic["year"] = r[5] comic["month"] = r[6] comic["day"] = r[7] comics.append(comic) return comics def get_comic_by_alt_text(query: str): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() res = cursor.execute(f"SELECT *, rank FROM xkcd WHERE alt_text MATCH \"{query}\" ORDER BY rank LIMIT 10").fetchall() db.close() comics = [] for r in res: comic = {} comic["title"] = r[0] comic["number"] = r[1] comic["alt_text"] = r[2] comic["transcript"] = r[3] comic["image"] = r[4] comic["year"] = r[5] comic["month"] = r[6] comic["day"] = r[7] comics.append(comic) return comics def search_comics(query: str): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() res = cursor.execute(f"SELECT *, rank FROM xkcd WHERE title MATCH \"{query}\" OR transcript MATCH \"{query}\" OR alt_text MATCH \"{query}\" ORDER BY rank LIMIT 10").fetchall() db.close() comics = [] for r in res: comic = {} comic["title"] = r[0] comic["number"] = r[1] comic["alt_text"] = r[2] comic["transcript"] = r[3] comic["image"] = r[4] comic["year"] = r[5] comic["month"] = r[6] comic["day"] = r[7] comics.append(comic) return comics def get_latest_comic(): db = sqlite3.connect(Config.DATABASE_PATH) cursor = db.cursor() res = cursor.execute(f"SELECT *, rank FROM xkcd ORDER BY number DESC LIMIT 1").fetchall() db.close() comics = [] for r in res: comic = {} comic["title"] = r[0] comic["number"] = r[1] comic["alt_text"] = r[2] comic["transcript"] = r[3] comic["image"] = r[4] comic["year"] = r[5] comic["month"] = r[6] comic["day"] = r[7] comics.append(comic) return comics
30.847826
179
0.55579
570
4,257
4.085965
0.131579
0.036067
0.054959
0.075569
0.80936
0.793903
0.793903
0.793903
0.793903
0.73465
0
0.022064
0.276016
4,257
138
180
30.847826
0.733615
0
0
0.769231
0
0.015385
0.23086
0
0
0
0
0
0
1
0.061538
false
0
0.015385
0
0.130769
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9af0d8a93c9862c5ed0a5140ffc20267e269cf40
27,497
py
Python
ambra_sdk/service/entrypoints/generated/purge.py
dicomgrid/sdk-python
bb12eed311bad73dfb863917df4dc5cbcd91a447
[ "Apache-2.0" ]
9
2020-04-20T23:45:44.000Z
2021-04-18T11:22:17.000Z
ambra_sdk/service/entrypoints/generated/purge.py
dicomgrid/sdk-python
bb12eed311bad73dfb863917df4dc5cbcd91a447
[ "Apache-2.0" ]
13
2020-02-08T16:15:05.000Z
2021-09-13T22:55:28.000Z
ambra_sdk/service/entrypoints/generated/purge.py
dicomgrid/sdk-python
bb12eed311bad73dfb863917df4dc5cbcd91a447
[ "Apache-2.0" ]
6
2020-03-25T17:47:45.000Z
2021-04-18T11:22:19.000Z
""" Purge. Do not edit this file by hand. This is generated by parsing api.html service doc. """ from ambra_sdk.exceptions.service import FilterNotFound from ambra_sdk.exceptions.service import GtZero from ambra_sdk.exceptions.service import InvalidCondition from ambra_sdk.exceptions.service import InvalidField from ambra_sdk.exceptions.service import InvalidFlag from ambra_sdk.exceptions.service import InvalidJson from ambra_sdk.exceptions.service import InvalidSortField from ambra_sdk.exceptions.service import InvalidSortOrder from ambra_sdk.exceptions.service import MissingFields from ambra_sdk.exceptions.service import NotANumber from ambra_sdk.exceptions.service import NotFound from ambra_sdk.exceptions.service import NotList from ambra_sdk.exceptions.service import NotPermitted from ambra_sdk.exceptions.service import OnlyOneFlag from ambra_sdk.exceptions.service import ValidationFailed from ambra_sdk.service.query import QueryO from ambra_sdk.service.query import AsyncQueryO from ambra_sdk.service.query import QueryOPSF from ambra_sdk.service.query import AsyncQueryOPSF class Purge: """Purge.""" def __init__(self, api): self._api = api def list( self, account_id, ): """List. :param account_id: uuid of the account """ request_data = { 'account_id': account_id, } errors_mapping = {} errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping[('INVALID_FIELD', None)] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The account can not be found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to view this list') query_data = { 'api': self._api, 'url': '/purge/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'purges' return QueryOPSF(**query_data) def add( self, account_id, days_old, days_old_how, name, adults=None, archive=None, global_param=None, max_deletes=None, minors=None, modalities=None, namespaces=None, object=None, owned_phr=None, shared_from_phr=None, skinny=None, study_status_tags=None, suspended=None, thin=None, ): """Add. :param account_id: uuid of the account the rule is for :param days_old: Studies greater than or equal to these days old will be purged :param days_old_how: How should the days old value be calculated using the 'U'pdated, 'C'reated or 'S'tudy date :param name: Name of the purge rule :param adults: Apply this rule to adults - flag (optional) :param archive: Archive the studies rather than deleting them - flag (optional) :param global_param: Flag to make this a global purge rule (optional) :param max_deletes: Maximum number of purges per run of the rule (optional) :param minors: Apply this rule to minors - flag (optional) :param modalities: A JSON array of modalities to limit the rule to (optional) :param namespaces: A JSON array of namespace uuid to limit the rule to (optional) :param object: The object to be purged, Study by default (Study|Hl7) (optional) :param owned_phr: Apply this rule to owned PHR namespaces - flag (optional) :param shared_from_phr: If a study was shared from a PHR namespace delete the copy in the PHR namespace as well - flag (optional) :param skinny: Make the studies skinny rather than deleting - flag (optional) :param study_status_tags: A comma separated list of study status tags to purge (optional) :param suspended: This rule is suspended and not applied - flag (optional) :param thin: Make the studies thin rather than deleting - flag (optional) """ request_data = { 'account_id': account_id, 'adults': adults, 'archive': archive, 'days_old': days_old, 'days_old_how': days_old_how, 'global': global_param, 'max_deletes': max_deletes, 'minors': minors, 'modalities': modalities, 'name': name, 'namespaces': namespaces, 'object': object, 'owned_phr': owned_phr, 'shared_from_phr': shared_from_phr, 'skinny': skinny, 'study_status_tags': study_status_tags, 'suspended': suspended, 'thin': thin, } errors_mapping = {} errors_mapping[('GT_ZERO', None)] = GtZero('The parameter must be great than zero. The error_subtype holds the name of the parameter') errors_mapping[('INVALID_FLAG', None)] = InvalidFlag('An invalid flag was passed. The error_subtype holds the name of the invalid flag') errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_A_NUMBER', None)] = NotANumber('The parameter must be a valid number. The error_subtype holds the name of the parameter') errors_mapping[('NOT_FOUND', None)] = NotFound('The account or namespace was not found. The error_subtype holds the uuid of the not found item') errors_mapping[('NOT_LIST', None)] = NotList('The field is not a JSON array. The error_subtype holds the name of the field') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to add a purge to that account') errors_mapping[('ONLY_ONE_FLAG', None)] = OnlyOneFlag('You can set either the skinny, thin or archive flag, not multiple') errors_mapping[('VALIDATION_FAILED', None)] = ValidationFailed('A field failed validation. The error_subtype holds the name of the invalid field') query_data = { 'api': self._api, 'url': '/purge/add', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryO(**query_data) def set( self, uuid, adults=None, archive=None, days_old=None, days_old_how=None, global_param=None, max_deletes=None, minors=None, modalities=None, name=None, namespaces=None, owned_phr=None, shared_from_phr=None, skinny=None, study_status_tags=None, suspended=None, thin=None, ): """Set. :param uuid: Id of the purge rule :param adults: Apply this rule to adults - flag (optional) :param archive: Archive the studies rather than deleting them - flag (optional) :param days_old: Studies greater than or equal to these days old will be purged (optional) :param days_old_how: How should the days old value be calculated using the 'U'pdated, 'C'reated or 'S'tudy date (optional) :param global_param: Flag to make this a global purge rule (optional) :param max_deletes: Maximum number of purges per run of the rule (optional) :param minors: Apply this rule to minors - flag (optional) :param modalities: A JSON array of modalities to limit the rule to) (optional) :param name: Name of the purge rule (optional) :param namespaces: A JSON array of namespace uuid to limit the rule to (optional) :param owned_phr: Apply this rule owned PHR namespaces - flag (optional) :param shared_from_phr: If a study was shared from a PHR namespace delete the copy in the PHR namespace as well - flag (optional) :param skinny: Make the studies skinny rather than deleting - flag (optional) :param study_status_tags: A comma separated list of study status tags to purge (optional) :param suspended: This rule is suspended and not applied - flag (optional) :param thin: Make the studies thin rather than deleting - flag (optional) """ request_data = { 'adults': adults, 'archive': archive, 'days_old': days_old, 'days_old_how': days_old_how, 'global': global_param, 'max_deletes': max_deletes, 'minors': minors, 'modalities': modalities, 'name': name, 'namespaces': namespaces, 'owned_phr': owned_phr, 'shared_from_phr': shared_from_phr, 'skinny': skinny, 'study_status_tags': study_status_tags, 'suspended': suspended, 'thin': thin, 'uuid': uuid, } errors_mapping = {} errors_mapping[('GT_ZERO', None)] = GtZero('The parameter must be great than zero. The error_subtype holds the name of the parameter') errors_mapping[('INVALID_FLAG', None)] = InvalidFlag('An invalid flag was passed. The error_subtype holds the name of the invalid flag') errors_mapping[('INVALID_JSON', None)] = InvalidJson('The field is not in valid JSON format. The error_subtype holds the name of the field') errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_A_NUMBER', None)] = NotANumber('The parameter must be a valid number. The error_subtype holds the name of the parameter') errors_mapping[('NOT_FOUND', None)] = NotFound('The account or namespace was not found. The error_subtype holds the uuid of the not found item') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to edit a purge rule') errors_mapping[('ONLY_ONE_FLAG', None)] = OnlyOneFlag('You can set either the skinny, thin or archive flag, not multiple') errors_mapping[('VALIDATION_FAILED', None)] = ValidationFailed('A field failed validation. The error_subtype holds the name of the invalid field') query_data = { 'api': self._api, 'url': '/purge/set', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryO(**query_data) def get( self, uuid, ): """Get. :param uuid: Id of the purge rule """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The rule was not found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to view purge rules for this account') query_data = { 'api': self._api, 'url': '/purge/get', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryO(**query_data) def delete( self, uuid, ): """Delete. :param uuid: Id of the purge rule """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The rule was not found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to delete purge rules for this account') query_data = { 'api': self._api, 'url': '/purge/delete', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryO(**query_data) def run( self, dry_run, account_id=None, object=None, rule_id=None, ): """Run. :param dry_run: Do a dry run of the rule - flag :param account_id: account_id :param object: Limit purging to this object only (optional) :param rule_id: rule_id """ request_data = { 'account_id': account_id, 'dry_run': dry_run, 'object': object, 'rule_id': rule_id, } errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The rule or account was not found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to run purge rules for this account') query_data = { 'api': self._api, 'url': '/purge/run', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryO(**query_data) class AsyncPurge: """AsyncPurge.""" def __init__(self, api): self._api = api def list( self, account_id, ): """List. :param account_id: uuid of the account """ request_data = { 'account_id': account_id, } errors_mapping = {} errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping[('INVALID_FIELD', None)] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The account can not be found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to view this list') query_data = { 'api': self._api, 'url': '/purge/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'purges' return AsyncQueryOPSF(**query_data) def add( self, account_id, days_old, days_old_how, name, adults=None, archive=None, global_param=None, max_deletes=None, minors=None, modalities=None, namespaces=None, object=None, owned_phr=None, shared_from_phr=None, skinny=None, study_status_tags=None, suspended=None, thin=None, ): """Add. :param account_id: uuid of the account the rule is for :param days_old: Studies greater than or equal to these days old will be purged :param days_old_how: How should the days old value be calculated using the 'U'pdated, 'C'reated or 'S'tudy date :param name: Name of the purge rule :param adults: Apply this rule to adults - flag (optional) :param archive: Archive the studies rather than deleting them - flag (optional) :param global_param: Flag to make this a global purge rule (optional) :param max_deletes: Maximum number of purges per run of the rule (optional) :param minors: Apply this rule to minors - flag (optional) :param modalities: A JSON array of modalities to limit the rule to (optional) :param namespaces: A JSON array of namespace uuid to limit the rule to (optional) :param object: The object to be purged, Study by default (Study|Hl7) (optional) :param owned_phr: Apply this rule to owned PHR namespaces - flag (optional) :param shared_from_phr: If a study was shared from a PHR namespace delete the copy in the PHR namespace as well - flag (optional) :param skinny: Make the studies skinny rather than deleting - flag (optional) :param study_status_tags: A comma separated list of study status tags to purge (optional) :param suspended: This rule is suspended and not applied - flag (optional) :param thin: Make the studies thin rather than deleting - flag (optional) """ request_data = { 'account_id': account_id, 'adults': adults, 'archive': archive, 'days_old': days_old, 'days_old_how': days_old_how, 'global': global_param, 'max_deletes': max_deletes, 'minors': minors, 'modalities': modalities, 'name': name, 'namespaces': namespaces, 'object': object, 'owned_phr': owned_phr, 'shared_from_phr': shared_from_phr, 'skinny': skinny, 'study_status_tags': study_status_tags, 'suspended': suspended, 'thin': thin, } errors_mapping = {} errors_mapping[('GT_ZERO', None)] = GtZero('The parameter must be great than zero. The error_subtype holds the name of the parameter') errors_mapping[('INVALID_FLAG', None)] = InvalidFlag('An invalid flag was passed. The error_subtype holds the name of the invalid flag') errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_A_NUMBER', None)] = NotANumber('The parameter must be a valid number. The error_subtype holds the name of the parameter') errors_mapping[('NOT_FOUND', None)] = NotFound('The account or namespace was not found. The error_subtype holds the uuid of the not found item') errors_mapping[('NOT_LIST', None)] = NotList('The field is not a JSON array. The error_subtype holds the name of the field') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to add a purge to that account') errors_mapping[('ONLY_ONE_FLAG', None)] = OnlyOneFlag('You can set either the skinny, thin or archive flag, not multiple') errors_mapping[('VALIDATION_FAILED', None)] = ValidationFailed('A field failed validation. The error_subtype holds the name of the invalid field') query_data = { 'api': self._api, 'url': '/purge/add', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data) def set( self, uuid, adults=None, archive=None, days_old=None, days_old_how=None, global_param=None, max_deletes=None, minors=None, modalities=None, name=None, namespaces=None, owned_phr=None, shared_from_phr=None, skinny=None, study_status_tags=None, suspended=None, thin=None, ): """Set. :param uuid: Id of the purge rule :param adults: Apply this rule to adults - flag (optional) :param archive: Archive the studies rather than deleting them - flag (optional) :param days_old: Studies greater than or equal to these days old will be purged (optional) :param days_old_how: How should the days old value be calculated using the 'U'pdated, 'C'reated or 'S'tudy date (optional) :param global_param: Flag to make this a global purge rule (optional) :param max_deletes: Maximum number of purges per run of the rule (optional) :param minors: Apply this rule to minors - flag (optional) :param modalities: A JSON array of modalities to limit the rule to) (optional) :param name: Name of the purge rule (optional) :param namespaces: A JSON array of namespace uuid to limit the rule to (optional) :param owned_phr: Apply this rule owned PHR namespaces - flag (optional) :param shared_from_phr: If a study was shared from a PHR namespace delete the copy in the PHR namespace as well - flag (optional) :param skinny: Make the studies skinny rather than deleting - flag (optional) :param study_status_tags: A comma separated list of study status tags to purge (optional) :param suspended: This rule is suspended and not applied - flag (optional) :param thin: Make the studies thin rather than deleting - flag (optional) """ request_data = { 'adults': adults, 'archive': archive, 'days_old': days_old, 'days_old_how': days_old_how, 'global': global_param, 'max_deletes': max_deletes, 'minors': minors, 'modalities': modalities, 'name': name, 'namespaces': namespaces, 'owned_phr': owned_phr, 'shared_from_phr': shared_from_phr, 'skinny': skinny, 'study_status_tags': study_status_tags, 'suspended': suspended, 'thin': thin, 'uuid': uuid, } errors_mapping = {} errors_mapping[('GT_ZERO', None)] = GtZero('The parameter must be great than zero. The error_subtype holds the name of the parameter') errors_mapping[('INVALID_FLAG', None)] = InvalidFlag('An invalid flag was passed. The error_subtype holds the name of the invalid flag') errors_mapping[('INVALID_JSON', None)] = InvalidJson('The field is not in valid JSON format. The error_subtype holds the name of the field') errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_A_NUMBER', None)] = NotANumber('The parameter must be a valid number. The error_subtype holds the name of the parameter') errors_mapping[('NOT_FOUND', None)] = NotFound('The account or namespace was not found. The error_subtype holds the uuid of the not found item') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to edit a purge rule') errors_mapping[('ONLY_ONE_FLAG', None)] = OnlyOneFlag('You can set either the skinny, thin or archive flag, not multiple') errors_mapping[('VALIDATION_FAILED', None)] = ValidationFailed('A field failed validation. The error_subtype holds the name of the invalid field') query_data = { 'api': self._api, 'url': '/purge/set', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data) def get( self, uuid, ): """Get. :param uuid: Id of the purge rule """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The rule was not found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to view purge rules for this account') query_data = { 'api': self._api, 'url': '/purge/get', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data) def delete( self, uuid, ): """Delete. :param uuid: Id of the purge rule """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The rule was not found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to delete purge rules for this account') query_data = { 'api': self._api, 'url': '/purge/delete', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data) def run( self, dry_run, account_id=None, object=None, rule_id=None, ): """Run. :param dry_run: Do a dry run of the rule - flag :param account_id: account_id :param object: Limit purging to this object only (optional) :param rule_id: rule_id """ request_data = { 'account_id': account_id, 'dry_run': dry_run, 'object': object, 'rule_id': rule_id, } errors_mapping = {} errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The rule or account was not found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to run purge rules for this account') query_data = { 'api': self._api, 'url': '/purge/run', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data)
46.369309
182
0.636651
3,502
27,497
4.840948
0.053113
0.081284
0.040701
0.04247
0.979296
0.979296
0.941249
0.941249
0.941249
0.941249
0
0.0001
0.275266
27,497
593
183
46.369309
0.850612
0.223515
0
0.891455
1
0.027714
0.375817
0
0
0
0
0
0
1
0.032333
false
0.009238
0.04388
0
0.108545
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
490b546fd40012683158341d96a8c7a474568124
14,062
py
Python
parser/team29/analizer/functions/MathFunctions.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
parser/team29/analizer/functions/MathFunctions.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
parser/team29/analizer/functions/MathFunctions.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
import math import numpy as np import random list_errors = list() def absolute(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, abs(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def cbrt(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): valor = column[i] ** (1.0 / 3.0) result.insert(i + 1, valor) else: result.insert(i + 1, column[i]) i += 1 return result def ceil(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.ceil(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def ceiling(column): return ceil(column) def degrees(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.degrees(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def div(column1, column2): return div_columns(column1, column2) def exp(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.exp(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def factorial(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.factorial(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def floor(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.floor(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def gcd(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, math.gcd(column1[i], column2[i])) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, math.gcd(column1[i], column2[0])) else: result.insert(i + 1, column1[i]) i += 1 return result def lcm(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert( i + 1, abs(column1[i] * column2[i]) // math.gcd(column1[i], column2[i]), ) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert( i + 1, abs(column1[i] * column2[0]) // math.gcd(column1[i], column2[0]), ) else: result.insert(i + 1, column1[i]) i += 1 return result def ln(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.log(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def log10(column): return log(column, 10) def log(column, base=10): i = 0 column1 = convert_num_col(column) result = list() while i < len(column1): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.log(column[i], base)) else: result.insert(i + 1, column[i]) i += 1 return result def mod(column1, column2): return mod_columns(column1, column2) def pi(): return [math.pi] def pow(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): result.insert(i + 1, math.pow(column1[i], column2[i])) i += 1 return result def radians(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, math.radians(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def random_(): value = random.random() return [value] def sign(column): return np.sign(column) def round(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, round(column[i])) else: result.insert(i + 1, column[i]) i += 1 return result def sqrt(column): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): if column[i] >= 0: result.insert(i + 1, math.sqrt(column[i])) else: result.insert(i + 1, "Error en el dominio") list_errors( len(list_errors), "Error: 2201F: no se puede calcular la raiz cuadrada de un numero negativo", ) else: result.insert(i + 1, column[i]) i += 1 return result def with_bucket(expresion, rango_izq, rango_der, number_buckets): if rango_izq != rango_der: if rango_izq > expresion: return 0 if rango_izq == expresion: return 1 if rango_der == expresion: return number_buckets + 1 incremento = (rango_der - rango_izq) / number_buckets valor = int((expresion - rango_izq) / incremento) + 1 if valor > number_buckets: return number_buckets + 1 elif valor < 0: return 0 else: return int(valor) def truncate_col(column, decimals=0): i = 0 column = convert_num_col(column) result = list() while i < len(column): if isinstance(column[i], int) or isinstance(column[i], float): result.insert(i + 1, truncate(column[i], decimals)) else: result.insert(i + 1, column[i]) i += 1 return result def truncate(number, decimals=0): if decimals == 0: return math.trunc(number) factor = 10.0 ** decimals return math.trunc(number * factor) / factor def sum_columns(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] + column2[i]) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] + column2[0]) else: result.insert(i + 1, column1[i]) i += 1 return result def rest_columns(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] - column2[i]) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] - column2[0]) else: result.insert(i + 1, column1[i]) i += 1 return result def mult_columns(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] * column2[i]) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] * column2[0]) else: result.insert(i + 1, column1[i]) i += 1 return result def div_columns(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] / column2[i]) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] / column2[0]) else: result.insert(i + 1, column1[i]) i += 1 return result def mod_columns(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] % column2[i]) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] % column2[0]) else: result.insert(i + 1, column1[i]) i += 1 return result def convert_num_col(num): if isinstance(num, int) or isinstance(num, float): return [num] else: return num def exp_columns(column1, column2): i = 0 column1 = convert_num_col(column1) column2 = convert_num_col(column2) result = list() if len(column1) == len(column2): while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] ** column2[i]) else: result.insert(i + 1, column1[i]) i += 1 elif len(column2) == 1: while i < len(column1): if (isinstance(column1[i], int) or isinstance(column1[i], float)) and ( isinstance(column2[i], int) or isinstance(column2[i], float) ): result.insert(i + 1, column1[i] ** column2[0]) else: result.insert(i + 1, column1[i]) i += 1 return result
28.581301
96
0.533281
1,744
14,062
4.24656
0.052179
0.024575
0.10532
0.113422
0.861059
0.839995
0.835404
0.830003
0.830003
0.824872
0
0.041066
0.338501
14,062
491
97
28.639511
0.755106
0
0
0.75
0
0
0.006542
0
0
0
0
0
0
1
0.079208
false
0
0.007426
0.014851
0.183168
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
49758ba8f3a53e71d504c1fb5e147dd44a5ab183
156,864
py
Python
dingtalk/python/alibabacloud_dingtalk/contact_1_0/client.py
aliyun/dingtalk-sdk
ab4f856b8cfe94f6b69f10a0730a2e5a7d4901c5
[ "Apache-2.0" ]
15
2020-08-27T04:10:26.000Z
2022-03-07T06:25:42.000Z
dingtalk/python/alibabacloud_dingtalk/contact_1_0/client.py
aliyun/dingtalk-sdk
ab4f856b8cfe94f6b69f10a0730a2e5a7d4901c5
[ "Apache-2.0" ]
1
2020-09-27T01:30:46.000Z
2021-12-29T09:15:34.000Z
dingtalk/python/alibabacloud_dingtalk/contact_1_0/client.py
aliyun/dingtalk-sdk
ab4f856b8cfe94f6b69f10a0730a2e5a7d4901c5
[ "Apache-2.0" ]
5
2020-08-27T04:07:44.000Z
2021-12-03T02:55:20.000Z
# -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. from Tea.core import TeaCore from alibabacloud_tea_openapi.client import Client as OpenApiClient from alibabacloud_tea_openapi import models as open_api_models from alibabacloud_tea_util.client import Client as UtilClient from alibabacloud_dingtalk.contact_1_0 import models as dingtalkcontact__1__0_models from alibabacloud_tea_util import models as util_models from alibabacloud_openapi_util.client import Client as OpenApiUtilClient class Client(OpenApiClient): """ *\ """ def __init__( self, config: open_api_models.Config, ): super().__init__(config) self._endpoint_rule = '' if UtilClient.empty(self._endpoint): self._endpoint = 'api.dingtalk.com' def update_branch_visible_setting_in_cooperate( self, request: dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateRequest, ) -> dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateHeaders() return self.update_branch_visible_setting_in_cooperate_with_options(request, headers, runtime) async def update_branch_visible_setting_in_cooperate_async( self, request: dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateRequest, ) -> dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateHeaders() return await self.update_branch_visible_setting_in_cooperate_with_options_async(request, headers, runtime) def update_branch_visible_setting_in_cooperate_with_options( self, request: dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateRequest, headers: dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateResponse: UtilClient.validate_model(request) real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=UtilClient.to_array(request.body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateResponse(), self.do_roarequest('UpdateBranchVisibleSettingInCooperate', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/cooperateCorps/branchVisibleSettings', 'none', req, runtime) ) async def update_branch_visible_setting_in_cooperate_with_options_async( self, request: dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateRequest, headers: dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateResponse: UtilClient.validate_model(request) real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=UtilClient.to_array(request.body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateBranchVisibleSettingInCooperateResponse(), await self.do_roarequest_async('UpdateBranchVisibleSettingInCooperate', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/cooperateCorps/branchVisibleSettings', 'none', req, runtime) ) def sort_user( self, request: dingtalkcontact__1__0_models.SortUserRequest, ) -> dingtalkcontact__1__0_models.SortUserResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SortUserHeaders() return self.sort_user_with_options(request, headers, runtime) async def sort_user_async( self, request: dingtalkcontact__1__0_models.SortUserRequest, ) -> dingtalkcontact__1__0_models.SortUserResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SortUserHeaders() return await self.sort_user_with_options_async(request, headers, runtime) def sort_user_with_options( self, request: dingtalkcontact__1__0_models.SortUserRequest, headers: dingtalkcontact__1__0_models.SortUserHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SortUserResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.user_id_list): body['userIdList'] = request.user_id_list if not UtilClient.is_unset(request.sort_type): body['sortType'] = request.sort_type real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SortUserResponse(), self.do_roarequest('SortUser', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/users/sort', 'json', req, runtime) ) async def sort_user_with_options_async( self, request: dingtalkcontact__1__0_models.SortUserRequest, headers: dingtalkcontact__1__0_models.SortUserHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SortUserResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.user_id_list): body['userIdList'] = request.user_id_list if not UtilClient.is_unset(request.sort_type): body['sortType'] = request.sort_type real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SortUserResponse(), await self.do_roarequest_async('SortUser', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/users/sort', 'json', req, runtime) ) def sign_out( self, request: dingtalkcontact__1__0_models.SignOutRequest, ) -> dingtalkcontact__1__0_models.SignOutResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SignOutHeaders() return self.sign_out_with_options(request, headers, runtime) async def sign_out_async( self, request: dingtalkcontact__1__0_models.SignOutRequest, ) -> dingtalkcontact__1__0_models.SignOutResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SignOutHeaders() return await self.sign_out_with_options_async(request, headers, runtime) def sign_out_with_options( self, request: dingtalkcontact__1__0_models.SignOutRequest, headers: dingtalkcontact__1__0_models.SignOutHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SignOutResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.reason): body['reason'] = request.reason real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SignOutResponse(), self.do_roarequest('SignOut', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/signOut', 'none', req, runtime) ) async def sign_out_with_options_async( self, request: dingtalkcontact__1__0_models.SignOutRequest, headers: dingtalkcontact__1__0_models.SignOutHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SignOutResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.reason): body['reason'] = request.reason real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SignOutResponse(), await self.do_roarequest_async('SignOut', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/signOut', 'none', req, runtime) ) def list_contact_hide_settings( self, request: dingtalkcontact__1__0_models.ListContactHideSettingsRequest, ) -> dingtalkcontact__1__0_models.ListContactHideSettingsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListContactHideSettingsHeaders() return self.list_contact_hide_settings_with_options(request, headers, runtime) async def list_contact_hide_settings_async( self, request: dingtalkcontact__1__0_models.ListContactHideSettingsRequest, ) -> dingtalkcontact__1__0_models.ListContactHideSettingsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListContactHideSettingsHeaders() return await self.list_contact_hide_settings_with_options_async(request, headers, runtime) def list_contact_hide_settings_with_options( self, request: dingtalkcontact__1__0_models.ListContactHideSettingsRequest, headers: dingtalkcontact__1__0_models.ListContactHideSettingsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListContactHideSettingsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListContactHideSettingsResponse(), self.do_roarequest('ListContactHideSettings', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/contactHideSettings', 'json', req, runtime) ) async def list_contact_hide_settings_with_options_async( self, request: dingtalkcontact__1__0_models.ListContactHideSettingsRequest, headers: dingtalkcontact__1__0_models.ListContactHideSettingsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListContactHideSettingsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListContactHideSettingsResponse(), await self.do_roarequest_async('ListContactHideSettings', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/contactHideSettings', 'json', req, runtime) ) def update_contact_hide_setting( self, request: dingtalkcontact__1__0_models.UpdateContactHideSettingRequest, ) -> dingtalkcontact__1__0_models.UpdateContactHideSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateContactHideSettingHeaders() return self.update_contact_hide_setting_with_options(request, headers, runtime) async def update_contact_hide_setting_async( self, request: dingtalkcontact__1__0_models.UpdateContactHideSettingRequest, ) -> dingtalkcontact__1__0_models.UpdateContactHideSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateContactHideSettingHeaders() return await self.update_contact_hide_setting_with_options_async(request, headers, runtime) def update_contact_hide_setting_with_options( self, request: dingtalkcontact__1__0_models.UpdateContactHideSettingRequest, headers: dingtalkcontact__1__0_models.UpdateContactHideSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateContactHideSettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.description): body['description'] = request.description if not UtilClient.is_unset(request.object_staff_ids): body['objectStaffIds'] = request.object_staff_ids if not UtilClient.is_unset(request.object_dept_ids): body['objectDeptIds'] = request.object_dept_ids if not UtilClient.is_unset(request.object_tag_ids): body['objectTagIds'] = request.object_tag_ids if not UtilClient.is_unset(request.exclude_staff_ids): body['excludeStaffIds'] = request.exclude_staff_ids if not UtilClient.is_unset(request.exclude_dept_ids): body['excludeDeptIds'] = request.exclude_dept_ids if not UtilClient.is_unset(request.exclude_tag_ids): body['excludeTagIds'] = request.exclude_tag_ids if not UtilClient.is_unset(request.active): body['active'] = request.active if not UtilClient.is_unset(request.id): body['id'] = request.id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateContactHideSettingResponse(), self.do_roarequest('UpdateContactHideSetting', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/contactHideSettings', 'json', req, runtime) ) async def update_contact_hide_setting_with_options_async( self, request: dingtalkcontact__1__0_models.UpdateContactHideSettingRequest, headers: dingtalkcontact__1__0_models.UpdateContactHideSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateContactHideSettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.description): body['description'] = request.description if not UtilClient.is_unset(request.object_staff_ids): body['objectStaffIds'] = request.object_staff_ids if not UtilClient.is_unset(request.object_dept_ids): body['objectDeptIds'] = request.object_dept_ids if not UtilClient.is_unset(request.object_tag_ids): body['objectTagIds'] = request.object_tag_ids if not UtilClient.is_unset(request.exclude_staff_ids): body['excludeStaffIds'] = request.exclude_staff_ids if not UtilClient.is_unset(request.exclude_dept_ids): body['excludeDeptIds'] = request.exclude_dept_ids if not UtilClient.is_unset(request.exclude_tag_ids): body['excludeTagIds'] = request.exclude_tag_ids if not UtilClient.is_unset(request.active): body['active'] = request.active if not UtilClient.is_unset(request.id): body['id'] = request.id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateContactHideSettingResponse(), await self.do_roarequest_async('UpdateContactHideSetting', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/contactHideSettings', 'json', req, runtime) ) def update_dept_settng_tail_first( self, request: dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstRequest, ) -> dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstHeaders() return self.update_dept_settng_tail_first_with_options(request, headers, runtime) async def update_dept_settng_tail_first_async( self, request: dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstRequest, ) -> dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstHeaders() return await self.update_dept_settng_tail_first_with_options_async(request, headers, runtime) def update_dept_settng_tail_first_with_options( self, request: dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstRequest, headers: dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.enable): body['enable'] = request.enable real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstResponse(), self.do_roarequest('UpdateDeptSettngTailFirst', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/depts/settings/priorities', 'none', req, runtime) ) async def update_dept_settng_tail_first_with_options_async( self, request: dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstRequest, headers: dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.enable): body['enable'] = request.enable real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateDeptSettngTailFirstResponse(), await self.do_roarequest_async('UpdateDeptSettngTailFirst', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/depts/settings/priorities', 'none', req, runtime) ) def get_card_in_user_holder( self, card_id: str, ) -> dingtalkcontact__1__0_models.GetCardInUserHolderResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCardInUserHolderHeaders() return self.get_card_in_user_holder_with_options(card_id, headers, runtime) async def get_card_in_user_holder_async( self, card_id: str, ) -> dingtalkcontact__1__0_models.GetCardInUserHolderResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCardInUserHolderHeaders() return await self.get_card_in_user_holder_with_options_async(card_id, headers, runtime) def get_card_in_user_holder_with_options( self, card_id: str, headers: dingtalkcontact__1__0_models.GetCardInUserHolderHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCardInUserHolderResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCardInUserHolderResponse(), self.do_roarequest('GetCardInUserHolder', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/holders/infos/{card_id}', 'json', req, runtime) ) async def get_card_in_user_holder_with_options_async( self, card_id: str, headers: dingtalkcontact__1__0_models.GetCardInUserHolderHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCardInUserHolderResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCardInUserHolderResponse(), await self.do_roarequest_async('GetCardInUserHolder', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/holders/infos/{card_id}', 'json', req, runtime) ) def update_emp_attrbute_visibility_setting( self, request: dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingRequest, ) -> dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingHeaders() return self.update_emp_attrbute_visibility_setting_with_options(request, headers, runtime) async def update_emp_attrbute_visibility_setting_async( self, request: dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingRequest, ) -> dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingHeaders() return await self.update_emp_attrbute_visibility_setting_with_options_async(request, headers, runtime) def update_emp_attrbute_visibility_setting_with_options( self, request: dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingRequest, headers: dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.id): body['id'] = request.id if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.description): body['description'] = request.description if not UtilClient.is_unset(request.object_staff_ids): body['objectStaffIds'] = request.object_staff_ids if not UtilClient.is_unset(request.object_dept_ids): body['objectDeptIds'] = request.object_dept_ids if not UtilClient.is_unset(request.object_tag_ids): body['objectTagIds'] = request.object_tag_ids if not UtilClient.is_unset(request.hide_fields): body['hideFields'] = request.hide_fields if not UtilClient.is_unset(request.exclude_staff_ids): body['excludeStaffIds'] = request.exclude_staff_ids if not UtilClient.is_unset(request.exclude_dept_ids): body['excludeDeptIds'] = request.exclude_dept_ids if not UtilClient.is_unset(request.exclude_tag_ids): body['excludeTagIds'] = request.exclude_tag_ids if not UtilClient.is_unset(request.active): body['active'] = request.active real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingResponse(), self.do_roarequest('UpdateEmpAttrbuteVisibilitySetting', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/staffAttributes/visibilitySettings', 'json', req, runtime) ) async def update_emp_attrbute_visibility_setting_with_options_async( self, request: dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingRequest, headers: dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.id): body['id'] = request.id if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.description): body['description'] = request.description if not UtilClient.is_unset(request.object_staff_ids): body['objectStaffIds'] = request.object_staff_ids if not UtilClient.is_unset(request.object_dept_ids): body['objectDeptIds'] = request.object_dept_ids if not UtilClient.is_unset(request.object_tag_ids): body['objectTagIds'] = request.object_tag_ids if not UtilClient.is_unset(request.hide_fields): body['hideFields'] = request.hide_fields if not UtilClient.is_unset(request.exclude_staff_ids): body['excludeStaffIds'] = request.exclude_staff_ids if not UtilClient.is_unset(request.exclude_dept_ids): body['excludeDeptIds'] = request.exclude_dept_ids if not UtilClient.is_unset(request.exclude_tag_ids): body['excludeTagIds'] = request.exclude_tag_ids if not UtilClient.is_unset(request.active): body['active'] = request.active real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateEmpAttrbuteVisibilitySettingResponse(), await self.do_roarequest_async('UpdateEmpAttrbuteVisibilitySetting', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/staffAttributes/visibilitySettings', 'json', req, runtime) ) def delete_emp_attribute_visibility( self, setting_id: str, ) -> dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityHeaders() return self.delete_emp_attribute_visibility_with_options(setting_id, headers, runtime) async def delete_emp_attribute_visibility_async( self, setting_id: str, ) -> dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityHeaders() return await self.delete_emp_attribute_visibility_with_options_async(setting_id, headers, runtime) def delete_emp_attribute_visibility_with_options( self, setting_id: str, headers: dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityResponse(), self.do_roarequest('DeleteEmpAttributeVisibility', 'contact_1.0', 'HTTP', 'DELETE', 'AK', f'/v1.0/contact/staffAttributes/visibilitySettings/{setting_id}', 'none', req, runtime) ) async def delete_emp_attribute_visibility_with_options_async( self, setting_id: str, headers: dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.DeleteEmpAttributeVisibilityResponse(), await self.do_roarequest_async('DeleteEmpAttributeVisibility', 'contact_1.0', 'HTTP', 'DELETE', 'AK', f'/v1.0/contact/staffAttributes/visibilitySettings/{setting_id}', 'none', req, runtime) ) def search_department( self, request: dingtalkcontact__1__0_models.SearchDepartmentRequest, ) -> dingtalkcontact__1__0_models.SearchDepartmentResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SearchDepartmentHeaders() return self.search_department_with_options(request, headers, runtime) async def search_department_async( self, request: dingtalkcontact__1__0_models.SearchDepartmentRequest, ) -> dingtalkcontact__1__0_models.SearchDepartmentResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SearchDepartmentHeaders() return await self.search_department_with_options_async(request, headers, runtime) def search_department_with_options( self, request: dingtalkcontact__1__0_models.SearchDepartmentRequest, headers: dingtalkcontact__1__0_models.SearchDepartmentHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SearchDepartmentResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.query_word): body['queryWord'] = request.query_word if not UtilClient.is_unset(request.offset): body['offset'] = request.offset if not UtilClient.is_unset(request.size): body['size'] = request.size real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SearchDepartmentResponse(), self.do_roarequest('SearchDepartment', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/departments/search', 'json', req, runtime) ) async def search_department_with_options_async( self, request: dingtalkcontact__1__0_models.SearchDepartmentRequest, headers: dingtalkcontact__1__0_models.SearchDepartmentHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SearchDepartmentResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.query_word): body['queryWord'] = request.query_word if not UtilClient.is_unset(request.offset): body['offset'] = request.offset if not UtilClient.is_unset(request.size): body['size'] = request.size real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SearchDepartmentResponse(), await self.do_roarequest_async('SearchDepartment', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/departments/search', 'json', req, runtime) ) def list_management_groups( self, request: dingtalkcontact__1__0_models.ListManagementGroupsRequest, ) -> dingtalkcontact__1__0_models.ListManagementGroupsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListManagementGroupsHeaders() return self.list_management_groups_with_options(request, headers, runtime) async def list_management_groups_async( self, request: dingtalkcontact__1__0_models.ListManagementGroupsRequest, ) -> dingtalkcontact__1__0_models.ListManagementGroupsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListManagementGroupsHeaders() return await self.list_management_groups_with_options_async(request, headers, runtime) def list_management_groups_with_options( self, request: dingtalkcontact__1__0_models.ListManagementGroupsRequest, headers: dingtalkcontact__1__0_models.ListManagementGroupsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListManagementGroupsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListManagementGroupsResponse(), self.do_roarequest('ListManagementGroups', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/managementGroups', 'json', req, runtime) ) async def list_management_groups_with_options_async( self, request: dingtalkcontact__1__0_models.ListManagementGroupsRequest, headers: dingtalkcontact__1__0_models.ListManagementGroupsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListManagementGroupsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListManagementGroupsResponse(), await self.do_roarequest_async('ListManagementGroups', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/managementGroups', 'json', req, runtime) ) def list_senior_settings( self, request: dingtalkcontact__1__0_models.ListSeniorSettingsRequest, ) -> dingtalkcontact__1__0_models.ListSeniorSettingsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListSeniorSettingsHeaders() return self.list_senior_settings_with_options(request, headers, runtime) async def list_senior_settings_async( self, request: dingtalkcontact__1__0_models.ListSeniorSettingsRequest, ) -> dingtalkcontact__1__0_models.ListSeniorSettingsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListSeniorSettingsHeaders() return await self.list_senior_settings_with_options_async(request, headers, runtime) def list_senior_settings_with_options( self, request: dingtalkcontact__1__0_models.ListSeniorSettingsRequest, headers: dingtalkcontact__1__0_models.ListSeniorSettingsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListSeniorSettingsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.senior_staff_id): query['seniorStaffId'] = request.senior_staff_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListSeniorSettingsResponse(), self.do_roarequest('ListSeniorSettings', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/seniorSettings', 'json', req, runtime) ) async def list_senior_settings_with_options_async( self, request: dingtalkcontact__1__0_models.ListSeniorSettingsRequest, headers: dingtalkcontact__1__0_models.ListSeniorSettingsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListSeniorSettingsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.senior_staff_id): query['seniorStaffId'] = request.senior_staff_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListSeniorSettingsResponse(), await self.do_roarequest_async('ListSeniorSettings', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/seniorSettings', 'json', req, runtime) ) def list_emp_attribute_visibility( self, request: dingtalkcontact__1__0_models.ListEmpAttributeVisibilityRequest, ) -> dingtalkcontact__1__0_models.ListEmpAttributeVisibilityResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListEmpAttributeVisibilityHeaders() return self.list_emp_attribute_visibility_with_options(request, headers, runtime) async def list_emp_attribute_visibility_async( self, request: dingtalkcontact__1__0_models.ListEmpAttributeVisibilityRequest, ) -> dingtalkcontact__1__0_models.ListEmpAttributeVisibilityResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListEmpAttributeVisibilityHeaders() return await self.list_emp_attribute_visibility_with_options_async(request, headers, runtime) def list_emp_attribute_visibility_with_options( self, request: dingtalkcontact__1__0_models.ListEmpAttributeVisibilityRequest, headers: dingtalkcontact__1__0_models.ListEmpAttributeVisibilityHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListEmpAttributeVisibilityResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListEmpAttributeVisibilityResponse(), self.do_roarequest('ListEmpAttributeVisibility', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/staffAttributes/visibilitySettings', 'json', req, runtime) ) async def list_emp_attribute_visibility_with_options_async( self, request: dingtalkcontact__1__0_models.ListEmpAttributeVisibilityRequest, headers: dingtalkcontact__1__0_models.ListEmpAttributeVisibilityHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListEmpAttributeVisibilityResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListEmpAttributeVisibilityResponse(), await self.do_roarequest_async('ListEmpAttributeVisibility', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/staffAttributes/visibilitySettings', 'json', req, runtime) ) def search_user( self, request: dingtalkcontact__1__0_models.SearchUserRequest, ) -> dingtalkcontact__1__0_models.SearchUserResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SearchUserHeaders() return self.search_user_with_options(request, headers, runtime) async def search_user_async( self, request: dingtalkcontact__1__0_models.SearchUserRequest, ) -> dingtalkcontact__1__0_models.SearchUserResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SearchUserHeaders() return await self.search_user_with_options_async(request, headers, runtime) def search_user_with_options( self, request: dingtalkcontact__1__0_models.SearchUserRequest, headers: dingtalkcontact__1__0_models.SearchUserHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SearchUserResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.query_word): body['queryWord'] = request.query_word if not UtilClient.is_unset(request.offset): body['offset'] = request.offset if not UtilClient.is_unset(request.size): body['size'] = request.size if not UtilClient.is_unset(request.full_match_field): body['fullMatchField'] = request.full_match_field real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SearchUserResponse(), self.do_roarequest('SearchUser', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/users/search', 'json', req, runtime) ) async def search_user_with_options_async( self, request: dingtalkcontact__1__0_models.SearchUserRequest, headers: dingtalkcontact__1__0_models.SearchUserHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SearchUserResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.query_word): body['queryWord'] = request.query_word if not UtilClient.is_unset(request.offset): body['offset'] = request.offset if not UtilClient.is_unset(request.size): body['size'] = request.size if not UtilClient.is_unset(request.full_match_field): body['fullMatchField'] = request.full_match_field real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SearchUserResponse(), await self.do_roarequest_async('SearchUser', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/users/search', 'json', req, runtime) ) def get_translate_file_job_result( self, request: dingtalkcontact__1__0_models.GetTranslateFileJobResultRequest, ) -> dingtalkcontact__1__0_models.GetTranslateFileJobResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetTranslateFileJobResultHeaders() return self.get_translate_file_job_result_with_options(request, headers, runtime) async def get_translate_file_job_result_async( self, request: dingtalkcontact__1__0_models.GetTranslateFileJobResultRequest, ) -> dingtalkcontact__1__0_models.GetTranslateFileJobResultResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetTranslateFileJobResultHeaders() return await self.get_translate_file_job_result_with_options_async(request, headers, runtime) def get_translate_file_job_result_with_options( self, request: dingtalkcontact__1__0_models.GetTranslateFileJobResultRequest, headers: dingtalkcontact__1__0_models.GetTranslateFileJobResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetTranslateFileJobResultResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.job_id): query['jobId'] = request.job_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetTranslateFileJobResultResponse(), self.do_roarequest('GetTranslateFileJobResult', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/files/translateResults', 'json', req, runtime) ) async def get_translate_file_job_result_with_options_async( self, request: dingtalkcontact__1__0_models.GetTranslateFileJobResultRequest, headers: dingtalkcontact__1__0_models.GetTranslateFileJobResultHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetTranslateFileJobResultResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.job_id): query['jobId'] = request.job_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetTranslateFileJobResultResponse(), await self.do_roarequest_async('GetTranslateFileJobResult', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/files/translateResults', 'json', req, runtime) ) def query_status( self, request: dingtalkcontact__1__0_models.QueryStatusRequest, ) -> dingtalkcontact__1__0_models.QueryStatusResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.QueryStatusHeaders() return self.query_status_with_options(request, headers, runtime) async def query_status_async( self, request: dingtalkcontact__1__0_models.QueryStatusRequest, ) -> dingtalkcontact__1__0_models.QueryStatusResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.QueryStatusHeaders() return await self.query_status_with_options_async(request, headers, runtime) def query_status_with_options( self, request: dingtalkcontact__1__0_models.QueryStatusRequest, headers: dingtalkcontact__1__0_models.QueryStatusHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.QueryStatusResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.user_id): query['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.QueryStatusResponse(), self.do_roarequest('QueryStatus', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccounts/status', 'json', req, runtime) ) async def query_status_with_options_async( self, request: dingtalkcontact__1__0_models.QueryStatusRequest, headers: dingtalkcontact__1__0_models.QueryStatusHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.QueryStatusResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.user_id): query['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.QueryStatusResponse(), await self.do_roarequest_async('QueryStatus', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccounts/status', 'json', req, runtime) ) def get_corp_card_style_list(self) -> dingtalkcontact__1__0_models.GetCorpCardStyleListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCorpCardStyleListHeaders() return self.get_corp_card_style_list_with_options(headers, runtime) async def get_corp_card_style_list_async(self) -> dingtalkcontact__1__0_models.GetCorpCardStyleListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCorpCardStyleListHeaders() return await self.get_corp_card_style_list_with_options_async(headers, runtime) def get_corp_card_style_list_with_options( self, headers: dingtalkcontact__1__0_models.GetCorpCardStyleListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCorpCardStyleListResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCorpCardStyleListResponse(), self.do_roarequest('GetCorpCardStyleList', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/styles/lists', 'json', req, runtime) ) async def get_corp_card_style_list_with_options_async( self, headers: dingtalkcontact__1__0_models.GetCorpCardStyleListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCorpCardStyleListResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCorpCardStyleListResponse(), await self.do_roarequest_async('GetCorpCardStyleList', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/styles/lists', 'json', req, runtime) ) def isv_card_event_push( self, request: dingtalkcontact__1__0_models.IsvCardEventPushRequest, ) -> dingtalkcontact__1__0_models.IsvCardEventPushResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.IsvCardEventPushHeaders() return self.isv_card_event_push_with_options(request, headers, runtime) async def isv_card_event_push_async( self, request: dingtalkcontact__1__0_models.IsvCardEventPushRequest, ) -> dingtalkcontact__1__0_models.IsvCardEventPushResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.IsvCardEventPushHeaders() return await self.isv_card_event_push_with_options_async(request, headers, runtime) def isv_card_event_push_with_options( self, request: dingtalkcontact__1__0_models.IsvCardEventPushRequest, headers: dingtalkcontact__1__0_models.IsvCardEventPushHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.IsvCardEventPushResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.isv_uid): query['isvUid'] = request.isv_uid if not UtilClient.is_unset(request.isv_card_id): query['isvCardId'] = request.isv_card_id if not UtilClient.is_unset(request.isv_token): query['isvToken'] = request.isv_token body = {} if not UtilClient.is_unset(request.event_type): body['eventType'] = request.event_type if not UtilClient.is_unset(request.event_params): body['eventParams'] = request.event_params real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query), body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.IsvCardEventPushResponse(), self.do_roarequest('IsvCardEventPush', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/cards/events/push', 'json', req, runtime) ) async def isv_card_event_push_with_options_async( self, request: dingtalkcontact__1__0_models.IsvCardEventPushRequest, headers: dingtalkcontact__1__0_models.IsvCardEventPushHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.IsvCardEventPushResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.isv_uid): query['isvUid'] = request.isv_uid if not UtilClient.is_unset(request.isv_card_id): query['isvCardId'] = request.isv_card_id if not UtilClient.is_unset(request.isv_token): query['isvToken'] = request.isv_token body = {} if not UtilClient.is_unset(request.event_type): body['eventType'] = request.event_type if not UtilClient.is_unset(request.event_params): body['eventParams'] = request.event_params real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query), body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.IsvCardEventPushResponse(), await self.do_roarequest_async('IsvCardEventPush', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/cards/events/push', 'json', req, runtime) ) def query_user_management_resources( self, user_id: str, ) -> dingtalkcontact__1__0_models.QueryUserManagementResourcesResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.QueryUserManagementResourcesHeaders() return self.query_user_management_resources_with_options(user_id, headers, runtime) async def query_user_management_resources_async( self, user_id: str, ) -> dingtalkcontact__1__0_models.QueryUserManagementResourcesResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.QueryUserManagementResourcesHeaders() return await self.query_user_management_resources_with_options_async(user_id, headers, runtime) def query_user_management_resources_with_options( self, user_id: str, headers: dingtalkcontact__1__0_models.QueryUserManagementResourcesHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.QueryUserManagementResourcesResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.QueryUserManagementResourcesResponse(), self.do_roarequest('QueryUserManagementResources', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/users/{user_id}/managemementResources', 'json', req, runtime) ) async def query_user_management_resources_with_options_async( self, user_id: str, headers: dingtalkcontact__1__0_models.QueryUserManagementResourcesHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.QueryUserManagementResourcesResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.QueryUserManagementResourcesResponse(), await self.do_roarequest_async('QueryUserManagementResources', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/users/{user_id}/managemementResources', 'json', req, runtime) ) def delete_contact_hide_setting( self, setting_id: str, ) -> dingtalkcontact__1__0_models.DeleteContactHideSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.DeleteContactHideSettingHeaders() return self.delete_contact_hide_setting_with_options(setting_id, headers, runtime) async def delete_contact_hide_setting_async( self, setting_id: str, ) -> dingtalkcontact__1__0_models.DeleteContactHideSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.DeleteContactHideSettingHeaders() return await self.delete_contact_hide_setting_with_options_async(setting_id, headers, runtime) def delete_contact_hide_setting_with_options( self, setting_id: str, headers: dingtalkcontact__1__0_models.DeleteContactHideSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.DeleteContactHideSettingResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.DeleteContactHideSettingResponse(), self.do_roarequest('DeleteContactHideSetting', 'contact_1.0', 'HTTP', 'DELETE', 'AK', f'/v1.0/contact/contactHideSettings/{setting_id}', 'none', req, runtime) ) async def delete_contact_hide_setting_with_options_async( self, setting_id: str, headers: dingtalkcontact__1__0_models.DeleteContactHideSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.DeleteContactHideSettingResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.DeleteContactHideSettingResponse(), await self.do_roarequest_async('DeleteContactHideSetting', 'contact_1.0', 'HTTP', 'DELETE', 'AK', f'/v1.0/contact/contactHideSettings/{setting_id}', 'none', req, runtime) ) def update_user_ownness( self, user_id: str, request: dingtalkcontact__1__0_models.UpdateUserOwnnessRequest, ) -> dingtalkcontact__1__0_models.UpdateUserOwnnessResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateUserOwnnessHeaders() return self.update_user_ownness_with_options(user_id, request, headers, runtime) async def update_user_ownness_async( self, user_id: str, request: dingtalkcontact__1__0_models.UpdateUserOwnnessRequest, ) -> dingtalkcontact__1__0_models.UpdateUserOwnnessResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateUserOwnnessHeaders() return await self.update_user_ownness_with_options_async(user_id, request, headers, runtime) def update_user_ownness_with_options( self, user_id: str, request: dingtalkcontact__1__0_models.UpdateUserOwnnessRequest, headers: dingtalkcontact__1__0_models.UpdateUserOwnnessHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateUserOwnnessResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ownenss_type): body['ownenssType'] = request.ownenss_type if not UtilClient.is_unset(request.id): body['id'] = request.id if not UtilClient.is_unset(request.start_time): body['startTime'] = request.start_time if not UtilClient.is_unset(request.end_time): body['endTime'] = request.end_time if not UtilClient.is_unset(request.deleted_flag): body['deletedFlag'] = request.deleted_flag real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateUserOwnnessResponse(), self.do_roarequest('UpdateUserOwnness', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/user/{user_id}/ownness', 'json', req, runtime) ) async def update_user_ownness_with_options_async( self, user_id: str, request: dingtalkcontact__1__0_models.UpdateUserOwnnessRequest, headers: dingtalkcontact__1__0_models.UpdateUserOwnnessHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateUserOwnnessResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ownenss_type): body['ownenssType'] = request.ownenss_type if not UtilClient.is_unset(request.id): body['id'] = request.id if not UtilClient.is_unset(request.start_time): body['startTime'] = request.start_time if not UtilClient.is_unset(request.end_time): body['endTime'] = request.end_time if not UtilClient.is_unset(request.deleted_flag): body['deletedFlag'] = request.deleted_flag real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateUserOwnnessResponse(), await self.do_roarequest_async('UpdateUserOwnness', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/user/{user_id}/ownness', 'json', req, runtime) ) def get_migration_union_id_by_union_id( self, request: dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdRequest, ) -> dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdHeaders() return self.get_migration_union_id_by_union_id_with_options(request, headers, runtime) async def get_migration_union_id_by_union_id_async( self, request: dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdRequest, ) -> dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdHeaders() return await self.get_migration_union_id_by_union_id_with_options_async(request, headers, runtime) def get_migration_union_id_by_union_id_with_options( self, request: dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdRequest, headers: dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.union_id): query['unionId'] = request.union_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdResponse(), self.do_roarequest('GetMigrationUnionIdByUnionId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getMigrationUnionIdByUnionIds', 'json', req, runtime) ) async def get_migration_union_id_by_union_id_with_options_async( self, request: dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdRequest, headers: dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.union_id): query['unionId'] = request.union_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetMigrationUnionIdByUnionIdResponse(), await self.do_roarequest_async('GetMigrationUnionIdByUnionId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getMigrationUnionIdByUnionIds', 'json', req, runtime) ) def get_ding_id_by_migration_ding_id( self, request: dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdRequest, ) -> dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdHeaders() return self.get_ding_id_by_migration_ding_id_with_options(request, headers, runtime) async def get_ding_id_by_migration_ding_id_async( self, request: dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdRequest, ) -> dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdHeaders() return await self.get_ding_id_by_migration_ding_id_with_options_async(request, headers, runtime) def get_ding_id_by_migration_ding_id_with_options( self, request: dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdRequest, headers: dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.migration_ding_id): query['migrationDingId'] = request.migration_ding_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdResponse(), self.do_roarequest('GetDingIdByMigrationDingId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getDingIdByMigrationDingIds', 'json', req, runtime) ) async def get_ding_id_by_migration_ding_id_with_options_async( self, request: dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdRequest, headers: dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.migration_ding_id): query['migrationDingId'] = request.migration_ding_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetDingIdByMigrationDingIdResponse(), await self.do_roarequest_async('GetDingIdByMigrationDingId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getDingIdByMigrationDingIds', 'json', req, runtime) ) def get_cooperate_org_invite_info( self, cooperate_corp_id: str, ) -> dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoHeaders() return self.get_cooperate_org_invite_info_with_options(cooperate_corp_id, headers, runtime) async def get_cooperate_org_invite_info_async( self, cooperate_corp_id: str, ) -> dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoHeaders() return await self.get_cooperate_org_invite_info_with_options_async(cooperate_corp_id, headers, runtime) def get_cooperate_org_invite_info_with_options( self, cooperate_corp_id: str, headers: dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoResponse(), self.do_roarequest('GetCooperateOrgInviteInfo', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cooperateCorps/{cooperate_corp_id}/inviteInfos', 'json', req, runtime) ) async def get_cooperate_org_invite_info_with_options_async( self, cooperate_corp_id: str, headers: dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCooperateOrgInviteInfoResponse(), await self.do_roarequest_async('GetCooperateOrgInviteInfo', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cooperateCorps/{cooperate_corp_id}/inviteInfos', 'json', req, runtime) ) def update_management_group( self, group_id: str, request: dingtalkcontact__1__0_models.UpdateManagementGroupRequest, ) -> dingtalkcontact__1__0_models.UpdateManagementGroupResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateManagementGroupHeaders() return self.update_management_group_with_options(group_id, request, headers, runtime) async def update_management_group_async( self, group_id: str, request: dingtalkcontact__1__0_models.UpdateManagementGroupRequest, ) -> dingtalkcontact__1__0_models.UpdateManagementGroupResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateManagementGroupHeaders() return await self.update_management_group_with_options_async(group_id, request, headers, runtime) def update_management_group_with_options( self, group_id: str, request: dingtalkcontact__1__0_models.UpdateManagementGroupRequest, headers: dingtalkcontact__1__0_models.UpdateManagementGroupHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateManagementGroupResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.group_name): body['groupName'] = request.group_name if not UtilClient.is_unset(request.members): body['members'] = request.members if not UtilClient.is_unset(request.scope): body['scope'] = request.scope if not UtilClient.is_unset(request.resource_ids): body['resourceIds'] = request.resource_ids real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateManagementGroupResponse(), self.do_roarequest('UpdateManagementGroup', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/managementGroups/{group_id}', 'none', req, runtime) ) async def update_management_group_with_options_async( self, group_id: str, request: dingtalkcontact__1__0_models.UpdateManagementGroupRequest, headers: dingtalkcontact__1__0_models.UpdateManagementGroupHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateManagementGroupResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.group_name): body['groupName'] = request.group_name if not UtilClient.is_unset(request.members): body['members'] = request.members if not UtilClient.is_unset(request.scope): body['scope'] = request.scope if not UtilClient.is_unset(request.resource_ids): body['resourceIds'] = request.resource_ids real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateManagementGroupResponse(), await self.do_roarequest_async('UpdateManagementGroup', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/managementGroups/{group_id}', 'none', req, runtime) ) def get_branch_auth_data( self, request: dingtalkcontact__1__0_models.GetBranchAuthDataRequest, ) -> dingtalkcontact__1__0_models.GetBranchAuthDataResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetBranchAuthDataHeaders() return self.get_branch_auth_data_with_options(request, headers, runtime) async def get_branch_auth_data_async( self, request: dingtalkcontact__1__0_models.GetBranchAuthDataRequest, ) -> dingtalkcontact__1__0_models.GetBranchAuthDataResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetBranchAuthDataHeaders() return await self.get_branch_auth_data_with_options_async(request, headers, runtime) def get_branch_auth_data_with_options( self, request: dingtalkcontact__1__0_models.GetBranchAuthDataRequest, headers: dingtalkcontact__1__0_models.GetBranchAuthDataHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetBranchAuthDataResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.branch_corp_id): query['branchCorpId'] = request.branch_corp_id if not UtilClient.is_unset(request.code): query['code'] = request.code body = {} if not UtilClient.is_unset(request.body): body = request.body real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query), body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetBranchAuthDataResponse(), self.do_roarequest('GetBranchAuthData', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/branchAuthDatas/search', 'json', req, runtime) ) async def get_branch_auth_data_with_options_async( self, request: dingtalkcontact__1__0_models.GetBranchAuthDataRequest, headers: dingtalkcontact__1__0_models.GetBranchAuthDataHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetBranchAuthDataResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.branch_corp_id): query['branchCorpId'] = request.branch_corp_id if not UtilClient.is_unset(request.code): query['code'] = request.code body = {} if not UtilClient.is_unset(request.body): body = request.body real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query), body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetBranchAuthDataResponse(), await self.do_roarequest_async('GetBranchAuthData', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/branchAuthDatas/search', 'json', req, runtime) ) def get_user( self, union_id: str, ) -> dingtalkcontact__1__0_models.GetUserResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetUserHeaders() return self.get_user_with_options(union_id, headers, runtime) async def get_user_async( self, union_id: str, ) -> dingtalkcontact__1__0_models.GetUserResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetUserHeaders() return await self.get_user_with_options_async(union_id, headers, runtime) def get_user_with_options( self, union_id: str, headers: dingtalkcontact__1__0_models.GetUserHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetUserResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetUserResponse(), self.do_roarequest('GetUser', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/users/{union_id}', 'json', req, runtime) ) async def get_user_with_options_async( self, union_id: str, headers: dingtalkcontact__1__0_models.GetUserHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetUserResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetUserResponse(), await self.do_roarequest_async('GetUser', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/users/{union_id}', 'json', req, runtime) ) def query_resource_management_members( self, resource_id: str, ) -> dingtalkcontact__1__0_models.QueryResourceManagementMembersResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.QueryResourceManagementMembersHeaders() return self.query_resource_management_members_with_options(resource_id, headers, runtime) async def query_resource_management_members_async( self, resource_id: str, ) -> dingtalkcontact__1__0_models.QueryResourceManagementMembersResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.QueryResourceManagementMembersHeaders() return await self.query_resource_management_members_with_options_async(resource_id, headers, runtime) def query_resource_management_members_with_options( self, resource_id: str, headers: dingtalkcontact__1__0_models.QueryResourceManagementMembersHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.QueryResourceManagementMembersResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.QueryResourceManagementMembersResponse(), self.do_roarequest('QueryResourceManagementMembers', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/resources/{resource_id}/managementMembers', 'json', req, runtime) ) async def query_resource_management_members_with_options_async( self, resource_id: str, headers: dingtalkcontact__1__0_models.QueryResourceManagementMembersHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.QueryResourceManagementMembersResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.QueryResourceManagementMembersResponse(), await self.do_roarequest_async('QueryResourceManagementMembers', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/resources/{resource_id}/managementMembers', 'json', req, runtime) ) def update_branch_attributes_in_cooperate( self, request: dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateRequest, ) -> dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateHeaders() return self.update_branch_attributes_in_cooperate_with_options(request, headers, runtime) async def update_branch_attributes_in_cooperate_async( self, request: dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateRequest, ) -> dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateHeaders() return await self.update_branch_attributes_in_cooperate_with_options_async(request, headers, runtime) def update_branch_attributes_in_cooperate_with_options( self, request: dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateRequest, headers: dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateResponse: UtilClient.validate_model(request) real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=UtilClient.to_array(request.body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateResponse(), self.do_roarequest('UpdateBranchAttributesInCooperate', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/cooperateCorps/branchAttributes', 'none', req, runtime) ) async def update_branch_attributes_in_cooperate_with_options_async( self, request: dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateRequest, headers: dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateResponse: UtilClient.validate_model(request) real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=UtilClient.to_array(request.body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateBranchAttributesInCooperateResponse(), await self.do_roarequest_async('UpdateBranchAttributesInCooperate', 'contact_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/contact/cooperateCorps/branchAttributes', 'none', req, runtime) ) def translate_file( self, request: dingtalkcontact__1__0_models.TranslateFileRequest, ) -> dingtalkcontact__1__0_models.TranslateFileResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.TranslateFileHeaders() return self.translate_file_with_options(request, headers, runtime) async def translate_file_async( self, request: dingtalkcontact__1__0_models.TranslateFileRequest, ) -> dingtalkcontact__1__0_models.TranslateFileResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.TranslateFileHeaders() return await self.translate_file_with_options_async(request, headers, runtime) def translate_file_with_options( self, request: dingtalkcontact__1__0_models.TranslateFileRequest, headers: dingtalkcontact__1__0_models.TranslateFileHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.TranslateFileResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.medias): body['medias'] = request.medias if not UtilClient.is_unset(request.output_file_name): body['outputFileName'] = request.output_file_name if not UtilClient.is_unset(request.union_id): body['unionId'] = request.union_id if not UtilClient.is_unset(request.request_id): body['RequestId'] = request.request_id if not UtilClient.is_unset(request.eagle_eye_trace_id): body['eagleEyeTraceId'] = request.eagle_eye_trace_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.TranslateFileResponse(), self.do_roarequest('TranslateFile', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/files/translate', 'json', req, runtime) ) async def translate_file_with_options_async( self, request: dingtalkcontact__1__0_models.TranslateFileRequest, headers: dingtalkcontact__1__0_models.TranslateFileHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.TranslateFileResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.medias): body['medias'] = request.medias if not UtilClient.is_unset(request.output_file_name): body['outputFileName'] = request.output_file_name if not UtilClient.is_unset(request.union_id): body['unionId'] = request.union_id if not UtilClient.is_unset(request.request_id): body['RequestId'] = request.request_id if not UtilClient.is_unset(request.eagle_eye_trace_id): body['eagleEyeTraceId'] = request.eagle_eye_trace_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.TranslateFileResponse(), await self.do_roarequest_async('TranslateFile', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/files/translate', 'json', req, runtime) ) def update_senior_setting( self, request: dingtalkcontact__1__0_models.UpdateSeniorSettingRequest, ) -> dingtalkcontact__1__0_models.UpdateSeniorSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateSeniorSettingHeaders() return self.update_senior_setting_with_options(request, headers, runtime) async def update_senior_setting_async( self, request: dingtalkcontact__1__0_models.UpdateSeniorSettingRequest, ) -> dingtalkcontact__1__0_models.UpdateSeniorSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.UpdateSeniorSettingHeaders() return await self.update_senior_setting_with_options_async(request, headers, runtime) def update_senior_setting_with_options( self, request: dingtalkcontact__1__0_models.UpdateSeniorSettingRequest, headers: dingtalkcontact__1__0_models.UpdateSeniorSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateSeniorSettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.senior_staff_id): body['seniorStaffId'] = request.senior_staff_id if not UtilClient.is_unset(request.open): body['open'] = request.open if not UtilClient.is_unset(request.permit_staff_ids): body['permitStaffIds'] = request.permit_staff_ids if not UtilClient.is_unset(request.permit_dept_ids): body['permitDeptIds'] = request.permit_dept_ids if not UtilClient.is_unset(request.permit_tag_ids): body['permitTagIds'] = request.permit_tag_ids if not UtilClient.is_unset(request.protect_scenes): body['protectScenes'] = request.protect_scenes real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateSeniorSettingResponse(), self.do_roarequest('UpdateSeniorSetting', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/seniorSettings', 'none', req, runtime) ) async def update_senior_setting_with_options_async( self, request: dingtalkcontact__1__0_models.UpdateSeniorSettingRequest, headers: dingtalkcontact__1__0_models.UpdateSeniorSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.UpdateSeniorSettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.senior_staff_id): body['seniorStaffId'] = request.senior_staff_id if not UtilClient.is_unset(request.open): body['open'] = request.open if not UtilClient.is_unset(request.permit_staff_ids): body['permitStaffIds'] = request.permit_staff_ids if not UtilClient.is_unset(request.permit_dept_ids): body['permitDeptIds'] = request.permit_dept_ids if not UtilClient.is_unset(request.permit_tag_ids): body['permitTagIds'] = request.permit_tag_ids if not UtilClient.is_unset(request.protect_scenes): body['protectScenes'] = request.protect_scenes real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.UpdateSeniorSettingResponse(), await self.do_roarequest_async('UpdateSeniorSetting', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/seniorSettings', 'none', req, runtime) ) def set_disable( self, request: dingtalkcontact__1__0_models.SetDisableRequest, ) -> dingtalkcontact__1__0_models.SetDisableResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SetDisableHeaders() return self.set_disable_with_options(request, headers, runtime) async def set_disable_async( self, request: dingtalkcontact__1__0_models.SetDisableRequest, ) -> dingtalkcontact__1__0_models.SetDisableResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SetDisableHeaders() return await self.set_disable_with_options_async(request, headers, runtime) def set_disable_with_options( self, request: dingtalkcontact__1__0_models.SetDisableRequest, headers: dingtalkcontact__1__0_models.SetDisableHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SetDisableResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.reason): body['reason'] = request.reason real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SetDisableResponse(), self.do_roarequest('SetDisable', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/disable', 'none', req, runtime) ) async def set_disable_with_options_async( self, request: dingtalkcontact__1__0_models.SetDisableRequest, headers: dingtalkcontact__1__0_models.SetDisableHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SetDisableResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id if not UtilClient.is_unset(request.reason): body['reason'] = request.reason real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SetDisableResponse(), await self.do_roarequest_async('SetDisable', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/disable', 'none', req, runtime) ) def get_apply_invite_info( self, request: dingtalkcontact__1__0_models.GetApplyInviteInfoRequest, ) -> dingtalkcontact__1__0_models.GetApplyInviteInfoResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetApplyInviteInfoHeaders() return self.get_apply_invite_info_with_options(request, headers, runtime) async def get_apply_invite_info_async( self, request: dingtalkcontact__1__0_models.GetApplyInviteInfoRequest, ) -> dingtalkcontact__1__0_models.GetApplyInviteInfoResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetApplyInviteInfoHeaders() return await self.get_apply_invite_info_with_options_async(request, headers, runtime) def get_apply_invite_info_with_options( self, request: dingtalkcontact__1__0_models.GetApplyInviteInfoRequest, headers: dingtalkcontact__1__0_models.GetApplyInviteInfoHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetApplyInviteInfoResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.inviter_user_id): query['inviterUserId'] = request.inviter_user_id if not UtilClient.is_unset(request.dept_id): query['deptId'] = request.dept_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetApplyInviteInfoResponse(), self.do_roarequest('GetApplyInviteInfo', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/invites/infos', 'json', req, runtime) ) async def get_apply_invite_info_with_options_async( self, request: dingtalkcontact__1__0_models.GetApplyInviteInfoRequest, headers: dingtalkcontact__1__0_models.GetApplyInviteInfoHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetApplyInviteInfoResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.inviter_user_id): query['inviterUserId'] = request.inviter_user_id if not UtilClient.is_unset(request.dept_id): query['deptId'] = request.dept_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetApplyInviteInfoResponse(), await self.do_roarequest_async('GetApplyInviteInfo', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/invites/infos', 'json', req, runtime) ) def create_cooperate_org( self, request: dingtalkcontact__1__0_models.CreateCooperateOrgRequest, ) -> dingtalkcontact__1__0_models.CreateCooperateOrgResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.CreateCooperateOrgHeaders() return self.create_cooperate_org_with_options(request, headers, runtime) async def create_cooperate_org_async( self, request: dingtalkcontact__1__0_models.CreateCooperateOrgRequest, ) -> dingtalkcontact__1__0_models.CreateCooperateOrgResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.CreateCooperateOrgHeaders() return await self.create_cooperate_org_with_options_async(request, headers, runtime) def create_cooperate_org_with_options( self, request: dingtalkcontact__1__0_models.CreateCooperateOrgRequest, headers: dingtalkcontact__1__0_models.CreateCooperateOrgHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.CreateCooperateOrgResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.org_name): body['orgName'] = request.org_name if not UtilClient.is_unset(request.logo_media_id): body['logoMediaId'] = request.logo_media_id if not UtilClient.is_unset(request.industry_code): body['industryCode'] = request.industry_code real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.CreateCooperateOrgResponse(), self.do_roarequest('CreateCooperateOrg', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/cooperateCorps', 'json', req, runtime) ) async def create_cooperate_org_with_options_async( self, request: dingtalkcontact__1__0_models.CreateCooperateOrgRequest, headers: dingtalkcontact__1__0_models.CreateCooperateOrgHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.CreateCooperateOrgResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.org_name): body['orgName'] = request.org_name if not UtilClient.is_unset(request.logo_media_id): body['logoMediaId'] = request.logo_media_id if not UtilClient.is_unset(request.industry_code): body['industryCode'] = request.industry_code real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.CreateCooperateOrgResponse(), await self.do_roarequest_async('CreateCooperateOrg', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/cooperateCorps', 'json', req, runtime) ) def list_emp_leave_records( self, request: dingtalkcontact__1__0_models.ListEmpLeaveRecordsRequest, ) -> dingtalkcontact__1__0_models.ListEmpLeaveRecordsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListEmpLeaveRecordsHeaders() return self.list_emp_leave_records_with_options(request, headers, runtime) async def list_emp_leave_records_async( self, request: dingtalkcontact__1__0_models.ListEmpLeaveRecordsRequest, ) -> dingtalkcontact__1__0_models.ListEmpLeaveRecordsResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.ListEmpLeaveRecordsHeaders() return await self.list_emp_leave_records_with_options_async(request, headers, runtime) def list_emp_leave_records_with_options( self, request: dingtalkcontact__1__0_models.ListEmpLeaveRecordsRequest, headers: dingtalkcontact__1__0_models.ListEmpLeaveRecordsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListEmpLeaveRecordsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.start_time): query['startTime'] = request.start_time if not UtilClient.is_unset(request.end_time): query['endTime'] = request.end_time if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListEmpLeaveRecordsResponse(), self.do_roarequest('ListEmpLeaveRecords', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/empLeaveRecords', 'json', req, runtime) ) async def list_emp_leave_records_with_options_async( self, request: dingtalkcontact__1__0_models.ListEmpLeaveRecordsRequest, headers: dingtalkcontact__1__0_models.ListEmpLeaveRecordsHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.ListEmpLeaveRecordsResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.start_time): query['startTime'] = request.start_time if not UtilClient.is_unset(request.end_time): query['endTime'] = request.end_time if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.ListEmpLeaveRecordsResponse(), await self.do_roarequest_async('ListEmpLeaveRecords', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/empLeaveRecords', 'json', req, runtime) ) def get_card_info( self, card_id: str, ) -> dingtalkcontact__1__0_models.GetCardInfoResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCardInfoHeaders() return self.get_card_info_with_options(card_id, headers, runtime) async def get_card_info_async( self, card_id: str, ) -> dingtalkcontact__1__0_models.GetCardInfoResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetCardInfoHeaders() return await self.get_card_info_with_options_async(card_id, headers, runtime) def get_card_info_with_options( self, card_id: str, headers: dingtalkcontact__1__0_models.GetCardInfoHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCardInfoResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCardInfoResponse(), self.do_roarequest('GetCardInfo', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/infos/{card_id}', 'json', req, runtime) ) async def get_card_info_with_options_async( self, card_id: str, headers: dingtalkcontact__1__0_models.GetCardInfoHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetCardInfoResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetCardInfoResponse(), await self.do_roarequest_async('GetCardInfo', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/infos/{card_id}', 'json', req, runtime) ) def get_migration_ding_id_by_ding_id( self, request: dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdRequest, ) -> dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdHeaders() return self.get_migration_ding_id_by_ding_id_with_options(request, headers, runtime) async def get_migration_ding_id_by_ding_id_async( self, request: dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdRequest, ) -> dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdHeaders() return await self.get_migration_ding_id_by_ding_id_with_options_async(request, headers, runtime) def get_migration_ding_id_by_ding_id_with_options( self, request: dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdRequest, headers: dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.ding_id): query['dingId'] = request.ding_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdResponse(), self.do_roarequest('GetMigrationDingIdByDingId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getMigrationDingIdByDingIds', 'json', req, runtime) ) async def get_migration_ding_id_by_ding_id_with_options_async( self, request: dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdRequest, headers: dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.ding_id): query['dingId'] = request.ding_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetMigrationDingIdByDingIdResponse(), await self.do_roarequest_async('GetMigrationDingIdByDingId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getMigrationDingIdByDingIds', 'json', req, runtime) ) def set_enable( self, request: dingtalkcontact__1__0_models.SetEnableRequest, ) -> dingtalkcontact__1__0_models.SetEnableResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SetEnableHeaders() return self.set_enable_with_options(request, headers, runtime) async def set_enable_async( self, request: dingtalkcontact__1__0_models.SetEnableRequest, ) -> dingtalkcontact__1__0_models.SetEnableResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.SetEnableHeaders() return await self.set_enable_with_options_async(request, headers, runtime) def set_enable_with_options( self, request: dingtalkcontact__1__0_models.SetEnableRequest, headers: dingtalkcontact__1__0_models.SetEnableHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SetEnableResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SetEnableResponse(), self.do_roarequest('SetEnable', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/enable', 'none', req, runtime) ) async def set_enable_with_options_async( self, request: dingtalkcontact__1__0_models.SetEnableRequest, headers: dingtalkcontact__1__0_models.SetEnableHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.SetEnableResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.SetEnableResponse(), await self.do_roarequest_async('SetEnable', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/enable', 'none', req, runtime) ) def create_management_group( self, request: dingtalkcontact__1__0_models.CreateManagementGroupRequest, ) -> dingtalkcontact__1__0_models.CreateManagementGroupResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.CreateManagementGroupHeaders() return self.create_management_group_with_options(request, headers, runtime) async def create_management_group_async( self, request: dingtalkcontact__1__0_models.CreateManagementGroupRequest, ) -> dingtalkcontact__1__0_models.CreateManagementGroupResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.CreateManagementGroupHeaders() return await self.create_management_group_with_options_async(request, headers, runtime) def create_management_group_with_options( self, request: dingtalkcontact__1__0_models.CreateManagementGroupRequest, headers: dingtalkcontact__1__0_models.CreateManagementGroupHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.CreateManagementGroupResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.group_name): body['groupName'] = request.group_name if not UtilClient.is_unset(request.members): body['members'] = request.members if not UtilClient.is_unset(request.scope): body['scope'] = request.scope if not UtilClient.is_unset(request.resource_ids): body['resourceIds'] = request.resource_ids real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.CreateManagementGroupResponse(), self.do_roarequest('CreateManagementGroup', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/managementGroups', 'json', req, runtime) ) async def create_management_group_with_options_async( self, request: dingtalkcontact__1__0_models.CreateManagementGroupRequest, headers: dingtalkcontact__1__0_models.CreateManagementGroupHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.CreateManagementGroupResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.group_name): body['groupName'] = request.group_name if not UtilClient.is_unset(request.members): body['members'] = request.members if not UtilClient.is_unset(request.scope): body['scope'] = request.scope if not UtilClient.is_unset(request.resource_ids): body['resourceIds'] = request.resource_ids real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.CreateManagementGroupResponse(), await self.do_roarequest_async('CreateManagementGroup', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/managementGroups', 'json', req, runtime) ) def delete_management_group( self, group_id: str, ) -> dingtalkcontact__1__0_models.DeleteManagementGroupResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.DeleteManagementGroupHeaders() return self.delete_management_group_with_options(group_id, headers, runtime) async def delete_management_group_async( self, group_id: str, ) -> dingtalkcontact__1__0_models.DeleteManagementGroupResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.DeleteManagementGroupHeaders() return await self.delete_management_group_with_options_async(group_id, headers, runtime) def delete_management_group_with_options( self, group_id: str, headers: dingtalkcontact__1__0_models.DeleteManagementGroupHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.DeleteManagementGroupResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.DeleteManagementGroupResponse(), self.do_roarequest('DeleteManagementGroup', 'contact_1.0', 'HTTP', 'DELETE', 'AK', f'/v1.0/contact/managementGroups/{group_id}', 'none', req, runtime) ) async def delete_management_group_with_options_async( self, group_id: str, headers: dingtalkcontact__1__0_models.DeleteManagementGroupHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.DeleteManagementGroupResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.DeleteManagementGroupResponse(), await self.do_roarequest_async('DeleteManagementGroup', 'contact_1.0', 'HTTP', 'DELETE', 'AK', f'/v1.0/contact/managementGroups/{group_id}', 'none', req, runtime) ) def transform_to_exclusive_account( self, request: dingtalkcontact__1__0_models.TransformToExclusiveAccountRequest, ) -> dingtalkcontact__1__0_models.TransformToExclusiveAccountResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.TransformToExclusiveAccountHeaders() return self.transform_to_exclusive_account_with_options(request, headers, runtime) async def transform_to_exclusive_account_async( self, request: dingtalkcontact__1__0_models.TransformToExclusiveAccountRequest, ) -> dingtalkcontact__1__0_models.TransformToExclusiveAccountResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.TransformToExclusiveAccountHeaders() return await self.transform_to_exclusive_account_with_options_async(request, headers, runtime) def transform_to_exclusive_account_with_options( self, request: dingtalkcontact__1__0_models.TransformToExclusiveAccountRequest, headers: dingtalkcontact__1__0_models.TransformToExclusiveAccountHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.TransformToExclusiveAccountResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.transform_type): body['transformType'] = request.transform_type if not UtilClient.is_unset(request.idp_ding_talk): body['idpDingTalk'] = request.idp_ding_talk if not UtilClient.is_unset(request.login_id): body['loginId'] = request.login_id if not UtilClient.is_unset(request.init_password): body['initPassword'] = request.init_password if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.TransformToExclusiveAccountResponse(), self.do_roarequest('TransformToExclusiveAccount', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccount/transformToExclusiveAccounts', 'none', req, runtime) ) async def transform_to_exclusive_account_with_options_async( self, request: dingtalkcontact__1__0_models.TransformToExclusiveAccountRequest, headers: dingtalkcontact__1__0_models.TransformToExclusiveAccountHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.TransformToExclusiveAccountResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.transform_type): body['transformType'] = request.transform_type if not UtilClient.is_unset(request.idp_ding_talk): body['idpDingTalk'] = request.idp_ding_talk if not UtilClient.is_unset(request.login_id): body['loginId'] = request.login_id if not UtilClient.is_unset(request.init_password): body['initPassword'] = request.init_password if not UtilClient.is_unset(request.user_id): body['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.TransformToExclusiveAccountResponse(), await self.do_roarequest_async('TransformToExclusiveAccount', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccount/transformToExclusiveAccounts', 'none', req, runtime) ) def get_user_card_holder_list( self, request: dingtalkcontact__1__0_models.GetUserCardHolderListRequest, ) -> dingtalkcontact__1__0_models.GetUserCardHolderListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetUserCardHolderListHeaders() return self.get_user_card_holder_list_with_options(request, headers, runtime) async def get_user_card_holder_list_async( self, request: dingtalkcontact__1__0_models.GetUserCardHolderListRequest, ) -> dingtalkcontact__1__0_models.GetUserCardHolderListResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetUserCardHolderListHeaders() return await self.get_user_card_holder_list_with_options_async(request, headers, runtime) def get_user_card_holder_list_with_options( self, request: dingtalkcontact__1__0_models.GetUserCardHolderListRequest, headers: dingtalkcontact__1__0_models.GetUserCardHolderListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetUserCardHolderListResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetUserCardHolderListResponse(), self.do_roarequest('GetUserCardHolderList', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/holders/lists', 'json', req, runtime) ) async def get_user_card_holder_list_with_options_async( self, request: dingtalkcontact__1__0_models.GetUserCardHolderListRequest, headers: dingtalkcontact__1__0_models.GetUserCardHolderListHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetUserCardHolderListResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.next_token): query['nextToken'] = request.next_token if not UtilClient.is_unset(request.max_results): query['maxResults'] = request.max_results real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetUserCardHolderListResponse(), await self.do_roarequest_async('GetUserCardHolderList', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/cards/holders/lists', 'json', req, runtime) ) def get_union_id_by_migration_union_id( self, request: dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdRequest, ) -> dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdHeaders() return self.get_union_id_by_migration_union_id_with_options(request, headers, runtime) async def get_union_id_by_migration_union_id_async( self, request: dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdRequest, ) -> dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdHeaders() return await self.get_union_id_by_migration_union_id_with_options_async(request, headers, runtime) def get_union_id_by_migration_union_id_with_options( self, request: dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdRequest, headers: dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.migration_union_id): query['migrationUnionId'] = request.migration_union_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdResponse(), self.do_roarequest('GetUnionIdByMigrationUnionId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getUnionIdByMigrationUnionIds', 'json', req, runtime) ) async def get_union_id_by_migration_union_id_with_options_async( self, request: dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdRequest, headers: dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.migration_union_id): query['migrationUnionId'] = request.migration_union_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetUnionIdByMigrationUnionIdResponse(), await self.do_roarequest_async('GetUnionIdByMigrationUnionId', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/orgAccount/getUnionIdByMigrationUnionIds', 'json', req, runtime) ) def multi_org_permission_grant( self, request: dingtalkcontact__1__0_models.MultiOrgPermissionGrantRequest, ) -> dingtalkcontact__1__0_models.MultiOrgPermissionGrantResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.MultiOrgPermissionGrantHeaders() return self.multi_org_permission_grant_with_options(request, headers, runtime) async def multi_org_permission_grant_async( self, request: dingtalkcontact__1__0_models.MultiOrgPermissionGrantRequest, ) -> dingtalkcontact__1__0_models.MultiOrgPermissionGrantResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.MultiOrgPermissionGrantHeaders() return await self.multi_org_permission_grant_with_options_async(request, headers, runtime) def multi_org_permission_grant_with_options( self, request: dingtalkcontact__1__0_models.MultiOrgPermissionGrantRequest, headers: dingtalkcontact__1__0_models.MultiOrgPermissionGrantHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.MultiOrgPermissionGrantResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.join_corp_id): body['joinCorpId'] = request.join_corp_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.MultiOrgPermissionGrantResponse(), self.do_roarequest('MultiOrgPermissionGrant', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/multiOrgPermissions/auth', 'none', req, runtime) ) async def multi_org_permission_grant_with_options_async( self, request: dingtalkcontact__1__0_models.MultiOrgPermissionGrantRequest, headers: dingtalkcontact__1__0_models.MultiOrgPermissionGrantHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.MultiOrgPermissionGrantResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.join_corp_id): body['joinCorpId'] = request.join_corp_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkcontact__1__0_models.MultiOrgPermissionGrantResponse(), await self.do_roarequest_async('MultiOrgPermissionGrant', 'contact_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/contact/orgAccounts/multiOrgPermissions/auth', 'none', req, runtime) ) def get_latest_ding_index(self) -> dingtalkcontact__1__0_models.GetLatestDingIndexResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetLatestDingIndexHeaders() return self.get_latest_ding_index_with_options(headers, runtime) async def get_latest_ding_index_async(self) -> dingtalkcontact__1__0_models.GetLatestDingIndexResponse: runtime = util_models.RuntimeOptions() headers = dingtalkcontact__1__0_models.GetLatestDingIndexHeaders() return await self.get_latest_ding_index_with_options_async(headers, runtime) def get_latest_ding_index_with_options( self, headers: dingtalkcontact__1__0_models.GetLatestDingIndexHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetLatestDingIndexResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetLatestDingIndexResponse(), self.do_roarequest('GetLatestDingIndex', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/dingIndexs', 'json', req, runtime) ) async def get_latest_ding_index_with_options_async( self, headers: dingtalkcontact__1__0_models.GetLatestDingIndexHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkcontact__1__0_models.GetLatestDingIndexResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkcontact__1__0_models.GetLatestDingIndexResponse(), await self.do_roarequest_async('GetLatestDingIndex', 'contact_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/contact/dingIndexs', 'json', req, runtime) )
51.012683
201
0.713089
16,642
156,864
6.283439
0.027581
0.012968
0.09543
0.129111
0.985904
0.966032
0.953705
0.926412
0.900248
0.883656
0
0.012333
0.205528
156,864
3,074
202
51.029278
0.826743
0.00051
0
0.807692
1
0
0.076137
0.045442
0
0
0
0
0
1
0.031532
false
0.001386
0.002426
0
0.096674
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
b8cadc281ef000384fb5a7ee600f457c909219e2
1,949
py
Python
tests/atom_factory/conftest.py
lukasturcani/vabene
e69ffe8d8509b5ff775a8c31528f53c09d6bab7c
[ "MIT" ]
19
2020-04-15T01:20:56.000Z
2021-11-06T11:33:46.000Z
tests/atom_factory/conftest.py
lukasturcani/vabene
e69ffe8d8509b5ff775a8c31528f53c09d6bab7c
[ "MIT" ]
null
null
null
tests/atom_factory/conftest.py
lukasturcani/vabene
e69ffe8d8509b5ff775a8c31528f53c09d6bab7c
[ "MIT" ]
5
2020-04-15T00:53:52.000Z
2021-04-13T03:33:44.000Z
import pytest import vabene as vb from .case_data import CaseData @pytest.fixture( params=( CaseData( atom_factory=vb.RandomAtomFactory( atoms=(), num_atoms=2, required_atoms=( vb.Atom(6, 0, 4), vb.Atom(7, 2, 3), ), random_seed=None, ), atoms=( vb.Atom(6, 0, 4), vb.Atom(7, 2, 3), ), ), CaseData( atom_factory=vb.RandomAtomFactory( atoms=(), num_atoms=3, required_atoms=( vb.Atom(6, 0, 4), vb.Atom(7, 2, 3), ), random_seed=None, ), atoms=( vb.Atom(6, 0, 4), vb.Atom(7, 2, 3), ), ), CaseData( atom_factory=vb.RandomAtomFactory( atoms=( vb.Atom(8, -1, 5), ), num_atoms=4, required_atoms=( vb.Atom(6, 0, 4), vb.Atom(7, 2, 3), ), random_seed=None, ), atoms=( vb.Atom(6, 0, 4), vb.Atom(7, 2, 3), vb.Atom(8, -1, 5), vb.Atom(8, -1, 5), ), ), CaseData( atom_factory=vb.RandomAtomFactory( atoms=( vb.Atom(8, -1, 5), ), num_atoms=1, required_atoms=( vb.Atom(6, 0, 4), vb.Atom(7, 2, 3), ), random_seed=None, ), atoms=( vb.Atom(6, 0, 4), ), ), ), ) def case_data(request): return request.param
24.987179
46
0.325295
176
1,949
3.5
0.1875
0.185065
0.178571
0.155844
0.816558
0.787338
0.787338
0.787338
0.691558
0.691558
0
0.070848
0.558235
1,949
77
47
25.311688
0.644599
0
0
0.837838
0
0
0
0
0
0
0
0
0
1
0.013514
false
0
0.040541
0.013514
0.067568
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b8dbe1f96a2fdd2c9e1e4d3a03a217a3c01a4311
12,512
py
Python
tests/test_acs_sample.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
7
2021-08-18T00:42:05.000Z
2022-03-14T09:49:15.000Z
tests/test_acs_sample.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
null
null
null
tests/test_acs_sample.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
1
2022-03-14T09:49:20.000Z
2022-03-14T09:49:20.000Z
# Code generated by lark_sdk_gen. DO NOT EDIT. import unittest import pylark import pytest from tests.test_conf import app_all_permission, app_no_permission from tests.test_helper import mock_get_tenant_access_token_failed def mock(*args, **kwargs): raise pylark.PyLarkError(scope="scope", func="func", code=1, msg="mock-failed") def mock_raw_request(*args, **kwargs): raise pylark.PyLarkError( scope="scope", func="func", code=1, msg="mock-raw-request-failed" ) # mock get token class TestACSSampleMockGetTokenFailed(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestACSSampleMockGetTokenFailed, self).__init__(*args, **kwargs) self.cli = app_all_permission.ins() self.cli.auth.get_tenant_access_token = mock_get_tenant_access_token_failed self.cli.auth.get_app_access_token = mock_get_tenant_access_token_failed self.module_cli = self.cli.acs def test_mock_get_token_get_acs_access_record_photo(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_photo( pylark.GetACSAccessRecordPhotoReq() ) assert "msg=failed" in f"{e}" def test_mock_get_token_get_acs_access_record_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_list( pylark.GetACSAccessRecordListReq() ) assert "msg=failed" in f"{e}" def test_mock_get_token_get_acs_device_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_device_list(pylark.GetACSDeviceListReq()) assert "msg=failed" in f"{e}" def test_mock_get_token_get_acs_user_face(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_face(pylark.GetACSUserFaceReq()) assert "msg=failed" in f"{e}" def test_mock_get_token_update_acs_user_face(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user_face(pylark.UpdateACSUserFaceReq()) assert "msg=failed" in f"{e}" def test_mock_get_token_get_acs_user(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user(pylark.GetACSUserReq()) assert "msg=failed" in f"{e}" def test_mock_get_token_update_acs_user(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user(pylark.UpdateACSUserReq()) assert "msg=failed" in f"{e}" def test_mock_get_token_get_acs_user_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_list(pylark.GetACSUserListReq()) assert "msg=failed" in f"{e}" # mock mock self func class TestACSSampleMockSelfFuncFailed(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestACSSampleMockSelfFuncFailed, self).__init__(*args, **kwargs) self.cli = app_all_permission.ins() self.module_cli = self.cli.acs def test_mock_self_func_get_acs_access_record_photo(self): origin_func = self.module_cli.get_acs_access_record_photo self.module_cli.get_acs_access_record_photo = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_photo( pylark.GetACSAccessRecordPhotoReq() ) assert "msg=mock-failed" in f"{e}" self.module_cli.get_acs_access_record_photo = origin_func def test_mock_self_func_get_acs_access_record_list(self): origin_func = self.module_cli.get_acs_access_record_list self.module_cli.get_acs_access_record_list = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_list( pylark.GetACSAccessRecordListReq() ) assert "msg=mock-failed" in f"{e}" self.module_cli.get_acs_access_record_list = origin_func def test_mock_self_func_get_acs_device_list(self): origin_func = self.module_cli.get_acs_device_list self.module_cli.get_acs_device_list = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_device_list(pylark.GetACSDeviceListReq()) assert "msg=mock-failed" in f"{e}" self.module_cli.get_acs_device_list = origin_func def test_mock_self_func_get_acs_user_face(self): origin_func = self.module_cli.get_acs_user_face self.module_cli.get_acs_user_face = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_face(pylark.GetACSUserFaceReq()) assert "msg=mock-failed" in f"{e}" self.module_cli.get_acs_user_face = origin_func def test_mock_self_func_update_acs_user_face(self): origin_func = self.module_cli.update_acs_user_face self.module_cli.update_acs_user_face = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user_face(pylark.UpdateACSUserFaceReq()) assert "msg=mock-failed" in f"{e}" self.module_cli.update_acs_user_face = origin_func def test_mock_self_func_get_acs_user(self): origin_func = self.module_cli.get_acs_user self.module_cli.get_acs_user = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user(pylark.GetACSUserReq()) assert "msg=mock-failed" in f"{e}" self.module_cli.get_acs_user = origin_func def test_mock_self_func_update_acs_user(self): origin_func = self.module_cli.update_acs_user self.module_cli.update_acs_user = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user(pylark.UpdateACSUserReq()) assert "msg=mock-failed" in f"{e}" self.module_cli.update_acs_user = origin_func def test_mock_self_func_get_acs_user_list(self): origin_func = self.module_cli.get_acs_user_list self.module_cli.get_acs_user_list = mock with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_list(pylark.GetACSUserListReq()) assert "msg=mock-failed" in f"{e}" self.module_cli.get_acs_user_list = origin_func # mock raw request class TestACSSampleMockRawRequestFailed(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestACSSampleMockRawRequestFailed, self).__init__(*args, **kwargs) self.cli = app_all_permission.ins() self.module_cli = self.cli.acs self.cli.raw_request = mock_raw_request def test_mock_raw_request_get_acs_access_record_photo(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_photo( pylark.GetACSAccessRecordPhotoReq( access_record_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg def test_mock_raw_request_get_acs_access_record_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_list( pylark.GetACSAccessRecordListReq() ) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg def test_mock_raw_request_get_acs_device_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_device_list(pylark.GetACSDeviceListReq()) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg def test_mock_raw_request_get_acs_user_face(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_face( pylark.GetACSUserFaceReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg def test_mock_raw_request_update_acs_user_face(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user_face( pylark.UpdateACSUserFaceReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg def test_mock_raw_request_get_acs_user(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user( pylark.GetACSUserReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg def test_mock_raw_request_update_acs_user(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user( pylark.UpdateACSUserReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg def test_mock_raw_request_get_acs_user_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_list(pylark.GetACSUserListReq()) assert e.type is pylark.PyLarkError assert e.value.code > 0 assert "mock-raw-request-failed" in e.value.msg # real request class TestACSSampleRealRequestFailed(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestACSSampleRealRequestFailed, self).__init__(*args, **kwargs) self.cli = app_no_permission.ins() self.module_cli = self.cli.acs def test_real_request_get_acs_access_record_photo(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_photo( pylark.GetACSAccessRecordPhotoReq( access_record_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 def test_real_request_get_acs_access_record_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_access_record_list( pylark.GetACSAccessRecordListReq() ) assert e.type is pylark.PyLarkError assert e.value.code > 0 def test_real_request_get_acs_device_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_device_list(pylark.GetACSDeviceListReq()) assert e.type is pylark.PyLarkError assert e.value.code > 0 def test_real_request_get_acs_user_face(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_face( pylark.GetACSUserFaceReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 def test_real_request_update_acs_user_face(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user_face( pylark.UpdateACSUserFaceReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 def test_real_request_get_acs_user(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user( pylark.GetACSUserReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 def test_real_request_update_acs_user(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.update_acs_user( pylark.UpdateACSUserReq( user_id="x", ) ) assert e.type is pylark.PyLarkError assert e.value.code > 0 def test_real_request_get_acs_user_list(self): with pytest.raises(pylark.PyLarkError) as e: self.module_cli.get_acs_user_list(pylark.GetACSUserListReq()) assert e.type is pylark.PyLarkError assert e.value.code > 0
35.444759
83
0.664482
1,642
12,512
4.730816
0.050548
0.050978
0.100412
0.086509
0.92379
0.923018
0.912719
0.895597
0.862384
0.802137
0
0.001924
0.252158
12,512
352
84
35.545455
0.828257
0.008712
0
0.599237
1
0
0.039848
0.016698
0
0
0
0
0.21374
1
0.145038
false
0
0.019084
0
0.179389
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
77327623cd7c1249ab93e40f09815f977bd3018c
93
py
Python
demo/shock.py
phuselab/openFACS
b65da5ef3564af2bd390c36494b07b9c89a498bd
[ "MIT" ]
78
2019-07-02T14:29:12.000Z
2022-03-16T07:53:08.000Z
demo/shock.py
AvatarWorld/openFACS
29f34afb634f4db0118b93462e156103ceb732da
[ "MIT" ]
3
2019-09-11T16:00:40.000Z
2020-11-27T10:45:59.000Z
demo/shock.py
AvatarWorld/openFACS
29f34afb634f4db0118b93462e156103ceb732da
[ "MIT" ]
22
2019-08-05T17:03:09.000Z
2022-03-25T10:08:21.000Z
from openFACS import sendAUS AU = [3,3,2,4,0,2,0,0,0,0,0,0,2,0,0,2,0,0] sendAUS(AU,0.1)
18.6
43
0.602151
27
93
2.074074
0.37037
0.25
0.214286
0.214286
0.214286
0
0
0
0
0
0
0.25
0.139785
93
4
44
23.25
0.45
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
8
773380bc863ca2f1326de652587321c8c12e8f24
98
py
Python
py_pdf_term/candidates/augmenters.py
kumachan-mis/pdf-slides-term
cf3319e4de723bd9424d23141803342d3c649103
[ "MIT" ]
1
2021-01-08T16:05:30.000Z
2021-01-08T16:05:30.000Z
py_pdf_term/candidates/augmenters.py
kumachan-mis/py-slides-term
1e9337b97ae8968950489e728fc7aeeeb7eb1f4b
[ "MIT" ]
21
2021-01-03T13:50:59.000Z
2021-06-17T00:27:49.000Z
py_pdf_term/candidates/augmenters.py
kumachan-mis/pdf-slides-term
cf3319e4de723bd9424d23141803342d3c649103
[ "MIT" ]
null
null
null
from ._candidates.augmenters import * # NoQA from ._candidates.augmenters import __all__ # NoQA
32.666667
51
0.785714
11
98
6.454545
0.545455
0.394366
0.676056
0.84507
0
0
0
0
0
0
0
0
0.142857
98
2
52
49
0.845238
0.091837
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
6236bd720d93ab95e84f75161ba448ede6f5b5eb
110,022
py
Python
tb_rest_client/api/api_pe/device_controller_api.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
30
2020-06-19T06:42:50.000Z
2021-08-23T21:16:36.000Z
tb_rest_client/api/api_pe/device_controller_api.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
25
2021-08-30T01:17:27.000Z
2022-03-16T14:10:14.000Z
tb_rest_client/api/api_pe/device_controller_api.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
23
2020-07-06T13:41:54.000Z
2021-08-23T21:04:50.000Z
# coding: utf-8 """ ThingsBoard REST API ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 OpenAPI spec version: 3.3.3PAAS-RC1 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from tb_rest_client.api_client import ApiClient class DeviceControllerApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def assign_device_to_tenant_using_post(self, tenant_id, device_id, **kwargs): # noqa: E501 """Assign device to tenant (assignDeviceToTenant) # noqa: E501 Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.assign_device_to_tenant_using_post(tenant_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Device If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, **kwargs) # noqa: E501 else: (data) = self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, **kwargs) # noqa: E501 return data def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id, **kwargs): # noqa: E501 """Assign device to tenant (assignDeviceToTenant) # noqa: E501 Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Device If the method is called asynchronously, returns the request thread. """ all_params = ['tenant_id', 'device_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method assign_device_to_tenant_using_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'tenant_id' is set if ('tenant_id' not in params or params['tenant_id'] is None): raise ValueError("Missing the required parameter `tenant_id` when calling `assign_device_to_tenant_using_post`") # noqa: E501 # verify the required parameter 'device_id' is set if ('device_id' not in params or params['device_id'] is None): raise ValueError("Missing the required parameter `device_id` when calling `assign_device_to_tenant_using_post`") # noqa: E501 collection_formats = {} path_params = {} if 'tenant_id' in params: path_params['tenantId'] = params['tenant_id'] # noqa: E501 if 'device_id' in params: path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/tenant/{tenantId}/device/{deviceId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def claim_device_using_post(self, device_name, **kwargs): # noqa: E501 """Claim device (claimDevice) # noqa: E501 Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.claim_device_using_post(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: Unique name of the device which is going to be claimed (required) :param ClaimRequest body: :param str sub_customer_id: subCustomerId :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 else: (data) = self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 return data def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa: E501 """Claim device (claimDevice) # noqa: E501 Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.claim_device_using_post_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: Unique name of the device which is going to be claimed (required) :param ClaimRequest body: :param str sub_customer_id: subCustomerId :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ all_params = ['device_name', 'body', 'sub_customer_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method claim_device_using_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_name' is set if ('device_name' not in params or params['device_name'] is None): raise ValueError("Missing the required parameter `device_name` when calling `claim_device_using_post`") # noqa: E501 collection_formats = {} path_params = {} if 'device_name' in params: path_params['deviceName'] = params['device_name'] # noqa: E501 query_params = [] if 'sub_customer_id' in params: query_params.append(('subCustomerId', params['sub_customer_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/customer/device/{deviceName}/claim{?subCustomerId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeferredResultResponseEntity', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def count_by_device_group_and_empty_ota_package_using_get(self, ota_package_type, ota_package_id, entity_group_id, **kwargs): # noqa: E501 """Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) # noqa: E501 The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_by_device_group_and_empty_ota_package_using_get(ota_package_type, ota_package_id, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool :param str ota_package_type: OTA package type (required) :param str ota_package_id: otaPackageId (required) :param str entity_group_id: entityGroupId (required) :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_by_device_group_and_empty_ota_package_using_get_with_http_info(ota_package_type, ota_package_id, entity_group_id, **kwargs) # noqa: E501 else: (data) = self.count_by_device_group_and_empty_ota_package_using_get_with_http_info(ota_package_type, ota_package_id, entity_group_id, **kwargs) # noqa: E501 return data def count_by_device_group_and_empty_ota_package_using_get_with_http_info(self, ota_package_type, ota_package_id, entity_group_id, **kwargs): # noqa: E501 """Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) # noqa: E501 The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_by_device_group_and_empty_ota_package_using_get_with_http_info(ota_package_type, ota_package_id, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool :param str ota_package_type: OTA package type (required) :param str ota_package_id: otaPackageId (required) :param str entity_group_id: entityGroupId (required) :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['ota_package_type', 'ota_package_id', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method count_by_device_group_and_empty_ota_package_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ota_package_type' is set if ('ota_package_type' not in params or params['ota_package_type'] is None): raise ValueError("Missing the required parameter `ota_package_type` when calling `count_by_device_group_and_empty_ota_package_using_get`") # noqa: E501 # verify the required parameter 'ota_package_id' is set if ('ota_package_id' not in params or params['ota_package_id'] is None): raise ValueError("Missing the required parameter `ota_package_id` when calling `count_by_device_group_and_empty_ota_package_using_get`") # noqa: E501 # verify the required parameter 'entity_group_id' is set if ('entity_group_id' not in params or params['entity_group_id'] is None): raise ValueError("Missing the required parameter `entity_group_id` when calling `count_by_device_group_and_empty_ota_package_using_get`") # noqa: E501 collection_formats = {} path_params = {} if 'ota_package_type' in params: path_params['otaPackageType'] = params['ota_package_type'] # noqa: E501 if 'ota_package_id' in params: path_params['otaPackageId'] = params['ota_package_id'] # noqa: E501 if 'entity_group_id' in params: path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def count_by_device_profile_and_empty_ota_package_using_get(self, ota_package_type, device_profile_id, **kwargs): # noqa: E501 """Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) # noqa: E501 The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_by_device_profile_and_empty_ota_package_using_get(ota_package_type, device_profile_id, async_req=True) >>> result = thread.get() :param async_req bool :param str ota_package_type: OTA package type (required) :param str device_profile_id: Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: int If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, **kwargs) # noqa: E501 else: (data) = self.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, **kwargs) # noqa: E501 return data def count_by_device_profile_and_empty_ota_package_using_get_with_http_info(self, ota_package_type, device_profile_id, **kwargs): # noqa: E501 """Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) # noqa: E501 The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, async_req=True) >>> result = thread.get() :param async_req bool :param str ota_package_type: OTA package type (required) :param str device_profile_id: Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: int If the method is called asynchronously, returns the request thread. """ all_params = ['ota_package_type', 'device_profile_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method count_by_device_profile_and_empty_ota_package_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ota_package_type' is set if ('ota_package_type' not in params or params['ota_package_type'] is None): raise ValueError("Missing the required parameter `ota_package_type` when calling `count_by_device_profile_and_empty_ota_package_using_get`") # noqa: E501 # verify the required parameter 'device_profile_id' is set if ('device_profile_id' not in params or params['device_profile_id'] is None): raise ValueError("Missing the required parameter `device_profile_id` when calling `count_by_device_profile_and_empty_ota_package_using_get`") # noqa: E501 collection_formats = {} path_params = {} if 'ota_package_type' in params: path_params['otaPackageType'] = params['ota_package_type'] # noqa: E501 if 'device_profile_id' in params: path_params['deviceProfileId'] = params['device_profile_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/devices/count/{otaPackageType}/{deviceProfileId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='int', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_device_using_delete(self, device_id, **kwargs): # noqa: E501 """Delete device (deleteDevice) # noqa: E501 Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_device_using_delete(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 else: (data) = self.delete_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 return data def delete_device_using_delete_with_http_info(self, device_id, **kwargs): # noqa: E501 """Delete device (deleteDevice) # noqa: E501 Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_device_using_delete_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['device_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_device_using_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_id' is set if ('device_id' not in params or params['device_id'] is None): raise ValueError("Missing the required parameter `device_id` when calling `delete_device_using_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'device_id' in params: path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device/{deviceId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def find_by_query_using_post1(self, **kwargs): # noqa: E501 """Find related devices (findByQuery) # noqa: E501 Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_by_query_using_post1(async_req=True) >>> result = thread.get() :param async_req bool :param DeviceSearchQuery body: :return: list[Device] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.find_by_query_using_post1_with_http_info(**kwargs) # noqa: E501 else: (data) = self.find_by_query_using_post1_with_http_info(**kwargs) # noqa: E501 return data def find_by_query_using_post1_with_http_info(self, **kwargs): # noqa: E501 """Find related devices (findByQuery) # noqa: E501 Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_by_query_using_post1_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param DeviceSearchQuery body: :return: list[Device] If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_by_query_using_post1" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/devices', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Device]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_customer_devices_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 """Get Customer Devices (getCustomerDevices) # noqa: E501 Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_customer_devices_using_get(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 else: (data) = self.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 return data def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 """Get Customer Devices (getCustomerDevices) # noqa: E501 Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ all_params = ['customer_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_customer_devices_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set if ('customer_id' not in params or params['customer_id'] is None): raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_devices_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_customer_devices_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_customer_devices_using_get`") # noqa: E501 collection_formats = {} path_params = {} if 'customer_id' in params: path_params['customerId'] = params['customer_id'] # noqa: E501 query_params = [] if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/customer/{customerId}/devices{?page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageDataDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_device_by_id_using_get(self, device_id, **kwargs): # noqa: E501 """Get Device (getDeviceById) # noqa: E501 Fetch the Device object based on the provided Device Id. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_device_by_id_using_get(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Device If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_device_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 else: (data) = self.get_device_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 return data def get_device_by_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 """Get Device (getDeviceById) # noqa: E501 Fetch the Device object based on the provided Device Id. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_device_by_id_using_get_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Device If the method is called asynchronously, returns the request thread. """ all_params = ['device_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_device_by_id_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_id' is set if ('device_id' not in params or params['device_id'] is None): raise ValueError("Missing the required parameter `device_id` when calling `get_device_by_id_using_get`") # noqa: E501 collection_formats = {} path_params = {} if 'device_id' in params: path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device/{deviceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_device_credentials_by_device_id_using_get(self, device_id, **kwargs): # noqa: E501 """Get Device Credentials (getDeviceCredentialsByDeviceId) # noqa: E501 If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_device_credentials_by_device_id_using_get(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_device_credentials_by_device_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 else: (data) = self.get_device_credentials_by_device_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 return data def get_device_credentials_by_device_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 """Get Device Credentials (getDeviceCredentialsByDeviceId) # noqa: E501 If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_device_credentials_by_device_id_using_get_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ all_params = ['device_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_device_credentials_by_device_id_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_id' is set if ('device_id' not in params or params['device_id'] is None): raise ValueError("Missing the required parameter `device_id` when calling `get_device_credentials_by_device_id_using_get`") # noqa: E501 collection_formats = {} path_params = {} if 'device_id' in params: path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device/{deviceId}/credentials', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceCredentials', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_device_types_using_get(self, **kwargs): # noqa: E501 """Get Device Types (getDeviceTypes) # noqa: E501 Returns a set of unique device profile names based on devices that are either owned by the tenant or assigned to the customer which user is performing the request. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_device_types_using_get(async_req=True) >>> result = thread.get() :param async_req bool :return: list[EntitySubtype] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_device_types_using_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_device_types_using_get_with_http_info(**kwargs) # noqa: E501 return data def get_device_types_using_get_with_http_info(self, **kwargs): # noqa: E501 """Get Device Types (getDeviceTypes) # noqa: E501 Returns a set of unique device profile names based on devices that are either owned by the tenant or assigned to the customer which user is performing the request. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_device_types_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[EntitySubtype] If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_device_types_using_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device/types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[EntitySubtype]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_devices_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 """Get devices by Entity Group Id (getDevicesByEntityGroupId) # noqa: E501 Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_devices_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 else: (data) = self.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 return data def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 """Get devices by Entity Group Id (getDevicesByEntityGroupId) # noqa: E501 Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ all_params = ['entity_group_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_devices_by_entity_group_id_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_group_id' is set if ('entity_group_id' not in params or params['entity_group_id'] is None): raise ValueError("Missing the required parameter `entity_group_id` when calling `get_devices_by_entity_group_id_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_devices_by_entity_group_id_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_devices_by_entity_group_id_using_get`") # noqa: E501 collection_formats = {} path_params = {} if 'entity_group_id' in params: path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 query_params = [] if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/entityGroup/{entityGroupId}/devices{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageDataDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_devices_by_ids_using_get(self, device_ids, **kwargs): # noqa: E501 """Get Devices By Ids (getDevicesByIds) # noqa: E501 Requested devices must be owned by tenant or assigned to customer which user is performing the request. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_devices_by_ids_using_get(device_ids, async_req=True) >>> result = thread.get() :param async_req bool :param str device_ids: A list of devices ids, separated by comma ',' (required) :return: list[Device] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_devices_by_ids_using_get_with_http_info(device_ids, **kwargs) # noqa: E501 else: (data) = self.get_devices_by_ids_using_get_with_http_info(device_ids, **kwargs) # noqa: E501 return data def get_devices_by_ids_using_get_with_http_info(self, device_ids, **kwargs): # noqa: E501 """Get Devices By Ids (getDevicesByIds) # noqa: E501 Requested devices must be owned by tenant or assigned to customer which user is performing the request. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_devices_by_ids_using_get_with_http_info(device_ids, async_req=True) >>> result = thread.get() :param async_req bool :param str device_ids: A list of devices ids, separated by comma ',' (required) :return: list[Device] If the method is called asynchronously, returns the request thread. """ all_params = ['device_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_devices_by_ids_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_ids' is set if ('device_ids' not in params or params['device_ids'] is None): raise ValueError("Missing the required parameter `device_ids` when calling `get_devices_by_ids_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'device_ids' in params: query_params.append(('deviceIds', params['device_ids'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/devices{?deviceIds}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Device]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_tenant_device_using_get(self, device_name, **kwargs): # noqa: E501 """Get Tenant Device (getTenantDevice) # noqa: E501 Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tenant_device_using_get(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: A string value representing the Device name. (required) :return: Device If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_tenant_device_using_get_with_http_info(device_name, **kwargs) # noqa: E501 else: (data) = self.get_tenant_device_using_get_with_http_info(device_name, **kwargs) # noqa: E501 return data def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): # noqa: E501 """Get Tenant Device (getTenantDevice) # noqa: E501 Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tenant_device_using_get_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: A string value representing the Device name. (required) :return: Device If the method is called asynchronously, returns the request thread. """ all_params = ['device_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_tenant_device_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_name' is set if ('device_name' not in params or params['device_name'] is None): raise ValueError("Missing the required parameter `device_name` when calling `get_tenant_device_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'device_name' in params: query_params.append(('deviceName', params['device_name'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/tenant/devices{?deviceName}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_tenant_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 """Get Tenant Devices (getTenantDevices) # noqa: E501 Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tenant_devices_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_tenant_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: (data) = self.get_tenant_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 """Get Tenant Devices (getTenantDevices) # noqa: E501 Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tenant_devices_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ all_params = ['page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_tenant_devices_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_devices_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_tenant_devices_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/tenant/devices{?page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageDataDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_user_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 """Get Devices (getUserDevices) # noqa: E501 Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_devices_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_user_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: (data) = self.get_user_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 """Get Devices (getUserDevices) # noqa: E501 Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_devices_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str text_search: The case insensitive 'startsWith' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ all_params = ['page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user_devices_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_user_devices_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_user_devices_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/user/devices{?page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageDataDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def process_devices_bulk_import_using_post(self, **kwargs): # noqa: E501 """Import the bulk of devices (processDevicesBulkImport) # noqa: E501 There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.process_devices_bulk_import_using_post(async_req=True) >>> result = thread.get() :param async_req bool :param BulkImportRequest body: :return: BulkImportResultDevice If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.process_devices_bulk_import_using_post_with_http_info(**kwargs) # noqa: E501 else: (data) = self.process_devices_bulk_import_using_post_with_http_info(**kwargs) # noqa: E501 return data def process_devices_bulk_import_using_post_with_http_info(self, **kwargs): # noqa: E501 """Import the bulk of devices (processDevicesBulkImport) # noqa: E501 There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.process_devices_bulk_import_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param BulkImportRequest body: :return: BulkImportResultDevice If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method process_devices_bulk_import_using_post" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device/bulk_import', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BulkImportResultDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def re_claim_device_using_delete(self, device_name, **kwargs): # noqa: E501 """Reclaim device (reClaimDevice) # noqa: E501 Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.re_claim_device_using_delete(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: Unique name of the device which is going to be reclaimed (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.re_claim_device_using_delete_with_http_info(device_name, **kwargs) # noqa: E501 else: (data) = self.re_claim_device_using_delete_with_http_info(device_name, **kwargs) # noqa: E501 return data def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # noqa: E501 """Reclaim device (reClaimDevice) # noqa: E501 Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.re_claim_device_using_delete_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: Unique name of the device which is going to be reclaimed (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ all_params = ['device_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method re_claim_device_using_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_name' is set if ('device_name' not in params or params['device_name'] is None): raise ValueError("Missing the required parameter `device_name` when calling `re_claim_device_using_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'device_name' in params: path_params['deviceName'] = params['device_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/customer/device/{deviceName}/claim', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeferredResultResponseEntity', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def save_device_using_post(self, **kwargs): # noqa: E501 """Create Or Update Device (saveDevice) # noqa: E501 Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_using_post(async_req=True) >>> result = thread.get() :param async_req bool :param Device body: :param str access_token: Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated. :param str entity_group_id: entityGroupId :return: Device If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.save_device_using_post_with_http_info(**kwargs) # noqa: E501 else: (data) = self.save_device_using_post_with_http_info(**kwargs) # noqa: E501 return data def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Device (saveDevice) # noqa: E501 Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param Device body: :param str access_token: Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated. :param str entity_group_id: entityGroupId :return: Device If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'access_token', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method save_device_using_post" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'access_token' in params: query_params.append(('accessToken', params['access_token'])) # noqa: E501 if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device{?accessToken,entityGroupId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def save_device_with_credentials_using_post(self, **kwargs): # noqa: E501 """Create Device (saveDevice) with credentials # noqa: E501 Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ``` Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_with_credentials_using_post(async_req=True) >>> result = thread.get() :param async_req bool :param SaveDeviceWithCredentialsRequest body: :param str entity_group_id: entityGroupId :return: Device If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.save_device_with_credentials_using_post_with_http_info(**kwargs) # noqa: E501 else: (data) = self.save_device_with_credentials_using_post_with_http_info(**kwargs) # noqa: E501 return data def save_device_with_credentials_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Device (saveDevice) with credentials # noqa: E501 Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ``` Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_with_credentials_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param SaveDeviceWithCredentialsRequest body: :param str entity_group_id: entityGroupId :return: Device If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method save_device_with_credentials_using_post" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device-with-credentials{?entityGroupId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_device_credentials_using_post(self, **kwargs): # noqa: E501 """Update device credentials (updateDeviceCredentials) # noqa: E501 During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE_CREDENTIALS' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_device_credentials_using_post(async_req=True) >>> result = thread.get() :param async_req bool :param DeviceCredentials body: :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_device_credentials_using_post_with_http_info(**kwargs) # noqa: E501 else: (data) = self.update_device_credentials_using_post_with_http_info(**kwargs) # noqa: E501 return data def update_device_credentials_using_post_with_http_info(self, **kwargs): # noqa: E501 """Update device credentials (updateDeviceCredentials) # noqa: E501 During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE_CREDENTIALS' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_device_credentials_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param DeviceCredentials body: :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_device_credentials_using_post" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/device/credentials', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeviceCredentials', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
52.642105
2,124
0.659486
13,457
110,022
5.153823
0.034109
0.036912
0.016149
0.020763
0.984471
0.978401
0.972158
0.967904
0.963954
0.955706
0
0.018938
0.258485
110,022
2,089
2,125
52.667305
0.831178
0.459899
0
0.813439
0
0.000884
0.214335
0.069483
0
0
0
0
0
1
0.036251
false
0
0.009726
0
0.099912
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
623fe6ffab346fa00c9b9ff21a11c6358b41a338
167
py
Python
tests/test_install_blast/test_install_blast.py
jvrana/pyblast
0f7ee7575e97470bfd05a2373d9c68247ec4ead0
[ "MIT" ]
1
2021-07-16T16:29:02.000Z
2021-07-16T16:29:02.000Z
tests/test_install_blast/test_install_blast.py
jvrana/pyblast
0f7ee7575e97470bfd05a2373d9c68247ec4ead0
[ "MIT" ]
8
2017-10-19T22:02:05.000Z
2020-04-09T20:45:23.000Z
tests/test_install_blast/test_install_blast.py
jvrana/pyblast2
573e3c52d8fff42c8a131b7d384e28065cd4e096
[ "MIT" ]
null
null
null
from pyblast.cli import is_installed from pyblast.cli import is_locally_installed def test_check_installation(): assert is_installed() or is_locally_installed()
23.857143
51
0.826347
24
167
5.416667
0.541667
0.169231
0.215385
0.307692
0.338462
0
0
0
0
0
0
0
0.11976
167
6
52
27.833333
0.884354
0
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
8
627dfc8a6f374d6d53826b4df58297f743024ec8
123
py
Python
saleor/search/backends/elasticsearch.py
tharindupr/saleor
9af03c4eba6f90cec3d3043cfc8e8e5dc05bc51b
[ "CC-BY-4.0" ]
2
2020-02-08T16:55:10.000Z
2021-09-27T15:07:53.000Z
saleor/search/backends/elasticsearch.py
tharindupr/saleor
9af03c4eba6f90cec3d3043cfc8e8e5dc05bc51b
[ "CC-BY-4.0" ]
51
2019-12-06T08:06:07.000Z
2021-05-06T02:10:50.000Z
saleor/search/backends/elasticsearch.py
jnbao2020/saleor
e1773b42a8ecd78114cf4485d553b09469b5f1f8
[ "CC-BY-4.0" ]
1
2020-02-08T17:02:42.000Z
2020-02-08T17:02:42.000Z
from . import elasticsearch_storefront def search_storefront(phrase): return elasticsearch_storefront.search(phrase)
20.5
50
0.829268
13
123
7.615385
0.615385
0.464646
0
0
0
0
0
0
0
0
0
0
0.113821
123
5
51
24.6
0.908257
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
7
6563e9e9c4d45cb2be413ae6205b501cb1aaae5c
8,309
py
Python
tests/integration/test_reading_comprehension.py
GMDennis/claf
d1e064e593127e5d654f000f5506c5ae1caab5ce
[ "MIT" ]
10
2019-06-11T00:59:51.000Z
2021-11-06T09:58:30.000Z
tests/integration/test_reading_comprehension.py
GMDennis/claf
d1e064e593127e5d654f000f5506c5ae1caab5ce
[ "MIT" ]
null
null
null
tests/integration/test_reading_comprehension.py
GMDennis/claf
d1e064e593127e5d654f000f5506c5ae1caab5ce
[ "MIT" ]
4
2019-08-16T20:44:31.000Z
2020-10-29T11:03:15.000Z
import json import os import pytest import shutil from claf.config.args import optimize_config, set_gpu_env from claf.config.namespace import NestedNamespace from claf.learn.experiment import Experiment from claf.learn.mode import Mode import utils SYNTHETIC_DATA_PATH = os.path.join("logs", "test", "squad_synthetic_data.json") DUMMY_EMBEDDING_300D_PATH = os.path.join("logs", "test", "dummy_300d.txt") @pytest.fixture def test_config(request): return load_and_setting(request.param) def load_and_setting(config_path): config = NestedNamespace() with open(config_path, "r") as f: defined_config = json.load(f) config.load_from_json(defined_config) config = optimize_config(config, is_test=True) set_gpu_env(config) config.data_reader.train_file_path = SYNTHETIC_DATA_PATH config.data_reader.valid_file_path = SYNTHETIC_DATA_PATH return config @pytest.mark.order1 def test_make_synthetic_data(): utils.make_squad_synthetic_data(SYNTHETIC_DATA_PATH) utils.write_embedding_txt(DUMMY_EMBEDDING_300D_PATH, 300) @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/bidaf.json"], indirect=True) def test_train_squad_bidaf_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/bidaf_no_answer.json"], indirect=True) def test_train_squad_bidaf_no_answer_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() # need glove.840B.300d.txt (5.65 GB) # @pytest.mark.order2 # @pytest.mark.parametrize("test_config", ["./base_config/test/bidaf+cove.json"], indirect=True) # def test_train_squad_bidaf_cove_model(test_config): # experiment = Experiment(Mode.TRAIN, test_config) # experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/bidaf+elmo.json"], indirect=True) def test_train_squad_bidaf_elmo_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/drqa.json"], indirect=True) def test_train_squad_drqa_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/drqa_sparse_to_embedding.json"], indirect=True) def test_train_squad_drqa_model_with_sparse_to_embedding(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/docqa.json"], indirect=True) def test_train_squad_docqa_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/docqa_no_answer.json"], indirect=True) def test_train_squad_docqa_no_answer_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/qanet.json"], indirect=True) def test_train_squad_qanet_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() @pytest.mark.order2 @pytest.mark.parametrize("test_config", ["./base_config/test/bert_for_qa.json"], indirect=True) def test_train_squad_bert_model(test_config): experiment = Experiment(Mode.TRAIN, test_config) experiment() # TODO: subword ---> word # @pytest.mark.order2 # @pytest.mark.parametrize("test_config", ["./base_config/test/bidaf+bert.json"], indirect=True) # def test_train_squad_bidaf_model_with_bert(test_config): # experiment = Experiment(Mode.TRAIN, test_config) # experiment() @pytest.mark.order2 def test_eval_squad_bidaf(): config = NestedNamespace() config.data_file_path = SYNTHETIC_DATA_PATH config.checkpoint_path = "./logs/test/bidaf/checkpoint/model_1.pkl" config.cude_devices = None set_gpu_env(config) experiment = Experiment(Mode.EVAL, config) experiment() @pytest.mark.order3 def test_eval_infer_squad_bidaf(): config = NestedNamespace() config.data_file_path = SYNTHETIC_DATA_PATH config.checkpoint_path = "./logs/test/bidaf/checkpoint/model_1.pkl" config.cude_devices = None config.inference_latency = 1000 set_gpu_env(config) experiment = Experiment(Mode.INFER_EVAL, config) experiment() @pytest.mark.order3 def test_qa_predict_squad_bidaf_1_example(): config = NestedNamespace() config.checkpoint_path = "./logs/test/bidaf/checkpoint/model_1.pkl" config.cude_devices = None config.interactive = False set_gpu_env(config) config.context = "Westwood One will carry the game throughout North America, with Kevin Harlan as play-by-play announcer, Boomer Esiason and Dan Fouts as color analysts, and James Lofton and Mark Malone as sideline reporters. Jim Gray will anchor the pre-game and halftime coverage." config.question = "What radio network carried the Super Bowl?" experiment = Experiment(Mode.PREDICT, config) experiment() @pytest.mark.order3 def test_qa_predict_squad_bert_short_1_example(): config = NestedNamespace() config.checkpoint_path = "./logs/test/bert_for_qa/checkpoint/model_1.pkl" config.cude_devices = None config.interactive = False set_gpu_env(config) config.context = "Westwood One will carry the game throughout North America, with Kevin Harlan as play-by-play announcer, Boomer Esiason and Dan Fouts as color analysts, and James Lofton and Mark Malone as sideline reporters. Jim Gray will anchor the pre-game and halftime coverage." config.question = "What radio network carried the Super Bowl?" experiment = Experiment(Mode.PREDICT, config) experiment() @pytest.mark.order3 def test_qa_predict_squad_bert_long_1_example(): config = NestedNamespace() config.checkpoint_path = "./logs/test/bert_for_qa/checkpoint/model_1.pkl" config.cude_devices = None config.interactive = False set_gpu_env(config) config.context = "hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ANSWER ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho" config.question = "good hi ho hi ho hi good hi ho hi ho hi good hi ho hi ho hi good hi ho hi ho hi good hi ho hi ho hi" experiment = Experiment(Mode.PREDICT, config) experiment() @pytest.mark.order4 def test_remove_tested_directory(): test_path = "logs/test" shutil.rmtree(test_path)
42.392857
1,877
0.740282
1,524
8,309
3.885827
0.111549
0.160081
0.176292
0.178318
0.839581
0.831814
0.819149
0.794833
0.756332
0.710571
0
0.031428
0.176676
8,309
195
1,878
42.610256
0.834235
0.062703
0
0.550388
0
0.031008
0.418189
0.070363
0
0
0
0.005128
0
1
0.139535
false
0
0.069767
0.007752
0.224806
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
65cff50b58ff2f42d41bcfbf2431390663759f5d
104
py
Python
test/test_flag.py
HuangChiEn/easy_config
70b6e3830037f4874239dca2794e1b08bd8223ca
[ "MIT" ]
null
null
null
test/test_flag.py
HuangChiEn/easy_config
70b6e3830037f4874239dca2794e1b08bd8223ca
[ "MIT" ]
null
null
null
test/test_flag.py
HuangChiEn/easy_config
70b6e3830037f4874239dca2794e1b08bd8223ca
[ "MIT" ]
null
null
null
from easy_config.Configer import Configer def get_flag_from_ext(): return Configer().get_cfg_flag()
26
41
0.798077
16
104
4.8125
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.115385
104
4
42
26
0.836957
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
7
65e9238cb2b5cd822cf8d3172924219075226a42
20,775
py
Python
Proyectos/Bracket/Admin_Bracket_Ganador.py
TEC-2014092195/IC1802-introduccion-a-la-programacion
20391cc2e301993cacb27178f2deab403016ed84
[ "MIT" ]
null
null
null
Proyectos/Bracket/Admin_Bracket_Ganador.py
TEC-2014092195/IC1802-introduccion-a-la-programacion
20391cc2e301993cacb27178f2deab403016ed84
[ "MIT" ]
null
null
null
Proyectos/Bracket/Admin_Bracket_Ganador.py
TEC-2014092195/IC1802-introduccion-a-la-programacion
20391cc2e301993cacb27178f2deab403016ed84
[ "MIT" ]
null
null
null
from tkinter import * from tkinter import messagebox import Clase_Bracket_Ganador class ClaseAdminBracketGanador(): def VentanaAdminGanador(c_grupos,v_main): v_ganador=Toplevel() v_ganador.wm_state('zoomed') v_ganador.resizable(0,0) v_ganador.title("Bracket de Torneos") v_ganador.configure(bg="#4faa2b") v_ganador.title("Bracket Mundial") frm=Frame(v_ganador) frm.grid() frm.configure(bg="#4faa2b") frm.place(relx=.5,rely=.5,anchor="c") btn={} btn2={} btn3={} btn4={} btn5={} btn6={} g=('GrupoA','GrupoB','GrupoC','GrupoD','GrupoE','GrupoF', 'GrupoG','GrupoH','GrupoI','GrupoJ','GrupoK','GrupoL','GrupoM','GrupoN') can_grupos=c_grupos #Cantidad de equipos heredado columnas=can_grupos+3 if can_grupos == 4 or can_grupos == 2: columnas=can_grupos+4 c=0 f=0 fb=0 f2=0 for i in range(can_grupos): if i < can_grupos/2: lbl=Label( frm,text=(g[i]) ) lbl.configure(fg="white",bg="#4faa2b") lbl.grid(pady=10) f+=1 for j in range(4): btn[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn[ "btn"+str(fb) ].configure(bg="#0b2532",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn[ "btn"+str(fb) ].grid(row=f,column=0,pady=1,padx=1) f+=1 fb+=1 else: lbl=Label( frm,text=(g[i]) ) lbl.configure(fg="white",bg="#4faa2b") lbl.grid(row=f2,column=columnas,pady=10) f2+=1 for j in range(4): btn[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn[ "btn"+str(fb) ].configure(bg="#0b2532",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1) f2+=1 fb+=1 ####################################### def Fase_1(): can=can_grupos//2 c=0 f=0 fb=0 f2=0 for i in range(can): if i < can//2: f+=1 for j in range(4): if j==0: f+=1 if j==0 and i==1: f+=1 if j < 2: btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f,column=1,pady=1,padx=1) f+=1 fb+=1 elif j==2: f+=3 btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f,column=1,pady=1,padx=1) f+=1 fb+=1 else: btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f,column=1,pady=1,padx=1) f+=1 fb+=1 else: f2+=1 for j in range(4): if j==0: f2+=1 if j==0 and i==3: f2+=1 if j < 2: btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f2,column=columnas-1,pady=1,padx=1) f2+=1 fb+=1 elif j==2: f2+=3 btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f2,column=columnas-1,pady=1,padx=1) f2+=1 fb+=1 else: btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f2,column=columnas-1,pady=1,padx=1) f2+=1 fb+=1 def Fase_2(): can=can_grupos//2 can=can//2 columnas=can_grupos+3 columnas=columnas-2 c=2 f=0 fb=0 f2=0 for i in range(can): if i < can//2: f+=1 for j in range(4): if j < 2: f+=1 btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1,rowspan=2) f+=4 fb+=1 elif j==2: f+=1 btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1,rowspan=2) f+=5 fb+=1 else: btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1,rowspan=2) f+=1 fb+=1 else: f2+=1 for j in range(4): if j < 2: f2+=1 btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1,rowspan=2) f2+=4 fb+=1 elif j==2: f2+=1 btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1,rowspan=2) f2+=5 fb+=1 else: btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1,rowspan=2) f2+=1 fb+=1 def Fase_3(): can=can_grupos//2 can=can//2 can=can//2 columnas=can_grupos+3 columnas=columnas-3 c=3 f=0 fb=0 f2=0 for i in range(can): f+=5 for j in range(4): if j < 2: btn4[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn4[ "btn"+str(fb) ].configure(bg="#0a4c2c",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn4[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1) f+=10 fb+=1 elif j==2: f2+=5 btn4[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn4[ "btn"+str(fb) ].configure(bg="#0a4c2c",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn4[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1) f2+=10 fb+=1 else: btn4[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn4[ "btn"+str(fb) ].configure(bg="#0a4c2c",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn4[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1) fb+=1 def Fase_4(): can=can_grupos//2 can=can//2 can=can//2 columnas=can_grupos+3 #NO Cambiar columnas=columnas-4 c=4 f=0 fb=0 f2=0 for i in range(can): f+=10 for j in range(4): if j < 2: btn5[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn5[ "btn"+str(fb) ].configure(bg="#da3800",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn5[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1) c=columnas fb+=1 def Fase_5(): can=can_grupos//2 can=can//2 can=can//2 columnas=can_grupos+3 #NO Cambiar columnas=columnas-4 c=5 f=0 fb=0 f2=0 for i in range(can): f+=10 for j in range(4): if j < 1: btn6[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn6[ "btn"+str(fb) ].configure(bg="white",bd=0,relief=FLAT,fg="#121f0a",font=("Calibri",11),width=13) btn6[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1) fb+=1 ############################################################################ def Fase_2_4(): can=can_grupos//2 can=can//2 columnas=can_grupos+4 columnas=columnas-2 c=2 f=0 fb=0 f2=0 for i in range(can): f+=1 f2+=1 for j in range(4): if j < 2: f+=1 btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1,rowspan=2) f+=4 fb+=1 elif j==2: f2+=1 btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1,rowspan=2) f2+=5 fb+=1 else: btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f2,column=columnas,pady=1,padx=1,rowspan=2) f2+=1 fb+=1 def Fase_3_4(): can=can_grupos//2 can=can//2 columnas=can_grupos+4 columnas=columnas-3 c=3 f=0 fb=0 f2=0 for i in range(can): f+=5 for j in range(4): if j < 2: print(c) btn4[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn4[ "btn"+str(fb) ].configure(bg="#0a4c2c",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn4[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1) c=columnas fb+=1 def Fase_4_4(): can=can_grupos//2 can=can//2 columnas=can_grupos+4 c=4 f=0 fb=0 for i in range(can): f+=5 for j in range(4): if j < 1: btn5[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn5[ "btn"+str(fb) ].configure(bg="white",bd=0,relief=FLAT,fg="#121f0a",font=("Calibri",11),width=13) btn5[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1) ######################################################################################## def Fase_1_2(): can=can_grupos//2 c=1 f=0 fb=0 f2=0 for i in range(can): f+=2 f2+=2 for j in range(4): if j < 2: btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f,column=c,pady=1,padx=1) f+=1 fb+=1 elif j==2: btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f2,column=columnas-1,pady=1,padx=1) f2+=1 fb+=1 else: btn2[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn2[ "btn"+str(fb) ].configure(bg="#f8b101",bd=0,relief=FLAT,fg="#592d12",font=("Calibri",11),width=13) btn2[ "btn"+str(fb) ].grid(row=f2,column=columnas-1,pady=1,padx=1) f2+=1 fb+=1 def Fase_2_2(): can=can_grupos//2 columnas=can_grupos+4 columnas=columnas-2 c=2 f=0 fb=0 f2=0 for i in range(can): f2+=2 for j in range(4): if j < 2: btn3[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn3[ "btn"+str(fb) ].configure(bg="#692a37",bd=0,relief=FLAT,fg="white",font=("Calibri",11),width=13) btn3[ "btn"+str(fb) ].grid(row=f2,column=c,pady=1,padx=1,rowspan=2) c=columnas fb+=1 def Fase_3_2(): can=can_grupos//2 columnas=can_grupos+4 columnas=columnas-3 c=3 f=0 fb=0 f2=0 for i in range(can): f2+=2 for j in range(4): if j < 1: btn4[ "btn"+str(fb) ] = Button(frm,text="btn"+str(fb)) btn4[ "btn"+str(fb) ].configure(bg="white",bd=0,relief=FLAT,fg="#121f0a",font=("Calibri",11),width=13) btn4[ "btn"+str(fb) ].grid(row=f2,column=c,pady=1,padx=1,rowspan=2) ###################################################### ###################################################### ###################################################### Clase_Bracket_Ganador.Grupos.LlenarGrupos(btn) if can_grupos == 8: Fase_1() Fase_2() Fase_3() Fase_4() Fase_5() Clase_Bracket_Ganador.Grupos.AccionF1(btn,btn2) Clase_Bracket_Ganador.Grupos.AccionF2(btn2,btn3) Clase_Bracket_Ganador.Grupos.AccionF3(btn3,btn4) Clase_Bracket_Ganador.Grupos.AccionF4(btn4,btn5) Clase_Bracket_Ganador.Grupos.AccionF5(btn5,btn6) Clase_Bracket_Ganador.Grupos.AccionFGanador8(btn,btn2,btn3,btn4,btn5,btn6,v_ganador,v_main) elif can_grupos== 4: Fase_1() Fase_2_4() Fase_3_4() Fase_4_4() Clase_Bracket_Ganador.Grupos.AccionF1(btn,btn2) Clase_Bracket_Ganador.Grupos.AccionF2(btn2,btn3) Clase_Bracket_Ganador.Grupos.AccionF3(btn3,btn4) Clase_Bracket_Ganador.Grupos.AccionF5(btn4,btn5) Clase_Bracket_Ganador.Grupos.AccionFGanador4(btn,btn2,btn3,btn4,btn5,v_ganador,v_main) elif can_grupos == 2: Fase_1_2() Fase_2_2() Fase_3_2() Clase_Bracket_Ganador.Grupos.AccionF1(btn,btn2) Clase_Bracket_Ganador.Grupos.AccionF2(btn2,btn3) Clase_Bracket_Ganador.Grupos.AccionF5(btn3,btn4) Clase_Bracket_Ganador.Grupos.AccionFGanador2(btn,btn2,btn3,btn4,v_ganador,v_main) def cerrar_con_equis(): messagebox.showinfo("BM","Debe de guardar su bracket primero") v_ganador.protocol('WM_DELETE_WINDOW', cerrar_con_equis) v_ganador.mainloop()
42.22561
133
0.363032
2,236
20,775
3.317531
0.059928
0.093826
0.125101
0.048531
0.876651
0.863305
0.832839
0.819763
0.816393
0.809652
0
0.079576
0.48645
20,775
491
134
42.311609
0.615709
0.00231
0
0.78392
0
0
0.056926
0
0
0
0
0
0
1
0.032663
false
0
0.007538
0
0.042714
0.002513
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
029579a53e72c6761ea853d75b1f7cd327ec1982
2,550
py
Python
app/control/migrations/0002_auto_20210606_1100.py
adriancast/jerry
2406601e469f36f904bd9b54d7285449ca84d9b6
[ "MIT" ]
1
2021-05-20T17:36:18.000Z
2021-05-20T17:36:18.000Z
app/control/migrations/0002_auto_20210606_1100.py
adriancast/jerry
2406601e469f36f904bd9b54d7285449ca84d9b6
[ "MIT" ]
10
2021-05-25T17:37:33.000Z
2021-06-09T20:50:57.000Z
app/control/migrations/0002_auto_20210606_1100.py
adriancast/jerry
2406601e469f36f904bd9b54d7285449ca84d9b6
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-06-06 11:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('control', '0001_initial'), ] operations = [ migrations.AlterField( model_name='projectwallet', name='not_assigned_dev_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='not_assigned_management_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='not_assigned_marketing_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='not_assigned_operative_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='not_assigned_sysops_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='not_assigned_total_costs', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='projects_dev_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='projects_management_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='projects_marketing_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='projects_operative_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='projects_sysops_resources_hours', field=models.PositiveIntegerField(default=0), ), migrations.AlterField( model_name='projectwallet', name='projects_total_estimated_costs', field=models.PositiveIntegerField(default=0), ), ]
34.459459
59
0.616078
211
2,550
7.189573
0.203791
0.158207
0.197759
0.2294
0.895188
0.895188
0.862887
0.862887
0.825313
0.825313
0
0.016556
0.289412
2,550
73
60
34.931507
0.82064
0.016863
0
0.716418
1
0
0.228743
0.158882
0
0
0
0
0
1
0
false
0
0.014925
0
0.059701
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
b83ef5d1e3040cfbf80eb201b1c24247bf195c49
4,356
py
Python
temp/timeprint.py
mjm2129/osscap2020
7edb83e09168bdbc80b863aecc65da5efbb966cd
[ "Apache-2.0" ]
null
null
null
temp/timeprint.py
mjm2129/osscap2020
7edb83e09168bdbc80b863aecc65da5efbb966cd
[ "Apache-2.0" ]
10
2020-10-11T09:51:43.000Z
2020-11-29T13:45:36.000Z
temp/timeprint.py
mjm2129/osscap2020
7edb83e09168bdbc80b863aecc65da5efbb966cd
[ "Apache-2.0" ]
null
null
null
itnum_1=[[0,1,0,0], [1,1,0,0], [0,1,0,0], [0,1,0,0], [1,1,1,0], [0,0,0,0]] num_2=[[0,1,0,0], [1,0,1,0], [0,0,1,0], [0,1,0,0], [1,1,1,0], [0,0,0,0]] num_3=[[1,1,1,0], [0,0,1,0], [0,1,0,0], [0,0,1,0], [1,1,0,0], [0,0,0,0]] num_4=[[1,0,1,0], [1,0,1,0], [1,1,1,0], [0,0,1,0], [0,0,1,0], [0,0,0,0]] num_5=[[1,1,1,0], [1,0,0,0], [1,1,0,0], [0,0,1,0], [1,1,0,0], [0,0,0,0]] num_6=[[0,1,1,0], [1,0,0,0], [1,1,0,0], [1,0,1,0], [0,1,0,0], [0,0,0,0]] num_7=[[1,1,1,0], [0,0,1,0], [0,1,0,0], [1,0,0,0], [1,0,0,0], [0,0,0,0]] num_8=[[0,1,1,0], [1,0,1,0], [0,1,0,0], [1,0,1,0], [1,1,0,0], [0,0,0,0]] num_9=[[0,1,0,0], [1,0,1,0], [0,1,1,0], [0,0,1,0], [1,1,0,0], [0,0,0,0]] num_0=[[0,1,0,0], [1,0,1,0], [1,1,1,0], [1,0,1,0], [0,1,0,0], [0,0,0,0]] list=[[[0,1,0,0], [1,1,0,0], [0,1,0,0], [0,1,0,0], [1,1,1,0], [0,0,0,0]], [[0,1,0,0], [1,0,1,0], [0,0,1,0], [0,1,0,0], [1,1,1,0], [0,0,0,0]], [[1,1,1,0], [0,0,1,0], [0,1,0,0], [0,0,1,0], [1,1,0,0], [0,0,0,0]], [[1,0,1,0], [1,0,1,0], [1,1,1,0], [0,0,1,0], [0,0,1,0], [0,0,0,0]], [[1,1,1,0], [1,0,0,0], [1,1,0,0], [0,0,1,0], [1,1,0,0], [0,0,0,0]], [[0,1,1,0], [1,0,0,0], [1,1,0,0], [1,0,1,0], [0,1,0,0], [0,0,0,0]], [[1,1,1,0], [0,0,1,0], [0,1,0,0], [1,0,0,0], [1,0,0,0], [0,0,0,0]], [[0,1,1,0], [1,0,1,0], [0,1,0,0], [1,0,1,0], [1,1,0,0], [0,0,0,0]], [[0,1,0,0], [1,0,1,0], [0,1,1,0], [0,0,1,0], [1,1,0,0], [0,0,0,0]], [[0,1,0,0], [1,0,1,0], [1,1,1,0], [1,0,1,0], [0,1,0,0], [0,0,0,0]]] aaa=[] ''' def printtime(a): aaa=[] a=str(a) for j in range(5): for i in ['1','2','3','4','5','6','7','8','9','0']: if i==a[j]: if a[j]=='1': aaa.append(num_1) if a[j]=='2': aaa.append(num_2) if a[j]=='3': aaa.append(num_3) if a[j]=='4': aaa.append(num_4) if a[j]=='5': aaa.append(num_5) if a[j]=='6': aaa.append(num_6) if a[j]=='7': aaa.append(num_7) if a[j]=='8': aaa.append(num_8) if a[j]=='9': aaa.append(num_9) if a[j]=='0': aaa.append(num_0) print(aaa[0]) print(aaa[1])''' def printgoodgameset(a,p_time): for i in range(16): for j in range(32): LED.screen[i][j]=0 aaa=[] #p_time=str(p_time) print(str(p_time)) for j in range(5): for i,p in zip(['1','2','3','4','5','6','7','8','9','0'],[num_1,num_2,num_3,num_4,num_5,num_6,num_7,num_8,num_9,num_0]): if i==p_time[j]: aaa.append(p) print(aaa) write1([SP,P,a,SP,W,I,N,ex],5) write2(aaa,5) time.sleep(2) for i in range(16): for j in range(32): LED.screen[i][j]=0 for i in [num_3,num_2,num_1]: write0([SP,SP,SP,i],3) time.sleep(1) clean2() for i in range(16): for j in range(32): LED.screen[i][j]=0
20.450704
141
0.269054
762
4,356
1.488189
0.05643
0.335097
0.293651
0.229277
0.595238
0.595238
0.595238
0.561728
0.559083
0.559083
0
0.254117
0.48416
4,356
212
142
20.54717
0.250556
0.004132
0
0.813793
0
0
0.003079
0
0
0
0
0
0
1
0.006897
false
0
0
0
0.006897
0.02069
0
0
1
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b84240276daecbb9636494748a97996c87d82161
12,843
py
Python
tests/fire_groups/test_fire_group.py
spascou/ps2-analysis
00f99b009d15d4c401a3338ddd0408ac7eedcc0b
[ "MIT" ]
2
2020-06-25T17:19:05.000Z
2020-10-13T06:08:39.000Z
tests/fire_groups/test_fire_group.py
spascou/ps2-analysis
00f99b009d15d4c401a3338ddd0408ac7eedcc0b
[ "MIT" ]
null
null
null
tests/fire_groups/test_fire_group.py
spascou/ps2-analysis
00f99b009d15d4c401a3338ddd0408ac7eedcc0b
[ "MIT" ]
null
null
null
from typing import Dict from ps2_census.enums import FireModeType, PlayerState, ProjectileFlightType, ResistType from ps2_analysis.fire_groups.ammo import Ammo from ps2_analysis.fire_groups.cone_of_fire import ConeOfFire from ps2_analysis.fire_groups.damage_profile import DamageProfile from ps2_analysis.fire_groups.fire_group import FireGroup from ps2_analysis.fire_groups.fire_mode import FireMode from ps2_analysis.fire_groups.fire_timing import FireTiming from ps2_analysis.fire_groups.heat import Heat from ps2_analysis.fire_groups.lock_on import LockOn from ps2_analysis.fire_groups.projectile import Projectile from ps2_analysis.fire_groups.recoil import Recoil def test_fire_modes_attributes(): # Fire timing fit_1: FireTiming = FireTiming( is_automatic=True, refire_time=0, fire_duration=0, delay=0, charge_up_time=0, ) fit_2: FireTiming = FireTiming( is_automatic=True, refire_time=0, fire_duration=0, delay=0, charge_up_time=0, ) # Recoil rec_1: Recoil = Recoil( max_angle=0.0, min_angle=0.0, max_vertical=0.0, min_vertical=0.0, vertical_increase=0.0, vertical_crouched_increase=0.0, max_horizontal=0.0, min_horizontal=0.0, horizontal_tolerance=0.0, max_horizontal_increase=0.0, min_horizontal_increase=0.0, recovery_acceleration=0.0, recovery_delay=0.0, recovery_rate=0.0, first_shot_multiplier=1.0, ) rec_2: Recoil = Recoil( max_angle=0.0, min_angle=0.0, max_vertical=0.0, min_vertical=0.0, vertical_increase=0.0, vertical_crouched_increase=0.0, max_horizontal=0.0, min_horizontal=0.0, horizontal_tolerance=0.0, max_horizontal_increase=0.0, min_horizontal_increase=0.0, recovery_acceleration=0.0, recovery_delay=0.0, recovery_rate=0.0, first_shot_multiplier=1.0, ) # Player state cone of fire psc_1: Dict[PlayerState, ConeOfFire] = { PlayerState.STANDING: ConeOfFire( max_angle=2.0, min_angle=1.0, bloom=0.1, recovery_rate=10.0, recovery_delay=100, multiplier=2.0, moving_multiplier=2.0, pellet_spread=0.0, ) } psc_2: Dict[PlayerState, ConeOfFire] = { PlayerState.STANDING: ConeOfFire( max_angle=2.0, min_angle=1.0, bloom=0.1, recovery_rate=10.0, recovery_delay=100, multiplier=2.0, moving_multiplier=2.0, pellet_spread=0.0, ) } # Player state can ADS psa_1: Dict[PlayerState, bool] = {PlayerState.STANDING: True} psa_2: Dict[PlayerState, bool] = {PlayerState.STANDING: True} # Projectile prj_1: Projectile = Projectile( speed=100, gravity=0.0, life_time=3000, flight_type=ProjectileFlightType.BALLISTIC, drag=0.0, ) prj_2: Projectile = Projectile( speed=100, gravity=0.0, life_time=3000, flight_type=ProjectileFlightType.BALLISTIC, drag=0.0, ) # Lock-on lon_1: LockOn = LockOn( life_time=100, seek_in_flight=False, maintain=False, required=True, ) lon_2: LockOn = LockOn( life_time=100, seek_in_flight=False, maintain=False, required=True, ) # Damage profile ddp_1: DamageProfile = DamageProfile( max_damage=90, max_damage_range=10, min_damage=10, min_damage_range=20, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) ddp_2: DamageProfile = DamageProfile( max_damage=90, max_damage_range=10, min_damage=10, min_damage_range=20, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) # Indirect damage profile idp_1: DamageProfile = DamageProfile( max_damage=90, max_damage_range=1, min_damage=20, min_damage_range=2, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) idp_2: DamageProfile = DamageProfile( max_damage=90, max_damage_range=1, min_damage=20, min_damage_range=2, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) # Ammo amm_1: Ammo = Ammo( clip_size=10, total_capacity=100, ammo_per_shot=1, short_reload_time=0, reload_chamber_time=0, ) amm_2: Ammo = Ammo( clip_size=10, total_capacity=100, ammo_per_shot=1, short_reload_time=0, reload_chamber_time=0, ) # Heat hea_1: Heat = Heat( total_capacity=1000, heat_per_shot=0, overheat_penalty_time=0, recovery_delay=0, recovery_rate=0, ) hea_2: Heat = Heat( total_capacity=1000, heat_per_shot=0, overheat_penalty_time=0, recovery_delay=0, recovery_rate=0, ) # Fire modes fm_1: FireMode = FireMode( fire_mode_id=0, fire_mode_type=FireModeType.IRON_SIGHT, description="", is_ads=True, detect_range=30.0, move_multiplier=1.0, turn_multiplier=1.0, zoom=1.5, fire_timing=fit_1, recoil=rec_1, player_state_cone_of_fire=psc_1, player_state_can_ads=psa_1, projectile=prj_1, lock_on=lon_1, direct_damage_profile=ddp_1, indirect_damage_profile=idp_1, ammo=amm_1, heat=hea_1, ) fm_2: FireMode = FireMode( fire_mode_id=1, fire_mode_type=FireModeType.IRON_SIGHT, description="", is_ads=True, detect_range=30.0, move_multiplier=1.0, turn_multiplier=1.0, zoom=1.5, fire_timing=fit_2, recoil=rec_2, player_state_cone_of_fire=psc_2, player_state_can_ads=psa_2, projectile=prj_2, lock_on=lon_2, direct_damage_profile=ddp_2, indirect_damage_profile=idp_2, ammo=amm_2, heat=hea_2, ) # Fire group fg: FireGroup = FireGroup( fire_group_id=2, description="", transition_time=0, fire_modes=[fm_1, fm_2] ) assert fg.fire_timing == fm_1.fire_timing assert fg.recoil == fm_1.recoil assert fg.player_state_cone_of_fire == fm_1.player_state_cone_of_fire assert fg.player_state_can_ads == fm_1.player_state_can_ads assert fg.projectile == fm_1.projectile assert fg.lock_on == fm_1.lock_on assert fg.direct_damage_profile == fm_1.direct_damage_profile assert fg.indirect_damage_profile == fm_1.indirect_damage_profile assert fg.ammo == fm_1.ammo assert fg.heat == fm_1.heat def test_no_fire_modes_attributes(): # Fire timing fit_1: FireTiming = FireTiming( is_automatic=True, refire_time=0, fire_duration=0, delay=0, charge_up_time=0, ) fit_2: FireTiming = FireTiming( is_automatic=True, refire_time=100, fire_duration=0, delay=0, charge_up_time=0, ) # Recoil rec_1: Recoil = Recoil( max_angle=0.0, min_angle=0.0, max_vertical=0.0, min_vertical=0.0, vertical_increase=0.0, vertical_crouched_increase=0.0, max_horizontal=0.0, min_horizontal=0.0, horizontal_tolerance=0.0, max_horizontal_increase=0.0, min_horizontal_increase=0.0, recovery_acceleration=0.0, recovery_delay=0.0, recovery_rate=0.0, first_shot_multiplier=1.0, ) rec_2: Recoil = Recoil( max_angle=1.0, min_angle=0.0, max_vertical=0.0, min_vertical=0.0, vertical_increase=0.0, vertical_crouched_increase=0.0, max_horizontal=0.0, min_horizontal=0.0, horizontal_tolerance=0.0, max_horizontal_increase=0.0, min_horizontal_increase=0.0, recovery_acceleration=0.0, recovery_delay=0.0, recovery_rate=0.0, first_shot_multiplier=1.0, ) # Player state cone of fire psc_1: Dict[PlayerState, ConeOfFire] = { PlayerState.STANDING: ConeOfFire( max_angle=1.0, min_angle=1.0, bloom=0.1, recovery_rate=10.0, recovery_delay=100, multiplier=2.0, moving_multiplier=2.0, pellet_spread=0.0, ) } psc_2: Dict[PlayerState, ConeOfFire] = { PlayerState.STANDING: ConeOfFire( max_angle=2.0, min_angle=1.0, bloom=0.1, recovery_rate=10.0, recovery_delay=100, multiplier=2.0, moving_multiplier=2.0, pellet_spread=0.0, ) } # Player state can ADS psa_1: Dict[PlayerState, bool] = {PlayerState.STANDING: True} psa_2: Dict[PlayerState, bool] = {PlayerState.STANDING: False} # Projectile prj_1: Projectile = Projectile( speed=100, gravity=0.0, life_time=3000, flight_type=ProjectileFlightType.BALLISTIC, drag=0.0, ) prj_2: Projectile = Projectile( speed=200, gravity=0.0, life_time=3000, flight_type=ProjectileFlightType.BALLISTIC, drag=0.0, ) # Lock-on lon_1: LockOn = LockOn( life_time=100, seek_in_flight=False, maintain=False, required=True, ) lon_2: LockOn = LockOn( life_time=200, seek_in_flight=False, maintain=False, required=True, ) # Damage profile ddp_1: DamageProfile = DamageProfile( max_damage=90, max_damage_range=10, min_damage=10, min_damage_range=20, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) ddp_2: DamageProfile = DamageProfile( max_damage=95, max_damage_range=10, min_damage=10, min_damage_range=20, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) # Indirect damage profile idp_1: DamageProfile = DamageProfile( max_damage=92, max_damage_range=1, min_damage=20, min_damage_range=2, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) idp_2: DamageProfile = DamageProfile( max_damage=90, max_damage_range=1, min_damage=20, min_damage_range=2, pellets_count=1, resist_type=ResistType.SMALL_ARM, ) # Ammo amm_1: Ammo = Ammo( clip_size=12, total_capacity=100, ammo_per_shot=1, short_reload_time=0, reload_chamber_time=0, ) amm_2: Ammo = Ammo( clip_size=10, total_capacity=100, ammo_per_shot=1, short_reload_time=0, reload_chamber_time=0, ) # Heat hea_1: Heat = Heat( total_capacity=1000, heat_per_shot=0, overheat_penalty_time=0, recovery_delay=0, recovery_rate=0, ) hea_2: Heat = Heat( total_capacity=1200, heat_per_shot=0, overheat_penalty_time=0, recovery_delay=0, recovery_rate=0, ) # Fire modes fm_1: FireMode = FireMode( fire_mode_id=0, fire_mode_type=FireModeType.IRON_SIGHT, description="", is_ads=True, detect_range=30.0, move_multiplier=1.0, turn_multiplier=1.0, zoom=1.5, fire_timing=fit_1, recoil=rec_1, player_state_cone_of_fire=psc_1, player_state_can_ads=psa_1, projectile=prj_1, lock_on=lon_1, direct_damage_profile=ddp_1, indirect_damage_profile=idp_1, ammo=amm_1, heat=hea_1, ) fm_2: FireMode = FireMode( fire_mode_id=1, fire_mode_type=FireModeType.IRON_SIGHT, description="", is_ads=True, detect_range=30.0, move_multiplier=1.0, turn_multiplier=1.0, zoom=1.5, fire_timing=fit_2, recoil=rec_2, player_state_cone_of_fire=psc_2, player_state_can_ads=psa_2, projectile=prj_2, lock_on=lon_2, direct_damage_profile=ddp_2, indirect_damage_profile=idp_2, ammo=amm_2, heat=hea_2, ) # Fire group fg: FireGroup = FireGroup( fire_group_id=2, description="", transition_time=0, fire_modes=[fm_1, fm_2] ) assert fg.fire_timing is None assert fg.recoil is None assert fg.player_state_cone_of_fire is None assert fg.player_state_can_ads is None assert fg.projectile is None assert fg.lock_on is None assert fg.direct_damage_profile is None assert fg.indirect_damage_profile is None assert fg.ammo is None assert fg.heat is None
27.501071
88
0.618703
1,694
12,843
4.371901
0.082645
0.018093
0.021604
0.025655
0.916149
0.879557
0.848366
0.840535
0.840535
0.840535
0
0.060375
0.294557
12,843
466
89
27.560086
0.757064
0.024216
0
0.783981
0
0
0
0
0
0
0
0
0.048544
1
0.004854
true
0
0.029126
0
0.033981
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
8
a231d9a16ede82887560a10d2ba7a3eebfcd5f21
188
py
Python
tests/test_version.py
LucaCappelletti94/autoencoders_correlation_loss
dc38ba176ea40671e23d3147325966d66df06868
[ "MIT" ]
null
null
null
tests/test_version.py
LucaCappelletti94/autoencoders_correlation_loss
dc38ba176ea40671e23d3147325966d66df06868
[ "MIT" ]
null
null
null
tests/test_version.py
LucaCappelletti94/autoencoders_correlation_loss
dc38ba176ea40671e23d3147325966d66df06868
[ "MIT" ]
null
null
null
from validate_version_code import validate_version_code from autoencoders_correlation_loss.__version__ import __version__ def test_version(): assert validate_version_code(__version__)
37.6
65
0.882979
23
188
6.304348
0.478261
0.310345
0.393103
0
0
0
0
0
0
0
0
0
0.085106
188
5
66
37.6
0.843023
0
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
8
a292af2b48a5e3003fb77bc169aec1b78e7cc222
61,854
py
Python
tests/test_v3_auth.py
isabella232/keystone
89d35004411e1eec9b1af97f589f06ae871aca02
[ "Apache-2.0" ]
6
2016-08-06T09:00:17.000Z
2021-10-21T23:12:47.000Z
tests/test_v3_auth.py
paypal/keystone
89d35004411e1eec9b1af97f589f06ae871aca02
[ "Apache-2.0" ]
1
2021-02-23T10:29:49.000Z
2021-02-23T10:29:49.000Z
tests/test_v3_auth.py
isabella232/keystone
89d35004411e1eec9b1af97f589f06ae871aca02
[ "Apache-2.0" ]
10
2016-04-25T20:10:06.000Z
2021-06-10T15:14:19.000Z
# Copyright 2012 OpenStack 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 # # 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. import json import uuid import nose.exc from keystone.common import cms from keystone import auth from keystone import config from keystone import exception import test_v3 CONF = config.CONF class TestAuthInfo(test_v3.RestfulTestCase): # TDOD(henry-nash) These tests are somewhat inefficient, since by # using the test_v3.RestfulTestCase class to gain access to the auth # building helper functions, they cause backend databases and fixtures # to be loaded unnecessarily. Separating out the helper functions from # this base class would improve efficiency (Bug #1134836) def setUp(self, load_sample_data=False): super(TestAuthInfo, self).setUp(load_sample_data=load_sample_data) def test_missing_auth_methods(self): auth_data = {'identity': {}} auth_data['identity']['token'] = {'id': uuid.uuid4().hex} self.assertRaises(exception.ValidationError, auth.controllers.AuthInfo, None, auth_data) def test_unsupported_auth_method(self): auth_data = {'methods': ['abc']} auth_data['abc'] = {'test': 'test'} auth_data = {'identity': auth_data} self.assertRaises(exception.AuthMethodNotSupported, auth.controllers.AuthInfo, None, auth_data) def test_missing_auth_method_data(self): auth_data = {'methods': ['password']} auth_data = {'identity': auth_data} self.assertRaises(exception.ValidationError, auth.controllers.AuthInfo, None, auth_data) def test_project_name_no_domain(self): auth_data = self.build_authentication_request( username='test', password='test', project_name='abc')['auth'] self.assertRaises(exception.ValidationError, auth.controllers.AuthInfo, None, auth_data) def test_both_project_and_domain_in_scope(self): auth_data = self.build_authentication_request( user_id='test', password='test', project_name='test', domain_name='test')['auth'] self.assertRaises(exception.ValidationError, auth.controllers.AuthInfo, None, auth_data) class TestTokenAPIs(test_v3.RestfulTestCase): def setUp(self): super(TestTokenAPIs, self).setUp() auth_data = self.build_authentication_request( username=self.user['name'], user_domain_id=self.domain_id, password=self.user['password']) resp = self.post('/auth/tokens', body=auth_data) self.token_data = resp.body self.token = resp.getheader('X-Subject-Token') self.headers = {'X-Subject-Token': resp.getheader('X-Subject-Token')} def test_default_fixture_scope_token(self): self.assertIsNotNone(self.get_scoped_token()) def test_v3_pki_token_id(self): self.opt_in_group('signing', token_format='PKI') auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token_id = resp.getheader('X-Subject-Token') self.assertIn('expires_at', token_data['token']) token_signed = cms.cms_sign_token(json.dumps(token_data), CONF.signing.certfile, CONF.signing.keyfile) self.assertEqual(token_signed, token_id) def test_v3_v2_intermix_non_default_domain_failed(self): self.opt_in_group('signing', token_format='UUID') auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token = resp.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET', expected_status=401) def test_v3_v2_intermix_domain_scoped_token_failed(self): self.opt_in_group('signing', token_format='UUID') # grant the domain role to user path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], domain_id=self.domain['id']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token = resp.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET', expected_status=401) def test_v3_v2_intermix_non_default_project_failed(self): auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password'], project_id=self.project['id']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token = resp.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET', expected_status=401) def test_v3_v2_unscoped_uuid_token_intermix(self): self.opt_in_group('signing', token_format='UUID') auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token = resp.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET') v2_token = resp.body self.assertEqual(v2_token['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token['access']['token']['expires'][:-1], token_data['token']['expires_at']) def test_v3_v2_unscoped_pki_token_intermix(self): self.opt_in_group('signing', token_format='PKI') auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token = resp.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET') v2_token = resp.body self.assertEqual(v2_token['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token['access']['token']['expires'][:-1], token_data['token']['expires_at']) def test_v3_v2_uuid_token_intermix(self): # FIXME(gyee): PKI tokens are not interchangeable because token # data is baked into the token itself. self.opt_in_group('signing', token_format='UUID') auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password'], project_id=self.default_domain_project['id']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token = resp.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET') v2_token = resp.body self.assertEqual(v2_token['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token['access']['token']['expires'][:-1], token_data['token']['expires_at']) self.assertEqual(v2_token['access']['user']['roles'][0]['id'], token_data['token']['roles'][0]['id']) def test_v3_v2_pki_token_intermix(self): # FIXME(gyee): PKI tokens are not interchangeable because token # data is baked into the token itself. self.opt_in_group('signing', token_format='PKI') auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password'], project_id=self.default_domain_project['id']) resp = self.post('/auth/tokens', body=auth_data) token_data = resp.body token = resp.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET') v2_token = resp.body self.assertEqual(v2_token['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token['access']['token']['expires'][-1], token_data['token']['expires_at']) self.assertEqual(v2_token['access']['user']['roles'][0]['id'], token_data['token']['roles'][0]['id']) def test_v2_v3_unscoped_uuid_token_intermix(self): self.opt_in_group('signing', token_format='UUID') body = { 'auth': { 'passwordCredentials': { 'userId': self.user['id'], 'password': self.user['password'] } }} resp = self.admin_request(path='/v2.0/tokens', method='POST', body=body) v2_token_data = resp.body v2_token = v2_token_data['access']['token']['id'] headers = {'X-Subject-Token': v2_token} resp = self.get('/auth/tokens', headers=headers) token_data = resp.body self.assertEqual(v2_token_data['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token_data['access']['token']['expires'][-1], token_data['token']['expires_at']) def test_v2_v3_unscoped_pki_token_intermix(self): self.opt_in_group('signing', token_format='PKI') body = { 'auth': { 'passwordCredentials': { 'userId': self.user['id'], 'password': self.user['password'] } }} resp = self.admin_request(path='/v2.0/tokens', method='POST', body=body) v2_token_data = resp.body v2_token = v2_token_data['access']['token']['id'] headers = {'X-Subject-Token': v2_token} resp = self.get('/auth/tokens', headers=headers) token_data = resp.body self.assertEqual(v2_token_data['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token_data['access']['token']['expires'][-1], token_data['token']['expires_at']) def test_v2_v3_uuid_token_intermix(self): self.opt_in_group('signing', token_format='UUID') body = { 'auth': { 'passwordCredentials': { 'userId': self.user['id'], 'password': self.user['password'] }, 'tenantId': self.project['id'] }} resp = self.admin_request(path='/v2.0/tokens', method='POST', body=body) v2_token_data = resp.body v2_token = v2_token_data['access']['token']['id'] headers = {'X-Subject-Token': v2_token} resp = self.get('/auth/tokens', headers=headers) token_data = resp.body self.assertEqual(v2_token_data['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token_data['access']['token']['expires'][-1], token_data['token']['expires_at']) self.assertEqual(v2_token_data['access']['user']['roles'][0]['name'], token_data['token']['roles'][0]['name']) def test_v2_v3_pki_token_intermix(self): self.opt_in_group('signing', token_format='PKI') body = { 'auth': { 'passwordCredentials': { 'userId': self.user['id'], 'password': self.user['password'] }, 'tenantId': self.project['id'] }} resp = self.admin_request(path='/v2.0/tokens', method='POST', body=body) v2_token_data = resp.body v2_token = v2_token_data['access']['token']['id'] headers = {'X-Subject-Token': v2_token} resp = self.get('/auth/tokens', headers=headers) token_data = resp.body self.assertEqual(v2_token_data['access']['user']['id'], token_data['token']['user']['id']) # v2 token time has not fraction of second precision so # just need to make sure the non fraction part agrees self.assertIn(v2_token_data['access']['token']['expires'][-1], token_data['token']['expires_at']) self.assertEqual(v2_token_data['access']['user']['roles'][0]['name'], token_data['token']['roles'][0]['name']) def test_rescoping_token(self): expires = self.token_data['token']['expires_at'] auth_data = self.build_authentication_request( token=self.token, project_id=self.project_id) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectScopedTokenResponse(r) # make sure expires stayed the same self.assertEqual(expires, r.body['token']['expires_at']) def test_check_token(self): self.head('/auth/tokens', headers=self.headers, expected_status=204) def test_validate_token(self): r = self.get('/auth/tokens', headers=self.headers) self.assertValidUnscopedTokenResponse(r) def test_revoke_token(self): headers = {'X-Subject-Token': self.get_scoped_token()} self.delete('/auth/tokens', headers=headers, expected_status=204) self.head('/auth/tokens', headers=headers, expected_status=401) # make sure we have a CRL r = self.get('/auth/tokens/OS-PKI/revoked') self.assertIn('signed', r.body) class TestTokenRevoking(test_v3.RestfulTestCase): """Test token revoking for relevant v3 identity apis""" def setUp(self): """Setup for Token Revoking Test Cases. As well as the usual housekeeping, create a set of domains, users, groups, roles and projects for the subsequent tests: - Two domains: A & B - DomainA has user1, domainB has user2 and user3 - DomainA has group1 and group2, domainB has group3 - User1 has a role on domainA - Two projects: A & B, both in domainA - All users have a role on projectA - Two groups: 1 & 2 - User1 and user2 are members of group1 - User3 is a member of group2 """ super(TestTokenRevoking, self).setUp() # Start by creating a couple of domains and projects self.domainA = self.new_domain_ref() domainA_ref = self.identity_api.create_domain(self.domainA['id'], self.domainA) self.domainB = self.new_domain_ref() domainB_ref = self.identity_api.create_domain(self.domainB['id'], self.domainB) self.projectA = self.new_project_ref(domain_id=self.domainA['id']) projectA_ref = self.identity_api.create_project(self.projectA['id'], self.projectA) self.projectB = self.new_project_ref(domain_id=self.domainA['id']) projectB_ref = self.identity_api.create_project(self.projectB['id'], self.projectB) # Now create some users, one in domainA and two of them in domainB self.user1 = self.new_user_ref( domain_id=self.domainA['id']) self.user1['password'] = uuid.uuid4().hex user_ref = self.identity_api.create_user(self.user1['id'], self.user1) self.user2 = self.new_user_ref( domain_id=self.domainB['id']) self.user2['password'] = uuid.uuid4().hex user_ref = self.identity_api.create_user(self.user2['id'], self.user2) self.user3 = self.new_user_ref( domain_id=self.domainB['id']) self.user3['password'] = uuid.uuid4().hex user_ref = self.identity_api.create_user(self.user3['id'], self.user3) self.group1 = self.new_group_ref( domain_id=self.domainA['id']) user_ref = self.identity_api.create_group(self.group1['id'], self.group1) self.group2 = self.new_group_ref( domain_id=self.domainA['id']) user_ref = self.identity_api.create_group(self.group2['id'], self.group2) self.group3 = self.new_group_ref( domain_id=self.domainB['id']) user_ref = self.identity_api.create_group(self.group3['id'], self.group3) self.identity_api.add_user_to_group(self.user1['id'], self.group1['id']) self.identity_api.add_user_to_group(self.user2['id'], self.group1['id']) self.identity_api.add_user_to_group(self.user3['id'], self.group2['id']) self.role1 = self.new_role_ref() self.identity_api.create_role(self.role1['id'], self.role1) self.role2 = self.new_role_ref() self.identity_api.create_role(self.role2['id'], self.role2) self.identity_api.create_grant(self.role1['id'], user_id=self.user1['id'], domain_id=self.domainA['id']) self.identity_api.create_grant(self.role1['id'], user_id=self.user1['id'], project_id=self.projectA['id']) self.identity_api.create_grant(self.role1['id'], user_id=self.user2['id'], project_id=self.projectA['id']) self.identity_api.create_grant(self.role1['id'], user_id=self.user3['id'], project_id=self.projectA['id']) self.identity_api.create_grant(self.role1['id'], group_id=self.group1['id'], project_id=self.projectA['id']) def test_deleting_user_grant_revokes_token(self): """Test deleting a user grant revokes token. Test Plan: - Get a token for user1, scoped to ProjectA - Delete the grant user1 has on ProjectA - Check token is no longer valid """ auth_data = self.build_authentication_request( user_id=self.user1['id'], password=self.user1['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token = resp.getheader('X-Subject-Token') # Confirm token is valid self.head('/auth/tokens', headers={'X-Subject-Token': token}, expected_status=204) # Delete the grant, which should invalidate the token grant_url = ( '/projects/%(project_id)s/users/%(user_id)s/' 'roles/%(role_id)s' % { 'project_id': self.projectA['id'], 'user_id': self.user1['id'], 'role_id': self.role1['id']}) self.delete(grant_url) self.head('/auth/tokens', headers={'X-Subject-Token': token}, expected_status=401) def test_creating_user_grant_revokes_token(self): """Test creating a user grant revokes token. Test Plan: - Get a token for user1, scoped to ProjectA - Create a grant for user1 on DomainB - Check token is no longer valid """ auth_data = self.build_authentication_request( user_id=self.user1['id'], password=self.user1['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token = resp.getheader('X-Subject-Token') # Confirm token is valid self.head('/auth/tokens', headers={'X-Subject-Token': token}, expected_status=204) # Delete the grant, which should invalidate the token grant_url = ( '/domains/%(domain_id)s/users/%(user_id)s/' 'roles/%(role_id)s' % { 'domain_id': self.domainB['id'], 'user_id': self.user1['id'], 'role_id': self.role1['id']}) self.put(grant_url) self.head('/auth/tokens', headers={'X-Subject-Token': token}, expected_status=401) def test_deleting_group_grant_revokes_tokens(self): """Test deleting a group grant revokes tokens. Test Plan: - Get a token for user1, scoped to ProjectA - Get a token for user2, scoped to ProjectA - Get a token for user3, scoped to ProjectA - Delete the grant group1 has on ProjectA - Check tokens for user1 & user2 are no longer valid, since user1 and user2 are members of group1 - Check token for user3 is still valid """ auth_data = self.build_authentication_request( user_id=self.user1['id'], password=self.user1['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token1 = resp.getheader('X-Subject-Token') auth_data = self.build_authentication_request( user_id=self.user2['id'], password=self.user2['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token2 = resp.getheader('X-Subject-Token') auth_data = self.build_authentication_request( user_id=self.user3['id'], password=self.user3['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token3 = resp.getheader('X-Subject-Token') # Confirm tokens are valid self.head('/auth/tokens', headers={'X-Subject-Token': token1}, expected_status=204) self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=204) self.head('/auth/tokens', headers={'X-Subject-Token': token3}, expected_status=204) # Delete the group grant, which should invalidate the # tokens for user1 and user2 grant_url = ( '/projects/%(project_id)s/groups/%(group_id)s/' 'roles/%(role_id)s' % { 'project_id': self.projectA['id'], 'group_id': self.group1['id'], 'role_id': self.role1['id']}) self.delete(grant_url) self.head('/auth/tokens', headers={'X-Subject-Token': token1}, expected_status=401) self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=401) # But user3's token should still be valid self.head('/auth/tokens', headers={'X-Subject-Token': token3}, expected_status=204) def test_creating_group_grant_revokes_token(self): """Test creating a group grant revokes token. Test Plan: - Get a token for user1, scoped to ProjectA - Create a grant for group1 on DomainB - Check token is no longer valid """ auth_data = self.build_authentication_request( user_id=self.user1['id'], password=self.user1['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token = resp.getheader('X-Subject-Token') # Confirm token is valid self.head('/auth/tokens', headers={'X-Subject-Token': token}, expected_status=204) # Delete the grant, which should invalidate the token grant_url = ( '/domains/%(domain_id)s/groups/%(group_id)s/' 'roles/%(role_id)s' % { 'domain_id': self.domainB['id'], 'group_id': self.group1['id'], 'role_id': self.role1['id']}) self.put(grant_url) self.head('/auth/tokens', headers={'X-Subject-Token': token}, expected_status=401) def test_group_membership_changes_revokes_token(self): """Test add/removal to/from group revokes token. Test Plan: - Get a token for user1, scoped to ProjectA - Get a token for user2, scoped to ProjectA - Remove user1 from group1 - Check token for user1 is no longer valid - Check token for user2 is still valid, even though user2 is also part of group1 - Add user2 to group2 - Check token for user2 is now no longer valid """ auth_data = self.build_authentication_request( user_id=self.user1['id'], password=self.user1['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token1 = resp.getheader('X-Subject-Token') auth_data = self.build_authentication_request( user_id=self.user2['id'], password=self.user2['password'], project_id=self.projectA['id']) resp = self.post('/auth/tokens', body=auth_data) token2 = resp.getheader('X-Subject-Token') # Confirm tokens are valid self.head('/auth/tokens', headers={'X-Subject-Token': token1}, expected_status=204) self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=204) # Remove user1 from group1, which should invalidate # the token self.delete('/groups/%(group_id)s/users/%(user_id)s' % { 'group_id': self.group1['id'], 'user_id': self.user1['id']}) self.head('/auth/tokens', headers={'X-Subject-Token': token1}, expected_status=401) # But user2's token should still be valid self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=204) # Adding user2 to a group should invalidate token self.put('/groups/%(group_id)s/users/%(user_id)s' % { 'group_id': self.group2['id'], 'user_id': self.user2['id']}) self.head('/auth/tokens', headers={'X-Subject-Token': token2}, expected_status=401) class TestAuthJSON(test_v3.RestfulTestCase): content_type = 'json' def test_unscoped_token_with_user_id(self): auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password']) r = self.post('/auth/tokens', body=auth_data) self.assertValidUnscopedTokenResponse(r) def test_unscoped_token_with_user_domain_id(self): auth_data = self.build_authentication_request( username=self.user['name'], user_domain_id=self.domain['id'], password=self.user['password']) r = self.post('/auth/tokens', body=auth_data) self.assertValidUnscopedTokenResponse(r) def test_unscoped_token_with_user_domain_name(self): auth_data = self.build_authentication_request( username=self.user['name'], user_domain_name=self.domain['name'], password=self.user['password']) r = self.post('/auth/tokens', body=auth_data) self.assertValidUnscopedTokenResponse(r) def test_project_id_scoped_token_with_user_id(self): auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], project_id=self.project['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectScopedTokenResponse(r) def test_default_project_id_scoped_token_with_user_id(self): # create a second project to work with ref = self.new_project_ref(domain_id=self.domain_id) r = self.post('/projects', body={'project': ref}) project = self.assertValidProjectResponse(r, ref) # grant the user a role on the project self.put( '/projects/%(project_id)s/users/%(user_id)s/roles/%(role_id)s' % { 'user_id': self.user['id'], 'project_id': project['id'], 'role_id': self.role['id']}) # set the user's preferred project body = {'user': {'default_project_id': project['id']}} r = self.patch('/users/%(user_id)s' % { 'user_id': self.user['id']}, body=body) self.assertValidUserResponse(r) # attempt to authenticate without requesting a project auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectScopedTokenResponse(r) self.assertEqual(r.body['token']['project']['id'], project['id']) def test_default_project_id_scoped_token_with_user_id_401(self): # create a second project to work with ref = self.new_project_ref(domain_id=self.domain['id']) del ref['id'] r = self.post('/projects', body={'project': ref}) project = self.assertValidProjectResponse(r, ref) # set the user's preferred project without having authz on that project body = {'user': {'default_project_id': project['id']}} r = self.patch('/users/%(user_id)s' % { 'user_id': self.user['id']}, body=body) self.assertValidUserResponse(r) # attempt to authenticate without requesting a project # the default_project_id should be the assumed scope of the request, # and fail because the user doesn't have explicit authz on that scope auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_project_id_scoped_token_with_user_id_401(self): project_id = uuid.uuid4().hex project = self.new_project_ref(domain_id=self.domain_id) self.identity_api.create_project(project_id, project) auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], project_id=project['id']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_project_id_scoped_token_with_user_domain_id(self): auth_data = self.build_authentication_request( username=self.user['name'], user_domain_id=self.domain['id'], password=self.user['password'], project_id=self.project['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectScopedTokenResponse(r) def test_project_id_scoped_token_with_user_domain_name(self): auth_data = self.build_authentication_request( username=self.user['name'], user_domain_name=self.domain['name'], password=self.user['password'], project_id=self.project['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectScopedTokenResponse(r) def test_domain_id_scoped_token_with_user_id(self): path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], domain_id=self.domain['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_id_scoped_token_with_user_domain_id(self): path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) auth_data = self.build_authentication_request( username=self.user['name'], user_domain_id=self.domain['id'], password=self.user['password'], domain_id=self.domain['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_id_scoped_token_with_user_domain_name(self): path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) auth_data = self.build_authentication_request( username=self.user['name'], user_domain_name=self.domain['name'], password=self.user['password'], domain_id=self.domain['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_name_scoped_token_with_user_id(self): path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], domain_name=self.domain['name']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_name_scoped_token_with_user_domain_id(self): path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) auth_data = self.build_authentication_request( username=self.user['name'], user_domain_id=self.domain['id'], password=self.user['password'], domain_name=self.domain['name']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_name_scoped_token_with_user_domain_name(self): path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) auth_data = self.build_authentication_request( username=self.user['name'], user_domain_name=self.domain['name'], password=self.user['password'], domain_name=self.domain['name']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_scope_token_with_group_role(self): group_id = uuid.uuid4().hex group = self.new_group_ref( domain_id=self.domain_id) group['id'] = group_id self.identity_api.create_group(group_id, group) # add user to group self.identity_api.add_user_to_group(self.user['id'], group['id']) # grant the domain role to group path = '/domains/%s/groups/%s/roles/%s' % ( self.domain['id'], group['id'], self.role['id']) self.put(path=path) # now get a domain-scoped token auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], domain_id=self.domain['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_scope_token_with_name(self): # grant the domain role to user path = '/domains/%s/users/%s/roles/%s' % ( self.domain['id'], self.user['id'], self.role['id']) self.put(path=path) # now get a domain-scoped token auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], domain_name=self.domain['name']) r = self.post('/auth/tokens', body=auth_data) self.assertValidDomainScopedTokenResponse(r) def test_domain_scope_failed(self): auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], domain_id=self.domain['id']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_auth_with_id(self): auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password']) r = self.post('/auth/tokens', body=auth_data) self.assertValidUnscopedTokenResponse(r) token = r.getheader('X-Subject-Token') headers = {'X-Subject-Token': r.getheader('X-Subject-Token')} # test token auth auth_data = self.build_authentication_request(token=token) r = self.post('/auth/tokens', body=auth_data) self.assertValidUnscopedTokenResponse(r) def test_invalid_user_id(self): auth_data = self.build_authentication_request( user_id=uuid.uuid4().hex, password=self.user['password']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_invalid_user_name(self): auth_data = self.build_authentication_request( username=uuid.uuid4().hex, user_domain_id=self.domain['id'], password=self.user['password']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_invalid_domain_id(self): auth_data = self.build_authentication_request( username=self.user['name'], user_domain_id=uuid.uuid4().hex, password=self.user['password']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_invalid_domain_name(self): auth_data = self.build_authentication_request( username=self.user['name'], user_domain_name=uuid.uuid4().hex, password=self.user['password']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_invalid_password(self): auth_data = self.build_authentication_request( user_id=self.user['id'], password=uuid.uuid4().hex) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_remote_user(self): auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'])['auth'] api = auth.controllers.Auth() context = {'REMOTE_USER': self.user['name']} auth_info = auth.controllers.AuthInfo(None, auth_data) auth_context = {'extras': {}, 'method_names': []} api.authenticate(context, auth_info, auth_context) self.assertEqual(auth_context['user_id'], self.user['id']) def test_remote_user_no_domain(self): auth_data = self.build_authentication_request( username=self.user['name'], password=self.user['password'])['auth'] api = auth.controllers.Auth() context = {'REMOTE_USER': self.user['name']} auth_info = auth.controllers.AuthInfo(None, auth_data) auth_context = {'extras': {}, 'method_names': []} self.assertRaises(exception.ValidationError, api.authenticate, context, auth_info, auth_context) class TestAuthXML(TestAuthJSON): content_type = 'xml' class TestTrustOptional(test_v3.RestfulTestCase): def setUp(self, *args, **kwargs): self.opt_in_group('trust', enabled=False) super(TestTrustOptional, self).setUp(*args, **kwargs) def test_trusts_404(self): self.get('/OS-TRUST/trusts', body={'trust': {}}, expected_status=404) self.post('/OS-TRUST/trusts', body={'trust': {}}, expected_status=404) def test_auth_with_scope_in_trust_403(self): auth_data = self.build_authentication_request( user_id=self.user['id'], password=self.user['password'], trust_id=uuid.uuid4().hex) self.post('/auth/tokens', body=auth_data, expected_status=403) class TestTrustAuth(TestAuthInfo): def setUp(self): self.opt_in_group('trust', enabled=True) super(TestTrustAuth, self).setUp(load_sample_data=True) # create a trustee to delegate stuff to self.trustee_user_id = uuid.uuid4().hex self.trustee_user = self.new_user_ref(domain_id=self.domain_id) self.trustee_user['id'] = self.trustee_user_id self.identity_api.create_user(self.trustee_user_id, self.trustee_user) def test_create_trust_400(self): raise nose.exc.SkipTest('Blocked by bug 1133435') self.post('/OS-TRUST/trusts', body={'trust': {}}, expected_status=400) def test_create_unscoped_trust(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) self.assertValidTrustResponse(r, ref) def test_trust_crud(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, role_ids=[self.role_id]) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r, ref) r = self.get( '/OS-TRUST/trusts/%(trust_id)s' % {'trust_id': trust['id']}, expected_status=200) self.assertValidTrustResponse(r, ref) # validate roles on the trust r = self.get( '/OS-TRUST/trusts/%(trust_id)s/roles' % { 'trust_id': trust['id']}, expected_status=200) roles = self.assertValidRoleListResponse(r, self.role) self.assertIn(self.role['id'], [x['id'] for x in roles]) self.head( '/OS-TRUST/trusts/%(trust_id)s/roles/%(role_id)s' % { 'trust_id': trust['id'], 'role_id': self.role['id']}, expected_status=204) r = self.get( '/OS-TRUST/trusts/%(trust_id)s/roles/%(role_id)s' % { 'trust_id': trust['id'], 'role_id': self.role['id']}, expected_status=200) self.assertValidRoleResponse(r, self.role) r = self.get('/OS-TRUST/trusts', expected_status=200) self.assertValidTrustListResponse(r, trust) # trusts are immutable self.patch( '/OS-TRUST/trusts/%(trust_id)s' % {'trust_id': trust['id']}, body={'trust': ref}, expected_status=404) self.delete( '/OS-TRUST/trusts/%(trust_id)s' % {'trust_id': trust['id']}, expected_status=204) self.get( '/OS-TRUST/trusts/%(trust_id)s' % {'trust_id': trust['id']}, expected_status=404) def test_create_trust_trustee_404(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=uuid.uuid4().hex) del ref['id'] self.post('/OS-TRUST/trusts', body={'trust': ref}, expected_status=404) def test_create_trust_trustor_trustee_backwards(self): ref = self.new_trust_ref( trustor_user_id=self.trustee_user_id, trustee_user_id=self.user_id) del ref['id'] self.post('/OS-TRUST/trusts', body={'trust': ref}, expected_status=403) def test_create_trust_project_404(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=uuid.uuid4().hex, role_ids=[self.role_id]) del ref['id'] self.post('/OS-TRUST/trusts', body={'trust': ref}, expected_status=404) def test_create_trust_role_id_404(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, role_ids=[uuid.uuid4().hex]) del ref['id'] self.post('/OS-TRUST/trusts', body={'trust': ref}, expected_status=404) def test_create_trust_role_name_404(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, role_names=[uuid.uuid4().hex]) del ref['id'] self.post('/OS-TRUST/trusts', body={'trust': ref}, expected_status=404) def test_create_expired_trust(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, expires=dict(seconds=-1), role_ids=[self.role_id]) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r, ref) self.get('/OS-TRUST/trusts/%(trust_id)s' % { 'trust_id': trust['id']}, expected_status=404) auth_data = self.build_authentication_request( user_id=self.trustee_user['id'], password=self.trustee_user['password'], trust_id=trust['id']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_v3_v2_intermix_trustor_not_in_default_domain_failed(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.default_domain_user_id, project_id=self.project_id, impersonation=False, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r) auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password'], trust_id=trust['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectTrustScopedTokenResponse( r, self.default_domain_user) token = r.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET', expected_status=401) def test_v3_v2_intermix_trustor_not_in_default_domaini_failed(self): ref = self.new_trust_ref( trustor_user_id=self.default_domain_user_id, trustee_user_id=self.trustee_user_id, project_id=self.default_domain_project_id, impersonation=False, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password'], project_id=self.default_domain_project_id) r = self.post('/auth/tokens', body=auth_data) token = r.getheader('X-Subject-Token') r = self.post('/OS-TRUST/trusts', body={'trust': ref}, token=token) trust = self.assertValidTrustResponse(r) auth_data = self.build_authentication_request( user_id=self.trustee_user['id'], password=self.trustee_user['password'], trust_id=trust['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectTrustScopedTokenResponse( r, self.trustee_user) token = r.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET', expected_status=401) def test_v3_v2_intermix_project_not_in_default_domaini_failed(self): # create a trustee in default domain to delegate stuff to trustee_user_id = uuid.uuid4().hex trustee_user = self.new_user_ref(domain_id=test_v3.DEFAULT_DOMAIN_ID) trustee_user['id'] = trustee_user_id self.identity_api.create_user(trustee_user_id, trustee_user) ref = self.new_trust_ref( trustor_user_id=self.default_domain_user_id, trustee_user_id=trustee_user_id, project_id=self.project_id, impersonation=False, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password'], project_id=self.default_domain_project_id) r = self.post('/auth/tokens', body=auth_data) token = r.getheader('X-Subject-Token') r = self.post('/OS-TRUST/trusts', body={'trust': ref}, token=token) trust = self.assertValidTrustResponse(r) auth_data = self.build_authentication_request( user_id=trustee_user['id'], password=trustee_user['password'], trust_id=trust['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectTrustScopedTokenResponse( r, trustee_user) token = r.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET', expected_status=401) def test_v3_v2_intermix(self): # create a trustee in default domain to delegate stuff to trustee_user_id = uuid.uuid4().hex trustee_user = self.new_user_ref(domain_id=test_v3.DEFAULT_DOMAIN_ID) trustee_user['id'] = trustee_user_id self.identity_api.create_user(trustee_user_id, trustee_user) ref = self.new_trust_ref( trustor_user_id=self.default_domain_user_id, trustee_user_id=trustee_user_id, project_id=self.default_domain_project_id, impersonation=False, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] auth_data = self.build_authentication_request( user_id=self.default_domain_user['id'], password=self.default_domain_user['password'], project_id=self.default_domain_project_id) r = self.post('/auth/tokens', body=auth_data) token = r.getheader('X-Subject-Token') r = self.post('/OS-TRUST/trusts', body={'trust': ref}, token=token) trust = self.assertValidTrustResponse(r) auth_data = self.build_authentication_request( user_id=trustee_user['id'], password=trustee_user['password'], trust_id=trust['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectTrustScopedTokenResponse( r, trustee_user) token = r.getheader('X-Subject-Token') # now validate the v3 token with v2 API path = '/v2.0/tokens/%s' % (token) resp = self.admin_request(path=path, token='ADMIN', method='GET', expected_status=200) def test_exercise_trust_scoped_token_without_impersonation(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, impersonation=False, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r) auth_data = self.build_authentication_request( user_id=self.trustee_user['id'], password=self.trustee_user['password'], trust_id=trust['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectTrustScopedTokenResponse(r, self.trustee_user) self.assertEqual(r.body['token']['user']['id'], self.trustee_user['id']) self.assertEqual(r.body['token']['user']['name'], self.trustee_user['name']) self.assertEqual(r.body['token']['user']['domain']['id'], self.domain['id']) self.assertEqual(r.body['token']['user']['domain']['name'], self.domain['name']) self.assertEqual(r.body['token']['project']['id'], self.project['id']) self.assertEqual(r.body['token']['project']['name'], self.project['name']) def test_exercise_trust_scoped_token_with_impersonation(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, impersonation=True, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r) auth_data = self.build_authentication_request( user_id=self.trustee_user['id'], password=self.trustee_user['password'], trust_id=trust['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectTrustScopedTokenResponse(r, self.user) self.assertEqual(r.body['token']['user']['id'], self.user['id']) self.assertEqual(r.body['token']['user']['name'], self.user['name']) self.assertEqual(r.body['token']['user']['domain']['id'], self.domain['id']) self.assertEqual(r.body['token']['user']['domain']['name'], self.domain['name']) self.assertEqual(r.body['token']['project']['id'], self.project['id']) self.assertEqual(r.body['token']['project']['name'], self.project['name']) def test_delete_trust(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, impersonation=False, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r, ref) self.delete('/OS-TRUST/trusts/%(trust_id)s' % { 'trust_id': trust['id']}, expected_status=204) self.get('/OS-TRUST/trusts/%(trust_id)s' % { 'trust_id': trust['id']}, expected_status=404) self.get('/OS-TRUST/trusts/%(trust_id)s' % { 'trust_id': trust['id']}, expected_status=404) auth_data = self.build_authentication_request( user_id=self.trustee_user['id'], password=self.trustee_user['password'], trust_id=trust['id']) self.post('/auth/tokens', body=auth_data, expected_status=401) def test_list_trusts(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, impersonation=False, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] for i in range(0, 3): r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r, ref) r = self.get('/OS-TRUST/trusts?trustor_user_id=%s' % self.user_id, expected_status=200) trusts = r.body['trusts'] self.assertEqual(len(trusts), 3) r = self.get('/OS-TRUST/trusts?trustee_user_id=%s' % self.user_id, expected_status=200) trusts = r.body['trusts'] self.assertEqual(len(trusts), 0) def test_change_password_invalidates_trust_tokens(self): ref = self.new_trust_ref( trustor_user_id=self.user_id, trustee_user_id=self.trustee_user_id, project_id=self.project_id, impersonation=True, expires=dict(minutes=1), role_ids=[self.role_id]) del ref['id'] r = self.post('/OS-TRUST/trusts', body={'trust': ref}) trust = self.assertValidTrustResponse(r) auth_data = self.build_authentication_request( user_id=self.trustee_user['id'], password=self.trustee_user['password'], trust_id=trust['id']) r = self.post('/auth/tokens', body=auth_data) self.assertValidProjectTrustScopedTokenResponse(r, self.user) trust_token = r.getheader('X-Subject-Token') self.get('/OS-TRUST/trusts?trustor_user_id=%s' % self.user_id, expected_status=200, token=trust_token) auth_data = self.build_authentication_request( user_id=self.trustee_user['id'], password=self.trustee_user['password']) self.assertValidUserResponse( self.patch('/users/%s' % self.trustee_user['id'], body={'user': {'password': uuid.uuid4().hex}}, auth=auth_data, expected_status=200)) self.get('/OS-TRUST/trusts?trustor_user_id=%s' % self.user_id, expected_status=401, token=trust_token)
42.106195
79
0.582355
7,319
61,854
4.70843
0.05028
0.045269
0.03105
0.030092
0.860074
0.838919
0.812745
0.789733
0.779432
0.765909
0
0.012881
0.29214
61,854
1,468
80
42.134877
0.774187
0.091684
0
0.754833
0
0
0.117138
0.019721
0
0
0
0.000681
0.08348
1
0.068541
false
0.065026
0.00703
0
0.08348
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
a2eb37bd05f22d5408fa640df49388e091f17407
59,672
py
Python
src/genie/libs/parser/ios/tests/test_show_eigrp.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
2
2021-01-27T03:37:39.000Z
2021-01-27T03:40:50.000Z
src/genie/libs/parser/ios/tests/test_show_eigrp.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
1
2020-08-01T00:23:31.000Z
2020-08-01T00:40:05.000Z
src/genie/libs/parser/ios/tests/test_show_eigrp.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
null
null
null
""" test_show_eigrp.py Unit tests for the following commands: * 'show ip eigrp neighbors' * 'show ip eigrp vrf {vrf} neighbors' * 'show ipv6 eigrp neighbors' * 'show ip eigrp neighbors detail' * 'show ip eigrp vrf {vrf} neighbors detail' * 'show ipv6 eigrp neighbors detail' """ # Python import unittest from unittest.mock import Mock # ATS from pyats.topology import Device # Metaparser from genie.metaparser.util.exceptions import SchemaEmptyParserError # ios show ip eigrp from genie.libs.parser.ios.show_eigrp import ( ShowIpEigrpNeighbors, ShowIpv6EigrpNeighbors, ShowIpEigrpNeighborsDetail, ShowIpv6EigrpNeighborsDetail, ) class test_show_eigrp_neighbors(unittest.TestCase): # Commands # 'show ip eigrp neighbors' # 'show ip eigrp vrf {vrf} neighbors' # 'show ipv6 eigrp neighbors' # 'show ipv6 eigrp vrf {vrf} neighbors' device = Device(name="aDevice") expected_parsed_output_1 = { "eigrp_instance": { "100": { "vrf": { "default": { "address_family": { "ipv4": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet0/2.90": { "eigrp_nbr": { "10.12.90.2": { "peer_handle": 1, "hold": 12, "uptime": "01:34:23", "srtt": 0.029, "rto": 174, "q_cnt": 0, "last_seq_number": 5, } } }, "GigabitEthernet0/3.90": { "eigrp_nbr": { "10.13.90.3": { "peer_handle": 0, "hold": 10, "uptime": "01:37:17", "srtt": 0.013, "rto": 100, "q_cnt": 0, "last_seq_number": 9, } } }, }, } } } } } } } device_output_1 = {"execute.return_value": """ show ip eigrp neighbors EIGRP-IPv4 VR(test) Address-Family Neighbors for AS(100) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 10.12.90.2 Gi0/2.90 12 01:34:23 29 174 0 5 0 10.13.90.3 Gi0/3.90 10 01:37:17 13 100 0 9 """ } expected_parsed_output_2 = { "eigrp_instance": { "": { "vrf": { "default": { "address_family": { "ipv4": { "name": "", "named_mode": False, "eigrp_interface": { "GigabitEthernet0/0": { "eigrp_nbr": { "10.1.1.9": { "peer_handle": 2, "hold": 14, "uptime": "00:02:24", "srtt": 0.206, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, "10.1.1.2": { "peer_handle": 0, "hold": 13, "uptime": "00:00:03", "srtt": 1.996, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, } } }, } } } } } } } device_output_2 = {"execute.return_value": """ Device# show ip eigrp neighbors H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 2 10.1.1.9 Gi0/0 14 00:02:24 206 5000 0 5 0 10.1.1.2 Gi0/0 13 00:00:03 1996 5000 0 5 """ } expected_parsed_output_3 = { "eigrp_instance": { "": { "vrf": { "default": { "address_family": { "ipv4": { "name": "", "named_mode": False, "eigrp_interface": { "GigabitEthernet0/0": { "eigrp_nbr": { "10.1.1.9": { "peer_handle": 2, "hold": 14, "uptime": "00:02:24", "srtt": 0.206, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, } } }, "GigabitEthernet0/1": { "eigrp_nbr": { "10.1.2.3": { "peer_handle": 1, "hold": 11, "uptime": "00:20:39", "srtt": 2.202, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, } } }, }, } } } } } } } device_output_3 = {"execute.return_value": """ Device# show ip eigrp neighbors H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 2 10.1.1.9 Gi0/0 14 00:02:24 206 5000 0 5 1 10.1.2.3 Gi0/1 11 00:20:39 2202 5000 0 5 """ } expected_parsed_output_4 = { "eigrp_instance": { "": { "vrf": { "default": { "address_family": { "ipv4": { "name": "", "named_mode": False, "eigrp_interface": { "GigabitEthernet0/0": { "eigrp_nbr": { "10.1.1.2": { "peer_handle": 0, "hold": 13, "uptime": "00:00:03", "srtt": 1.996, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, "10.1.1.9": { "peer_handle": 2, "hold": 14, "uptime": "00:02:24", "srtt": 0.206, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, } }, "GigabitEthernet0/1": { "eigrp_nbr": { "10.1.2.3": { "peer_handle": 1, "hold": 11, "uptime": "00:20:39", "srtt": 2.202, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, } } }, }, } } } } } } } device_output_4 = {"execute.return_value": """ Device# show ip eigrp neighbors H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.1.2 Gi0/0 13 00:00:03 1996 5000 0 5 2 10.1.1.9 Gi0/0 14 00:02:24 206 5000 0 5 1 10.1.2.3 Gi0/1 11 00:20:39 2202 5000 0 5 """ } expected_parsed_output_5 = { "eigrp_instance": { "": { "vrf": { "default": { "address_family": { "ipv4": { "name": "", "named_mode": False, "eigrp_interface": { "GigabitEthernet0/0": { "eigrp_nbr": { "10.1.1.2": { "peer_handle": 0, "hold": 13, "uptime": "00:00:03", "srtt": 1.996, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, "10.1.1.9": { "peer_handle": 2, "hold": 14, "uptime": "00:02:24", "srtt": 0.206, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, } }, "GigabitEthernet0/1": { "eigrp_nbr": { "10.1.2.3": { "peer_handle": 1, "hold": 11, "uptime": "00:20:39", "srtt": 2.202, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, } } }, }, } } } } } } } device_output_5 = {"execute.return_value": """ Device# show ip eigrp neighbors H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.1.2 Gi0/0 13 00:00:03 1996 5000 0 5 2 10.1.1.9 Gi0/0 14 00:02:24 206 5000 0 5 1 10.1.2.3 Gi0/1 11 00:20:39 2202 5000 0 5 """ } expected_parsed_output_6 = { "eigrp_instance": { "": { "vrf": { "default": { "address_family": { "ipv4": { "name": "", "named_mode": False, "eigrp_interface": { "Ethernet0/0": { "eigrp_nbr": { "10.1.1.2": { "peer_handle": 0, "hold": 13, "uptime": "00:00:03", "srtt": 1.996, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, "10.1.1.9": { "peer_handle": 2, "hold": 14, "uptime": "00:02:24", "srtt": 0.206, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, }, } }, "Ethernet0/1": { "eigrp_nbr": { "10.1.2.3": { "peer_handle": 1, "hold": 11, "uptime": "00:20:39", "srtt": 2.202, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, } } }, }, } } } } } } } device_output_6 = {"execute.return_value": """ Router# show ip eigrp neighbors H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.1.2 Et0/0 13 00:00:03 1996 5000 0 5 2 10.1.1.9 Et0/0 14 00:02:24 206 5000 0 5 1 10.1.2.3 Et0/1 11 00:20:39 2202 5000 0 5 """ } expected_parsed_output_7 = { "eigrp_instance": { "100": { "vrf": { "VRF1": { "address_family": { "ipv4": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet0/2.390": { "eigrp_nbr": { "10.12.90.2": { "peer_handle": 1, "hold": 14, "uptime": "01:36:33", "srtt": 0.021, "rto": 126, "q_cnt": 0, "last_seq_number": 8, } } }, "GigabitEthernet0/3.390": { "eigrp_nbr": { "10.13.90.3": { "peer_handle": 0, "hold": 14, "uptime": "01:39:27", "srtt": 0.99, "rto": 5000, "q_cnt": 0, "last_seq_number": 11, } } }, }, } } } } } } } device_output_7 = {"execute.return_value": """ show ip eigrp vrf VRF1 neighbors EIGRP-IPv4 VR(test) Address-Family Neighbors for AS(100) VRF(VRF1) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 10.12.90.2 Gi0/2.390 14 01:36:33 21 126 0 8 0 10.13.90.3 Gi0/3.390 14 01:39:27 990 5000 0 11 """ } expected_parsed_output_8 = { "eigrp_instance": { "100": { "vrf": { "default": { "address_family": { "ipv6": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet0/2.90": { "eigrp_nbr": { "FE80::F816:3EFF:FE39:94CB": { "peer_handle": 1, "hold": 14, "uptime": "01:37:31", "srtt": 0.739, "rto": 4434, "q_cnt": 0, "last_seq_number": 7, } } }, "GigabitEthernet0/3.90": { "eigrp_nbr": { "FE80::5C00:80FF:FE01:7": { "peer_handle": 0, "hold": 12, "uptime": "01:40:24", "srtt": 0.993, "rto": 5000, "q_cnt": 0, "last_seq_number": 11, } } }, }, } } } } } } } device_output_8 = {"execute.return_value": """ show ipv6 eigrp neighbors EIGRP-IPv6 VR(test) Address-Family Neighbors for AS(100) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 Link-local address: Gi0/2.90 14 01:37:31 739 4434 0 7 FE80::F816:3EFF:FE39:94CB 0 Link-local address: Gi0/3.90 12 01:40:24 993 5000 0 11 FE80::5C00:80FF:FE01:7 """ } expected_parsed_output_9 = { "eigrp_instance": { "100": { "vrf": { "VRF1": { "address_family": { "ipv4": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet0/2.390": { "eigrp_nbr": { "10.12.90.2": { "peer_handle": 1, "hold": 11, "uptime": "01:38:09", "srtt": 0.021, "rto": 126, "q_cnt": 0, "last_seq_number": 8, } } }, "GigabitEthernet0/3.390": { "eigrp_nbr": { "10.13.90.3": { "peer_handle": 0, "hold": 12, "uptime": "01:41:03", "srtt": 0.99, "rto": 5000, "q_cnt": 0, "last_seq_number": 11, } } }, }, } } } } } } } device_output_9 = {"execute.return_value": """ show ip eigrp vrf VRF1 neighbors EIGRP-IPv4 VR(test) Address-Family Neighbors for AS(100) VRF(VRF1) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 10.12.90.2 Gi0/2.390 11 01:38:09 21 126 0 8 0 10.13.90.3 Gi0/3.390 12 01:41:03 990 5000 0 11 Gi3.390 10 2d10h 5 100 0 9 """ } expected_parsed_output_10 = { "eigrp_instance": { "100": { "vrf": { "default": { "address_family": { "ipv4": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet2.90": { "eigrp_nbr": { "10.12.90.2": { "peer_handle": 1, "hold": 13, "uptime": "2d10h", "srtt": 1.283, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, } } }, "GigabitEthernet3.90": { "eigrp_nbr": { "10.13.90.3": { "peer_handle": 0, "hold": 11, "uptime": "2d10h", "srtt": 0.006, "rto": 100, "q_cnt": 0, "last_seq_number": 9, } } }, }, } } } } } } } device_output_10 = {"execute.return_value": """ # show ip eigrp neighbors EIGRP-IPv4 VR(test) Address-Family Neighbors for AS(100) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 10.12.90.2 Gi2.90 13 2d10h 1283 5000 0 5 0 10.13.90.3 Gi3.90 11 2d10h 6 100 0 9 """ } device_output_empty = {"execute.return_value": ""} def test_show_eigrp_neighbors_1(self): self.maxDiff = None self.device = Mock(**self.device_output_1) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_1) def test_show_eigrp_neighbors_2(self): self.maxDiff = None self.device = Mock(**self.device_output_2) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_2) def test_show_eigrp_neighbors_3(self): self.maxDiff = None self.device = Mock(**self.device_output_3) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_3) def test_show_eigrp_neighbors_4(self): self.maxDiff = None self.device = Mock(**self.device_output_4) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_4) def test_show_eigrp_neighbors_5(self): self.maxDiff = None self.device = Mock(**self.device_output_5) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_5) def test_show_eigrp_neighbors_6(self): self.maxDiff = None self.device = Mock(**self.device_output_6) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_6) def test_show_eigrp_neighbors_7(self): self.maxDiff = None self.device = Mock(**self.device_output_7) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_7) def test_show_eigrp_neighbors_8(self): self.maxDiff = None self.device = Mock(**self.device_output_8) obj = ShowIpv6EigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_8) def test_show_eigrp_neighbors_9(self): self.maxDiff = None self.device = Mock(**self.device_output_9) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_9) def test_show_eigrp_neighbors_10(self): self.maxDiff = None self.device = Mock(**self.device_output_10) obj = ShowIpEigrpNeighbors(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_10) def test_show_eigrp_neighbors_empty(self): self.maxDiff = None self.device = Mock(**self.device_output_empty) obj = ShowIpEigrpNeighbors(device=self.device) with self.assertRaises(SchemaEmptyParserError): parsed_output = obj.parse() class test_show_eigrp_neighbors_detail(unittest.TestCase): # Commands: # 'show ip eigrp neighbors detail' # 'show ip eigrp vrf {vrf} neighbors detail' # 'show ipv6 eigrp neighbors detail' device = Device(name="aDevice") expected_parsed_output_1 = { "eigrp_instance": { "100": { "vrf": { "default": { "address_family": { "ipv4": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet0/2.90": { "eigrp_nbr": { "10.12.90.2": { "peer_handle": 1, "hold": 13, "uptime": "01:40:00", "srtt": 29.0, "rto": 174, "q_cnt": 0, "last_seq_number": 5, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 3, "os_minorver": 3, "tlv_majorrev": 2, "tlv_minorrev": 0, }, "retransmit_count": 1, "retry_count": 0, "prefixes": 3, "topology_ids_from_peer": 0, } } }, "GigabitEthernet0/3.90": { "eigrp_nbr": { "10.13.90.3": { "peer_handle": 0, "hold": 12, "uptime": "01:42:54", "srtt": 13.0, "rto": 100, "q_cnt": 0, "last_seq_number": 9, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 8, "os_minorver": 0, "tlv_majorrev": 1, "tlv_minorrev": 2, }, "retransmit_count": 1, "retry_count": 0, "prefixes": 3, "topology_ids_from_peer": 0, } } }, }, } } } } } } } device_output_1 = {"execute.return_value": """ show ip eigrp neighbors detail EIGRP-IPv4 VR(test) Address-Family Neighbors for AS(100) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 10.12.90.2 Gi0/2.90 13 01:40:00 29 174 0 5 Version 3.3/2.0, Retrans: 1, Retries: 0, Prefixes: 3 Topology-ids from peer - 0 Topologies advertised to peer: base 0 10.13.90.3 Gi0/3.90 12 01:42:54 13 100 0 9 Version 8.0/1.2, Retrans: 1, Retries: 0, Prefixes: 3 Topology-ids from peer - 0 Topologies advertised to peer: base Max Nbrs: 0, Current Nbrs: 0 """ } expected_parsed_output_2 = { "eigrp_instance": { "1": { "vrf": { "default": { "address_family": { "ipv4": { "name": "foo", "named_mode": True, "eigrp_interface": { "GigabitEthernet2/0": { "eigrp_nbr": { "192.168.10.1": { "peer_handle": 0, "hold": 12, "uptime": "00:00:21", "srtt": 1600.0, "rto": 5000, "q_cnt": 0, "last_seq_number": 3, "nbr_sw_ver": { "os_majorver": 8, "os_minorver": 0, "tlv_majorrev": 2, "tlv_minorrev": 0, }, "retransmit_count": 0, "retry_count": 0, "prefixes": 1, "topology_ids_from_peer": 0, "topology_advert_to_peer": "", } } } }, } } } } } } } device_output_2 = {"execute.return_value": """ Device# show ip eigrp neighbors detail EIGRP-IPv4 VR(foo) Address-Family Neighbors for AS(1) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 192.168.10.1 Gi2/0 12 00:00:21 1600 5000 0 3 Version 8.0/2.0, Retrans: 0, Retries: 0, Prefixes: 1 Topology-ids from peer - 0 """ } expected_parsed_output_3 = { "eigrp_instance": { "1100": { "vrf": { "VRF1": { "address_family": { "ipv4": { "name": "", "named_mode": False, "eigrp_interface": { "GigabitEthernet3": { "eigrp_nbr": { "10.1.2.2": { "hold": 11, "last_seq_number": 2, "nbr_sw_ver": { "os_majorver": 23, "os_minorver": 0, "tlv_majorrev": 2, "tlv_minorrev": 0, }, "peer_handle": 0, "prefixes": 0, "q_cnt": 0, "retransmit_count": 0, "retry_count": 0, "rto": 100, "srtt": 2.0, "topology_ids_from_peer": 0, "topology_advert_to_peer": "base", "uptime": "00:01:03", } } } }, } } } } } } } device_output_3 = {"execute.return_value": """ R1#show ip eigrp vrf VRF1 neighbors detail EIGRP-IPv4 Neighbors for AS(1100) VRF(VRF1) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.2.2 Gi3 11 00:01:03 2 100 0 2 Version 23.0/2.0, Retrans: 0, Retries: 0 Topology-ids from peer - 0 Topologies advertised to peer: base Max Nbrs: 0, Current Nbrs: 0 """ } expected_parsed_output_4 = { "eigrp_instance": { "1": { "vrf": { "VRF1": { "address_family": { "ipv4": { "name": "foo", "named_mode": True, "eigrp_interface": { "GigabitEthernet3": { "eigrp_nbr": { "10.1.2.2": { "peer_handle": 0, "hold": 11, "uptime": "00:01:03", "srtt": 2.0, "rto": 100, "q_cnt": 0, "last_seq_number": 2, "nbr_sw_ver": { "os_majorver": 23, "os_minorver": 0, "tlv_majorrev": 2, "tlv_minorrev": 0, }, "retransmit_count": 0, "retry_count": 0, "prefixes": 0, "topology_ids_from_peer": 0, "topology_advert_to_peer": "base", } } } }, } } } } } } } device_output_4 = {"execute.return_value": """ R1#show ip eigrp vrf VRF1 neighbors detail EIGRP-IPv4 VR(foo) Address-Family Neighbors for AS(1) VRF(VRF1) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.2.2 Gi3 11 00:01:03 2 100 0 2 Version 23.0/2.0, Retrans: 0, Retries: 0 Topology-ids from peer - 0 Topologies advertised to peer: base Max Nbrs: 0, Current Nbrs: 0 """ } expected_parsed_output_5 = { "eigrp_instance": { "100": { "vrf": { "default": { "address_family": { "ipv6": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet0/2.90": { "eigrp_nbr": { "FE80::F816:3EFF:FE39:94CB": { "peer_handle": 1, "hold": 11, "uptime": "01:42:01", "srtt": 0.739, "rto": 4434, "q_cnt": 0, "last_seq_number": 7, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 3, "os_minorver": 3, "tlv_majorrev": 2, "tlv_minorrev": 0, }, "retransmit_count": 0, "retry_count": 0, "prefixes": 4, "topology_ids_from_peer": 0, } } }, "GigabitEthernet0/3.90": { "eigrp_nbr": { "FE80::5C00:80FF:FE01:7": { "peer_handle": 0, "hold": 11, "uptime": "01:44:53", "srtt": 0.993, "rto": 5000, "q_cnt": 0, "last_seq_number": 11, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 8, "os_minorver": 0, "tlv_majorrev": 1, "tlv_minorrev": 2, }, "retransmit_count": 0, "retry_count": 0, "prefixes": 4, "topology_ids_from_peer": 0, } } }, }, } } } } } } } device_output_5 = {"execute.return_value": """ #show ipv6 eigrp neighbors detail EIGRP-IPv6 VR(test) Address-Family Neighbors for AS(100) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 Link-local address: Gi0/2.90 11 01:42:01 739 4434 0 7 FE80::F816:3EFF:FE39:94CB Version 3.3/2.0, Retrans: 0, Retries: 0, Prefixes: 4 Topology-ids from peer - 0 Topologies advertised to peer: base 0 Link-local address: Gi0/3.90 11 01:44:53 993 5000 0 11 FE80::5C00:80FF:FE01:7 Version 8.0/1.2, Retrans: 0, Retries: 0, Prefixes: 4 Topology-ids from peer - 0 Topologies advertised to peer: base Max Nbrs: 0, Current Nbrs: 0 """ } expected_parsed_output_6 = { "eigrp_instance": { "100": { "vrf": { "default": { "address_family": { "ipv4": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet2.90": { "eigrp_nbr": { "10.12.90.2": { "peer_handle": 1, "hold": 12, "uptime": "2d10h", "srtt": 1283.0, "rto": 5000, "q_cnt": 0, "last_seq_number": 5, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 3, "os_minorver": 3, "tlv_majorrev": 2, "tlv_minorrev": 0, }, "retransmit_count": 0, "retry_count": 0, "prefixes": 3, "topology_ids_from_peer": 0, } } }, "GigabitEthernet3.90": { "eigrp_nbr": { "10.13.90.3": { "peer_handle": 0, "hold": 10, "uptime": "2d10h", "srtt": 6.0, "rto": 100, "q_cnt": 0, "last_seq_number": 9, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 8, "os_minorver": 0, "tlv_majorrev": 1, "tlv_minorrev": 2, }, "retransmit_count": 1, "retry_count": 0, "prefixes": 3, "topology_ids_from_peer": 0, } } }, }, } } } } } } } device_output_6 = {"execute.return_value": """ #show ip eigrp neighbors detail EIGRP-IPv4 VR(test) Address-Family Neighbors for AS(100) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 10.12.90.2 Gi2.90 12 2d10h 1283 5000 0 5 Version 3.3/2.0, Retrans: 0, Retries: 0, Prefixes: 3 Topology-ids from peer - 0 Topologies advertised to peer: base 0 10.13.90.3 Gi3.90 10 2d10h 6 100 0 9 Version 8.0/1.2, Retrans: 1, Retries: 0, Prefixes: 3 Topology-ids from peer - 0 Topologies advertised to peer: base Max Nbrs: 0, Current Nbrs: 0 """ } expected_parsed_output_7 = { "eigrp_instance": { "100": { "vrf": { "default": { "address_family": {"ipv4": {"name": "test", "named_mode": True}} }, "VRF1": { "address_family": { "ipv4": { "name": "test", "named_mode": True, "eigrp_interface": { "GigabitEthernet0/2.390": { "eigrp_nbr": { "10.12.90.2": { "peer_handle": 1, "hold": 14, "uptime": "1d17h", "srtt": 21.0, "rto": 126, "q_cnt": 0, "last_seq_number": 8, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 3, "os_minorver": 3, "tlv_majorrev": 2, "tlv_minorrev": 0, }, "retransmit_count": 3, "retry_count": 0, "prefixes": 3, "topology_ids_from_peer": 0, } } }, "GigabitEthernet0/3.390": { "eigrp_nbr": { "10.13.90.3": { "peer_handle": 0, "hold": 13, "uptime": "1d17h", "srtt": 990.0, "rto": 5000, "q_cnt": 0, "last_seq_number": 11, "topology_advert_to_peer": "base", "nbr_sw_ver": { "os_majorver": 8, "os_minorver": 0, "tlv_majorrev": 1, "tlv_minorrev": 2, }, "retransmit_count": 0, "retry_count": 0, "prefixes": 3, "topology_ids_from_peer": 0, } } }, }, } } }, } } } } device_output_7 = {"execute.return_value": """ show ip eigrp vrf VRF1 neighbors detail EIGRP-IPv4 VR(test) Address-Family Neighbors for AS(100) VRF(VRF1) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 10.12.90.2 Gi0/2.390 14 1d17h 21 126 0 8 Version 3.3/2.0, Retrans: 3, Retries: 0, Prefixes: 3 Topology-ids from peer - 0 Topologies advertised to peer: base 0 10.13.90.3 Gi0/3.390 13 1d17h 990 5000 0 11 Version 8.0/1.2, Retrans: 0, Retries: 0, Prefixes: 3 Topology-ids from peer - 0 Topologies advertised to peer: base Max Nbrs: 0, Current Nbrs: 0 """} device_output_empty = {"execute.return_value": ""} def test_show_eigrp_neighbors_detail_1(self): self.maxDiff = None self.device = Mock(**self.device_output_1) obj = ShowIpEigrpNeighborsDetail(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_1) def test_show_eigrp_neighbors_detail_2(self): self.maxDiff = None self.device = Mock(**self.device_output_2) obj = ShowIpEigrpNeighborsDetail(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_2) def test_show_eigrp_neighbors_detail_3(self): self.maxDiff = None self.device = Mock(**self.device_output_3) obj = ShowIpEigrpNeighborsDetail(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_3) def test_show_eigrp_neighbors_detail_4(self): self.maxDiff = None self.device = Mock(**self.device_output_4) obj = ShowIpEigrpNeighborsDetail(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_4) def test_show_eigrp_neighbors_detail_5(self): self.maxDiff = None self.device = Mock(**self.device_output_5) obj = ShowIpv6EigrpNeighborsDetail(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_5) def test_show_eigrp_neighbors_detail_6(self): self.maxDiff = None self.device = Mock(**self.device_output_6) obj = ShowIpEigrpNeighborsDetail(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.expected_parsed_output_6) def test_show_eigrp_neighbors_detail_7(self): self.maxDiff = None self.device = Mock(**self.device_output_7) obj = ShowIpEigrpNeighborsDetail(device=self.device) parsed_output = obj.parse(vrf='VRF1') self.assertEqual(parsed_output, self.expected_parsed_output_7) def test_show_eigrp_neighbors_detail_empty(self): self.maxDiff = None self.device = Mock(**self.device_output_empty) obj = ShowIpEigrpNeighborsDetail(device=self.device) with self.assertRaises(SchemaEmptyParserError): parsed_output = obj.parse() if __name__ == "__main__": unittest.main()
46.04321
91
0.269909
3,814
59,672
4.032774
0.052438
0.054613
0.04421
0.01931
0.932709
0.917236
0.893505
0.874846
0.87049
0.841233
0
0.109864
0.655115
59,672
1,295
92
46.078764
0.637512
0.010021
0
0.675699
0
0.022015
0.266722
0.016646
0
0
0
0
0.016088
1
0.016088
false
0
0.004234
0
0.054191
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
a74abd81d19e87863a94433eb9421323096cbd51
1,214
py
Python
Training/Bigram/addstartstop.py
rsainaveen/Natural-language-processing
e189a04ba1a31acd8b81b65edee7d4bd962ca2b9
[ "Apache-2.0" ]
null
null
null
Training/Bigram/addstartstop.py
rsainaveen/Natural-language-processing
e189a04ba1a31acd8b81b65edee7d4bd962ca2b9
[ "Apache-2.0" ]
null
null
null
Training/Bigram/addstartstop.py
rsainaveen/Natural-language-processing
e189a04ba1a31acd8b81b65edee7d4bd962ca2b9
[ "Apache-2.0" ]
null
null
null
def add_start_stop(input_file): data_file = open(input_file, "r") output = open("data_with_startstop.txt","w") for line in data_file: words_in_line = line.split(); START_OF_REVIEW = 1; for word in words_in_line: if (word == '+' or word == '-') and START_OF_REVIEW == 1: output.write(word + " START") START_OF_REVIEW = 0 continue output.write(" " + word.lower()) output.write(" STOP\n") data_file.close() output.close() #print("START and STOP added to data") return def add_start_stop2(input_file): data_file = open(input_file, "r") output = open("test_with_startstop.txt","w") for line in data_file: words_in_line = line.split(); START_OF_REVIEW = 1; for word in words_in_line: if (word == '+' or word == '-') and START_OF_REVIEW == 1: output.write(word + " START") START_OF_REVIEW = 0 continue output.write(" " + word.lower()) output.write(" STOP\n") data_file.close() output.close() #print("START and STOP added to test") return
22.481481
69
0.547776
156
1,214
4.019231
0.24359
0.076555
0.124402
0.089314
0.905901
0.905901
0.905901
0.905901
0.905901
0.905901
0
0.008589
0.328666
1,214
53
70
22.90566
0.760736
0.060956
0
0.875
0
0
0.072056
0.040422
0
0
0
0
0
1
0.0625
false
0
0
0
0.125
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
a76b06544ed17b68d6176e653285e1ebf6b7b2c2
42
py
Python
run.py
PedroFagundes/whatsapp-driver
ccfdc6ad680c8fa7ee77d58c97f1d64283d3dec6
[ "MIT" ]
null
null
null
run.py
PedroFagundes/whatsapp-driver
ccfdc6ad680c8fa7ee77d58c97f1d64283d3dec6
[ "MIT" ]
null
null
null
run.py
PedroFagundes/whatsapp-driver
ccfdc6ad680c8fa7ee77d58c97f1d64283d3dec6
[ "MIT" ]
null
null
null
from sample import log_all_1 log_all_1()
10.5
28
0.809524
9
42
3.333333
0.666667
0.4
0.466667
0
0
0
0
0
0
0
0
0.055556
0.142857
42
3
29
14
0.777778
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
a7c6c72701818e82cb9a8d4e39267d8341d5a84d
129
py
Python
CTFd/utils/security/csrf.py
monpremierctf/CTFd
f1d6c4952094be8ea202aa9635b9771147c868fa
[ "Apache-2.0" ]
3
2020-05-13T14:02:11.000Z
2022-03-12T08:09:34.000Z
CTFd/utils/security/csrf.py
monpremierctf/CTFd
f1d6c4952094be8ea202aa9635b9771147c868fa
[ "Apache-2.0" ]
6
2019-01-26T15:06:07.000Z
2019-02-11T01:48:20.000Z
CTFd/utils/security/csrf.py
monpremierctf/CTFd
f1d6c4952094be8ea202aa9635b9771147c868fa
[ "Apache-2.0" ]
4
2019-08-01T02:16:44.000Z
2022-03-12T08:09:35.000Z
from CTFd.utils.encoding import hexencode import os def generate_nonce(): return hexencode(os.urandom(32)).decode('utf-8')
18.428571
52
0.751938
19
129
5.052632
0.842105
0
0
0
0
0
0
0
0
0
0
0.026549
0.124031
129
6
53
21.5
0.823009
0
0
0
1
0
0.03876
0
0
0
0
0
0
1
0.25
true
0
0.5
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
8
38f252de52fe1154ef9d8963636022123043b6f2
119
bzl
Python
defs.bzl
Vertexwahn/depend_on_what_you_use
480732677a74fb7033848004d4d5015af0ad36c5
[ "MIT" ]
null
null
null
defs.bzl
Vertexwahn/depend_on_what_you_use
480732677a74fb7033848004d4d5015af0ad36c5
[ "MIT" ]
null
null
null
defs.bzl
Vertexwahn/depend_on_what_you_use
480732677a74fb7033848004d4d5015af0ad36c5
[ "MIT" ]
null
null
null
load("//aspect:factory.bzl", _dwyu_aspect_factory = "dwyu_aspect_factory") dwyu_aspect_factory = _dwyu_aspect_factory
29.75
74
0.823529
16
119
5.5
0.3125
0.738636
0.772727
0.715909
0.772727
0.772727
0.772727
0.772727
0.772727
0
0
0
0.067227
119
3
75
39.666667
0.792793
0
0
0
0
0
0.327731
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
ac06a70545a844e36701c1dc5d2e72493a001444
402
py
Python
scripts/utils.py
kwand/university-setup
acb6e191fe6b6dbd8c087f03d70cb5bf1d84cfc4
[ "MIT" ]
245
2019-09-15T19:17:47.000Z
2022-03-29T06:09:52.000Z
scripts/utils.py
SalmonA/latex-notes
4f05e4cf7c830341671eba2357a482132c3176c0
[ "MIT" ]
9
2019-12-24T20:02:52.000Z
2020-11-24T12:25:02.000Z
scripts/utils.py
SalmonA/latex-notes
4f05e4cf7c830341671eba2357a482132c3176c0
[ "MIT" ]
76
2019-09-16T00:10:24.000Z
2022-02-19T01:27:48.000Z
def beautify(string): return string.replace('_', ' ').replace('-', ' ').title() def unbeautify(string): return string.replace(' ', '-').lower() MAX_LEN = 40 def generate_short_title(title): short_title = title or 'Untitled' if len(title) >= MAX_LEN: short_title = title[:MAX_LEN - len(' ... ')] + ' ... ' short_title = short_title.replace('$', '') return short_title
26.8
62
0.606965
47
402
4.957447
0.340426
0.257511
0.193133
0.214592
0
0
0
0
0
0
0
0.006211
0.199005
402
14
63
28.714286
0.717391
0
0
0
1
0
0.062344
0
0
0
0
0
0
1
0.272727
false
0
0
0.181818
0.545455
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
ac129d4d44c3e9b2e85d24ac9b68b1856365f054
10,191
py
Python
yandex/cloud/mdb/kafka/v1/topic_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/mdb/kafka/v1/topic_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/mdb/kafka/v1/topic_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from yandex.cloud.mdb.kafka.v1 import topic_pb2 as yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__pb2 from yandex.cloud.mdb.kafka.v1 import topic_service_pb2 as yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2 from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2 class TopicServiceStub(object): """A set of methods for managing Kafka topics. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.Get = channel.unary_unary( '/yandex.cloud.mdb.kafka.v1.TopicService/Get', request_serializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.GetTopicRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__pb2.Topic.FromString, ) self.List = channel.unary_unary( '/yandex.cloud.mdb.kafka.v1.TopicService/List', request_serializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.ListTopicsRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.ListTopicsResponse.FromString, ) self.Create = channel.unary_unary( '/yandex.cloud.mdb.kafka.v1.TopicService/Create', request_serializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.CreateTopicRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.Update = channel.unary_unary( '/yandex.cloud.mdb.kafka.v1.TopicService/Update', request_serializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.UpdateTopicRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.Delete = channel.unary_unary( '/yandex.cloud.mdb.kafka.v1.TopicService/Delete', request_serializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.DeleteTopicRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) class TopicServiceServicer(object): """A set of methods for managing Kafka topics. """ def Get(self, request, context): """Returns the specified Kafka topic. To get the list of available Kafka topics, make a [List] request. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def List(self, request, context): """Retrieves the list of Kafka topics in the specified cluster. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Create(self, request, context): """Creates a new Kafka topic in the specified cluster. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Update(self, request, context): """Updates the specified Kafka topic. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Delete(self, request, context): """Deletes the specified Kafka topic. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_TopicServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'Get': grpc.unary_unary_rpc_method_handler( servicer.Get, request_deserializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.GetTopicRequest.FromString, response_serializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__pb2.Topic.SerializeToString, ), 'List': grpc.unary_unary_rpc_method_handler( servicer.List, request_deserializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.ListTopicsRequest.FromString, response_serializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.ListTopicsResponse.SerializeToString, ), 'Create': grpc.unary_unary_rpc_method_handler( servicer.Create, request_deserializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.CreateTopicRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'Update': grpc.unary_unary_rpc_method_handler( servicer.Update, request_deserializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.UpdateTopicRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'Delete': grpc.unary_unary_rpc_method_handler( servicer.Delete, request_deserializer=yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.DeleteTopicRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'yandex.cloud.mdb.kafka.v1.TopicService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class TopicService(object): """A set of methods for managing Kafka topics. """ @staticmethod def Get(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.mdb.kafka.v1.TopicService/Get', yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.GetTopicRequest.SerializeToString, yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__pb2.Topic.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def List(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.mdb.kafka.v1.TopicService/List', yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.ListTopicsRequest.SerializeToString, yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.ListTopicsResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Create(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.mdb.kafka.v1.TopicService/Create', yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.CreateTopicRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Update(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.mdb.kafka.v1.TopicService/Update', yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.UpdateTopicRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Delete(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.mdb.kafka.v1.TopicService/Delete', yandex_dot_cloud_dot_mdb_dot_kafka_dot_v1_dot_topic__service__pb2.DeleteTopicRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
48.298578
143
0.696791
1,121
10,191
5.873327
0.102587
0.045109
0.07017
0.085207
0.863001
0.863001
0.85723
0.820778
0.803615
0.759417
0
0.009233
0.234815
10,191
210
144
48.528571
0.835086
0.068492
0
0.542683
1
0
0.079051
0.05192
0
0
0
0
0
1
0.073171
false
0
0.02439
0.030488
0.146341
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ac161001fba561fd357e8952c344aa9cfc675302
107
py
Python
writeprints/__init__.py
shaoormunir/writeprints
ff051a3da2da3e8d68311f1dea1493450724ae8e
[ "MIT" ]
5
2020-07-12T20:14:00.000Z
2021-05-16T17:52:59.000Z
writeprints/__init__.py
shaoormunir/writeprints
ff051a3da2da3e8d68311f1dea1493450724ae8e
[ "MIT" ]
2
2020-11-03T19:00:57.000Z
2021-03-23T04:14:04.000Z
writeprints/__init__.py
shaoormunir/writeprints
ff051a3da2da3e8d68311f1dea1493450724ae8e
[ "MIT" ]
null
null
null
from writeprints.feature_extractor import FeatureExtractor from writeprints.text_processor import Processor
53.5
58
0.915888
12
107
8
0.666667
0.3125
0
0
0
0
0
0
0
0
0
0
0.065421
107
2
59
53.5
0.96
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
1
0
7
ac2884b88b74d26f8e6aa965c69eb9e97bfcaf65
7,310
py
Python
tests/test_warnings.py
melexis/warnings-plugin
6f821f5c82c2cdf37988d28e651646e1452faf43
[ "Apache-2.0" ]
7
2017-04-21T12:05:23.000Z
2019-12-12T13:37:07.000Z
tests/test_warnings.py
melexis/warnings-plugin
6f821f5c82c2cdf37988d28e651646e1452faf43
[ "Apache-2.0" ]
100
2017-04-24T10:50:33.000Z
2022-02-18T10:39:42.000Z
tests/test_warnings.py
melexis/warnings-plugin
6f821f5c82c2cdf37988d28e651646e1452faf43
[ "Apache-2.0" ]
2
2017-05-23T11:50:59.000Z
2019-11-06T09:26:33.000Z
from io import StringIO from unittest import TestCase from unittest.mock import patch from mlx.warnings import WarningsPlugin class TestWarningsPlugin(TestCase): def test_doxygen_warning(self): warnings = WarningsPlugin() warnings.activate_checker_name('doxygen') warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 1) def test_sphinx_warning(self): warnings = WarningsPlugin() warnings.activate_checker_name('sphinx') warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 1) def test_junit_warning(self): warnings = WarningsPlugin() warnings.activate_checker_name('junit') with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 1) def test_doxygen_warning_only(self): warnings = WarningsPlugin() warnings.activate_checker_name('doxygen') warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 1) warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 1) with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 1) warnings.check('This should not be treated as warning2') self.assertEqual(warnings.return_count(), 1) def test_sphinx_warning_only(self): warnings = WarningsPlugin() warnings.activate_checker_name('sphinx') warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 1) warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 1) with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 1) warnings.check('This should not be treated as warning2') self.assertEqual(warnings.return_count(), 1) def test_junit_warning_only(self): warnings = WarningsPlugin() warnings.activate_checker_name('junit') with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 1) warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 1) warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 1) warnings.check('This should not be treated as warning2') self.assertEqual(warnings.return_count(), 1) def test_doxy_sphinx_warning(self): warnings = WarningsPlugin() warnings.activate_checker_name('sphinx') warnings.activate_checker_name('doxygen') warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 1) warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 2) with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 2) warnings.check('This should not be treated as warning2') self.assertEqual(warnings.return_count(), 2) def test_doxy_junit_warning(self): warnings = WarningsPlugin() warnings.activate_checker_name('doxygen') warnings.activate_checker_name('junit') warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 1) warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 1) with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 2) warnings.check('This should not be treated as warning2') self.assertEqual(warnings.return_count(), 2) def test_sphinx_junit_warning(self): warnings = WarningsPlugin() warnings.activate_checker_name('sphinx') warnings.activate_checker_name('junit') warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 0) warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 1) with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 2) warnings.check('This should not be treated as warning2') self.assertEqual(warnings.return_count(), 2) def test_all_warning(self): warnings = WarningsPlugin() warnings.activate_checker_name('sphinx') warnings.activate_checker_name('doxygen') warnings.activate_checker_name('junit') warnings.check('testfile.c:6: warning: group test: ignoring title "Some test functions" that does not match old title "Some freaky test functions"') self.assertEqual(warnings.return_count(), 1) warnings.check("/home/bljah/test/index.rst:5: WARNING: toctree contains reference to nonexisting document u'installation'") self.assertEqual(warnings.return_count(), 2) with open('tests/test_in/junit_single_fail.xml') as xmlfile: warnings.check(xmlfile.read()) self.assertEqual(warnings.return_count(), 3) warnings.check('This should not be treated as warning2') self.assertEqual(warnings.return_count(), 3) def test_non_existent_checker_name(self): warnings = WarningsPlugin() invalid_checker_name = 'non-existent' with patch('sys.stdout', new=StringIO()) as fake_out: warnings.activate_checker_name(invalid_checker_name) self.assertIn("Checker {} does not exist".format(invalid_checker_name), fake_out.getvalue())
55.801527
156
0.706566
904
7,310
5.575221
0.097345
0.07996
0.141468
0.178373
0.917659
0.917659
0.917262
0.917262
0.915873
0.910119
0
0.009094
0.187688
7,310
130
157
56.230769
0.839677
0
0
0.818966
0
0.137931
0.350616
0.070041
0
0
0
0
0.275862
1
0.094828
false
0
0.034483
0
0.137931
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
3bd72b68e99f6c9bbbff668e88322d3b44a029c2
3,042
py
Python
openpnm/models/geometry/throat_surface_area.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
1
2021-05-01T11:10:43.000Z
2021-05-01T11:10:43.000Z
openpnm/models/geometry/throat_surface_area.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
null
null
null
openpnm/models/geometry/throat_surface_area.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
null
null
null
r""" """ import numpy as _np def cylinder(target, throat_diameter='throat.diameter', throat_length='throat.length'): r""" Calculate surface area for a cylindrical throat Parameters ---------- target : OpenPNM Object The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties. throat_diameter : string Dictionary key to the throat diameter array. Default is 'throat.diameter'. throat_length : string Dictionary key to the throat length array. Default is 'throat.length'. Returns ------- value : NumPy ndarray Array containing throat surface area values. """ return _np.pi * target[throat_diameter] * target[throat_length] def cuboid(target, throat_diameter='throat.diameter', throat_length='throat.length'): r""" Calculate surface area for a cuboid throat Parameters ---------- target : OpenPNM Object The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties. throat_diameter : string Dictionary key to the throat diameter array. Default is 'throat.diameter'. throat_length : string Dictionary key to the throat length array. Default is 'throat.length'. Returns ------- value : NumPy ndarray Array containing throat surface area values. """ return 4 * target[throat_diameter] * target[throat_length] def extrusion(target, throat_perimeter='throat.perimeter', throat_length='throat.length'): r""" Calculate surface area for an arbitrary shaped throat give the perimeter and length. Parameters ---------- target : OpenPNM Object The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties. throat_perimeter : string Dictionary key to the throat perimeter array. Default is 'throat.perimeter'. throat_length : string Dictionary key to the throat length array. Default is 'throat.length'. Returns ------- value : NumPy ndarray Array containing throat surface area values. """ return target[throat_perimeter] * target[throat_length] def rectangle(target, throat_length='throat.length'): r""" Calculate surface area for a rectangular throat Only suitable for true 2D simulations Parameters ---------- target : OpenPNM Object The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties. throat_length : string Dictionary key to the throat length array. Default is 'throat.length'. """ return 2 * target[throat_length]
27.908257
79
0.666009
358
3,042
5.594972
0.184358
0.143784
0.0664
0.07339
0.837244
0.837244
0.822267
0.781328
0.781328
0.757364
0
0.001333
0.260355
3,042
108
80
28.166667
0.888889
0.693951
0
0.176471
0
0
0.153365
0
0
0
0
0
0
1
0.235294
false
0
0.058824
0
0.529412
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
8
ce34ce5754e7783ef15aabe39754dff1c50e1e0d
7,917
py
Python
samples/roles/role.py
zoho/zohocrm-python-sdk-2.0
3a93eb3b57fed4e08f26bd5b311e101cb2995411
[ "Apache-2.0" ]
null
null
null
samples/roles/role.py
zoho/zohocrm-python-sdk-2.0
3a93eb3b57fed4e08f26bd5b311e101cb2995411
[ "Apache-2.0" ]
null
null
null
samples/roles/role.py
zoho/zohocrm-python-sdk-2.0
3a93eb3b57fed4e08f26bd5b311e101cb2995411
[ "Apache-2.0" ]
null
null
null
from zcrmsdk.src.com.zoho.crm.api.roles import * class Role(object): @staticmethod def get_roles(): """ This method is used to retrieve the data of roles through an API request and print the response. """ # Get instance of RolesOperations Class roles_operations = RolesOperations() # Call get_roles method response = roles_operations.get_roles() if response is not None: # Get the status code from response print('Status Code: ' + str(response.get_status_code())) if response.get_status_code() in [204, 304]: print('No Content' if response.get_status_code() == 204 else 'Not Modified') return # Get object from response response_object = response.get_object() if response_object is not None: # Check if expected ResponseWrapper instance is received. if isinstance(response_object, ResponseWrapper): # Get the list of obtained Role instances roles_list = response_object.get_roles() for role in roles_list: # Get the DisplayLabel of each Role print("Role DisplayLabel: " + str(role.get_display_label())) # Get the forecastManager User instance of each Role forecast_manager = role.get_forecast_manager() # Check if forecastManager is not None if forecast_manager is not None: # Get the ID of the forecast Manager print("Role Forecast Manager User-ID: " + str(forecast_manager.get_id())) # Get the name of the forecast Manager print("Role Forecast Manager User-Name: " + str(forecast_manager.get_name())) # Get the ShareWithPeers of each Role print("Role ShareWithPeers: " + str(role.get_share_with_peers())) # Get the Name of each Role print("Role Name: " + role.get_name()) # Get the Description of each Role print("Role Description: " + str(role.get_description())) # Get the Id of each Role print("Role ID: " + str(role.get_id())) # Get the reporting_to User instance of each Role reporting_to = role.get_reporting_to() # Check if reporting_to is not None if reporting_to is not None: # Get the ID of the reporting_to User print("Role ReportingTo User-ID: " + str(reporting_to.get_id())) # Get the name of the reporting_to User print("Role ReportingTo User-Name: " + str(reporting_to.get_name())) # Get the AdminUser of each Role print("Role AdminUser: " + str(role.get_admin_user())) # Check if the request returned an exception elif isinstance(response_object, APIException): # Get the Status print("Status: " + response_object.get_status().get_value()) # Get the Code print("Code: " + response_object.get_code().get_value()) print("Details") # Get the details dict details = response_object.get_details() for key, value in details.items(): print(key + ' : ' + str(value)) # Get the Message print("Message: " + response_object.get_message().get_value()) @staticmethod def get_role(role_id): """ This method is used to retrieve the data of single role with ID and print the response. :param role_id: The ID of the role to be obtained """ """ example role_id = 3409643000000026005 """ # Get instance of RolesOperations Class roles_operations = RolesOperations() # Call get_role method that takes role_id as parameter response = roles_operations.get_role(role_id) if response is not None: # Get the status code from response print('Status Code: ' + str(response.get_status_code())) if response.get_status_code() in [204, 304]: print('No Content' if response.get_status_code() == 204 else 'Not Modified') return # Get object from response response_object = response.get_object() if response_object is not None: # Check if expected ResponseWrapper instance is received. if isinstance(response_object, ResponseWrapper): # Get the list of obtained Role instances roles_list = response_object.get_roles() for role in roles_list: # Get the DisplayLabel of each Role print("Role DisplayLabel: " + role.get_display_label()) # Get the forecastManager User instance of each Role forecast_manager = role.get_forecast_manager() # Check if forecastManager is not None if forecast_manager is not None: # Get the ID of the forecast Manager print("Role Forecast Manager User-ID: " + str(forecast_manager.get_id())) # Get the name of the forecast Manager print("Role Forecast Manager User-Name: " + forecast_manager.get_name()) # Get the ShareWithPeers of each Role print("Role ShareWithPeers: " + str(role.get_share_with_peers())) # Get the Name of each Role print("Role Name: " + role.get_name()) # Get the Description of each Role print("Role Description: " + role.get_description()) # Get the Id of each Role print("Role ID: " + str(role.get_id())) # Get the reporting_to User instance of each Role reporting_to = role.get_reporting_to() # Check if reporting_to is not None if reporting_to is not None: # Get the ID of the reporting_to User print("Role ReportingTo User-ID: " + str(reporting_to.get_id())) # Get the name of the reporting_to User print("Role ReportingTo User-Name: " + reporting_to.get_name()) # Get the AdminUser of each Role print("Role AdminUser: " + str(role.get_admin_user())) # Check if the request returned an exception elif isinstance(response_object, APIException): # Get the Status print("Status: " + response_object.get_status().get_value()) # Get the Code print("Code: " + response_object.get_code().get_value()) print("Details") # Get the details dict details = response_object.get_details() for key, value in details.items(): print(key + ' : ' + str(value)) # Get the Message print("Message: " + response_object.get_message().get_value())
39.585
105
0.516357
826
7,917
4.7954
0.115012
0.054532
0.040394
0.045443
0.904822
0.904822
0.904822
0.904822
0.904822
0.88715
0
0.007969
0.41354
7,917
199
106
39.78392
0.845143
0.241506
0
0.810811
0
0
0.096022
0
0
0
0
0
0
1
0.027027
false
0
0.013514
0
0.081081
0.459459
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
8
026001a204969e2536d86cf2c6eb9d2b3025f768
40
py
Python
data_analysis/test.py
Bermuhz/DataMiningCompetitionFirstPrize
e0202ceeb99fc6cb869906fd8e7cc79a173a315e
[ "MIT" ]
128
2017-03-20T12:42:38.000Z
2022-03-12T07:06:55.000Z
data_analysis/test.py
Bermuhz/DataMiningCompetitionFirstPrize
e0202ceeb99fc6cb869906fd8e7cc79a173a315e
[ "MIT" ]
4
2017-03-18T04:37:36.000Z
2017-07-09T14:11:18.000Z
data_analysis/test.py
Bermuhz/DataMiningCompetitionFirstPrize
e0202ceeb99fc6cb869906fd8e7cc79a173a315e
[ "MIT" ]
77
2017-03-19T06:49:39.000Z
2022-03-12T07:06:56.000Z
test="2003/03/4" print test.split("/",2)
20
23
0.65
8
40
3.25
0.875
0
0
0
0
0
0
0
0
0
0
0.210526
0.05
40
2
23
20
0.473684
0
0
0
0
0
0.243902
0
0
0
0
0
0
0
null
null
0
0
null
null
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
7
65fa91ec5143d368a6553e72aa8f2b9554f5e7eb
151
py
Python
pyisic/_standards/skd2002/__init__.py
sayari-analytics/pyisic
42ed46f5bc446a0bbc0edf30b64bc4ab939dd033
[ "MIT" ]
3
2021-11-18T15:32:38.000Z
2022-02-28T19:16:14.000Z
pyisic/_standards/skd2002/__init__.py
sayari-analytics/pyisic
42ed46f5bc446a0bbc0edf30b64bc4ab939dd033
[ "MIT" ]
18
2021-06-28T19:17:49.000Z
2022-03-23T20:20:18.000Z
pyisic/_standards/skd2002/__init__.py
sayari-analytics/pyisic
42ed46f5bc446a0bbc0edf30b64bc4ab939dd033
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .skd2002 import SKD2002 from .skd2002_to_nace2 import SKD2002_to_NACE2 from .skd2002_to_skd2008 import SKD2002_to_SKD2008
30.2
50
0.807947
23
151
4.956522
0.391304
0.315789
0.22807
0
0
0
0
0
0
0
0
0.261194
0.112583
151
4
51
37.75
0.589552
0.139073
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
5a095e823fbb92b14132cd0f5fc4d536d67e359c
13,735
py
Python
team-supp-web-server/app/ocr.py
fluxion-core-biz/hack2018
d112a5b93d951c75527f2c66dd2288dfb025ec73
[ "MIT" ]
null
null
null
team-supp-web-server/app/ocr.py
fluxion-core-biz/hack2018
d112a5b93d951c75527f2c66dd2288dfb025ec73
[ "MIT" ]
null
null
null
team-supp-web-server/app/ocr.py
fluxion-core-biz/hack2018
d112a5b93d951c75527f2c66dd2288dfb025ec73
[ "MIT" ]
null
null
null
""" """ def execute_ocr(): #TODO: Implement here # with open( './dummy_ocr_result.txt' ) as f # print( f ) # return f return '''{"orientation":"Up","regions":[{"boundingBox":"397,15,1240,57","lines":[{"boundingBox":"422,15,1215,31","words":[{"boundingBox":"422,20,26,25","text":"個"},{"boundingBox":"454,22,17,18","text":"々"},{"boundingBox":"479,22,24,21","text":"の"},{"boundingBox":"507,21,25,24","text":"処"},{"boundingBox":"539,20,19,26","text":"方"},{"boundingBox":"563,20,25,25","text":"薬"},{"boundingBox":"592,22,22,21","text":"に"},{"boundingBox":"618,25,24,17","text":"つ"},{"boundingBox":"646,25,24,18","text":"い"},{"boundingBox":"673,24,23,20","text":"て"},{"boundingBox":"701,38,6,8","text":"、"},{"boundingBox":"728,22,25,24","text":"後"},{"boundingBox":"756,21,23,25","text":"発"},{"boundingBox":"783,23,22,23","text":"医"},{"boundingBox":"809,21,24,24","text":"薬"},{"boundingBox":"836,22,23,23","text":"品"},{"boundingBox":"877,21,8,24","text":"("},{"boundingBox":"891,20,21,24","text":"ジ"},{"boundingBox":"918,29,20,13","text":"ェ"},{"boundingBox":"944,21,21,24","text":"ネ"},{"boundingBox":"974,22,13,22","text":"リ"},{"boundingBox":"998,27,18,18","text":"ッ"},{"boundingBox":"1025,22,18,23","text":"ク"},{"boundingBox":"1049,22,23,24","text":"医"},{"boundingBox":"1075,20,23,25","text":"薬"},{"boundingBox":"1102,21,22,23","text":"品"},{"boundingBox":"1128,21,7,22","text":")"},{"boundingBox":"1153,25,23,13","text":"へ"},{"boundingBox":"1179,22,22,19","text":"の"},{"boundingBox":"1205,19,23,24","text":"変"},{"boundingBox":"1233,21,21,22","text":"史"},{"boundingBox":"1259,21,20,20","text":"に"},{"boundingBox":"1284,19,21,23","text":"差"},{"boundingBox":"1312,20,17,22","text":"し"},{"boundingBox":"1338,19,19,23","text":"攴"},{"boundingBox":"1362,20,19,21","text":"え"},{"boundingBox":"1386,18,22,22","text":"が"},{"boundingBox":"1413,18,20,22","text":"あ"},{"boundingBox":"1438,18,19,22","text":"る"},{"boundingBox":"1466,18,16,21","text":"と"},{"boundingBox":"1488,17,22,23","text":"判"},{"boundingBox":"1513,17,23,22","text":"断"},{"boundingBox":"1543,16,16,22","text":"し"},{"boundingBox":"1566,16,20,21","text":"た"},{"boundingBox":"1590,16,22,23","text":"場"},{"boundingBox":"1616,15,21,24","text":"合"}]},{"boundingBox":"397,41,1227,31","words":[{"boundingBox":"397,48,22,22","text":"に"},{"boundingBox":"425,48,25,23","text":"は"},{"boundingBox":"452,64,7,8","text":"、"},{"boundingBox":"496,46,7,22","text":"「"},{"boundingBox":"509,47,24,24","text":"変"},{"boundingBox":"538,48,23,24","text":"更"},{"boundingBox":"565,48,23,24","text":"不"},{"boundingBox":"595,48,21,24","text":"可"},{"boundingBox":"620,51,8,21","text":"」"},{"boundingBox":"646,48,25,24","text":"欄"},{"boundingBox":"676,50,21,20","text":"に"},{"boundingBox":"717,46,8,22","text":"「"},{"boundingBox":"732,52,22,16","text":"ノ"},{"boundingBox":"756,52,9,20","text":"」"},{"boundingBox":"784,48,23,23","text":"乂"},{"boundingBox":"812,48,23,22","text":"は"},{"boundingBox":"851,46,9,20","text":"「"},{"boundingBox":"868,51,16,17","text":"x"},{"boundingBox":"891,51,8,20","text":"」"},{"boundingBox":"920,47,17,23","text":"を"},{"boundingBox":"945,48,23,23","text":"記"},{"boundingBox":"972,47,24,24","text":"載"},{"boundingBox":"1001,48,17,22","text":"し"},{"boundingBox":"1024,64,5,7","text":"、"},{"boundingBox":"1064,46,8,20","text":"「"},{"boundingBox":"1076,47,24,24","text":"保"},{"boundingBox":"1103,46,23,24","text":"険"},{"boundingBox":"1130,47,21,22","text":"医"},{"boundingBox":"1155,46,21,23","text":"署"},{"boundingBox":"1183,45,19,24","text":"名"},{"boundingBox":"1208,50,8,19","text":"」"},{"boundingBox":"1232,45,23,23","text":"欄"},{"boundingBox":"1260,47,20,19","text":"に"},{"boundingBox":"1285,45,21,23","text":"署"},{"boundingBox":"1312,44,19,24","text":"名"},{"boundingBox":"1339,46,20,20","text":"乂"},{"boundingBox":"1362,45,23,21","text":"は"},{"boundingBox":"1388,44,22,23","text":"記"},{"boundingBox":"1415,43,19,24","text":"名"},{"boundingBox":"1447,52,5,5","text":"・"},{"boundingBox":"1464,42,22,23","text":"押"},{"boundingBox":"1491,42,20,22","text":"印"},{"boundingBox":"1515,41,21,23","text":"す"},{"boundingBox":"1543,41,18,23","text":"る"},{"boundingBox":"1570,43,16,18","text":"こ"},{"boundingBox":"1595,41,16,22","text":"と"},{"boundingBox":"1617,56,7,8","text":"。"}]}]},{"boundingBox":"416,90,809,37","lines":[{"boundingBox":"416,90,809,37","words":[{"boundingBox":"416,90,42,36","text":"い"},{"boundingBox":"510,90,10,37","text":"【"},{"boundingBox":"526,90,37,36","text":"般"},{"boundingBox":"569,90,10,37","text":"】"},{"boundingBox":"609,94,35,24","text":"べ"},{"boundingBox":"650,91,34,34","text":"ボ"},{"boundingBox":"694,92,26,33","text":"タ"},{"boundingBox":"731,96,32,27","text":"ス"},{"boundingBox":"771,92,32,32","text":"チ"},{"boundingBox":"813,94,29,28","text":"ン"},{"boundingBox":"849,93,34,24","text":"ペ"},{"boundingBox":"890,93,31,29","text":"シ"},{"boundingBox":"928,92,34,30","text":"ル"},{"boundingBox":"965,90,36,35","text":"酸"},{"boundingBox":"1005,90,35,34","text":"塩"},{"boundingBox":"1043,90,36,34","text":"錠"},{"boundingBox":"1093,90,12,30","text":"1"},{"boundingBox":"1127,90,21,30","text":"0"},{"boundingBox":"1161,98,30,20","text":"m"},{"boundingBox":"1205,98,20,26","text":"g"}]}]},{"boundingBox":"1432,87,18,28","lines":[{"boundingBox":"1432,87,18,28","words":[{"boundingBox":"1432,87,18,28","text":"2"}]}]},{"boundingBox":"1610,81,36,34","lines":[{"boundingBox":"1610,81,36,34","words":[{"boundingBox":"1610,81,36,34","text":"錠"}]}]},{"boundingBox":"1780,177,150,34","lines":[{"boundingBox":"1780,177,150,34","words":[{"boundingBox":"1780,180,13,29","text":"1"},{"boundingBox":"1812,180,22,28","text":"4"},{"boundingBox":"1848,180,26,31","text":"日"},{"boundingBox":"1882,179,30,31","text":"分"},{"boundingBox":"1917,177,13,34","text":")"}]}]},{"boundingBox":"181,290,1291,596","lines":[{"boundingBox":"181,851,35,35","words":[{"boundingBox":"181,851,35,35","text":"方"}]},{"boundingBox":"1409,290,58,29","words":[{"boundingBox":"1409,291,19,28","text":"2"},{"boundingBox":"1448,290,19,29","text":"5"}]},{"boundingBox":"1414,341,58,29","words":[{"boundingBox":"1414,342,19,28","text":"2"},{"boundingBox":"1453,341,19,29","text":"5"}]}]},{"boundingBox":"275,625,39,36","lines":[{"boundingBox":"275,625,39,36","words":[{"boundingBox":"275,625,39,36","text":"X"}]}]},{"boundingBox":"411,142,653,626","lines":[{"boundingBox":"487,142,397,37","words":[{"boundingBox":"487,142,36,35","text":"今"},{"boundingBox":"533,146,26,30","text":"日"},{"boundingBox":"572,144,35,32","text":"は"},{"boundingBox":"610,144,36,34","text":"帰"},{"boundingBox":"650,144,37,34","text":"宅"},{"boundingBox":"692,144,36,35","text":"後"},{"boundingBox":"731,143,36,35","text":"す"},{"boundingBox":"778,144,26,33","text":"ぐ"},{"boundingBox":"812,144,36,34","text":"服"},{"boundingBox":"852,144,32,33","text":"用"}]},{"boundingBox":"513,193,312,38","words":[{"boundingBox":"513,193,41,36","text":"い"},{"boundingBox":"576,198,26,30","text":"日"},{"boundingBox":"620,197,20,28","text":"2"},{"boundingBox":"654,197,33,34","text":"回"},{"boundingBox":"693,196,35,34","text":"朝"},{"boundingBox":"736,197,31,33","text":"夕"},{"boundingBox":"777,198,31,30","text":"に"},{"boundingBox":"815,195,10,35","text":"】"}]},{"boundingBox":"412,294,652,39","words":[{"boundingBox":"412,297,20,29","text":"2"},{"boundingBox":"448,294,11,37","text":")"},{"boundingBox":"515,295,9,37","text":"【"},{"boundingBox":"530,296,38,35","text":"般"},{"boundingBox":"574,296,10,36","text":"】"},{"boundingBox":"616,304,36,20","text":"へ"},{"boundingBox":"657,298,35,28","text":"パ"},{"boundingBox":"704,299,21,32","text":"リ"},{"boundingBox":"742,301,30,29","text":"ン"},{"boundingBox":"779,299,38,34","text":"類"},{"boundingBox":"819,298,37,35","text":"似"},{"boundingBox":"858,297,35,36","text":"物"},{"boundingBox":"899,297,35,35","text":"質"},{"boundingBox":"938,297,37,35","text":"軟"},{"boundingBox":"977,297,36,35","text":"膏"},{"boundingBox":"1024,298,21,29","text":"O"},{"boundingBox":"1058,321,6,7","text":"."}]},{"boundingBox":"491,348,523,36","words":[{"boundingBox":"491,352,33,31","text":"ア"},{"boundingBox":"536,352,31,28","text":"ン"},{"boundingBox":"576,352,35,31","text":"テ"},{"boundingBox":"617,352,36,24","text":"べ"},{"boundingBox":"659,363,35,7","text":"ー"},{"boundingBox":"710,351,21,33","text":"ト"},{"boundingBox":"740,350,38,34","text":"軟"},{"boundingBox":"781,350,36,34","text":"膏"},{"boundingBox":"829,352,21,29","text":"O"},{"boundingBox":"863,376,7,6","text":"."},{"boundingBox":"909,352,21,28","text":"0"},{"boundingBox":"950,352,19,29","text":"5"},{"boundingBox":"982,348,32,36","text":"%"}]},{"boundingBox":"490,403,206,29","words":[{"boundingBox":"490,414,37,6","text":"ー"},{"boundingBox":"532,403,38,29","text":"M"},{"boundingBox":"588,403,12,29","text":"I"},{"boundingBox":"620,404,33,28","text":"X"},{"boundingBox":"660,415,36,6","text":"ー"}]},{"boundingBox":"489,453,547,37","words":[{"boundingBox":"489,453,40,37","text":"顔"},{"boundingBox":"534,456,38,32","text":"以"},{"boundingBox":"576,454,39,36","text":"外"},{"boundingBox":"662,456,37,31","text":"か"},{"boundingBox":"705,454,34,34","text":"ゆ"},{"boundingBox":"745,459,36,25","text":"い"},{"boundingBox":"792,455,25,30","text":"と"},{"boundingBox":"832,457,27,27","text":"こ"},{"boundingBox":"870,454,29,31","text":"ろ"},{"boundingBox":"911,455,33,29","text":"に"},{"boundingBox":"996,453,20,28","text":"2"},{"boundingBox":"1029,475,7,11","text":","}]},{"boundingBox":"518,504,363,40","words":[{"boundingBox":"518,507,10,37","text":"【"},{"boundingBox":"536,509,36,35","text":"医"},{"boundingBox":"579,507,37,36","text":"師"},{"boundingBox":"621,511,36,29","text":"の"},{"boundingBox":"663,506,37,37","text":"指"},{"boundingBox":"706,507,36,35","text":"示"},{"boundingBox":"746,506,38,35","text":"通"},{"boundingBox":"796,506,21,33","text":"り"},{"boundingBox":"832,508,32,30","text":"に"},{"boundingBox":"871,504,10,37","text":"】"}]},{"boundingBox":"411,608,580,48","words":[{"boundingBox":"411,622,22,32","text":"3"},{"boundingBox":"449,618,13,38","text":")"},{"boundingBox":"492,625,38,21","text":"ニ"},{"boundingBox":"540,616,37,35","text":"ゾ"},{"boundingBox":"584,619,29,32","text":"ラ"},{"boundingBox":"624,630,36,6","text":"ー"},{"boundingBox":"667,617,37,31","text":"ル"},{"boundingBox":"712,618,30,28","text":"ロ"},{"boundingBox":"752,627,35,6","text":"ー"},{"boundingBox":"795,616,33,29","text":"シ"},{"boundingBox":"841,621,23,22","text":"ョ"},{"boundingBox":"880,614,29,29","text":"ン"},{"boundingBox":"925,612,19,28","text":"2"},{"boundingBox":"958,608,33,37","text":"%"}]},{"boundingBox":"494,668,336,41","words":[{"boundingBox":"494,674,36,35","text":"あ"},{"boundingBox":"538,673,36,34","text":"た"},{"boundingBox":"586,672,30,35","text":"ま"},{"boundingBox":"680,671,13,30","text":"1"},{"boundingBox":"711,696,9,10","text":"、"},{"boundingBox":"762,669,19,30","text":"2"},{"boundingBox":"796,668,34,35","text":"回"}]},{"boundingBox":"520,718,372,50","words":[{"boundingBox":"520,729,10,39","text":"【"},{"boundingBox":"539,730,37,37","text":"医"},{"boundingBox":"583,728,38,37","text":"師"},{"boundingBox":"626,731,36,29","text":"の"},{"boundingBox":"668,725,39,37","text":"指"},{"boundingBox":"712,726,37,34","text":"示"},{"boundingBox":"754,723,39,37","text":"通"},{"boundingBox":"805,722,21,35","text":"り"},{"boundingBox":"842,723,32,32","text":"に"},{"boundingBox":"881,718,11,39","text":"】"}]}]},{"boundingBox":"1074,293,93,191","lines":[{"boundingBox":"1102,293,65,37","words":[{"boundingBox":"1102,297,19,29","text":"3"},{"boundingBox":"1135,293,32,37","text":"%"}]},{"boundingBox":"1074,451,65,33","words":[{"boundingBox":"1074,452,19,28","text":"3"},{"boundingBox":"1106,451,33,33","text":"回"}]}]},{"boundingBox":"1440,598,85,245","lines":[{"boundingBox":"1440,598,58,31","words":[{"boundingBox":"1440,600,18,29","text":"5"},{"boundingBox":"1477,598,21,29","text":"0"}]},{"boundingBox":"1463,810,62,33","words":[{"boundingBox":"1463,812,20,31","text":"3"},{"boundingBox":"1502,810,23,32","text":"0"}]}]},{"boundingBox":"407,821,765,298","lines":[{"boundingBox":"407,821,765,66","words":[{"boundingBox":"407,852,27,32","text":"4"},{"boundingBox":"449,848,12,39","text":")"},{"boundingBox":"505,846,64,34","text":"10"},{"boundingBox":"584,840,36,41","text":"%"},{"boundingBox":"627,840,38,37","text":"サ"},{"boundingBox":"677,839,22,36","text":"リ"},{"boundingBox":"716,837,36,37","text":"チ"},{"boundingBox":"759,837,37,33","text":"ル"},{"boundingBox":"800,833,40,39","text":"酸"},{"boundingBox":"848,835,28,33","text":"ワ"},{"boundingBox":"886,832,34,32","text":"セ"},{"boundingBox":"934,829,22,35","text":"リ"},{"boundingBox":"973,832,31,29","text":"ン"},{"boundingBox":"1010,825,39,38","text":"軟"},{"boundingBox":"1051,824,37,38","text":"膏"},{"boundingBox":"1093,822,37,38","text":"東"},{"boundingBox":"1134,821,38,36","text":"豊"}]},{"boundingBox":"493,894,303,48","words":[{"boundingBox":"493,907,40,35","text":"か"},{"boundingBox":"539,904,39,36","text":"か"},{"boundingBox":"589,902,28,34","text":"と"},{"boundingBox":"671,896,41,40","text":"夜"},{"boundingBox":"729,896,13,32","text":"1"},{"boundingBox":"761,894,35,38","text":"回"}]},{"boundingBox":"520,944,383,61","words":[{"boundingBox":"520,963,10,42","text":"【"},{"boundingBox":"539,963,38,41","text":"医"},{"boundingBox":"584,960,40,39","text":"師"},{"boundingBox":"629,962,38,32","text":"の"},{"boundingBox":"673,955,39,40","text":"指"},{"boundingBox":"718,955,38,37","text":"示"},{"boundingBox":"761,951,39,40","text":"通"},{"boundingBox":"813,950,22,37","text":"り"},{"boundingBox":"851,950,33,33","text":"に"},{"boundingBox":"892,944,11,40","text":"】"}]},{"boundingBox":"629,1070,171,49","words":[{"boundingBox":"629,1080,41,39","text":"以"},{"boundingBox":"674,1077,40,39","text":"下"},{"boundingBox":"720,1072,39,42","text":"余"},{"boundingBox":"768,1070,32,41","text":"白"}]}]}],"textAngle":0,"language":"ja"}'''
1,248.636364
13,604
0.602548
2,162
13,735
3.827012
0.263182
0.067078
0.019338
0.013053
0.100677
0
0
0
0
0
0
0.231129
0.002694
13,735
10
13,605
1,373.5
0.372828
0.006771
0
0
0
0.5
0.997065
0.997065
0
0
0
0.1
0
1
0.5
true
0
0
0.5
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
1
1
1
null
0
0
1
0
0
1
1
0
0
1
1
0
0
12
5a428c9eec22dd4a12e92aee9088fcc82a308f34
22
py
Python
test/login.py
xulei5211314/test001
495b400b6dc22bc1d3533bd5beacdbb68f69940f
[ "MIT" ]
null
null
null
test/login.py
xulei5211314/test001
495b400b6dc22bc1d3533bd5beacdbb68f69940f
[ "MIT" ]
1
2021-10-10T08:51:51.000Z
2021-10-10T08:51:51.000Z
test/login.py
xulei5211314/test001
495b400b6dc22bc1d3533bd5beacdbb68f69940f
[ "MIT" ]
null
null
null
a=1 b=2 c=3 d=4 oo=22
3.666667
5
0.545455
10
22
1.2
1
0
0
0
0
0
0
0
0
0
0
0.352941
0.227273
22
5
6
4.4
0.352941
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
5a773d7bdd06ed6aab67d12ee7f513fdab9e01f0
7,947
py
Python
tests/test_clip9.py
ethanvu/clip9
119af603b1d20fce479be31c77bd67329d112992
[ "MIT" ]
null
null
null
tests/test_clip9.py
ethanvu/clip9
119af603b1d20fce479be31c77bd67329d112992
[ "MIT" ]
5
2019-11-02T06:32:43.000Z
2022-03-11T23:58:27.000Z
tests/test_clip9.py
ethanvu/clip9
119af603b1d20fce479be31c77bd67329d112992
[ "MIT" ]
null
null
null
"""Tests the clip9 module.""" from configparser import ConfigParser import sys import pytest import clip9 def test__parse_args_team_output_file_no_start_time_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang is None assert args.log_file is None assert args.debug is False def test__parse_args_no_team_exit(): sys.argv = ['clip9.py', 'result.mp4'] with pytest.raises(SystemExit): clip9._parse_args() def test__parse_args_extra_arg_exit(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', 'a'] with pytest.raises(SystemExit): clip9._parse_args() def test__parse_args_started_at_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '--started_at', '2008-09-08T22:47:31Z'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at == '2008-09-08T22:47:31Z' assert args.ended_at is None assert args.clips_dir == './' assert args.lang is None assert args.log_file is None def test__parse_args_started_at_short_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '-s', '2008-09-08T22:47:31Z'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at == '2008-09-08T22:47:31Z' assert args.ended_at is None assert args.clips_dir == './' assert args.lang is None assert args.log_file is None assert args.debug is False def test__parse_args_ended_at_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '--ended_at', '2008-09-08T22:47:31Z'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at == '2008-09-08T22:47:31Z' assert args.clips_dir == './' assert args.lang is None assert args.log_file is None assert args.debug is False def test__parse_args_ended_at_short_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '-e', '2008-09-08T22:47:31Z'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at == '2008-09-08T22:47:31Z' assert args.clips_dir == './' assert args.lang is None assert args.log_file is None assert args.debug is False def test__parse_args_clip_dir_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '--clips_dir', './clips'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './clips' assert args.lang is None assert args.log_file is None assert args.debug is False def test__parse_args_clip_dir_short_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '-c', './clips'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './clips' assert args.lang is None assert args.log_file is None assert args.debug is False def test__parse_args_lang_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '--lang', 'en'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang == {'en'} assert args.log_file is None assert args.debug is False def test__parse_args_lang_short_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '-l', 'en'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang == {'en'} assert args.log_file is None assert args.debug is False def test__parse_args_multi_lang_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '-l', 'en', 'ko'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang == {'en', 'ko'} assert args.log_file is None assert args.debug is False def test__parse_args_log_file_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '--log_file', 'clip9.log'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang is None assert args.log_file == 'clip9.log' assert args.debug is False def test__parse_args_log_file_short_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '-L', 'clip9.log'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang is None assert args.log_file == 'clip9.log' assert args.debug is False def test__parse_args_debug_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '--debug'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang is None assert args.log_file is None assert args.debug is True def test__parse_args_debug_short_success(): sys.argv = ['clip9.py', 'result.mp4', 'cloud9', '-d'] args = clip9._parse_args() assert args.output_file == 'result.mp4' assert args.team == 'cloud9' assert args.started_at is None assert args.ended_at is None assert args.clips_dir == './' assert args.lang is None assert args.log_file is None assert args.debug is True def test__parse_credentials_cfg_proper_config_ret_creds(): cfg_string = ('[credentials]\n' 'TWITCH_CLIENT_ID=uo6dggojyb8d6soh92zknwmi5ej1q2\n' 'TWITCH_CLIENT_SECRET=nyo51xcdrerl8z9m56w9w6wg\n') config = ConfigParser() config.read_string(cfg_string) credentials = clip9._parse_credentials_cfg(config) assert credentials['TWITCH_CLIENT_ID'] == 'uo6dggojyb8d6soh92zknwmi5ej1q2' assert credentials['TWITCH_CLIENT_SECRET'] == 'nyo51xcdrerl8z9m56w9w6wg' def test__parse_credentials_cfg_no_creds_header_exit(): cfg_string = ('[a]\n' 'TWITCH_CLIENT_ID=uo6dggojyb8d6soh92zknwmi5ej1q2\n' 'TWITCH_CLIENT_SECRET=nyo51xcdrerl8z9m56w9w6wg\n') config = ConfigParser() config.read_string(cfg_string) credentials = clip9._parse_credentials_cfg(config) assert credentials is None def test__parse_credentials_cfg_no_id_key_exit(): cfg_string = ('[credentials]\n' 'TWITCH_CLIENT_SECRET=nyo51xcdrerl8z9m56w9w6wg\n') config = ConfigParser() config.read_string(cfg_string) credentials = clip9._parse_credentials_cfg(config) assert credentials is None def test__parse_credentials_cfg_no_secret_key_exit(): cfg_string = ('[credentials]\n' 'TWITCH_CLIENT_ID=uo6dggojyb8d6soh92zknwmi5ej1q2\n') config = ConfigParser() config.read_string(cfg_string) credentials = clip9._parse_credentials_cfg(config) assert credentials is None
35.32
78
0.678118
1,114
7,947
4.586176
0.06912
0.217264
0.108045
0.14406
0.934625
0.929145
0.917792
0.903699
0.868859
0.813858
0
0.04354
0.199446
7,947
224
79
35.477679
0.75951
0.002894
0
0.775
0
0
0.172392
0.043193
0
0
0
0
0.58
1
0.1
false
0
0.02
0
0.12
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
9
ce6cf7e855d448feb77acbfce8fdc9d084a8136e
307
py
Python
houttuynia/nn/modules/__init__.py
speedcell4/houttuynia
598ba06d70c1263a6d256991a52e424c03d73130
[ "MIT" ]
1
2018-04-24T01:50:39.000Z
2018-04-24T01:50:39.000Z
houttuynia/nn/modules/__init__.py
speedcell4/houttuynia
598ba06d70c1263a6d256991a52e424c03d73130
[ "MIT" ]
29
2018-05-05T02:00:55.000Z
2018-07-23T07:03:42.000Z
houttuynia/nn/modules/__init__.py
speedcell4/houttuynia
598ba06d70c1263a6d256991a52e424c03d73130
[ "MIT" ]
null
null
null
from houttuynia.nn.modules.conv import * from houttuynia.nn.modules.linear import * from houttuynia.nn.modules.rnn import * from houttuynia.nn.modules.utils import * from houttuynia.nn.modules.functional import * from houttuynia.nn.modules.metrics import * from houttuynia.nn.modules.architectures import *
38.375
49
0.81759
42
307
5.97619
0.285714
0.390438
0.446215
0.641434
0.693227
0
0
0
0
0
0
0
0.091205
307
7
50
43.857143
0.899642
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
cea5fdff4da0d0ea8cd10b14105cccc807440b23
20,127
py
Python
check.py
ERM073/eMail-leakCheck
2fa2e7b446b8235a64fea34f796cc0dbaa4060d7
[ "BSD-3-Clause" ]
null
null
null
check.py
ERM073/eMail-leakCheck
2fa2e7b446b8235a64fea34f796cc0dbaa4060d7
[ "BSD-3-Clause" ]
null
null
null
check.py
ERM073/eMail-leakCheck
2fa2e7b446b8235a64fea34f796cc0dbaa4060d7
[ "BSD-3-Clause" ]
null
null
null
from pytransform import pyarmor_runtime pyarmor_runtime() __pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x09\x00\x61\x0d\x0d\x0a\x07\x2c\xa0\x01\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\x4f\x13\x00\x00\x00\x00\x00\x18\xe9\xf9\x71\xf2\x83\x7f\x89\xa2\x4e\x8a\xeb\x59\x85\x93\x98\x91\x00\x00\x00\x00\x00\x00\x00\x00\xca\x24\x79\xc1\xa3\x45\x88\xcd\x96\xc9\x0d\x4a\x2c\xee\x48\x3b\xb6\x07\x7e\xdc\x6b\xf0\xd8\x6e\x36\xb3\x8e\xc0\xdd\xf0\xab\x86\xcc\x12\x2d\x5b\x20\x8d\xd6\x04\x78\x7c\x90\x48\xab\x2d\xa1\xab\xc9\xa0\xf5\x80\xb6\x8b\x7f\x07\x3f\x67\x93\x18\xc8\x77\xf5\x4f\xe6\x2f\x5d\x49\xe5\x87\xf7\xa1\xa5\x1a\x33\x6a\x85\x5e\xa3\x07\x73\xd0\x27\x7d\xf0\x8d\xa3\x3b\xaa\xc7\x63\x70\x6d\x7e\x7f\x86\x73\x3e\xe2\xd7\xf5\x59\x09\x91\x64\x7c\xe2\x0e\x47\xa0\x8e\x86\x07\x91\x95\x03\x71\x01\x28\x50\xd6\x74\x75\x71\x11\x4c\x68\xd7\xfe\x06\x37\xee\xdb\xf1\x9e\x9a\xd5\xa4\x73\x9f\xe7\x12\x64\x0d\xbf\x45\x70\x23\x4e\x5c\x44\xd0\xd6\xda\x45\xfa\xf6\x82\x6e\xa1\x04\xf0\xcf\xcf\xb6\xff\x7b\xfd\xcb\x4b\xd8\x89\x00\x24\x7b\x6b\xb1\xc2\xc2\x67\x13\x65\x4a\x5e\x7b\xd3\xa5\x87\x36\x60\x1f\xef\xa1\x65\x1d\xf9\xa5\x6d\x0f\xfa\x7d\xd2\x15\xc7\x54\xb0\xcb\xfc\x0e\x90\x5f\xef\xd8\x50\x36\xf6\xd4\x85\x52\xd6\xc4\x91\xd4\xc9\x64\xe8\x4b\x2b\x82\x8e\xec\x3e\x5f\x84\x57\xa7\xec\x88\x93\x72\x70\x03\x35\x84\x93\x2e\xdc\xe4\xae\x83\x5e\x6a\x1e\x92\x3c\xec\x9a\x5b\x52\x38\x1c\xd3\xd4\xca\xd1\x66\xf9\x8d\x8c\x5e\xbc\xaa\x00\x0d\x6a\x2f\xa9\x12\x7a\x83\xf8\xdc\x30\x49\x7b\xf4\x3b\x6c\x9d\x86\x9d\x5c\xec\x30\xd0\x15\x59\xad\xa2\x50\xad\x91\x2d\x43\xf3\xbd\x34\x2b\xed\x7d\x23\x71\x42\x85\x77\x8e\xe8\xf3\xf5\xeb\x06\x9c\x3d\x8b\x02\xa5\x7f\xc8\x9c\xa5\x1b\x42\xd1\x1c\x38\x36\xeb\x3e\x67\xd2\x22\x15\xd5\xc3\xb6\x0a\x9d\xa5\xab\xf2\x0e\x50\x47\x3c\xbc\xd1\x16\xa7\x9a\x78\x89\x24\xc0\x40\xd1\x3f\x4c\x84\x1c\x26\xa5\x63\x5c\x92\x5a\x97\xaa\x09\xaa\x60\x9c\x8f\xe3\xe3\xee\x17\x13\x4b\xe7\x55\xce\xbc\x17\xe5\x97\x46\x32\x1d\x80\x27\x90\x2c\xfa\x0d\xa0\xf5\x86\x79\xdb\xa4\x59\x68\x0b\x34\xaa\x13\xa1\x7b\xc0\x27\x50\xda\xc7\x2b\x41\x67\x1f\xf8\xcf\xc9\xd7\x00\x1d\x1b\xfd\xf0\x62\x1d\xaa\x2c\xf4\xab\xce\xf9\x6e\xff\xf0\xb9\x6f\xb4\x55\x53\x14\x89\x00\x81\x68\xf4\x91\xe6\xa9\xf1\x64\x99\x7c\x96\xae\x6a\xbd\xc6\xbf\xcc\xb7\xa4\x6b\xc9\x94\xd0\x80\x4b\x9b\x9b\x54\x8e\xd0\x7d\xb5\xc7\x2f\x9a\x41\xd7\xcb\x7b\x08\x1d\xcf\x7d\xb2\xbb\xcc\x9e\x02\xfc\x11\xf1\xa9\x16\x67\xf1\x9c\x87\x2a\x59\x29\xb4\x21\x6c\xd2\x36\x3f\x5d\x73\xa2\x69\x0f\x16\x67\xb5\x07\x5f\x19\xfa\xca\x72\xbb\x4a\xb8\xa2\xd9\xc9\xd8\xf3\x4e\xbe\x95\x13\xe0\xbe\xa3\x2a\xe3\x47\x91\x8d\xe2\xb1\x62\xda\x01\xc5\xe1\x7c\x33\xf4\x8f\xb8\x22\x6d\xb8\x4f\xaf\xa9\x7f\x58\x15\x25\x87\x8e\x9f\xa6\xaa\xf3\x7a\xa9\x92\x12\x78\xd6\x81\xcb\x90\xe1\xaf\x2c\xba\x3e\x89\x59\x84\xe8\x41\x8b\x7f\x00\x69\xd4\xd5\x34\x0a\xa6\x46\xfb\x53\xc7\xae\x23\xb8\x0f\x16\x69\x22\x9e\xfa\x21\xa3\xe4\x31\xbd\xfa\x7a\xbb\x8d\x94\x22\xf8\xf9\xe5\x6e\x7c\xb5\xc7\x63\x26\x68\xb3\xd4\xcb\xac\xeb\xc3\xf5\x53\x8c\xea\xa4\xa7\x0c\x7b\x04\xde\x69\x95\x39\x49\x5d\x17\xe2\x9a\xe8\x84\xe0\xad\x2d\x6c\x15\xb9\xb2\x16\x9f\x4c\x41\xb6\xd2\xd4\xd9\x2a\x4a\x53\x6f\x74\xd8\xe1\xd7\x92\xc3\x79\x61\x37\x3c\x39\x61\x9d\xd8\x75\xcf\x01\x3d\xe9\xbb\xdb\x72\x89\xf5\x05\xee\x11\xb2\x14\x46\xf8\x2f\xd8\x4f\x6b\x6b\xf1\x24\x62\xa1\xbf\xcb\xd9\x7a\x2e\xde\x06\x18\x43\xff\x45\x0b\x38\xfa\x92\x52\x02\xc9\x9e\x78\x2e\xf9\x27\x34\xb3\xe5\x47\x9c\x86\x53\xec\x43\xe4\x32\xb5\x5d\x33\x6e\xd8\xd1\x4a\x25\x1c\x27\xe8\xa8\x0b\x20\x6a\x1a\x87\x10\x78\x10\xe2\x77\xa3\x07\x25\xb8\xdc\xbc\x2a\x40\x27\x48\x1d\xb0\x94\xbc\x74\x61\xf5\x4e\x0a\x8d\xc3\xca\x0c\x30\x9f\x61\x24\x4d\x4d\x42\x44\x26\xaf\x13\x61\xaf\xbd\xc3\x45\xf6\x8a\xbc\xb0\x4f\xfe\xfa\x05\x5d\x3c\xc7\xaf\x28\xcb\x67\xa2\x62\x30\xe6\xb2\xef\x72\x00\x9a\x0a\xce\x5a\x43\x0c\x08\x55\x80\x0e\x68\x37\x23\x84\x28\xcf\x92\x57\xf0\x24\xef\xe3\x70\xec\x77\xea\x99\x02\xfd\x39\x21\x27\x1b\x34\xb1\x0c\x3b\x0a\xda\xd5\xa9\xcb\x7e\x87\x0c\x5b\x6d\x00\x65\x35\x74\x30\x71\x7e\xdc\x3a\x5b\x04\xeb\x6d\x1e\xe2\x50\x29\x55\x7c\x01\xfa\x30\xd4\xcb\x48\x17\xd9\x03\x59\x3a\x41\x7c\xb7\x11\x82\x79\xdd\x0a\xde\x21\xba\x3b\x24\x7a\x28\x22\x47\x9a\xcd\x07\x4f\xa9\x19\x04\x2f\x36\x0e\xc6\x5e\x09\x21\xa6\x71\xec\x22\x3d\x37\x88\x8b\x8e\x0e\x21\x28\x20\x7e\x27\x4b\xcd\xcc\xbd\x3d\x08\x29\x95\x01\xd3\x92\xa8\x51\x27\xcc\xe8\x5d\x55\xb9\x32\xb5\x2b\x8c\xec\x5f\x1d\xa4\x19\xd0\x66\xee\xaf\xdf\x26\x89\xcf\x8e\x0c\xf3\x2d\x08\x9e\xda\x9d\x2a\xc4\x3d\xfe\xbc\x96\x45\x38\x74\xa1\x40\xcd\xde\x7f\x2b\xc3\x63\x81\x8d\x5d\xb7\xdb\x41\xf8\x68\x1b\x63\xe9\xa6\x39\x67\x88\xe8\xc8\x46\x44\x4e\x82\x3b\x5a\xb6\xa2\x50\x8f\x96\x1b\x9c\x0e\xf6\x75\x07\x79\x6d\x0c\xbd\xa3\x24\xd8\xfa\x54\xf4\x0e\xbf\xda\x91\x56\x47\xe9\xbc\xa9\x79\xd0\xdb\xa3\xbf\xda\x59\xb3\xa5\xa5\x94\x42\x35\x96\xec\x8f\xaf\xeb\xde\x65\xef\x9c\x66\xb4\x7d\x9d\x0a\xe7\x5b\xf5\xb1\x7f\x3f\x1e\x30\x1a\xf2\x43\x99\x84\xf6\xad\xd0\xf3\x3c\x64\x6c\x21\x41\xf9\x72\x6c\x5d\x1f\x3d\xbb\xf3\x81\x66\xf7\x90\xad\xbd\x00\xfa\xc7\x59\x27\xc3\xf2\xc7\x2e\xa8\x4e\x8b\x6c\x0e\xc8\x28\x15\xca\x8f\x38\x57\xae\xff\x7e\x35\x6a\x20\x71\x0a\x9c\xb0\x42\xd7\x4a\x16\x35\x79\x30\x3e\x0e\x3a\x9d\x85\x2c\xa2\x55\xb0\x0c\xee\x6c\x27\x7c\xb0\xc3\x7f\x35\xf7\x39\xfc\x59\x28\x09\x51\x24\x88\xe8\x85\x35\x70\xf9\xeb\x16\xdc\x72\x41\x4a\xb4\x68\x9c\xf3\x2a\x2b\x22\x36\xd6\xa5\xa5\x0a\x28\x5a\x7d\xda\x36\x5f\x1f\x30\xf8\x53\xfa\xbf\x99\x31\x5e\x76\xd8\x80\xba\x30\xdb\x88\xf2\x49\x91\xda\x13\x00\xfc\x2c\x63\xce\x64\xa4\x25\xe1\x6e\xaf\x93\x0e\x32\xb6\x88\x5e\x42\x33\xf7\xba\x8b\x4d\xf7\xa0\x38\xe1\x73\x40\x32\x74\xd6\xb2\x89\x93\x94\x81\x9a\xfc\xde\xc9\x12\x73\x52\x4d\x08\x5a\xb4\xf8\x9d\x82\x95\xcd\x8d\xe0\x5f\x55\xa9\x07\x71\x87\xee\xf9\x90\x2f\x39\x4f\x7c\x67\x43\x26\x46\xe2\x8a\x3a\xde\x82\xb6\x49\x74\xa5\x85\xc6\xed\x4c\xab\xbc\xaf\x99\xef\xc7\x8c\x42\xf6\xd3\x94\xbf\x63\x78\x53\x60\xee\x7a\x86\x85\xd7\x17\x4d\xcd\xc0\xc2\x52\x25\x8c\xe3\x4c\x17\xba\x21\x72\xd6\x98\x48\x54\x8a\xe5\x1a\xa0\xc7\xee\xe0\xf5\x5a\x06\xdb\xdd\x6b\xb3\x3d\x54\xf1\x40\x47\xd7\xb9\x6c\x1f\x57\x09\xe0\x0a\x87\x69\xb0\x16\x45\x88\x91\x96\x4d\x13\x93\x5b\xd9\x09\x9e\x49\xb3\xf6\x94\x6e\x95\x08\x01\xed\xce\x66\x50\x9d\x58\x5f\x49\x64\xc8\xc2\x99\x62\xd4\x57\x85\x6d\xe7\xf0\xaa\x4d\x6c\x3a\xce\x25\x9a\x57\x47\xfd\x81\x29\x9e\x20\x29\x5c\xd3\x00\x69\x4f\x17\x16\x6d\x44\x4b\x7c\xa2\xf9\x77\xfd\x32\xc7\x98\x2c\x53\x60\x80\xc2\xec\x9c\x88\x7a\x2e\x15\xd7\xe5\xdd\x3d\x1b\x83\x42\xbb\x80\xf8\xda\x21\x6e\x27\xc5\x44\x03\x34\xff\xe7\x7a\x1c\x34\x43\xa7\x57\x67\xd9\xb9\xc5\x06\x8e\xd2\x3a\xb4\x86\x30\x1d\x12\x32\x55\xcb\x27\xfb\xb2\x53\x43\x62\x2c\x32\x68\x91\x57\xc9\x37\xbf\x92\x07\x3a\xbc\xcd\xa2\x20\x1a\x96\x61\xff\x14\x7a\x20\xf2\xfe\xbe\x4a\x8f\x52\xae\xe0\xec\x47\xf5\x10\xd9\xb8\x37\xa2\x58\xf3\x5a\x48\xc5\xb7\x9a\xf3\x35\x05\x1b\x3c\xb9\xd3\xf2\x40\x98\xb5\xc8\x5c\x82\x12\x18\xf1\xde\x30\x14\x6e\x05\x0d\x32\x55\xec\xb7\x5e\xcb\xb3\xc8\x0b\x1e\x8d\xa3\x6a\xe1\x71\x88\x2d\xa1\x54\x02\x47\x41\xfa\xa4\xeb\xd6\x19\x13\x2b\x34\x28\x35\x62\xbe\x52\xca\xa7\x1f\x32\x40\x07\x32\x2b\x7e\x2a\xca\x34\x17\x36\x4b\x67\xbc\x99\xe3\xc5\xc9\xcc\xd3\x5f\xf2\xa9\x58\xc7\x1d\x5a\x1f\x36\x06\x4f\x18\x08\x74\x40\x65\x46\x49\x5e\x35\x82\x64\x97\x01\xcd\x1d\xd3\xd3\x0d\xa6\x54\xbd\xe9\xdd\x35\xbe\x9c\x74\xcf\x0e\x9d\xde\x46\xc4\x73\xba\x60\xec\xd8\x15\xe7\xf5\x18\xc6\x61\x16\x85\xee\x24\xfa\xae\x90\x2a\xb4\xa6\x36\xe6\x81\x08\xcf\xf8\x23\x1b\xac\x9f\x34\x05\x01\x64\xa4\x4d\x2a\x33\x75\x48\x68\x6d\xba\xbb\x01\xcc\x74\xae\x6f\xd5\x9f\x77\xe9\x34\x19\x51\x15\x79\x1b\x85\x80\xe8\x10\x5d\x7c\x6b\x52\x05\x29\x3c\x14\x74\x71\x92\xfd\xfb\x30\x7e\x6c\x0d\xf9\xd1\x49\x7e\x6e\x13\x91\xdd\x86\xa7\x35\x01\x58\x13\x74\xc2\xbf\x9e\x99\xdf\x3d\x67\x1d\xeb\xe7\xc7\x32\x67\x0d\xfc\xb4\x86\x2f\x43\xc5\xd3\x99\x2f\x96\x8d\x88\xa5\x08\x43\x95\x19\x04\x6d\x3c\xa6\x71\x3f\x9f\x71\x29\xad\x10\x26\xcc\x92\x4d\x55\x06\xdb\x6a\x8d\x19\x19\x66\xb0\x6d\x5b\x4f\x32\xdb\xe1\xe8\xac\x67\xef\xe8\x9e\x5a\x6c\x70\x6e\x06\xfb\xae\xa8\x11\x40\xd5\x87\x0d\x8d\xa6\x64\x69\x9e\x97\x33\xe8\xae\x1e\x7e\xb1\xc6\x55\xc7\xba\x6e\x92\x6a\x70\x5d\x05\xc2\x6e\x9a\x91\x65\x83\x23\x96\xb2\xc4\x8a\x15\x90\x2b\xe2\x1f\xbb\xd9\x9d\x54\x7d\xbc\xff\x7b\x98\xfb\xb1\x82\xb5\x7c\x78\xc1\xf6\x3b\x5b\x27\x99\x5e\xec\x45\xc2\x6c\xe5\x32\xdf\x13\x9c\x95\xf3\x53\x12\xf5\xe7\xd0\xdf\xa2\xc2\x57\x7e\x57\xec\x05\x76\x70\xa3\xa4\x7a\xed\x44\x87\x11\xce\x95\x12\xc2\x62\xa2\x34\x6e\xed\xc7\x99\x4b\xce\x0a\x41\x81\xdf\xf9\x2c\x5c\x1f\x96\x7d\x5b\x79\xf2\x9c\x81\x8c\x57\x75\x3f\xa7\x1c\x29\x26\xd9\x11\xb9\x80\xbb\xa5\xb3\xec\x33\x3a\xf2\x18\x44\xec\x72\x59\xc7\xa1\xd0\x9e\x4e\xf3\x1f\x10\x60\x2f\xdc\x7b\x94\x5a\x6f\xf2\x84\x8c\x3b\x8e\x5a\x0a\xe5\x7c\xc6\xf9\x5b\xe5\xcc\x60\x65\xdf\xed\x31\x27\xff\xc7\x79\xbf\x87\xea\xe3\x12\xfb\x22\x00\x00\x5a\x3e\xa1\x4c\x8b\x62\x84\xaf\x24\x79\xdc\x49\x52\x12\xc5\x99\x48\x23\x07\xc9\x13\x51\xf8\xb5\xe5\x9d\xa4\x91\x13\x4f\xe9\x3c\x50\xeb\x1a\x54\x30\xfe\xb0\x4d\x18\x77\xdf\x3a\xce\x67\xb4\xd8\xc2\xfb\x5a\xf4\x29\x5d\x50\x49\xa8\x42\x5f\x92\xca\x13\x96\x28\x78\x42\x82\xda\xc7\x85\x51\x38\x89\x29\xfa\x8a\x15\xc9\x77\x4f\x03\xae\x2d\xf7\xc5\xde\xb9\x19\xd3\xbb\x31\x48\xdd\xaf\xbd\xa3\xf3\xf2\xcf\xa5\x16\xab\xa8\x5b\xfd\xd2\xee\x58\xa0\x10\xc5\xa6\xee\x2a\x11\x76\xc0\xe2\x92\x92\x84\xf6\x2a\x99\x59\x13\x2f\x5b\xf4\xdf\xd5\x78\x82\xf9\xa3\x5b\x11\x41\x16\xd5\xa7\xd8\xc5\x79\x3d\xc0\x5e\xcc\xcf\x69\xe2\x82\xa1\x65\x3f\x75\x34\x4c\x95\x2f\x42\x5f\x2b\xe5\x0d\x56\x45\x21\x40\xf5\xdb\x00\x6b\x1d\xfe\x32\x8d\x39\x66\xf4\x60\xbe\xee\xf1\x6a\x4b\x65\x81\x83\x87\xc6\x2e\x9d\x91\x70\xf0\xd0\xcb\xb3\xd0\x14\x5a\x12\x94\xdf\x43\xe9\xd0\xb0\xad\x02\x12\x51\xb3\xb5\x6f\xe6\x35\xd5\x2b\xb9\x84\xdc\xb7\xbc\xb7\xd6\x57\x0d\xbe\xf6\xbd\x88\xa6\x60\xf9\xfb\x0f\xb4\x00\xa7\x81\xb6\x55\xad\x83\x1f\xc1\x2f\x61\x8a\x35\x1b\x96\x7a\x0f\xa8\xcd\x27\x4b\x40\xf9\x98\xb3\x69\xda\xa5\x2d\xb4\xc6\x66\x02\x32\xa7\xca\x23\xff\xe3\xb4\x7a\x0c\x6d\xa2\x3b\x68\x78\x4c\x9d\x9b\xf9\x72\xf5\x94\xfc\x9c\x3c\x73\x6d\xcd\x12\xfd\xd3\x56\xf7\xdc\xcd\x32\x8b\x58\x6c\xc0\x78\x3a\xb7\xeb\x19\x40\x14\x5d\x25\x96\x3b\xc4\xea\x1b\x7a\x84\xdb\xc4\x71\x86\x36\x34\x3b\xfe\xfa\x4c\x48\xb0\x8c\xac\xc7\xe2\x4a\xcd\xcd\xda\xd1\xcc\x38\x54\x1c\x8e\x72\x34\xdd\x71\xd9\x04\xa2\xb9\x4e\x23\x98\x9d\x36\xbb\x70\x18\x29\x8f\x94\x62\x31\x3b\x0f\x8a\x51\x19\xcc\x95\xaa\x56\x79\x05\xa2\x7d\x8f\x22\x31\xe5\x06\xbd\x4e\xaf\xbc\xd9\x64\xb1\xdb\x02\x1e\x4b\xc7\xeb\xc1\xa3\xca\x67\x0b\xbe\x86\x2c\x13\x59\x23\xf9\x66\x24\xf2\x3f\xc5\x8d\x66\xfb\xcb\x2a\x88\x81\xac\x79\xac\x55\x6b\xab\xbf\x18\x1a\x61\xfb\xb4\xb4\x2b\xc4\xc4\xa0\x01\x3b\x80\x97\x3c\x30\x46\x61\xc3\x84\xb9\x38\x2c\x85\xe3\x3d\xec\x29\xe0\x96\xf9\x5d\xb3\x76\x91\xb5\xae\x5c\x4e\x83\x03\x5f\xf1\x8c\x62\x23\x90\x88\x51\xe6\xdf\x48\x3a\x7c\xe0\x0e\x79\xe7\x20\xfd\xd0\x28\xfc\xfc\x0e\x2f\xc7\x43\xa9\x7d\xb2\x53\x6f\x3b\x33\x07\x34\xe6\xe7\x4d\xa3\xdc\xfb\xe0\x10\x96\xc7\x38\x06\x0b\xa1\x89\x62\x8f\xbc\x39\xa7\x3c\xe3\x9b\xda\x21\x2b\x72\xaf\x53\xc5\xe8\xfa\xb7\x63\xe2\xa6\xe8\x52\xdf\x10\x6c\x6f\x05\x03\xb6\x1d\x20\x23\xbe\x51\x4d\xca\x06\x7e\xcc\xe5\xe5\xf3\xbe\x34\x30\x73\xfe\x93\x18\x70\x1b\xd2\xb0\xd2\x34\x42\x04\x4c\x3b\x5f\x25\x48\xc8\x88\x71\xfa\xed\xc0\xaa\x36\x65\xe6\x67\x22\x48\x27\x41\xbc\x7b\xe7\x5d\x6c\xe1\x82\x9b\x8c\x84\x63\xd3\xc0\x82\xec\xda\xd2\xf2\x8b\xf1\xbb\xa7\xf8\xeb\x43\x2d\x3d\x09\xc5\x23\xbd\xd9\x5a\x02\xd6\x95\x4f\xf7\x6c\x28\x4a\xf6\x61\xf3\xe0\x48\x42\x4e\x81\x73\x2a\x58\x91\xf7\x55\xc2\x6c\xf3\xc2\x52\x1c\x28\x25\x4c\xbc\x8b\xb6\x3a\xc3\x9a\xb2\xed\x13\x1b\xcf\x58\x04\xcb\xa6\x93\x04\x58\xb6\x3e\xe2\x25\xd2\xa9\xa0\x59\x5a\x02\xb7\xed\xcf\x3f\xf2\xe5\xf7\x99\x82\x7b\xcd\xe7\x32\x83\x69\x72\xfa\x09\x3f\x0d\x13\xff\x94\x78\xc1\x70\x51\x88\xc1\x76\xfd\xba\x65\x98\xf0\xfd\x7e\xff\x13\x05\x25\x64\x05\xe9\xa4\xf7\x43\x54\x1d\xa7\x86\x94\x12\xf9\x76\x38\xfd\xe6\x70\x64\x65\x81\xe2\x71\x9c\xf5\xa3\x11\xf4\x85\x8e\x13\x29\xc8\x8c\x89\x47\xae\xb3\x72\x6a\x87\x3a\xba\xad\x54\x9f\xc8\x71\x61\x1c\x0b\x8b\x07\x5e\x25\xea\x3d\xd7\x20\xc6\x51\x63\x3f\x47\x6c\x2d\x87\xf0\xf7\x4a\xab\xbb\x90\xe2\x6a\xf3\x60\xe9\xf3\x74\x76\x41\x69\x6a\x9a\xea\xac\x39\x5a\x11\x05\xb4\x66\xdb\x2f\x9f\xe3\xd9\x49\x81\xcd\x91\x14\x65\x67\xba\x37\x4a\xf5\xa6\xe3\x4d\x93\xdd\x85\xdb\xd4\x64\xa3\xbf\x91\x99\xce\x03\x28\x66\xc6\x12\xad\x34\xd1\x12\x32\xc8\xe1\xfb\x5d\xa5\xed\xc4\xf2\x29\x83\xc0\xe5\xc3\x28\x47\x66\x1b\x1c\x82\x6f\xdb\x79\xf8\x89\x94\xda\x7b\x43\xa0\x8a\x63\x1c\xe9\x52\xe5\xfa\x22\xd7\x0a\xe4\x42\x7c\x0d\x2a\xe3\xec\x17\xa3\x4f\x75\x99\xe6\xf4\xf3\x4b\x54\x10\xd5\xbb\xc7\x7e\x27\xf5\x0f\xb4\xb3\x7a\xde\xcf\xd1\xdc\x2f\xc4\x0a\xf1\xc6\x4f\xc8\x3a\x84\xae\x92\xab\xca\x7b\xdb\xdc\x58\x66\xcb\xfd\xe6\x95\x07\x9a\xe0\x85\xe8\xaf\x62\x9c\xde\x60\x5b\x52\xe4\xba\x7e\x54\xad\xf5\x61\x17\xea\x9e\xe2\x77\x9a\x02\xfe\x95\xff\x6a\xcd\x3d\xc9\x40\x8d\x61\x6f\xc5\x1d\xd6\x95\xf3\x37\x30\x72\x14\x07\x53\x38\x92\x62\x60\x22\xa7\xf3\x38\xef\x82\x39\x72\x77\x38\x26\xac\x70\x51\x13\xcd\x0c\x2d\xb0\x6f\xdf\xd6\x7e\x27\xa4\x93\x70\xe5\x0d\xfa\xba\xf9\xab\x13\x48\x74\x0d\x0d\x77\xbe\x37\x8d\xae\xe7\x5a\x14\x55\xe1\xcf\xf9\xd5\x96\x35\x8a\x59\x59\x48\x10\x29\x31\x8b\xf7\x99\xea\xe9\xa2\x72\xdf\x8e\x6e\xac\x4a\x05\xf4\x8d\xcd\x24\xa4\x67\x5e\x3e\x70\xb5\xad\xb5\x9c\xb7\x0b\x8d\x4a\xfa\x61\x10\x88\x24\x7a\x9c\x2f\xa7\xc8\x5b\x06\x98\xe0\xdc\xd6\x4c\x44\x4b\xda\x81\x01\x24\xda\x68\xe3\xd6\xd9\x74\xf1\xa1\xba\xad\x2e\x7d\xe9\x31\xb2\xa3\xbc\x8d\x7b\x47\xb9\x32\x94\x1a\x96\x59\x85\x40\x6d\xe9\xa7\x5d\x20\x78\xc8\xa2\x46\xf8\x5c\x47\x49\xe3\x89\xd6\x7e\x39\x03\xbd\x80\x97\x38\x6b\x69\x67\x48\x64\xd8\x84\xd8\xd7\x87\xfa\x80\xdf\x67\x38\x22\x91\x89\xd8\x85\x06\x47\xe3\xf2\xcb\x14\x34\xeb\x31\xc1\x8d\x62\xad\x96\xa3\xaf\xa7\xc6\xb7\xd8\xde\x3e\xbb\xbf\x7f\x18\x67\x50\x7f\xca\x7d\x98\x94\xec\x26\x49\x6a\xe0\xd5\x4d\x82\x03\xb6\x69\x34\x9f\x4c\xf9\x08\xcd\x3e\xa5\x78\xc3\x33\x9a\x35\xc7\xc1\xc1\xe9\xb8\x94\xe6\xb3\x09\xbe\x87\x3b\xdf\x7b\xab\xee\xf2\x98\x55\xb5\xe8\xcc\xdf\x63\x50\xec\x39\x58\x41\xdd\x41\x06\x07\xad\xa5\xae\x87\x73\x6c\x2f\x04\x14\xb8\xd2\x07\x50\x44\x7c\x0d\x6e\x97\x72\xe6\x93\x8d\x1c\x1a\x17\xb7\xd4\xdb\xd7\xb1\x8d\x99\xff\x0e\xdd\x18\xd1\x43\x6b\x5e\x73\x96\x63\x62\x20\x17\xa5\x75\x1b\x49\xe1\xb4\xf8\x0e\x02\xfd\x7a\x53\x40\x44\x60\xad\x5f\x21\xbc\x1d\x80\x69\x24\x01\x68\x88\x27\x0a\x7f\xeb\x46\xa8\x3c\x9c\xd5\x86\x84\x73\x88\xa8\x32\x85\x18\x99\x82\xb4\xfd\xb0\x3c\x26\xe1\x09\x54\xb6\x17\x44\x56\x85\x1f\xe8\x25\x96\xc5\x73\x00\x2d\x33\xb8\x3a\x9d\xfb\xa7\xa1\xb0\x81\x76\x0d\xa6\x72\x56\xad\x22\x39\xe4\xe0\xe4\xbd\x47\xf5\x98\x16\x12\x5b\x86\xe1\x17\x09\x28\x69\xd0\x1a\xc4\x64\xad\xd8\x09\xd4\x7b\xe8\x31\x4f\x95\xca\x56\x4f\x91\x7e\xf8\x2a\x31\x0f\xdd\x6a\x9d\xa0\x21\x21\x7c\xab\x62\x2e\x72\x26\x39\x3b\x1a\xd5\xbb\xaf\x08\x68\x77\x0f\x4b\x32\x7d\x53\xf6\xde\xb8\x80\xfb\x3c\x30\x68\xdc\x38\xad\x09\x82\xac\xfe\xda\xcd\x94\x81\xe1\xcd\xef\x7c\x72\xd3\xc2\x77\x97\x98\x96\xf5\x2e\x5e\x7f\x73\xf6\x5e\x72\x8a\x9d\x90\xf3\xcc\x36\x83\x48\xaa\xfe\x45\x2d\x08\xe9\x76\xa0\xa0\xac\x22\x68\x14\xb7\x07\x2a\xbd\x1b\x5a\xa5\xb8\x1a\x56\x1f\xe6\x78\x38\xbb\xbf\x9d\x9d\x5f\x95\x30\xea\x7b\xa3\x61\xb5\x5d\xbc\xd6\x0b\xdd\xfa\x7e\x7a\xe0\x1c\xd9\xae\x47\x02\x69\x89\x71\x62\x84\x10\x68\xa6\x42\x0b\x4d\x29\x0d\x3b\x69\xf2\x17\xb6\xb2\x5f\x8b\x12\xa2\x35\xa7\x83\xe3\x63\x5b\xb2\x5a\x7b\x8f\x48\x52\x8b\x2c\x79\x13\xf5\x8b\x70\x8d\x94\x2d\x16\x04\x73\xa5\xf6\x5d\x7a\xea\x88\xe0\x74\x3c\x80\x4a\xf4\x34\xdf\x4b\xaf\xf5\x85\x8d\x41\x42\x42\x5d\xb1\xc5\x3f\x6e\x52\xf0\x1e\x64\xaf\xd3\xa0\x29\x82\xd2\xae\xd6\x40\xe2\x09\x7f\x0a\x6b\xd9\x44\x3e\x32\x6b\x94\x3e\xc9\x6f\x0b\x78\x34\xb8\x48\xd6\xd9\x43\x06\x72\x0a\xb6\x16\x8e\x89\x5d\x0f\x11\xb2\xf5\xf6\x4c\xe6\x72\x24\x74\x4c\xfc\xbc\x96\x34\x87\xac\x24\xb0\x1e\xff\x29\x1a\xe5\x0a\x7c\xe5\xb7\x4b\x88\xf4\x98\x51\x12\x92\xe8\x4f\x7c\x83\x9c\x78\x9b\x39\x8f\x8d\x1c\x49\x99\x65\x92\x13\x2e\x2a\x58\x12\xd5\x14\x98\xce\x40\xb9\xf7\xeb\x42\x0a\xd1\x0d\xae\x6d\xed\x07\x38\xb8\x90\x37\xeb\x40\x71\x4d\xef\x96\xa0\x70\xa9\xf4\x8f\x26\xb1\x4d\xcc\x43\xee\x66\x2c\x6d\x77\xcf\x62\xbe\xb5\x7d\xaa\x35\x13\x19\xf3\x6f\xe1\x14\x20\x57\x91\x39\xf8\x36\xc0\x01\xd3\xae\x55\xfc\xb6\xe0\xc5\x95\x02\xf8\x48\x10\x39\xb6\x81\xab\xe7\x37\x04\x0b\x80\xed\x24\x48\x6b\x5b\xb9\xcc\x04\x96\x17\x1a\xb7\xda\x8e\xb0\xf9\x4b\xee\x7f\x6d\xbb\x51\x75\x57\xc5\x60\x1d\xa7\xd8\x39\x7e\xf5\xc9\x47\x32\xfb\x7d\x4c\x55\xe3\xf7\xc9\x2c\x3d\x0c\x4e\x3a\x4d\xa7\xb6\xeb\xb4\x88\x1d\x7f\x51\xfd\xaa\x1a\x82\xc5\x89\x98\x76\x80\x8b\x9a\xe3\xf4\x85\x15\xff\xb5\x7c\x72\x04\x85\x24\xed\xf9\x93\xc7\x93\x31\x7c\x73\x55\xc1\x1f\x1a\xf9\xf8\x32\x53\xc8\xa6\x5f\x4d\x95\x12\x42\x8c\x2b\x29\xc1\x07\x36\x93\x4b\x01\x55\xd3\xad\x41\x04\xde\x66\x4e\xc4\x11\x1a\xa0\x7c\x38\x85\xfc\x62\xbe\x2d\x6d\xfc\x83\x32\x83\xa8\x1c\x31\xb9\xbe\x56\x26\xf0\x2c\x35\xb5\x2c\xbf\x71\x99\xa5\x79\xc5\xf2\x4d\xe6\x62\xba\x1e\x12\xd1\x59\xdb\x37\x6f\xc5\x1f\x59\x2f\xc3\xe9\x0a\xd1\xb4\xe9\x3f\xb6\x4e\x56\x8b\xd8\xac\x86\x07\xdf\x6c\xd5\xe7\xa3\xe3\xf2\x14\xc5\xf8\x10\xba\xe3\x9c\xad\xf6\x90\x02\x48\xf3\xcf\x59\x73\xb7\xd4\x80\xa1\x59\xfd\x09\x20\x2d\x92\x7a\x2f\x6d\xe8\x5b\x85\x7f\xa2\xa1\x39\x71\xfb\x9b\x88\xb0\x6c\x8e\x6e\xc2\x21\x6a\x31\x5b\x49\x90\xd3\xd4\x88\x39\xe6\x3d\x2b\xc6\x84\x49\x33\x01\xe9\x66\x86\xfd\x37\x64\x7a\xc8\xdf\x93\x8d\x0a\x0b\xe3\x69\x06\x47\x3c\xd3\x0f\x45\xc9\x76\x83\x3a\x53\x61\xb2\xa5\x4c\x6e\xbe\xca\xd9\x72\x7d\x11\x20\xd1\x8b\x82\x3c\x0b\xdd\x50\x4f\x4f\x69\x6f\x73\xdf\x3a\x39\x13\x20\xde\x74\x82\x7e\xaa\xab\xf1\xc8\xd3\x65\xd4\x34\xed\x1c\xd3\xf9\x87\x0c\x97\x36\x4f\x92\x94\x23\x23\x33\xec\xc8\xb1\xfa\x50\xd0\xcf\x93\x09\x56\x3b\x1c\x5f\xbb\x3c\xc7\xa9\x77\xcb\x53\xb7\x40\xc3\x14\x89\x91\x2c\xeb\xb4\x3c\x17\x1c\x20\xe5\x4f\x00\xca\xb5\x95\xed\xa1\x37\x1a\x5e\xf5\x01\x92\x04\xe7\xb7\x18\x7d\x40\x81\xdf\xc2\x8a\x78\xad\x38\x5f\xf5\xf3\x80\xbd\x44\x52\x42\x1a\xea\x0a\xdb\x0d\xb3\xab\x6a\xa4\x46\x5f\x8f\x07\x7e\xef\xb0\x3e\xbd\xbd\xdd\x63\x27\x19\x61\xf7\x29\xb3\xc3\x09\x12\x13\x1f\xb0\xe4\xfb\x8a\x94\xbb\x73\xe2\xd9\xaa\x0b\xac\xc9\x77\xdc\xaf\xe1\x5c\x19\xfc\xd4\xc8\x25\xa0\xf5\x63\x87\x82\x56\xbb\x35\x9f\x15\xea\x62\x3c\xd2\x66\x53\x2f\x3b\xd4\xe3\x0d\xef\x5d\x56\x94\xc6\xa9\x2b\x98\x4c\x49\x5c\xc1\x44\xb4\x77\x48\x0c\x53\xfe\x7d\x12\xbe\x37\x59\x29\xf8\x70\xb8\xbd\xfb\x2d\x21\x33\xa2\x0a\x27\x70\xe7\x07\x00\x52\xe7\xf4\x4d\x3b\x9c\x1d\x68\x0d\x37\xbe\xc3\xab\xc5\xb2\xbe\xbe\xe2\xad\x20\xf4\x60\x77\xc1\xcd\xbf\x3d\xe0\x8e\xe5\x9e\x88\x83\xe1\x2b\xdc\x20\xbd\xf0\x9f\xdc\x1b\x3a\x86\xaa\x7d\xb1\xe1\x8a\xdd\xc1\x1f\xf7\x08\xb3\xea\xdf\x73\xeb\xb4\xfb\xc4\x9a\x87\xeb\xab\x96\x89\xeb\x9d\x70\x53\xa1\x0f\xab\x64\xee\xe1\x5a\xa9\x49\x0f\xec\xf9\xc8\x30\x91\x08\xe1\x0b\x47\xef\x5f\x9e\xff\xcb\xae\x1f\x4f\x0b\x63\x7d\x73\xb2\x0a\x4e\x1a\x4a\x5b\x80\x09\xb0\x24\x79\x04\xc9\xf7\x66\x1b\x5d\x52\x5b\xdb\xa9\xfd\x2a\x0e\x21\x29\xf1\x52\xe2\x56\x0a\xd9\x5e\x45\xf6\x73\xca\x9e\xad\x05\xa6\x6f\xe1\x55\xc7\xa7\xd5\x87\x5b\xff\x7a\x0c\xf3\x85\xaf\xda\xab\x27\x28\xf5\x48\x58\xcb\xca\xb8\xff\xd4\x5c\xc7\xe0\xd8\x5b\x1b\x0c\xc6\xd9\x5f\x45\x9a\xe0\xdb\x7e\xac\x42\xef\xb4\xe1\xd1\x59\xcc\xc6\x0f\x46\xf8\xe8\xc6\x92\xed\x27\x50\x1f\x45\xd1\xd8\x4f\x97\xcf\x5c\x6a\x2c\xa2\x40\x30\x7e\x9b\x03\x8c\xda\xa1\x90\x12\xcf\x9d\x10\x83\xbb\x90\x8b\x72\x20\xc5\x24\x7e\x4e\xf2\xe8\xd4\x20\x22\x49\x07\x77\x3e\x56\x04\xb0\xd8\x76\x98\x78\x68\xb3\x69\xa0\x9d\x13\x11\xd7\x45\x88\x40\xad\x8b\xa9\x20\x49\x5f\x72\x5c\x4f\x80\x4c\x3f\xcd\xd2\x22\x32\xff\x8d\x22\xef\x4c\x41\xc3\xa9\x7c\x48\x1b\xc0\x3e\xa4\xff\x6b\xc7\xd2\x84\x57\x17\x0b\x75\x88\x1c\xea\x5d\x17\xc6\x46\xab\xa7\x32\x35\x79\x87\xfe\x47\x0e\xa0\x8b\x8a\x46\x43\xce\x16\x4d\x2a\x96\xd6\x93\xae\x5f\x2b\x23\xd2\xa9\xa7\xf9\xd9\xf3\xa4\xd3\x24\xec\xe2\x06\xa4\xfd\x20\x8d\x75\xbf\x93\x0c\x1a\xa3\xe3\x9d\xe0\xc4\xea\x0a\x64\x9d\x31\x48\xf6\x33\xb5\x97\x45\x25\x71\x89\x67\xe2\x7e\x73\x05\x2e\x82\x44\x2e\x76\x83\x62\x19\xdc\xde\x5c\x55\x3a\xa4\x8a\xfc\x9e\x9e\x10\x32\x8c\xe1\x59\x00\xc9\xf5\xd5\x96\x03\x78\x91\x46\x9e\x8a\x6b\xdf\x8c\xec\x4b\x8b\xe0\x41\xfe\x44\x1c\x2d\x3d\x20\xdf\x01\xd3\x1b\xe7\x8d\xdf\xd1\xa1\x89\xc2\x8d\x82\xe6\xef\x90\xe8\xd3\xbc\x28\xa9\x8f\x21\x88\x43\x8f\x28\x79\x8e\x2f\x41\xdd\xd3\x56\xfe\xe5\x1d\x67\xf9\x48\x1d\xd3\x04\x87\x77\x8e\x09\x84\x0a\x0d\x5b\xf8\x88\xa2\xac\xff\x50\x88\x8a\x05\xd7\x32\x6b\x7b\xfb\xc0\x7e\x91\xf3\xb1\x04\x70', 2)
6,709
20,067
0.750286
5,019
20,127
3.005977
0.052799
0.007954
0.007755
0.006363
0.002585
0.001591
0.001591
0
0
0
0
0.313218
0.000497
20,127
3
20,067
6,709
0.436745
0
0
0
0
0.333333
0.995131
0.995131
0
1
0
0
0
1
0
true
0
0.333333
0
0.333333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
1
1
1
null
1
0
0
0
0
0
1
0
1
0
0
0
0
11
0c918109949927a15ce654cc6733f090c7c1b5db
263
py
Python
packages/api/resources/python-templates/variables.py
ennovat/bumblebee
1146657bc848247b27d2f8b7f0c6521652b750ca
[ "Apache-2.0" ]
19
2021-06-17T22:12:16.000Z
2022-02-25T04:17:22.000Z
packages/api/resources/python-templates/variables.py
ennovat/bumblebee
1146657bc848247b27d2f8b7f0c6521652b750ca
[ "Apache-2.0" ]
62
2021-06-30T20:10:37.000Z
2022-03-24T18:09:26.000Z
packages/api/resources/python-templates/variables.py
ennovat/bumblebee
1146657bc848247b27d2f8b7f0c6521652b750ca
[ "Apache-2.0" ]
10
2021-06-24T11:25:47.000Z
2022-02-16T11:34:10.000Z
from optimus.helpers.functions import list_engines, list_dataframes, list_clusters, list_connections def optimus_variables(): return { "engines": list_engines(), "dataframes": list_dataframes(), "clusters": list_clusters(), "connections": list_connections() }
87.666667
137
0.787072
29
263
6.827586
0.448276
0.111111
0
0
0
0
0
0
0
0
0
0
0.087452
263
3
137
87.666667
0.825
0
0
0
0
0
0.136364
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
7
0cd37e4e6014f35c5266bd57f7639a5e7a4c5e35
611
py
Python
27-advanced-oop/soild-srp.py
ehsankorhani/python-lessons
a1974cb2b43b73751fc4737e3e3aa830aa16a644
[ "MIT" ]
null
null
null
27-advanced-oop/soild-srp.py
ehsankorhani/python-lessons
a1974cb2b43b73751fc4737e3e3aa830aa16a644
[ "MIT" ]
null
null
null
27-advanced-oop/soild-srp.py
ehsankorhani/python-lessons
a1974cb2b43b73751fc4737e3e3aa830aa16a644
[ "MIT" ]
null
null
null
# class Car: # def __init__(self, speed: float, odometer: int): # self.speed = speed # self.odometer = odometer # def accelerate(self): # return self.speed * 1.1 # def save_current_odometer(self): # pass class CarDB: def save_current_odometer(self, obj): pass class Car: def __init__(self, speed: float, odometer: int): self.speed = speed self.odometer = odometer self._db = CarDB() def accelerate(self): return self.speed * 1.1 def save_current_odometer(self): self._db.save_current_odometer(obj=self)
20.366667
53
0.615385
76
611
4.710526
0.236842
0.150838
0.212291
0.184358
0.821229
0.748603
0.748603
0.748603
0.748603
0.748603
0
0.009091
0.279869
611
29
54
21.068966
0.804545
0.373159
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.083333
0
0.083333
0.583333
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
11
0ce136c5ca03b536d33a02e59ee18ee73dc3c63c
51,458
py
Python
tests/test_medicationrequest.py
glichtner/fhir.resources
94896d8f8a0b7dd69253762aab968f4fd6eb69a0
[ "BSD-3-Clause" ]
null
null
null
tests/test_medicationrequest.py
glichtner/fhir.resources
94896d8f8a0b7dd69253762aab968f4fd6eb69a0
[ "BSD-3-Clause" ]
null
null
null
tests/test_medicationrequest.py
glichtner/fhir.resources
94896d8f8a0b7dd69253762aab968f4fd6eb69a0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/MedicationRequest Release: R5 Version: 4.5.0 Build ID: 0d95498 Last updated: 2021-04-03T00:34:11.075+00:00 """ from pydantic.validators import bytes_validator # noqa: F401 from fhir.resources import fhirtypes # noqa: F401 from fhir.resources import medicationrequest def impl_medicationrequest_1(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.contained[0].id == "med0320" assert inst.dispenseRequest.expectedSupplyDuration.code == "d" assert ( inst.dispenseRequest.expectedSupplyDuration.system == "http://unitsofmeasure.org" ) assert inst.dispenseRequest.expectedSupplyDuration.unit == "days" assert float(inst.dispenseRequest.expectedSupplyDuration.value) == float(5) assert inst.dispenseRequest.numberOfRepeatsAllowed == 1 assert inst.dispenseRequest.quantity.code == "TAB" assert ( inst.dispenseRequest.quantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dispenseRequest.quantity.unit == "TAB" assert float(inst.dispenseRequest.quantity.value) == float(6) assert inst.dispenseRequest.validityPeriod.end == fhirtypes.DateTime.validate( "2016-01-15" ) assert inst.dispenseRequest.validityPeriod.start == fhirtypes.DateTime.validate( "2015-01-15" ) assert ( inst.dosageInstruction[0].additionalInstruction[0].coding[0].code == "311504000" ) assert ( inst.dosageInstruction[0].additionalInstruction[0].coding[0].display == "With or after food" ) assert ( inst.dosageInstruction[0].additionalInstruction[0].coding[0].system == "http://snomed.info/sct" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "TAB" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "TAB" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 2 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].method.coding[0].code == "421521009" assert ( inst.dosageInstruction[0].method.coding[0].display == "Swallow - dosing instruction imperative (qualifier value)" ) assert inst.dosageInstruction[0].method.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].route.coding[0].code == "26643006" assert inst.dosageInstruction[0].route.coding[0].display == "Oral Route" assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == "Two tablets at once" assert inst.dosageInstruction[0].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(1) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "d" assert ( inst.dosageInstruction[1].additionalInstruction[0].coding[0].code == "311504000" ) assert ( inst.dosageInstruction[1].additionalInstruction[0].coding[0].display == "With or after food" ) assert ( inst.dosageInstruction[1].additionalInstruction[0].coding[0].system == "http://snomed.info/sct" ) assert inst.dosageInstruction[1].doseAndRate[0].doseQuantity.code == "TAB" assert ( inst.dosageInstruction[1].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[1].doseAndRate[0].doseQuantity.unit == "TAB" assert float(inst.dosageInstruction[1].doseAndRate[0].doseQuantity.value) == float( 1 ) assert inst.dosageInstruction[1].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[1].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[1].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[1].route.coding[0].code == "26643006" assert inst.dosageInstruction[1].route.coding[0].display == "Oral Route" assert inst.dosageInstruction[1].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[1].sequence == 2 assert inst.dosageInstruction[1].text == "One tablet daily for 4 days" assert inst.dosageInstruction[1].timing.repeat.frequency == 4 assert float(inst.dosageInstruction[1].timing.repeat.period) == float(1) assert inst.dosageInstruction[1].timing.repeat.periodUnit == "d" assert inst.encounter.display == "encounter who leads to this prescription" assert inst.encounter.reference == "Encounter/f001" assert inst.id == "medrx0302" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.reference == "#med0320" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.note[0].text == "Patient told to take with food" assert inst.reason[0].concept.coding[0].code == "11840006" assert inst.reason[0].concept.coding[0].display == "Traveller's Diarrhea (disorder)" assert inst.reason[0].concept.coding[0].system == "http://snomed.info/sct" assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.substitution.allowedBoolean is True assert inst.substitution.reason.coding[0].code == "FP" assert inst.substitution.reason.coding[0].display == "formulary policy" assert ( inst.substitution.reason.coding[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.supportingInformation[0].reference == "Coverage/SP1234" assert inst.text.status == "generated" def test_medicationrequest_1(base_settings): """No. 1 tests collection for MedicationRequest. Test File: medicationrequest0302.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0302.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_1(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_1(inst2) def impl_medicationrequest_2(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-03-01") assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == "Take one tablet daily as directed" assert inst.encounter.display == "encounter that leads to this prescription" assert inst.encounter.reference == "Encounter/f001" assert inst.id == "medrx002" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345" assert inst.intent == "order" assert inst.medication.reference.display == "prescribed medication" assert inst.medication.reference.reference == "Medication/med0316" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.reason[0].concept.coding[0].code == "59621000" assert ( inst.reason[0].concept.coding[0].display == "Essential hypertension (disorder)" ) assert inst.reason[0].concept.coding[0].system == "http://snomed.info/sct" assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.text.status == "generated" def test_medicationrequest_2(base_settings): """No. 2 tests collection for MedicationRequest. Test File: medicationrequestexample2.json """ filename = base_settings["unittest_data_dir"] / "medicationrequestexample2.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_2(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_2(inst2) def impl_medicationrequest_3(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.contained[0].id == "med0302" assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "g" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "g" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 4.5 ) assert inst.dosageInstruction[0].doseAndRate[0].rateQuantity.code == "ml/h" assert ( inst.dosageInstruction[0].doseAndRate[0].rateQuantity.system == "http://unitsofmeasure.org" ) assert float(inst.dosageInstruction[0].doseAndRate[0].rateQuantity.value) == float( 50 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].route.coding[0].code == "47625008" assert ( inst.dosageInstruction[0].route.coding[0].display == "Intravenous route (qualifier value)" ) assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == ( "4.5 grams in D5W 250 ml. IV every 6 hours.Infuse over 30 min" " at 8L/min " ) assert inst.dosageInstruction[0].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(6) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "h" assert inst.id == "medrx0319" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.display == "Piperacillin/Tazobactam 4.5gm" assert inst.medication.reference.reference == "#med0302" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.reason[0].concept.coding[0].code == "385093006" assert ( inst.reason[0].concept.coding[0].display == "Community acquired pneumonia (disorder)" ) assert inst.reason[0].concept.coding[0].system == "http://snomed.info/sct" assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "completed" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.text.status == "generated" def test_medicationrequest_3(base_settings): """No. 3 tests collection for MedicationRequest. Test File: medicationrequest0319.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0319.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_3(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_3(inst2) def impl_medicationrequest_4(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.contained[0].id == "med0315" assert inst.dispenseRequest.expectedSupplyDuration.code == "d" assert ( inst.dispenseRequest.expectedSupplyDuration.system == "http://unitsofmeasure.org" ) assert inst.dispenseRequest.expectedSupplyDuration.unit == "days" assert float(inst.dispenseRequest.expectedSupplyDuration.value) == float(30) assert inst.dispenseRequest.numberOfRepeatsAllowed == 3 assert inst.dispenseRequest.quantity.code == "ml" assert inst.dispenseRequest.quantity.system == "http://unitsofmeasure.org" assert inst.dispenseRequest.quantity.unit == "ml" assert float(inst.dispenseRequest.quantity.value) == float(30) assert inst.dispenseRequest.validityPeriod.end == fhirtypes.DateTime.validate( "2016-01-15" ) assert inst.dispenseRequest.validityPeriod.start == fhirtypes.DateTime.validate( "2015-01-15" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "NASINHL" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "ea" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 1 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == "Use 1 spray twice daily" assert inst.dosageInstruction[0].timing.repeat.frequency == 2 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(1) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "d" assert inst.id == "medrx0328" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.reference == "#med0315" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.substitution.allowedBoolean is True assert inst.substitution.reason.coding[0].code == "FP" assert inst.substitution.reason.coding[0].display == "formulary policy" assert ( inst.substitution.reason.coding[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.text.status == "generated" def test_medicationrequest_4(base_settings): """No. 4 tests collection for MedicationRequest. Test File: medicationrequest0328.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0328.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_4(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_4(inst2) def impl_medicationrequest_5(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.contained[0].id == "med0314" assert inst.dispenseRequest.expectedSupplyDuration.code == "d" assert ( inst.dispenseRequest.expectedSupplyDuration.system == "http://unitsofmeasure.org" ) assert inst.dispenseRequest.expectedSupplyDuration.unit == "days" assert float(inst.dispenseRequest.expectedSupplyDuration.value) == float(10) assert inst.dispenseRequest.numberOfRepeatsAllowed == 1 assert inst.dispenseRequest.quantity.code == "TAB" assert ( inst.dispenseRequest.quantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dispenseRequest.quantity.unit == "TAB" assert float(inst.dispenseRequest.quantity.value) == float(30) assert inst.dispenseRequest.validityPeriod.end == fhirtypes.DateTime.validate( "2016-01-15" ) assert inst.dispenseRequest.validityPeriod.start == fhirtypes.DateTime.validate( "2015-01-15" ) assert ( inst.dosageInstruction[0].additionalInstruction[0].coding[0].code == "418914006" ) assert inst.dosageInstruction[0].additionalInstruction[0].coding[0].display == ( "Warning. May cause drowsiness. If affected do not drive or " "operate machinery. Avoid alcoholic drink (qualifier value)" ) assert ( inst.dosageInstruction[0].additionalInstruction[0].coding[0].system == "http://snomed.info/sct" ) assert ( inst.dosageInstruction[0].asNeededCodeableConcept.coding[0].code == "266599000" ) assert ( inst.dosageInstruction[0].asNeededCodeableConcept.coding[0].display == "Dysmenorrhea (disorder)" ) assert ( inst.dosageInstruction[0].asNeededCodeableConcept.coding[0].system == "http://snomed.info/sct" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "TAB" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "TAB" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 1 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].maxDosePerAdministration.code == "mg" assert ( inst.dosageInstruction[0].maxDosePerAdministration.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].maxDosePerAdministration.unit == "mg" assert float(inst.dosageInstruction[0].maxDosePerAdministration.value) == float(4) assert inst.dosageInstruction[0].route.coding[0].code == "26643006" assert inst.dosageInstruction[0].route.coding[0].display == "Oral Route" assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == ( "0.25mg PO every 6-12 hours as needed for menses from Jan " "15-20, 2015. Do not exceed more than 4mg per day" ) assert inst.dosageInstruction[ 0 ].timing.repeat.boundsPeriod.end == fhirtypes.DateTime.validate("2015-01-20") assert inst.dosageInstruction[ 0 ].timing.repeat.boundsPeriod.start == fhirtypes.DateTime.validate("2015-01-15") assert inst.dosageInstruction[0].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(6) assert float(inst.dosageInstruction[0].timing.repeat.periodMax) == float(12) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "h" assert inst.encounter.display == "encounter who leads to this prescription" assert inst.encounter.reference == "Encounter/f001" assert inst.id == "medrx0305" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.reference == "#med0314" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "completed" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.substitution.allowedBoolean is True assert inst.substitution.reason.coding[0].code == "FP" assert inst.substitution.reason.coding[0].display == "formulary policy" assert ( inst.substitution.reason.coding[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.text.status == "generated" def test_medicationrequest_5(base_settings): """No. 5 tests collection for MedicationRequest. Test File: medicationrequest0305.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0305.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_5(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_5(inst2) def impl_medicationrequest_6(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.contained[0].id == "med0305" assert inst.dispenseRequest.expectedSupplyDuration.code == "d" assert ( inst.dispenseRequest.expectedSupplyDuration.system == "http://unitsofmeasure.org" ) assert inst.dispenseRequest.expectedSupplyDuration.unit == "days" assert float(inst.dispenseRequest.expectedSupplyDuration.value) == float(30) assert inst.dispenseRequest.numberOfRepeatsAllowed == 1 assert inst.dispenseRequest.quantity.code == "mL" assert inst.dispenseRequest.quantity.system == "http://unitsofmeasure.org" assert inst.dispenseRequest.quantity.unit == "mL" assert float(inst.dispenseRequest.quantity.value) == float(10) assert inst.dispenseRequest.validityPeriod.end == fhirtypes.DateTime.validate( "2016-01-15" ) assert inst.dispenseRequest.validityPeriod.start == fhirtypes.DateTime.validate( "2015-01-15" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "OPDROP" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "OPDROP" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 1 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].method.coding[0].code == "421538008" assert ( inst.dosageInstruction[0].method.coding[0].display == "Instill - dosing instruction imperative (qualifier value)" ) assert inst.dosageInstruction[0].method.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].route.coding[0].code == "54485002" assert ( inst.dosageInstruction[0].route.coding[0].display == "Ophthalmic route (qualifier value)" ) assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == "Instil one drop in each eye twice daily" assert inst.dosageInstruction[0].timing.repeat.frequency == 2 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(1) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "d" assert inst.encounter.display == "encounter who leads to this prescription" assert inst.encounter.reference == "Encounter/f002" assert inst.id == "medrx0330" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.reference == "#med0305" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.substitution.allowedBoolean is False assert inst.substitution.reason.coding[0].code == "FP" assert inst.substitution.reason.coding[0].display == "formulary policy" assert ( inst.substitution.reason.coding[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.text.status == "generated" def test_medicationrequest_6(base_settings): """No. 6 tests collection for MedicationRequest. Test File: medicationrequest0330.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0330.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_6(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_6(inst2) def impl_medicationrequest_7(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.basedOn[0].reference == "CarePlan/gpvisit" assert inst.contained[0].id == "med0311" assert inst.dispenseRequest.dispenser.reference == "Organization/f001" assert inst.dispenseRequest.expectedSupplyDuration.code == "d" assert ( inst.dispenseRequest.expectedSupplyDuration.system == "http://unitsofmeasure.org" ) assert inst.dispenseRequest.expectedSupplyDuration.unit == "days" assert float(inst.dispenseRequest.expectedSupplyDuration.value) == float(21) assert inst.dispenseRequest.numberOfRepeatsAllowed == 1 assert inst.dispenseRequest.quantity.code == "TAB" assert ( inst.dispenseRequest.quantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dispenseRequest.quantity.unit == "TAB" assert float(inst.dispenseRequest.quantity.value) == float(51) assert inst.dispenseRequest.validityPeriod.end == fhirtypes.DateTime.validate( "2016-01-15" ) assert inst.dispenseRequest.validityPeriod.start == fhirtypes.DateTime.validate( "2015-01-15" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "TAB" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "TAB" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 4 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].method.coding[0].code == "421521009" assert ( inst.dosageInstruction[0].method.coding[0].display == "Swallow - dosing instruction imperative (qualifier value)" ) assert inst.dosageInstruction[0].method.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].route.coding[0].code == "26643006" assert inst.dosageInstruction[0].route.coding[0].display == "Oral Route" assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert ( inst.dosageInstruction[0].text == "Take 4 tablets daily for 7 days starting January 16, 2015" ) assert inst.dosageInstruction[ 0 ].timing.repeat.boundsPeriod.end == fhirtypes.DateTime.validate("2015-01-22") assert inst.dosageInstruction[ 0 ].timing.repeat.boundsPeriod.start == fhirtypes.DateTime.validate("2015-01-16") assert inst.dosageInstruction[0].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(1) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "d" assert inst.dosageInstruction[1].doseAndRate[0].doseQuantity.code == "TAB" assert ( inst.dosageInstruction[1].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[1].doseAndRate[0].doseQuantity.unit == "TAB" assert float(inst.dosageInstruction[1].doseAndRate[0].doseQuantity.value) == float( 2 ) assert inst.dosageInstruction[1].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[1].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[1].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[1].method.coding[0].code == "421521009" assert ( inst.dosageInstruction[1].method.coding[0].display == "Swallow - dosing instruction imperative (qualifier value)" ) assert inst.dosageInstruction[1].method.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[1].route.coding[0].code == "26643006" assert inst.dosageInstruction[1].route.coding[0].display == "Oral Route" assert inst.dosageInstruction[1].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[1].sequence == 2 assert ( inst.dosageInstruction[1].text == "Take 2 tablets daily for 7 days starting January 23, 2015" ) assert inst.dosageInstruction[ 1 ].timing.repeat.boundsPeriod.end == fhirtypes.DateTime.validate("2015-01-29") assert inst.dosageInstruction[ 1 ].timing.repeat.boundsPeriod.start == fhirtypes.DateTime.validate("2015-01-23") assert inst.dosageInstruction[1].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[1].timing.repeat.period) == float(1) assert inst.dosageInstruction[1].timing.repeat.periodUnit == "d" assert inst.dosageInstruction[2].doseAndRate[0].doseQuantity.code == "TAB" assert ( inst.dosageInstruction[2].doseAndRate[0].doseQuantity.system == "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" ) assert inst.dosageInstruction[2].doseAndRate[0].doseQuantity.unit == "TAB" assert float(inst.dosageInstruction[2].doseAndRate[0].doseQuantity.value) == float( 1 ) assert inst.dosageInstruction[2].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[2].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[2].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[2].method.coding[0].code == "421521009" assert ( inst.dosageInstruction[2].method.coding[0].display == "Swallow - dosing instruction imperative (qualifier value)" ) assert inst.dosageInstruction[2].method.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[2].route.coding[0].code == "26643006" assert inst.dosageInstruction[2].route.coding[0].display == "Oral Route" assert inst.dosageInstruction[2].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[2].sequence == 3 assert ( inst.dosageInstruction[2].text == "Take 1 tablets daily for 7 days starting January 30, 2015" ) assert inst.dosageInstruction[ 2 ].timing.repeat.boundsPeriod.end == fhirtypes.DateTime.validate("2015-02-05") assert inst.dosageInstruction[ 2 ].timing.repeat.boundsPeriod.start == fhirtypes.DateTime.validate("2015-01-30") assert inst.dosageInstruction[2].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[2].timing.repeat.period) == float(1) assert inst.dosageInstruction[2].timing.repeat.periodUnit == "d" assert inst.encounter.display == "encounter who leads to this prescription" assert inst.encounter.reference == "Encounter/f001" assert inst.groupIdentifier.system == "http://www.bmc.nl/portal/prescriptions" assert inst.groupIdentifier.use == "official" assert inst.groupIdentifier.value == "983939393" assert inst.id == "medrx0303" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.reference == "#med0311" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.note[0].text == "Patient told to take with food" assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.substitution.allowedCodeableConcept.coding[0].code == "TB" assert ( inst.substitution.allowedCodeableConcept.coding[0].display == "Therapeutic Brand" ) assert inst.substitution.allowedCodeableConcept.coding[0].system == ( "http://terminology.hl7.org/CodeSystem/v3-substanceAdminSubst" "itution" ) assert inst.substitution.reason.coding[0].code == "FP" assert inst.substitution.reason.coding[0].display == "formulary policy" assert ( inst.substitution.reason.coding[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.text.status == "generated" def test_medicationrequest_7(base_settings): """No. 7 tests collection for MedicationRequest. Test File: medicationrequest0303.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0303.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_7(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_7(inst2) def impl_medicationrequest_8(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.contained[0].id == "med0301" assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "mg" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "mg" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 500 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].method.coding[0].code == "420620005" assert ( inst.dosageInstruction[0].method.coding[0].display == "Push - dosing instruction imperative (qualifier value)" ) assert inst.dosageInstruction[0].method.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].route.coding[0].code == "255560000" assert inst.dosageInstruction[0].route.coding[0].display == "Intravenous" assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == "500mg IV q6h x 3 days" assert inst.dosageInstruction[0].timing.event[0] == fhirtypes.DateTime.validate( "2020-01-01" ) assert inst.dosageInstruction[ 0 ].timing.repeat.boundsPeriod.end == fhirtypes.DateTime.validate("2020-01-10") assert inst.dosageInstruction[ 0 ].timing.repeat.boundsPeriod.start == fhirtypes.DateTime.validate("2020-01-01") assert inst.dosageInstruction[0].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(6) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "h" assert inst.encounter.display == "encounter who leads to this prescription" assert inst.encounter.reference == "Encounter/f001" assert inst.id == "medrx0318" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.reference == "#med0301" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.note[0].text == ( "culture expected back in 12 hours - may switch depending on " "results" ) assert inst.reason[0].concept.coding[0].code == "11840006" assert inst.reason[0].concept.coding[0].display == "Traveller's Diarrhea (disorder)" assert inst.reason[0].concept.coding[0].system == "http://snomed.info/sct" assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.text.status == "generated" def test_medicationrequest_8(base_settings): """No. 8 tests collection for MedicationRequest. Test File: medicationrequest0318.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0318.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_8(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_8(inst2) def impl_medicationrequest_9(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.dispenseRequest.expectedSupplyDuration.code == "d" assert ( inst.dispenseRequest.expectedSupplyDuration.system == "http://unitsofmeasure.org" ) assert inst.dispenseRequest.expectedSupplyDuration.unit == "days" assert float(inst.dispenseRequest.expectedSupplyDuration.value) == float(30) assert inst.dispenseRequest.numberOfRepeatsAllowed == 3 assert inst.dispenseRequest.quantity.code == "mL" assert inst.dispenseRequest.quantity.system == "http://unitsofmeasure.org" assert inst.dispenseRequest.quantity.unit == "mL" assert float(inst.dispenseRequest.quantity.value) == float(360) assert inst.dispenseRequest.validityPeriod.end == fhirtypes.DateTime.validate( "2016-01-15" ) assert inst.dispenseRequest.validityPeriod.start == fhirtypes.DateTime.validate( "2015-01-15" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.code == "mg" assert ( inst.dosageInstruction[0].doseAndRate[0].doseQuantity.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].doseAndRate[0].doseQuantity.unit == "mg" assert float(inst.dosageInstruction[0].doseAndRate[0].doseQuantity.value) == float( 100 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].route.coding[0].code == "26643006" assert ( inst.dosageInstruction[0].route.coding[0].display == "Oral Route (qualifier value)" ) assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == "100mg (4ml) three times daily" assert inst.dosageInstruction[0].timing.repeat.frequency == 3 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(1) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "d" assert inst.id == "medrx0312" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.concept.coding[0].code == "1313112" assert ( inst.medication.concept.coding[0].display == "Phenytoin 25mg/ml oral suspension" ) assert ( inst.medication.concept.coding[0].system == "http://www.nlm.nih.gov/research/umls/rxnorm" ) assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert ( inst.note[0].text == "Patient should be counselled to ensure good dental hygiene" ) assert inst.priorPrescription.reference == "MedicationRequest/medrx0304" assert inst.reason[0].concept.coding[0].code == "230456007" assert inst.reason[0].concept.coding[0].display == "Status epilepticus (disorder)" assert inst.reason[0].concept.coding[0].system == "http://snomed.info/sct" assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.substitution.allowedBoolean is True assert inst.substitution.reason.coding[0].code == "CT" assert inst.substitution.reason.coding[0].display == "Continuing therapy" assert ( inst.substitution.reason.coding[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.text.status == "generated" def test_medicationrequest_9(base_settings): """No. 9 tests collection for MedicationRequest. Test File: medicationrequest0312.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0312.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_9(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_9(inst2) def impl_medicationrequest_10(inst): assert inst.authoredOn == fhirtypes.DateTime.validate("2015-01-15") assert inst.contained[0].id == "med0313" assert inst.dosageInstruction[0].asNeededBoolean is True assert inst.dosageInstruction[0].doseAndRate[0].doseRange.high.code == "mg/kg" assert ( inst.dosageInstruction[0].doseAndRate[0].doseRange.high.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].doseAndRate[0].doseRange.high.unit == "mg/kg" assert float( inst.dosageInstruction[0].doseAndRate[0].doseRange.high.value ) == float(0.1) assert inst.dosageInstruction[0].doseAndRate[0].doseRange.low.code == "mg/kg" assert ( inst.dosageInstruction[0].doseAndRate[0].doseRange.low.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].doseAndRate[0].doseRange.low.unit == "mg/kg" assert float(inst.dosageInstruction[0].doseAndRate[0].doseRange.low.value) == float( 0.05 ) assert inst.dosageInstruction[0].doseAndRate[0].rateRange.high.code == "min" assert ( inst.dosageInstruction[0].doseAndRate[0].rateRange.high.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].doseAndRate[0].rateRange.high.unit == "min" assert float( inst.dosageInstruction[0].doseAndRate[0].rateRange.high.value ) == float(5) assert inst.dosageInstruction[0].doseAndRate[0].rateRange.low.code == "min" assert ( inst.dosageInstruction[0].doseAndRate[0].rateRange.low.system == "http://unitsofmeasure.org" ) assert inst.dosageInstruction[0].doseAndRate[0].rateRange.low.unit == "min" assert float(inst.dosageInstruction[0].doseAndRate[0].rateRange.low.value) == float( 2 ) assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].code == "ordered" assert inst.dosageInstruction[0].doseAndRate[0].type.coding[0].display == "Ordered" assert ( inst.dosageInstruction[0].doseAndRate[0].type.coding[0].system == "http://terminology.hl7.org/CodeSystem/dose-rate-type" ) assert inst.dosageInstruction[0].method.coding[0].code == "420620005" assert ( inst.dosageInstruction[0].method.coding[0].display == "Push - dosing instruction imperative (qualifier value)" ) assert inst.dosageInstruction[0].method.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].route.coding[0].code == "255560000" assert inst.dosageInstruction[0].route.coding[0].display == "Intravenous" assert inst.dosageInstruction[0].route.coding[0].system == "http://snomed.info/sct" assert inst.dosageInstruction[0].sequence == 1 assert inst.dosageInstruction[0].text == ( "0.05 - 0.1mg/kg IV over 2-5 minutes every 15 minutes as " "needed" ) assert inst.dosageInstruction[0].timing.repeat.frequency == 1 assert float(inst.dosageInstruction[0].timing.repeat.period) == float(15) assert inst.dosageInstruction[0].timing.repeat.periodUnit == "min" assert inst.encounter.display == "encounter who leads to this prescription" assert inst.encounter.reference == "Encounter/f001" assert inst.id == "medrx0315" assert inst.identifier[0].system == "http://www.bmc.nl/portal/prescriptions" assert inst.identifier[0].use == "official" assert inst.identifier[0].value == "12345689" assert inst.intent == "order" assert inst.medication.reference.reference == "#med0313" assert inst.meta.tag[0].code == "HTEST" assert inst.meta.tag[0].display == "test health data" assert ( inst.meta.tag[0].system == "http://terminology.hl7.org/CodeSystem/v3-ActReason" ) assert inst.reason[0].concept.coding[0].code == "84757009" assert inst.reason[0].concept.coding[0].display == "Epilepsy (disorder)" assert inst.reason[0].concept.coding[0].system == "http://snomed.info/sct" assert inst.requester.display == "Patrick Pump" assert inst.requester.reference == "Practitioner/f007" assert inst.status == "active" assert inst.subject.display == "Donald Duck" assert inst.subject.reference == "Patient/pat1" assert inst.text.status == "generated" def test_medicationrequest_10(base_settings): """No. 10 tests collection for MedicationRequest. Test File: medicationrequest0315.json """ filename = base_settings["unittest_data_dir"] / "medicationrequest0315.json" inst = medicationrequest.MedicationRequest.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "MedicationRequest" == inst.resource_type impl_medicationrequest_10(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "MedicationRequest" == data["resourceType"] inst2 = medicationrequest.MedicationRequest(**data) impl_medicationrequest_10(inst2)
45.903657
88
0.702126
5,842
51,458
6.158679
0.068127
0.141471
0.160594
0.126074
0.922232
0.913922
0.891909
0.858584
0.825871
0.802023
0
0.041743
0.162016
51,458
1,120
89
45.944643
0.79263
0.032939
0
0.615768
0
0
0.189585
0.00633
0
0
0
0
0.56986
1
0.01996
false
0
0.002994
0
0.022954
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
7
0cfbe506e8edb8d7262bee1972f93f2e1e920c64
3,002
py
Python
livestyled/schemas/tests/test_device.py
andrelopez/python-sdk
3c83d4698ecf6b5b59003d20cb26644e0dd77f61
[ "MIT" ]
null
null
null
livestyled/schemas/tests/test_device.py
andrelopez/python-sdk
3c83d4698ecf6b5b59003d20cb26644e0dd77f61
[ "MIT" ]
1
2021-07-09T10:59:21.000Z
2021-07-09T10:59:21.000Z
livestyled/schemas/tests/test_device.py
andrelopez/python-sdk
3c83d4698ecf6b5b59003d20cb26644e0dd77f61
[ "MIT" ]
3
2021-02-01T10:13:36.000Z
2022-02-11T17:47:30.000Z
from datetime import datetime, timedelta, timezone import os from livestyled.schemas.device import DeviceSchema FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixtures') TEST_API_DOMAIN = 'test.livestyled.com' def test_deserialize_device(): with open(os.path.join(FIXTURES_DIR, 'example_device.json'), 'r') as fixture_file: device = fixture_file.read() deserialized_device = DeviceSchema().loads(device) assert deserialized_device == { 'id': 1754392, 'token': 'A12B149B-20C1-4958-B85F-4D248123456', 'push_consents': [], 'type': 'IOS', 'status': 'ACTIVE', 'app_version': '10.8', 'os_version': '13.3', 'model': 'Simulator', 'manufacturer': 'APPLE', 'bluetooth_on': False, 'wifi_connected': True, 'created_at': datetime(2020, 2, 5, 14, 29, 40, tzinfo=timezone(timedelta(0), '+0000')), 'updated_at': datetime(2020, 2, 5, 14, 29, 40, tzinfo=timezone(timedelta(0), '+0000')), 'consent': { 'calendar': False, 'camera': False, 'id': 4299, 'location_capture': True, 'location_granular': 'appInUse', 'photo_sharing': False, 'push_notification': True, 'created_at': datetime(2020, 2, 5, 14, 29, 53, tzinfo=timezone(timedelta(0), '+0000')), 'updated_at': datetime(2020, 2, 5, 14, 29, 56, tzinfo=timezone(timedelta(0), '+0000')) } } def test_deserialize_device_no_push_consents(): with open(os.path.join(FIXTURES_DIR, 'example_device_no_push_consents.json'), 'r') as fixture_file: device = fixture_file.read() deserialized_device = DeviceSchema().loads(device) assert deserialized_device == { 'id': 1754392, 'token': 'A12B149B-20C1-4958-B85F-4D248123456', 'push_consents': None, 'type': 'IOS', 'status': 'ACTIVE', 'app_version': '10.8', 'os_version': '13.3', 'model': 'Simulator', 'manufacturer': 'APPLE', 'bluetooth_on': False, 'wifi_connected': True, 'created_at': datetime(2020, 2, 5, 14, 29, 40, tzinfo=timezone(timedelta(0), '+0000')), 'updated_at': datetime(2020, 2, 5, 14, 29, 40, tzinfo=timezone(timedelta(0), '+0000')), 'consent': { 'calendar': False, 'camera': False, 'id': 4299, 'location_capture': True, 'location_granular': 'appInUse', 'photo_sharing': False, 'push_notification': True, 'created_at': datetime(2020, 2, 5, 14, 29, 53, tzinfo=timezone(timedelta(0), '+0000')), 'updated_at': datetime(2020, 2, 5, 14, 29, 56, tzinfo=timezone(timedelta(0), '+0000')) } }
41.123288
103
0.539307
311
3,002
5.028939
0.289389
0.051151
0.071611
0.076726
0.838875
0.838875
0.838875
0.838875
0.838875
0.785166
0
0.105416
0.311126
3,002
72
104
41.694444
0.65087
0
0
0.769231
0
0
0.237175
0.03531
0
0
0
0
0.030769
1
0.030769
false
0
0.046154
0
0.076923
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0b2f4386a6ca1cb349ba6ba54105ffa74305f3d7
170
py
Python
ciforecast/__init__.py
juliandehoog/carbon-intensity-forecast
a3bb0f03ad0742219388b46fc5cad4b5b6109a5a
[ "MIT" ]
null
null
null
ciforecast/__init__.py
juliandehoog/carbon-intensity-forecast
a3bb0f03ad0742219388b46fc5cad4b5b6109a5a
[ "MIT" ]
null
null
null
ciforecast/__init__.py
juliandehoog/carbon-intensity-forecast
a3bb0f03ad0742219388b46fc5cad4b5b6109a5a
[ "MIT" ]
null
null
null
from ciforecast.model_names import CarbonIntensityForecastModels from ciforecast.forecast import generate_forecast, generate_forecast_from_ci, generate_forecast_from_mix
56.666667
104
0.917647
20
170
7.4
0.5
0.324324
0.27027
0
0
0
0
0
0
0
0
0
0.058824
170
2
105
85
0.925
0
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
0b5dfff7098654acf211490512b5f42aab4a3191
147
py
Python
LeetCode/0062_Unique_Paths.py
Achyut-sudo/PythonAlgorithms
21fb6522510fde7a0877b19a8cedd4665938a4df
[ "MIT" ]
144
2020-09-13T22:54:57.000Z
2022-02-24T21:54:25.000Z
LeetCode/0062_Unique_Paths.py
Achyut-sudo/PythonAlgorithms
21fb6522510fde7a0877b19a8cedd4665938a4df
[ "MIT" ]
587
2020-05-06T18:55:07.000Z
2021-09-20T13:14:53.000Z
LeetCode/0062_Unique_Paths.py
Achyut-sudo/PythonAlgorithms
21fb6522510fde7a0877b19a8cedd4665938a4df
[ "MIT" ]
523
2020-09-09T12:07:13.000Z
2022-02-24T21:54:31.000Z
class Solution: def uniquePaths(self, m: int, n: int) -> int: return math.factorial(n+m-2)//(math.factorial(m-1)*math.factorial(n-1))
49
79
0.639456
24
147
3.916667
0.541667
0.414894
0.297872
0
0
0
0
0
0
0
0
0.02459
0.170068
147
3
79
49
0.745902
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
0bbc05ea9d03426c4ed6a509f3d78e14142bebab
21,557
py
Python
src/azure-cli/azure/cli/command_modules/billing/generated/custom.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
7
2020-04-26T09:54:05.000Z
2021-07-22T16:54:41.000Z
src/azure-cli/azure/cli/command_modules/billing/generated/custom.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
2
2017-02-11T21:16:40.000Z
2017-02-11T21:30:54.000Z
src/azure-cli/azure/cli/command_modules/billing/generated/custom.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
13
2020-06-30T16:23:36.000Z
2022-03-29T17:12:05.000Z
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- # pylint: disable=line-too-long # pylint: disable=too-many-lines # pylint: disable=no-else-return from azure.cli.core.util import sdk_no_wait def billing_account_list(client, expand=None): return client.list(expand=expand) def billing_account_show(client, account_name, expand=None): return client.get(billing_account_name=account_name, expand=expand) def billing_account_update(client, account_name, display_name=None, sold_to=None, departments=None, enrollment_accounts=None, billing_profiles_value=None, no_wait=False): parameters = {} parameters['display_name'] = display_name parameters['sold_to'] = sold_to parameters['departments'] = departments parameters['enrollment_accounts'] = enrollment_accounts parameters['billing_profiles'] = {} parameters['billing_profiles']['value'] = billing_profiles_value return sdk_no_wait(no_wait, client.update, billing_account_name=account_name, parameters=parameters) def billing_balance_show(client, account_name, profile_name): return client.get(billing_account_name=account_name, billing_profile_name=profile_name) def billing_instruction_list(client, account_name, profile_name): return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name) def billing_instruction_show(client, account_name, profile_name, name): return client.get(billing_account_name=account_name, billing_profile_name=profile_name, instruction_name=name) def billing_instruction_create(client, account_name, profile_name, name, amount=None, start_date=None, end_date=None, creation_date=None): parameters = {} parameters['amount'] = amount parameters['start_date'] = start_date parameters['end_date'] = end_date parameters['creation_date'] = creation_date return client.put(billing_account_name=account_name, billing_profile_name=profile_name, instruction_name=name, parameters=parameters) def billing_profile_list(client, account_name, expand=None): return client.list_by_billing_account(billing_account_name=account_name, expand=expand) def billing_profile_show(client, account_name, profile_name, expand=None): return client.get(billing_account_name=account_name, billing_profile_name=profile_name, expand=expand) def billing_profile_create(client, account_name, profile_name, display_name=None, po_number=None, bill_to=None, invoice_email_opt_in=None, enabled_azure_plans=None, invoice_sections_value=None, no_wait=False): parameters = {} parameters['display_name'] = display_name parameters['po_number'] = po_number parameters['bill_to'] = bill_to parameters['invoice_email_opt_in'] = invoice_email_opt_in parameters['enabled_azure_plans'] = enabled_azure_plans parameters['invoice_sections'] = {} parameters['invoice_sections']['value'] = invoice_sections_value return sdk_no_wait(no_wait, client.create_or_update, billing_account_name=account_name, billing_profile_name=profile_name, parameters=parameters) def billing_profile_update(client, account_name, profile_name, display_name=None, po_number=None, bill_to=None, invoice_email_opt_in=None, enabled_azure_plans=None, invoice_sections_value=None, no_wait=False): parameters = {} parameters['display_name'] = display_name parameters['po_number'] = po_number parameters['bill_to'] = bill_to parameters['invoice_email_opt_in'] = invoice_email_opt_in parameters['enabled_azure_plans'] = enabled_azure_plans parameters['invoice_sections'] = {} parameters['invoice_sections']['value'] = invoice_sections_value return sdk_no_wait(no_wait, client.create_or_update, billing_account_name=account_name, billing_profile_name=profile_name, parameters=parameters) def billing_customer_list(client, account_name, profile_name=None, search=None, filter_=None): if account_name is not None and profile_name is not None: return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name, search=search, filter=filter_) return client.list_by_billing_account(billing_account_name=account_name, search=search, filter=filter_) def billing_customer_show(client, account_name, customer_name, expand=None): return client.get(billing_account_name=account_name, customer_name=customer_name, expand=expand) def billing_invoice_section_list(client, account_name, profile_name): return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name) def billing_invoice_section_show(client, account_name, profile_name, invoice_section_name): return client.get(billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name) def billing_invoice_section_create(client, account_name, profile_name, invoice_section_name, display_name=None, labels=None, no_wait=False): return sdk_no_wait(no_wait, client.create_or_update, billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name, display_name=display_name, labels=labels) def billing_invoice_section_update(client, account_name, profile_name, invoice_section_name, display_name=None, labels=None, no_wait=False): return sdk_no_wait(no_wait, client.create_or_update, billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name, display_name=display_name, labels=labels) def billing_permission_list(client, account_name, profile_name=None, invoice_section_name=None, customer_name=None): if account_name is not None and profile_name is not None and invoice_section_name is not None: return client.list_by_invoice_sections(billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name) elif account_name is not None and customer_name is not None: return client.list_by_customer(billing_account_name=account_name, customer_name=customer_name) elif account_name is not None and profile_name is not None: return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name) return client.list_by_billing_account(billing_account_name=account_name) def billing_subscription_list(client, account_name, profile_name=None, invoice_section_name=None, customer_name=None): if account_name is not None and profile_name is not None and invoice_section_name is not None: return client.list_by_invoice_section(billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name) elif account_name is not None and customer_name is not None: return client.list_by_customer(billing_account_name=account_name, customer_name=customer_name) elif account_name is not None and profile_name is not None: return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name) return client.list_by_billing_account(billing_account_name=account_name) def billing_subscription_show(client, account_name): return client.get(billing_account_name=account_name) def billing_subscription_update(client, account_name, subscription_billing_status=None, cost_center=None, sku_id=None): parameters = {} parameters['subscription_billing_status'] = subscription_billing_status parameters['cost_center'] = cost_center parameters['sku_id'] = sku_id return client.update(billing_account_name=account_name, parameters=parameters) def billing_subscription_move(client, account_name, destination_invoice_section_id, no_wait=False): return sdk_no_wait(no_wait, client.move, billing_account_name=account_name, destination_invoice_section_id=destination_invoice_section_id) def billing_subscription_validate_move(client, account_name, destination_invoice_section_id): return client.validate_move(billing_account_name=account_name, destination_invoice_section_id=destination_invoice_section_id) def billing_product_list(client, account_name, profile_name=None, invoice_section_name=None, filter_=None, customer_name=None): if account_name is not None and profile_name is not None and invoice_section_name is not None: return client.list_by_invoice_section(billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name, filter=filter_) elif account_name is not None and profile_name is not None: return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name, filter=filter_) elif account_name is not None and customer_name is not None: return client.list_by_customer(billing_account_name=account_name, customer_name=customer_name) return client.list_by_billing_account(billing_account_name=account_name, filter=filter_) def billing_product_show(client, account_name, product_name): return client.get(billing_account_name=account_name, product_name=product_name) def billing_product_update(client, account_name, product_name, auto_renew=None, status=None, billing_frequency=None): parameters = {} parameters['auto_renew'] = auto_renew parameters['status'] = status parameters['billing_frequency'] = billing_frequency return client.update(billing_account_name=account_name, product_name=product_name, parameters=parameters) def billing_product_move(client, account_name, product_name, destination_invoice_section_id=None): return client.move(billing_account_name=account_name, product_name=product_name, destination_invoice_section_id=destination_invoice_section_id) def billing_product_validate_move(client, account_name, product_name, destination_invoice_section_id=None): return client.validate_move(billing_account_name=account_name, product_name=product_name, destination_invoice_section_id=destination_invoice_section_id) def billing_invoice_list(client, period_start_date, period_end_date, account_name=None, profile_name=None): if account_name is not None and profile_name is not None and period_start_date is not None and period_end_date is not None: return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name, period_start_date=period_start_date, period_end_date=period_end_date) elif account_name is not None and period_start_date is not None and period_end_date is not None: return client.list_by_billing_account(billing_account_name=account_name, period_start_date=period_start_date, period_end_date=period_end_date) return client.list_by_billing_subscription(period_start_date=period_start_date, period_end_date=period_end_date) def billing_invoice_show(client, account_name, name): return client.get(billing_account_name=account_name, invoice_name=name) def billing_transaction_list(client, account_name, invoice_name): return client.list_by_invoice(billing_account_name=account_name, invoice_name=invoice_name) def billing_policy_update(client, account_name, profile_name, marketplace_purchases=None, reservation_purchases=None, view_charges=None): parameters = {} parameters['marketplace_purchases'] = marketplace_purchases parameters['reservation_purchases'] = reservation_purchases parameters['view_charges'] = view_charges return client.update(billing_account_name=account_name, billing_profile_name=profile_name, parameters=parameters) def billing_property_show(client): return client.get() def billing_property_update(client, cost_center=None): return client.update(cost_center=cost_center) def billing_role_definition_list(client, account_name, profile_name=None, invoice_section_name=None): if account_name is not None and profile_name is not None and invoice_section_name is not None: return client.list_by_invoice_section(billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name) elif account_name is not None and profile_name is not None: return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name) return client.list_by_billing_account(billing_account_name=account_name) def billing_role_assignment_list(client, account_name, profile_name=None, invoice_section_name=None): if account_name is not None and profile_name is not None and invoice_section_name is not None: return client.list_by_invoice_section(billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name) elif account_name is not None and profile_name is not None: return client.list_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name) return client.list_by_billing_account(billing_account_name=account_name) def billing_role_assignment_delete(client, account_name, name, profile_name=None, invoice_section_name=None): if account_name is not None and profile_name is not None and invoice_section_name is not None and name is not None: return client.delete_by_invoice_section(billing_account_name=account_name, billing_profile_name=profile_name, invoice_section_name=invoice_section_name, billing_role_assignment_name=name) elif account_name is not None and profile_name is not None and name is not None: return client.delete_by_billing_profile(billing_account_name=account_name, billing_profile_name=profile_name, billing_role_assignment_name=name) return client.delete_by_billing_account(billing_account_name=account_name, billing_role_assignment_name=name) def billing_agreement_list(client, account_name, expand=None): return client.list_by_billing_account(billing_account_name=account_name, expand=expand) def billing_agreement_show(client, account_name, name, expand=None): return client.get(billing_account_name=account_name, agreement_name=name, expand=expand)
45.004175
127
0.549984
2,032
21,557
5.418799
0.064469
0.15984
0.086641
0.120334
0.819635
0.785306
0.753428
0.741168
0.716919
0.694851
0
0
0.39718
21,557
478
128
45.098326
0.847326
0.024632
0
0.700258
0
0
0.021986
0.003284
0
0
0
0
0
1
0.100775
false
0
0.002584
0.062016
0.250646
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
f036d3ff811626489833adaa364db15ac03f871f
1,133
py
Python
github/tests.py
zhpeng811/social.distance
d7a15cae817fc1aed31c460577de22a37bdfb6d3
[ "W3C-20150513" ]
6
2021-12-01T01:29:22.000Z
2021-12-07T02:13:33.000Z
github/tests.py
zhpeng811/social.distance
d7a15cae817fc1aed31c460577de22a37bdfb6d3
[ "W3C-20150513" ]
7
2021-09-26T22:17:58.000Z
2021-11-19T04:03:16.000Z
github/tests.py
CMPUT404Fall2021-6803d618/social.distance
d7a15cae817fc1aed31c460577de22a37bdfb6d3
[ "W3C-20150513" ]
null
null
null
from django.test import TestCase from .utils import extract_username_from_url # Create your tests here. class GitHubTestCase(TestCase): username = "zhpeng811" def test_regex_short(self): extracted_username = extract_username_from_url(f"github.com/{self.username}") self.assertEqual(self.username, extracted_username) def test_regex_short_with_trailing_slash(self): extracted_username = extract_username_from_url(f"github.com/{self.username}/") self.assertEqual(self.username, extracted_username) def test_regex_with_www(self): extracted_username = extract_username_from_url(f"www.github.com/{self.username}") self.assertEqual(self.username, extracted_username) def test_regex_with_protocol(self): extracted_username = extract_username_from_url(f"https://github.com/{self.username}/") self.assertEqual(self.username, extracted_username) def test_regex_with_full_path(self): extracted_username = extract_username_from_url(f"https://www.github.com/{self.username}/") self.assertEqual(self.username, extracted_username)
43.576923
98
0.751986
142
1,133
5.683099
0.232394
0.210657
0.141264
0.163569
0.769517
0.769517
0.769517
0.769517
0.714994
0.593556
0
0.003115
0.150044
1,133
26
99
43.576923
0.834891
0.0203
0
0.263158
0
0
0.149684
0.074842
0
0
0
0
0.263158
1
0.263158
false
0
0.105263
0
0.473684
0
0
0
0
null
1
0
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
f0840716e8d06c0e124999189ff793b5eca697d0
86
py
Python
models/__init__.py
adonis704/ucas_2021_hc_15
7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
[ "MIT" ]
6
2021-08-17T09:26:16.000Z
2022-03-30T23:17:42.000Z
models/__init__.py
adonis704/ucas_2021_hc_15
7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
[ "MIT" ]
3
2021-08-17T09:42:47.000Z
2021-09-27T05:56:38.000Z
models/__init__.py
adonis704/ucas_2021_hc_15
7308c3b32962ef5430d85ccfcb199ebe40bf4a7f
[ "MIT" ]
5
2021-08-18T14:25:48.000Z
2022-03-28T02:59:16.000Z
from models import proto from models import my_proto from models import proto_meta
21.5
30
0.825581
14
86
4.928571
0.428571
0.434783
0.695652
0.608696
0
0
0
0
0
0
0
0
0.174419
86
3
31
28.666667
0.971831
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
b2c78839a9f7284c9aabc241b317afd630d42291
7,002
py
Python
fixture/contact.py
JaaneWhite/Python_training
4f73d79253a04a608b93b3399a8932016c57937d
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
JaaneWhite/Python_training
4f73d79253a04a608b93b3399a8932016c57937d
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
JaaneWhite/Python_training
4f73d79253a04a608b93b3399a8932016c57937d
[ "Apache-2.0" ]
null
null
null
from selenium.webdriver.support.select import Select class ContactHelper: def __init__(self,app): self.app = app def create_contact(self, Contact): wd = self.app.wd # init contact creation wd.find_element_by_link_text("add new").click() # fill contact form wd.find_element_by_name("firstname").clear() wd.find_element_by_name("firstname").send_keys(Contact.firstname) wd.find_element_by_name("middlename").clear() wd.find_element_by_name("middlename").send_keys(Contact.middlename) wd.find_element_by_name("lastname").clear() wd.find_element_by_name("lastname").send_keys(Contact.lastname) wd.find_element_by_name("nickname").clear() wd.find_element_by_name("nickname").send_keys(Contact.nickname) wd.find_element_by_name("title").clear() wd.find_element_by_name("title").send_keys(Contact.title) wd.find_element_by_name("company").clear() wd.find_element_by_name("company").send_keys(Contact.company) wd.find_element_by_name("address").clear() wd.find_element_by_name("address").send_keys(Contact.address) wd.find_element_by_name("home").clear() wd.find_element_by_name("home").send_keys(Contact.home) wd.find_element_by_name("mobile").clear() wd.find_element_by_name("mobile").send_keys(Contact.mobile) wd.find_element_by_name("work").clear() wd.find_element_by_name("work").send_keys(Contact.work) wd.find_element_by_name("fax").clear() wd.find_element_by_name("fax").send_keys(Contact.fax) wd.find_element_by_name("email").clear() wd.find_element_by_name("email").send_keys(Contact.email) wd.find_element_by_name("email2").clear() wd.find_element_by_name("email2").send_keys(Contact.email2) wd.find_element_by_name("email3").clear() wd.find_element_by_name("email3").send_keys(Contact.email3) wd.find_element_by_name("homepage").clear() wd.find_element_by_name("homepage").send_keys(Contact.homepage) Select(wd.find_element_by_name("bday")).select_by_visible_text(Contact.bday) Select(wd.find_element_by_name("bmonth")).select_by_visible_text(Contact.bmonth) wd.find_element_by_name("byear").clear() wd.find_element_by_name("byear").send_keys(Contact.byear) Select(wd.find_element_by_name("aday")).select_by_visible_text(Contact.aday) Select(wd.find_element_by_name("amonth")).select_by_visible_text(Contact.amonth) wd.find_element_by_name("ayear").clear() wd.find_element_by_name("ayear").send_keys(Contact.ayear) wd.find_element_by_name("address2").clear() wd.find_element_by_name("address2").send_keys(Contact.address2) wd.find_element_by_name("phone2").clear() wd.find_element_by_name("phone2").send_keys(Contact.phone2) wd.find_element_by_name("notes").clear() wd.find_element_by_name("notes").send_keys(Contact.notes) wd.find_element_by_name("photo").send_keys(Contact.photo) # submit contact wd.find_element_by_xpath("(//input[@name='submit'])[2]").click() def return_homepage(self): wd = self.app.wd wd.find_element_by_link_text("home page").click() def delete_first_contact(self): wd = self.app.wd # select first contact wd.find_element_by_name("selected[]").click() # submit deletion wd.find_element_by_xpath("//input[@value='Delete']").click() wd.switch_to_alert().accept() def delete_all_contacts(self): wd = self.app.wd # select first contact wd.find_element_by_id("MassCB").click() # submit deletion wd.find_element_by_xpath("//input[@value='Delete']").click() wd.switch_to_alert().accept() def edit_first_contact(self, Contact): wd = self.app.wd # select first contact wd.find_element_by_name("selected[]").click() # click edit button wd.find_element_by_xpath("//img[@alt='Edit']").click() # fill contact form wd.find_element_by_name("firstname").clear() wd.find_element_by_name("firstname").send_keys(Contact.firstname) wd.find_element_by_name("middlename").clear() wd.find_element_by_name("middlename").send_keys(Contact.middlename) wd.find_element_by_name("lastname").clear() wd.find_element_by_name("lastname").send_keys(Contact.lastname) wd.find_element_by_name("nickname").clear() wd.find_element_by_name("nickname").send_keys(Contact.nickname) wd.find_element_by_name("title").clear() wd.find_element_by_name("title").send_keys(Contact.title) wd.find_element_by_name("company").clear() wd.find_element_by_name("company").send_keys(Contact.company) wd.find_element_by_name("address").clear() wd.find_element_by_name("address").send_keys(Contact.address) wd.find_element_by_name("home").clear() wd.find_element_by_name("home").send_keys(Contact.home) wd.find_element_by_name("mobile").clear() wd.find_element_by_name("mobile").send_keys(Contact.mobile) wd.find_element_by_name("work").clear() wd.find_element_by_name("work").send_keys(Contact.work) wd.find_element_by_name("fax").clear() wd.find_element_by_name("fax").send_keys(Contact.fax) wd.find_element_by_name("email").clear() wd.find_element_by_name("email").send_keys(Contact.email) wd.find_element_by_name("email2").clear() wd.find_element_by_name("email2").send_keys(Contact.email2) wd.find_element_by_name("email3").clear() wd.find_element_by_name("email3").send_keys(Contact.email3) wd.find_element_by_name("homepage").clear() wd.find_element_by_name("homepage").send_keys(Contact.homepage) Select(wd.find_element_by_name("bday")).select_by_visible_text(Contact.bday) Select(wd.find_element_by_name("bmonth")).select_by_visible_text(Contact.bmonth) wd.find_element_by_name("byear").clear() wd.find_element_by_name("byear").send_keys(Contact.byear) Select(wd.find_element_by_name("aday")).select_by_visible_text(Contact.aday) Select(wd.find_element_by_name("amonth")).select_by_visible_text(Contact.amonth) wd.find_element_by_name("ayear").clear() wd.find_element_by_name("ayear").send_keys(Contact.ayear) wd.find_element_by_name("address2").clear() wd.find_element_by_name("address2").send_keys(Contact.address2) wd.find_element_by_name("phone2").clear() wd.find_element_by_name("phone2").send_keys(Contact.phone2) wd.find_element_by_name("notes").clear() wd.find_element_by_name("notes").send_keys(Contact.notes) wd.find_element_by_name("photo").send_keys(Contact.photo) # submit contact wd.find_element_by_name("update").click()
51.109489
88
0.694659
987
7,002
4.539007
0.081054
0.133929
0.290179
0.334821
0.942188
0.934375
0.920982
0.910491
0.910491
0.910491
0
0.004284
0.166667
7,002
136
89
51.485294
0.763496
0.028563
0
0.87069
0
0
0.10193
0.011195
0
0
0
0
0
1
0.051724
false
0
0.008621
0
0.068966
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
b2f3851bbf01032139331aef635a668afefa1369
115
py
Python
synth/base/__init__.py
lummax/switching-lattice-synth
47cf9e64c900cb179c392b46a392049e99dfebab
[ "MIT" ]
null
null
null
synth/base/__init__.py
lummax/switching-lattice-synth
47cf9e64c900cb179c392b46a392049e99dfebab
[ "MIT" ]
null
null
null
synth/base/__init__.py
lummax/switching-lattice-synth
47cf9e64c900cb179c392b46a392049e99dfebab
[ "MIT" ]
null
null
null
from synth.base.synth import Synth from synth.base.synth import BaseSynth from synth.base.function import Function
28.75
40
0.843478
18
115
5.388889
0.333333
0.278351
0.402062
0.371134
0.494845
0
0
0
0
0
0
0
0.104348
115
3
41
38.333333
0.941748
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
6534424f790f6d3801d830659cb0c33ddae60fd8
3,702
py
Python
ParaMol/Tests/External/test_rdkit.py
mnagaku/ParaMol
13529f584e2d50076e038388ecbdd57af23c73b9
[ "MIT" ]
15
2021-03-08T17:56:36.000Z
2022-03-30T01:46:29.000Z
ParaMol/Tests/External/test_rdkit.py
mnagaku/ParaMol
13529f584e2d50076e038388ecbdd57af23c73b9
[ "MIT" ]
7
2021-03-28T05:53:59.000Z
2021-10-15T15:37:56.000Z
ParaMol/Tests/External/test_rdkit.py
mnagaku/ParaMol
13529f584e2d50076e038388ecbdd57af23c73b9
[ "MIT" ]
2
2021-04-30T06:42:09.000Z
2021-06-21T05:49:29.000Z
# Import ParaMol modules from ParaMol.System.system import * from ParaMol.Tasks.torsions_scan import * from ParaMol.Tasks.torsions_parametrization import * import rdkit import numpy as np class TestSystem: # Kwargs dictionary for AMBER topology system. These are shared between all instances. kwargs_dict = {"topology_format": "AMBER", "crd_format": "AMBER", "top_file": "ParaMol/Tests/aniline.prmtop", "crd_file": "ParaMol/Tests/aniline.inpcrd"} def test_get_rdkit_mol_conf(self): """ Test get_rdkit_mol_conf """ openmm_engine = OpenMMEngine(True, **self.kwargs_dict) assert type(openmm_engine) is OpenMMEngine system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) torsion_scan = TorsionScan() mol, conf = torsion_scan.get_rdkit_mol_conf(system) assert type(mol) is rdkit.Chem.rdchem.Mol assert type(conf) is rdkit.Chem.rdchem.Conformer def test_get_rotatable_bonds(self): """ Test get rotatable bonds method. """ openmm_engine = OpenMMEngine(True, **self.kwargs_dict) assert type(openmm_engine) is OpenMMEngine system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) torsion_scan = TorsionScan() assert type(torsion_scan) is TorsionScan mol, conf = torsion_scan.get_rdkit_mol_conf(system) assert type(mol) is rdkit.Chem.rdchem.Mol assert type(conf) is rdkit.Chem.rdchem.Conformer torsion_param = TorsionsParametrization() rot_bonds = torsion_param.get_rotatable_bonds(mol) assert rot_bonds == ((6, 7),) assert len(rot_bonds) == 1 def test_get_rotatable_torsions(self): """ Test get rotatable torsions. """ openmm_engine = OpenMMEngine(True, **self.kwargs_dict) assert type(openmm_engine) is OpenMMEngine system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) system.force_field.create_force_field() system.force_field.create_force_field_optimizable() torsion_scan = TorsionScan() assert type(torsion_scan) is TorsionScan mol, conf = torsion_scan.get_rdkit_mol_conf(system) assert type(mol) is rdkit.Chem.rdchem.Mol assert type(conf) is rdkit.Chem.rdchem.Conformer torsion_param = TorsionsParametrization() rot_bonds = torsion_param.get_rotatable_bonds(mol) assert rot_bonds == ((6, 7),) assert len(rot_bonds) == 1 rot_dihedrals = torsion_param.get_rotatable_torsions(system, rot_bonds) assert len(rot_dihedrals) == 1 def test_dihedral_rotation(self): """ Test get rotatable torsions. """ openmm_engine = OpenMMEngine(True, **self.kwargs_dict) assert type(openmm_engine) is OpenMMEngine system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) system.force_field.create_force_field() system.force_field.create_force_field_optimizable() torsion_scan = TorsionScan() assert type(torsion_scan) is TorsionScan mol, conf = torsion_scan.get_rdkit_mol_conf(system) assert type(mol) is rdkit.Chem.rdchem.Mol assert type(conf) is rdkit.Chem.rdchem.Conformer torsion_param = TorsionsParametrization() rot_bonds = torsion_param.get_rotatable_bonds(mol) assert rot_bonds == ((6, 7),) assert len(rot_bonds) == 1 rot_dihedrals = torsion_param.get_rotatable_torsions(system, rot_bonds) assert len(rot_dihedrals) == 1
29.854839
90
0.668828
443
3,702
5.336343
0.1693
0.063452
0.037225
0.05753
0.831218
0.789763
0.789763
0.789763
0.789763
0.789763
0
0.006771
0.242031
3,702
123
91
30.097561
0.835709
0.060238
0
0.784615
0
0
0.039882
0.016544
0
0
0
0
0.353846
1
0.061538
false
0
0.076923
0
0.169231
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
684c904d85229840433cfe84d02a19a84aa77a1d
35,081
py
Python
laed/models/dialog_models.py
BinLiu777/NeuralDialog-LAED
3f52a75e5bcb314e567cafe94925cca32ccfbba1
[ "Apache-2.0" ]
null
null
null
laed/models/dialog_models.py
BinLiu777/NeuralDialog-LAED
3f52a75e5bcb314e567cafe94925cca32ccfbba1
[ "Apache-2.0" ]
null
null
null
laed/models/dialog_models.py
BinLiu777/NeuralDialog-LAED
3f52a75e5bcb314e567cafe94925cca32ccfbba1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # author: Tiancheng Zhao import torch import torch.nn as nn import torch.nn.functional as F from laed.dataset.corpora import PAD, BOS, EOS from torch.autograd import Variable from laed import criterions from laed.enc2dec import decoders from laed.enc2dec.decoders import DecoderRNN from laed.enc2dec.encoders import EncoderRNN, RnnUttEncoder from laed.utils import INT, FLOAT, LONG, cast_type from laed import nn_lib from laed.models.model_bases import BaseModel from laed.enc2dec.decoders import GEN, TEACH_FORCE from laed.utils import Pack import itertools import numpy as np class LAED(BaseModel): def qzx_forward(self, out_utts): # output encoder # print(out_utts) output_embedding = self.x_embedding(out_utts.long()) x_outs, x_last = self.x_encoder(output_embedding) x_last = x_last.transpose(0, 1).contiguous().view(-1, self.config.dec_cell_size) qy_logits = self.q_y(x_last).view(-1, self.config.k) # switch that controls the sampling if self.kl_w == 1.0 and self.config.greedy_q: sample_y, y_ids = self.greedy_cat_connector(qy_logits, self.use_gpu, return_max_id=True) else: sample_y, y_ids = self.cat_connector(qy_logits, 1.0, self.use_gpu, hard=not self.training, return_max_id=True) sample_y = sample_y.view(-1, self.config.k * self.config.y_size) y_ids = y_ids.view(-1, self.config.y_size) return Pack(qy_logits=qy_logits, sample_y=sample_y, y_ids=y_ids) def exp_forward(self, data_feed): ctx_lens = data_feed['context_lens'] batch_size = len(ctx_lens) ctx_utts = self.np2var(data_feed['contexts'], LONG) out_utts = self.np2var(data_feed['outputs'], LONG) output_lens = self.np2var(data_feed['output_lens'], FLOAT) # context encoder c_inputs = self.utt_encoder(ctx_utts) c_outs, c_last = self.ctx_encoder(c_inputs, ctx_lens) c_last = c_last.squeeze(0) # prior network py_logits = self.p_y(c_last).view(-1, self.config.k) log_py = F.log_softmax(py_logits, dim=py_logits.dim()-1) exp_size = np.power(self.config.k, self.config.y_size) sample_y = cast_type( Variable(torch.zeros((exp_size * self.config.y_size, self.config.k))), FLOAT, self.use_gpu) d = dict((str(i), range(self.config.k)) for i in range(self.config.y_size)) all_y_ids = [] for combo in itertools.product(*[d[k] for k in sorted(d.keys())]): all_y_ids.append(list(combo)) np_y_ids = np.array(all_y_ids) np_y_ids = self.np2var(np_y_ids, LONG) # map sample to initial state of decoder sample_y.scatter_(1, np_y_ids.view(-1, 1), 1.0) sample_y = sample_y.view(-1, self.config.k * self.config.y_size) # pack attention context attn_inputs = None labels = out_utts[:, 1:].contiguous() c_last = c_last.unsqueeze(0) nll_xcz = 0.0 cum_pcs = 0.0 all_words = torch.sum(output_lens-1) for exp_id in range(exp_size): cur_sample_y = sample_y[exp_id:exp_id+1] cur_sample_y = cur_sample_y.expand(batch_size, self.config.k*self.config.y_size) # find out logp(z|c) log_pyc = torch.sum(log_py.view(-1, self.config.k*self.config.y_size) * cur_sample_y, dim=1) # map sample to initial state of decoder dec_init_state = self.c_init_connector(cur_sample_y) + c_last # decode dec_outs, dec_last, dec_ctx = self.decoder(batch_size, out_utts[:, 0:-1], dec_init_state, attn_context=attn_inputs, mode=TEACH_FORCE, gen_type="greedy", beam_size=self.config.beam_size) output = dec_outs.view(-1, dec_outs.size(-1)) target = labels.view(-1) enc_dec_nll = F.nll_loss(output, target, size_average=False, ignore_index=self.nll_loss.padding_idx, weight=self.nll_loss.weight, reduce=False) enc_dec_nll = enc_dec_nll.view(-1, dec_outs.size(1)) enc_dec_nll = torch.sum(enc_dec_nll, dim=1) py_c = torch.exp(log_pyc) cum_pcs += py_c nll_xcz += py_c * enc_dec_nll nll_xcz = torch.sum(nll_xcz) / all_words return Pack(nll=nll_xcz) def greedy_forward(self, data_feed): ctx_lens = data_feed['context_lens'] batch_size = len(ctx_lens) ctx_utts = self.np2var(data_feed['contexts'], LONG) out_utts = self.np2var(data_feed['outputs'], LONG) # context encoder c_inputs = self.utt_encoder(ctx_utts) c_outs, c_last = self.ctx_encoder(c_inputs, ctx_lens) c_last = c_last.squeeze(0) # prior network py_logits = self.p_y(c_last).view(-1, self.config.k) # map sample to initial state of decoder sample_y, y_id = self.greedy_cat_connector(py_logits, self.use_gpu, return_max_id=True) # pack attention context attn_inputs = None labels = out_utts[:, 1:].contiguous() sample_y = sample_y.view(-1, self.config.k * self.config.y_size) dec_init_state = self.c_init_connector(sample_y) + c_last.unsqueeze(0) # decode dec_outs, dec_last, dec_ctx = self.decoder(batch_size, out_utts[:, 0:-1], dec_init_state, attn_context=attn_inputs, mode=TEACH_FORCE, gen_type="greedy", beam_size=self.config.beam_size) enc_dec_nll = self.nll_loss(dec_outs, labels) return Pack(nll=enc_dec_nll) def min_forward(self, data_feed, batch_size, sample_n): ctx_lens = data_feed['context_lens'] ctx_utts = self.np2var(data_feed['contexts'], LONG) c_inputs = self.utt_encoder(ctx_utts) c_outs, c_last = self.ctx_encoder(c_inputs, ctx_lens) c_last = c_last.squeeze(0) # prior network py_logits = self.p_y(F.tanh(self.p_fc1(c_last))).view(-1, self.config.k) log_py = F.log_softmax(py_logits, dim=py_logits.dim() - 1) temp = [] temp_ids = [] # sample the prior network N times for i in range(sample_n): temp_y, temp_id = self.cat_connector(py_logits, 1.0, self.use_gpu, hard=True, return_max_id=True) temp_ids.append(temp_id.view(-1, self.config.y_size)) temp.append(temp_y.view(-1, self.config.k * self.config.y_size)) sample_y = torch.cat(temp, dim=0) y_id = torch.cat(temp_ids, dim=0) batch_size *= sample_n c_last = c_last.repeat(sample_n, 1) # map sample to initial state of decoder sample_y = sample_y.view(-1, self.config.k * self.config.y_size) dec_init_state = self.c_init_connector(sample_y) + c_last.unsqueeze(0) # decode dec_outs, dec_last, dec_ctx = self.decoder(batch_size, None, dec_init_state, attn_context=None, mode=GEN, gen_type="sample", beam_size=self.config.beam_size) dec_ctx[DecoderRNN.KEY_LATENT] = y_id dec_ctx[DecoderRNN.KEY_POLICY] = log_py return dec_ctx def model_sel_loss(self, loss, batch_cnt): if self.kl_w == 0.0: return self.valid_loss(loss, batch_cnt) return loss.pi_err+loss.adv_err class AeED(LAED): def __init__(self, corpus, config): super(AeED, self).__init__(config) self.vocab = corpus.vocab self.rev_vocab = corpus.rev_vocab self.vocab_size = len(self.vocab) self.go_id = self.rev_vocab[BOS] self.eos_id = self.rev_vocab[EOS] if not hasattr(config, "freeze_step"): config.freeze_step = 6000 # build model here # word embeddings self.x_embedding = nn.Embedding(self.vocab_size, config.embed_size) # latent action learned self.x_encoder = EncoderRNN(config.embed_size, config.dec_cell_size, dropout_p=config.dropout, rnn_cell=config.rnn_cell, variable_lengths=False) self.q_y = nn.Linear(config.dec_cell_size, config.y_size * config.k) self.x_init_connector = nn_lib.LinearConnector(config.y_size * config.k, config.dec_cell_size, config.rnn_cell == 'lstm') # decoder self.x_decoder = DecoderRNN(self.vocab_size, config.max_dec_len, config.embed_size, config.dec_cell_size, self.go_id, self.eos_id, n_layers=1, rnn_cell=config.rnn_cell, input_dropout_p=config.dropout, dropout_p=config.dropout, use_attention=False, use_gpu=config.use_gpu, embedding=self.x_embedding) # Encoder-Decoder STARTS here self.embedding = nn.Embedding(self.vocab_size, config.embed_size, padding_idx=self.rev_vocab[PAD]) self.utt_encoder = RnnUttEncoder(config.utt_cell_size, config.dropout, use_attn=config.utt_type == 'attn_rnn', vocab_size=self.vocab_size, embedding=self.embedding) self.ctx_encoder = EncoderRNN(self.utt_encoder.output_size, config.ctx_cell_size, 0.0, config.dropout, config.num_layer, config.rnn_cell, variable_lengths=self.config.fix_batch) # FNN to get Y self.p_fc1 = nn.Linear(config.ctx_cell_size, config.ctx_cell_size) self.p_y = nn.Linear(config.ctx_cell_size, config.y_size * config.k) # connector self.c_init_connector = nn_lib.LinearConnector(config.y_size * config.k, config.dec_cell_size, config.rnn_cell == 'lstm') # decoder self.decoder = DecoderRNN(self.vocab_size, config.max_dec_len, config.embed_size, config.dec_cell_size, self.go_id, self.eos_id, n_layers=1, rnn_cell=config.rnn_cell, input_dropout_p=config.dropout, dropout_p=config.dropout, use_attention=config.use_attn, attn_size=config.dec_cell_size, attn_mode=config.attn_type, use_gpu=config.use_gpu, embedding=self.embedding) # force G(z,c) has z if config.use_attribute: self.attribute_loss = criterions.NLLEntropy(-100, config) self.cat_connector = nn_lib.GumbelConnector() self.greedy_cat_connector = nn_lib.GreedyConnector() self.nll_loss = criterions.NLLEntropy(self.rev_vocab[PAD], self.config) self.cat_kl_loss = criterions.CatKLLoss() self.log_uniform_y = Variable(torch.log(torch.ones(1) / config.k)) self.entropy_loss = criterions.Entropy() if self.use_gpu: self.log_uniform_y = self.log_uniform_y.cuda() self.kl_w = 0.0 def valid_loss(self, loss, batch_cnt=None): vae_loss = loss.vae_nll + loss.reg_kl enc_loss = loss.nll if self.config.greedy_q: enc_loss += loss.pi_nll else: enc_loss += loss.pi_kl if self.config.use_attribute: enc_loss += 0.1*loss.attribute_nll if batch_cnt is not None and batch_cnt > self.config.freeze_step: total_loss = enc_loss if self.kl_w == 0.0: self.kl_w = 1.0 self.flush_valid = True for param in self.x_embedding.parameters(): param.requires_grad = False for param in self.x_encoder.parameters(): param.requires_grad = False for param in self.q_y.parameters(): param.requires_grad = False for param in self.x_init_connector.parameters(): param.requires_grad = False for param in self.x_decoder.parameters(): param.requires_grad = False else: total_loss = vae_loss return total_loss def pxz_forward(self, batch_size, results, out_utts, mode, gen_type): # map sample to initial state of decoder dec_init_state = self.x_init_connector(results.sample_y) dec_outs, dec_last, dec_ctx = self.x_decoder(batch_size, out_utts[:, 0:-1], dec_init_state, mode=mode, gen_type=gen_type, beam_size=self.config.beam_size) results['dec_outs'] = dec_outs results['dec_ctx'] = dec_ctx return results def forward(self, data_feed, mode, sample_n=1, gen_type='greedy', return_latent=False): ctx_lens = data_feed['context_lens'] batch_size = len(ctx_lens) ctx_utts = self.np2var(data_feed['contexts'], LONG) out_utts = self.np2var(data_feed['outputs'], LONG) # First do VAE here vae_resp = self.pxz_forward(batch_size, self.qzx_forward(out_utts[:, 1:]), out_utts, mode, gen_type) # context encoder c_inputs = self.utt_encoder(ctx_utts) c_outs, c_last = self.ctx_encoder(c_inputs, ctx_lens) c_last = c_last.squeeze(0) # prior network py_logits = self.p_y(F.tanh(self.p_fc1(c_last))).view(-1, self.config.k) log_py = F.log_softmax(py_logits, dim=py_logits.dim()-1) if mode != GEN: sample_y, y_id = vae_resp.sample_y.detach(), vae_resp.y_ids.detach() y_id = y_id.view(-1, self.config.y_size) qy_id = y_id else: qy_id = vae_resp.y_ids.detach() qy_id = qy_id.view(-1, self.config.y_size) if sample_n > 1: if gen_type == 'greedy': temp = [] temp_ids = [] # sample the prior network N times for i in range(sample_n): temp_y, temp_id = self.cat_connector(py_logits, 1.0, self.use_gpu, hard=True, return_max_id=True) temp_ids.append(temp_id.view(-1, self.config.y_size)) temp.append(temp_y.view(-1, self.config.k * self.config.y_size)) sample_y = torch.cat(temp, dim=0) y_id = torch.cat(temp_ids, dim=0) batch_size *= sample_n c_last = c_last.repeat(sample_n, 1) elif gen_type == 'sample': sample_y, y_id = self.greedy_cat_connector(py_logits, self.use_gpu, return_max_id=True) sample_y = sample_y.view(-1, self.config.k*self.config.y_size).repeat(sample_n, 1) y_id = y_id.view(-1, self.config.y_size).repeat(sample_n, 1) c_last = c_last.repeat(sample_n, 1) batch_size *= sample_n else: raise ValueError else: sample_y, y_id = self.cat_connector(py_logits, 1.0, self.use_gpu, hard=True, return_max_id=True) # pack attention context if self.config.use_attn: attn_inputs = c_outs else: attn_inputs = None # map sample to initial state of decoder sample_y = sample_y.view(-1, self.config.k * self.config.y_size) dec_init_state = self.c_init_connector(sample_y) + c_last.unsqueeze(0) # decode dec_outs, dec_last, dec_ctx = self.decoder(batch_size, out_utts[:, 0:-1], dec_init_state, attn_context=attn_inputs, mode=mode, gen_type=gen_type, beam_size=self.config.beam_size) # get decoder inputs labels = out_utts[:, 1:].contiguous() dec_ctx[DecoderRNN.KEY_RECOG_LATENT] = qy_id dec_ctx[DecoderRNN.KEY_LATENT] = y_id dec_ctx[DecoderRNN.KEY_POLICY] = log_py # compute loss or return results if mode == GEN: return dec_ctx, labels else: # VAE-related Losses log_qy = F.log_softmax(vae_resp.qy_logits, dim=1) vae_nll = self.nll_loss(vae_resp.dec_outs, labels) avg_log_qy = torch.exp(log_qy.view(-1, self.config.y_size, self.config.k)) avg_log_qy = torch.log(torch.mean(avg_log_qy, dim=0) + 1e-15) reg_kl = self.cat_kl_loss(avg_log_qy, self.log_uniform_y, batch_size, unit_average=True) mi = self.entropy_loss(avg_log_qy, unit_average=True) - self.entropy_loss(log_qy, unit_average=True) # Encoder-decoder Losses enc_dec_nll = self.nll_loss(dec_outs, labels) pi_kl = self.cat_kl_loss(log_qy.detach(), log_py, batch_size, unit_average=True) pi_nll = F.cross_entropy(py_logits.view(-1, self.config.k), y_id.view(-1)) _, max_pi = torch.max(py_logits.view(-1, self.config.k), dim=1) pi_err = torch.mean((max_pi != y_id.view(-1)).float()) if self.config.use_attribute: pad_embeded = self.x_embedding.weight[self.rev_vocab[PAD]].view(1, 1, self.config.embed_size) pad_embeded = pad_embeded.repeat(batch_size, dec_outs.size(1), 1) mask = torch.sign(labels).float().unsqueeze(2) dec_out_p = torch.exp(dec_outs.view(-1, self.vocab_size)) dec_out_embedded = torch.matmul(dec_out_p, self.x_embedding.weight) dec_out_embedded = dec_out_embedded.view(-1, dec_outs.size(1), self.config.embed_size) valid_out_embedded = mask * dec_out_embedded + (1.0-mask) * pad_embeded x_outs, x_last = self.x_encoder(valid_out_embedded) x_last = x_last.transpose(0, 1).contiguous().view(-1, self.config.dec_cell_size) qy_logits = self.q_y(x_last).view(-1, self.config.k) attribute_nll = F.cross_entropy(qy_logits, y_id.view(-1).detach()) _, max_qy = torch.max(qy_logits.view(-1, self.config.k), dim=1) adv_err = torch.mean((max_qy != y_id.view(-1)).float()) else: attribute_nll = None adv_err = None results = Pack(nll=enc_dec_nll, pi_kl=pi_kl, attribute_nll=attribute_nll, vae_nll=vae_nll, reg_kl=reg_kl, mi=mi, pi_nll=pi_nll, pi_err=pi_err, adv_err=adv_err) if return_latent: results['log_py'] = log_py results['log_qy'] = log_qy results['dec_init_state'] = dec_init_state results['y_ids'] = y_id return results class StED(LAED): def __init__(self, corpus, config): super(StED, self).__init__(config) self.vocab = corpus.vocab self.rev_vocab = corpus.rev_vocab self.vocab_size = len(self.vocab) self.go_id = self.rev_vocab[BOS] self.eos_id = self.rev_vocab[EOS] if not hasattr(config, "freeze_step"): config.freeze_step = 6000 # build model here # word embeddings self.x_embedding = nn.Embedding(self.vocab_size, config.embed_size) # latent action learned self.x_encoder = EncoderRNN(config.embed_size, config.dec_cell_size, dropout_p=config.dropout, rnn_cell=config.rnn_cell, variable_lengths=False) self.q_y = nn.Linear(config.dec_cell_size, config.y_size * config.k) self.x_init_connector = nn_lib.LinearConnector(config.y_size * config.k, config.dec_cell_size, config.rnn_cell == 'lstm') # decoder self.prev_decoder = DecoderRNN(self.vocab_size, config.max_dec_len, config.embed_size, config.dec_cell_size, self.go_id, self.eos_id, n_layers=1, rnn_cell=config.rnn_cell, input_dropout_p=config.dropout, dropout_p=config.dropout, use_attention=False, use_gpu=config.use_gpu, embedding=self.x_embedding) self.next_decoder = DecoderRNN(self.vocab_size, config.max_dec_len, config.embed_size, config.dec_cell_size, self.go_id, self.eos_id, n_layers=1, rnn_cell=config.rnn_cell, input_dropout_p=config.dropout, dropout_p=config.dropout, use_attention=False, use_gpu=config.use_gpu, embedding=self.x_embedding) # Encoder-Decoder STARTS here self.embedding = nn.Embedding(self.vocab_size, config.embed_size, padding_idx=self.rev_vocab[PAD]) self.utt_encoder = RnnUttEncoder(config.utt_cell_size, config.dropout, use_attn=config.utt_type == 'attn_rnn', vocab_size=self.vocab_size, embedding=self.embedding) self.ctx_encoder = EncoderRNN(self.utt_encoder.output_size, config.ctx_cell_size, 0.0, config.dropout, config.num_layer, config.rnn_cell, variable_lengths=config.fix_batch) # FNN to get Y self.p_fc1 = nn.Linear(config.ctx_cell_size, config.ctx_cell_size) self.p_y = nn.Linear(config.ctx_cell_size, config.y_size * config.k) # connector self.c_init_connector = nn_lib.LinearConnector(config.y_size * config.k, config.dec_cell_size, config.rnn_cell == 'lstm') # decoder self.decoder = DecoderRNN(self.vocab_size, config.max_dec_len, config.embed_size, config.dec_cell_size, self.go_id, self.eos_id, n_layers=1, rnn_cell=config.rnn_cell, input_dropout_p=config.dropout, dropout_p=config.dropout, use_attention=config.use_attn, attn_size=config.dec_cell_size, attn_mode=config.attn_type, use_gpu=config.use_gpu, embedding=self.embedding) # force G(z,c) has z if config.use_attribute: self.attribute_loss = criterions.NLLEntropy(-100, config) self.cat_connector = nn_lib.GumbelConnector() self.greedy_cat_connector = nn_lib.GreedyConnector() self.nll_loss = criterions.NLLEntropy(self.rev_vocab[PAD], self.config) self.cat_kl_loss = criterions.CatKLLoss() self.log_uniform_y = Variable(torch.log(torch.ones(1) / config.k)) self.entropy_loss = criterions.Entropy() if self.use_gpu: self.log_uniform_y = self.log_uniform_y.cuda() self.kl_w = 0.0 def valid_loss(self, loss, batch_cnt=None): # for the VAE, there is vae_nll, reg_kl # for enc-deco, there is nll, pq_kl, maybe xz_nll vst_loss = loss.vst_prev_nll + loss.vst_next_nll if self.config.use_reg_kl: vst_loss += loss.reg_kl if self.config.greedy_q: enc_loss = loss.nll + loss.pi_nll else: enc_loss = loss.nll + loss.pi_kl if self.config.use_attribute: enc_loss += loss.attribute_nll if batch_cnt is not None and batch_cnt > self.config.freeze_step: total_loss = enc_loss if self.kl_w == 0.0: self.kl_w = 1.0 self.flush_valid = True for param in self.x_embedding.parameters(): param.requires_grad = False for param in self.x_encoder.parameters(): param.requires_grad = False for param in self.q_y.parameters(): param.requires_grad = False for param in self.x_init_connector.parameters(): param.requires_grad = False for param in self.prev_decoder.parameters(): param.requires_grad = False for param in self.next_decoder.parameters(): param.requires_grad = False else: total_loss = vst_loss return total_loss def pxz_forward(self, batch_size, results, prev_utts, next_utts, mode, gen_type): # map sample to initial state of decoder dec_init_state = self.x_init_connector(results.sample_y) prev_dec_inputs = prev_utts[:, 0:-1] next_dec_inputs = next_utts[:, 0:-1] # decode prev_dec_outs, prev_dec_last, prev_dec_ctx = self.prev_decoder( batch_size, prev_dec_inputs, dec_init_state, mode=mode, gen_type=gen_type, beam_size=self.config.beam_size) next_dec_outs, next_dec_last, next_dec_ctx = self.next_decoder( batch_size, next_dec_inputs, dec_init_state, mode=mode, gen_type=gen_type, beam_size=self.config.beam_size) results['prev_outs'] = prev_dec_outs results['prev_ctx'] = prev_dec_ctx results['next_outs'] = next_dec_outs results['next_ctx'] = next_dec_ctx return results def forward(self, data_feed, mode, sample_n=1, gen_type='greedy', return_latent=False): ctx_lens = data_feed['context_lens'] batch_size = len(ctx_lens) ctx_utts = self.np2var(data_feed['contexts'], LONG) out_utts = self.np2var(data_feed['outputs'], LONG) prev_utts = self.np2var(data_feed['prevs'], LONG) next_utts = self.np2var(data_feed['nexts'], LONG) vst_resp = self.pxz_forward(batch_size, self.qzx_forward(out_utts[:,1:]), prev_utts, next_utts, mode, gen_type) # context encoder c_inputs = self.utt_encoder(ctx_utts) c_outs, c_last = self.ctx_encoder(c_inputs, ctx_lens) c_last = c_last.squeeze(0) # prior network py_logits = self.p_y(F.tanh(self.p_fc1(c_last))).view(-1, self.config.k) log_py = F.log_softmax(py_logits, dim=1) if mode != GEN: sample_y, y_id = vst_resp.sample_y.detach(), vst_resp.y_ids.detach() y_id = y_id.view(-1, self.config.y_size) qy_id = y_id else: qy_id = vst_resp.y_ids.detach() qy_id = qy_id.view(-1, self.config.y_size) if sample_n > 1: if gen_type == 'greedy': temp = [] temp_ids = [] # sample the prior network N times for i in range(sample_n): temp_y, temp_id = self.cat_connector(py_logits, 1.0, self.use_gpu, hard=True, return_max_id=True) temp_ids.append(temp_id.view(-1, self.config.y_size)) temp.append(temp_y.view(-1, self.config.k * self.config.y_size)) sample_y = torch.cat(temp, dim=0) y_id = torch.cat(temp_ids, dim=0) batch_size *= sample_n c_last = c_last.repeat(sample_n, 1) elif gen_type == 'sample': sample_y, y_id = self.greedy_cat_connector(py_logits, self.use_gpu, return_max_id=True) sample_y = sample_y.view(-1, self.config.k*self.config.y_size).repeat(sample_n, 1) y_id = y_id.view(-1, self.config.y_size).repeat(sample_n, 1) c_last = c_last.repeat(sample_n, 1) batch_size *= sample_n else: raise ValueError else: sample_y, y_id = self.cat_connector(py_logits, 1.0, self.use_gpu, hard=True, return_max_id=True) # pack attention context if self.config.use_attn: dec_init_w = self.dec_init_connector.get_w() init_embed = dec_init_w.view(1, self.config.y_size, self.config.k, self.config.dec_cell_size) temp_sample_y = sample_y.view(-1, self.config.y_size, self.config.k, 1) attn_inputs = torch.sum(temp_sample_y * init_embed, dim=2) else: attn_inputs = None # map sample to initial state of decoder sample_y = sample_y.view(-1, self.config.k * self.config.y_size) dec_init_state = self.c_init_connector(sample_y) + c_last.unsqueeze(0) # decode dec_outs, dec_last, dec_ctx = self.decoder(batch_size, out_utts[:, 0:-1], dec_init_state, attn_context=attn_inputs, mode=mode, gen_type=gen_type, beam_size=self.config.beam_size) # get decoder inputs labels = out_utts[:, 1:].contiguous() prev_labels = prev_utts[:, 1:].contiguous() next_labels = next_utts[:, 1:].contiguous() dec_ctx[DecoderRNN.KEY_LATENT] = y_id dec_ctx[DecoderRNN.KEY_POLICY] = log_py dec_ctx[DecoderRNN.KEY_RECOG_LATENT] = qy_id # compute loss or return results if mode == GEN: return dec_ctx, labels else: # VAE-related Losses log_qy = F.log_softmax(vst_resp.qy_logits, dim=1) vst_prev_nll = self.nll_loss(vst_resp.prev_outs, prev_labels) vst_next_nll = self.nll_loss(vst_resp.next_outs, next_labels) avg_log_qy = torch.exp(log_qy.view(-1, self.config.y_size, self.config.k)) avg_log_qy = torch.log(torch.mean(avg_log_qy, dim=0) + 1e-15) reg_kl = self.cat_kl_loss(avg_log_qy, self.log_uniform_y, batch_size, unit_average=True) mi = self.entropy_loss(avg_log_qy, unit_average=True) - self.entropy_loss(log_qy, unit_average=True) # Encoder-decoder Losses enc_dec_nll = self.nll_loss(dec_outs, labels) pi_kl = self.cat_kl_loss(log_qy.detach(), log_py, batch_size, unit_average=True) pi_nll = F.cross_entropy(py_logits.view(-1, self.config.k), y_id.view(-1)) _, max_pi = torch.max(py_logits.view(-1, self.config.k), dim=1) pi_err = torch.mean((max_pi != y_id.view(-1)).float()) if self.config.use_attribute: pad_embeded = self.x_embedding.weight[self.rev_vocab[PAD]].view( 1, 1, self.config.embed_size) pad_embeded = pad_embeded.repeat(batch_size, dec_outs.size(1), 1) mask = torch.sign(labels).float().unsqueeze(2) dec_out_p = torch.exp(dec_outs.view(-1, self.vocab_size)) dec_out_embedded = torch.matmul(dec_out_p, self.x_embedding.weight) dec_out_embedded = dec_out_embedded.view(-1, dec_outs.size(1), self.config.embed_size) valid_out_embedded = mask * dec_out_embedded + (1.0 - mask) * pad_embeded x_outs, x_last = self.x_encoder(valid_out_embedded) x_last = x_last.transpose(0, 1).contiguous(). \ view(-1, self.config.dec_cell_size) qy_logits = self.q_y(x_last).view(-1, self.config.k) attribute_outs = F.log_softmax(qy_logits, dim=qy_logits.dim() - 1) attribute_outs = attribute_outs.view(-1, self.config.y_size, self.config.k) attribute_nll = self.attribute_loss(attribute_outs, y_id.detach()) _, max_qy = torch.max(qy_logits.view(-1, self.config.k), dim=1) adv_err = torch.mean((max_qy != y_id.view(-1)).float()) else: attribute_nll = None adv_err = None results = Pack(nll=enc_dec_nll, pi_kl=pi_kl, pi_nll=pi_nll, attribute_nll=attribute_nll, vst_prev_nll=vst_prev_nll, vst_next_nll=vst_next_nll, reg_kl=reg_kl, mi=mi, pi_err=pi_err, adv_err=adv_err) if return_latent: results['log_py'] = log_py results['log_qy'] = log_qy results['dec_init_state'] = dec_init_state results['y_ids'] = y_id return results
46.159211
112
0.548302
4,508
35,081
3.956965
0.062555
0.054378
0.0296
0.037
0.847909
0.830979
0.820776
0.805247
0.793475
0.768135
0
0.010907
0.35971
35,081
759
113
46.220026
0.783234
0.039252
0
0.722513
0
0
0.01094
0
0
0
0
0
0
1
0.022688
false
0
0.027923
0
0.080279
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
cc180e2e40702fe9315e14aa8e21669862577f07
39,420
py
Python
tests/test_indexer.py
vikrammoule-redislabs/redis-sitesearch
c1a3d6845240432e3ba01ffb2c3cc1cf254b5e42
[ "MIT" ]
null
null
null
tests/test_indexer.py
vikrammoule-redislabs/redis-sitesearch
c1a3d6845240432e3ba01ffb2c3cc1cf254b5e42
[ "MIT" ]
null
null
null
tests/test_indexer.py
vikrammoule-redislabs/redis-sitesearch
c1a3d6845240432e3ba01ffb2c3cc1cf254b5e42
[ "MIT" ]
null
null
null
import os from unittest import mock from unittest.mock import call import pytest from sitesearch.keys import Keys from sitesearch.config import DOCS_PROD from sitesearch.errors import ParseError from sitesearch.indexer import DocumentParser, Indexer from sitesearch.models import SearchDocument DOCS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "documents") FILE_WITH_SECTIONS = "page_with_sections.html" FILE_WITHOUT_BREADCRUMBS = "page_without_breadcrumbs.html" FILE_WITHOUT_TITLE = "page_without_title.html" FILE_WITHOUT_LINK = "page_without_link.html" FILE_RELEASE_NOTES = "release_notes.html" FILE_WITH_AN_INDEX = "setup_and_editing.html" FILE_WITH_H3s = "file_with_h3s.html" TEST_URL = f"{DOCS_PROD.url}/test" @pytest.fixture() def indexer(app_config): mock_search_client = mock.MagicMock() yield Indexer(DOCS_PROD, app_config, mock_search_client) @pytest.fixture() def keys(app_config): yield Keys(prefix=app_config.key_prefix) @pytest.fixture() def parse_file(): """ This fixture parses a file with DocumentParser. The fixture is a callable that takes the filename of a document and returns the SearchDocuments parsed from the HTML in the file. """ def fn(filename): file = os.path.join(DOCS_DIR, filename) with open(file, encoding='utf-8') as f: html = f.read() return DocumentParser(DOCS_PROD).parse(TEST_URL, html) return fn @pytest.fixture() def index_file(indexer, parse_file): """ This fixture indexes a file using a RediSearch mock -- so that we only record the calls made to the client. After indexing the document, the fixture turns the Indexer object used, so that tests can introspect it. """ def fn(filename): for doc in parse_file(filename): indexer.index_document(doc) return indexer return fn def test_indexer_indexes_page_document(index_file, keys): """Test indexing pages. NOTE: If this test fails, it may be that you changed the fixture HTML. Changing the HTML may cause the test to fail because the MD5 hash of the HTML will change, thus the "doc_id" will be different. If this happens, you can find the new hash by adding `import ipdb; ipdb.set_trace()` into this test and running the tests with the `-s` flag. Then check the value of the mock calls, e.g.: ipdb> indexer.search_client.redis.hset.call_args_list[3] call('<key>', mapping={'doc_id': 'https://docs.redislabs.com/latest//test:page:c63108b05d076d2cdff93c6065bf362e', ... ) """ indexer = index_file(FILE_WITH_SECTIONS) expected_doc = { 'doc_id': f'{TEST_URL}:page:c34e3cb81555c9fa4346342034476dd7', 'title': 'Database Persistence with Redis Enterprise Software', 'section_title': '', 'hierarchy': '[]', 'url': TEST_URL, 's': 'test', 'body': 'All data is stored and managed exclusively in either RAM or RAM + Flash Memory (Redis on Flash) and therefore, is at risk of being lost upon a\xa0process or server failure.\xa0As Redis Enterprise Software is not just a caching solution, but also a full-fledged database, persistence to disk is critical. Therefore, Redis Enterprise Software supports persisting data to disk on a per-database basis and in multiple ways. There are two options for persistence: Append Only File (AOF) - A continuous writing of data to disk Snapshot (RDB) - An automatic periodic snapshot writing to disk Data persistence, via either mechanism, is used solely to rehydrate the database if the database process fails for any reason. It is not a replacement for backups, but something you do in addition to backups. To disable data persistence, select None. AOF writes the latest ‘write’ commands into a file every second, it resembles a traditional RDBMS’s redo log, if you are familiar with that. This file can later be ‘replayed’ in order to recover from a crash. A snapshot (RDB) on the other hand, is performed every one, six, or twelve hours. The snapshot is a dump of the data and while there is a potential of losing up to one hour of data, it is dramatically faster to recover from a snapshot compared to AOF recovery. Persistence can be configured either at time of database creation or by editing an existing database’s configuration. While the persistence model can be changed dynamically, just know that it can take time for your database to switch from one persistence model to the other. It depends on what you are switching from and to, but also on the size of your database. Note: For performance reasons, if you are going to be using AOF, it is highly recommended to make sure replication is enabled for that database as well. When these two features are enabled, persistence is performed\xa0on the database slave and does not impact performance on the master. Options for configuring data persistence There are six\xa0options for persistence in Redis Enterprise Software: Options Description None Data is not persisted to disk at all. Append Only File (AoF) on every write Data is fsynced to disk with every write. Append Only File (AoF) one second Data is fsynced to disk every second. Snapshot every 1 hour A snapshot of the database is created every hour. Snapshot every 6 hours A snapshot of the database is created every 6 hours. Snapshot every 12 hours A snapshot of the database is created every 12 hours. The first thing you need to do is determine if you even need persistence. Persistence is used to recover from a catastrophic failure, so make sure that you need to incur the overhead of persistence before you select it. If the database is being used as a cache, then you may not need persistence. If you do need persistence, then you need to identify\xa0which is the best type for your use case. Append only file (AOF) vs snapshot (RDB) Now that you know the available options, to assist in making a decision on which option is right for your use case, here is a table about the two: Append Only File (AOF) Snapshot (RDB) More resource intensive Less resource\xa0intensive Provides better durability (recover the latest point in time) Less durable Slower time to recover (Larger files) Faster recovery time More disk space required (files tend to grow large and require compaction) Requires less resource (I/O once every several hours and no compaction required) Data persistence and Redis on Flash If you are enabling data persistence for databases running on Redis Enterprise Flash, by default both master and slave shards are configured to write to disk. This is unlike a standard Redis Enterprise Software database where only the slave shards persist to disk. This master and slave dual data persistence with replication is done to better protect the database against node failures. Flash-based databases are expected to hold larger datasets and repair times for shards can be longer under node failures. Having dual-persistence provides better protection against failures under these longer repair times. However, the dual data persistence with replication adds some processor and network overhead, especially in the case of cloud configurations with persistent storage that is network attached (e.g. EBS-backed volumes in AWS). There may be times where performance is critical for your use case and you don’t want to risk data persistence adding latency. If that is the case, you can disable data-persistence on the master shards using the following\xa0rladmin command: rladmin tune db db: master_persistence disabled Page Contents Options for configuring data persistence Append only file (AOF) vs snapshot (RDB) Data persistence and Redis on Flash', 'type': 'page', 'position': 0, '__score': 1 } key = keys.document(DOCS_PROD.url, expected_doc['doc_id']) indexer.search_client.redis.hset.call_args_list[0] = call(key, mapping=expected_doc) def test_indexer_indexes_page_section_documents(index_file, keys): """Test indexing page sections. NOTE: If this test fails, it may be that you changed the fixture HTML. Changing the HTML may cause the test to fail because the MD5 hash of the HTML will change, thus the "doc_id" will be different. If this happens, you can find the new hash by adding `import ipdb; ipdb.set_trace()` into this test and running the tests with the `-s` flag. Then check the value of the mock calls, e.g.: ipdb> indexer.search_client.redis.hset.call_args_list[3] call('<key>', mapping={'doc_id': 'https://docs.redislabs.com/latest//test:section:c63108b05d076d2cdff93c6065bf362e', ... ) """ indexer = index_file(FILE_WITH_SECTIONS) expected_section_docs = [{ 'doc_id': f'{TEST_URL}:section:299d6e11b67f34e8a0d84347ae5efbd7', 'title': 'Database Persistence with Redis Enterprise Software', 'section_title': 'Options for configuring data persistence', 'hierarchy': '[]', 'url': TEST_URL, 's': 'test', 'body': 'There are six\xa0options for persistence in Redis Enterprise Software: Options Description None Data is not persisted to disk at all. Append Only File (AoF) on every write Data is fsynced to disk with every write. Append Only File (AoF) one second Data is fsynced to disk every second. Snapshot every 1 hour A snapshot of the database is created every hour. Snapshot every 6 hours A snapshot of the database is created every 6 hours. Snapshot every 12 hours A snapshot of the database is created every 12 hours. The first thing you need to do is determine if you even need persistence. Persistence is used to recover from a catastrophic failure, so make sure that you need to incur the overhead of persistence before you select it. If the database is being used as a cache, then you may not need persistence. If you do need persistence, then you need to identify\xa0which is the best type for your use case.', 'type': 'section', 'position': 0, '__score': 0.75, }, { 'doc_id': f'{TEST_URL}:section:f62925eb9d8dca6774a8db54459cf716', 'title': 'Database Persistence with Redis Enterprise Software', 'section_title': 'Append only file (AOF) vs snapshot (RDB)', 'hierarchy': '[]', 'url': TEST_URL, 's': 'test', 'body': 'Now that you know the available options, to assist in making a decision on which option is right for your use case, here is a table about the two: Append Only File (AOF) Snapshot (RDB) More resource intensive Less resource\xa0intensive Provides better durability (recover the latest point in time) Less durable Slower time to recover (Larger files) Faster recovery time More disk space required (files tend to grow large and require compaction) Requires less resource (I/O once every several hours and no compaction required)', 'type': 'section', 'position': 1, '__score': 0.75, }, { 'doc_id': f'{TEST_URL}:section:c63108b05d076d2cdff93c6065bf362e', 'title': 'Database Persistence with Redis Enterprise Software', 'section_title': 'Data persistence and Redis on Flash with Active\\-Active', 's': 'test', 'hierarchy': '[]', 'url': TEST_URL, 'body': 'active\\-active If you are enabling data persistence for databases running on Redis Enterprise Flash, by default both master and slave shards are configured to write to disk. This is unlike a standard Redis Enterprise Software database where only the slave shards persist to disk. This master and slave dual data persistence with replication is done to better protect the database against node failures. Flash-based databases are expected to hold larger datasets and repair times for shards can be longer under node failures. Having dual-persistence provides better protection against failures under these longer repair times. However, the dual data persistence with replication adds some processor and network overhead, especially in the case of cloud configurations with persistent storage that is network attached (e.g. EBS-backed volumes in AWS). There may be times where performance is critical for your use case and you don’t want to risk data persistence adding latency. If that is the case, you can disable data-persistence on the master shards using the following\xa0rladmin command: rladmin tune db db: master_persistence disabled', 'type': 'section', 'position': 2, '__score': 0.75 }] # Ignore the first call, which is for the page. In this test, # we're focused on the section documents for i, doc in enumerate(expected_section_docs, start=1): key = keys.document(DOCS_PROD.url, doc['doc_id']) assert indexer.search_client.redis.hset.call_args_list[i] == call(key, mapping=doc) def test_document_parser_skips_pages_without_title(parse_file): with pytest.raises(ParseError): parse_file(FILE_WITHOUT_TITLE) def test_document_parser_skips_release_notes(parse_file): with pytest.raises(ParseError): parse_file(FILE_RELEASE_NOTES) def test_parsing_page_with_links_in_h2s_returns_body_content(parse_file): """A regression test.""" docs = parse_file(FILE_WITH_AN_INDEX) for doc in docs: assert doc.body is not None def test_build_hierarchy(indexer): indexer.seen_urls = { "https://docs.redislabs.com/latest/1": "One", "https://docs.redislabs.com/latest/1/2": "Two", "https://docs.redislabs.com/latest/1/2/3": "Three", } doc = SearchDocument(doc_id="123", title="Title", section_title="Section", hierarchy=[], s="", url="https://docs.redislabs.com/latest/1/2/3/", body="This is the body", type='page', position=0) assert indexer.build_hierarchy(doc) == ['One', 'Two', 'Three'] def test_indexer_indexes_sections_from_h3s(index_file, keys): indexer = index_file(FILE_WITH_H3s) expected_section_docs = [{ 'doc_id': f'{TEST_URL}:page:5a6938363f1cb38ef2eec5397c4e67cc', 'title': 'RedisBloom Tutorial', 'section_title': '', 'hierarchy': '[]', 'url': 'https://docs.redislabs.com/latest//test', 'body': 'RedisBloom Tutorial | Redis Developer Hub Skip to main content Get started Try Free 🌜 🌞 Get started Try Free Menu Home Create Overview Redis Enterprise Cloud Redis on Heroku Redis on Azure Cache Redis on Google Cloud Redis on AWS Redis on Docker Redis on Kubernetes Redis from Source Develop Overview Java Python Node.js Go Ruby Php Explore Overview RedisInsight Redis Data Source for Grafana RedisMod RIOT HowTos & Tutorials Overview RediSearch Tutorial RedisJSON Tutorial RedisTimeSeries Tutorial RedisGraph Tutorial RedisBloom Tutorial RedisGears Tutorial How to build a Shopping cart app using NodeJS and RedisJSON How to build a Real-Time Leaderboard app Using Redis How to build a Rate Limiter using Redis How to cache REST API responses Using Redis & NodeJS How to list & search Movies database using RediSearch 1. Getting Started 2. Install Redisearch 3. Create Index 4. Query Data 5. Manage Index 6. Import datasets 7. Query Movies 8. Aggregation 9. Advanced Option 10. Sample Application RedisBloom Tutorial RedisBloom extends Redis core to support additional probabilistic data structures. It allows for solving computer science problems in a constant memory space with extremely fast processing and a low error rate. It supports scalable Bloom and Cuckoo filters to determine (with a specified degree of certainty) whether an item is present or absent from a collection. The RedisBloom module provides four data types: Bloom filter: A probabilistic data structure that can test for presence. A Bloom filter is a data structure designed to tell you, rapidly and memory-efficiently, whether an element is present in a set. Bloom filters typically exhibit better performance and scalability when inserting items (so if you\'re often adding items to your dataset then Bloom may be ideal). Cuckoo filter: An alternative to Bloom filters, Cuckoo filters comes with additional support for deletion of elements from a set. These filters are quicker on check operations. Count-min sketch: A count-min sketch is generally used to determine the frequency of events in a stream. You can query the count-min sketch to get an estimate of the frequency of any given event. Top-K: The Top-k probabilistic data structure in RedisBloom is a deterministic algorithm that approximates frequencies for the top k items. With Top-K, you’ll be notified in real time whenever elements enter into or are expelled from your Top-K list. If an element add-command enters the list, the dropped element will be returned. Step 1. Register and subscribe Follow this link to register and subscribe to Redis Enterprise Cloud Step 2. Create a database with RedisBloom Module Step 3. Connect to a database Follow this link to know how to connect to a database Step 4. Getting Started with RedisBloom In the next steps you will use some basic RedisBloom commands. You can run them from the Redis command-line interface (redis-cli) or use the CLI available in RedisInsight. (See part 2 of this tutorial to learn more about using the RedisInsight CLI.) To interact with RedisBloom, you use the BF.ADD and BF.EXISTS commands. Let’s go ahead and test drive some RedisBloom-specific operations. We will create a basic dataset based on unique visitors’ IP addresses, and you will see how to: Create a Bloom filter Determine whether or not an item exists in the Bloom filter Add one or more items to the Bloom filter Determine whether or not a unique visitor’s IP address exists Let’s walk through the process step-by-step: Create a Bloom filter Use the BF.ADD command to add a unique visitor IP address to the Bloom filter as shown here: >> BF.ADD unique_visitors 10.94.214.120 (integer) 1 (1.75s) Copy Determine whether or not an item exists Use the BF.EXISTS command to determine whether or not an item may exist in the Bloom filter: >> BF.EXISTS unique_visitors 10.94.214.120 (integer) 1 Copy >> BF.EXISTS unique_visitors 10.94.214.121 (integer) 0 (1.46s) Copy In the above example, the first command shows the result as “1”, indicating that the item may exist, whereas the second command displays "0", indicating that the item certainly may not exist. Add one or more items to the Bloom filter Use the BF.MADD command to add one or more items to the Bloom filter, creating the filter if it does not yet exist. This command operates identically to BF.ADD, except it allows multiple inputs and returns multiple values: >> BF.MADD unique_visitors 10.94.214.100 10.94.214.200 10.94.214.210 10.94.214.212 1) (integer) 1 2) (integer) 1 3) (integer) 1 4) (integer) 1 Copy As shown above, the BF.MADD allows you to add one or more visitors’ IP addresses to the Bloom filter. Determine whether or not a unique visitor’s IP address exists Use BF.MEXISTS to determine if one or more items may exist in the filter or not: >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.212 1) (integer) 1 2) (integer) 1 Copy >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.213 1) (integer) 1 2) (integer) 0 Copy In the above example, the first command shows the result as “1” for both the visitors’ IP addresses, indicating that these items do exist. The second command displays "0" for one of the visitor’s IP addresses, indicating that the item certainly does not exist. Next Step Learn more about RedisBloom in the Quick Start tutorial. Edit this page Previous « RedisGraph Tutorial Next RedisGears Tutorial » Step 1. Register and subscribe Step 2. Create a database with RedisBloom Module Step 3. Connect to a database Step 4. Getting Started with RedisBloom Next Step Made with </> by Get Started Create Database Develop Explore your data Best Practices Build with Redis Modules Resources Community Redis University Command Reference How-tos & tutorials Copyright: © 2021 Redis Labs. Redis and the cube logo are registered trademarks of Redis Labs Ltd.', 'type': 'page', 's': 'test', 'position': 0, '__score': 1.0 }, { 'doc_id': f'{TEST_URL}:section:113820cc765e7328919bc24f7847482c', 'title': 'RedisBloom Tutorial', 'section_title': '', 'hierarchy': '[]', 'url': 'https://docs.redislabs.com/latest//test', 'body': 'Follow this link to register and subscribe to Redis Enterprise Cloud Step 2. Create a database with RedisBloom Module # Step 3. Connect to a database # Follow this link to know how to connect to a database Step 4. Getting Started with RedisBloom # In the next steps you will use some basic RedisBloom commands. You can run them from the Redis command-line interface (redis-cli) or use the CLI available in RedisInsight. (See part 2 of this tutorial to learn more about using the RedisInsight CLI.) To interact with RedisBloom, you use the BF.ADD and BF.EXISTS commands. Let’s go ahead and test drive some RedisBloom-specific operations. We will create a basic dataset based on unique visitors’ IP addresses, and you will see how to: Create a Bloom filter Determine whether or not an item exists in the Bloom filter Add one or more items to the Bloom filter Determine whether or not a unique visitor’s IP address exists Let’s walk through the process step-by-step: Create a Bloom filter # Use the BF.ADD command to add a unique visitor IP address to the Bloom filter as shown here: >> BF.ADD unique_visitors 10.94.214.120 (integer) 1 (1.75s) Copy Determine whether or not an item exists # Use the BF.EXISTS command to determine whether or not an item may exist in the Bloom filter: >> BF.EXISTS unique_visitors 10.94.214.120 (integer) 1 Copy >> BF.EXISTS unique_visitors 10.94.214.121 (integer) 0 (1.46s) Copy In the above example, the first command shows the result as “1”, indicating that the item may exist, whereas the second command displays "0", indicating that the item certainly may not exist. Add one or more items to the Bloom filter # Use the BF.MADD command to add one or more items to the Bloom filter, creating the filter if it does not yet exist. This command operates identically to BF.ADD, except it allows multiple inputs and returns multiple values: >> BF.MADD unique_visitors 10.94.214.100 10.94.214.200 10.94.214.210 10.94.214.212 1) (integer) 1 2) (integer) 1 3) (integer) 1 4) (integer) 1 Copy As shown above, the BF.MADD allows you to add one or more visitors’ IP addresses to the Bloom filter. Determine whether or not a unique visitor’s IP address exists # Use BF.MEXISTS to determine if one or more items may exist in the filter or not: >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.212 1) (integer) 1 2) (integer) 1 Copy >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.213 1) (integer) 1 2) (integer) 0 Copy In the above example, the first command shows the result as “1” for both the visitors’ IP addresses, indicating that these items do exist. The second command displays "0" for one of the visitor’s IP addresses, indicating that the item certainly does not exist. Next Step # Learn more about RedisBloom in the Quick Start tutorial.', 'type': 'section', 's': 'test', 'position': 0, '__score': 0.75 }, { 'doc_id': f'{TEST_URL}:section:0c0fe866d8e3ee6b792aed7c3738f4f6', 'title': 'RedisBloom Tutorial', 'section_title': '', 'hierarchy': '[]', 'url': 'https://docs.redislabs.com/latest//test', 'body': 'Step 3. Connect to a database # Follow this link to know how to connect to a database Step 4. Getting Started with RedisBloom # In the next steps you will use some basic RedisBloom commands. You can run them from the Redis command-line interface (redis-cli) or use the CLI available in RedisInsight. (See part 2 of this tutorial to learn more about using the RedisInsight CLI.) To interact with RedisBloom, you use the BF.ADD and BF.EXISTS commands. Let’s go ahead and test drive some RedisBloom-specific operations. We will create a basic dataset based on unique visitors’ IP addresses, and you will see how to: Create a Bloom filter Determine whether or not an item exists in the Bloom filter Add one or more items to the Bloom filter Determine whether or not a unique visitor’s IP address exists Let’s walk through the process step-by-step: Create a Bloom filter # Use the BF.ADD command to add a unique visitor IP address to the Bloom filter as shown here: >> BF.ADD unique_visitors 10.94.214.120 (integer) 1 (1.75s) Copy Determine whether or not an item exists # Use the BF.EXISTS command to determine whether or not an item may exist in the Bloom filter: >> BF.EXISTS unique_visitors 10.94.214.120 (integer) 1 Copy >> BF.EXISTS unique_visitors 10.94.214.121 (integer) 0 (1.46s) Copy In the above example, the first command shows the result as “1”, indicating that the item may exist, whereas the second command displays "0", indicating that the item certainly may not exist. Add one or more items to the Bloom filter # Use the BF.MADD command to add one or more items to the Bloom filter, creating the filter if it does not yet exist. This command operates identically to BF.ADD, except it allows multiple inputs and returns multiple values: >> BF.MADD unique_visitors 10.94.214.100 10.94.214.200 10.94.214.210 10.94.214.212 1) (integer) 1 2) (integer) 1 3) (integer) 1 4) (integer) 1 Copy As shown above, the BF.MADD allows you to add one or more visitors’ IP addresses to the Bloom filter. Determine whether or not a unique visitor’s IP address exists # Use BF.MEXISTS to determine if one or more items may exist in the filter or not: >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.212 1) (integer) 1 2) (integer) 1 Copy >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.213 1) (integer) 1 2) (integer) 0 Copy In the above example, the first command shows the result as “1” for both the visitors’ IP addresses, indicating that these items do exist. The second command displays "0" for one of the visitor’s IP addresses, indicating that the item certainly does not exist. Next Step # Learn more about RedisBloom in the Quick Start tutorial.', 'type': 'section', 's': 'test', 'position': 1, '__score': 0.75 }, { 'doc_id': f'{TEST_URL}:section:2178f498278a818fa1e0b08206a2347e', 'title': 'RedisBloom Tutorial', 'section_title': '', 'hierarchy': '[]', 'url': 'https://docs.redislabs.com/latest//test', 'body': 'Follow this link to know how to connect to a database Step 4. Getting Started with RedisBloom # In the next steps you will use some basic RedisBloom commands. You can run them from the Redis command-line interface (redis-cli) or use the CLI available in RedisInsight. (See part 2 of this tutorial to learn more about using the RedisInsight CLI.) To interact with RedisBloom, you use the BF.ADD and BF.EXISTS commands. Let’s go ahead and test drive some RedisBloom-specific operations. We will create a basic dataset based on unique visitors’ IP addresses, and you will see how to: Create a Bloom filter Determine whether or not an item exists in the Bloom filter Add one or more items to the Bloom filter Determine whether or not a unique visitor’s IP address exists Let’s walk through the process step-by-step: Create a Bloom filter # Use the BF.ADD command to add a unique visitor IP address to the Bloom filter as shown here: >> BF.ADD unique_visitors 10.94.214.120 (integer) 1 (1.75s) Copy Determine whether or not an item exists # Use the BF.EXISTS command to determine whether or not an item may exist in the Bloom filter: >> BF.EXISTS unique_visitors 10.94.214.120 (integer) 1 Copy >> BF.EXISTS unique_visitors 10.94.214.121 (integer) 0 (1.46s) Copy In the above example, the first command shows the result as “1”, indicating that the item may exist, whereas the second command displays "0", indicating that the item certainly may not exist. Add one or more items to the Bloom filter # Use the BF.MADD command to add one or more items to the Bloom filter, creating the filter if it does not yet exist. This command operates identically to BF.ADD, except it allows multiple inputs and returns multiple values: >> BF.MADD unique_visitors 10.94.214.100 10.94.214.200 10.94.214.210 10.94.214.212 1) (integer) 1 2) (integer) 1 3) (integer) 1 4) (integer) 1 Copy As shown above, the BF.MADD allows you to add one or more visitors’ IP addresses to the Bloom filter. Determine whether or not a unique visitor’s IP address exists # Use BF.MEXISTS to determine if one or more items may exist in the filter or not: >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.212 1) (integer) 1 2) (integer) 1 Copy >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.213 1) (integer) 1 2) (integer) 0 Copy In the above example, the first command shows the result as “1” for both the visitors’ IP addresses, indicating that these items do exist. The second command displays "0" for one of the visitor’s IP addresses, indicating that the item certainly does not exist. Next Step # Learn more about RedisBloom in the Quick Start tutorial.', 'type': 'section', 's': 'test', 'position': 2, '__score': 0.75 }, { 'doc_id': f'{TEST_URL}:section:f7eef8eb8ad1b02ab6f269da416ae08a', 'title': 'RedisBloom Tutorial', 'section_title': '', 'hierarchy': '[]', 'url': 'https://docs.redislabs.com/latest//test', 'body': 'In the next steps you will use some basic RedisBloom commands. You can run them from the Redis command-line interface (redis-cli) or use the CLI available in RedisInsight. (See part 2 of this tutorial to learn more about using the RedisInsight CLI.) To interact with RedisBloom, you use the BF.ADD and BF.EXISTS commands. Let’s go ahead and test drive some RedisBloom-specific operations. We will create a basic dataset based on unique visitors’ IP addresses, and you will see how to: Create a Bloom filter Determine whether or not an item exists in the Bloom filter Add one or more items to the Bloom filter Determine whether or not a unique visitor’s IP address exists Let’s walk through the process step-by-step: Create a Bloom filter # Use the BF.ADD command to add a unique visitor IP address to the Bloom filter as shown here: >> BF.ADD unique_visitors 10.94.214.120 (integer) 1 (1.75s) Copy Determine whether or not an item exists # Use the BF.EXISTS command to determine whether or not an item may exist in the Bloom filter: >> BF.EXISTS unique_visitors 10.94.214.120 (integer) 1 Copy >> BF.EXISTS unique_visitors 10.94.214.121 (integer) 0 (1.46s) Copy In the above example, the first command shows the result as “1”, indicating that the item may exist, whereas the second command displays "0", indicating that the item certainly may not exist. Add one or more items to the Bloom filter # Use the BF.MADD command to add one or more items to the Bloom filter, creating the filter if it does not yet exist. This command operates identically to BF.ADD, except it allows multiple inputs and returns multiple values: >> BF.MADD unique_visitors 10.94.214.100 10.94.214.200 10.94.214.210 10.94.214.212 1) (integer) 1 2) (integer) 1 3) (integer) 1 4) (integer) 1 Copy As shown above, the BF.MADD allows you to add one or more visitors’ IP addresses to the Bloom filter. Determine whether or not a unique visitor’s IP address exists # Use BF.MEXISTS to determine if one or more items may exist in the filter or not: >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.212 1) (integer) 1 2) (integer) 1 Copy >> BF.MEXISTS unique_visitors 10.94.214.200 10.94.214.213 1) (integer) 1 2) (integer) 0 Copy In the above example, the first command shows the result as “1” for both the visitors’ IP addresses, indicating that these items do exist. The second command displays "0" for one of the visitor’s IP addresses, indicating that the item certainly does not exist. Next Step # Learn more about RedisBloom in the Quick Start tutorial.', 'type': 'section', 's': 'test', 'position': 3, '__score': 0.75 }, { 'doc_id': f'{TEST_URL}:section:14094b624de5c096352862568e38516c', 'title': 'RedisBloom Tutorial', 'section_title': '', 'hierarchy': '[]', 'url': 'https://docs.redislabs.com/latest//test', 'body': 'Learn more about RedisBloom in the Quick Start tutorial.', 'type': 'section', 's': 'test', 'position': 4, '__score': 0.75 }] for i, doc in enumerate(expected_section_docs): key = keys.document(DOCS_PROD.url, doc['doc_id']) assert indexer.search_client.redis.hset.call_args_list[i] == call( key, mapping=doc)
141.290323
7,843
0.621106
5,306
39,420
4.569544
0.124199
0.009074
0.015879
0.022272
0.741854
0.723336
0.716366
0.706838
0.691413
0.67475
0
0.039803
0.321233
39,420
278
7,844
141.798561
0.866166
0.04343
0
0.526829
0
0.02439
0.709728
0.017709
0
0
0
0
0.019512
1
0.063415
false
0
0.04878
0
0.131707
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
044edc75113c86db34de926d368b957aa6e8beb3
99
py
Python
turbo/__init__.py
davish/hotwire-django-demo-chat
eea7b5ec10dffff9a4e70b933a5b5d038bc71d90
[ "MIT" ]
11
2020-12-24T11:00:39.000Z
2021-12-23T12:02:41.000Z
turbo/__init__.py
davish/hotwire-django-demo-chat
eea7b5ec10dffff9a4e70b933a5b5d038bc71d90
[ "MIT" ]
null
null
null
turbo/__init__.py
davish/hotwire-django-demo-chat
eea7b5ec10dffff9a4e70b933a5b5d038bc71d90
[ "MIT" ]
2
2020-12-24T12:24:20.000Z
2021-02-13T12:12:30.000Z
def get_broadcast_channel(model, stream, value): return f"BROADCAST-{model}-{stream}-{value}"
24.75
48
0.727273
13
99
5.384615
0.692308
0.314286
0.457143
0
0
0
0
0
0
0
0
0
0.111111
99
3
49
33
0.795455
0
0
0
0
0
0.346939
0.346939
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
f0ae18c302b5985ad71ac453cdeb60bcb3475d69
29,545
py
Python
stagecraft/apps/dashboards/tests/views/test_module.py
alphagov-mirror/stagecraft
16afba8c0cf942279426c28c416d5dd430ae2d68
[ "MIT" ]
3
2016-03-07T11:12:07.000Z
2018-04-07T21:56:27.000Z
stagecraft/apps/dashboards/tests/views/test_module.py
alphagov-mirror/stagecraft
16afba8c0cf942279426c28c416d5dd430ae2d68
[ "MIT" ]
81
2015-01-05T15:27:56.000Z
2021-03-24T10:51:43.000Z
stagecraft/apps/dashboards/tests/views/test_module.py
alphagov-mirror/stagecraft
16afba8c0cf942279426c28c416d5dd430ae2d68
[ "MIT" ]
6
2015-01-25T09:05:52.000Z
2021-04-10T20:14:58.000Z
import json from django.test import TestCase from hamcrest import ( assert_that, equal_to, is_, has_entry, has_item, has_key, is_not, has_length, greater_than ) from stagecraft.apps.users.models import User from stagecraft.libs.authorization.tests.test_http import with_govuk_signon from stagecraft.libs.backdrop_client import disable_backdrop_connection from ...models import Dashboard, Module, ModuleType from ...views.module import add_module_to_dashboard from stagecraft.apps.dashboards.tests.factories.factories import( DashboardFactory, ModuleFactory, ModuleTypeFactory) from stagecraft.apps.datasets.tests.factories import( DataGroupFactory, DataTypeFactory, DataSetFactory) class ModuleViewsTestCase(TestCase): @classmethod def setUpClass(cls): cls.data_group = DataGroupFactory(name='group') cls.data_type = DataTypeFactory(name='type') cls.data_set = DataSetFactory( data_group=cls.data_group, data_type=cls.data_type, ) cls.module_type = ModuleTypeFactory( name='a-type', schema={ 'type': 'object', 'properties': { 'thing': { 'type': 'string', 'required': True } }, '$schema': "http://json-schema.org/draft-03/schema#" } ) cls.dashboard = DashboardFactory( published=True, title='A service', slug='some-slug', ) cls.dashboard_without_owner = DashboardFactory( published=True, title='Another service', slug='some-other-slug', ) cls.user, _ = User.objects.get_or_create( email='foobar.lastname@gov.uk') cls.dashboard.owners.add(cls.user) @classmethod @disable_backdrop_connection def tearDownClass(cls): cls.data_set.delete() cls.data_type.delete() cls.data_group.delete() cls.module_type.delete() cls.dashboard.delete() @with_govuk_signon(permissions=['dashboard']) def test_get_module_by_uuid(self): module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) resp = self.client.get( '/module/{}'.format(module1.id), HTTP_AUTHORIZATION='Bearer correct-token') assert_that(resp.status_code, is_(equal_to(200))) resp_json = json.loads(resp.content) module_attrs = { u'info': [], u'description': u'', u'parent': None, u'title': u'title', u'data_set': None, u'query_parameters': None, u'modules': [], u'slug': u'module-1', u'options': {}, u'dashboard': { u'id': str(module1.dashboard_id) }, u'type': { u'id': str(module1.type_id) }, u'id': str(module1.id) } assert_that( resp_json, equal_to(module_attrs)) @with_govuk_signon(permissions=['dashboard']) def test_get_module_by_uuid_404s_when_user_not_owner_of_dashboard(self): module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard_without_owner, slug='module-1', options={}, order=1) resp = self.client.get( '/module/{}'.format(module1.id), HTTP_AUTHORIZATION='Bearer correct-token') assert_that(resp.status_code, is_(equal_to(404))) def test_module_doesnt_delete(self): module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) delete_resp = self.client.delete( '/module/{}'.format(module1.id), HTTP_AUTHORIZATION='Bearer development-oauth-access-token') assert_that(delete_resp.status_code, equal_to(405)) @with_govuk_signon(permissions=['dashboard']) def test_list_modules_by_uuid_or_slug(self): module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) module2 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-2', options={}, order=2) resp = self.client.get( '/dashboard/{}/module'.format(self.dashboard.slug), HTTP_AUTHORIZATION='Bearer correct-token') assert_that(resp.status_code, is_(equal_to(200))) resp_json = json.loads(resp.content) assert_that(len(resp_json), is_(equal_to(2))) assert_that( resp_json, has_item(has_entry('id', str(module1.id)))) assert_that( resp_json, has_item(has_entry('id', str(module2.id)))) self.client.get( '/dashboard/{}/module'.format(self.dashboard.id), HTTP_AUTHORIZATION='Bearer correct-token') resp_json = json.loads(resp.content) assert_that(len(resp_json), is_(equal_to(2))) assert_that( resp_json, has_item(has_entry('id', str(module1.id)))) assert_that( resp_json, has_item(has_entry('id', str(module2.id)))) @with_govuk_signon(permissions=['dashboard']) def test_list_modules_on_dashboard_when_not_owner_returns_404(self): dashboard2 = DashboardFactory( published=True, title='A service', slug='some-slug2', ) ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-2', options={}, order=2) ModuleFactory( type=self.module_type, dashboard=dashboard2, slug='module-3', options={}, order=1) resp = self.client.get( '/dashboard/{}/module'.format(dashboard2.slug), HTTP_AUTHORIZATION='Bearer correct-token') assert_that(resp.status_code, is_(equal_to(404))) @with_govuk_signon(permissions=['dashboard']) def test_list_modules_on_dashboard(self): dashboard2 = DashboardFactory( published=True, title='A service', slug='some-slug2', ) dashboard2.owners.add(self.user) module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) module2 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-2', options={}, order=2) module3 = ModuleFactory( type=self.module_type, dashboard=dashboard2, slug='module-3', options={}, order=1) resp = self.client.get( '/dashboard/{}/module'.format(self.dashboard.slug), HTTP_AUTHORIZATION='Bearer correct-token') assert_that(resp.status_code, is_(equal_to(200))) resp_json = json.loads(resp.content) assert_that(len(resp_json), is_(equal_to(2))) assert_that( resp_json, has_item(has_entry('id', str(module1.id)))) assert_that( resp_json, has_item(has_entry('id', str(module2.id)))) assert_that( resp_json, is_not(has_item(has_entry('id', str(module3.id))))) @with_govuk_signon(permissions=['dashboard']) def test_list_modules(self): ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-2', options={}, order=2) resp = self.client.get( '/modules', HTTP_AUTHORIZATION='Bearer correct-token') assert_that(resp.status_code, is_(equal_to(200))) resp_json = json.loads(resp.content) assert_that(len(resp_json), is_(equal_to(2))) def test_edit_a_module_by_slug_on_a_dashboard_when_you_are_an_owner(self): module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) resp = self.client.put( '/module/{}'.format(module1.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'objects': "some object", 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(405))) def test_edit_a_module_by_id_when_you_are_an_owner(self): module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard, slug='module-1', options={}, order=1) resp = self.client.put( '/module/{}'.format(module1.id), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'objects': "some object", 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(405))) def test_edit_a_module_when_not_owner(self): module1 = ModuleFactory( type=self.module_type, dashboard=self.dashboard_without_owner, slug='module-1', options={}, order=1) resp = self.client.put( '/module/{}'.format(module1.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'objects': "some object", 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(405))) def test_add_a_module_to_a_dashboard(self): existing_modules_count = len(Module.objects.all()) resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'objects': "some object", 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(200))) assert_that( len(Module.objects.all()), greater_than(existing_modules_count)) resp_json = json.loads(resp.content) assert_that(resp_json, has_key('id')) assert_that(resp_json, has_entry('slug', 'a-module')) assert_that(resp_json, has_entry('options', {'thing': 'a value'})) stored_module = Module.objects.get(id=resp_json['id']) assert_that(stored_module, is_not(None)) def test_add_a_module_with_no_type(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_a_module_with_empty_type(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.id), data=json.dumps({ 'slug': 'a-module', 'title': 'Some module', 'type_id': '', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_a_module_to_a_non_existant_dashboard(self): resp = self.client.post( '/dashboard/391213f0-336f-11e4-8c21-0800200c9a66/module', data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(404))) def test_add_a_module_with_a_data_set_that_doesnt_exist(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'data_group': 'bad-group', 'data_type': 'bad-type', 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_a_module_with_an_empty_data_set(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'data_group': '', 'data_type': '', 'title': 'Some module', 'description': 'a description', 'info': [], 'options': { 'thing': 'a value', }, 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(200))) def test_add_a_module_with_an_empty_data_set_and_query_parameters(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'data_group': '', 'data_type': '', 'title': 'Some module', 'description': 'a description', 'info': [], 'options': { 'thing': 'a value', }, 'order': 1, 'modules': [], 'query_parameters': {}, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(200))) def test_add_a_module_with_a_data_set(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'data_type': str(self.data_type.name), 'data_group': str(self.data_group.name), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(200))) def test_add_a_module_with_a_data_set_and_a_query(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'data_type': str(self.data_type.name), 'data_group': str(self.data_group.name), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'query_parameters': { 'sort_by': 'thing:desc', }, 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(200))) # do some parsing and that def test_add_a_module_with_a_query_but_no_data_set(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'query_parameters': { 'collect': ['thing:invalid-collect-thing'] }, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_a_module_to_a_dashboard_that_options_violates_schema(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { }, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_a_module_to_a_dashboard_queryparams_violates_schema(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'data_type': str(self.data_type.name), 'data_group': str(self.data_group.name), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'query_parameters': { 'collect': ['thing:invalid-collect-thing'] }, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_a_module_to_a_dashboard_bad_json(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data='not json', HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_a_module_fails_with_bad_content_type(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'order': 1, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/not-a-type') assert_that(resp.status_code, is_(equal_to(415))) def test_add_a_module_fails_with_invalid_slug(self): """Verifies that model validations are being run""" resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard.slug), data=json.dumps({ 'slug': 'bad slug', 'slug': 'a module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': {'thing': 'a value'}, 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, equal_to(400)) def test_add_a_module_wih_an_empty_id(self): """Verifies that model validations are being run""" add_module_to_dashboard( self.dashboard, { 'id': '', 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': {'thing': 'a value'}, 'order': 1, 'modules': [], } ) dashboard = Dashboard.objects.get(id=self.dashboard.id) assert_that(dashboard.module_set.all(), has_length(1)) def test_add_a_module_without_a_dashboard(self): resp = self.client.post( '/module/', data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': { 'thing': 'a value', }, 'objects': "some object", 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(404))) @with_govuk_signon(permissions=['dashboard']) def test_add_a_module_to_a_dashboard_you_do_not_own(self): resp = self.client.post( '/dashboard/{}/module'.format(self.dashboard_without_owner.slug), data=json.dumps({ 'slug': 'a-module', 'type_id': str(self.module_type.id), 'title': 'Some module', 'description': 'Some text about the module', 'info': ['foo'], 'options': {'thing': 'a value'}, 'order': 1, 'modules': [], }), HTTP_AUTHORIZATION='Bearer correct-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(404))) class ModuleTypeViewsTestCase(TestCase): def test_list_types(self): ModuleTypeFactory(name="foo", schema={}) ModuleTypeFactory(name="bar", schema={}) resp = self.client.get('/module-type') resp_json = json.loads(resp.content) assert_that(len(resp_json), 2) assert_that( resp_json, has_item(has_entry('name', 'foo')), ) assert_that( resp_json, has_item(has_entry('name', 'bar')), ) def test_list_types_filter_by_name(self): ModuleTypeFactory(name="foo", schema={}) ModuleTypeFactory(name="bar", schema={}) resp = self.client.get('/module-type?name=foo') resp_json = json.loads(resp.content) assert_that(len(resp_json), 1) assert_that( resp_json, has_item(has_entry('name', 'foo')), ) def test_list_types_filter_by_name_case_insensitive(self): ModuleTypeFactory(name="foo", schema={}) ModuleTypeFactory(name="bar", schema={}) resp = self.client.get('/module-type?name=fOo') resp_json = json.loads(resp.content) assert_that(len(resp_json), 1) assert_that( resp_json, has_item(has_entry('name', 'foo')), ) def test_add_type(self): resp = self.client.post( '/module-type', data=json.dumps({ 'name': 'a_type', 'schema': {'type': 'string'}, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(200))) resp_json = json.loads(resp.content) assert_that(resp_json, has_key('id')) assert_that(resp_json, has_entry('name', 'a_type')) assert_that(resp_json, has_entry('schema', {'type': 'string'})) stored_types = ModuleType.objects.get(id=resp_json['id']) assert_that(stored_types, is_not(None)) def test_add_type_not_json(self): resp = self.client.post( '/module-type', data=json.dumps({ }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/something-else') assert_that(resp.status_code, is_(equal_to(415))) def test_add_type_with_no_name(self): resp = self.client.post( '/module-type', data=json.dumps({ 'schema': {'type': 'string'}, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_type_with_no_schema(self): resp = self.client.post( '/module-type', data=json.dumps({ 'name': 'a-type', }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_type_with_an_invalid_schema(self): resp = self.client.post( '/module-type', data=json.dumps({ 'name': 'a-type', 'schema': {'properties': 'true'}, }), HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400))) def test_add_type_with_invalid_json(self): resp = self.client.post( '/module-type', data='not json', HTTP_AUTHORIZATION='Bearer development-oauth-access-token', content_type='application/json') assert_that(resp.status_code, is_(equal_to(400)))
34.354651
78
0.524217
3,005
29,545
4.918136
0.065557
0.043305
0.047365
0.043305
0.843494
0.83666
0.817376
0.805806
0.786454
0.76832
0
0.011537
0.345778
29,545
859
79
34.394645
0.753065
0.00396
0
0.744624
0
0
0.182548
0.033994
0
0
0
0
0.084677
1
0.052419
false
0
0.013441
0
0.068548
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
f0be8865967196f47af22404b0f071833c4d3d5e
43,542
py
Python
MuJoCo/modules/controllers.py
mosesnah-shared/adaptive-control
dc9504f1f2531a3ed2d16358f28024c4647a09e4
[ "MIT" ]
1
2020-12-05T20:46:39.000Z
2020-12-05T20:46:39.000Z
MuJoCo/modules/controllers.py
mosesnah-shared/adaptive-control
dc9504f1f2531a3ed2d16358f28024c4647a09e4
[ "MIT" ]
null
null
null
MuJoCo/modules/controllers.py
mosesnah-shared/adaptive-control
dc9504f1f2531a3ed2d16358f28024c4647a09e4
[ "MIT" ]
null
null
null
# [Built-in modules] # [3rd party modules] import numpy as np import time import pickle from modules.utils import my_print from MLmodules.RBFN import RBFN import matplotlib.pyplot as plt try: import mujoco_py as mjPy except ImportError as e: raise error.DependencyNotInstalled( "{}. (HINT: you need to install mujoco_py, \ and also perform the setup instructions here: \ https://github.com/openai/mujoco-py/.)".format( e ) ) # Added try: import sympy as sp from sympy.utilities.lambdify import lambdify, implemented_function except ImportError as e: raise error.DependencyNotInstalled( "{}. (HINT: you need to install sympy, \ Simply type pip3 install sympy. \ Sympy is necessary for building ZFT Calculation)".format( e ) ) # [Local modules] class Controller( ): """ Description: ----------- Parent class for the controllers """ def __init__( self, mjModel, mjData ): """ """ self.mjModel = mjModel self.mjData = mjData self.ctrl_par_names = None def set_ctrl_par( self, **kwargs ): """ Setting the control parameters Each controllers have their own controller parameters names (ctrl_par_names), This method function will become handy when we want to modify, or set the control parameters. """ if kwargs is not None: for args in kwargs: if args in self.ctrl_par_names: setattr( self, args, kwargs[ args ] ) else: pass def input_calc( self, start_time, current_time ): """ Calculating the torque input """ raise NotImplementedError # Adding this NotImplementedError will force the child class to override parent's methods. class AdaptiveController( Controller ): """ Description: ---------- Class for a Cartesian Impedance Controller [REF] Slotine, Jean-Jacques E., and Weiping Li. "On the adaptive control of robot manipulators." The international journal of robotics research 6.3 (1987): 49-59.APA """ def __init__( self, mjModel, mjData, type = 1, is_robust = False ): super().__init__( mjModel, mjData ) self.act_names = mjModel.actuator_names self.n_act = len( mjModel.actuator_names ) self.idx_act = np.arange( 0, self.n_act ) self.n_limbs = '-'.join( mjModel.body_names ).lower().count( 'arm' ) self.g = -mjModel.opt.gravity[ 2 ] self.type = type # If type 1, then Joint Space Planning # If type 2, then Cartesian Space Planning self.t_sym = sp.symbols( 't' ) # time symbol of the equation, useful when defining the trajectory self.NN = None # The neural network for compensation. # For the desired trajectory to be followed # Regardless of whether it is Cartesian Space/Joint Space tracking, we'll set the trajectory # self.traj_func_pos = # self.traj_func_vel = self.J_old, self.J_new = None, None self.dt = self.mjModel.opt.timestep if self.n_act == 2: # For 2DOF robot, size of a is 5, Y is 2-by-5 self.a = np.zeros( 5 ) self.Y = np.zeros( ( 2, 5 ) ) elif self.n_act == 4: # For 4DOF robot, size of a is 11, Y is 4-by-11 self.a = np.zeros( 11 ) self.Y = np.zeros( ( 4, 11 ) ) def set_trajectory( self, trajectory ): """ Setting the trajectory of the simulation The name of the variable is traj_pos, traj_vel, traj_acc, to make it agnostic to Cartesian/Joint Space Prefix func is added to the variable to denote that the function is "lambda" function. """ self.func_traj_pos = trajectory self.func_traj_vel = [ sp.diff( tmp, self.t_sym ) for tmp in self.func_traj_pos ] self.func_traj_acc = [ sp.diff( tmp, self.t_sym ) for tmp in self.func_traj_vel ] self.func_traj_pos = lambdify( self.t_sym, self.func_traj_pos ) self.func_traj_vel = lambdify( self.t_sym, self.func_traj_vel ) self.func_traj_acc = lambdify( self.t_sym, self.func_traj_acc ) # Get the initial position of the q vector # self.traj_pos = self.func_traj_pos( 0 ) # self.traj_vel = self.func_traj_vel( 0 ) # self.traj_acc = self.func_traj_acc( 0 ) def get_Y_and_s( self, q, dq, t ): self.traj_pos = self.func_traj_pos( t ) # First saving the trajectory position if self.type == 1: # If joint space tracking task qd = self.func_traj_pos( t ) # Just for simplification of the notation dqd = self.func_traj_vel( t ) # Just for simplification of the notation ddqd = self.func_traj_acc( t ) # Just for simplification of the notation qtilde = q - qd dqtilde = dq - dqd self.Lgain = 20 * np.eye( self.n_act ) self.dqr = dqd - self.Lgain.dot( qtilde ) self.ddqr = ddqd - self.Lgain.dot( dqtilde ) self.s = dq - self.dqr # The sliding variable. elif self.type == 2: # If Cartesian space tracking task xd = self.func_traj_pos( t ) # Just for simplification of the notation dxd = self.func_traj_vel( t ) # Just for simplification of the notation ddxd = self.func_traj_acc( t ) # Just for simplification of the notation # The name of EEGEOM is crucial for this task # Hence for the xml file, do not change the name EEGEOM for the end-effector xEE = np.array( self.mjData.get_geom_xpos( "EEGEOM" ) ) # Get the end-effector position dxEE = np.array( self.mjData.get_geom_xvelp( "EEGEOM" ) ) # Get the end-effector velocity JEE = self.mjData.get_geom_jacp( "EEGEOM" ).reshape( 3, -1 )[ :, 0 : self.n_act ] # Get the end-effector Jacobian xtilde = xEE - xd dxtilde = dxEE - dxd # [TODO] [Moses C. Nah] [2020.02.21] # For this controller, the Jacobian matrix is exactly known, but it actually doesn't make sense # since the adaptive controller doesn't know the geometrical details of the robot. # Hence, adding the Jacobian parameters for the adaptive controller too. if self.J_new is None: # If J_new is not initialized, then filling in with the jacobian self.J_new = JEE dJ = np.zeros( ( 3, self.n_act ) ) else: self.J_old = self.J_new self.J_new = JEE dJ = ( self.J_new - self.J_old ) / self.dt # Getting the time difference of Jacobian. if self.n_act == 2: # If 2DOF robot model, then no movement in the y-direction since the movement is confined to the 2D sagittal plane xtilde = np.delete( xtilde , 1, 0 ) # Erasing the y (2nd row) element to prevent singularity dxtilde = np.delete( dxtilde, 1, 0 ) # Erasing the y (2nd row) element to prevent singularity\ dxd = np.delete( dxd , 1, 0 ) # Erasing the y (2nd row) element to prevent singularity ddxd = np.delete( ddxd , 1, 0 ) # Erasing the y (2nd row) element to prevent singularity JEE = np.delete( JEE , 1, 0 ) # Erasing the element (2nd row) to prevent singularity dJ = np.delete( dJ , 1, 0 ) # Erasing the element (2nd row) to prevent singularity self.Lgain = 1.0 * np.eye( self.n_act ) if self.n_act == 2: self.Lgain = 1.0 * np.eye( self.n_act ) Jinv = np.linalg.inv( JEE ) elif self.n_act == 4: self.Lgain = 1.0 * np.eye( 3 ) Jinv = np.linalg.pinv( JEE ) self.dqr = Jinv.dot( dxd - self.Lgain.dot( xtilde ) ) self.ddqr = Jinv.dot( ddxd - self.Lgain.dot( dxtilde ) - dJ.dot( self.dqr ) ) self.s = dq - self.dqr # Defining the sliding variable ddqr, dqr = self.ddqr, self.dqr # Just for notation simplification if self.n_act == 2: # For 2D Model Case self.Y[ 0, 0 ] = ddqr[ 0 ] self.Y[ 0, 1 ] = ddqr[ 0 ] + ddqr[ 1 ] self.Y[ 0, 2 ] = 2*ddqr[0]*np.cos(q[1]) + ddqr[1]*np.cos(q[1]) - dqr[0]*np.sin(q[1])*dq[1] - dqr[1]*np.sin(q[1])*dq[0] - dqr[1]*np.sin(q[1])*dq[1] self.Y[ 0, 3 ] = np.sin(q[0]) self.Y[ 0, 4 ] = np.sin( q[0] + q[1] ) # self.Y[ 1, 0 ] = 0 self.Y[ 1, 1 ] = ddqr[ 0 ] + ddqr[ 1] self.Y[ 1, 2 ] = ddqr[0]*np.cos(q[1]) + dqr[0]*np.sin(q[1])*dq[0] self.Y[ 1, 3 ] = 0 self.Y[ 1, 4 ] = np.sin( q[0] + q[1] ) elif self.n_act == 4: # For 3D Model Case self.Y[0, 0] = ddqr[0]*np.cos(q[1])**2*np.sin(q[2])**2 - (dqr[0]*np.sin(2*q[1])*dq[1])/2 - (dqr[1]*np.sin(2*q[1])*dq[0])/2 - (dqr[1]*np.cos(q[1])*dq[2])/2 - (dqr[2]*np.cos(q[1])*dq[1])/2 + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[1] + ddqr[1]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) - dqr[1]*np.cos(q[2])*np.sin(q[1])*np.sin(q[2])*dq[1] + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[2] + dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] self.Y[0, 1] = ddqr[0]*np.sin(q[1])**2*np.sin(q[3])**2 + (dqr[0]*np.sin(2*q[1])*dq[1])/2 + (dqr[1]*np.sin(2*q[1])*dq[0])/2 + (dqr[0]*np.sin(2*q[3])*dq[3])/2 + (dqr[3]*np.sin(2*q[3])*dq[0])/2 - ddqr[2]*np.sin(q[1])*np.sin(q[3])**2 - (dqr[1]*np.cos(q[1])*dq[2])/2 - (dqr[2]*np.cos(q[1])*dq[1])/2 - (dqr[1]*np.cos(q[2])*np.sin(q[1])*dq[3])/2 - (dqr[3]*np.cos(q[2])*np.sin(q[1])*dq[1])/2 + (dqr[2]*np.cos(q[1])*np.sin(q[2])*dq[3])/2 + (dqr[3]*np.cos(q[1])*np.sin(q[2])*dq[2])/2 + ddqr[0]*np.cos(q[1])**2*np.cos(q[3])**2*np.sin(q[2])**2 + ddqr[1]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3]) - ddqr[2]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3]) + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[1] + ddqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2]) - dqr[0]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[3] - dqr[3]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] - dqr[1]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] - 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[1] - 2*dqr[1]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[0] - 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[3] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[3] + dqr[3]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[1] - 2*dqr[3]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[0] - dqr[2]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[3] - dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[2] + 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[3] + 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[1] + 2*dqr[1]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] + 2*dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[0] + 2*ddqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3]) + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[2] + dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[3] + dqr[3]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[0] + dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[3])*dq[1] - dqr[2]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[3])*dq[2] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] - dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] self.Y[0, 2] = ddqr[0]*np.cos(q[1])**2*np.cos(q[2])**2 + (dqr[1]*np.cos(q[1])*dq[2])/2 + (dqr[2]*np.cos(q[1])*dq[1])/2 - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[1] - ddqr[1]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) + dqr[1]*np.cos(q[2])*np.sin(q[1])*np.sin(q[2])*dq[1] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] self.Y[0, 3] = ddqr[0]*np.cos(q[1])**2*np.cos(q[2])**2 + ddqr[3]*np.cos(q[1])*np.cos(q[2]) + (dqr[1]*np.cos(q[1])*dq[2])/2 + (dqr[2]*np.cos(q[1])*dq[1])/2 - (dqr[1]*np.cos(q[2])*np.sin(q[1])*dq[3])/2 - (dqr[3]*np.cos(q[2])*np.sin(q[1])*dq[1])/2 - (dqr[2]*np.cos(q[1])*np.sin(q[2])*dq[3])/2 - (dqr[3]*np.cos(q[1])*np.sin(q[2])*dq[2])/2 - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[1] - ddqr[1]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) + dqr[1]*np.cos(q[2])*np.sin(q[1])*np.sin(q[2])*dq[1] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] self.Y[0, 4] = ddqr[0]*np.sin(q[1])**2 - ddqr[2]*np.sin(q[1]) + (dqr[0]*np.sin(2*q[1])*dq[1])/2 + (dqr[1]*np.sin(2*q[1])*dq[0])/2 - (dqr[1]*np.cos(q[1])*dq[2])/2 - (dqr[2]*np.cos(q[1])*dq[1])/2 self.Y[0, 5] = ddqr[0]*np.cos(q[3])**2*np.sin(q[1])**2 - (dqr[0]*np.sin(2*q[1])*dq[1])/2 - (dqr[1]*np.sin(2*q[1])*dq[0])/2 - (dqr[0]*np.sin(2*q[3])*dq[3])/2 - (dqr[3]*np.sin(2*q[3])*dq[0])/2 - ddqr[2]*np.cos(q[3])**2*np.sin(q[1]) - (dqr[1]*np.cos(q[1])*dq[2])/2 - (dqr[2]*np.cos(q[1])*dq[1])/2 + (dqr[1]*np.cos(q[2])*np.sin(q[1])*dq[3])/2 + (dqr[3]*np.cos(q[2])*np.sin(q[1])*dq[1])/2 - (dqr[2]*np.cos(q[1])*np.sin(q[2])*dq[3])/2 - (dqr[3]*np.cos(q[1])*np.sin(q[2])*dq[2])/2 + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[1] + ddqr[0]*np.cos(q[1])**2*np.sin(q[2])**2*np.sin(q[3])**2 - ddqr[1]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3]) + ddqr[2]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3]) - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[1] + ddqr[1]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2])*np.sin(q[3])**2 + dqr[0]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[3] - dqr[1]*np.cos(q[2])*np.sin(q[1])*np.sin(q[2])*dq[1] + dqr[3]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] + dqr[1]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[3] + dqr[3]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] + 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[1] + 2*dqr[1]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[2] + dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] + 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[3] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[3] - dqr[3]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[1] + 2*dqr[3]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[0] + dqr[2]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[3] + dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[2] - 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[3] - 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[1] - 2*dqr[1]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] - 2*dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[0] - 2*ddqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3]) - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[0] - dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[3])*dq[1] + dqr[2]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[3])*dq[2] - dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] + dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[3] + dqr[3]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] self.Y[0, 6] = ddqr[0]/2 + (ddqr[0]*np.cos(2*q[1]))/2 - (dqr[0]*np.sin(2*q[1])*dq[1])/2 - (dqr[1]*np.sin(2*q[1])*dq[0])/2 self.Y[0, 7] = 2*ddqr[0]*np.cos(q[1])**2*np.cos(q[3]) - dqr[0]*np.sin(q[2])*np.sin(q[3])*dq[1] - dqr[1]*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])**2*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[1])**2*np.sin(q[3])*dq[0] + ddqr[3]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3]) + ddqr[1]*np.cos(q[2])*np.sin(q[1])*np.sin(q[3]) - ddqr[2]*np.cos(q[1])*np.sin(q[2])*np.sin(q[3]) + 2*ddqr[0]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3]) - 2*dqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*dq[1] - 2*dqr[1]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*dq[0] + dqr[1]*np.cos(q[1])*np.cos(q[2])*np.sin(q[3])*dq[1] - dqr[2]*np.cos(q[1])*np.cos(q[2])*np.sin(q[3])*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*dq[3] - dqr[3]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*dq[2] - dqr[3]*np.cos(q[1])*np.cos(q[2])*np.sin(q[3])*dq[3] + 2*dqr[0]*np.cos(q[1])**2*np.sin(q[2])*np.sin(q[3])*dq[1] + 2*dqr[1]*np.cos(q[1])**2*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.sin(q[1])*np.sin(q[3])*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])*np.sin(q[1])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*dq[3] + dqr[3]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*dq[0] self.Y[0, 8] = ddqr[0]*np.cos(q[1])**2*np.cos(q[2])**2 + ddqr[0]*np.sin(q[1])**2*np.sin(q[3])**2 + (dqr[0]*np.sin(2*q[1])*dq[1])/2 + (dqr[1]*np.sin(2*q[1])*dq[0])/2 + (dqr[0]*np.sin(2*q[3])*dq[3])/2 + (dqr[3]*np.sin(2*q[3])*dq[0])/2 + ddqr[3]*np.cos(q[1])*np.cos(q[2]) - ddqr[2]*np.sin(q[1])*np.sin(q[3])**2 - dqr[1]*np.cos(q[2])*np.sin(q[1])*dq[3] - dqr[3]*np.cos(q[2])*np.sin(q[1])*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[1] - ddqr[1]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) + ddqr[0]*np.cos(q[1])**2*np.cos(q[3])**2*np.sin(q[2])**2 + ddqr[1]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3]) - ddqr[2]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3]) + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[1] + ddqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2]) - dqr[0]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[3] + dqr[1]*np.cos(q[2])*np.sin(q[1])*np.sin(q[2])*dq[1] - dqr[3]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] - dqr[1]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] - 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[1] - 2*dqr[1]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] - 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[3] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[3] + dqr[3]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[1] - 2*dqr[3]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[0] - dqr[2]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[3] - dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[2] + 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[3] + 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[1] + 2*dqr[1]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] + 2*dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[0] + 2*ddqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3]) + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[2] + dqr[2]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[3] + dqr[3]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[0] + dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[3])*dq[1] - dqr[2]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[3])*dq[2] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] - dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] self.Y[0, 9] = np.cos(q[1])*np.sin(q[0]) self.Y[0, 10] = np.cos(q[1])*np.cos(q[3])*np.sin(q[0]) + np.cos(q[0])*np.cos(q[2])*np.sin(q[3]) + np.sin(q[0])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3]) self.Y[1, 0] = ddqr[1]*np.cos(q[2])**2 + (dqr[0]*np.sin(2*q[1])*dq[0])/2 - (dqr[1]*np.sin(2*q[2])*dq[2])/2 - (dqr[2]*np.sin(2*q[2])*dq[1])/2 - (dqr[0]*np.cos(q[1])*dq[2])/2 - (dqr[2]*np.cos(q[1])*dq[0])/2 + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[0] + ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] self.Y[1, 1] = ddqr[1]*np.cos(q[2])**2*np.cos(q[3])**2 - (dqr[0]*np.sin(2*q[1])*dq[0])/2 + (dqr[0]*np.cos(q[1])*dq[2])/2 + (dqr[2]*np.cos(q[1])*dq[0])/2 + (dqr[2]*np.cos(q[2])*dq[3])/2 + (dqr[3]*np.cos(q[2])*dq[2])/2 - (dqr[0]*np.cos(q[2])*np.sin(q[1])*dq[3])/2 - (dqr[3]*np.cos(q[2])*np.sin(q[1])*dq[0])/2 - dqr[0]*np.cos(q[1])*np.cos(q[3])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[3])**2*dq[0] - dqr[2]*np.cos(q[2])*np.cos(q[3])**2*dq[3] - dqr[3]*np.cos(q[2])*np.cos(q[3])**2*dq[2] - ddqr[2]*np.cos(q[2])*np.cos(q[3])*np.sin(q[3]) + ddqr[0]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3]) + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[0] + ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2]) + dqr[0]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[2]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[2] + 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[3] + dqr[3]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[1] - dqr[1]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[1] - 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[2] - dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] self.Y[1, 2] = ddqr[1]*np.sin(q[2])**2 + (dqr[1]*np.sin(2*q[2])*dq[2])/2 + (dqr[2]*np.sin(2*q[2])*dq[1])/2 + (dqr[0]*np.cos(q[1])*dq[2])/2 + (dqr[2]*np.cos(q[1])*dq[0])/2 - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[0] - ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] self.Y[1, 3] = ddqr[1] - ddqr[3]*np.sin(q[2]) - ddqr[1]*np.cos(q[2])**2 + (dqr[1]*np.sin(2*q[2])*dq[2])/2 + (dqr[2]*np.sin(2*q[2])*dq[1])/2 + (dqr[0]*np.cos(q[1])*dq[2])/2 + (dqr[2]*np.cos(q[1])*dq[0])/2 - (dqr[2]*np.cos(q[2])*dq[3])/2 - (dqr[3]*np.cos(q[2])*dq[2])/2 + (dqr[0]*np.cos(q[2])*np.sin(q[1])*dq[3])/2 + (dqr[3]*np.cos(q[2])*np.sin(q[1])*dq[0])/2 - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[0] - ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] self.Y[1, 4] = (dqr[0]*np.cos(q[1])*dq[2])/2 - (dqr[0]*np.sin(2*q[1])*dq[0])/2 + (dqr[2]*np.cos(q[1])*dq[0])/2 self.Y[1, 5] = ddqr[1]*np.cos(q[2])**2 - ddqr[1]*np.cos(q[2])**2*np.cos(q[3])**2 + (dqr[0]*np.sin(2*q[1])*dq[0])/2 - (dqr[1]*np.sin(2*q[2])*dq[2])/2 - (dqr[2]*np.sin(2*q[2])*dq[1])/2 - (dqr[0]*np.cos(q[1])*dq[2])/2 - (dqr[2]*np.cos(q[1])*dq[0])/2 - (dqr[2]*np.cos(q[2])*dq[3])/2 - (dqr[3]*np.cos(q[2])*dq[2])/2 + (dqr[0]*np.cos(q[2])*np.sin(q[1])*dq[3])/2 + (dqr[3]*np.cos(q[2])*np.sin(q[1])*dq[0])/2 + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[3])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[3])**2*dq[0] + dqr[2]*np.cos(q[2])*np.cos(q[3])**2*dq[3] + dqr[3]*np.cos(q[2])*np.cos(q[3])**2*dq[2] + ddqr[2]*np.cos(q[2])*np.cos(q[3])*np.sin(q[3]) - ddqr[0]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3]) - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[0] + ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2])*np.sin(q[3])**2 - dqr[0]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[2]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[2] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] - 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[3] - dqr[3]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[2] + dqr[2]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[1] + dqr[1]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[3] + dqr[3]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[1] + 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[2] + dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[3] + dqr[3]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] self.Y[1, 6] = ddqr[1] + (dqr[0]*np.sin(2*q[1])*dq[0])/2 self.Y[1, 7] = 2*ddqr[1]*np.cos(q[3]) - ddqr[2]*np.cos(q[2])*np.sin(q[3]) - ddqr[3]*np.cos(q[3])*np.sin(q[2]) - dqr[1]*np.sin(q[3])*dq[3] - dqr[3]*np.sin(q[3])*dq[1] - dqr[2]*np.cos(q[2])*np.cos(q[3])*dq[3] - dqr[3]*np.cos(q[2])*np.cos(q[3])*dq[2] + dqr[0]*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[2]*np.sin(q[2])*np.sin(q[3])*dq[2] + dqr[3]*np.sin(q[2])*np.sin(q[3])*dq[3] + ddqr[0]*np.cos(q[2])*np.sin(q[1])*np.sin(q[3]) + 2*dqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*dq[3] + dqr[3]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*dq[0] - dqr[0]*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[2] - dqr[2]*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[0] - 2*dqr[0]*np.cos(q[1])**2*np.sin(q[2])*np.sin(q[3])*dq[0] self.Y[1, 8] = ddqr[1] - ddqr[3]*np.sin(q[2]) - ddqr[1]*np.cos(q[2])**2 + ddqr[1]*np.cos(q[2])**2*np.cos(q[3])**2 - (dqr[0]*np.sin(2*q[1])*dq[0])/2 + (dqr[1]*np.sin(2*q[2])*dq[2])/2 + (dqr[2]*np.sin(2*q[2])*dq[1])/2 + dqr[0]*np.cos(q[1])*dq[2] + dqr[2]*np.cos(q[1])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[2])**2*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[3])**2*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[3])**2*dq[0] - dqr[2]*np.cos(q[2])*np.cos(q[3])**2*dq[3] - dqr[3]*np.cos(q[2])*np.cos(q[3])**2*dq[2] - ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.sin(q[2]) - ddqr[2]*np.cos(q[2])*np.cos(q[3])*np.sin(q[3]) + ddqr[0]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3]) + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[0] + ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2]) + dqr[0]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[2]*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[2] + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.sin(q[1])*dq[0] + 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[3] + dqr[3]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[1] - dqr[1]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[1] - 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[2] - dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] self.Y[1, 9] = np.cos(q[0])*np.sin(q[1]) self.Y[1, 10] = np.cos(q[0])*(np.cos(q[3])*np.sin(q[1]) - np.cos(q[1])*np.sin(q[2])*np.sin(q[3])) self.Y[2, 0] = (dqr[0]*np.cos(q[1])*dq[1])/2 + (dqr[1]*np.cos(q[1])*dq[0])/2 + dqr[1]*np.cos(q[2])*np.sin(q[2])*dq[1] - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] self.Y[2, 1] = ddqr[2]*np.sin(q[3])**2 + (dqr[2]*np.sin(2*q[3])*dq[3])/2 + (dqr[3]*np.sin(2*q[3])*dq[2])/2 - ddqr[0]*np.sin(q[1])*np.sin(q[3])**2 - (dqr[0]*np.cos(q[1])*dq[1])/2 - (dqr[1]*np.cos(q[1])*dq[0])/2 + (dqr[1]*np.cos(q[2])*dq[3])/2 + (dqr[3]*np.cos(q[2])*dq[1])/2 + (dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[3])/2 + (dqr[3]*np.cos(q[1])*np.sin(q[2])*dq[0])/2 + dqr[0]*np.cos(q[1])*np.cos(q[3])**2*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[3])**2*dq[0] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*dq[3] - dqr[3]*np.cos(q[2])*np.cos(q[3])**2*dq[1] - ddqr[1]*np.cos(q[2])*np.cos(q[3])*np.sin(q[3]) - ddqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3]) - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[3] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[1] - dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[1] + dqr[1]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] self.Y[2, 2] = dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[1] - (dqr[1]*np.cos(q[1])*dq[0])/2 - dqr[1]*np.cos(q[2])*np.sin(q[2])*dq[1] - (dqr[0]*np.cos(q[1])*dq[1])/2 + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] self.Y[2, 3] = (dqr[1]*np.cos(q[2])*dq[3])/2 - (dqr[0]*np.cos(q[1])*dq[1])/2 - (dqr[1]*np.cos(q[1])*dq[0])/2 - (dqr[1]*np.sin(2*q[2])*dq[1])/2 + (dqr[3]*np.cos(q[2])*dq[1])/2 + (dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[3])/2 + (dqr[3]*np.cos(q[1])*np.sin(q[2])*dq[0])/2 + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] self.Y[2, 4] = ddqr[2] - ddqr[0]*np.sin(q[1]) - (dqr[0]*np.cos(q[1])*dq[1])/2 - (dqr[1]*np.cos(q[1])*dq[0])/2 self.Y[2, 5] = ddqr[2]*np.cos(q[3])**2 + (dqr[1]*np.sin(2*q[2])*dq[1])/2 - (dqr[2]*np.sin(2*q[3])*dq[3])/2 - (dqr[3]*np.sin(2*q[3])*dq[2])/2 - ddqr[0]*np.cos(q[3])**2*np.sin(q[1]) + (dqr[0]*np.cos(q[1])*dq[1])/2 + (dqr[1]*np.cos(q[1])*dq[0])/2 - (dqr[1]*np.cos(q[2])*dq[3])/2 - (dqr[3]*np.cos(q[2])*dq[1])/2 - (dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[3])/2 - (dqr[3]*np.cos(q[1])*np.sin(q[2])*dq[0])/2 - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[3])**2*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[3])**2*dq[0] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*dq[3] + dqr[3]*np.cos(q[2])*np.cos(q[3])**2*dq[1] + ddqr[1]*np.cos(q[2])*np.cos(q[3])*np.sin(q[3]) + ddqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3]) + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[0] + dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[3] + dqr[3]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[3] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[1] + dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[1] - dqr[1]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] self.Y[2, 6] = 0 self.Y[2, 7] = -np.sin(q[3])*(ddqr[1]*np.cos(q[2]) + ddqr[0]*np.cos(q[1])*np.sin(q[2]) - dqr[0]*np.sin(q[1])*np.sin(q[2])*dq[1] - dqr[1]*np.sin(q[1])*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.sin(q[1])*dq[0]) self.Y[2, 8] = ddqr[2]*np.sin(q[3])**2 - (dqr[1]*np.sin(2*q[2])*dq[1])/2 + (dqr[2]*np.sin(2*q[3])*dq[3])/2 + (dqr[3]*np.sin(2*q[3])*dq[2])/2 - ddqr[0]*np.sin(q[1])*np.sin(q[3])**2 - dqr[0]*np.cos(q[1])*dq[1] - dqr[1]*np.cos(q[1])*dq[0] + dqr[1]*np.cos(q[2])*dq[3] + dqr[3]*np.cos(q[2])*dq[1] + dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[3] + dqr[3]*np.cos(q[1])*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])**2*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])**2*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[3])**2*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[3])**2*dq[0] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*dq[3] - dqr[3]*np.cos(q[2])*np.cos(q[3])**2*dq[1] - ddqr[1]*np.cos(q[2])*np.cos(q[3])*np.sin(q[3]) - ddqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3]) - dqr[0]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])**2*np.cos(q[3])**2*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[3] - dqr[3]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[3] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[1] - dqr[3]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[1] + dqr[1]*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] self.Y[2, 9] = 0 self.Y[2, 10] = -np.sin(q[3])*(np.sin(q[0])*np.sin(q[2]) + np.cos(q[0])*np.cos(q[2])*np.sin(q[1])) self.Y[3, 0] = 0 self.Y[3, 1] = (dqr[0]*np.cos(q[2])*np.sin(q[1])*dq[1])/2 - (dqr[2]*np.sin(2*q[3])*dq[2])/2 - (dqr[1]*np.cos(q[2])*dq[2])/2 - (dqr[2]*np.cos(q[2])*dq[1])/2 - (dqr[0]*np.sin(2*q[3])*dq[0])/2 + (dqr[1]*np.cos(q[2])*np.sin(q[1])*dq[0])/2 - (dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[2])/2 - (dqr[2]*np.cos(q[1])*np.sin(q[2])*dq[0])/2 + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*dq[2] + dqr[2]*np.cos(q[2])*np.cos(q[3])**2*dq[1] + dqr[0]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] + dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[1] + 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[0] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[0] + dqr[1]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[1] - 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] self.Y[3, 2] = 0 self.Y[3, 3] = ddqr[3] - ddqr[1]*np.sin(q[2]) + ddqr[0]*np.cos(q[1])*np.cos(q[2]) - (dqr[1]*np.cos(q[2])*dq[2])/2 - (dqr[2]*np.cos(q[2])*dq[1])/2 - (dqr[0]*np.cos(q[2])*np.sin(q[1])*dq[1])/2 - (dqr[1]*np.cos(q[2])*np.sin(q[1])*dq[0])/2 - (dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[2])/2 - (dqr[2]*np.cos(q[1])*np.sin(q[2])*dq[0])/2 self.Y[3, 4] = 0 self.Y[3, 5] = (dqr[0]*np.sin(2*q[3])*dq[0])/2 + (dqr[2]*np.sin(2*q[3])*dq[2])/2 + (dqr[1]*np.cos(q[2])*dq[2])/2 + (dqr[2]*np.cos(q[2])*dq[1])/2 - (dqr[0]*np.cos(q[2])*np.sin(q[1])*dq[1])/2 - (dqr[1]*np.cos(q[2])*np.sin(q[1])*dq[0])/2 + (dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[2])/2 + (dqr[2]*np.cos(q[1])*np.sin(q[2])*dq[0])/2 - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*dq[2] - dqr[2]*np.cos(q[2])*np.cos(q[3])**2*dq[1] - dqr[0]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] - dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[1] - 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[0] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[0] - dqr[1]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[1] + 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] - dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] self.Y[3, 6] = 0 self.Y[3, 7] = dqr[1]*np.sin(q[3])*dq[1] - ddqr[1]*np.cos(q[3])*np.sin(q[2]) + dqr[0]*np.cos(q[1])**2*np.sin(q[3])*dq[0] + ddqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3]) - dqr[0]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*dq[1] - dqr[1]*np.cos(q[2])*np.cos(q[3])*np.sin(q[1])*dq[0] - dqr[0]*np.cos(q[1])*np.cos(q[3])*np.sin(q[1])*np.sin(q[2])*dq[0] self.Y[3, 8] = ddqr[3] - ddqr[1]*np.sin(q[2]) - (dqr[0]*np.sin(2*q[3])*dq[0])/2 - (dqr[2]*np.sin(2*q[3])*dq[2])/2 + ddqr[0]*np.cos(q[1])*np.cos(q[2]) - dqr[1]*np.cos(q[2])*dq[2] - dqr[2]*np.cos(q[2])*dq[1] - dqr[0]*np.cos(q[1])*np.sin(q[2])*dq[2] - dqr[2]*np.cos(q[1])*np.sin(q[2])*dq[0] + dqr[1]*np.cos(q[2])*np.cos(q[3])**2*dq[2] + dqr[2]*np.cos(q[2])*np.cos(q[3])**2*dq[1] + dqr[0]*np.cos(q[1])*np.sin(q[1])*np.sin(q[2])*dq[0] + dqr[0]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[2] + dqr[2]*np.cos(q[3])*np.sin(q[1])*np.sin(q[3])*dq[0] - dqr[0]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[1] + 2*dqr[0]*np.cos(q[1])**2*np.cos(q[3])*np.sin(q[3])*dq[0] - dqr[1]*np.cos(q[2])*np.cos(q[3])**2*np.sin(q[1])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[2] + dqr[2]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[2])*dq[0] + dqr[1]*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[1] - 2*dqr[0]*np.cos(q[1])*np.cos(q[3])**2*np.sin(q[1])*np.sin(q[2])*dq[0] - dqr[0]*np.cos(q[1])**2*np.cos(q[2])**2*np.cos(q[3])*np.sin(q[3])*dq[0] + dqr[0]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[1] + dqr[1]*np.cos(q[1])*np.cos(q[2])*np.cos(q[3])*np.sin(q[2])*np.sin(q[3])*dq[0] self.Y[3, 9] = 0 self.Y[3, 10] = np.cos(q[0])*np.cos(q[1])*np.sin(q[3]) + np.cos(q[2])*np.cos(q[3])*np.sin(q[0]) - np.cos(q[0])*np.cos(q[3])*np.sin(q[1])*np.sin(q[2]) tmpY = self.Y.T tmps = self.s.T if self.n_act == 2: self.gamma = np.diag( [ 1,1,1, 2000, 2000 ] ) elif self.n_act == 4: self.gamma = np.diag( [ 2.5,2.5, 2.5,2.5,2.5,2.5, 2.5, 2.5,2.5, 100, 100 ] ) self.a += -self.dt * self.gamma.dot( tmpY.dot( tmps ).T ) return self.Y, self.s def input_calc( self, start_time, current_time ): """ """ q = self.mjData.qpos[ 0 : self.n_act ] # Getting the relative angular position (q) and velocity (dq) of the shoulder and elbow joint, respectively. dq = self.mjData.qvel[ 0 : self.n_act ] t0 = current_time - start_time if self.n_act == 2: self.kd = 200 * np.eye( self.n_act ) elif self.n_act == 4: self.kd = 10 * np.eye( self.n_act ) Y, s = self.get_Y_and_s( q, dq, t0 ) if self.NN: self.tau_d = self.NN.calc_activation( s ) self.NN.update_weight( s, self.dt ) else: self.tau_d = np.zeros( self.n_act ) self.tau = Y.dot( self.a.T ) - self.kd.dot( s.T ) return self.mjData.ctrl, self.idx_act, self.tau def add_NN( self, type = "RBFNN" ): """ Add a neural network to this controller """ # Number of hidden layers, number of actuators. self.NN = RBFN( self.n_act, 40, self.n_act ) if __name__ == "__main__": pass
112.803109
3,337
0.50271
10,769
43,542
2.017736
0.032315
0.219752
0.263427
0.110175
0.814349
0.800267
0.786184
0.768926
0.757743
0.751254
0
0.095502
0.14726
43,542
385
3,338
113.096104
0.489712
0.074273
0
0.148148
0
0
0.0009
0
0
0
0
0.002597
0
1
0.042328
false
0.010582
0.058201
0
0.121693
0.005291
0
0
0
null
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
11
0b0ccbb7cb95dc6df6bf82ec344da67f9f9997fb
16,750
py
Python
variance-networks-pytorch/core/layers.py
AlliedToasters/elko_den
4e69f7f5c0dc7ffad54c7e190a2b75aba2eab7d2
[ "Apache-2.0" ]
38
2018-07-14T23:09:27.000Z
2021-11-30T08:26:56.000Z
variance-networks-pytorch/core/layers.py
AlliedToasters/elko_den
4e69f7f5c0dc7ffad54c7e190a2b75aba2eab7d2
[ "Apache-2.0" ]
1
2019-06-19T07:42:58.000Z
2019-06-19T07:42:58.000Z
variance-networks-pytorch/core/layers.py
AlliedToasters/elko_den
4e69f7f5c0dc7ffad54c7e190a2b75aba2eab7d2
[ "Apache-2.0" ]
7
2018-07-15T15:16:59.000Z
2020-04-10T09:21:41.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.nn import Parameter from torch.distributions import Bernoulli import math from core import metrics class ModuleWrapper(nn.Module): """Wrapper for nn.Module with support for arbitrary flags and a universal forward pass""" def __init__(self): super(ModuleWrapper, self).__init__() def set_flag(self, flag_name, value): setattr(self, flag_name, value) for m in self.children(): if hasattr(m, 'set_flag'): m.set_flag(flag_name, value) def forward(self, x): for module in self.children(): x = module(x) return x class Abs(ModuleWrapper): def __init__(self): super(Abs, self).__init__() def forward(self, x): return x.abs_() class FlattenLayer(ModuleWrapper): def __init__(self, num_features): super(FlattenLayer, self).__init__() self.num_features = num_features def forward(self, x): return x.view(-1, self.num_features) class LinearVariance(ModuleWrapper): def __init__(self, in_features, out_features, bias=True): super(LinearVariance, self).__init__() self.in_features = in_features self.out_features = out_features self.sigma = Parameter(torch.Tensor(out_features, in_features)) if bias: self.bias = Parameter(torch.Tensor(1, out_features)) else: self.register_parameter('bias', None) self.reset_parameters() def reset_parameters(self): stdv = 1. / math.sqrt(self.sigma.size(1)) self.sigma.data.uniform_(-stdv, stdv) if self.bias is not None: self.bias.data.zero_() def forward(self, x): if self.bias is not None: lrt_mean = self.bias else: lrt_mean = 0.0 lrt_std = Variable.sqrt_(1e-16 + F.linear(x * x, self.sigma * self.sigma)) if self.training: eps = Variable(lrt_std.data.new(lrt_std.size()).normal_()) else: eps = 0.0 return lrt_mean + eps * lrt_std def __repr__(self): return self.__class__.__name__ + '(' \ + 'in_features=' + str(self.in_features) \ + ', out_features=' + str(self.out_features) \ + ', bias=' + str(self.bias is not None) + ')' class LinearVarianceBe(ModuleWrapper): def __init__(self, in_features, out_features, bias=True): super(LinearVarianceBe, self).__init__() self.in_features = in_features self.out_features = out_features self.probs = torch.ones([out_features, in_features]).cuda() * 0.5 self.W = Parameter(torch.Tensor(out_features, in_features)) if bias: self.bias = Parameter(torch.Tensor(1, out_features)) else: self.register_parameter('bias', None) self.reset_parameters() def reset_parameters(self): stdv = 1. / math.sqrt(self.W.size(1)) self.W.data.uniform_(-stdv, stdv) if self.bias is not None: self.bias.data.zero_() def forward(self, x): if self.training: eps = Variable(torch.bernoulli(self.probs) - 0.5) else: eps = 0.0 output = F.linear(x, self.W*eps) if self.bias is not None: output = output + self.bias return output def __repr__(self): return self.__class__.__name__ + '(' \ + 'in_features=' + str(self.in_features) \ + ', out_features=' + str(self.out_features) \ + ', bias=' + str(self.bias is not None) + ')' class LinearVarianceUnif(ModuleWrapper): def __init__(self, in_features, out_features, bias=True): super(LinearVarianceUnif, self).__init__() self.in_features = in_features self.out_features = out_features self.W = Parameter(torch.Tensor(out_features, in_features)) if bias: self.bias = Parameter(torch.Tensor(1, out_features)) else: self.register_parameter('bias', None) self.reset_parameters() def reset_parameters(self): stdv = 1. / math.sqrt(self.W.size(1)) self.W.data.uniform_(-stdv, stdv) if self.bias is not None: self.bias.data.zero_() def forward(self, x): if self.training: eps = Variable(self.W.data.new(self.W.size()).uniform_() - 0.5) else: eps = 0.0 output = F.linear(x, self.W*eps) if self.bias is not None: output = output + self.bias return output def __repr__(self): return self.__class__.__name__ + '(' \ + 'in_features=' + str(self.in_features) \ + ', out_features=' + str(self.out_features) \ + ', bias=' + str(self.bias is not None) + ')' class LinearVDO(ModuleWrapper): def __init__(self, in_features, out_features, prior='loguni', alpha_shape=(1, 1), bias=True): super(LinearVDO, self).__init__() self.in_features = in_features self.out_features = out_features self.alpha_shape = alpha_shape self.W = Parameter(torch.Tensor(out_features, in_features)) self.log_alpha = Parameter(torch.Tensor(*alpha_shape)) if bias: self.bias = Parameter(torch.Tensor(1, out_features)) else: self.register_parameter('bias', None) self.reset_parameters() self.zero_mean = False self.permute_sigma = False self.prior = prior if prior == 'loguni': self.kl_fun = metrics.kl_loguni else: self.kl_fun = metrics.kl_ard def reset_parameters(self): stdv = 1. / math.sqrt(self.W.size(1)) self.W.data.uniform_(-stdv, stdv) self.log_alpha.data.fill_(-5.0) if self.bias is not None: self.bias.data.zero_() def forward(self, x): if self.zero_mean: lrt_mean = 0.0 else: lrt_mean = F.linear(x, self.W) if self.bias is not None: lrt_mean = lrt_mean + self.bias sigma2 = Variable.exp(self.log_alpha) * self.W * self.W if self.permute_sigma: sigma2 = sigma2.view(-1)[torch.randperm(self.in_features * self.out_features).cuda()].view(self.out_features, self.in_features) lrt_std = Variable.sqrt(1e-16 + F.linear(x * x, sigma2)) if self.training: eps = Variable(lrt_std.data.new(lrt_std.size()).normal_()) else: eps = 0.0 return lrt_mean + lrt_std * eps def kl_reg(self): return self.W.nelement() * self.kl_fun(self.log_alpha) / self.log_alpha.nelement() def __repr__(self): return self.__class__.__name__ + '(' \ + 'in_features=' + str(self.in_features) \ + ', out_features=' + str(self.out_features) \ + ', alpha_shape=' + str(self.alpha_shape) \ + ', prior=' + self.prior \ + ', bias=' + str(self.bias is not None) + ')' ', bias=' + str(self.bias is not None) + ')' class ConvVDO(ModuleWrapper): def __init__(self, in_channels, out_channels, kernel_size, alpha_shape, stride=1, padding=0, dilation=1, prior='loguni', bias=True): super(ConvVDO, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.kernel_size = (kernel_size, kernel_size) self.stride = stride self.padding = padding self.dilation = dilation self.alpha_shape = alpha_shape self.groups = 1 self.weight = Parameter(torch.Tensor( out_channels, in_channels, *self.kernel_size)) if bias: self.bias = Parameter(torch.Tensor(1, out_channels, 1, 1)) else: self.register_parameter('bias', None) self.op_bias = lambda input, kernel: F.conv2d(input, kernel, self.bias, self.stride, self.padding, self.dilation, self.groups) self.op_nobias = lambda input, kernel: F.conv2d(input, kernel, None, self.stride, self.padding, self.dilation, self.groups) self.log_alpha = Parameter(torch.Tensor(*alpha_shape)) self.reset_parameters() self.zero_mean = False self.permute_sigma = False self.prior = prior if prior == 'loguni': self.kl_fun = metrics.kl_loguni else: self.kl_fun = metrics.kl_ard def reset_parameters(self): n = self.in_channels for k in self.kernel_size: n *= k stdv = 1. / math.sqrt(n) self.weight.data.uniform_(-stdv, stdv) if self.bias is not None: self.bias.data.uniform_(-stdv, stdv) self.log_alpha.data.fill_(-5.0) def forward(self, x): if self.zero_mean: lrt_mean = self.op_bias(x, 0.0 * self.weight) else: lrt_mean = self.op_bias(x, self.weight) sigma2 = Variable.exp(self.log_alpha) * self.weight * self.weight if self.permute_sigma: sigma2 = sigma2.view(-1)[torch.randperm(self.weight.nelement()).cuda()].view(self.weight.shape) lrt_std = Variable.sqrt(1e-16 + self.op_nobias(x * x, sigma2)) if self.training: eps = Variable(lrt_std.data.new(lrt_std.size()).normal_()) else: eps = 0.0 return lrt_mean + lrt_std * eps def kl_reg(self): return self.weight.nelement() / self.log_alpha.nelement() * metrics.kl_loguni(self.log_alpha) def __repr__(self): s = ('{name}({in_channels}, {out_channels}, kernel_size={kernel_size}' ', stride={stride}') s += ', padding={padding}' s += ', alpha_shape=' + str(self.alpha_shape) s += ', prior=' + self.prior s += ', dilation={dilation}' if self.bias is None: s += ', bias=False' s += ')' return s.format(name=self.__class__.__name__, **self.__dict__) class ConvVariance(ModuleWrapper): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, bias=True): super(ConvVariance, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.kernel_size = (kernel_size, kernel_size) self.stride = stride self.padding = padding self.dilation = dilation self.groups = 1 self.sigma = Parameter(torch.Tensor( out_channels, in_channels, *self.kernel_size)) if bias: self.bias = Parameter(torch.Tensor(1, out_channels, 1, 1)) else: self.register_parameter('bias', None) self.op_bias = lambda input, kernel: F.conv2d(input, kernel, self.bias, self.stride, self.padding, self.dilation, self.groups) self.op_nobias = lambda input, kernel: F.conv2d(input, kernel, None, self.stride, self.padding, self.dilation, self.groups) self.reset_parameters() self.zero_mean = False self.permute_sigma = False def reset_parameters(self): n = self.in_channels for k in self.kernel_size: n *= k stdv = 1. / math.sqrt(n) self.sigma.data.uniform_(-stdv, stdv) if self.bias is not None: self.bias.data.uniform_(-stdv, stdv) def forward(self, x): lrt_mean = 0.0 if self.bias is not None: lrt_mean = self.bias sigma2 = self.sigma * self.sigma if self.permute_sigma: sigma2 = sigma2.view(-1)[torch.randperm(self.weight.shape).cuda()].view(self.weight.shape) lrt_std = Variable.sqrt(1e-16 + self.op_nobias(x * x, sigma2)) if self.training: eps = Variable(lrt_std.data.new(lrt_std.size()).normal_()) else: eps = 0.0 return lrt_mean + lrt_std * eps def __repr__(self): s = ('{name}({in_channels}, {out_channels}, kernel_size={kernel_size}' ', stride={stride}') s += ', padding={padding}' s += ', dilation={dilation}' if self.bias is None: s += ', bias=False' s += ')' return s.format(name=self.__class__.__name__, **self.__dict__) class ConvVarianceBe(ModuleWrapper): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, bias=True): super(ConvVarianceBe, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.kernel_size = (kernel_size, kernel_size) self.stride = stride self.padding = padding self.dilation = dilation self.groups = 1 self.probs = torch.ones([out_channels, in_channels, *self.kernel_size]).cuda() * 0.5 self.W = Parameter(torch.Tensor(out_channels, in_channels, *self.kernel_size)) if bias: self.bias = Parameter(torch.Tensor(1, out_channels, 1, 1)) else: self.register_parameter('bias', None) self.op_bias = lambda input, kernel: F.conv2d(input, kernel, self.bias, self.stride, self.padding, self.dilation, self.groups) self.op_nobias = lambda input, kernel: F.conv2d(input, kernel, None, self.stride, self.padding, self.dilation, self.groups) self.reset_parameters() def reset_parameters(self): n = self.in_channels for k in self.kernel_size: n *= k stdv = 1. / math.sqrt(n) self.W.data.uniform_(-stdv, stdv) if self.bias is not None: self.bias.data.uniform_(-stdv, stdv) def forward(self, x): if self.training: eps = Variable(torch.bernoulli(self.probs) - 0.5) else: eps = 0.0 output = self.op_nobias(x, self.W*eps) if self.bias is not None: output = output + self.bias return output def __repr__(self): s = ('{name}({in_channels}, {out_channels}, kernel_size={kernel_size}' ', stride={stride}') s += ', padding={padding}' s += ', dilation={dilation}' if self.bias is None: s += ', bias=False' s += ')' return s.format(name=self.__class__.__name__, **self.__dict__) class ConvVarianceUnif(ModuleWrapper): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, bias=True): super(ConvVarianceUnif, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.kernel_size = (kernel_size, kernel_size) self.stride = stride self.padding = padding self.dilation = dilation self.groups = 1 self.W = Parameter(torch.Tensor(out_channels, in_channels, *self.kernel_size)) if bias: self.bias = Parameter(torch.Tensor(1, out_channels, 1, 1)) else: self.register_parameter('bias', None) self.op_bias = lambda input, kernel: F.conv2d(input, kernel, self.bias, self.stride, self.padding, self.dilation, self.groups) self.op_nobias = lambda input, kernel: F.conv2d(input, kernel, None, self.stride, self.padding, self.dilation, self.groups) self.reset_parameters() def reset_parameters(self): n = self.in_channels for k in self.kernel_size: n *= k stdv = 1. / math.sqrt(n) self.W.data.uniform_(-stdv, stdv) if self.bias is not None: self.bias.data.uniform_(-stdv, stdv) def forward(self, x): if self.training: eps = Variable(torch.rand(self.W.size()) - 0.5) else: eps = 0.0 output = self.op_nobias(x, self.W*eps) if self.bias is not None: output = output + self.bias return output def __repr__(self): s = ('{name}({in_channels}, {out_channels}, kernel_size={kernel_size}' ', stride={stride}') s += ', padding={padding}' s += ', dilation={dilation}' if self.bias is None: s += ', bias=False' s += ')' return s.format(name=self.__class__.__name__, **self.__dict__)
36.732456
140
0.577015
2,071
16,750
4.43071
0.062772
0.044464
0.026155
0.028335
0.857672
0.847864
0.8216
0.807868
0.788252
0.781931
0
0.010467
0.304119
16,750
455
141
36.813187
0.776767
0.004955
0
0.806789
0
0
0.048871
0.011354
0
0
0
0
0
1
0.10705
false
0
0.020888
0.020888
0.211488
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0b0e2d81c6e39535cc5b4c5318abf2122597dec7
136
py
Python
pyramda/function/identity_test.py
sergiors/pyramda
5bf200888809b1bc946e813e29460f204bccd13e
[ "MIT" ]
124
2015-07-30T21:34:25.000Z
2022-02-19T08:45:50.000Z
pyramda/function/identity_test.py
sergiors/pyramda
5bf200888809b1bc946e813e29460f204bccd13e
[ "MIT" ]
37
2015-08-31T23:02:20.000Z
2022-02-04T04:45:28.000Z
pyramda/function/identity_test.py
sergiors/pyramda
5bf200888809b1bc946e813e29460f204bccd13e
[ "MIT" ]
20
2015-08-04T18:59:09.000Z
2021-12-13T08:08:59.000Z
from .identity import identity from pyramda.private.asserts import assert_equal def identity_test(): assert_equal(identity(3), 3)
19.428571
48
0.786765
19
136
5.473684
0.578947
0.211538
0
0
0
0
0
0
0
0
0
0.016949
0.132353
136
6
49
22.666667
0.864407
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
1
0
1
0
0
8
0b15002162ec614a42811d09c033604fc989b822
78
py
Python
backend/users/api/v1/viewsets.py
crowdbotics-apps/demo-app-31894
52240d808abc42160aab842c9b71cf5a8d5dc0fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/users/api/v1/viewsets.py
crowdbotics-apps/demo-app-31894
52240d808abc42160aab842c9b71cf5a8d5dc0fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/users/api/v1/viewsets.py
crowdbotics-apps/demo-app-31894
52240d808abc42160aab842c9b71cf5a8d5dc0fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from rest_framework import viewsets from rest_framework import authentication
26
41
0.897436
10
78
6.8
0.6
0.235294
0.5
0.676471
0
0
0
0
0
0
0
0
0.102564
78
2
42
39
0.971429
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
9be6ad1097dbfc8374dc72422d405d1a5508261a
37,500
py
Python
temp.py
Zorag44/atlast-discord-bot
82de78a924630edca39b6b37d255b5558424086f
[ "MIT" ]
null
null
null
temp.py
Zorag44/atlast-discord-bot
82de78a924630edca39b6b37d255b5558424086f
[ "MIT" ]
null
null
null
temp.py
Zorag44/atlast-discord-bot
82de78a924630edca39b6b37d255b5558424086f
[ "MIT" ]
null
null
null
import discord from discord import Reaction import asyncio import time import random import discord.utils import operator from discord_components import DiscordComponents, Button, ButtonStyle, Interaction import gspread from oauth2client.service_account import ServiceAccountCredentials import unidecode scope = ["https://spreadsheets.google.com/feeds", 'https://www.googleapis.com/auth/spreadsheets', "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive"] creds=ServiceAccountCredentials.from_json_keyfile_name("cred.json",scope) cli=gspread.authorize(creds) sheet=cli.open("player_history").sheet1 sheetmod=cli.open("player_historymod").sheet1 sheetind=cli.open("indian_mod").sheet1 sheetindmod=cli.open("indian_mod_mod").sheet1 client= discord.Client() DiscordComponents(client) async def pagination(message,paginationList): current = 0 mainMessage = await message.channel.send( "", embed = paginationList[current], components = [ [ Button( label = "Prev", id = "back", style = ButtonStyle.red ), Button( label = f"Page {int(paginationList.index(paginationList[current])) + 1}/{len(paginationList)}", id = "cur", style = ButtonStyle.grey, disabled = True ), Button( label = "Next", id = "front", style = ButtonStyle.red ) ] ] ) #Infinite loop while True: try: interaction = await client.wait_for( "button_click", check = lambda i: i.component.id in ["back", "front"], timeout = 4.0 ) if interaction.component.id == "back": current -= 1 elif interaction.component.id == "front": current += 1 if current == len(paginationList): current = 0 elif current < 0: current = len(paginationList) - 1 await interaction.respond( type = 7, embed = paginationList[current], components = [ [ Button( label = "Prev", id = "back", style = ButtonStyle.red ), Button( label = f"Page {int(paginationList.index(paginationList[current])) + 1}/{len(paginationList)}", id = "cur", style = ButtonStyle.grey, disabled = True ), Button( label = "Next", id = "front", style = ButtonStyle.red ) ] ] ) except asyncio.TimeoutError: await mainMessage.edit( components = [ [ Button( label = "Prev", id = "back", style = ButtonStyle.red, disabled = True ), Button( label = f"Page {int(paginationList.index(paginationList[current])) + 1}/{len(paginationList)}", id = "cur", style = ButtonStyle.grey, disabled = True ), Button( label = "Next", id = "front", style = ButtonStyle.red, disabled = True ) ] ] ) break @client.event async def on_ready(): sum=0 for x in client.guilds: sum+=x.member_count activity = discord.Game(name=f"(&atlas) {sum} members, {len(client.guilds)} servers", type=3) await client.change_presence(status=discord.Status.idle, activity=activity) print("logged in as {0.user}".format(client)) countries=[] f=open("coun.txt","r") for line in f.readlines(): for i in range(len(line)): if line[i].isnumeric()==True: line=line[0:i-1] break countries.append(line.lower()) coun=countries indians=[] f1=open("indian_mod.txt","r",encoding="utf-8") for line in f1.readlines(): indians.append(unidecode.unidecode(line[0:len(line)-1].lower())) flag=False ongoing_chan=[] curr_lb=[] d1={} flag=False @client.event async def on_message(message): global d1,flag flag=False # await lock.acquire() if message.author==client.user: return if message.content.lower()==("&atlas"): embed=discord.Embed(title="Atlast Bot", description="The ol' Atlas game where you have to name countries starting with the last letter of the country named by the previous player.\n currently two variants available, the normal atlas game and another variant of the same.\n\n List of currently available commands:\n&help : info regarding the first type\n\n&modhelp : info regarding the second variant (this one is better 😈)\n\n&start : starts the game with default rounds set to 2, otherwise type '&start' followed by the number of rounds to set the number of rounds.\n\n&modstart : starts the mod variant. set number of rounds the same way as above.\n\n&lb : displays all time leaderboard for the first variant.\n\n&modlb : displays all time leaderboard for the second variant.\n\nTo add it to your server click the below link:\nhttps://bit.ly/3nrTzYZ \nHope you enjoy 😊",color=discord.Color(0x1abc9c)) await message.channel.send(embed=embed) if message.content.lower().startswith("&help"): embed=discord.Embed(title="About this game",description="Basically an atlas game where players have to name a place(country for now) starting with the last letter of the name of the place given by the previous player.\n use '&start' followed by number of rounds to start(0-99).",color=discord.Color(0x1abc9c)) await message.channel.send(embed=embed) if message.content.lower().startswith("&modhelp") or message.content.lower().startswith("&mh"): embed=discord.Embed(title="About Atlas mod",description="Basically a variant of the normal atlas game. Here players have to name a place(country for now) starting with the letter thrown randomly by the bot, only catch being that the player who answers first gets the point.\n use '&modstart' followed by number of rounds to start(0-99).",color=discord.Color(0x1abc9c)) await message.channel.send(embed=embed) if message.content.lower().startswith("&stop"): await message.channel.send("haha fuck you....game aint stopping!!! 😈") flag=True if message.content.lower().startswith("&start"): if message.channel in ongoing_chan: await message.channel.send("Already a running game!!") return else: ongoing_chan.append(message.channel) rounds=message.content[-2] rounds+=message.content[-1] if rounds[0].isalpha()==False and rounds[1].isalpha()==False: roundsnum=int(rounds) elif rounds[0].isalpha()==True and rounds[1].isalpha()==False: roundsnum=int(rounds[1]) else: roundsnum=2 coun=[] for co in countries: coun.append(co) embed1=discord.Embed(title="Welcome, react on this message to enter.",description="",color=discord.Color(0x2ecc71)) mess="Welcome, react on this message to enter." mss=await message.channel.send(embed=embed1) reaction= await mss.add_reaction('✔') t=time.time()+ 5 def check(reaction, user): return user == message.author and str(reaction.emoji) == '✔' def stopcheck(reaction,user): return user==message.author and str(r1.emoji)== '❌' try: while time.time()<t: reaction, user = await client.wait_for('reaction_add',timeout=10.0, check=check) except asyncio.TimeoutError: await message.channel.send('okk') if reaction==None: await message.channel.send("but no one reacted only 😢") ongoing_chan.remove(message.channel) # lock.release() return users = await reaction.users().flatten() j=len(users) for u in users: if u.id==829214415131115530: users.remove(u) await message.channel.send("Are you ready.....") # if j==1: # await message.channel.send("but no one reacted only 😢") # return for u in users: await message.channel.send("{}".format(u.mention)) await message.channel.send('game starting.....') time.sleep(3) d={} for u in users: d[u]=0 count=1 def check1(m): return m.content.lower() in coun and m.channel==message.channel ###################################### # f=flag # if f: # return # def stopcheck(m): # return m.content.lower()=="&stop" and m.author==message.author # if await client.wait_for('message',check=stopcheck): # return ###################################### rand=random.randint(0, 194) msg1=coun[rand] last_letter=msg1[0] for i in range(len(users)): def check1(m): return m.content.lower() in coun and m.channel==message.channel and m.author==users[i%len(users)] and m.content[0].lower()==last_letter m1=await message.channel.send("{0} Name a country starting from '{1}'".format(users[i%len(users)].mention,last_letter)) try: msg= await client.wait_for('message',check=check1,timeout=20.0) # emote=client.get_emoji(887436771971964928) emoji = discord.utils.get(message.guild.emojis, name='siddhukek') emoji2 = discord.utils.get(message.guild.emojis, name='big_brain') if emoji: await msg.add_reaction(emoji) elif emoji2: await msg.add_reaction(emoji2) else: await msg.add_reaction('✅') # await msg.add_reaction("<siddhukek:887436771971964928>") # await msg.add_reaction(emote) await message.channel.send("CORRECT!!") coun.remove(msg.content.lower()) d[users[i%len(users)]]+=1 await message.channel.send("{0} : {1}".format(users[i%len(users)],d[users[i%len(users)]])) last_letter=msg.content[-1] count=0 for pos in coun: if last_letter != pos[0]: count+=1 if count==len(coun): await message.channel.send("No country left starting with '{}'".format(last_letter)) new_letterpos=random.randint(0, len(coun)) last_letter=coun[new_letterpos][0] except asyncio.TimeoutError: await message.channel.send("TIMES UP!!") k=0 k+=1 # flag=False while k<roundsnum: for i in range(len(users)): def check1(m): return m.content.lower() in coun and m.channel==message.channel and m.author==users[i%len(users)] and m.content[0].lower()==last_letter await message.channel.send("{0} Name a country starting from '{1}'".format(users[i%len(users)].mention,last_letter)) try: msg= await client.wait_for('message',check=check1,timeout=20.0) # emote=client.get_emoji(887436771971964928) emoji = discord.utils.get(message.guild.emojis, name='siddhukek') emoji2 = discord.utils.get(message.guild.emojis, name='big_brain') if emoji: await msg.add_reaction(emoji) elif emoji2: await msg.add_reaction(emoji2) else: await msg.add_reaction('✅') # await msg.add_reaction("<siddhukek:887436771971964928>") # await msg.add_reaction('<"siddhukek:887436771971964928') coun.remove(msg.content.lower()) if len(coun)==0: flag=True break await message.channel.send("CORRECT!!") d[users[i%len(users)]]+=1 await message.channel.send("{0} : {1}".format(users[i%len(users)],d[users[i%len(users)]])) last_letter=msg.content[-1] count=0 for pos in coun: if last_letter != pos[0]: count+=1 if count==len(coun): await message.channel.send("no country left starting with '{}'".format(last_letter)) new_letterpos=random.choice(coun) last_letter=new_letterpos[0] except asyncio.TimeoutError: await message.channel.send("TIMES UP!!") if flag: break k+=1 dict(sorted(d.items(),key=lambda item:item[1],reverse=True)) ds=dict(sorted(d.items(),key=operator.itemgetter(1),reverse=True)) embed=discord.Embed(title="POINTS TABLE!!",description="",color=discord.Color(0xf1c40f)) for key in ds.keys(): embed.add_field(name=key,value=ds[key],inline=False) await message.channel.send(embed=embed) #storing playerdata for k in d.keys(): cell=sheet.find(str(k)) if cell==None: sheet.append_row([str(k),d[k]]) else: sheet.update_cell(cell.row, cell.col + 1, d[k]+int(sheet.cell(cell.row, cell.col + 1).value)) # f1=open("player_history.txt","a") # for li in d.keys(): # f1.write("{}/ {}\n".format(str(li),str(d[li]))) ongoing_chan.remove(message.channel) return # d1=d if message.content.lower().startswith("&lb"): if message.channel in curr_lb: await message.channel.send("wait for a few seconds then try again.") return else: curr_lb.append(message.channel) embed3=discord.Embed(title="All Time Scoreboard",description="Page no. 1",color=discord.Color(0x1abc9c)) d1={} sheetlist=sheet.get_all_values() for l in sheetlist: l[1]=int(l[1]) sheetlist.sort(key=lambda x:x[1],reverse=True) for l in sheetlist: d1[l[0]]=l[1] print(d1) paginationList1=[] d2 = dict(sorted(d1.items(), key=operator.itemgetter(1),reverse=True)) emcount=1 for k in d2.keys(): if emcount%5==1 and emcount!=1: paginationList1.append(embed3) embed3=discord.Embed(title="All Time Scoreboard",description=f"Page no. {int(emcount/5 + 1)}",color=discord.Color(0x1abc9c)) embed3.add_field(name=f"{emcount}. {k}",value=d2[k],inline=False) emcount+=1 paginationList1.append(embed3) await pagination(message,paginationList1) print(len(paginationList1)) curr_lb.remove(message.channel) return if message.content.lower().startswith("&modstart") or message.content.lower().startswith("&ms"): if message.channel in ongoing_chan: await message.channel.send("Already a running game!!") return else: ongoing_chan.append(message.channel) rounds=message.content[-2] rounds+=message.content[-1] if rounds[0].isalpha()==False and rounds[1].isalpha()==False: roundsnum=int(rounds) elif rounds[0].isalpha()==True and rounds[1].isalpha()==False: roundsnum=int(rounds[1]) else: roundsnum=2 coun1=[] for co in countries: coun1.append(co) embed1=discord.Embed(title="Welcome to Atlas Mod, react on this message to enter.",description="",color=discord.Color(0x2ecc71)) mess="Welcome, react on this message to enter." mss=await message.channel.send(embed=embed1) reaction= await mss.add_reaction('✔') t=time.time()+ 5 def check(reaction, user): return user == message.author and str(reaction.emoji) == '✔' try: while time.time()<t: reaction, user = await client.wait_for('reaction_add',timeout=10.0, check=check) except asyncio.TimeoutError: await message.channel.send('okk') if reaction==None: await message.channel.send("but no one reacted only 😢") ongoing_chan.remove(message.channel) return users = await reaction.users().flatten() j=len(users) for u in users: if u.id==829214415131115530: users.remove(u) await message.channel.send("Are you ready.....") for u in users: await message.channel.send("{}".format(u.mention)) await message.channel.send('game starting.....') time.sleep(3) dmod={} for u in users: dmod[u]=0 count=1 rand=random.randint(0, 194) msg1=coun1[rand] last_letter=msg1[0] rd=0 while(rd<roundsnum*len(dmod)): def check1(m): return m.content.lower() in coun1 and m.channel==message.channel and m.content.lower()[0]==last_letter and m.author in dmod.keys() m2=await message.channel.send("Name a country starting with '{}'".format(last_letter)) try: me= await client.wait_for('message',check=check1,timeout=10.0) emoji = discord.utils.get(message.guild.emojis, name='siddhukek') emoji2 = discord.utils.get(message.guild.emojis, name='big_brain') if emoji: await me.add_reaction(emoji) elif emoji2: await me.add_reaction(emoji2) else: await me.add_reaction('✅') await message.channel.send(f"CORRECT {me.author.mention}!!") coun1.remove(me.content.lower()) dmod[me.author]+=1 await message.channel.send("{0} : {1}".format(me.author,dmod[me.author])) new_letterpos=random.randint(1, len(coun1)) last_letter=coun1[new_letterpos-1][0] except asyncio.TimeoutError: await message.channel.send("No points for anyone!!") rd+=1 d4=dict( sorted(dmod.items(), key=operator.itemgetter(1),reverse=True)) embed=discord.Embed(title="POINTS TABLE (MOD)!!",description="",color=discord.Color(0xf1c40f)) for key in d4.keys(): embed.add_field(name=key,value=d4[key],inline=False) await message.channel.send(embed=embed) for k in dmod.keys(): cell=sheetmod.find(str(k)) if cell==None: sheetmod.append_row([str(k),dmod[k]]) else: sheetmod.update_cell(cell.row, cell.col + 1, dmod[k]+int(sheetmod.cell(cell.row, cell.col + 1).value)) ongoing_chan.remove(message.channel) return if message.content.lower().startswith("&modlb"): if message.channel in curr_lb: await message.channel.send("wait for a few seconds then try again.") return else: curr_lb.append(message.channel) embed4=discord.Embed(title="All Time Scoreboard (Mod)",description="Page no. 1",color=discord.Color(0x1abc9c)) d5={} sheetlist1=sheetmod.get_all_values() for l in sheetlist1: l[1]=int(l[1]) sheetlist1.sort(key=lambda x:x[1],reverse=True) print(sheetlist1) for l in sheetlist1: d5[l[0]]=l[1] dict(sorted(d5.items(),key=lambda item:item[1],reverse=True)) dm = dict( sorted(d5.items(), key=operator.itemgetter(1),reverse=True)) print(dm) paginationList=[] emcount=1 for k in dm.keys(): if emcount%5==1 and emcount!=1: paginationList.append(embed4) embed4=discord.Embed(title="All Time Scoreboard (Mod)",description=f"Page no. {int(emcount/5 + 1)}",color=discord.Color(0x1abc9c)) embed4.add_field(name=f"{emcount}. {k}",value=dm[k],inline=False) emcount+=1 paginationList.append(embed4) await pagination(message,paginationList) print(len(paginationList)) curr_lb.remove(message.channel) return if message.content.lower().startswith("&istart"): if message.channel in ongoing_chan: await message.channel.send("Already a running game!!") return else: ongoing_chan.append(message.channel) rounds=message.content[-2] rounds+=message.content[-1] if rounds[0].isalpha()==False and rounds[1].isalpha()==False: roundsnum=int(rounds) elif rounds[0].isalpha()==True and rounds[1].isalpha()==False: roundsnum=int(rounds[1]) else: roundsnum=2 inds=[] for co in indians: inds.append(co) embed1=discord.Embed(title="Welcome to Atlas(India), react on this message to enter.",description="",color=discord.Color(0x2ecc71)) mess="Welcome, react on this message to enter." mss=await message.channel.send(embed=embed1) reaction= await mss.add_reaction('✔') t=time.time()+ 5 def check(reaction, user): return user == message.author and str(reaction.emoji) == '✔' def stopcheck(reaction,user): return user==message.author and str(r1.emoji)== '❌' try: while time.time()<t: reaction, user = await client.wait_for('reaction_add',timeout=10.0, check=check) except asyncio.TimeoutError: await message.channel.send('okk') if reaction==None: await message.channel.send("but no one reacted only 😢") ongoing_chan.remove(message.channel) # lock.release() return users = await reaction.users().flatten() j=len(users) for u in users: if u.id==829214415131115530: users.remove(u) await message.channel.send("Are you ready.....") # if j==1: # await message.channel.send("but no one reacted only 😢") # return for u in users: await message.channel.send("{}".format(u.mention)) await message.channel.send('game starting.....') time.sleep(3) d={} for u in users: d[u]=0 count=1 def check1(m): return m.content.lower() in inds and m.channel==message.channel rand=random.randint(0, 441) msg1=inds[rand] last_letter=msg1[0] k=0 # flag=False while k<roundsnum: for i in range(len(users)): def check1(m): return m.content.lower() in inds and m.channel==message.channel and m.author==users[i%len(users)] and m.content[0].lower()==last_letter await message.channel.send("{0} Name an indian place starting from '{1}'".format(users[i%len(users)].mention,last_letter)) try: msg= await client.wait_for('message',check=check1,timeout=20.0) # emote=client.get_emoji(887436771971964928) emoji = discord.utils.get(message.guild.emojis, name='siddhukek') emoji2 = discord.utils.get(message.guild.emojis, name='big_brain') if emoji: await msg.add_reaction(emoji) elif emoji2: await msg.add_reaction(emoji2) else: await msg.add_reaction('✅') # await msg.add_reaction("<siddhukek:887436771971964928>") # await msg.add_reaction('<"siddhukek:887436771971964928') inds.remove(msg.content.lower()) if len(inds)==0: flag=True break await message.channel.send("CORRECT!!") d[users[i%len(users)]]+=1 await message.channel.send("{0} : {1}".format(users[i%len(users)],d[users[i%len(users)]])) last_letter=msg.content[-1] count=0 for pos in inds: if last_letter != pos[0]: count+=1 if count==len(inds): await message.channel.send("no indian place left starting with '{}'".format(last_letter)) new_letterpos=random.choice(inds) last_letter=new_letterpos[0] except asyncio.TimeoutError: await message.channel.send("TIMES UP!!") if flag: break k+=1 dict(sorted(d.items(),key=lambda item:item[1],reverse=True)) ds=dict(sorted(d.items(),key=operator.itemgetter(1),reverse=True)) embed=discord.Embed(title="POINTS TABLE(Indian)!!",description="",color=discord.Color(0xf1c40f)) for key in ds.keys(): embed.add_field(name=key,value=ds[key],inline=False) await message.channel.send(embed=embed) #storing playerdata for k in d.keys(): cell=sheetind.find(str(k)) if cell==None: sheetind.append_row([str(k),d[k]]) else: sheetind.update_cell(cell.row, cell.col + 1, d[k]+int(sheetind.cell(cell.row, cell.col + 1).value)) # f1=open("player_history.txt","a") # for li in d.keys(): # f1.write("{}/ {}\n".format(str(li),str(d[li]))) ongoing_chan.remove(message.channel) return if message.content.lower().startswith("&ilb"): if message.channel in curr_lb: await message.channel.send("wait for a few seconds then try again.") return else: curr_lb.append(message.channel) embed3=discord.Embed(title="All Time Scoreboard(Indian)",description="Page no. 1",color=discord.Color(0x1abc9c)) d1={} sheetlist=sheetind.get_all_values() for l in sheetlist: l[1]=int(l[1]) sheetlist.sort(key=lambda x:x[1],reverse=True) for l in sheetlist: d1[l[0]]=l[1] print(d1) paginationList1=[] d2 = dict(sorted(d1.items(), key=operator.itemgetter(1),reverse=True)) emcount=1 for k in d2.keys(): if emcount%5==1 and emcount!=1: paginationList1.append(embed3) embed3=discord.Embed(title="All Time Scoreboard(Indian)",description=f"Page no. {int(emcount/5 + 1)}",color=discord.Color(0x1abc9c)) embed3.add_field(name=f"{emcount}. {k}",value=d2[k],inline=False) emcount+=1 paginationList1.append(embed3) await pagination(message,paginationList1) print(len(paginationList1)) curr_lb.remove(message.channel) return if message.content.lower().startswith("&imodstart") or message.content.lower().startswith("&ims"): if message.channel in ongoing_chan: await message.channel.send("Already a running game!!") return else: ongoing_chan.append(message.channel) rounds=message.content[-2] rounds+=message.content[-1] if rounds[0].isalpha()==False and rounds[1].isalpha()==False: roundsnum=int(rounds) elif rounds[0].isalpha()==True and rounds[1].isalpha()==False: roundsnum=int(rounds[1]) else: roundsnum=2 ind=[] for co in indians: ind.append(co) embed1=discord.Embed(title="Welcome to Atlas Mod(India), react on this message to enter.",description="",color=discord.Color(0x2ecc71)) mess="Welcome, react on this message to enter." mss=await message.channel.send(embed=embed1) reaction= await mss.add_reaction('✔') t=time.time()+ 5 def check(reaction, user): return user == message.author and str(reaction.emoji) == '✔' try: while time.time()<t: reaction, user = await client.wait_for('reaction_add',timeout=10.0, check=check) except asyncio.TimeoutError: await message.channel.send('okk') if reaction==None: await message.channel.send("but no one reacted only 😢") ongoing_chan.remove(message.channel) return users = await reaction.users().flatten() j=len(users) for u in users: if u.id==829214415131115530: users.remove(u) await message.channel.send("Are you ready.....") for u in users: await message.channel.send("{}".format(u.mention)) await message.channel.send('game starting.....') time.sleep(3) dmod={} for u in users: dmod[u]=0 count=1 rand=random.randint(0, 441) msg1=ind[rand] last_letter=msg1[0] rd=0 while(rd<roundsnum*len(dmod)): def check1(m): return m.content.lower() in ind and m.channel==message.channel and m.content.lower()[0]==last_letter and m.author in dmod.keys() m2=await message.channel.send("Name an indian place starting with '{}'".format(last_letter)) try: me= await client.wait_for('message',check=check1,timeout=10.0) emoji = discord.utils.get(message.guild.emojis, name='siddhukek') emoji2 = discord.utils.get(message.guild.emojis, name='big_brain') if emoji: await me.add_reaction(emoji) elif emoji2: await me.add_reaction(emoji2) else: await me.add_reaction('✅') await message.channel.send(f"CORRECT {me.author.mention}!!") ind.remove(me.content.lower()) dmod[me.author]+=1 await message.channel.send("{0} : {1}".format(me.author,dmod[me.author])) new_letterpos=random.randint(1, len(ind)) last_letter=ind[new_letterpos-1][0] except asyncio.TimeoutError: await message.channel.send("No points for anyone!!") rd+=1 d4=dict( sorted(dmod.items(), key=operator.itemgetter(1),reverse=True)) embed=discord.Embed(title="POINTS TABLE (MOD)(India)!!",description="",color=discord.Color(0xf1c40f)) for key in d4.keys(): embed.add_field(name=key,value=d4[key],inline=False) await message.channel.send(embed=embed) for k in dmod.keys(): cell=sheetindmod.find(str(k)) if cell==None: sheetindmod.append_row([str(k),dmod[k]]) else: sheetindmod.update_cell(cell.row, cell.col + 1, dmod[k]+int(sheetindmod.cell(cell.row, cell.col + 1).value)) ongoing_chan.remove(message.channel) return if message.content.lower().startswith("&imodlb") or message.content.lower()=='&imlb': if message.channel in curr_lb: await message.channel.send("wait for a few seconds then try again.") return else: curr_lb.append(message.channel) embed4=discord.Embed(title="All Time Scoreboard (Mod)(India)",description="Page no. 1",color=discord.Color(0x1abc9c)) d5={} sheetlist1=sheetindmod.get_all_values() for l in sheetlist1: l[1]=int(l[1]) sheetlist1.sort(key=lambda x:x[1],reverse=True) print(sheetlist1) for l in sheetlist1: d5[l[0]]=l[1] dict(sorted(d5.items(),key=lambda item:item[1],reverse=True)) dm = dict( sorted(d5.items(), key=operator.itemgetter(1),reverse=True)) print(dm) paginationList=[] emcount=1 for k in dm.keys(): if emcount%5==1 and emcount!=1: paginationList.append(embed4) embed4=discord.Embed(title="All Time Scoreboard (Mod)(India)",description=f"Page no. {int(emcount/5 + 1)}",color=discord.Color(0x1abc9c)) embed4.add_field(name=f"{emcount}. {k}",value=dm[k],inline=False) emcount+=1 paginationList.append(embed4) await pagination(message,paginationList) print(len(paginationList)) curr_lb.remove(message.channel) return # lock.release() client.run('token🌚')
43.554007
911
0.49744
3,949
37,500
4.690048
0.097746
0.076346
0.067707
0.081961
0.839318
0.808434
0.789968
0.781059
0.781059
0.775282
0
0.029441
0.38952
37,500
860
912
43.604651
0.778491
0.03016
0
0.75469
0
0.004329
0.11954
0.007544
0
0
0.004295
0
0
1
0.018759
false
0
0.015873
0.018759
0.083694
0.015873
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
5037d8159a57bfd24bdf0a6230b4ea309ea867e3
132
py
Python
eventfiles/tests.py
BelikovYoav/Beyond-07-team-3
407efd58ed5d98fd0862601d792c0415464b45cc
[ "MIT" ]
null
null
null
eventfiles/tests.py
BelikovYoav/Beyond-07-team-3
407efd58ed5d98fd0862601d792c0415464b45cc
[ "MIT" ]
8
2022-02-28T17:05:35.000Z
2022-03-06T22:53:54.000Z
eventfiles/tests.py
BelikovYoav/Beyond-07-team-3
407efd58ed5d98fd0862601d792c0415464b45cc
[ "MIT" ]
5
2022-02-28T13:45:11.000Z
2022-03-06T15:26:54.000Z
from .class_tests.event_file_tests import * # noqa: F403 F401 from .class_tests.event_file_views_tests import * # noqa: F403 F401
44
68
0.787879
21
132
4.619048
0.47619
0.185567
0.28866
0.391753
0.948454
0
0
0
0
0
0
0.105263
0.136364
132
2
69
66
0.745614
0.234848
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
504e8c9223d4517c455807e482f21a0a0b6602a5
47,674
py
Python
dingtalk/python/alibabacloud_dingtalk/miniapp_1_0/client.py
yndu13/dingtalk-sdk
700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f
[ "Apache-2.0" ]
15
2020-08-27T04:10:26.000Z
2022-03-07T06:25:42.000Z
dingtalk/python/alibabacloud_dingtalk/miniapp_1_0/client.py
yndu13/dingtalk-sdk
700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f
[ "Apache-2.0" ]
1
2020-09-27T01:30:46.000Z
2021-12-29T09:15:34.000Z
dingtalk/python/alibabacloud_dingtalk/miniapp_1_0/client.py
yndu13/dingtalk-sdk
700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f
[ "Apache-2.0" ]
5
2020-08-27T04:07:44.000Z
2021-12-03T02:55:20.000Z
# -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. from Tea.core import TeaCore from alibabacloud_tea_openapi.client import Client as OpenApiClient from alibabacloud_tea_openapi import models as open_api_models from alibabacloud_tea_util.client import Client as UtilClient from alibabacloud_dingtalk.miniapp_1_0 import models as dingtalkminiapp__1__0_models from alibabacloud_tea_util import models as util_models from alibabacloud_openapi_util.client import Client as OpenApiUtilClient class Client(OpenApiClient): """ *\ """ def __init__( self, config: open_api_models.Config, ): super().__init__(config) self._endpoint_rule = '' if UtilClient.empty(self._endpoint): self._endpoint = 'api.dingtalk.com' def create_version_across_bundle( self, request: dingtalkminiapp__1__0_models.CreateVersionAcrossBundleRequest, ) -> dingtalkminiapp__1__0_models.CreateVersionAcrossBundleResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.CreateVersionAcrossBundleHeaders() return self.create_version_across_bundle_with_options(request, headers, runtime) async def create_version_across_bundle_async( self, request: dingtalkminiapp__1__0_models.CreateVersionAcrossBundleRequest, ) -> dingtalkminiapp__1__0_models.CreateVersionAcrossBundleResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.CreateVersionAcrossBundleHeaders() return await self.create_version_across_bundle_with_options_async(request, headers, runtime) def create_version_across_bundle_with_options( self, request: dingtalkminiapp__1__0_models.CreateVersionAcrossBundleRequest, headers: dingtalkminiapp__1__0_models.CreateVersionAcrossBundleHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.CreateVersionAcrossBundleResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.source_version): body['sourceVersion'] = request.source_version if not UtilClient.is_unset(request.source_bundle_id): body['sourceBundleId'] = request.source_bundle_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): body['version'] = request.version if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.CreateVersionAcrossBundleResponse(), self.do_roarequest('CreateVersionAcrossBundle', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/versions/createAcrossBundle', 'json', req, runtime) ) async def create_version_across_bundle_with_options_async( self, request: dingtalkminiapp__1__0_models.CreateVersionAcrossBundleRequest, headers: dingtalkminiapp__1__0_models.CreateVersionAcrossBundleHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.CreateVersionAcrossBundleResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.source_version): body['sourceVersion'] = request.source_version if not UtilClient.is_unset(request.source_bundle_id): body['sourceBundleId'] = request.source_bundle_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): body['version'] = request.version if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.CreateVersionAcrossBundleResponse(), await self.do_roarequest_async('CreateVersionAcrossBundle', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/versions/createAcrossBundle', 'json', req, runtime) ) def update_version_status( self, request: dingtalkminiapp__1__0_models.UpdateVersionStatusRequest, ) -> dingtalkminiapp__1__0_models.UpdateVersionStatusResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.UpdateVersionStatusHeaders() return self.update_version_status_with_options(request, headers, runtime) async def update_version_status_async( self, request: dingtalkminiapp__1__0_models.UpdateVersionStatusRequest, ) -> dingtalkminiapp__1__0_models.UpdateVersionStatusResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.UpdateVersionStatusHeaders() return await self.update_version_status_with_options_async(request, headers, runtime) def update_version_status_with_options( self, request: dingtalkminiapp__1__0_models.UpdateVersionStatusRequest, headers: dingtalkminiapp__1__0_models.UpdateVersionStatusHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.UpdateVersionStatusResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.version_type): body['versionType'] = request.version_type if not UtilClient.is_unset(request.version): body['version'] = request.version if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.UpdateVersionStatusResponse(), self.do_roarequest('UpdateVersionStatus', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/versions/status', 'json', req, runtime) ) async def update_version_status_with_options_async( self, request: dingtalkminiapp__1__0_models.UpdateVersionStatusRequest, headers: dingtalkminiapp__1__0_models.UpdateVersionStatusHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.UpdateVersionStatusResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.version_type): body['versionType'] = request.version_type if not UtilClient.is_unset(request.version): body['version'] = request.version if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.UpdateVersionStatusResponse(), await self.do_roarequest_async('UpdateVersionStatus', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/versions/status', 'json', req, runtime) ) def set_extend_setting( self, request: dingtalkminiapp__1__0_models.SetExtendSettingRequest, ) -> dingtalkminiapp__1__0_models.SetExtendSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.SetExtendSettingHeaders() return self.set_extend_setting_with_options(request, headers, runtime) async def set_extend_setting_async( self, request: dingtalkminiapp__1__0_models.SetExtendSettingRequest, ) -> dingtalkminiapp__1__0_models.SetExtendSettingResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.SetExtendSettingHeaders() return await self.set_extend_setting_with_options_async(request, headers, runtime) def set_extend_setting_with_options( self, request: dingtalkminiapp__1__0_models.SetExtendSettingRequest, headers: dingtalkminiapp__1__0_models.SetExtendSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.SetExtendSettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.build_h5bundle): body['buildH5Bundle'] = request.build_h5bundle if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.SetExtendSettingResponse(), self.do_roarequest('SetExtendSetting', 'miniapp_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/miniapp/apps/settings', 'json', req, runtime) ) async def set_extend_setting_with_options_async( self, request: dingtalkminiapp__1__0_models.SetExtendSettingRequest, headers: dingtalkminiapp__1__0_models.SetExtendSettingHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.SetExtendSettingResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.build_h5bundle): body['buildH5Bundle'] = request.build_h5bundle if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.SetExtendSettingResponse(), await self.do_roarequest_async('SetExtendSetting', 'miniapp_1.0', 'HTTP', 'PUT', 'AK', f'/v1.0/miniapp/apps/settings', 'json', req, runtime) ) def create_mini_app( self, request: dingtalkminiapp__1__0_models.CreateMiniAppRequest, ) -> dingtalkminiapp__1__0_models.CreateMiniAppResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.CreateMiniAppHeaders() return self.create_mini_app_with_options(request, headers, runtime) async def create_mini_app_async( self, request: dingtalkminiapp__1__0_models.CreateMiniAppRequest, ) -> dingtalkminiapp__1__0_models.CreateMiniAppResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.CreateMiniAppHeaders() return await self.create_mini_app_with_options_async(request, headers, runtime) def create_mini_app_with_options( self, request: dingtalkminiapp__1__0_models.CreateMiniAppRequest, headers: dingtalkminiapp__1__0_models.CreateMiniAppHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.CreateMiniAppResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.biz_type): body['bizType'] = request.biz_type if not UtilClient.is_unset(request.biz_id): body['bizId'] = request.biz_id if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.icon): body['icon'] = request.icon if not UtilClient.is_unset(request.desc): body['desc'] = request.desc if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.CreateMiniAppResponse(), self.do_roarequest('CreateMiniApp', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/apps', 'json', req, runtime) ) async def create_mini_app_with_options_async( self, request: dingtalkminiapp__1__0_models.CreateMiniAppRequest, headers: dingtalkminiapp__1__0_models.CreateMiniAppHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.CreateMiniAppResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.biz_type): body['bizType'] = request.biz_type if not UtilClient.is_unset(request.biz_id): body['bizId'] = request.biz_id if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.icon): body['icon'] = request.icon if not UtilClient.is_unset(request.desc): body['desc'] = request.desc if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.CreateMiniAppResponse(), await self.do_roarequest_async('CreateMiniApp', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/apps', 'json', req, runtime) ) def get_max_version( self, request: dingtalkminiapp__1__0_models.GetMaxVersionRequest, ) -> dingtalkminiapp__1__0_models.GetMaxVersionResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.GetMaxVersionHeaders() return self.get_max_version_with_options(request, headers, runtime) async def get_max_version_async( self, request: dingtalkminiapp__1__0_models.GetMaxVersionRequest, ) -> dingtalkminiapp__1__0_models.GetMaxVersionResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.GetMaxVersionHeaders() return await self.get_max_version_with_options_async(request, headers, runtime) def get_max_version_with_options( self, request: dingtalkminiapp__1__0_models.GetMaxVersionRequest, headers: dingtalkminiapp__1__0_models.GetMaxVersionHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.GetMaxVersionResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.mini_app_id): query['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.bundle_id): query['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): query['version'] = request.version real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.GetMaxVersionResponse(), self.do_roarequest('GetMaxVersion', 'miniapp_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/miniapp/apps/maxVersions', 'json', req, runtime) ) async def get_max_version_with_options_async( self, request: dingtalkminiapp__1__0_models.GetMaxVersionRequest, headers: dingtalkminiapp__1__0_models.GetMaxVersionHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.GetMaxVersionResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.mini_app_id): query['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.bundle_id): query['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): query['version'] = request.version real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.GetMaxVersionResponse(), await self.do_roarequest_async('GetMaxVersion', 'miniapp_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/miniapp/apps/maxVersions', 'json', req, runtime) ) def get_setting_by_mini_app_id( self, mini_app_id: str, ) -> dingtalkminiapp__1__0_models.GetSettingByMiniAppIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.GetSettingByMiniAppIdHeaders() return self.get_setting_by_mini_app_id_with_options(mini_app_id, headers, runtime) async def get_setting_by_mini_app_id_async( self, mini_app_id: str, ) -> dingtalkminiapp__1__0_models.GetSettingByMiniAppIdResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.GetSettingByMiniAppIdHeaders() return await self.get_setting_by_mini_app_id_with_options_async(mini_app_id, headers, runtime) def get_setting_by_mini_app_id_with_options( self, mini_app_id: str, headers: dingtalkminiapp__1__0_models.GetSettingByMiniAppIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.GetSettingByMiniAppIdResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkminiapp__1__0_models.GetSettingByMiniAppIdResponse(), self.do_roarequest('GetSettingByMiniAppId', 'miniapp_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/miniapp/apps/settings', 'json', req, runtime) ) async def get_setting_by_mini_app_id_with_options_async( self, mini_app_id: str, headers: dingtalkminiapp__1__0_models.GetSettingByMiniAppIdHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.GetSettingByMiniAppIdResponse: real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers ) return TeaCore.from_map( dingtalkminiapp__1__0_models.GetSettingByMiniAppIdResponse(), await self.do_roarequest_async('GetSettingByMiniAppId', 'miniapp_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/miniapp/apps/settings', 'json', req, runtime) ) def query_html_bundle_build( self, request: dingtalkminiapp__1__0_models.QueryHtmlBundleBuildRequest, ) -> dingtalkminiapp__1__0_models.QueryHtmlBundleBuildResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.QueryHtmlBundleBuildHeaders() return self.query_html_bundle_build_with_options(request, headers, runtime) async def query_html_bundle_build_async( self, request: dingtalkminiapp__1__0_models.QueryHtmlBundleBuildRequest, ) -> dingtalkminiapp__1__0_models.QueryHtmlBundleBuildResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.QueryHtmlBundleBuildHeaders() return await self.query_html_bundle_build_with_options_async(request, headers, runtime) def query_html_bundle_build_with_options( self, request: dingtalkminiapp__1__0_models.QueryHtmlBundleBuildRequest, headers: dingtalkminiapp__1__0_models.QueryHtmlBundleBuildHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.QueryHtmlBundleBuildResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.mini_app_id): query['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.bundle_id): query['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): query['version'] = request.version real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.QueryHtmlBundleBuildResponse(), self.do_roarequest('QueryHtmlBundleBuild', 'miniapp_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/miniapp/h5Bundles/buildResults', 'json', req, runtime) ) async def query_html_bundle_build_with_options_async( self, request: dingtalkminiapp__1__0_models.QueryHtmlBundleBuildRequest, headers: dingtalkminiapp__1__0_models.QueryHtmlBundleBuildHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.QueryHtmlBundleBuildResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.mini_app_id): query['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.bundle_id): query['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): query['version'] = request.version real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.QueryHtmlBundleBuildResponse(), await self.do_roarequest_async('QueryHtmlBundleBuild', 'miniapp_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/miniapp/h5Bundles/buildResults', 'json', req, runtime) ) def create_mini_app_plugin( self, request: dingtalkminiapp__1__0_models.CreateMiniAppPluginRequest, ) -> dingtalkminiapp__1__0_models.CreateMiniAppPluginResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.CreateMiniAppPluginHeaders() return self.create_mini_app_plugin_with_options(request, headers, runtime) async def create_mini_app_plugin_async( self, request: dingtalkminiapp__1__0_models.CreateMiniAppPluginRequest, ) -> dingtalkminiapp__1__0_models.CreateMiniAppPluginResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.CreateMiniAppPluginHeaders() return await self.create_mini_app_plugin_with_options_async(request, headers, runtime) def create_mini_app_plugin_with_options( self, request: dingtalkminiapp__1__0_models.CreateMiniAppPluginRequest, headers: dingtalkminiapp__1__0_models.CreateMiniAppPluginHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.CreateMiniAppPluginResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.biz_type): body['bizType'] = request.biz_type if not UtilClient.is_unset(request.biz_id): body['bizId'] = request.biz_id if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.icon): body['icon'] = request.icon if not UtilClient.is_unset(request.desc): body['desc'] = request.desc if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.CreateMiniAppPluginResponse(), self.do_roarequest('CreateMiniAppPlugin', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/plugins', 'json', req, runtime) ) async def create_mini_app_plugin_with_options_async( self, request: dingtalkminiapp__1__0_models.CreateMiniAppPluginRequest, headers: dingtalkminiapp__1__0_models.CreateMiniAppPluginHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.CreateMiniAppPluginResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.biz_type): body['bizType'] = request.biz_type if not UtilClient.is_unset(request.biz_id): body['bizId'] = request.biz_id if not UtilClient.is_unset(request.name): body['name'] = request.name if not UtilClient.is_unset(request.icon): body['icon'] = request.icon if not UtilClient.is_unset(request.desc): body['desc'] = request.desc if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.CreateMiniAppPluginResponse(), await self.do_roarequest_async('CreateMiniAppPlugin', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/plugins', 'json', req, runtime) ) def list_avaiable_version( self, request: dingtalkminiapp__1__0_models.ListAvaiableVersionRequest, ) -> dingtalkminiapp__1__0_models.ListAvaiableVersionResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.ListAvaiableVersionHeaders() return self.list_avaiable_version_with_options(request, headers, runtime) async def list_avaiable_version_async( self, request: dingtalkminiapp__1__0_models.ListAvaiableVersionRequest, ) -> dingtalkminiapp__1__0_models.ListAvaiableVersionResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.ListAvaiableVersionHeaders() return await self.list_avaiable_version_with_options_async(request, headers, runtime) def list_avaiable_version_with_options( self, request: dingtalkminiapp__1__0_models.ListAvaiableVersionRequest, headers: dingtalkminiapp__1__0_models.ListAvaiableVersionHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.ListAvaiableVersionResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.version_type_set): body['versionTypeSet'] = request.version_type_set if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.page_size): body['pageSize'] = request.page_size if not UtilClient.is_unset(request.page_num): body['pageNum'] = request.page_num if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.ListAvaiableVersionResponse(), self.do_roarequest('ListAvaiableVersion', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/apps/versions/query', 'json', req, runtime) ) async def list_avaiable_version_with_options_async( self, request: dingtalkminiapp__1__0_models.ListAvaiableVersionRequest, headers: dingtalkminiapp__1__0_models.ListAvaiableVersionHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.ListAvaiableVersionResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.version_type_set): body['versionTypeSet'] = request.version_type_set if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.page_size): body['pageSize'] = request.page_size if not UtilClient.is_unset(request.page_num): body['pageNum'] = request.page_num if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.ListAvaiableVersionResponse(), await self.do_roarequest_async('ListAvaiableVersion', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/apps/versions/query', 'json', req, runtime) ) def invoke_html_bundle_build( self, request: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildRequest, ) -> dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildHeaders() return self.invoke_html_bundle_build_with_options(request, headers, runtime) async def invoke_html_bundle_build_async( self, request: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildRequest, ) -> dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse: runtime = util_models.RuntimeOptions() headers = dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildHeaders() return await self.invoke_html_bundle_build_with_options_async(request, headers, runtime) def invoke_html_bundle_build_with_options( self, request: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildRequest, headers: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): body['version'] = request.version if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse(), self.do_roarequest('InvokeHtmlBundleBuild', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/h5Bundles/build', 'json', req, runtime) ) async def invoke_html_bundle_build_with_options_async( self, request: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildRequest, headers: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse: UtilClient.validate_model(request) body = {} if not UtilClient.is_unset(request.mini_app_id): body['miniAppId'] = request.mini_app_id if not UtilClient.is_unset(request.bundle_id): body['bundleId'] = request.bundle_id if not UtilClient.is_unset(request.version): body['version'] = request.version if not UtilClient.is_unset(request.ding_isv_org_id): body['dingIsvOrgId'] = request.ding_isv_org_id if not UtilClient.is_unset(request.ding_org_id): body['dingOrgId'] = request.ding_org_id if not UtilClient.is_unset(request.ding_suite_key): body['dingSuiteKey'] = request.ding_suite_key if not UtilClient.is_unset(request.ding_corp_id): body['dingCorpId'] = request.ding_corp_id if not UtilClient.is_unset(request.ding_token_grant_type): body['dingTokenGrantType'] = request.ding_token_grant_type if not UtilClient.is_unset(request.ding_client_id): body['dingClientId'] = request.ding_client_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, body=OpenApiUtilClient.parse_to_map(body) ) return TeaCore.from_map( dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse(), await self.do_roarequest_async('InvokeHtmlBundleBuild', 'miniapp_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/miniapp/h5Bundles/build', 'json', req, runtime) )
51.428263
176
0.701053
5,408
47,674
5.774593
0.033839
0.031061
0.093183
0.105607
0.97877
0.963175
0.950687
0.93522
0.920587
0.909988
0
0.009785
0.213282
47,674
926
177
51.483801
0.822855
0.001678
0
0.846241
1
0
0.075074
0.025641
0
0
0
0
0
1
0.023918
false
0
0.007973
0
0.078588
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
50549f8887c9349e2e751e40cb2f85fadfe677de
136
py
Python
roona/patches/v1/202108011040_update_customer_role.py
mohsinalimat/roona
b24336d9d56eb443a883131afffd9091c9a66add
[ "MIT" ]
1
2021-08-28T04:24:00.000Z
2021-08-28T04:24:00.000Z
roona/patches/v1/202108011040_update_customer_role.py
mohsinalimat/roona
b24336d9d56eb443a883131afffd9091c9a66add
[ "MIT" ]
null
null
null
roona/patches/v1/202108011040_update_customer_role.py
mohsinalimat/roona
b24336d9d56eb443a883131afffd9091c9a66add
[ "MIT" ]
null
null
null
from roona.utils.install import update_customer_access def execute(): # Update Customer Role and Permissions update_customer_access()
27.2
54
0.830882
18
136
6.055556
0.722222
0.385321
0.366972
0
0
0
0
0
0
0
0
0
0.110294
136
5
55
27.2
0.900826
0.264706
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
0
0
0
7
ac9d6f44eca4d98ca24c6dec63a9e757aa0991c7
10,350
py
Python
web_store_app/main/tests.py
ikolokotronis/Web-Store-App
366f17f42f920418a4acd7e9769d548aaee2b015
[ "MIT" ]
null
null
null
web_store_app/main/tests.py
ikolokotronis/Web-Store-App
366f17f42f920418a4acd7e9769d548aaee2b015
[ "MIT" ]
null
null
null
web_store_app/main/tests.py
ikolokotronis/Web-Store-App
366f17f42f920418a4acd7e9769d548aaee2b015
[ "MIT" ]
null
null
null
from django.test import TestCase, Client import pytest from main.models import ShoppingCart, Order, ProductOrder, Complaint, Newsletter @pytest.mark.django_db def test_home_page_get(): # homepage test 1 client = Client() response = client.get('/') assert response.status_code == 200 @pytest.mark.django_db def test_home_page_post(): # homepage test 2 client = Client() response = client.post('/', {'key_word': 'a'}) assert response.status_code == 200 for product in response.context['product_results']: assert 'a' in product.name @pytest.mark.django_db def test_category_page_get(client, example_category): # category page test 1 client = Client() response = client.get(f'/category/{example_category.id}/') assert response.status_code == 200 category = response.context['category'] assert category.name == 'Category 1' assert category.description == 'Category description 1' @pytest.mark.django_db def test_category_page_post(client, example_category): # category page test 2 client = Client() response = client.post(f'/category/{example_category.id}/', {'key_word': 'a'}) assert response.status_code == 200 for product in response.context['product_results']: assert 'a' in product.name @pytest.mark.django_db def test_subcategory_page_get(client, example_subcategory, example_category, example_category_subcategory_relation): # subcategory page test 1 client = Client() response = client.get(f'/subcategory/{example_subcategory.id}/') assert response.status_code == 200 subcategory = response.context['subcategory'] assert subcategory.name == 'Subcategory 1' assert subcategory.description == 'Subcategory description 1' @pytest.mark.django_db def test_subcategory_page_post(client, example_subcategory): # subcategory page test 2 client = Client() response = client.post(f'/subcategory/{example_subcategory.id}/', {'key_word': 'a'}) assert response.status_code == 200 for product in response.context['product_results']: assert 'a' in product.name @pytest.mark.django_db def test_shopping_cart_page_get(client, example_website_user, example_product, example_shopping_cart): # shopping cart test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get(f'/shopping_cart/{example_website_user.id}/') assert response.status_code == 200 assert response.context['products_summary'] == 100 for shopping_cart in response.context['shopping_cart_list']: assert shopping_cart.quantity == 1 @pytest.mark.django_db def test_shopping_cart_page_post(client, example_website_user, example_product, example_shopping_cart): # shopping cart test 2 client = Client() client.login(username='test_user', password='test_password') response = client.post(f'/shopping_cart/{example_website_user.id}/') assert response.status_code == 302 assert ShoppingCart.objects.filter(user=example_website_user).count() == 0 @pytest.mark.django_db def test_shopping_cart_product_remove_page_get(client, example_website_user, example_product, example_shopping_cart): # shopping cart product remove test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get(f'/shopping_cart/remove/{example_website_user.id}/{example_product.id}/') assert response.status_code == 302 for shopping_cart in ShoppingCart.objects.filter(user=example_website_user): assert example_product not in shopping_cart.product @pytest.mark.django_db def test_shopping_cart_checkout_page_get(client, example_website_user, example_product, example_shopping_cart): # shopping cart checkout test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get(f'/shopping_cart/{example_website_user.id}/checkout/') assert response.status_code == 200 assert response.context['products_summary'] == 100 for shopping_cart in response.context['shopping_cart_list']: assert shopping_cart.quantity == 1 @pytest.mark.django_db def test_shopping_cart_checkout_page_post(client, example_website_user, example_product, example_shopping_cart): # shopping cart checkout test 2 client = Client() client.login(username='test_user', password='test_password') response = client.post(f'/shopping_cart/{example_website_user.id}/checkout/', {'phone_number': 123456789, 'address': 'test_address', 'shipping_type': 'pickup_in_person'}) assert response.status_code == 302 assert ProductOrder.objects.filter(user=example_website_user).count() == 1 order = Order.objects.get(user=example_website_user) assert order.shipping_type == 1 assert order.address == 'test_address' assert order.phone_number == 123456789 @pytest.mark.django_db def test_shopping_cart_payment_page_get(client, example_product, example_website_user, example_shopping_cart, example_order): # shopping cart payment page test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get(f'/shopping_cart/{example_website_user.id}/{example_order.id}/payment/') assert response.status_code == 200 for shopping_cart in response.context['shopping_cart_list']: assert shopping_cart.quantity == 1 assert response.context['order'] == example_order assert Order.objects.get(user=example_website_user) @pytest.mark.django_db def test_shopping_cart_payment_page_post(client, example_product, example_website_user, example_shopping_cart, example_order): # shopping cart payment page test 2 client = Client() client.login(username='test_user', password='test_password') response = client.post(f'/shopping_cart/{example_website_user.id}/{example_order.id}/payment/', {'payment_type': 'cash'}) assert response.status_code == 302 order = Order.objects.get(user=example_website_user) assert order.payment_type == 1 assert order.user.id == example_website_user.id @pytest.mark.django_db def test_shopping_cart_summary_page_get(client, example_product, example_website_user, example_shopping_cart, example_order): # shopping cart summary page test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get(f'/shopping_cart/{example_website_user.id}/{example_order.id}/summary/') assert response.status_code == 200 assert response.context['products_summary'] == 100 for shopping_cart in response.context['shopping_cart_list']: assert shopping_cart.quantity == 1 assert response.context['order'] == example_order order = Order.objects.get(user_id=example_website_user.id) assert order.payment_type == 1 assert order.shipping_type == 1 assert order.amount_paid == 100 assert order.user.id == example_website_user.id @pytest.mark.django_db def test_shopping_cart_summary_page_post(client, example_product, example_website_user, example_shopping_cart, example_order): # shopping cart summary page test 2 client = Client() client.login(username='test_user', password='test_password') response = client.post(f'/shopping_cart/{example_website_user.id}/{example_order.id}/summary/') assert response.status_code == 302 order = Order.objects.get(user_id=example_website_user.id) assert order.amount_paid == 100 assert order.payment_type == 1 assert order.shipping_type == 1 assert order.user.id == example_website_user.id @pytest.mark.django_db def test_shopping_cart_success_page_get(client, example_product, example_website_user, example_shopping_cart, example_order): # shopping cart success page test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get(f'/shopping_cart/{example_website_user.id}/{example_order.id}/success/') assert response.status_code == 200 assert ShoppingCart.objects.filter(user=example_website_user).count() == 0 order = Order.objects.get(user_id=example_website_user.id) assert order.user.id == example_website_user.id @pytest.mark.django_db def test_newsletter_page_get(client, example_website_user): # newsletter page test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get('/newsletter/') assert response.status_code == 200 @pytest.mark.django_db def test_newsletter_page_post(client, example_website_user): # newsletter page test 2 client = Client() client.login(username='test_user', password='test_password') response = client.post('/newsletter/', {'email': 'test_email@gmail.com'}) assert response.status_code == 200 assert response.context['success_text'] == 'Email sent. Check your inbox for further details' assert Newsletter.objects.get(user_id=example_website_user.id) @pytest.mark.django_db def test_complaint_page_get(client, example_website_user): # complaint page test 1 client = Client() client.login(username='test_user', password='test_password') response = client.get('/complaint/') assert response.status_code == 200 @pytest.mark.django_db def test_complaint_page_post(client, example_website_user): # complaint page test 2 client = Client() client.login(username='test_user', password='test_password') response = client.post('/complaint/', {'subject': 'test_subject', 'content': 'test_content'}) assert response.status_code == 200 assert response.context['success_text'] == 'Complaint sent' complaint = Complaint.objects.get(user_id=example_website_user.id) assert complaint.subject == 'test_subject' assert complaint.content == 'test_content'
45.394737
145
0.713333
1,295
10,350
5.432432
0.069498
0.092111
0.102345
0.051173
0.861407
0.841933
0.806539
0.751955
0.711301
0.681166
0
0.015377
0.183188
10,350
227
146
45.594714
0.816773
0.050145
0
0.650538
0
0
0.167397
0.074523
0
0
0
0
0.322581
1
0.107527
false
0.075269
0.016129
0
0.123656
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7
aca5dc3e59a1989b051beec519994d8faad05ae6
210
py
Python
privacy_evaluator/attacks/__init__.py
mariesig/privacy-evaluator
4e6ced65cc71bb661aef4518192517e23e22595e
[ "MIT" ]
null
null
null
privacy_evaluator/attacks/__init__.py
mariesig/privacy-evaluator
4e6ced65cc71bb661aef4518192517e23e22595e
[ "MIT" ]
null
null
null
privacy_evaluator/attacks/__init__.py
mariesig/privacy-evaluator
4e6ced65cc71bb661aef4518192517e23e22595e
[ "MIT" ]
null
null
null
""" Module providing attacks. """ from privacy_evaluator.attacks import membership_inference from privacy_evaluator.attacks.attack import Attack from privacy_evaluator.attacks.sample_attack import SampleAttack
30
64
0.861905
25
210
7.04
0.48
0.1875
0.340909
0.460227
0
0
0
0
0
0
0
0
0.080952
210
6
65
35
0.911917
0.119048
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
acb1b1c59df8d30d769cc19c315b4309d28598e9
48,344
py
Python
read_function.py
Zha0rong/InDrop_toolkit
c5d7b4830076ba03ed74e0832439209a58d64f78
[ "MIT" ]
null
null
null
read_function.py
Zha0rong/InDrop_toolkit
c5d7b4830076ba03ed74e0832439209a58d64f78
[ "MIT" ]
null
null
null
read_function.py
Zha0rong/InDrop_toolkit
c5d7b4830076ba03ed74e0832439209a58d64f78
[ "MIT" ]
null
null
null
import os import csv import subprocess import sys from collections import defaultdict, OrderedDict from itertools import product, combinations import gzip def seq_neighborhood(seq, n_subs=1): """ Given a sequence, yield all sequences within n_subs substitutions of that sequence by looping through each combination of base pairs within each combination of positions. """ for positions in combinations(range(len(seq)), n_subs): # yields all unique combinations of indices for n_subs mutations for subs in product(*("ATGCN",) * n_subs): # yields all combinations of possible nucleotides for strings of length # n_subs seq_copy = list(seq) for p, s in zip(positions, subs): seq_copy[p] = s yield ''.join(seq_copy) def build_barcode_neighborhoods(barcodelist): """ Given a set of barcodes, produce sequences which can unambiguously be mapped to these barcodes, within 2 substitutions. If a sequence maps to multiple barcodes, get rid of it. However, if a sequences maps to a bc1 with 1change and another with 2changes, keep the 1change mapping. """ # contains all mutants that map uniquely to a barcode clean_mapping = dict() # contain single or double mutants mapping1 = defaultdict(set) mapping2 = defaultdict(set) # Build the full neighborhood and iterate through barcodes for line in barcodelist: barcode = line # each barcode obviously maps to itself uniquely clean_mapping[barcode] = barcode for n in seq_neighborhood(barcode, 1): mapping1[n].add(barcode) for n in seq_neighborhood(barcode, 2): mapping2[n].add(barcode) # take all single-mutants and find those that could only have come from one # specific barcode for k, v in mapping1.items(): if k not in clean_mapping: if len(v) == 1: clean_mapping[k] = list(v)[0] for k, v in mapping2.items(): if k not in clean_mapping: if len(v) == 1: clean_mapping[k] = list(v)[0] del mapping1 del mapping2 return clean_mapping def reverse_compliment(sequence): reference = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C', 'N': 'N'} reversecompliment = ''.join(reference[x] for x in sequence[::-1]) return reversecompliment def average_phred_score_calculation(string): qualityscore = 0 for i in range(len(string)): qualityscore += (ord(string[i]) - 33) return qualityscore / len(string) def hammingdistance(string, reference): answer = 0 if (len(string) == len(reference)): for i in range(len(string)): if string[i] != reference[i]: answer += 1 else: answer = -1 return answer class inDrop_Data_processing: pathtolibraryindex = '' pathtocellbarcode1 = '' pathtocellbarcode2umi = '' pathtorna = '' libraryindex = '' # Library index will be a dictionary with sample name as keys outputdir = '' cellbarcodewhitelist = [] file_location = {} # Record the location of every file in every sample: CB1, CB2, Read unfiltered_file_location = {} mutli_Lane = False def __init__(self, pathtolibraryindex, pathtocellbarcode1, pathtocellbarcode2umi, pathtorna, libraryindex, outputdir): try: if type(libraryindex) is dict: self.pathtolibraryindex = pathtolibraryindex self.pathtocellbarcode1 = pathtocellbarcode1 self.pathtocellbarcode2umi = pathtocellbarcode2umi self.pathtorna = pathtorna self.libraryindex = libraryindex self.outputdir = outputdir with open('whitelist/cellbarcode.txt') as f: for line in f: self.cellbarcodewhitelist.append(line.rstrip()) f.close() # Check for the correct direction of library index. for sample in list(self.libraryindex.keys()): self.file_location[sample] = [ '%s/%s_read.fastq' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), '%s/%s_barcode1.fastq' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), '%s/%s_barcode2.fastq' % (self.outputdir, sample + '_' + str(self.libraryindex[sample]))] self.unfiltered_file_location[sample] = { 'RNA': '%s/%s_read.fastq.gz' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), 'CB1': '%s/%s_barcode1.fastq.gz' % ( self.outputdir, sample + '_' + str(self.libraryindex[sample])), 'CB2': '%s/%s_barcode2.fastq.gz' % ( self.outputdir, sample + '_' + str(self.libraryindex[sample]))} if type(pathtolibraryindex) is list: self.mutli_Lane = True else: sys.exit('The library index needs to be a dictionary.') except Exception as e: print(str(e)) def polyATrimmer(self, seq, qual,min_length, number_of_polyA_allowed=5): polyA_length = 0 seq = seq qual = qual keep_read = True for base in seq[::-1]: if base != 'A': break polyA_length += 1 Trim_position = len(seq) - max(polyA_length - number_of_polyA_allowed, 0) if Trim_position < min_length: keep_read = False else: seq = seq[:Trim_position] qual = qual[:qual] return [seq, qual, keep_read] def _write_fastq(self, ID, file_index, file, seq, quality_score): if file_index == 'R1': file.write('%s\n' % ID) file.write('%s\n' % seq) file.write('+\n') file.write('%s\n' % quality_score) else: file.write('%s\n' % ID) file.write('%s\n' % seq) file.write('+\n') file.write('%s\n' % quality_score) def _ParseFastq(self, pathstofastqs): if pathstofastqs[0].endswith('.gz'): processes = [subprocess.Popen(['zcat', (fastq)], stdout=subprocess.PIPE) for fastq in pathstofastqs] totalreads = [r.stdout for r in processes] elif pathstofastqs[0].endswith('.bz2'): processes = [subprocess.Popen(['bzcat', (fastq)], stdout=subprocess.PIPE) for fastq in pathstofastqs] totalreads = [r.stdout for r in processes] elif pathstofastqs[0].endswith('.fastq'): processes = [subprocess.Popen(['cat', (fastq)], stdout=subprocess.PIPE) for fastq in pathstofastqs] totalreads = [r.stdout for r in processes] else: sys.exit('The format of the file %s is not recognized.' % (str(pathstofastqs))) while True: names = [next(read).decode().split(' ')[0] for read in totalreads] Sequence = [next(read).decode() for read in totalreads] Blank = [next(read).decode() for read in totalreads] qualityscore = [next(read).decode() for read in totalreads] assert all(name == names[0] for name in names) if names: yield [names[0], Sequence, qualityscore] else: break for read in totalreads: read.close() def Demultiplex(self, strict=True): Total_Read = 0 Invalid_Library_Index = 0 Read_statistics = {} # Parse fastq files into a dictionary readfile = {} for sample in self.libraryindex.keys(): readfile[sample] = [ gzip.open('%s/%s_read.fastq.gz' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), 'wt'), gzip.open('%s/%s_barcode1.fastq.gz' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), 'wt'), gzip.open('%s/%s_barcode2.fastq.gz' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), 'wt')] # Read, CB1, CB2 Read_statistics[sample] = 0 dictionary_for_fast_index_sample_search = {} for sample in self.libraryindex.keys(): dictionary_for_fast_index_sample_search[self.libraryindex[sample]] = sample if self.mutli_Lane is True: for i in range(len(self.pathtolibraryindex)): for read in self._ParseFastq( [self.pathtolibraryindex[i], self.pathtocellbarcode1[i], self.pathtocellbarcode2umi[i], self.pathtorna[i]]): name = read[0].strip('\n') librarybarcode = read[1][0].strip('\n') CB1read = read[1][1].strip('\n') CB2read = read[1][2].strip('\n') rnaread = read[1][3].strip('\n') CB1_qual = read[2][1].strip('\n') CB2_qual = read[2][2].strip('\n') rnaread_qual = read[2][3].strip('\n') informative_name = '%s %s:%s:%s' % (name, CB1read, CB2read[0:8], CB2read[8:]) if str(librarybarcode) in list(dictionary_for_fast_index_sample_search.keys()): Total_Read += 1 sample = dictionary_for_fast_index_sample_search[str(librarybarcode)] Read_statistics[sample] += 1 self._write_fastq(informative_name, 'R1', readfile[sample][1], CB1read, CB1_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][2], CB2read, CB2_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][0], rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if strict is False: if min([hammingdistance(librarybarcode, libraryindex) for libraryindex in list(dictionary_for_fast_index_sample_search.keys())]) == 1: correct_barcode = \ [libraryindex for libraryindex in list(dictionary_for_fast_index_sample_search.keys()) if hammingdistance(librarybarcode, libraryindex) == 1][0] sample = dictionary_for_fast_index_sample_search[str(correct_barcode)] Total_Read += 1 Read_statistics[sample] += 1 self._write_fastq(informative_name, 'R1', readfile[sample][1], CB1read, CB1_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][2], CB2read, CB2_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][0], rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: Total_Read += 1 Invalid_Library_Index += 1 else: Total_Read += 1 Invalid_Library_Index += 1 else: for read in self._ParseFastq( [self.pathtolibraryindex, self.pathtocellbarcode1, self.pathtocellbarcode2umi, self.pathtorna]): name = read[0].strip('\n') librarybarcode = read[1][0].strip('\n') CB1read = read[1][1].strip('\n') CB2read = read[1][2].strip('\n') rnaread = read[1][3].strip('\n') CB1_qual = read[2][1].strip('\n') CB2_qual = read[2][2].strip('\n') rnaread_qual = read[2][3].strip('\n') informative_name = '%s %s:%s:%s' % (name, CB1read, CB2read[0:8], CB2read[8:]) if str(librarybarcode) in list(dictionary_for_fast_index_sample_search.keys()): Total_Read += 1 sample = dictionary_for_fast_index_sample_search[str(librarybarcode)] Read_statistics[sample] += 1 self._write_fastq(informative_name, 'R1', readfile[sample][1], CB1read, CB1_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][2], CB2read, CB2_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][0], rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if strict is False: if min([hammingdistance(librarybarcode, libraryindex) for libraryindex in list(dictionary_for_fast_index_sample_search.keys())]) == 1: correct_barcode = \ [libraryindex for libraryindex in list(dictionary_for_fast_index_sample_search.keys()) if hammingdistance(librarybarcode, libraryindex) == 1][0] sample = dictionary_for_fast_index_sample_search[str(correct_barcode)] Total_Read += 1 Read_statistics[sample] += 1 self._write_fastq(informative_name, 'R1', readfile[sample][1], CB1read, CB1_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][2], CB2read, CB2_qual) # ID,file_index,file,seq,quality_score self._write_fastq(informative_name, 'R1', readfile[sample][0], rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: Total_Read += 1 Invalid_Library_Index += 1 else: Total_Read += 1 Invalid_Library_Index += 1 for sample in readfile: for file in readfile[sample]: file.close() with open('%s/Read_statistics_for_demuliplexing.tsv' % (self.outputdir), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Category', 'Read Number', 'Percentage']) writer.writerow(['Total number of Reads', Total_Read, Total_Read / Total_Read]) for sample in Read_statistics.keys(): writer.writerow([sample, Read_statistics[sample], Read_statistics[sample] / Total_Read]) writer.writerow( ['Reads not associated with any sample', Invalid_Library_Index, Invalid_Library_Index / Total_Read]) csvfile.close() def correct_and_filter_kallisto(self): Barcode_correction_dict = build_barcode_neighborhoods(barcodelist=self.cellbarcodewhitelist) for sample in self.libraryindex.keys(): filtering_output_directory = '%s/%s_kallisto' % (self.outputdir, sample) try: os.mkdir(filtering_output_directory) except FileExistsError: # directory already exists pass filtering_statistics = { 'Total_read': 0, 'Valid_read': 0, 'Invalid_CB1': 0, 'Invalid_CB2': 0, 'Invalid_Both_CB': 0 } Cell_statistics = {} # Structure: Cell_barcode:[[UMI_list],number of unique umis per cell, number of reads per cell] CB1 = gzip.open('%s/%s_filtered_CB1.fastq.gz' % (filtering_output_directory, sample), 'wt') CB2 = gzip.open('%s/%s_filtered_CB2.fastq.gz' % (filtering_output_directory, sample), 'wt') RNA_read = gzip.open('%s/%s_filtered_Reads.fastq.gz' % (filtering_output_directory, sample), 'wt') for read in self._ParseFastq( [self.unfiltered_file_location[sample]['CB1'], self.unfiltered_file_location[sample]['CB2'], self.unfiltered_file_location[sample]['RNA']]): name = read[0].strip('\n') CB1read = read[1][0].strip('\n') CB2read = read[1][1].strip('\n') rnaread = read[1][2].strip('\n') CB1_qual = read[2][0].strip('\n') CB2_qual = read[2][1].strip('\n') rnaread_qual = read[2][2].strip('\n') filtering_statistics['Total_read'] += 1 umi = CB2read[8:] if CB1read in Barcode_correction_dict and reverse_compliment(CB2read[0:8]) in Barcode_correction_dict: writeCB1 = Barcode_correction_dict[CB1read] writeCB2 = reverse_compliment(Barcode_correction_dict[reverse_compliment(CB2read[0:8])]) writename = '' if name.startswith('@'): writename = '%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) else: writename = '@%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) truecellname = writeCB1 + writeCB2 if truecellname in Cell_statistics: if umi not in Cell_statistics[truecellname][0]: Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname] = [[], 0, 0] Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 filtering_statistics['Valid_read'] += 1 self._write_fastq(writename, 'R1', CB1, writeCB1, CB1_qual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', CB2, writeCB2 + umi, CB2_qual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', RNA_read, rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if CB1read not in Barcode_correction_dict and reverse_compliment( CB2read[0:8]) not in Barcode_correction_dict: filtering_statistics['Invalid_Both_CB'] += 1 else: if CB1read not in Barcode_correction_dict: filtering_statistics['Invalid_CB1'] += 1 else: filtering_statistics['Invalid_CB2'] += 1 CB1.close() CB2.close() RNA_read.close() # os.system('gzip %s'%('%s/%s_filtered_CB1.fastq'%(filtering_output_directory,sample))) # os.system('gzip %s'%('%s/%s_filtered_CB2.fastq'%(filtering_output_directory,sample))) # os.system('gzip %s'%('%s/%s_filtered_Reads.fastq'%(filtering_output_directory,sample))) for cell in Cell_statistics: Cell_statistics[cell][0] = 0 with open('%s/%s_filtering_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Category', 'Read Number', 'Percentage']) writer.writerow(['Total_read', filtering_statistics['Total_read'], filtering_statistics['Total_read'] / filtering_statistics['Total_read']]) writer.writerow(['Valid_read', filtering_statistics['Valid_read'], filtering_statistics['Valid_read'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB1', filtering_statistics['Invalid_CB1'], filtering_statistics['Invalid_CB1'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB2', filtering_statistics['Invalid_CB2'], filtering_statistics['Invalid_CB2'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_Both_CB', filtering_statistics['Invalid_Both_CB'], filtering_statistics['Invalid_Both_CB'] / filtering_statistics['Total_read']]) csvfile.close() with open('%s/%s_Cell_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Cellname', 'Number of unique UMI', 'Number of reads']) for cell in Cell_statistics.keys(): writer.writerow([cell, Cell_statistics[cell][1], Cell_statistics[cell][2]]) csvfile.close() def Demultiplex_and_correct_filter(self, strict=False): Total_Read = 0 Invalid_Library_Index = 0 Read_statistics = {} # Parse fastq files into a dictionary readfile = {} for sample in self.libraryindex.keys(): readfile[sample] = [ gzip.open('%s/%s_read.fastq.gz' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), 'wt'), gzip.open('%s/%s_barcode.fastq.gz' % (self.outputdir, sample + '_' + str(self.libraryindex[sample])), 'wt')] # Create only two fastq: one for RNA read and one for CellBarcode+UMI Read_statistics[sample] = 0 dictionary_for_fast_index_sample_search = {} for sample in self.libraryindex.keys(): dictionary_for_fast_index_sample_search[self.libraryindex[sample]] = sample def correct_and_filter_solo(self): Barcode_correction_dict = build_barcode_neighborhoods(barcodelist=self.cellbarcodewhitelist) for sample in self.libraryindex.keys(): filtering_output_directory = '%s/%s_solo' % (self.outputdir, sample) try: os.mkdir(filtering_output_directory) except FileExistsError: # directory already exists pass filtering_statistics = { 'Total_read': 0, 'Valid_read': 0, 'Invalid_CB1': 0, 'Invalid_CB2': 0, 'Invalid_Both_CB': 0 } Cell_statistics = {} # Structure: Cell_barcode:[[UMI_list],number of unique umis per cell, number of reads per cell] CB = gzip.open('%s/%s_STAR_CB.fastq.gz' % (filtering_output_directory, sample), 'wt') RNA_read = gzip.open('%s/%s_STAR_Reads.fastq.gz' % (filtering_output_directory, sample), 'wt') for read in self._ParseFastq( [self.unfiltered_file_location[sample]['CB1'], self.unfiltered_file_location[sample]['CB2'], self.unfiltered_file_location[sample]['RNA']]): name = read[0].strip('\n') CB1read = read[1][0].strip('\n') CB2read = read[1][1].strip('\n') rnaread = read[1][2].strip('\n') CB1_qual = read[2][0].strip('\n') CB2_qual = read[2][1].strip('\n') rnaread_qual = read[2][2].strip('\n') filtering_statistics['Total_read'] += 1 umi = CB2read[8:] if CB1read in Barcode_correction_dict and reverse_compliment(CB2read[0:8]) in Barcode_correction_dict: writeCB1 = Barcode_correction_dict[CB1read] writeCB2 = reverse_compliment(Barcode_correction_dict[reverse_compliment(CB2read[0:8])]) writename = '' if name.startswith('@'): writename = '%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) else: writename = '@%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) truecellname = writeCB1 + writeCB2 writeCB = writeCB1 + writeCB2 + umi writeQual = CB1_qual + CB2_qual if truecellname in Cell_statistics: if umi not in Cell_statistics[truecellname][0]: Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname] = [[], 0, 0] Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 filtering_statistics['Valid_read'] += 1 self._write_fastq(writename, 'R1', CB, writeCB, writeQual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', RNA_read, rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if CB1read not in Barcode_correction_dict and reverse_compliment( CB2read[0:8]) not in Barcode_correction_dict: filtering_statistics['Invalid_Both_CB'] += 1 else: if CB1read not in Barcode_correction_dict: filtering_statistics['Invalid_CB1'] += 1 else: filtering_statistics['Invalid_CB2'] += 1 CB.close() RNA_read.close() # os.system('gzip %s'%('%s/%s_STAR_CB.fastq'%(filtering_output_directory,sample))) # os.system('gzip %s'%('%s/%s_STAR_Reads.fastq'%(filtering_output_directory,sample))) for cell in Cell_statistics: Cell_statistics[cell][0] = 0 with open('%s/%s_filtering_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Category', 'Read Number', 'Percentage']) writer.writerow(['Total_read', filtering_statistics['Total_read'], filtering_statistics['Total_read'] / filtering_statistics['Total_read']]) writer.writerow(['Valid_read', filtering_statistics['Valid_read'], filtering_statistics['Valid_read'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB1', filtering_statistics['Invalid_CB1'], filtering_statistics['Invalid_CB1'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB2', filtering_statistics['Invalid_CB2'], filtering_statistics['Invalid_CB2'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_Both_CB', filtering_statistics['Invalid_Both_CB'], filtering_statistics['Invalid_Both_CB'] / filtering_statistics['Total_read']]) csvfile.close() with open('%s/%s_Cell_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Cellname', 'Number of unique UMI', 'Number of reads']) for cell in Cell_statistics.keys(): writer.writerow([cell, Cell_statistics[cell][1], Cell_statistics[cell][2]]) csvfile.close() class inDrop_Individual_Sample_processing(inDrop_Data_processing): GEO = True def __init__(self, pathtolibraryindex, pathtocellbarcode1, pathtocellbarcode2umi, pathtorna, libraryindex, outputdir, GEO=True): try: super().__init__(pathtolibraryindex=pathtolibraryindex, pathtocellbarcode1=pathtocellbarcode1, pathtocellbarcode2umi=pathtocellbarcode2umi, pathtorna=pathtorna, libraryindex=libraryindex, outputdir=outputdir) self.GEO = GEO except Exception as e: print(str(e)) def _ParseGEOFastq(self, pathstofastqs): if pathstofastqs[0].endswith('.gz'): processes = [subprocess.Popen(['zcat', (fastq)], stdout=subprocess.PIPE) for fastq in pathstofastqs] totalreads = [r.stdout for r in processes] elif pathstofastqs[0].endswith('.bz2'): processes = [subprocess.Popen(['bzcat', (fastq)], stdout=subprocess.PIPE) for fastq in pathstofastqs] totalreads = [r.stdout for r in processes] elif pathstofastqs[0].endswith('.fastq'): processes = [subprocess.Popen(['cat', (fastq)], stdout=subprocess.PIPE) for fastq in pathstofastqs] totalreads = [r.stdout for r in processes] else: sys.exit('The format of the file %s is not recognized.' % (str(pathstofastqs))) while True: names = [next(read).decode().split(' ')[1] for read in totalreads] Sequence = [next(read).decode() for read in totalreads] Blank = [next(read).decode() for read in totalreads] qualityscore = [next(read).decode() for read in totalreads] assert all(name == names[0] for name in names) if names: yield [names[0], Sequence, qualityscore] else: break for read in totalreads: read.close() def Individual_sample_filter_kallisto(self): Barcode_correction_dict = build_barcode_neighborhoods(barcodelist=self.cellbarcodewhitelist) filtering_output_directory = '%s/%s_kallisto' % (self.outputdir, str(list(self.libraryindex.keys())[0])) try: os.mkdir(filtering_output_directory) except: print('Nah, not a problem.') filtering_statistics = { 'Total_read': 0, 'Valid_read': 0, 'Invalid_CB1': 0, 'Invalid_CB2': 0, 'Invalid_Both_CB': 0} sample = str(list(self.libraryindex.keys())[0]) Cell_statistics = {} # Structure: Cell_barcode:[[UMI_list],number of unique umis per cell, number of reads per cell] CB1 = gzip.open('%s/%s_filtered_CB1.fastq.gz' % (filtering_output_directory, sample), 'wt') CB2 = gzip.open('%s/%s_filtered_CB2.fastq.gz' % (filtering_output_directory, sample), 'wt') RNA_read = gzip.open('%s/%s_filtered_Reads.fastq.gz' % (filtering_output_directory, sample), 'wt') if self.GEO is True: for read in self._ParseGEOFastq([self.pathtocellbarcode1, self.pathtocellbarcode2umi, self.pathtorna]): name = read[0].strip('\n') CB1read = read[1][0].strip('\n') CB2read = read[1][1].strip('\n') rnaread = read[1][2].strip('\n') CB1_qual = read[2][0].strip('\n') CB2_qual = read[2][1].strip('\n') rnaread_qual = read[2][2].strip('\n') filtering_statistics['Total_read'] += 1 umi = CB2read[8:] if CB1read in Barcode_correction_dict and reverse_compliment(CB2read[0:8]) in Barcode_correction_dict: writeCB1 = Barcode_correction_dict[CB1read] writeCB2 = reverse_compliment(Barcode_correction_dict[reverse_compliment(CB2read[0:8])]) writename = '' if name.startswith('@'): writename = '%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) else: writename = '@%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) truecellname = writeCB1 + writeCB2 if truecellname in Cell_statistics: if umi not in Cell_statistics[truecellname][0]: Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname] = [[], 0, 0] Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 filtering_statistics['Valid_read'] += 1 self._write_fastq(writename, 'R1', CB1, writeCB1, CB1_qual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', CB2, writeCB2 + umi, CB2_qual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', RNA_read, rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if CB1read not in Barcode_correction_dict and reverse_compliment( CB2read[0:8]) not in Barcode_correction_dict: filtering_statistics['Invalid_Both_CB'] += 1 else: if CB1read not in Barcode_correction_dict: filtering_statistics['Invalid_CB1'] += 1 else: filtering_statistics['Invalid_CB2'] += 1 CB1.close() CB2.close() RNA_read.close() else: for read in self._ParseFastq([self.pathtocellbarcode1, self.pathtocellbarcode2umi, self.pathtorna]): name = read[0].strip('\n') CB1read = read[1][0].strip('\n') CB2read = read[1][1].strip('\n') rnaread = read[1][2].strip('\n') CB1_qual = read[2][0].strip('\n') CB2_qual = read[2][1].strip('\n') rnaread_qual = read[2][2].strip('\n') filtering_statistics['Total_read'] += 1 umi = CB2read[8:] if CB1read in Barcode_correction_dict and reverse_compliment(CB2read[0:8]) in Barcode_correction_dict: writeCB1 = Barcode_correction_dict[CB1read] writeCB2 = reverse_compliment(Barcode_correction_dict[reverse_compliment(CB2read[0:8])]) writename = '' if name.startswith('@'): writename = '%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) else: writename = '@%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) truecellname = writeCB1 + writeCB2 if truecellname in Cell_statistics: if umi not in Cell_statistics[truecellname][0]: Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname] = [[], 0, 0] Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 filtering_statistics['Valid_read'] += 1 self._write_fastq(writename, 'R1', CB1, writeCB1, CB1_qual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', CB2, writeCB2 + umi, CB2_qual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', RNA_read, rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if CB1read not in Barcode_correction_dict and reverse_compliment( CB2read[0:8]) not in Barcode_correction_dict: filtering_statistics['Invalid_Both_CB'] += 1 else: if CB1read not in Barcode_correction_dict: filtering_statistics['Invalid_CB1'] += 1 else: filtering_statistics['Invalid_CB2'] += 1 CB1.close() CB2.close() RNA_read.close() for cell in Cell_statistics: Cell_statistics[cell][0] = 0 with open('%s/%s_filtering_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Category', 'Read Number', 'Percentage']) writer.writerow(['Total_read', filtering_statistics['Total_read'], filtering_statistics['Total_read'] / filtering_statistics['Total_read']]) writer.writerow(['Valid_read', filtering_statistics['Valid_read'], filtering_statistics['Valid_read'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB1', filtering_statistics['Invalid_CB1'], filtering_statistics['Invalid_CB1'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB2', filtering_statistics['Invalid_CB2'], filtering_statistics['Invalid_CB2'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_Both_CB', filtering_statistics['Invalid_Both_CB'], filtering_statistics['Invalid_Both_CB'] / filtering_statistics['Total_read']]) csvfile.close() with open('%s/%s_Cell_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Cellname', 'Number of unique UMI', 'Number of reads']) for cell in Cell_statistics.keys(): writer.writerow([cell, Cell_statistics[cell][1], Cell_statistics[cell][2]]) csvfile.close() def Individual_sample_filter_solo(self): Barcode_correction_dict = build_barcode_neighborhoods(barcodelist=self.cellbarcodewhitelist) filtering_output_directory = '%s/%s_solo' % (self.outputdir, str(list(self.libraryindex.keys())[0])) try: os.mkdir(filtering_output_directory) except: print('Nah, not a problem.') filtering_statistics = { 'Total_read': 0, 'Valid_read': 0, 'Invalid_CB1': 0, 'Invalid_CB2': 0, 'Invalid_Both_CB': 0} sample = str(list(self.libraryindex.keys())[0]) Cell_statistics = {} # Structure: Cell_barcode:[[UMI_list],number of unique umis per cell, number of reads per cell] CB = gzip.open('%s/%s_filtered_CB.fastq.gz' % (filtering_output_directory, sample), 'wt') RNA_read = gzip.open('%s/%s_filtered_Reads.fastq.gz' % (filtering_output_directory, sample), 'wt') if self.GEO is True: for read in self._ParseGEOFastq([self.pathtocellbarcode1, self.pathtocellbarcode2umi, self.pathtorna]): name = read[0].strip('\n') CB1read = read[1][0].strip('\n') CB2read = read[1][1].strip('\n') rnaread = read[1][2].strip('\n') CB1_qual = read[2][0].strip('\n') CB2_qual = read[2][1].strip('\n') rnaread_qual = read[2][2].strip('\n') filtering_statistics['Total_read'] += 1 umi = CB2read[8:] if CB1read in Barcode_correction_dict and reverse_compliment(CB2read[0:8]) in Barcode_correction_dict: writeCB1 = Barcode_correction_dict[CB1read] writeCB2 = reverse_compliment(Barcode_correction_dict[reverse_compliment(CB2read[0:8])]) writeCB = writeCB1 + writeCB2 + umi writeCBqual = CB1_qual + CB2_qual writename = '' if name.startswith('@'): writename = '%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) else: writename = '@%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) truecellname = writeCB1 + writeCB2 if truecellname in Cell_statistics: if umi not in Cell_statistics[truecellname][0]: Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname] = [[], 0, 0] Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 filtering_statistics['Valid_read'] += 1 self._write_fastq(writename, 'R1', CB, writeCB, writeCBqual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', RNA_read, rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if CB1read not in Barcode_correction_dict and reverse_compliment( CB2read[0:8]) not in Barcode_correction_dict: filtering_statistics['Invalid_Both_CB'] += 1 else: if CB1read not in Barcode_correction_dict: filtering_statistics['Invalid_CB1'] += 1 else: filtering_statistics['Invalid_CB2'] += 1 CB.close() RNA_read.close() else: for read in self._ParseFastq([self.pathtocellbarcode1, self.pathtocellbarcode2umi, self.pathtorna]): name = read[0].strip('\n') CB1read = read[1][0].strip('\n') CB2read = read[1][1].strip('\n') rnaread = read[1][2].strip('\n') CB1_qual = read[2][0].strip('\n') CB2_qual = read[2][1].strip('\n') rnaread_qual = read[2][2].strip('\n') filtering_statistics['Total_read'] += 1 umi = CB2read[8:] if CB1read in Barcode_correction_dict and reverse_compliment(CB2read[0:8]) in Barcode_correction_dict: writeCB1 = Barcode_correction_dict[CB1read] writeCB2 = reverse_compliment(Barcode_correction_dict[reverse_compliment(CB2read[0:8])]) writeCB = writeCB1 + writeCB2 + umi writeCBqual = CB1_qual + CB2_qual writename = '' if name.startswith('@'): writename = '%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) else: writename = '@%s %s:%s:%s' % (name.split(' ')[0], writeCB1, writeCB2, umi) truecellname = writeCB1 + writeCB2 if truecellname in Cell_statistics: if umi not in Cell_statistics[truecellname][0]: Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname][2] += 1 else: Cell_statistics[truecellname] = [[], 0, 0] Cell_statistics[truecellname][0].append(umi) Cell_statistics[truecellname][1] += 1 Cell_statistics[truecellname][2] += 1 filtering_statistics['Valid_read'] += 1 self._write_fastq(writename, 'R1', CB, writeCB, writeCBqual) # ID,file_index,file,seq,quality_score self._write_fastq(writename, 'R1', RNA_read, rnaread, rnaread_qual) # ID,file_index,file,seq,quality_score else: if CB1read not in Barcode_correction_dict and reverse_compliment( CB2read[0:8]) not in Barcode_correction_dict: filtering_statistics['Invalid_Both_CB'] += 1 else: if CB1read not in Barcode_correction_dict: filtering_statistics['Invalid_CB1'] += 1 else: filtering_statistics['Invalid_CB2'] += 1 CB.close() RNA_read.close() for cell in Cell_statistics: Cell_statistics[cell][0] = 0 with open('%s/%s_filtering_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Category', 'Read Number', 'Percentage']) writer.writerow(['Total_read', filtering_statistics['Total_read'], filtering_statistics['Total_read'] / filtering_statistics['Total_read']]) writer.writerow(['Valid_read', filtering_statistics['Valid_read'], filtering_statistics['Valid_read'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB1', filtering_statistics['Invalid_CB1'], filtering_statistics['Invalid_CB1'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_CB2', filtering_statistics['Invalid_CB2'], filtering_statistics['Invalid_CB2'] / filtering_statistics['Total_read']]) writer.writerow(['Invalid_Both_CB', filtering_statistics['Invalid_Both_CB'], filtering_statistics['Invalid_Both_CB'] / filtering_statistics['Total_read']]) csvfile.close() with open('%s/%s_Cell_statistics.tsv' % (filtering_output_directory, sample), "w", newline="") as csvfile: writer = csv.writer(csvfile, delimiter='\t') writer.writerow(['Cellname', 'Number of unique UMI', 'Number of reads']) for cell in Cell_statistics.keys(): writer.writerow([cell, Cell_statistics[cell][1], Cell_statistics[cell][2]]) csvfile.close()
57.279621
129
0.54317
4,904
48,344
5.146411
0.063418
0.073778
0.05563
0.042159
0.859181
0.851256
0.848284
0.840122
0.834852
0.826928
0
0.02293
0.346868
48,344
843
130
57.347568
0.776374
0.063131
0
0.807692
0
0
0.074533
0.014761
0
0
0
0
0.002564
1
0.021795
false
0.002564
0.008974
0
0.053846
0.005128
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
4a1c7af62ab2de76de458dfb6bd82c63c27e55b1
1,844
py
Python
regexlib/python_re_test_file/regexlib_2766.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/python_re_test_file/regexlib_2766.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/python_re_test_file/regexlib_2766.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
# 2766 # (?:@[A-Z]\w*\s+)*(?:(?:public|private|protected)\s+)?(?:(?:(?:abstract|final|native|transient|static|synchronized)\s+)*(?:<(?:\?|[A-Z]\w*)(?:\s+(?:extends|super)\s+[A-Z]\w*)?(?:(?:,\s*(?:\?|[A-Z]\w*))(?:\s+(?:extends|super)\s+[A-Z]\w*)?)*>\s+)?(?:(?:(?:[A-Z]\w*(?:<[A-Z]\w*>)?|int|float|double|char|byte|long|short|boolean)(?:(?:\[\]))*)|void)+)\s+(([a-zA-Z]\w*)\s*\(\s*(((?:[A-Z]\w*(?:<(?:\?|[A-Z]\w*)(?:\s+(?:extends|super)\s+[A-Z]\w*)?(?:(?:,\s*(?:\?|[A-Z]\w*))(?:\s+(?:extends|super)\s+[A-Z]\w*)?)*>)?|int|float|double|char|boolean|byte|long|short)(?:(?:\[\])|\.\.\.)?\s+[a-z]\w*)(?:,\s*((?:[A-Z]\w*(?:<[A-Z]\w*>)?|int|float|double|char|byte|long|short|boolean)(?:(?:\[\])|\.\.\.)?\s+[a-z]\w*))*)?\s*\)) # EXPONENT # nums:4 # EXPONENT AttackString:""+"A"*32+"! _1_EOA(iii)" import re from time import perf_counter regex = """(?:@[A-Z]\w*\s+)*(?:(?:public|private|protected)\s+)?(?:(?:(?:abstract|final|native|transient|static|synchronized)\s+)*(?:<(?:\?|[A-Z]\w*)(?:\s+(?:extends|super)\s+[A-Z]\w*)?(?:(?:,\s*(?:\?|[A-Z]\w*))(?:\s+(?:extends|super)\s+[A-Z]\w*)?)*>\s+)?(?:(?:(?:[A-Z]\w*(?:<[A-Z]\w*>)?|int|float|double|char|byte|long|short|boolean)(?:(?:\[\]))*)|void)+)\s+(([a-zA-Z]\w*)\s*\(\s*(((?:[A-Z]\w*(?:<(?:\?|[A-Z]\w*)(?:\s+(?:extends|super)\s+[A-Z]\w*)?(?:(?:,\s*(?:\?|[A-Z]\w*))(?:\s+(?:extends|super)\s+[A-Z]\w*)?)*>)?|int|float|double|char|boolean|byte|long|short)(?:(?:\[\])|\.\.\.)?\s+[a-z]\w*)(?:,\s*((?:[A-Z]\w*(?:<[A-Z]\w*>)?|int|float|double|char|byte|long|short|boolean)(?:(?:\[\])|\.\.\.)?\s+[a-z]\w*))*)?\s*\))""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "" + "A" * i * 1 + "! _1_EOA(iii)" LEN = len(ATTACK) BEGIN = perf_counter() m = REGEX.search(ATTACK) # m = REGEX.match(ATTACK) DURATION = perf_counter() - BEGIN print(f"{i *1}: took {DURATION} seconds!")
97.052632
721
0.474512
291
1,844
2.982818
0.202749
0.078341
0.110599
0.110599
0.709677
0.709677
0.709677
0.709677
0.709677
0.709677
0
0.01028
0.050434
1,844
19
722
97.052632
0.485437
0.433839
0
0
0
0.090909
0.725434
0.681118
0
0
0
0
0
1
0
false
0
0.181818
0
0.181818
0.090909
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
c5807a97678d273c61a26282224517f97e4b3451
30,617
py
Python
ibis/utilities/tests/test_it_table_generation.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
50
2018-09-27T13:03:45.000Z
2021-04-06T15:36:59.000Z
ibis/utilities/tests/test_it_table_generation.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
null
null
null
ibis/utilities/tests/test_it_table_generation.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
14
2018-10-03T20:36:15.000Z
2021-05-18T07:08:57.000Z
"""IT table generation tests.""" import unittest import os from mock import patch, MagicMock from ibis.utilities.it_table_generation import SourceTable, OracleTable, \ DB2Table, TeradataTable, SqlServerTable, MySQLTable, create, \ get_auto_values, get_src_obj, parallel_sqoop_output, Get_Auto_Split from ibis.model.table import ItTable from ibis.utilities.config_manager import ConfigManager from ibis.settings import UNIT_TEST_ENV from ibis.inventory.it_inventory import ITInventory BASE_DIR = os.path.dirname(os.path.abspath(__file__)) class SourceTableTest(unittest.TestCase): """Test SourceTable methods.""" def setUp(self): """Setup.""" self.it_table = { 'source_database_name': 'fake_database', 'source_table_name': 'fake_cen_tablename', 'db_username': 'fake_username', 'password_file': 'test-passwd', 'connection_factories': 'test-conn-factory', 'jdbcurl': 'oracle:jdbcurl', 'mappers': '5' } self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) self.it_table_obj = ItTable(self.it_table, self.cfg_mgr) self.src_obj = SourceTable(self.cfg_mgr, self.it_table_obj) def tearDown(self): """Tear down.""" self.src_obj._close_logs() def test_find_load(self): """Test load.""" self.assertEquals(self.src_obj.find_load(1000000), '100') self.assertEquals(self.src_obj.find_load(10000000), '010') self.assertEquals(self.src_obj.find_load(100000002), '001') def test_find_mappers(self): """Test mappers.""" self.assertEquals(self.src_obj.find_mappers(250001), '5') self.assertEquals(self.src_obj.find_mappers(249999), '1') self.assertEquals(self.src_obj.find_mappers(250001, '010'), '5') self.assertEquals(self.src_obj.find_mappers(249999, '100'), '1') def test_build_group_by_count_query(self): """Test group by query string.""" result = self.src_obj.build_group_by_count_query('test_column') expected = ("SELECT COUNT(test_column) FROM " "FAKE_DATABASE.FAKE_CEN_TABLENAME GROUP BY test_column") self.assertEquals(result, expected) @patch.object(SourceTable, 'find_mappers', autospec=True) @patch.object(SourceTable, 'find_split_by_column', autospec=True) @patch.object(SourceTable, 'find_load', autospec=True) @patch.object(SourceTable, 'get_table_count', autospec=True) def test_generate_it_table(self, mock_get_table_count, mock_find_load, mock_find_split_by_column, mock_find_mappers): """Test generate it table.""" mock_get_table_count.return_value = 1000 mock_find_load.return_value = '100' mock_find_split_by_column.side_effect = ['', 'TEST_COLUMN'] status, _ = self.src_obj.generate_it_table(45) self.assertEquals(status, 'manual') status, _ = self.src_obj.generate_it_table(45) self.assertEquals(status, 'auto') @patch('subprocess.Popen') def test_get_table_count(self, mock_sub_Popen): """Test generate it table.""" proc = MagicMock() proc.communicate = MagicMock() proc.communicate.return_value = ('test_output', 'sqoop error') proc.returncode.return_value = 100 mock_sub_Popen.return_value = proc with self.assertRaises(ValueError) as cm: self.src_obj.get_table_count() self.assertEquals(cm.exception.message, 'sqoop error') @patch.object(SourceTable, 'eval', autospec=True) def test_get_table_count_fetch(self, mock_eval): """Test generate it table.""" with open(BASE_DIR + '/fixtures/eval_mock.txt', 'r') as file_h: sqoop_eval_output = file_h.read() mock_eval.return_value = (0, sqoop_eval_output, '') row_count = self.src_obj.get_table_count() self.assertEquals(row_count, 3) def test_fetch_rows_sqoop(self): """Test generate it table.""" with open(BASE_DIR + '/fixtures/eval_with_column.txt', 'r') as file_h: sqoop_eval_output = file_h.read() column_labels, row_values = \ self.src_obj.fetch_rows_sqoop(sqoop_eval_output, True, [1]) self.assertEquals(column_labels, ["name"]) self.assertEquals(row_values, [['Matt'], ['Mani'], ['Shiva']]) @patch.object(SourceTable, 'eval', autospec=True) def test_parallel_sqoop_output(self, mock_eval): """Test generate it table.""" with open(BASE_DIR + '/fixtures/eval_mock.txt', 'r') as file_h: sqoop_eval_output = file_h.read() mock_eval.return_value = (0, sqoop_eval_output, '') info = [self.cfg_mgr, self.it_table, 'column_name', 'select column_name from table '] row_count = parallel_sqoop_output(info) self.assertEquals(row_count, [('column_name', 0.0, 1)]) class OracleTableTest(unittest.TestCase): """Test OracleTable methods.""" def setUp(self): """Setup.""" it_table = { 'source_database_name': 'fake_database', 'source_table_name': 'fake_cen_tablename', 'db_username': 'fake_username', 'password_file': 'test-passwd', 'connection_factories': 'test-conn-factory', 'jdbcurl': 'jdbc:oracle:thin:@//fake.oracle' ':1521/fake_servicename', 'mappers': '10' } self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) it_table_obj = ItTable(it_table, self.cfg_mgr) self.ora_obj = OracleTable(self.cfg_mgr, it_table_obj) def tearDown(self): """Tear down.""" self.ora_obj._close_logs() def test_find_mappers(self): """Find mappers.""" result = self.ora_obj.find_mappers(250001) self.assertEquals(result, '10') result = self.ora_obj.find_mappers(2500) self.assertEquals(result, '2') result = self.ora_obj.find_mappers(250001, '010') self.assertEquals(result, '10') result = self.ora_obj.find_mappers(2500, '100') self.assertEquals(result, '2') def test_find_primary_key(self): """Find pk.""" result = self.ora_obj.find_primary_key() self.assertEquals(result, None) def test_find_split_by_column(self): """Find split by column.""" result = self.ora_obj.find_split_by_column('5') self.assertEquals(result, "") class DB2TableTest(unittest.TestCase): """Test DB2Table methods.""" def setUp(self): """Setup.""" it_table = { 'source_database_name': 'fake_database', 'source_table_name': 'fake_cen_tablename', 'db_username': 'fake_username', 'password_file': 'test-passwd', 'connection_factories': 'test-conn-factory', 'jdbcurl': 'jdbc:db2:', 'mappers': '10' } self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) it_table_obj = ItTable(it_table, self.cfg_mgr) self.db2_obj = DB2Table(self.cfg_mgr, it_table_obj) self.mock_claim_tbl_dict_DB2 = [{ 'full_table_name': 'claim.fake_database_fake_clm_tablename', 'domain': 'claim', 'target_dir': 'mdm/claim/fake_database/fake_clm_tablename', 'split_by': 'fake_split_by', 'mappers': '20', 'jdbcurl': 'jdbc:db2://fake.db2:50200/fake_servicename', 'connection_factories': 'com.cloudera.connector.teradata.' 'TeradataManagerFactory', 'db_username': 'fake_username', 'password_file': 'jceks://hdfs/user/dev/fake.passwords.jceks#' 'fake.password.alias', 'load': '010001', 'fetch_size': '50000', 'hold': '0', 'automation_appl_id': 'TEST01', 'views': 'fake_view_im|fake_view_open', 'automation_group': '', 'check_column': 'test_inc_column', 'source_schema_name': 'dbo', 'sql_query': 'TRANS > 40', 'actions': '', 'db_env': 'sys', 'source_database_name': 'fake_database', 'source_table_name': 'admission'}] @patch.object(SourceTable, 'eval', autospec=True) def test_find_split_by_column_found(self, mock_eval): """Test generate it table.""" with open(BASE_DIR + '/fixtures/eval_mock.txt', 'r') as file_h: sqoop_eval_output = file_h.read() mock_eval.side_effect = [(0, sqoop_eval_output, '')] split_by_column = self.db2_obj.find_split_by_column(2) self.assertEqual(split_by_column, '3') @patch.object(SourceTable, 'get_groupby_counts', autospec=True) @patch.object(SourceTable, 'eval', autospec=True) def test_find_split_by_column_no(self, mock_eval, mock_group): """Test generate it table.""" with open(BASE_DIR + '/fixtures/eval_empty.txt', 'r') as file_h: sqoop_eval_nooutput = file_h.read() with open(BASE_DIR + '/fixtures/eval_mock.txt', 'r') as file_h: sqoop_eval_output = file_h.read() mock_eval.side_effect = [(0, sqoop_eval_nooutput, ''), (0, sqoop_eval_output, '')] mock_group.return_value = ['key1', 'key2'] split_by_column = self.db2_obj.find_split_by_column(2) self.assertEqual(split_by_column, 'k') @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_DB2_pk(self, mock1): # Mock table found DB2 with open(BASE_DIR + '/fixtures/db2_table_eval_mock.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() # Mock primary key found with open(BASE_DIR + '/fixtures/db2_primary_eval_mock.txt', 'r') as file_h: sqoop_eval_output2 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, '')] table_obj = ItTable(self.mock_claim_tbl_dict_DB2[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) print "Result: ", result self.assertEquals(result, "KEY") @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_DB2_int(self, mock1): # Mock table found DB2 with open(BASE_DIR + '/fixtures/db2_table_eval_mock.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() # Mock no primary key with open(BASE_DIR + '/fixtures/eval_empty.txt', 'r') as file_h: sqoop_eval_output2 = file_h.read() # Mock integer columns with open(BASE_DIR + '/fixtures/db2_primary_eval_mock.txt', 'r') as file_h: sqoop_eval_output3 = file_h.read() # Mock integer column in index found with open(BASE_DIR + '/fixtures/db2_uniqidx_eval_mock.txt', 'r') as file_h: sqoop_eval_output4 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, ''), (0, sqoop_eval_output3, ''), (0, sqoop_eval_output4, '')] table_obj = ItTable(self.mock_claim_tbl_dict_DB2[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) print "Result: ", result self.assertEquals(result, "KEY") @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_DB2_noTable(self, mock1): # Mock table not found DB2 with open(BASE_DIR + '/fixtures/eval_empty.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() sqoop_eval_output2 = sqoop_eval_output1 # Mock integer columns with open(BASE_DIR + '/fixtures/db2_uniqidx_eval_mock.txt', 'r') as file_h: sqoop_eval_output3 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, ''), (0, sqoop_eval_output3, '')] table_obj = ItTable(self.mock_claim_tbl_dict_DB2[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) print "Result: ", result self.assertEquals(result, "KEY") @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_DB2_errEvalTable_IntCol(self, mock1): # Mock table found with open(BASE_DIR + '/fixtures/db2_err_eval_mock.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() # Mock table found uDB2 with open(BASE_DIR + '/fixtures/db2_table_eval_mock.txt', 'r') as file_h: sqoop_eval_output2 = file_h.read() # Mock integer columns with open(BASE_DIR + '/fixtures/db2_uniqidx_eval_mock.txt', 'r') as file_h: sqoop_eval_output3 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, ''), (0, sqoop_eval_output3, '')] table_obj = ItTable(self.mock_claim_tbl_dict_DB2[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) print "Result: ", result self.assertEquals(result, "KEY") @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_DB2_errEvalTable_NoIntCol(self, mock1): # Mock table found with open(BASE_DIR + '/fixtures/db2_err_eval_mock.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() # Mock table found uDB2 with open(BASE_DIR + '/fixtures/db2_err_eval_mock.txt', 'r') as file_h: sqoop_eval_output2 = file_h.read() # Mock integer columns with open(BASE_DIR + '/fixtures/db2_err_eval_mock.txt', 'r') as file_h: sqoop_eval_output3 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, ''), (0, sqoop_eval_output3, '')] table_obj = ItTable(self.mock_claim_tbl_dict_DB2[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) print "Result: ", result self.assertEquals(result, "no-split") def tearDown(self): """Tear down.""" self.db2_obj._close_logs() class MySQLTableTest(unittest.TestCase): """Test DB2Table methods.""" def setUp(self): """Setup.""" it_table = { 'source_database_name': 'fake_database', 'source_table_name': 'fake_cen_tablename', 'db_username': 'fake_username', 'password_file': 'test-passwd', 'connection_factories': 'test-conn-factory', 'jdbcurl': 'jdbc:oracle:thin:@//fake.oracle' ':1521/fake_servicename', 'mappers': '10' } self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) it_table_obj = ItTable(it_table, self.cfg_mgr) self.mysql_obj = MySQLTable(self.cfg_mgr, it_table_obj) self.mock_claim_tbl_dict_mysql = [{ 'full_table_name': 'claim.fake_database_fake_clm_tablename', 'domain': 'claim', 'target_dir': 'mdm/claim/fake_database/fake_clm_tablename', 'split_by': 'fake_split_by', 'mappers': '20', 'jdbcurl': 'jdbc:mysql://fake.teradata/' 'DATABASE=fake_database', 'connection_factories': 'com.cloudera.connector.teradata.' 'TeradataManagerFactory', 'db_username': 'fake_username', 'password_file': 'jceks://hdfs/user/dev/fake.passwords.jceks#' 'fake.password.alias', 'load': '010001', 'fetch_size': '50000', 'hold': '0', 'automation_appl_id': 'TEST01', 'views': 'fake_view_im|fake_view_open', 'automation_group': '', 'check_column': 'test_inc_column', 'source_schema_name': 'dbo', 'sql_query': 'TRANS > 40', 'actions': '', 'db_env': 'sys', 'source_database_name': 'fake_database', 'source_table_name': 'fake_clm_tablename'}] @patch("ibis.utilities.it_table_generation.SourceTable._find_primary_key", autospec=True) def test_find_primary_key(self, mock1): result = self.mysql_obj.find_primary_key() self.assertEquals(result, None) def test_build_primary_key_query(self): result = self.mysql_obj.build_primary_key_query() expected = ("SELECT kcu.column_name FROM " "information_schema.key_column_usage" " kcu WHERE table_schema = 'FAKE_DATABASE' AND " "constraint_name = 'PRIMARY' AND table_name = 'FAKE_CEN_TABLENAME'") self.assertEquals(result, expected) def test_build_column_type_query(self): result = self.mysql_obj.build_column_type_query() expected = ("SELECT COLUMN_NAME, DATA_TYPE FROM " "INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG" "='FAKE_DATABASE' and TABLE_NAME='FAKE_CEN_TABLENAME'") self.assertEquals(result, expected) @patch.object(ITInventory, 'get_rows', autospec=True) @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_mysql_pk(self, mock1, mock2): mock2.return_value = [['EVENT_ID']] with open(BASE_DIR + '/fixtures/sqls_primary_eval_mock.txt', 'r') as file_h: sqoop_eval_output = file_h.read() mock1.return_value = (0, sqoop_eval_output, '') table_obj = ItTable(self.mock_claim_tbl_dict_mysql[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) self.assertEquals(result, 'EVENT_ID') @patch.object(ITInventory, 'get_rows', autospec=True) @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_mysql_int(self, mock1, mock2): mock2.return_value = [['HIT_ID']] with open(BASE_DIR + '/fixtures/eval_empty.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() with open(BASE_DIR + '/fixtures/mysqls_intprimary_eval_mock.txt', 'r') as file_h: sqoop_eval_output2 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, '')] table_obj = ItTable(self.mock_claim_tbl_dict_mysql[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) self.assertEquals(result, 'HIT_ID') class MethodsTest(unittest.TestCase): """Test functions.""" def setUp(self): """Setup.""" self.file_h = open(BASE_DIR + '/fixtures/it_table_gen_split_by.txt', 'r') self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) it_table = { 'source_database_name': 'fake_database', 'source_table_name': 'fake_cen_tablename', 'db_username': 'fake_username', 'password_file': 'test-passwd', 'connection_factories': 'test-conn-factory', 'jdbcurl': 'jdbc:db2://fake.db2:50400/fake_servicename', 'mappers': '10' } self.it_table_obj = ItTable(it_table, self.cfg_mgr) def tearDown(self): """Tear down.""" pass @patch('ibis.utilities.it_table_generation.ITInventory.get_table_mapping', autospec=True) @patch('ibis.utilities.it_table_generation.ITInventory._connect', autospec=True) @patch('ibis.utilities.it_table_generation.SourceTable.generate_it_table', autospec=True) def test_create_auto(self, m_gen_it_table, m_connect, m_g_t_mapping): """test auto split by table gen""" m_g_t_mapping.return_value = {} m_gen_it_table.return_value = ("auto", "test string") file_path = create(self.file_h, self.cfg_mgr, 45).name self.assertTrue('AUTO_it-tables.txt' in file_path) @patch('ibis.utilities.it_table_generation.ITInventory.get_table_mapping', autospec=True) @patch('ibis.utilities.it_table_generation.ITInventory._connect', autospec=True) @patch('ibis.utilities.it_table_generation.SourceTable.generate_it_table', autospec=True) def test_create_manual(self, m_gen_it_table, m_connect, m_g_t_mapping): """test manual split by table gen""" m_g_t_mapping.return_value = {} m_gen_it_table.return_value = ("manual", "test string") ret_val = create(self.file_h, self.cfg_mgr, 45) self.assertTrue(ret_val is None) @patch('ibis.utilities.it_table_generation.SourceTable.get_auto_values', autospec=True) def test_get_auto_values(self, m_get_auto): """test get auto values for split by""" m_get_auto.return_value = ('100100', 10, 'spli_by_column') ret = get_auto_values(self.it_table_obj, self.cfg_mgr) self.assertEquals(ret[1], 10) def test_get_src_obj(self): """test get src obj""" ret = get_src_obj(self.cfg_mgr, self.it_table_obj) self.assertTrue(isinstance(ret, DB2Table)) class TeradataTableTest(unittest.TestCase): """Test teradataTable methods.""" def setUp(self): """Setup.""" it_table = { 'source_database_name': 'fake_database', 'source_table_name': 'client', 'db_username': 'fake_username', 'password_file': 'test-passwd', 'connection_factories': 'test-conn-factory', 'jdbcurl': 'jdbc:teradata:', 'mappers': '10' } self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) it_table_obj = ItTable(it_table, self.cfg_mgr) self.td_obj = TeradataTable(self.cfg_mgr, it_table_obj) self.mock_claim_tbl_dict = [{ 'full_table_name': 'claim.fake_database_fake_clm_tablename', 'domain': 'claim', 'target_dir': 'mdm/claim/fake_database/fake_clm_tablename', 'split_by': 'fake_split_by', 'mappers': '20', 'jdbcurl': 'jdbc:teradata://fake.teradata/' 'DATABASE=fake_database', 'connection_factories': 'com.cloudera.connector.teradata.' 'TeradataManagerFactory', 'db_username': 'fake_username', 'password_file': 'jceks://hdfs/user/dev/fake.passwords.jceks#' 'fake.password.alias', 'load': '010001', 'fetch_size': '50000', 'hold': '0', 'automation_appl_id': 'TEST01', 'views': 'fake_view_im|fake_view_open', 'automation_group': '', 'check_column': 'test_inc_column', 'source_schema_name': 'dbo', 'sql_query': 'TRANS > 40', 'actions': '', 'db_env': 'sys', 'source_database_name': 'fake_database', 'source_table_name': 'fake_clm_tablename'}] self.mock_warehouse_tbl_dict = [{ 'full_table_name': 'claim.fake_database_fake_clm_tablename', 'domain': 'claim', 'target_dir': 'mdm/claim/fake_database/fake_clm_tablename', 'split_by': 'fake_split_by', 'mappers': '20', 'jdbcurl': 'jdbc:teradata://fake.teradata/' 'DATABASE=fake_database', 'connection_factories': 'com.cloudera.connector.teradata.' 'TeradataManagerFactory', 'db_username': 'fake_username', 'password_file': 'jceks://hdfs/user/dev/fake.passwords.jceks#' 'fake.password.alias', 'load': '010001', 'fetch_size': '50000', 'hold': '0', 'automation_appl_id': 'TEST01', 'views': 'fake_view_im|fake_view_open', 'automation_group': '', 'check_column': 'test_inc_column', 'source_schema_name': 'dbo', 'sql_query': 'TRANS > 40', 'actions': '', 'db_env': 'sys', 'source_database_name': 'fake_database', 'source_table_name': 'fake_clm_tablename'}] @patch.object(ITInventory, 'get_rows', autospec=True) @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_teradata_pk(self, mock1, mock2): mock2.return_value = [['KEY']] with open(BASE_DIR + '/fixtures/td_primary_eval_mock.txt', 'r') as file_h: sqoop_eval_output = file_h.read() mock1.return_value = (0, sqoop_eval_output, '') table_obj = ItTable(self.mock_claim_tbl_dict[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) self.assertEquals(result, "KEY") @patch.object(ITInventory, 'get_rows', autospec=True) @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_teradata_int(self, mock1, mock2): mock2.return_value = [['LOAD_CTL_KEY']] with open(BASE_DIR + '/fixtures/td_valprimary_eval_mock.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() with open(BASE_DIR + '/fixtures/td_noprimary_eval_mock.txt', 'r') as file_h: sqoop_eval_output2 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, '')] table_obj = ItTable(self.mock_claim_tbl_dict[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) self.assertEquals(result, "LOAD_CTL_KEY") @patch.object(ITInventory, 'get_rows', autospec=True) def test_get_split_by_teradata_warehouse(self, mock1): mock1.return_value = [['LOAD_CTL_KEY']] table_obj = ItTable(self.mock_warehouse_tbl_dict[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) self.assertEquals(result, "LOAD_CTL_KEY") def tearDown(self): """Tear down.""" pass class SqlserverTableTest(unittest.TestCase): """Test teradataTable methods.""" def setUp(self): """Setup.""" it_table = { 'source_database_name': 'fake_database', 'source_table_name': 'client', 'db_username': 'fake_username', 'password_file': 'test-passwd', 'connection_factories': 'test-conn-factory', 'jdbcurl': 'jdbc:sqlserver:', 'mappers': '10' } self.cfg_mgr = ConfigManager(UNIT_TEST_ENV) it_table_obj = ItTable(it_table, self.cfg_mgr) self.sql_obj = SqlServerTable(self.cfg_mgr, it_table_obj) self.mock_claim_tbl_dict_sqlserver = [{ 'full_table_name': 'claim.fake_database_fake_clm_tablename', 'domain': 'claim', 'target_dir': 'mdm/claim/fake_database/fake_clm_tablename', 'split_by': 'fake_split_by', 'mappers': '20', 'jdbcurl': 'jdbc:sqlserver://fake.teradata/' 'DATABASE=fake_database', 'connection_factories': 'com.cloudera.connector.teradata.' 'TeradataManagerFactory', 'db_username': 'fake_username', 'password_file': 'jceks://hdfs/user/dev/fake.passwords.jceks#' 'fake.password.alias', 'load': '010001', 'fetch_size': '50000', 'hold': '0', 'automation_appl_id': 'TEST01', 'views': 'fake_view_im|fake_view_open', 'automation_group': '', 'check_column': 'test_inc_column', 'source_schema_name': 'dbo', 'sql_query': 'TRANS > 40', 'actions': '', 'db_env': 'sys', 'source_database_name': 'fake_database', 'source_table_name': 'fake_clm_tablename'}] @patch.object(ITInventory, 'get_rows', autospec=True) @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_sqlserver_pk(self, mock1, mock2): mock2.return_value = [['EVENT_ID']] with open(BASE_DIR + '/fixtures/sqls_primary_eval_mock.txt', 'r') as file_h: sqoop_eval_output = file_h.read() mock1.return_value = (0, sqoop_eval_output, '') table_obj = ItTable(self.mock_claim_tbl_dict_sqlserver[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) self.assertEquals(result, 'EVENT_ID') @patch.object(ITInventory, 'get_rows', autospec=True) @patch.object(SourceTable, 'eval', autospec=True) def test_get_split_by_sqlserver_int(self, mock1, mock2): mock2.return_value = [['HIT_ID']] with open(BASE_DIR + '/fixtures/eval_empty.txt', 'r') as file_h: sqoop_eval_output1 = file_h.read() with open(BASE_DIR + '/fixtures/sqls_intprimary_eval_mock.txt', 'r') as file_h: sqoop_eval_output2 = file_h.read() mock1.side_effect = [(0, sqoop_eval_output1, ''), (0, sqoop_eval_output2, '')] table_obj = ItTable(self.mock_claim_tbl_dict_sqlserver[0], self.cfg_mgr) split_by_obj = Get_Auto_Split(self.cfg_mgr) result = split_by_obj.get_split_by_column(table_obj) self.assertEquals(result, 'HIT_ID') def tearDown(self): """Tear down.""" pass if __name__ == "__main__": unittest.main() else: loader = unittest.TestLoader() test_classes_to_run = [SourceTableTest, OracleTableTest, DB2TableTest, MethodsTest, MySQLTableTest, SqlserverTableTest, TeradataTableTest] # Create test suite it_table_gen_test_suite = [] for test_class in test_classes_to_run: suite = loader.loadTestsFromTestCase(test_class) it_table_gen_test_suite.append(suite)
45.025
107
0.612536
3,685
30,617
4.72673
0.077341
0.030543
0.028132
0.032725
0.813182
0.78017
0.756287
0.725858
0.706281
0.69032
0
0.018867
0.264265
30,617
679
108
45.091311
0.754373
0.010582
0
0.66548
0
0
0.237159
0.100891
0
0
0
0
0.076512
0
null
null
0.035587
0.014235
null
null
0.008897
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
7
c59c10182c05d98bcab554f58c51065a3b2f8710
29,097
py
Python
PR_BCI_team/Team_StarLab/DKHan/examples/giga_cnn/networks.py
PatternRecognition/OpenBMI
d9291ddb81f4319fb3764d7192e0363939a62ee9
[ "MIT" ]
217
2015-11-02T11:10:29.000Z
2022-03-22T07:01:12.000Z
PR_BCI_team/Team_StarLab/DKHan/examples/giga_cnn/networks.py
deep-bci-g/OpenBMI
75daf901b2dbe215852cbff243606dcfcd10f05c
[ "MIT" ]
24
2015-11-02T11:10:45.000Z
2021-09-08T11:10:33.000Z
PR_BCI_team/Team_StarLab/DKHan/examples/giga_cnn/networks.py
deep-bci-g/OpenBMI
75daf901b2dbe215852cbff243606dcfcd10f05c
[ "MIT" ]
112
2016-01-22T01:45:44.000Z
2022-03-22T07:08:19.000Z
import torch.nn as nn import torch.nn.functional as F import torch import layers as L from models import cbam class EmbeddingNet(nn.Module): def __init__(self): super(EmbeddingNet, self).__init__() self.convnet = nn.Sequential(nn.Conv2d(1, 32, 5), nn.PReLU(), nn.MaxPool2d(2, stride=2), nn.Conv2d(32, 64, 5), nn.PReLU(), nn.MaxPool2d(2, stride=2)) self.fc = nn.Sequential(nn.Linear(64 * 4 * 4, 256), nn.PReLU(), nn.Linear(256, 256), nn.PReLU(), nn.Linear(256, 2) ) def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) output = self.fc(output) return output def get_embedding(self, x): return self.forward(x) class basenet(nn.Module): def __init__(self): super(basenet, self).__init__() self.convnet = nn.Sequential(nn.Conv2d(1,100,(62, 40)), nn.ELU(), nn.AdaptiveAvgPool2d((1,10)) ) self.num_hidden = 1000 def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) return output def get_embedding(self, x): return self.forward(x) # from models.model_gcn import ReadOut class EmbeddingDeep4CNN(nn.Module): #shallowconv def __init__(self): # super(EmbeddingDeep4CNN, self).__init__() self.convnet = nn.Sequential(nn.Conv2d(1, 100, kernel_size=(1,10), stride=1), nn.Conv2d(100, 100, kernel_size=(62, 1), stride=1), nn.ELU(), nn.MaxPool2d(kernel_size = (1, 3), stride = (1, 2)), nn.Conv2d(100, 100, kernel_size=(1, 10), stride=1), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Conv2d(100, 100, kernel_size=(1, 10), stride=1), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Conv2d(100, 100, kernel_size=(1, 10), stride=1), nn.ELU(), nn.AdaptiveMaxPool2d((1,10)) #nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), ) #exp3 #self.fc = nn.Sequential(nn.Linear(1000,128), nn.ELU(), nn.Dropout()) self.num_hidden = 1000 # self.fc = nn.Sequential(nn.Linear(1000,1000), # nn.ReLU()) #self.fc = nn.Linear(1000,1000) def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) #output = self.fc(output) # output = self.fc(output) #output = self.l2normalize(output) #x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x) def l2normalize(self, feature): epsilon = 1e-6 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class EmbeddingDeep4CNN_bn(nn.Module): #shallowconv def __init__(self): #기존 대비 100->50으로 필터수 전반적으로 낮춤 , 마지막만 100 super(EmbeddingDeep4CNN_bn, self).__init__() self.convnet = nn.Sequential(nn.Conv2d(1, 25, kernel_size=(1,10), stride=1), nn.Conv2d(25, 25, kernel_size=(60, 1), stride=1), nn.BatchNorm2d(25), nn.ReLU(), nn.MaxPool2d(kernel_size = (1, 3), stride = (1, 2)), nn.Conv2d(25, 50, kernel_size=(1, 10), stride=1), nn.BatchNorm2d(50), nn.ReLU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Conv2d(50, 100, kernel_size=(1, 10), stride=1), nn.BatchNorm2d(100), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Conv2d(100, 100, kernel_size=(1, 10), stride=1), nn.BatchNorm2d(100), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), ) self.num_hidden = 1000 # self.fc = nn.Sequential(nn.Linear(1000,1000), # nn.ReLU()) #self.fc = nn.Linear(1000,1000) def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) # output = self.fc(output) # output = self.fc(output) #output = self.l2normalize(output) #x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x) def l2normalize(self, feature): epsilon = 1e-6 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class EmbeddingDeepCNN(nn.Module): #아주 깊게 def __init__(self): super(EmbeddingDeepCNN, self).__init__() #self.fc = nn.Linear(1000,100) self.convnet = nn.Sequential(nn.Conv2d(1, 25, kernel_size=(1, 20), stride=1), nn.Conv2d(25, 50, kernel_size=(62, 1), stride=1), nn.ReLU(), nn.Conv2d(50, 50, kernel_size=(1, 3), stride=1), nn.ReLU(), nn.MaxPool2d(kernel_size=(1, 2), stride=(1, 2)), nn.Conv2d(50, 50, kernel_size=(1, 3), stride=1), nn.ReLU(), nn.Conv2d(50, 50, kernel_size=(1, 3), stride=1), nn.ReLU(), nn.MaxPool2d(kernel_size=(1, 2), stride=(1, 2)), nn.Conv2d(50, 50, kernel_size=(1, 3), stride=1), nn.ReLU(), nn.Conv2d(50, 50, kernel_size=(1, 3), stride=1), nn.ReLU(), nn.MaxPool2d(kernel_size=(1, 2), stride=(1, 2)), nn.Conv2d(50, 50, kernel_size=(1, 3), stride=1), nn.ReLU(), nn.Conv2d(50, 50, kernel_size=(1, 3), stride=1), nn.ReLU(), nn.MaxPool2d(kernel_size=(1, 2), stride=(1, 2)), ) def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) output = self.l2normalize(output) #output = self.fc(output) #x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x) def l2normalize(self, feature): epsilon = 1e-6 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class EmbeddingShallowCNN(nn.Module): #shallowconv def __init__(self): super(EmbeddingShallowCNN, self).__init__() self.num_filters = 50 self.num_hidden = 1050 self.convnet = nn.Sequential(nn.Conv2d(1, self.num_filters, (1,25), stride=1), nn.Conv2d(self.num_filters, self.num_filters, (62, 1), stride=1), nn.BatchNorm2d(self.num_filters, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)) def forward(self, x): x = self.convnet(x) x = x*x # x = F.adaptive_avg_pool2d(x, output_size = (1,20)) x = F.avg_pool2d(x, kernel_size=(1, 75), stride=(1, 15)) # 1,149 x = x.view(-1, self.num_filters * 1 * 21) x = torch.log(x) # x = self.l2normalize(x) return x def get_embedding(self, x): return self.forward(x) def l2normalize(self, feature): epsilon = 1e-6 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class FineShallowCNN(nn.Module): # shallowconv def __init__(self,EmbeddingNet): super(FineShallowCNN, self).__init__() self.EmbeddingNet = EmbeddingNet self.fc_lr = nn.Linear(2000, 2) def forward(self, x): x = self.EmbeddingNet(x) x = x.view(x.size()[0], -1) x = self.fc_lr(x) x = F.dropout(x, training=self.training, p=0.5) x = F.log_softmax(x, dim=1) return x def get_embedding(self, x): return self.forward(x) class EmbeddingNetL2(EmbeddingNet): def __init__(self): super(EmbeddingNetL2, self).__init__() def forward(self, x): output = super(EmbeddingNetL2, self).forward(x) output /= output.pow(2).sum(1, keepdim=True).sqrt() return output def get_embedding(self, x): return self.forward(x) class ClassificationNet(nn.Module): def __init__(self, embedding_net, n_classes): super(ClassificationNet, self).__init__() self.embedding_net = embedding_net self.n_classes = n_classes self.nonlinear = nn.PReLU() self.fc1 = nn.Linear(2, n_classes) def forward(self, x): output = self.embedding_net(x) output = self.nonlinear(output) scores = F.log_softmax(self.fc1(output), dim=-1) return scores def get_embedding(self, x): return self.nonlinear(self.embedding_net(x)) class SiameseNet(nn.Module): def __init__(self, embedding_net): super(SiameseNet, self).__init__() self.embedding_net = embedding_net def forward(self, x1, x2): output1 = self.embedding_net(x1) output2 = self.embedding_net(x2) return output1, output2 def get_embedding(self, x): return self.embedding_net(x) # class TripletNet(nn.Module): # def __init__(self, embedding_net): # super(TripletNet, self).__init__() # self.embedding_net = embedding_net # # def forward(self, x1, x2, x3): # output1 = self.embedding_net(x1) # output2 = self.embedding_net(x2) # output3 = self.embedding_net(x3) # return output1, output2, output3 # # def get_embedding(self, x): # return self.embedding_net(x) class TripletNet(nn.Module): def __init__(self, embedding_net): super(TripletNet, self).__init__() self.embedding_net = embedding_net self.num_hidden = embedding_net.num_hidden # self.fc = nn.Sequential(nn.Linear(self.num_hidden,500), # nn.ReLU(), # nn.Dropout(), # nn.Linear(500,2), # # ) self.fc = nn.Linear(self.num_hidden,2) # nn.init.xavier_normal_(self.fc.weight) # self.fc.bias.data.fill_(0.01) def forward(self, x1, x2, x3): anchor = self.embedding_net(x1) output4 = self.fc(anchor) output1= self.l2normalize(anchor) output2 = self.embedding_net(x2) output2 = self.l2normalize(output2) output3 = self.embedding_net(x3) output3 = self.l2normalize(output3) output4 = F.dropout(output4,p=0.5) output4 = F.log_softmax(output4,dim=1) return output1, output2, output3, output4 def get_embedding(self, x): return self.embedding_net(x) # # def l2normalize(self,feature): # epsilon = 1e-6 # norm = torch.pow(torch.sum(torch.pow(feature, 2), 1)+epsilon, 0.5).unsqueeze(1).expand_as(feature) # return torch.div(feature, norm) # def l2normalize(self, feature): denominator= feature.pow(2).sum(1, keepdim=True).sqrt() return feature/denominator class TripletClfNet(nn.Module): def __init__(self, embedding_net,classification_net,): super(TripletClfNet, self).__init__() self.embedding_net = embedding_net self.fc = nn.Linear(1000, 2) self.classification_net = classification_net def forward(self, x1, x2, x3): anchor = self.embedding_net(x1) positive = self.embedding_net(x2) negative = self.embedding_net(x3) gather = self.fc(anchor) gather = F.log_softmax(gather,dim=1) clf = self.classification_net(x1) return anchor, positive, negative, gather, clf def get_embedding(self, x): return self.embedding_net(x) class QuintupletNet(nn.Module): def __init__(self, embedding_net): super(QuintupletNet, self).__init__() self.embedding_net = embedding_net self.fc = nn.Linear(1000,2) def forward(self, x1, x2, x3, x4, x5): output1 = self.embedding_net(x1) output2 = self.embedding_net(x2) output3 = self.embedding_net(x3) output4 = self.embedding_net(x4) output5 = self.embedding_net(x5) output6 = self.fc(output1) #clf output output6 = F.log_softmax(output6, dim=1) return output1, output2, output3, output4, output5, output6 def get_embedding(self, x): return self.embedding_net(x) #==================================================== from util import np_to_var import numpy as np class Deep4Net(nn.Module): def __init__(self, batch_norm=True, batch_norm_alpha=0.1): super(Deep4Net, self).__init__() self.batch_norm = batch_norm self.batch_norm_alpha = batch_norm_alpha n_ch1 = 50 n_ch2 = 75 n_ch3 = 100 n_ch4 = 100 self.convnet = nn.Sequential( nn.Conv2d(1, n_ch1, kernel_size=(1, 10), stride=1), # nn.ELU(), # nn.BatchNorm2d(n_ch1, # momentum=self.batch_norm_alpha, # affine=True, # eps=1e-5), nn.Conv2d(n_ch1, n_ch1, kernel_size=(62, 1), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch1, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch1, n_ch2, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch2, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch2, n_ch3, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch3, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch3, n_ch4, kernel_size=(1, 10), stride=1), nn.BatchNorm2d(n_ch4, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), ) self.convnet.eval() out = self.convnet(np_to_var(np.ones( (1, 1, 62, 400), dtype=np.float32))) n_out_time = out.cpu().data.numpy().shape[3] self.final_conv_length = n_out_time self.num_hidden = self.final_conv_length*n_ch4 # self.fc = nn.Sequential(nn.Linear(1000,1000), # nn.ReLU()) # self.fc = nn.Linear(1000,1000) def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) # output = self.fc(output) # output = self.fc(output) # output = self.l2normalize(output) # x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x) class Deep4NetWs(nn.Module): def __init__(self, batch_norm=True, batch_norm_alpha=0.1): super(Deep4NetWs, self).__init__() self.batch_norm = batch_norm self.batch_norm_alpha = batch_norm_alpha self.convnet = nn.Sequential( L.Conv2d(1, 25, kernel_size=(1, 10), stride=1), L.Conv2d(25, 25, kernel_size=(62, 1), stride=1, bias=not self.batch_norm), L.BatchNorm2d(25), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), L.Conv2d(25, 50, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), L.BatchNorm2d(50), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), L.Conv2d(50, 100, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), L.BatchNorm2d(100), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), L.Conv2d(100, 100, kernel_size=(1, 10), stride=1), L.BatchNorm2d(100), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), ) self.convnet.eval() out = self.convnet(np_to_var(np.ones( (1, 1, 62, 400), dtype=np.float32))) n_out_time = out.cpu().data.numpy().shape[3] self.final_conv_length = n_out_time self.num_hidden = self.final_conv_length*100 # self.fc = nn.Sequential(nn.Linear(1000,1000), # nn.ReLU()) # self.fc = nn.Linear(1000,1000) def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) # output = self.fc(output) # output = self.fc(output) # output = self.l2normalize(output) # x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x) def l2normalize(self, feature): epsilon = 1e-6 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class View(nn.Module): def __init__(self): super(View, self).__init__() def forward(self, x): return x.view(x.size()[0], -1) class DWConvNet(nn.Module): def __init__(self, batch_norm=True, batch_norm_alpha=0.1): super(DWConvNet, self).__init__() self.batch_norm = batch_norm self.batch_norm_alpha = batch_norm_alpha n_ch1 = 100 n_ch2 = 100 n_ch3 = 100 self.convnet = nn.Sequential( # nn.Conv3d(1,50,(1, 1, 10),1), # nn.Conv3d(50, 50, (1, 1, 10), 1), nn.Conv2d(62, 62, kernel_size=(1, 10), stride=1, groups=62), cbam.ChannelGate(62), nn.Conv2d(62, n_ch1, 1, 1, 0, 1, 1, bias=False), # nn.Conv2d(n_ch1, n_ch1, kernel_size=(62, 1), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch1, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch1, n_ch2, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch2, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch2, n_ch3, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch3, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch3, n_ch3, kernel_size=(1, 10), stride=1), nn.BatchNorm2d(n_ch3, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), ) self.convnet.eval() out = self.convnet(np_to_var(np.ones( (1, 62, 1, 400), dtype=np.float32))) n_out_time = out.cpu().data.numpy().shape[3] self.final_conv_length = n_out_time self.num_hidden = self.final_conv_length*n_ch3 # self.fc = nn.Sequential(nn.Linear(1000,1000), # nn.ReLU()) # self.fc = nn.Linear(1000,1000) def forward(self, x): x.size()[0] x = x.view(x.size()[0],62,1,-1) output = self.convnet(x) output = output.view(output.size()[0], -1) # output = self.fc(output) # output = self.fc(output) # output = self.l2normalize(output) # x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x) def l2normalize(self, feature): epsilon = 1e-6 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class DWConvNet2(nn.Module): def __init__(self, batch_norm=True, batch_norm_alpha=0.1): super(DWConvNet2, self).__init__() self.batch_norm = batch_norm self.batch_norm_alpha = batch_norm_alpha n_ch1 = 100 n_ch2 = 100 n_ch3 = 100 self.convnet = nn.Sequential( # nn.Conv3d(1,50,(1, 1, 10),1), # nn.Conv3d(50, 50, (1, 1, 10), 1), nn.Conv2d(62, 62, kernel_size=(1, 30), stride=1, groups=62), nn.Conv2d(62, n_ch1, 1, 1, 0, 1, 1, bias=False), # nn.ReLU(), # nn.Conv2d(n_ch1, n_ch1, kernel_size=(62, 1), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch1, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch1, n_ch2, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch2, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch2, n_ch3, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch3, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 2)), nn.Dropout(p=0.5), nn.Conv2d(n_ch3, n_ch3, kernel_size=(1, 10), stride=1), nn.BatchNorm2d(n_ch3, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), ) self.convnet.eval() out = self.convnet(np_to_var(np.ones( (1, 62, 1, 400), dtype=np.float32))) n_out_time = out.cpu().data.numpy().shape[3] self.final_conv_length = n_out_time self.num_hidden = self.final_conv_length*100 # self.fc = nn.Sequential(nn.Linear(1000,1000), # nn.ReLU()) # self.fc = nn.Linear(1000,1000) def forward(self, x): x.size()[0] x = x.view(x.size()[0],62,1,-1) output = self.convnet(x) output = output.view(output.size()[0], -1) # output = self.fc(output) # output = self.fc(output) # output = self.l2normalize(output) # x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x) def l2normalize(self, feature): epsilon = 1e-6 norm = torch.pow(torch.sum(torch.pow(feature, 2), 1) + epsilon, 0.5).unsqueeze(1).expand_as(feature) return torch.div(feature, norm) class Deep4Net_origin(nn.Module): def __init__(self, n_classes,batch_norm=True, batch_norm_alpha=0.1): super(Deep4Net_origin, self).__init__() self.batch_norm = batch_norm self.batch_norm_alpha = batch_norm_alpha self.n_classes = n_classes n_ch1 = 25 n_ch2 = 50 n_ch3 = 100 n_ch4 = 200 self.convnet = nn.Sequential( nn.Conv2d(1, n_ch1, kernel_size=(1, 10), stride=1), # nn.ELU(), # nn.BatchNorm2d(n_ch1, # momentum=self.batch_norm_alpha, # affine=True, # eps=1e-5), nn.Conv2d(n_ch1, n_ch1, kernel_size=(62, 1), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch1, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), nn.Dropout(p=0.5), nn.Conv2d(n_ch1, n_ch2, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch2, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), nn.Dropout(p=0.5), nn.Conv2d(n_ch2, n_ch3, kernel_size=(1, 10), stride=1, bias=not self.batch_norm), nn.BatchNorm2d(n_ch3, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), nn.Dropout(p=0.5), nn.Conv2d(n_ch3, n_ch4, kernel_size=(1, 10), stride=1), nn.BatchNorm2d(n_ch4, momentum=self.batch_norm_alpha, affine=True, eps=1e-5), nn.ELU(), nn.MaxPool2d(kernel_size=(1, 3), stride=(1, 3)), ) self.convnet.eval() out = self.convnet(np_to_var(np.ones( (1, 1, 62, 1000), dtype=np.float32))) n_out_time = out.cpu().data.numpy().shape[3] self.final_conv_length = n_out_time self.num_hidden = self.final_conv_length*n_ch4 # self.fc = nn.Sequential(nn.Linear(1000,1000), # nn.ReLU()) # self.fc = nn.Linear(1000,1000) self.convnet.add_module( "conv_classifier", nn.Conv2d( self.n_ch4, self.n_classes, (self.final_conv_length, 1), bias=True, ), ) def forward(self, x): output = self.convnet(x) output = output.view(output.size()[0], -1) # output = self.fc(output) # output = self.fc(output) # output = self.l2normalize(output) # x = F.elu(x) # x = self.l2normalize(x) return output def get_embedding(self, x): return self.forward(x)
34.721957
134
0.502938
3,553
29,097
3.954968
0.054602
0.039354
0.054014
0.029889
0.833903
0.809991
0.779604
0.755978
0.736265
0.722744
0
0.072234
0.365777
29,097
837
135
34.763441
0.689227
0.121078
0
0.71147
0
0
0.000589
0
0
0
0
0
0
1
0.114695
false
0
0.012545
0.03405
0.241935
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c5bfb66cfe4713d8bbb92513b159181eceda4ac4
52
py
Python
samples/src/main/resources/datasets/python/45.py
sritchie/kotlingrad
8165ed1cd77220a5347c58cded4c6f2bcf22ee30
[ "Apache-2.0" ]
11
2020-12-19T01:19:44.000Z
2021-12-25T20:43:33.000Z
src/main/resources/datasets/python/45.py
breandan/katholic
081c39f3acc73ff41f5865563debe78a36e1038f
[ "Apache-2.0" ]
null
null
null
src/main/resources/datasets/python/45.py
breandan/katholic
081c39f3acc73ff41f5865563debe78a36e1038f
[ "Apache-2.0" ]
2
2021-01-25T07:59:20.000Z
2021-08-07T07:13:49.000Z
def bool1(a, b, c, d): return a < (b < (c < d))
17.333333
28
0.423077
11
52
2
0.636364
0.181818
0.272727
0.363636
0
0
0
0
0
0
0
0.028571
0.326923
52
2
29
26
0.6
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
a8b2f3da9bd3a7cc10e90803dd66a0974fa10a25
1,360
py
Python
ProjectEuler/Problem_8/solution.py
Mag-Stellon/problemsSolving
00b96abeb3de4650dd60e008034b556e565f8ed0
[ "MIT" ]
null
null
null
ProjectEuler/Problem_8/solution.py
Mag-Stellon/problemsSolving
00b96abeb3de4650dd60e008034b556e565f8ed0
[ "MIT" ]
null
null
null
ProjectEuler/Problem_8/solution.py
Mag-Stellon/problemsSolving
00b96abeb3de4650dd60e008034b556e565f8ed0
[ "MIT" ]
null
null
null
listNumber = "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450" tabListNumber = list(listNumber) productMax=0 index=0 for i in range(len(tabListNumber)-12): product = 1 for j in range(0,13): product=product*int(tabListNumber[i+j]) if product > productMax : index=i productMax=product print("Index begin at : "+str(index)+ " and product is : "+ str(productMax))
85
1,015
0.903676
48
1,360
25.604167
0.520833
0.011391
0
0
0
0
0
0
0
0
0
0.791209
0.063235
1,360
15
1,016
90.666667
0.173469
0
0
0
0
0
0.761029
0.735294
0
1
0
0
0
1
0
false
0
0
0
0
0.083333
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
7
7664576b83ef3f47a29b021328a2ac07765341a9
144
py
Python
code/stats/__init__.py
mrbarbasa/kaggle-spooky-author
a2ded542288efa0e85a25426722619ed2542d98b
[ "MIT" ]
1
2018-10-09T04:57:03.000Z
2018-10-09T04:57:03.000Z
code/stats/__init__.py
mrbarbasa/kaggle-spooky-author
a2ded542288efa0e85a25426722619ed2542d98b
[ "MIT" ]
null
null
null
code/stats/__init__.py
mrbarbasa/kaggle-spooky-author
a2ded542288efa0e85a25426722619ed2542d98b
[ "MIT" ]
null
null
null
from .display_classification_summary import display_classification_summary from .save_classification_summary import save_classification_summary
48
74
0.930556
16
144
7.875
0.375
0.666667
0.444444
0
0
0
0
0
0
0
0
0
0.055556
144
2
75
72
0.926471
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
767086c669e2c02db1a9ec92705f226710317450
29
py
Python
Adafruit_MCP3008/__init__.py
zzxvictor/Adafruit_Python_MCP3008
b87838bfe4d19070c0034e4b2186715758eae675
[ "MIT" ]
82
2016-02-06T23:06:14.000Z
2021-03-03T23:55:57.000Z
Adafruit_MCP3008/__init__.py
zzxvictor/Adafruit_Python_MCP3008
b87838bfe4d19070c0034e4b2186715758eae675
[ "MIT" ]
7
2016-02-23T18:07:41.000Z
2018-12-20T19:42:30.000Z
Adafruit_MCP3008/__init__.py
zzxvictor/Adafruit_Python_MCP3008
b87838bfe4d19070c0034e4b2186715758eae675
[ "MIT" ]
76
2016-02-11T08:58:40.000Z
2022-03-15T17:57:31.000Z
from .MCP3008 import MCP3008
14.5
28
0.827586
4
29
6
0.75
0
0
0
0
0
0
0
0
0
0
0.32
0.137931
29
1
29
29
0.64
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
767b7d16452d76054d07ad20dcd553dea969d55f
9,008
py
Python
tests/test_client.py
foreseeti/securicad-enterprise-sdk
aef4db2530caa0de78a56a3e519efa62bcee39d8
[ "Apache-2.0" ]
3
2020-09-28T09:13:39.000Z
2020-12-10T09:44:03.000Z
tests/test_client.py
foreseeti/securicad-enterprise-sdk
aef4db2530caa0de78a56a3e519efa62bcee39d8
[ "Apache-2.0" ]
2
2021-02-19T13:55:10.000Z
2021-12-28T07:51:53.000Z
tests/test_client.py
foreseeti/securicad-enterprise-sdk
aef4db2530caa0de78a56a3e519efa62bcee39d8
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-2021 Foreseeti AB <https://foreseeti.com> # # 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. import sys from pathlib import Path import pytest import utils # isort: off sys.path.append(str(Path(__file__).resolve().parent.parent)) from securicad.enterprise.exceptions import StatusCodeException # isort: on def test_init(data): def assert_init(username, password): client = utils.get_client(username, password) utils.assert_access_token(client) client.logout() def assert_init_org(username, password, org): client = utils.get_client_org(username, password, org) utils.assert_access_token(client) client.logout() def assert_init_invalid(username, password): with pytest.raises(StatusCodeException) as e: utils.get_client(username, password) utils.assert_status_code_exception( exception=e.value, status_code=401, method="POST", url=utils.get_url("auth/login"), data={"error": "Invalid login"}, ) def assert_init_org_invalid(username, password, org): with pytest.raises(StatusCodeException) as e: utils.get_client_org(username, password, org) utils.assert_status_code_exception( exception=e.value, status_code=401, method="POST", url=utils.get_url("auth/login"), data={"error": "Invalid login"}, ) for user_data in data["users"].values(): assert_init(user_data["username"], user_data["password"]) assert_init_org(user_data["username"], user_data["password"], None) for org_data in data["organizations"].values(): for user_data in org_data["users"].values(): assert_init_org( user_data["username"], user_data["password"], org_data["name"] ) assert_init_invalid("invalid", "invalid") assert_init_org_invalid("invalid", "invalid", None) assert_init_org_invalid("invalid", "invalid", "invalid") def test_login(data): def assert_login(client, username, password): utils.assert_access_token(client) old_token = client._get_access_token() client.login(username, password) utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token def assert_logout_login(client, username, password): utils.assert_access_token(client) old_token = client._get_access_token() client.logout() utils.assert_not_access_token(client) client.login(username, password) utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token def assert_login_org(client, username, password, org): utils.assert_access_token(client) old_token = client._get_access_token() client.login(username, password, org) utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token def assert_logout_login_org(client, username, password, org): utils.assert_access_token(client) old_token = client._get_access_token() client.logout() utils.assert_not_access_token(client) client.login(username, password, org) utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token def assert_login_invalid(client, username, password): with pytest.raises(StatusCodeException) as e: client.login(username, password) utils.assert_status_code_exception( exception=e.value, status_code=401, method="POST", url=utils.get_url("auth/login"), data={"error": "Invalid login"}, ) def assert_login_org_invalid(client, username, password, org): with pytest.raises(StatusCodeException) as e: client.login(username, password, org) utils.assert_status_code_exception( exception=e.value, status_code=401, method="POST", url=utils.get_url("auth/login"), data={"error": "Invalid login"}, ) for user_data in data["users"].values(): client = utils.get_client_sysadmin() assert_login(client, user_data["username"], user_data["password"]) client.logout() client = utils.get_client_sysadmin() assert_logout_login(client, user_data["username"], user_data["password"]) client.logout() client = utils.get_client_sysadmin() assert_login_org(client, user_data["username"], user_data["password"], None) client.logout() client = utils.get_client_sysadmin() assert_logout_login_org( client, user_data["username"], user_data["password"], None ) client.logout() for org_data in data["organizations"].values(): for user_data in org_data["users"].values(): client = utils.get_client_sysadmin() assert_login_org( client, user_data["username"], user_data["password"], org_data["name"] ) client.logout() client = utils.get_client_sysadmin() assert_logout_login_org( client, user_data["username"], user_data["password"], org_data["name"] ) client.logout() client = utils.get_client_sysadmin() assert_login_invalid(client, "invalid", "invalid") client.logout() client = utils.get_client_sysadmin() assert_login_org_invalid(client, "invalid", "invalid", None) client.logout() client = utils.get_client_sysadmin() assert_login_org_invalid(client, "invalid", "invalid", "invalid") client.logout() def test_logout(data): def assert_logout(client): utils.assert_access_token(client) client.logout() utils.assert_not_access_token(client) def assert_logout_fails(client): with pytest.raises(StatusCodeException) as e: client.logout() utils.assert_status_code_exception( exception=e.value, status_code=401, method="POST", url=utils.get_url("auth/logout"), data={"msg": "Missing Authorization Header"}, ) for user_data in data["users"].values(): client = utils.get_client(user_data["username"], user_data["password"]) assert_logout(client) client = utils.get_client_org( user_data["username"], user_data["password"], None ) assert_logout(client) for org_data in data["organizations"].values(): for user_data in org_data["users"].values(): client = utils.get_client_org( user_data["username"], user_data["password"], org_data["name"] ) assert_logout(client) client = utils.get_client_sysadmin() client.logout() assert_logout_fails(client) def test_refresh(data): def assert_refresh(client): utils.assert_access_token(client) old_token = client._get_access_token() client.refresh() utils.assert_access_token(client) new_token = client._get_access_token() assert old_token != new_token def assert_refresh_fails(client): with pytest.raises(StatusCodeException) as e: client.refresh() utils.assert_status_code_exception( exception=e.value, status_code=401, method="POST", url=utils.get_url("auth/refresh"), data={"msg": "Missing Authorization Header"}, ) for user_data in data["users"].values(): client = utils.get_client(user_data["username"], user_data["password"]) assert_refresh(client) client.logout() client = utils.get_client_org( user_data["username"], user_data["password"], None ) assert_refresh(client) client.logout() for org_data in data["organizations"].values(): for user_data in org_data["users"].values(): client = utils.get_client_org( user_data["username"], user_data["password"], org_data["name"] ) assert_refresh(client) client.logout() client = utils.get_client_sysadmin() client.logout() assert_refresh_fails(client)
31.943262
86
0.640653
1,051
9,008
5.221694
0.117031
0.055394
0.053571
0.069242
0.815598
0.806487
0.79191
0.775146
0.743622
0.666181
0
0.004451
0.251776
9,008
281
87
32.05694
0.809792
0.066607
0
0.704434
0
0
0.079957
0
0
0
0
0
0.315271
1
0.08867
false
0.172414
0.024631
0
0.1133
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
76ab1adbe5736741fd2f591c39bd03d8f98d4b71
1,500
py
Python
Bkikiboard.py
tayayan/suisho
b456457410890ed09a8eac13efb4be259a65430c
[ "MIT" ]
1
2021-01-26T11:38:45.000Z
2021-01-26T11:38:45.000Z
Wkikiboard.py
tayayan/suisho
b456457410890ed09a8eac13efb4be259a65430c
[ "MIT" ]
null
null
null
Wkikiboard.py
tayayan/suisho
b456457410890ed09a8eac13efb4be259a65430c
[ "MIT" ]
null
null
null
k1a,k2a,k3a,k4a,k5a,k6a,k7a,k8a,k9a = 0,0,0,0,0,0,0,0,0 k1b,k2b,k3b,k4b,k5b,k6b,k7b,k8b,k9b = 0,0,0,0,0,0,0,0,0 k1c,k2c,k3c,k4c,k5c,k6c,k7c,k8c,k9c = 0,0,0,0,0,0,0,0,0 k1d,k2d,k3d,k4d,k5d,k6d,k7d,k8d,k9d = 0,0,0,0,0,0,0,0,0 k1e,k2e,k3e,k4e,k5e,k6e,k7e,k8e,k9e = 0,0,0,0,0,0,0,0,0 k1f,k2f,k3f,k4f,k5f,k6f,k7f,k8f,k9f = 0,0,0,0,0,0,0,0,0 k1g,k2g,k3g,k4g,k5g,k6g,k7g,k8g,k9g = 0,0,0,0,0,0,0,0,0 k1h,k2h,k3h,k4h,k5h,k6h,k7h,k8h,k9h = 0,0,0,0,0,0,0,0,0 k1i,k2i,k3i,k4i,k5i,k6i,k7i,k8i,k9i = 0,0,0,0,0,0,0,0,0 def shoki(): global k1a,k2a,k3a,k4a,k5a,k6a,k7a,k8a,k9a,\ k1b,k2b,k3b,k4b,k5b,k6b,k7b,k8b,k9b,\ k1c,k2c,k3c,k4c,k5c,k6c,k7c,k8c,k9c,\ k1d,k2d,k3d,k4d,k5d,k6d,k7d,k8d,k9d,\ k1e,k2e,k3e,k4e,k5e,k6e,k7e,k8e,k9e,\ k1f,k2f,k3f,k4f,k5f,k6f,k7f,k8f,k9f,\ k1g,k2g,k3g,k4g,k5g,k6g,k7g,k8g,k9g,\ k1h,k2h,k3h,k4h,k5h,k6h,k7h,k8h,k9h,\ k1i,k2i,k3i,k4i,k5i,k6i,k7i,k8i,k9i k1a,k2a,k3a,k4a,k5a,k6a,k7a,k8a,k9a = 0,0,0,0,0,0,0,0,0 k1b,k2b,k3b,k4b,k5b,k6b,k7b,k8b,k9b = 0,0,0,0,0,0,0,0,0 k1c,k2c,k3c,k4c,k5c,k6c,k7c,k8c,k9c = 0,0,0,0,0,0,0,0,0 k1d,k2d,k3d,k4d,k5d,k6d,k7d,k8d,k9d = 0,0,0,0,0,0,0,0,0 k1e,k2e,k3e,k4e,k5e,k6e,k7e,k8e,k9e = 0,0,0,0,0,0,0,0,0 k1f,k2f,k3f,k4f,k5f,k6f,k7f,k8f,k9f = 0,0,0,0,0,0,0,0,0 k1g,k2g,k3g,k4g,k5g,k6g,k7g,k8g,k9g = 0,0,0,0,0,0,0,0,0 k1h,k2h,k3h,k4h,k5h,k6h,k7h,k8h,k9h = 0,0,0,0,0,0,0,0,0 k1i,k2i,k3i,k4i,k5i,k6i,k7i,k8i,k9i = 0,0,0,0,0,0,0,0,0
45.454545
59
0.603333
408
1,500
2.218137
0.208333
0.318232
0.41768
0.477348
0.98453
0.98453
0.98453
0.98453
0.98453
0.716022
0
0.31106
0.132
1,500
32
60
46.875
0.384025
0
0
0.642857
0
0
0
0
0
0
0
0
0
1
0.035714
true
0
0
0
0.035714
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
12
4f13f85938c7b9ec4efe0234fb0f02488d5478fa
129
py
Python
tests/test_pypkgs_rtaph.py
rtaph/pypkgs_rtaph
b215c28b5ffd26ee5f934326236e8eeb3038dc15
[ "MIT" ]
null
null
null
tests/test_pypkgs_rtaph.py
rtaph/pypkgs_rtaph
b215c28b5ffd26ee5f934326236e8eeb3038dc15
[ "MIT" ]
null
null
null
tests/test_pypkgs_rtaph.py
rtaph/pypkgs_rtaph
b215c28b5ffd26ee5f934326236e8eeb3038dc15
[ "MIT" ]
null
null
null
from pypkgs_rtaph import __version__ from pypkgs_rtaph import pypkgs_rtaph def test_version(): assert __version__ == '0.1.0'
25.8
37
0.790698
19
129
4.736842
0.526316
0.366667
0.333333
0.466667
0
0
0
0
0
0
0
0.027027
0.139535
129
5
38
25.8
0.783784
0
0
0
0
0
0.038462
0
0
0
0
0
0.25
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
9
4f63117d2d56a30b1a25fe553023e2289ec39aa7
399,518
py
Python
5algo/data_homo.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
null
null
null
5algo/data_homo.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
null
null
null
5algo/data_homo.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
1
2021-03-21T17:54:26.000Z
2021-03-21T17:54:26.000Z
data_list4 = [({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.506, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.464, 1.6], 't1': [0.326, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.381, 1.6], 't3': [0.461, 1.6], 't2': [0.33, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.43, 1.6], 't2': [0.315, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.412, 1.6], 't4': [0.471, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.46, 1.6], 't2': [0.367, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.382, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.345, 1.6], 't2': [0.53, 1.6], 't4': [0.337, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.339, 1.6], 't3': [0.54, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.506, 1.6], 't2': [0.429, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.45, 1.6], 't3': [0.355, 1.6], 't2': [0.32, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.539, 1.6], 't4': [0.502, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.371, 1.6], 't1': [0.516, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.319, 1.6], 't2': [0.524, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.352, 1.6], 't4': [0.516, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.325, 1.6], 't4': [0.415, 1.6], 't3': [0.469, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.442, 1.6], 't2': [0.326, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.448, 1.6], 't3': [0.469, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.485, 1.6], 't5': [0.324, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.405, 1.6], 't3': [0.456, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.448, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.52, 1.6], 't4': [0.533, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.456, 1.6], 't2': [0.382, 1.6], 't3': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.458, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.337, 1.6], 't2': [0.483, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.405, 1.6], 't3': [0.338, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.525, 1.6], 't2': [0.413, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.537, 1.6], 't2': [0.449, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.498, 1.6], 't4': [0.302, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.317, 1.6], 't4': [0.435, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.47, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.504, 1.6], 't5': [0.432, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.361, 1.6], 't2': [0.428, 1.6], 't4': [0.392, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.373, 1.6], 't3': [0.49, 1.6], 't2': [0.508, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.457, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.419, 1.6], 't2': [0.416, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.321, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.392, 1.6], 't3': [0.304, 1.6], 't4': [0.493, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.445, 1.6], 't4': [0.353, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.496, 1.6], 't3': [0.542, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.311, 1.6], 't3': [0.441, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.512, 1.6], 't2': [0.379, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.384, 1.6], 't2': [0.411, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.458, 1.6], 't2': [0.443, 1.6], 't5': [0.466, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.502, 1.6], 't5': [0.514, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.41, 1.6], 't1': [0.479, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.388, 1.6], 't2': [0.38, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.382, 1.6], 't3': [0.407, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.351, 1.6], 't4': [0.31, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.318, 1.6], 't3': [0.481, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.432, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.381, 1.6], 't4': [0.34, 1.6], 't1': [0.419, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.42, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.483, 1.6], 't3': [0.548, 1.6], 't4': [0.525, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.539, 1.6], 't5': [0.386, 1.6], 't3': [0.495, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.533, 1.6], 't2': [0.452, 1.6], 't3': [0.425, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.43, 1.6], 't5': [0.547, 1.6], 't3': [0.504, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.469, 1.6], 't2': [0.483, 1.6], 't4': [0.317, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.384, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.521, 1.6], 't2': [0.428, 1.6], 't3': [0.542, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.468, 1.6], 't5': [0.518, 1.6], 't4': [0.312, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.397, 1.6], 't2': [0.494, 1.6], 't3': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.313, 1.6], 't5': [0.441, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.485, 1.6], 't5': [0.486, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.374, 1.6], 't2': [0.31, 1.6], 't3': [0.422, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.37, 1.6], 't4': [0.396, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.372, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.344, 1.6], 't4': [0.506, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.531, 1.6], 't2': [0.47, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.485, 1.6], 't1': [0.441, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.498, 1.6], 't4': [0.393, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.523, 1.6], 't4': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.402, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.321, 1.6], 't3': [0.41, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.354, 1.6], 't1': [0.369, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.484, 1.6], 't2': [0.526, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.536, 1.6], 't2': [0.362, 1.6], 't3': [0.312, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.501, 1.6], 't1': [0.353, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.494, 1.6], 't2': [0.306, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.377, 1.6], 't5': [0.367, 1.6], 't2': [0.407, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.396, 1.6], 't2': [0.41, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.344, 1.6], 't3': [0.536, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.498, 1.6], 't5': [0.442, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.461, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.419, 1.6], 't4': [0.446, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.486, 1.6], 't2': [0.414, 1.6], 't3': [0.535, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.439, 1.6], 't4': [0.368, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.489, 1.6], 't4': [0.545, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.512, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.498, 1.6], 't4': [0.443, 1.6], 't3': [0.379, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.359, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.394, 1.6], 't3': [0.441, 1.6], 't1': [0.52, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.469, 1.6], 't5': [0.407, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.308, 1.6], 't4': [0.435, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.489, 1.6], 't1': [0.311, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.338, 1.6], 't5': [0.413, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.539, 1.6], 't5': [0.45, 1.6], 't2': [0.423, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.516, 1.6], 't4': [0.355, 1.6], 't1': [0.378, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.509, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.346, 1.6], 't5': [0.327, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.384, 1.6], 't5': [0.513, 1.6], 't2': [0.475, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.423, 1.6], 't4': [0.407, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.444, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.472, 1.6], 't5': [0.366, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.351, 1.6], 't3': [0.532, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.339, 1.6], 't1': [0.393, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.313, 1.6], 't2': [0.304, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.464, 1.6], 't2': [0.353, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.397, 1.6], 't5': [0.477, 1.6], 't4': [0.336, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.407, 1.6], 't2': [0.387, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.443, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.493, 1.6], 't4': [0.391, 1.6], 't1': [0.48, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.342, 1.6], 't5': [0.513, 1.6], 't3': [0.381, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.323, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.426, 1.6], 't5': [0.313, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.308, 1.6], 't3': [0.322, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.534, 1.6], 't3': [0.41, 1.6], 't4': [0.433, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.443, 1.6], 't3': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.481, 1.6], 't3': [0.469, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.476, 1.6], 't5': [0.476, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.311, 1.6], 't3': [0.549, 1.6], 't4': [0.366, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.493, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.453, 1.6], 't2': [0.46, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.449, 1.6], 't5': [0.459, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.52, 1.6], 't3': [0.321, 1.6], 't2': [0.481, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.395, 1.6], 't4': [0.321, 1.6], 't2': [0.374, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.493, 1.6], 't3': [0.301, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.397, 1.6], 't3': [0.501, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.363, 1.6], 't1': [0.465, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.42, 1.6], 't2': [0.545, 1.6], 't1': [0.38, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.482, 1.6], 't2': [0.324, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.522, 1.6], 't3': [0.543, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.543, 1.6], 't2': [0.338, 1.6], 't3': [0.55, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.359, 1.6], 't3': [0.447, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.317, 1.6], 't3': [0.426, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.309, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.369, 1.6], 't4': [0.473, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.388, 1.6], 't5': [0.524, 1.6], 't3': [0.344, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.451, 1.6], 't2': [0.49, 1.6], 't1': [0.346, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.371, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.371, 1.6], 't2': [0.528, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.513, 1.6], 't5': [0.547, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.306, 1.6], 't3': [0.548, 1.6], 't5': [0.512, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.525, 1.6], 't5': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.5, 1.6], 't3': [0.33, 1.6], 't5': [0.406, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.479, 1.6], 't4': [0.516, 1.6], 't3': [0.374, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.401, 1.6], 't2': [0.493, 1.6], 't5': [0.413, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.526, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.35, 1.6], 't4': [0.531, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.423, 1.6], 't2': [0.394, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.35, 1.6], 't4': [0.33, 1.6], 't3': [0.515, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.319, 1.6], 't3': [0.32, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.538, 1.6], 't4': [0.422, 1.6], 't3': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.303, 1.6], 't3': [0.369, 1.6], 't1': [0.391, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.536, 1.6], 't4': [0.416, 1.6], 't3': [0.355, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.389, 1.6], 't4': [0.44, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.306, 1.6], 't4': [0.335, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.331, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.499, 1.6], 't2': [0.485, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.412, 1.6], 't4': [0.41, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.445, 1.6], 't5': [0.501, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.419, 1.6], 't3': [0.542, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.464, 1.6], 't4': [0.445, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.404, 1.6], 't4': [0.349, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.325, 1.6], 't2': [0.375, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.515, 1.6], 't3': [0.495, 1.6], 't1': [0.453, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.482, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.429, 1.6], 't4': [0.445, 1.6], 't5': [0.549, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.326, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.378, 1.6], 't4': [0.443, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.481, 1.6], 't4': [0.414, 1.6], 't5': [0.426, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.326, 1.6], 't4': [0.543, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.378, 1.6], 't5': [0.477, 1.6], 't2': [0.443, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.371, 1.6], 't3': [0.361, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.512, 1.6], 't1': [0.329, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.311, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.329, 1.6], 't5': [0.419, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.479, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.357, 1.6], 't2': [0.306, 1.6], 't3': [0.508, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.448, 1.6], 't3': [0.411, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.36, 1.6], 't3': [0.485, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.523, 1.6], 't4': [0.475, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.524, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.436, 1.6], 't5': [0.503, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.541, 1.6], 't2': [0.366, 1.6], 't3': [0.365, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.346, 1.6], 't5': [0.416, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.316, 1.6], 't2': [0.444, 1.6], 't5': [0.444, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.534, 1.6], 't2': [0.307, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.317, 1.6], 't3': [0.33, 1.6], 't2': [0.483, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.381, 1.6], 't2': [0.415, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.422, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.532, 1.6], 't1': [0.485, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.389, 1.6], 't2': [0.435, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.38, 1.6], 't3': [0.436, 1.6], 't5': [0.353, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.48, 1.6], 't2': [0.475, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.509, 1.6], 't3': [0.324, 1.6], 't1': [0.302, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.421, 1.6], 't4': [0.53, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.328, 1.6], 't2': [0.385, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.519, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.316, 1.6], 't3': [0.378, 1.6], 't5': [0.409, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.48, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.326, 1.6], 't3': [0.487, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.325, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.305, 1.6], 't1': [0.532, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.514, 1.6], 't4': [0.534, 1.6], 't1': [0.336, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.416, 1.6], 't3': [0.369, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.445, 1.6], 't3': [0.3, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.456, 1.6], 't2': [0.309, 1.6], 't4': [0.525, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.326, 1.6], 't3': [0.378, 1.6], 't2': [0.34, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.542, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.474, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.33, 1.6], 't2': [0.539, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.397, 1.6], 't3': [0.343, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.544, 1.6], 't4': [0.315, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.494, 1.6], 't4': [0.454, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.414, 1.6], 't3': [0.371, 1.6], 't4': [0.507, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.351, 1.6], 't2': [0.503, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.526, 1.6], 't2': [0.439, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.456, 1.6], 't5': [0.452, 1.6], 't2': [0.487, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.501, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.535, 1.6], 't3': [0.54, 1.6], 't4': [0.525, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.546, 1.6], 't3': [0.497, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.328, 1.6], 't4': [0.541, 1.6], 't2': [0.344, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.325, 1.6], 't5': [0.519, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.506, 1.6], 't3': [0.358, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.541, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.448, 1.6], 't3': [0.344, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.328, 1.6], 't3': [0.524, 1.6], 't4': [0.364, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.438, 1.6], 't2': [0.532, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.534, 1.6], 't4': [0.302, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.459, 1.6], 't3': [0.433, 1.6], 't4': [0.38, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.326, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.435, 1.6], 't4': [0.42, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.53, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.369, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.412, 1.6], 't4': [0.366, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.316, 1.6], 't3': [0.38, 1.6], 't5': [0.394, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.496, 1.6], 't4': [0.378, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.516, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.31, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.41, 1.6], 't4': [0.49, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.531, 1.6], 't5': [0.331, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.49, 1.6], 't5': [0.474, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.349, 1.6], 't5': [0.467, 1.6], 't2': [0.479, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.385, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.492, 1.6], 't3': [0.327, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.487, 1.6], 't4': [0.477, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.419, 1.6], 't5': [0.358, 1.6], 't1': [0.447, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.346, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.314, 1.6], 't4': [0.523, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.493, 1.6], 't3': [0.434, 1.6], 't5': [0.389, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.438, 1.6], 't3': [0.463, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.323, 1.6], 't3': [0.351, 1.6], 't4': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.41, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.319, 1.6], 't5': [0.412, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.309, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.485, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.538, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.397, 1.6], 't4': [0.325, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.39, 1.6], 't5': [0.527, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.478, 1.6], 't1': [0.403, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.316, 1.6], 't4': [0.539, 1.6], 't3': [0.386, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.413, 1.6], 't4': [0.344, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.501, 1.6], 't5': [0.388, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.354, 1.6], 't5': [0.308, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.486, 1.6], 't2': [0.381, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.318, 1.6], 't2': [0.338, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.472, 1.6], 't3': [0.362, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.375, 1.6], 't4': [0.499, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.433, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.372, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.315, 1.6], 't4': [0.429, 1.6], 't3': [0.387, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.316, 1.6], 't2': [0.499, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.497, 1.6], 't1': [0.337, 1.6], 't4': [0.413, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.367, 1.6], 't4': [0.317, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.392, 1.6], 't4': [0.396, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.488, 1.6], 't4': [0.308, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.521, 1.6], 't4': [0.329, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.456, 1.6], 't1': [0.527, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.321, 1.6], 't5': [0.307, 1.6], 't3': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.406, 1.6], 't2': [0.313, 1.6], 't4': [0.367, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.412, 1.6], 't4': [0.482, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.395, 1.6], 't4': [0.525, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.51, 1.6], 't4': [0.306, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.512, 1.6], 't4': [0.5, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.354, 1.6], 't4': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.54, 1.6], 't2': [0.539, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.308, 1.6], 't3': [0.445, 1.6], 't5': [0.319, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.497, 1.6], 't2': [0.463, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.326, 1.6], 't3': [0.33, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.409, 1.6], 't2': [0.308, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.402, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.502, 1.6], 't4': [0.308, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.523, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.423, 1.6], 't5': [0.477, 1.6], 't3': [0.319, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.391, 1.6], 't2': [0.545, 1.6], 't5': [0.362, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.464, 1.6], 't3': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.403, 1.6], 't5': [0.351, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.404, 1.6], 't4': [0.374, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.321, 1.6], 't5': [0.44, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.501, 1.6], 't2': [0.492, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.311, 1.6], 't3': [0.457, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.542, 1.6], 't3': [0.369, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.362, 1.6], 't4': [0.366, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.348, 1.6], 't4': [0.393, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.338, 1.6], 't5': [0.54, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.303, 1.6], 't3': [0.366, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.357, 1.6], 't3': [0.401, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.329, 1.6], 't4': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.343, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.361, 1.6], 't2': [0.529, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.313, 1.6], 't2': [0.364, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.484, 1.6], 't2': [0.315, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.411, 1.6], 't3': [0.466, 1.6], 't4': [0.466, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.433, 1.6], 't3': [0.511, 1.6], 't1': [0.325, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.312, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.524, 1.6], 't4': [0.452, 1.6], 't2': [0.441, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.409, 1.6], 't4': [0.318, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.329, 1.6], 't3': [0.481, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.342, 1.6], 't3': [0.44, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.457, 1.6], 't4': [0.523, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.424, 1.6], 't2': [0.439, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.337, 1.6], 't2': [0.412, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.513, 1.6], 't3': [0.541, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.498, 1.6], 't1': [0.484, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.443, 1.6], 't2': [0.374, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.429, 1.6], 't2': [0.506, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.547, 1.6], 't4': [0.343, 1.6], 't3': [0.312, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.503, 1.6], 't4': [0.546, 1.6], 't1': [0.356, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.392, 1.6], 't4': [0.486, 1.6], 't5': [0.317, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.393, 1.6], 't3': [0.352, 1.6], 't4': [0.34, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.508, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.544, 1.6], 't5': [0.445, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.486, 1.6], 't3': [0.371, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.368, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.538, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.533, 1.6], 't5': [0.376, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.482, 1.6], 't5': [0.484, 1.6], 't3': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.358, 1.6], 't4': [0.535, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.442, 1.6], 't4': [0.442, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.449, 1.6], 't1': [0.365, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.336, 1.6], 't5': [0.341, 1.6], 't3': [0.438, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.526, 1.6], 't2': [0.518, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.498, 1.6], 't4': [0.376, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.546, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.362, 1.6], 't2': [0.493, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.438, 1.6], 't4': [0.489, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.532, 1.6], 't4': [0.541, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.333, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.301, 1.6], 't4': [0.546, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.506, 1.6], 't5': [0.492, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.313, 1.6], 't3': [0.444, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.52, 1.6], 't4': [0.52, 1.6], 't2': [0.503, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.397, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.454, 1.6], 't3': [0.439, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.418, 1.6], 't4': [0.53, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.327, 1.6], 't5': [0.442, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.411, 1.6], 't4': [0.498, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.516, 1.6], 't5': [0.413, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.315, 1.6], 't2': [0.394, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.409, 1.6], 't4': [0.385, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.403, 1.6], 't2': [0.528, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.549, 1.6], 't3': [0.382, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.502, 1.6], 't5': [0.332, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.523, 1.6], 't2': [0.422, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.431, 1.6], 't4': [0.408, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.352, 1.6], 't2': [0.463, 1.6], 't4': [0.422, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.465, 1.6], 't1': [0.429, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.346, 1.6], 't4': [0.541, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.403, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.337, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.413, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.492, 1.6], 't5': [0.322, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.329, 1.6], 't1': [0.386, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.517, 1.6], 't1': [0.542, 1.6], 't5': [0.475, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.534, 1.6], 't5': [0.35, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.438, 1.6], 't2': [0.351, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.404, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.358, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.33, 1.6], 't5': [0.523, 1.6], 't3': [0.348, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.497, 1.6], 't5': [0.302, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.489, 1.6], 't4': [0.463, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.397, 1.6], 't4': [0.386, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.373, 1.6], 't4': [0.493, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.489, 1.6], 't5': [0.496, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.363, 1.6], 't2': [0.44, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.523, 1.6], 't3': [0.374, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.386, 1.6], 't3': [0.408, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.544, 1.6], 't2': [0.369, 1.6], 't3': [0.31, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.346, 1.6], 't2': [0.451, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.5, 1.6], 't4': [0.347, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.397, 1.6], 't4': [0.405, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.306, 1.6], 't2': [0.366, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.42, 1.6], 't2': [0.533, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.44, 1.6], 't4': [0.44, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.333, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.315, 1.6], 't3': [0.431, 1.6], 't5': [0.437, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.534, 1.6], 't4': [0.38, 1.6], 't5': [0.548, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.332, 1.6], 't4': [0.307, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.498, 1.6], 't2': [0.369, 1.6], 't3': [0.331, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.493, 1.6], 't4': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.413, 1.6], 't5': [0.433, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.386, 1.6], 't5': [0.546, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.429, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.374, 1.6], 't3': [0.416, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.48, 1.6], 't4': [0.497, 1.6], 't3': [0.533, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.307, 1.6], 't3': [0.307, 1.6], 't2': [0.396, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.434, 1.6], 't3': [0.525, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.535, 1.6], 't4': [0.519, 1.6], 't2': [0.518, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.357, 1.6], 't3': [0.523, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.308, 1.6], 't4': [0.492, 1.6], 't5': [0.449, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.446, 1.6], 't4': [0.32, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.458, 1.6], 't3': [0.414, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.386, 1.6], 't2': [0.324, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.471, 1.6], 't5': [0.384, 1.6], 't3': [0.34, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.486, 1.6], 't5': [0.492, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.484, 1.6], 't5': [0.41, 1.6], 't3': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.467, 1.6], 't4': [0.44, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.502, 1.6], 't3': [0.496, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.406, 1.6], 't3': [0.396, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.462, 1.6], 't4': [0.488, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.514, 1.6], 't4': [0.494, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.529, 1.6], 't1': [0.494, 1.6], 't4': [0.371, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.489, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.372, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.46, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.458, 1.6], 't3': [0.327, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.382, 1.6], 't2': [0.47, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.335, 1.6], 't3': [0.548, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.368, 1.6], 't4': [0.34, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.467, 1.6], 't1': [0.463, 1.6], 't5': [0.505, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.335, 1.6], 't2': [0.475, 1.6], 't4': [0.418, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.52, 1.6], 't3': [0.491, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.388, 1.6], 't5': [0.526, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.51, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.517, 1.6], 't2': [0.52, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.441, 1.6], 't5': [0.42, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.522, 1.6], 't5': [0.453, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.472, 1.6], 't4': [0.479, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.368, 1.6], 't3': [0.533, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.394, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.328, 1.6], 't4': [0.544, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.465, 1.6], 't4': [0.491, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.338, 1.6], 't4': [0.527, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.477, 1.6], 't3': [0.534, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.489, 1.6], 't1': [0.532, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.399, 1.6], 't5': [0.532, 1.6], 't2': [0.544, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.32, 1.6], 't2': [0.322, 1.6], 't5': [0.333, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.313, 1.6], 't1': [0.435, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.45, 1.6], 't5': [0.49, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.477, 1.6], 't4': [0.3, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.432, 1.6], 't4': [0.368, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.436, 1.6], 't2': [0.417, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.476, 1.6], 't2': [0.483, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.542, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.321, 1.6], 't3': [0.361, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.394, 1.6], 't4': [0.36, 1.6], 't2': [0.342, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.333, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.464, 1.6], 't4': [0.351, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.319, 1.6], 't3': [0.424, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.478, 1.6], 't3': [0.457, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.368, 1.6], 't4': [0.436, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.34, 1.6], 't3': [0.464, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.549, 1.6], 't3': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.306, 1.6], 't2': [0.328, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.318, 1.6], 't3': [0.327, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.338, 1.6], 't5': [0.409, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.309, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.47, 1.6], 't2': [0.387, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.381, 1.6], 't2': [0.546, 1.6], 't3': [0.348, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.464, 1.6], 't4': [0.411, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.54, 1.6], 't4': [0.381, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.392, 1.6], 't2': [0.32, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.471, 1.6], 't4': [0.367, 1.6], 't3': [0.355, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.413, 1.6], 't3': [0.492, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.348, 1.6], 't1': [0.334, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.302, 1.6], 't2': [0.343, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.517, 1.6], 't3': [0.37, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.377, 1.6], 't2': [0.524, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.507, 1.6], 't4': [0.301, 1.6], 't3': [0.4, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.316, 1.6], 't1': [0.494, 1.6], 't2': [0.446, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.337, 1.6], 't3': [0.465, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.423, 1.6], 't1': [0.518, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.38, 1.6], 't4': [0.347, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.506, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.482, 1.6], 't5': [0.519, 1.6], 't4': [0.308, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.433, 1.6], 't1': [0.443, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.323, 1.6], 't4': [0.528, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.353, 1.6], 't5': [0.321, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.424, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.454, 1.6], 't4': [0.461, 1.6], 't2': [0.539, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.38, 1.6], 't1': [0.306, 1.6], 't3': [0.53, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.337, 1.6], 't5': [0.301, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.475, 1.6], 't4': [0.436, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.357, 1.6], 't1': [0.311, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.326, 1.6], 't4': [0.4, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.431, 1.6], 't5': [0.317, 1.6], 't3': [0.408, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.492, 1.6], 't4': [0.354, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.331, 1.6], 't3': [0.421, 1.6], 't1': [0.525, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.488, 1.6], 't1': [0.453, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.338, 1.6], 't5': [0.416, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.302, 1.6], 't2': [0.378, 1.6], 't5': [0.536, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.511, 1.6], 't5': [0.373, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.416, 1.6], 't3': [0.394, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.407, 1.6], 't1': [0.403, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.516, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.37, 1.6], 't5': [0.328, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.477, 1.6], 't2': [0.379, 1.6], 't4': [0.344, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.381, 1.6], 't2': [0.344, 1.6], 't4': [0.435, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.487, 1.6], 't2': [0.528, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.545, 1.6], 't4': [0.474, 1.6], 't1': [0.465, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.5, 1.6], 't4': [0.318, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.386, 1.6], 't5': [0.502, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.331, 1.6], 't4': [0.459, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.484, 1.6], 't1': [0.354, 1.6], 't5': [0.466, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.548, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.45, 1.6], 't3': [0.434, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.316, 1.6], 't3': [0.402, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.499, 1.6], 't1': [0.544, 1.6], 't3': [0.367, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.431, 1.6], 't2': [0.534, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.549, 1.6], 't1': [0.38, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.469, 1.6], 't1': [0.335, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.405, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.488, 1.6], 't4': [0.323, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.343, 1.6], 't2': [0.459, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.482, 1.6], 't3': [0.478, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.324, 1.6], 't4': [0.354, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.37, 1.6], 't4': [0.337, 1.6], 't2': [0.343, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.43, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.471, 1.6], 't5': [0.357, 1.6], 't1': [0.376, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.462, 1.6], 't3': [0.472, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.448, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.541, 1.6], 't4': [0.461, 1.6], 't3': [0.345, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.434, 1.6], 't5': [0.479, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.315, 1.6], 't1': [0.405, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.504, 1.6], 't5': [0.47, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.303, 1.6], 't4': [0.421, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.414, 1.6], 't5': [0.541, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.316, 1.6], 't3': [0.427, 1.6], 't5': [0.416, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.331, 1.6], 't2': [0.377, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.392, 1.6], 't3': [0.448, 1.6], 't5': [0.501, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.308, 1.6], 't3': [0.412, 1.6], 't2': [0.546, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.33, 1.6], 't3': [0.514, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.482, 1.6], 't4': [0.486, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.418, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.522, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.521, 1.6], 't4': [0.538, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.503, 1.6], 't2': [0.411, 1.6], 't3': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.523, 1.6], 't1': [0.462, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.536, 1.6], 't2': [0.511, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.338, 1.6], 't2': [0.417, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.398, 1.6], 't5': [0.456, 1.6], 't4': [0.423, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.466, 1.6], 't3': [0.545, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.508, 1.6], 't2': [0.354, 1.6], 't3': [0.462, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.504, 1.6], 't1': [0.481, 1.6], 't3': [0.473, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.307, 1.6], 't4': [0.464, 1.6], 't3': [0.425, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.355, 1.6], 't1': [0.463, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.546, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.507, 1.6], 't5': [0.454, 1.6], 't4': [0.346, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.307, 1.6], 't5': [0.377, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.488, 1.6], 't3': [0.316, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.524, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.505, 1.6], 't3': [0.437, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.335, 1.6], 't4': [0.512, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.307, 1.6], 't2': [0.323, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.42, 1.6], 't2': [0.51, 1.6], 't4': [0.492, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.414, 1.6], 't5': [0.543, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.372, 1.6], 't2': [0.377, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.395, 1.6], 't2': [0.464, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.424, 1.6], 't2': [0.465, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.533, 1.6], 't4': [0.514, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.381, 1.6], 't2': [0.412, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.317, 1.6], 't5': [0.348, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.531, 1.6], 't5': [0.43, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.394, 1.6], 't3': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.416, 1.6], 't5': [0.373, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.461, 1.6], 't4': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.502, 1.6], 't3': [0.38, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.415, 1.6], 't4': [0.348, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.39, 1.6], 't3': [0.366, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.369, 1.6], 't2': [0.501, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.44, 1.6], 't5': [0.491, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.302, 1.6], 't2': [0.472, 1.6], 't3': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.311, 1.6], 't3': [0.489, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.509, 1.6], 't4': [0.469, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.528, 1.6], 't3': [0.392, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.499, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.306, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.366, 1.6], 't2': [0.428, 1.6], 't3': [0.405, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.343, 1.6], 't1': [0.529, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.309, 1.6], 't4': [0.393, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.373, 1.6], 't5': [0.327, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.32, 1.6], 't3': [0.413, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.495, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.451, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.409, 1.6], 't3': [0.399, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.546, 1.6], 't4': [0.339, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.345, 1.6], 't2': [0.502, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.419, 1.6], 't4': [0.387, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.415, 1.6], 't5': [0.507, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.397, 1.6], 't5': [0.394, 1.6], 't1': [0.481, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.474, 1.6], 't4': [0.394, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.494, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.333, 1.6], 't3': [0.301, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.373, 1.6], 't2': [0.369, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.469, 1.6], 't4': [0.32, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.481, 1.6], 't4': [0.389, 1.6], 't2': [0.354, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.533, 1.6], 't1': [0.383, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.377, 1.6], 't3': [0.52, 1.6], 't2': [0.424, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.306, 1.6], 't5': [0.356, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.379, 1.6], 't5': [0.44, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.364, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.505, 1.6], 't2': [0.527, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.538, 1.6], 't4': [0.481, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.436, 1.6], 't5': [0.475, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.32, 1.6], 't3': [0.393, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.398, 1.6], 't5': [0.356, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.493, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.521, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.475, 1.6], 't4': [0.526, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.446, 1.6], 't3': [0.459, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.368, 1.6], 't3': [0.45, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.444, 1.6], 't2': [0.454, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.512, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.48, 1.6], 't3': [0.318, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.545, 1.6], 't4': [0.439, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.318, 1.6], 't3': [0.45, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.305, 1.6], 't4': [0.515, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.448, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.303, 1.6], 't5': [0.495, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.456, 1.6], 't2': [0.472, 1.6], 't3': [0.472, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.53, 1.6], 't4': [0.346, 1.6], 't1': [0.363, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.506, 1.6], 't2': [0.306, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.403, 1.6], 't2': [0.435, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.457, 1.6], 't4': [0.37, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.4, 1.6], 't3': [0.438, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.346, 1.6], 't5': [0.352, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.435, 1.6], 't4': [0.483, 1.6], 't5': [0.324, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.471, 1.6], 't2': [0.474, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.309, 1.6], 't5': [0.344, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.415, 1.6], 't3': [0.409, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.39, 1.6], 't3': [0.314, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.421, 1.6], 't3': [0.366, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.437, 1.6], 't3': [0.35, 1.6], 't5': [0.459, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.503, 1.6], 't3': [0.351, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.453, 1.6], 't1': [0.52, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.423, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.408, 1.6], 't2': [0.459, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.33, 1.6], 't3': [0.486, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.328, 1.6], 't4': [0.517, 1.6], 't5': [0.339, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.397, 1.6], 't4': [0.441, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.375, 1.6], 't4': [0.354, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.408, 1.6], 't1': [0.53, 1.6], 't4': [0.396, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.375, 1.6], 't4': [0.495, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.465, 1.6], 't5': [0.435, 1.6], 't4': [0.485, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.334, 1.6], 't3': [0.393, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.511, 1.6], 't3': [0.404, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.423, 1.6], 't3': [0.481, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.492, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.436, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.4, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.367, 1.6], 't4': [0.417, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.348, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.362, 1.6], 't1': [0.412, 1.6], 't4': [0.528, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.529, 1.6], 't4': [0.521, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.33, 1.6], 't3': [0.524, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.371, 1.6], 't3': [0.357, 1.6], 't2': [0.481, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.54, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.418, 1.6], 't2': [0.476, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.465, 1.6], 't4': [0.329, 1.6], 't3': [0.523, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.386, 1.6], 't5': [0.37, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.452, 1.6], 't4': [0.489, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.5, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.519, 1.6], 't2': [0.321, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.537, 1.6], 't3': [0.473, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.478, 1.6], 't5': [0.33, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.456, 1.6], 't2': [0.394, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.497, 1.6], 't4': [0.355, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.334, 1.6], 't1': [0.439, 1.6], 't4': [0.432, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.55, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.36, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.477, 1.6], 't2': [0.414, 1.6], 't5': [0.412, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.312, 1.6], 't3': [0.502, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.348, 1.6], 't2': [0.483, 1.6], 't3': [0.472, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.491, 1.6], 't5': [0.317, 1.6], 't4': [0.472, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.349, 1.6], 't4': [0.415, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.538, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.529, 1.6], 't4': [0.403, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.389, 1.6], 't4': [0.36, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.313, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.511, 1.6], 't2': [0.411, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.412, 1.6], 't2': [0.457, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.538, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.427, 1.6], 't3': [0.426, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.38, 1.6], 't4': [0.347, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.433, 1.6], 't3': [0.525, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.483, 1.6], 't4': [0.444, 1.6], 't3': [0.518, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.386, 1.6], 't2': [0.49, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.438, 1.6], 't4': [0.505, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.306, 1.6], 't2': [0.316, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.324, 1.6], 't3': [0.389, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.303, 1.6], 't5': [0.366, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.428, 1.6], 't3': [0.468, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.486, 1.6], 't3': [0.527, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.531, 1.6], 't4': [0.445, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.434, 1.6], 't4': [0.305, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.306, 1.6], 't1': [0.307, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.341, 1.6], 't3': [0.46, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.485, 1.6], 't2': [0.395, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.44, 1.6], 't4': [0.428, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.542, 1.6], 't4': [0.397, 1.6], 't3': [0.468, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.514, 1.6], 't1': [0.4, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.423, 1.6], 't3': [0.41, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.454, 1.6], 't2': [0.519, 1.6], 't3': [0.405, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.335, 1.6], 't1': [0.498, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.498, 1.6], 't2': [0.306, 1.6], 't3': [0.54, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.347, 1.6], 't4': [0.45, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.433, 1.6], 't4': [0.346, 1.6], 't3': [0.433, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.423, 1.6], 't2': [0.336, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.398, 1.6], 't1': [0.536, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.526, 1.6], 't2': [0.458, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.301, 1.6], 't2': [0.542, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.363, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.47, 1.6], 't4': [0.541, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.393, 1.6], 't4': [0.334, 1.6], 't2': [0.419, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.462, 1.6], 't2': [0.387, 1.6], 't1': [0.338, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.528, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.35, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.502, 1.6], 't3': [0.429, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.533, 1.6], 't4': [0.411, 1.6], 't2': [0.498, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.333, 1.6], 't3': [0.376, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.343, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.308, 1.6], 't4': [0.5, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.427, 1.6], 't2': [0.328, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.324, 1.6], 't1': [0.404, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.534, 1.6], 't4': [0.43, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.411, 1.6], 't3': [0.3, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.429, 1.6], 't5': [0.494, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.303, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.329, 1.6], 't2': [0.477, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.326, 1.6], 't5': [0.543, 1.6], 't2': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.544, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.351, 1.6], 't4': [0.506, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.369, 1.6], 't5': [0.445, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.502, 1.6], 't1': [0.351, 1.6], 't3': [0.338, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.355, 1.6], 't1': [0.349, 1.6], 't5': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.315, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.453, 1.6], 't5': [0.412, 1.6], 't3': [0.483, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.542, 1.6], 't3': [0.481, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.454, 1.6], 't4': [0.53, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.433, 1.6], 't4': [0.335, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.406, 1.6], 't5': [0.326, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.476, 1.6], 't3': [0.527, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.524, 1.6], 't4': [0.5, 1.6], 't3': [0.443, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.397, 1.6], 't3': [0.429, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.418, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.406, 1.6], 't4': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.519, 1.6], 't2': [0.49, 1.6], 't5': [0.48, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.421, 1.6], 't4': [0.326, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.425, 1.6], 't2': [0.321, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.518, 1.6], 't2': [0.455, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.364, 1.6], 't2': [0.344, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.398, 1.6], 't2': [0.372, 1.6], 't3': [0.339, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.41, 1.6], 't5': [0.512, 1.6], 't1': [0.365, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.373, 1.6], 't3': [0.534, 1.6], 't1': [0.473, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.376, 1.6], 't4': [0.525, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.519, 1.6], 't3': [0.384, 1.6], 't2': [0.417, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.54, 1.6], 't3': [0.438, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.329, 1.6], 't2': [0.304, 1.6], 't1': [0.39, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.447, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.449, 1.6], 't5': [0.324, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.368, 1.6], 't4': [0.357, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.442, 1.6], 't3': [0.363, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.498, 1.6], 't3': [0.466, 1.6], 't2': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.341, 1.6], 't2': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.529, 1.6], 't1': [0.481, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.312, 1.6], 't4': [0.36, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.417, 1.6], 't4': [0.44, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.418, 1.6], 't4': [0.53, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.434, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.435, 1.6], 't2': [0.546, 1.6], 't4': [0.306, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.306, 1.6], 't5': [0.33, 1.6], 't2': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.314, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.531, 1.6], 't5': [0.435, 1.6], 't1': [0.325, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.444, 1.6], 't3': [0.308, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.366, 1.6], 't4': [0.397, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.526, 1.6], 't4': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.45, 1.6], 't2': [0.543, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.484, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.36, 1.6], 't4': [0.503, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.544, 1.6], 't3': [0.513, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.471, 1.6], 't4': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.46, 1.6], 't5': [0.521, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.315, 1.6], 't3': [0.419, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.431, 1.6], 't3': [0.503, 1.6], 't4': [0.383, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.369, 1.6], 't4': [0.359, 1.6], 't3': [0.521, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.525, 1.6], 't3': [0.398, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.543, 1.6], 't2': [0.407, 1.6], 't4': [0.536, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.459, 1.6], 't4': [0.542, 1.6], 't5': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.405, 1.6], 't5': [0.523, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.363, 1.6], 't2': [0.474, 1.6], 't3': [0.412, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.406, 1.6], 't1': [0.343, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.426, 1.6], 't2': [0.391, 1.6], 't3': [0.365, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.368, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.375, 1.6], 't5': [0.464, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.524, 1.6], 't4': [0.448, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.531, 1.6], 't1': [0.471, 1.6], 't2': [0.345, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.476, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.383, 1.6], 't4': [0.532, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.343, 1.6], 't2': [0.354, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.399, 1.6], 't2': [0.533, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.309, 1.6], 't3': [0.316, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.433, 1.6], 't2': [0.307, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.381, 1.6], 't5': [0.443, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.462, 1.6], 't3': [0.451, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.373, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.305, 1.6], 't4': [0.452, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.432, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.486, 1.6], 't2': [0.486, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.402, 1.6], 't3': [0.485, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.469, 1.6], 't2': [0.322, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.318, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.458, 1.6], 't4': [0.523, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.48, 1.6], 't5': [0.408, 1.6], 't3': [0.454, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.421, 1.6], 't5': [0.418, 1.6], 't2': [0.509, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.403, 1.6], 't3': [0.359, 1.6], 't4': [0.501, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.51, 1.6], 't2': [0.465, 1.6], 't3': [0.338, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.381, 1.6], 't4': [0.355, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.359, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.448, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.466, 1.6], 't2': [0.405, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.313, 1.6], 't4': [0.354, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.44, 1.6], 't4': [0.442, 1.6], 't2': [0.486, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.424, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.43, 1.6], 't4': [0.327, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.41, 1.6], 't3': [0.488, 1.6], 't2': [0.38, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.344, 1.6], 't1': [0.523, 1.6], 't4': [0.411, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.502, 1.6], 't3': [0.322, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.515, 1.6], 't3': [0.53, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.493, 1.6], 't4': [0.319, 1.6], 't3': [0.364, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.528, 1.6], 't2': [0.434, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.308, 1.6], 't2': [0.461, 1.6], 't4': [0.448, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.376, 1.6], 't4': [0.521, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.345, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.327, 1.6], 't4': [0.482, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.338, 1.6], 't3': [0.429, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.366, 1.6], 't2': [0.52, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.517, 1.6], 't3': [0.351, 1.6], 't1': [0.493, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.406, 1.6], 't5': [0.408, 1.6], 't4': [0.327, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.329, 1.6], 't3': [0.396, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.341, 1.6], 't2': [0.431, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.322, 1.6], 't4': [0.48, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.32, 1.6], 't4': [0.34, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.532, 1.6], 't4': [0.513, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.4, 1.6], 't1': [0.379, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.507, 1.6], 't2': [0.51, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.323, 1.6], 't1': [0.407, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.385, 1.6], 't1': [0.345, 1.6], 't4': [0.32, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.403, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.364, 1.6], 't4': [0.403, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.537, 1.6], 't2': [0.419, 1.6], 't5': [0.502, 1.6]})] task_check4 = {'t1': 138, 't2': 429, 't3': 610, 't4': 698, 't5': 326} data_list5 = [({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.503, 1.6], 't3': [0.321, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.341, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.35, 1.6], 't4': [0.43, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.412, 1.6], 't2': [0.334, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.441, 1.6], 't4': [0.435, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.415, 1.6], 't5': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.312, 1.6], 't4': [0.361, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.469, 1.6], 't5': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.379, 1.6], 't3': [0.469, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.366, 1.6], 't4': [0.542, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.304, 1.6], 't3': [0.43, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.332, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.44, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.467, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.496, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.428, 1.6], 't2': [0.4, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.384, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.418, 1.6], 't5': [0.416, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.429, 1.6], 't3': [0.321, 1.6], 't2': [0.335, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.424, 1.6], 't4': [0.391, 1.6], 't2': [0.445, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.419, 1.6], 't2': [0.44, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.315, 1.6], 't3': [0.525, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.423, 1.6], 't2': [0.392, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.44, 1.6], 't4': [0.401, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.472, 1.6], 't5': [0.379, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.435, 1.6], 't2': [0.507, 1.6], 't3': [0.404, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.373, 1.6], 't3': [0.331, 1.6], 't2': [0.32, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.396, 1.6], 't5': [0.331, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.327, 1.6], 't3': [0.514, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.463, 1.6], 't4': [0.393, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.493, 1.6], 't3': [0.515, 1.6], 't2': [0.379, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.355, 1.6], 't5': [0.524, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.467, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.474, 1.6], 't4': [0.326, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.522, 1.6], 't5': [0.326, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.444, 1.6], 't3': [0.516, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.546, 1.6], 't3': [0.341, 1.6], 't4': [0.447, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.469, 1.6], 't2': [0.323, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.409, 1.6], 't4': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.301, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.401, 1.6], 't4': [0.516, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.483, 1.6], 't5': [0.315, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.425, 1.6], 't5': [0.345, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.415, 1.6], 't2': [0.304, 1.6], 't5': [0.465, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.444, 1.6], 't4': [0.364, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.309, 1.6], 't5': [0.427, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.474, 1.6], 't5': [0.381, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.334, 1.6], 't5': [0.342, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.462, 1.6], 't5': [0.36, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.325, 1.6], 't2': [0.348, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.317, 1.6], 't3': [0.38, 1.6], 't2': [0.411, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.385, 1.6], 't5': [0.367, 1.6], 't3': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.448, 1.6], 't4': [0.507, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.477, 1.6], 't4': [0.469, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.436, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.503, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.46, 1.6], 't2': [0.354, 1.6], 't5': [0.5, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.525, 1.6], 't5': [0.308, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.433, 1.6], 't3': [0.491, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.357, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.413, 1.6], 't4': [0.387, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.517, 1.6], 't4': [0.475, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.404, 1.6], 't2': [0.506, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.474, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.347, 1.6], 't5': [0.304, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.528, 1.6], 't4': [0.305, 1.6], 't2': [0.319, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.471, 1.6], 't4': [0.324, 1.6], 't5': [0.303, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.439, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.445, 1.6], 't1': [0.496, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.304, 1.6], 't3': [0.522, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.543, 1.6], 't3': [0.494, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.456, 1.6], 't5': [0.512, 1.6], 't1': [0.391, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.418, 1.6], 't2': [0.347, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.424, 1.6], 't2': [0.426, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.447, 1.6], 't2': [0.54, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.438, 1.6], 't4': [0.461, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.379, 1.6], 't4': [0.538, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.479, 1.6], 't4': [0.373, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.45, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.387, 1.6], 't5': [0.417, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.455, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.367, 1.6], 't2': [0.35, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.34, 1.6], 't2': [0.379, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.317, 1.6], 't3': [0.406, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.427, 1.6], 't3': [0.462, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.303, 1.6], 't3': [0.471, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.364, 1.6], 't2': [0.493, 1.6], 't5': [0.472, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.471, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.479, 1.6], 't4': [0.401, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.54, 1.6], 't3': [0.529, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.338, 1.6], 't3': [0.396, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.368, 1.6], 't4': [0.532, 1.6], 't3': [0.437, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.487, 1.6], 't3': [0.498, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.522, 1.6], 't4': [0.316, 1.6], 't3': [0.366, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.321, 1.6], 't4': [0.46, 1.6], 't1': [0.542, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.351, 1.6], 't3': [0.469, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.505, 1.6], 't2': [0.327, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.476, 1.6], 't5': [0.349, 1.6], 't4': [0.466, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.547, 1.6], 't4': [0.469, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.336, 1.6], 't4': [0.466, 1.6], 't2': [0.395, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.408, 1.6], 't1': [0.364, 1.6], 't3': [0.494, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.385, 1.6], 't4': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.344, 1.6], 't2': [0.432, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.358, 1.6], 't3': [0.354, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.324, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.333, 1.6], 't4': [0.404, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.336, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.424, 1.6], 't2': [0.367, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.466, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.524, 1.6], 't5': [0.427, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.316, 1.6], 't5': [0.306, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.33, 1.6], 't2': [0.533, 1.6], 't3': [0.531, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.471, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.429, 1.6], 't4': [0.325, 1.6], 't2': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.377, 1.6], 't5': [0.364, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.46, 1.6], 't3': [0.333, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.369, 1.6], 't2': [0.326, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.38, 1.6], 't2': [0.511, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.386, 1.6], 't3': [0.316, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.525, 1.6], 't1': [0.43, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.391, 1.6], 't5': [0.315, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.518, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.302, 1.6], 't2': [0.511, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.5, 1.6], 't1': [0.349, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.511, 1.6], 't2': [0.498, 1.6], 't4': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.529, 1.6], 't2': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.535, 1.6], 't2': [0.338, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.393, 1.6], 't4': [0.449, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.427, 1.6], 't1': [0.524, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.512, 1.6], 't1': [0.478, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.453, 1.6], 't4': [0.539, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.518, 1.6], 't4': [0.351, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.444, 1.6], 't2': [0.31, 1.6], 't5': [0.45, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.467, 1.6], 't2': [0.398, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.442, 1.6], 't2': [0.441, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.439, 1.6], 't4': [0.542, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.469, 1.6], 't5': [0.324, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.471, 1.6], 't4': [0.521, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.526, 1.6], 't4': [0.423, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.485, 1.6], 't5': [0.398, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.359, 1.6], 't4': [0.444, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.373, 1.6], 't5': [0.45, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.41, 1.6], 't4': [0.485, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.513, 1.6], 't4': [0.337, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.329, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.457, 1.6], 't2': [0.5, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.518, 1.6], 't2': [0.547, 1.6], 't4': [0.412, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.438, 1.6], 't1': [0.549, 1.6], 't4': [0.46, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.32, 1.6], 't4': [0.4, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.45, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.382, 1.6], 't3': [0.442, 1.6], 't4': [0.306, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.47, 1.6], 't5': [0.519, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.308, 1.6], 't3': [0.323, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.366, 1.6], 't2': [0.37, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.545, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.433, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.483, 1.6], 't3': [0.325, 1.6], 't5': [0.444, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.326, 1.6], 't2': [0.33, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.44, 1.6], 't5': [0.418, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.409, 1.6], 't2': [0.421, 1.6], 't5': [0.348, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.373, 1.6], 't4': [0.547, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.515, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.517, 1.6], 't4': [0.454, 1.6], 't3': [0.487, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.415, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.519, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.403, 1.6], 't5': [0.419, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.425, 1.6], 't3': [0.317, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.521, 1.6], 't1': [0.351, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.333, 1.6], 't4': [0.392, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.481, 1.6], 't4': [0.536, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.497, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.424, 1.6], 't5': [0.447, 1.6], 't2': [0.483, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.361, 1.6], 't2': [0.537, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.391, 1.6], 't2': [0.431, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.484, 1.6], 't3': [0.418, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.505, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.366, 1.6], 't3': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.449, 1.6], 't3': [0.537, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.462, 1.6], 't3': [0.506, 1.6], 't4': [0.342, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.422, 1.6], 't4': [0.355, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.386, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.306, 1.6], 't5': [0.435, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.331, 1.6], 't3': [0.531, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.445, 1.6], 't4': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.34, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.413, 1.6], 't3': [0.505, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.498, 1.6], 't4': [0.478, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.338, 1.6], 't3': [0.436, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.435, 1.6], 't4': [0.344, 1.6], 't3': [0.496, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.479, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.341, 1.6], 't4': [0.466, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.448, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.548, 1.6], 't2': [0.451, 1.6], 't4': [0.323, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.452, 1.6], 't4': [0.316, 1.6], 't5': [0.405, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.402, 1.6], 't1': [0.542, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.374, 1.6], 't2': [0.443, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.478, 1.6], 't5': [0.352, 1.6], 't2': [0.381, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.348, 1.6], 't3': [0.547, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.539, 1.6], 't5': [0.434, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.355, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.442, 1.6], 't3': [0.534, 1.6], 't2': [0.489, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.343, 1.6], 't4': [0.47, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.428, 1.6], 't3': [0.307, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.459, 1.6], 't4': [0.417, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.44, 1.6], 't3': [0.425, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.464, 1.6], 't1': [0.342, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.397, 1.6], 't2': [0.378, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.415, 1.6], 't5': [0.481, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.538, 1.6], 't4': [0.449, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.341, 1.6], 't2': [0.508, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.52, 1.6], 't3': [0.488, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.411, 1.6], 't4': [0.352, 1.6], 't2': [0.366, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.49, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.427, 1.6], 't5': [0.377, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.422, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.382, 1.6], 't5': [0.541, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.529, 1.6], 't4': [0.396, 1.6], 't2': [0.479, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.537, 1.6], 't3': [0.429, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.517, 1.6], 't5': [0.42, 1.6], 't3': [0.401, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.532, 1.6], 't4': [0.353, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.411, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.385, 1.6], 't5': [0.382, 1.6], 't3': [0.435, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.45, 1.6], 't2': [0.343, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.363, 1.6], 't2': [0.363, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.331, 1.6], 't2': [0.471, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.308, 1.6], 't5': [0.544, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.457, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.507, 1.6], 't2': [0.378, 1.6], 't4': [0.508, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.506, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.536, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.48, 1.6], 't4': [0.507, 1.6], 't2': [0.423, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.545, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.489, 1.6], 't3': [0.514, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.478, 1.6], 't3': [0.503, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.55, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.476, 1.6], 't3': [0.379, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.513, 1.6], 't2': [0.323, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.546, 1.6], 't4': [0.525, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.328, 1.6], 't1': [0.496, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.31, 1.6], 't3': [0.3, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.357, 1.6], 't4': [0.396, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.307, 1.6], 't3': [0.543, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.338, 1.6], 't2': [0.531, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.473, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.405, 1.6], 't2': [0.479, 1.6], 't3': [0.425, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.356, 1.6], 't3': [0.408, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.465, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.416, 1.6], 't4': [0.474, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.388, 1.6], 't2': [0.324, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.41, 1.6], 't4': [0.419, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.455, 1.6], 't5': [0.358, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.476, 1.6], 't5': [0.545, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.316, 1.6], 't4': [0.421, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.532, 1.6], 't1': [0.412, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.409, 1.6], 't4': [0.307, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.308, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.543, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.388, 1.6], 't2': [0.46, 1.6], 't5': [0.396, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.472, 1.6], 't4': [0.378, 1.6], 't5': [0.437, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.375, 1.6], 't4': [0.404, 1.6], 't1': [0.49, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.408, 1.6], 't5': [0.541, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.453, 1.6], 't4': [0.508, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.393, 1.6], 't4': [0.362, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.3, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.494, 1.6], 't3': [0.503, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.307, 1.6], 't1': [0.408, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.422, 1.6], 't3': [0.387, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.431, 1.6], 't4': [0.408, 1.6], 't5': [0.504, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.482, 1.6], 't4': [0.352, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.355, 1.6], 't2': [0.313, 1.6], 't5': [0.531, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.522, 1.6], 't5': [0.361, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.414, 1.6], 't3': [0.532, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.477, 1.6], 't2': [0.304, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.513, 1.6], 't4': [0.305, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.391, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.308, 1.6], 't3': [0.436, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.379, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.452, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.415, 1.6], 't2': [0.426, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.508, 1.6], 't4': [0.496, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.531, 1.6], 't3': [0.519, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.433, 1.6], 't4': [0.421, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.369, 1.6], 't3': [0.392, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.449, 1.6], 't2': [0.421, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.471, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.411, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.385, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.45, 1.6], 't5': [0.341, 1.6], 't4': [0.348, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.31, 1.6], 't2': [0.314, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.335, 1.6], 't5': [0.452, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.428, 1.6], 't5': [0.383, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.344, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.482, 1.6], 't4': [0.406, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.423, 1.6], 't2': [0.405, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.47, 1.6], 't3': [0.544, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.507, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.467, 1.6], 't4': [0.434, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.53, 1.6], 't4': [0.408, 1.6], 't5': [0.518, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.401, 1.6], 't4': [0.515, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.478, 1.6], 't4': [0.45, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.467, 1.6], 't1': [0.536, 1.6], 't3': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.446, 1.6], 't2': [0.515, 1.6], 't5': [0.526, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.503, 1.6], 't2': [0.48, 1.6], 't5': [0.349, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.367, 1.6], 't5': [0.389, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.349, 1.6], 't2': [0.411, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.314, 1.6], 't4': [0.358, 1.6], 't2': [0.496, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.328, 1.6], 't4': [0.355, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.338, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.506, 1.6], 't4': [0.38, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.42, 1.6], 't4': [0.505, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.365, 1.6], 't4': [0.487, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.388, 1.6], 't4': [0.5, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.53, 1.6], 't5': [0.524, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.485, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.412, 1.6], 't2': [0.473, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.468, 1.6], 't4': [0.343, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.54, 1.6], 't4': [0.334, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.455, 1.6], 't2': [0.4, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.505, 1.6], 't4': [0.518, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.364, 1.6], 't5': [0.452, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.34, 1.6], 't1': [0.519, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.413, 1.6], 't3': [0.541, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.357, 1.6], 't1': [0.33, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.492, 1.6], 't4': [0.339, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.524, 1.6], 't1': [0.368, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.437, 1.6], 't5': [0.507, 1.6], 't3': [0.367, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.534, 1.6], 't3': [0.535, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.348, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.514, 1.6], 't2': [0.517, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.306, 1.6], 't2': [0.435, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.343, 1.6], 't5': [0.349, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.358, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.489, 1.6], 't5': [0.502, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.53, 1.6], 't2': [0.456, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.54, 1.6], 't1': [0.333, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.32, 1.6], 't4': [0.381, 1.6], 't5': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.478, 1.6], 't1': [0.397, 1.6], 't3': [0.458, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.335, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.528, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.39, 1.6], 't2': [0.458, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.305, 1.6], 't3': [0.499, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.306, 1.6], 't2': [0.519, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.417, 1.6], 't5': [0.407, 1.6], 't3': [0.327, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.484, 1.6], 't5': [0.328, 1.6], 't4': [0.502, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.304, 1.6], 't1': [0.355, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.442, 1.6], 't4': [0.483, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.459, 1.6], 't3': [0.453, 1.6], 't5': [0.459, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.416, 1.6], 't5': [0.393, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.442, 1.6], 't4': [0.451, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.384, 1.6], 't4': [0.527, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.527, 1.6], 't2': [0.399, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.498, 1.6], 't3': [0.534, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.514, 1.6], 't3': [0.316, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.472, 1.6], 't2': [0.513, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.357, 1.6], 't2': [0.419, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.452, 1.6], 't3': [0.315, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.37, 1.6], 't5': [0.346, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.458, 1.6], 't2': [0.342, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.53, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.304, 1.6], 't5': [0.4, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.318, 1.6], 't5': [0.479, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.44, 1.6], 't3': [0.381, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.341, 1.6], 't3': [0.481, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.468, 1.6], 't2': [0.548, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.496, 1.6], 't4': [0.352, 1.6], 't2': [0.384, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.527, 1.6], 't4': [0.43, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.361, 1.6], 't4': [0.375, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.489, 1.6], 't2': [0.456, 1.6], 't4': [0.474, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.446, 1.6], 't4': [0.478, 1.6], 't2': [0.461, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.343, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.495, 1.6], 't3': [0.416, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.407, 1.6], 't2': [0.393, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.52, 1.6], 't3': [0.32, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.432, 1.6], 't3': [0.346, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.506, 1.6], 't4': [0.301, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.409, 1.6], 't2': [0.428, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.361, 1.6], 't2': [0.49, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.32, 1.6], 't3': [0.322, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.444, 1.6], 't3': [0.521, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.353, 1.6], 't4': [0.375, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.466, 1.6], 't4': [0.438, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.319, 1.6], 't1': [0.334, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.314, 1.6], 't4': [0.453, 1.6], 't3': [0.371, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.442, 1.6], 't5': [0.31, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.326, 1.6], 't3': [0.525, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.302, 1.6], 't3': [0.345, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.447, 1.6], 't2': [0.467, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.368, 1.6], 't4': [0.329, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.394, 1.6], 't5': [0.347, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.34, 1.6], 't2': [0.431, 1.6], 't1': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.529, 1.6], 't4': [0.384, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.301, 1.6], 't1': [0.341, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.439, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.477, 1.6], 't3': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.547, 1.6], 't4': [0.338, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.384, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.356, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.528, 1.6], 't2': [0.548, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.377, 1.6], 't3': [0.503, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.354, 1.6], 't4': [0.514, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.495, 1.6], 't2': [0.446, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.536, 1.6], 't5': [0.453, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.342, 1.6], 't3': [0.537, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.473, 1.6], 't4': [0.544, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.54, 1.6], 't2': [0.516, 1.6], 't3': [0.455, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.524, 1.6], 't2': [0.316, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.304, 1.6], 't4': [0.409, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.487, 1.6], 't4': [0.412, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.5, 1.6], 't3': [0.461, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.496, 1.6], 't3': [0.33, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.413, 1.6], 't4': [0.41, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.498, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.489, 1.6], 't2': [0.325, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.311, 1.6], 't5': [0.432, 1.6], 't3': [0.308, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.445, 1.6], 't4': [0.444, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.325, 1.6], 't4': [0.447, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.382, 1.6], 't4': [0.488, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.37, 1.6], 't2': [0.355, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.342, 1.6], 't5': [0.539, 1.6], 't4': [0.459, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.342, 1.6], 't5': [0.531, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.347, 1.6], 't4': [0.487, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.543, 1.6], 't4': [0.328, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.466, 1.6], 't3': [0.39, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.445, 1.6], 't3': [0.361, 1.6], 't4': [0.483, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.517, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.343, 1.6], 't3': [0.442, 1.6], 't2': [0.426, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.515, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.49, 1.6], 't5': [0.469, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.424, 1.6], 't2': [0.426, 1.6], 't5': [0.537, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.404, 1.6], 't3': [0.337, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.337, 1.6], 't4': [0.339, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.338, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.536, 1.6], 't4': [0.421, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.548, 1.6], 't2': [0.4, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.54, 1.6], 't5': [0.382, 1.6], 't2': [0.481, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.518, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.421, 1.6], 't4': [0.394, 1.6], 't5': [0.35, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.325, 1.6], 't2': [0.337, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.385, 1.6], 't3': [0.307, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.417, 1.6], 't4': [0.336, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.363, 1.6], 't5': [0.334, 1.6], 't3': [0.328, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.386, 1.6], 't4': [0.483, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.507, 1.6], 't3': [0.356, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.547, 1.6], 't4': [0.368, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.389, 1.6], 't1': [0.515, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.464, 1.6], 't3': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.409, 1.6], 't4': [0.451, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.456, 1.6], 't4': [0.475, 1.6], 't2': [0.38, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.47, 1.6], 't5': [0.394, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.444, 1.6], 't4': [0.33, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.372, 1.6], 't3': [0.536, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.404, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.335, 1.6], 't3': [0.515, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.327, 1.6], 't4': [0.503, 1.6], 't2': [0.488, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.4, 1.6], 't3': [0.358, 1.6], 't5': [0.371, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.474, 1.6], 't5': [0.46, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.539, 1.6], 't4': [0.456, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.437, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.335, 1.6], 't3': [0.488, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.536, 1.6], 't3': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.31, 1.6], 't2': [0.446, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.429, 1.6], 't2': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.519, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.442, 1.6], 't3': [0.395, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.535, 1.6], 't5': [0.387, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.53, 1.6], 't3': [0.494, 1.6], 't4': [0.305, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.412, 1.6], 't3': [0.427, 1.6], 't5': [0.451, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.468, 1.6], 't3': [0.462, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.367, 1.6], 't3': [0.494, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.347, 1.6], 't3': [0.357, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.312, 1.6], 't4': [0.52, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.416, 1.6], 't2': [0.306, 1.6], 't5': [0.511, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.345, 1.6], 't1': [0.443, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.324, 1.6], 't3': [0.548, 1.6], 't2': [0.369, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.455, 1.6], 't3': [0.446, 1.6], 't4': [0.329, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.352, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.483, 1.6], 't4': [0.431, 1.6], 't5': [0.415, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.494, 1.6], 't2': [0.503, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.308, 1.6], 't2': [0.383, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.442, 1.6], 't2': [0.418, 1.6], 't3': [0.422, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.443, 1.6], 't1': [0.305, 1.6], 't2': [0.344, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.486, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.541, 1.6], 't5': [0.447, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.367, 1.6], 't5': [0.309, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.496, 1.6], 't3': [0.378, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.545, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.366, 1.6], 't5': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.312, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.308, 1.6], 't4': [0.443, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.317, 1.6], 't4': [0.347, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.368, 1.6], 't4': [0.304, 1.6], 't5': [0.3, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.325, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.319, 1.6], 't3': [0.302, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.448, 1.6], 't2': [0.522, 1.6], 't4': [0.516, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.396, 1.6], 't3': [0.364, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.352, 1.6], 't1': [0.44, 1.6], 't2': [0.375, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.478, 1.6], 't4': [0.363, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.378, 1.6], 't3': [0.5, 1.6], 't2': [0.48, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.385, 1.6], 't2': [0.339, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.536, 1.6], 't4': [0.521, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.389, 1.6], 't3': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.54, 1.6], 't5': [0.499, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.373, 1.6], 't3': [0.43, 1.6], 't4': [0.427, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.405, 1.6], 't4': [0.47, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.448, 1.6], 't4': [0.469, 1.6], 't1': [0.497, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.364, 1.6], 't1': [0.309, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.332, 1.6], 't5': [0.319, 1.6], 't3': [0.338, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.534, 1.6], 't3': [0.322, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.432, 1.6], 't4': [0.359, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.532, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.545, 1.6], 't3': [0.326, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.519, 1.6], 't5': [0.323, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.548, 1.6], 't3': [0.339, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.479, 1.6], 't4': [0.435, 1.6], 't1': [0.458, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.504, 1.6], 't2': [0.341, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.304, 1.6], 't5': [0.302, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.432, 1.6], 't2': [0.495, 1.6], 't5': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.496, 1.6], 't3': [0.401, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.389, 1.6], 't3': [0.398, 1.6], 't4': [0.309, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.514, 1.6], 't4': [0.461, 1.6], 't5': [0.45, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.402, 1.6], 't4': [0.356, 1.6], 't1': [0.351, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.393, 1.6], 't4': [0.442, 1.6], 't5': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.335, 1.6], 't3': [0.458, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.413, 1.6], 't4': [0.473, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.38, 1.6], 't3': [0.38, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.415, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.366, 1.6], 't4': [0.474, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.472, 1.6], 't3': [0.31, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.404, 1.6], 't1': [0.356, 1.6], 't5': [0.338, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.479, 1.6], 't3': [0.411, 1.6], 't2': [0.413, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.488, 1.6], 't5': [0.506, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.471, 1.6], 't3': [0.483, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.505, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.514, 1.6], 't3': [0.366, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.492, 1.6], 't4': [0.364, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.414, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.401, 1.6], 't3': [0.527, 1.6], 't5': [0.457, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.317, 1.6], 't3': [0.507, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.544, 1.6], 't4': [0.346, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.492, 1.6], 't4': [0.499, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.392, 1.6], 't5': [0.462, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.376, 1.6], 't4': [0.491, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.44, 1.6], 't3': [0.499, 1.6], 't2': [0.391, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.529, 1.6], 't2': [0.411, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.429, 1.6], 't3': [0.403, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.548, 1.6], 't3': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.51, 1.6], 't2': [0.419, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.364, 1.6], 't2': [0.429, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.467, 1.6], 't1': [0.315, 1.6], 't4': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.408, 1.6], 't3': [0.332, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.321, 1.6], 't4': [0.336, 1.6], 't1': [0.481, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.362, 1.6], 't2': [0.307, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.319, 1.6], 't5': [0.492, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.546, 1.6], 't4': [0.359, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.534, 1.6], 't4': [0.449, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.46, 1.6], 't4': [0.467, 1.6], 't5': [0.431, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.321, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.395, 1.6], 't4': [0.367, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.516, 1.6], 't5': [0.403, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.324, 1.6], 't2': [0.325, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.353, 1.6], 't2': [0.374, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.427, 1.6], 't4': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.416, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.501, 1.6], 't2': [0.453, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.475, 1.6], 't2': [0.475, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.425, 1.6], 't3': [0.447, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.536, 1.6], 't1': [0.455, 1.6], 't3': [0.513, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.428, 1.6], 't2': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.419, 1.6], 't5': [0.338, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.428, 1.6], 't1': [0.398, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.499, 1.6], 't2': [0.376, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.327, 1.6], 't4': [0.431, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.424, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.455, 1.6], 't2': [0.37, 1.6], 't5': [0.342, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.371, 1.6], 't3': [0.502, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.548, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.39, 1.6], 't4': [0.433, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.476, 1.6], 't5': [0.32, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.388, 1.6], 't5': [0.395, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.39, 1.6], 't4': [0.478, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.498, 1.6], 't3': [0.367, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.499, 1.6], 't4': [0.476, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.311, 1.6], 't5': [0.414, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.499, 1.6], 't4': [0.489, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.328, 1.6], 't3': [0.453, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.502, 1.6], 't2': [0.41, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.419, 1.6], 't5': [0.313, 1.6], 't4': [0.416, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.488, 1.6], 't4': [0.306, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.417, 1.6], 't3': [0.393, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.538, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.383, 1.6], 't5': [0.504, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.456, 1.6], 't4': [0.428, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.549, 1.6], 't4': [0.313, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.32, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.366, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.542, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.538, 1.6], 't5': [0.36, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.372, 1.6], 't4': [0.341, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.462, 1.6], 't4': [0.493, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.348, 1.6], 't4': [0.508, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.439, 1.6], 't3': [0.396, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.521, 1.6], 't1': [0.422, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.512, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.417, 1.6], 't3': [0.508, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.509, 1.6], 't5': [0.532, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.324, 1.6], 't3': [0.506, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.53, 1.6], 't3': [0.54, 1.6], 't5': [0.518, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.376, 1.6], 't3': [0.413, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.336, 1.6], 't5': [0.451, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.528, 1.6], 't3': [0.42, 1.6], 't1': [0.508, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.407, 1.6], 't4': [0.373, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.345, 1.6], 't2': [0.359, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.473, 1.6], 't5': [0.377, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.37, 1.6], 't1': [0.328, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.306, 1.6], 't3': [0.435, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.443, 1.6], 't2': [0.413, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.519, 1.6], 't1': [0.4, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.417, 1.6], 't3': [0.385, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.506, 1.6], 't2': [0.35, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.435, 1.6], 't2': [0.358, 1.6], 't4': [0.42, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.472, 1.6], 't3': [0.383, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.528, 1.6], 't4': [0.4, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.311, 1.6], 't5': [0.478, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.394, 1.6], 't2': [0.423, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.487, 1.6], 't4': [0.474, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.33, 1.6], 't2': [0.378, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.542, 1.6], 't4': [0.367, 1.6], 't3': [0.452, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.378, 1.6], 't4': [0.364, 1.6], 't3': [0.462, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.408, 1.6], 't2': [0.388, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.377, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.469, 1.6], 't4': [0.454, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.459, 1.6], 't5': [0.432, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.488, 1.6], 't3': [0.512, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.506, 1.6], 't2': [0.477, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.353, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.338, 1.6], 't3': [0.467, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.325, 1.6], 't3': [0.39, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.532, 1.6], 't2': [0.501, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.404, 1.6], 't5': [0.546, 1.6], 't4': [0.504, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.533, 1.6], 't2': [0.52, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.428, 1.6], 't4': [0.345, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.469, 1.6], 't5': [0.424, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.449, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.528, 1.6], 't1': [0.507, 1.6], 't4': [0.344, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.512, 1.6], 't5': [0.422, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.483, 1.6], 't2': [0.456, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.328, 1.6], 't4': [0.307, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.379, 1.6], 't5': [0.347, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.485, 1.6], 't1': [0.301, 1.6], 't3': [0.452, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.444, 1.6], 't3': [0.485, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.431, 1.6], 't4': [0.413, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.533, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.468, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.495, 1.6], 't5': [0.464, 1.6], 't4': [0.431, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.504, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.377, 1.6], 't4': [0.465, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.416, 1.6], 't5': [0.438, 1.6], 't1': [0.384, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.44, 1.6], 't5': [0.433, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.43, 1.6], 't3': [0.499, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.448, 1.6], 't5': [0.545, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.468, 1.6], 't3': [0.399, 1.6], 't4': [0.336, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.544, 1.6], 't3': [0.492, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.323, 1.6], 't5': [0.341, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.529, 1.6], 't3': [0.432, 1.6], 't4': [0.434, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.308, 1.6], 't5': [0.408, 1.6], 't2': [0.46, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.39, 1.6], 't4': [0.353, 1.6], 't1': [0.498, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.486, 1.6], 't3': [0.358, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.378, 1.6], 't3': [0.328, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.335, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.395, 1.6], 't3': [0.318, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.421, 1.6], 't4': [0.432, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.336, 1.6], 't2': [0.467, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.517, 1.6], 't2': [0.397, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.479, 1.6], 't2': [0.316, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.444, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.547, 1.6], 't4': [0.324, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.301, 1.6], 't1': [0.348, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.341, 1.6], 't1': [0.304, 1.6], 't3': [0.514, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.528, 1.6], 't2': [0.434, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.456, 1.6], 't5': [0.35, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.516, 1.6], 't2': [0.536, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.45, 1.6], 't3': [0.49, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.45, 1.6], 't4': [0.506, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.436, 1.6], 't3': [0.302, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.489, 1.6], 't1': [0.417, 1.6], 't4': [0.499, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.5, 1.6], 't2': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.479, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.479, 1.6], 't5': [0.407, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.362, 1.6], 't2': [0.378, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.444, 1.6], 't2': [0.475, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.519, 1.6], 't5': [0.543, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.461, 1.6], 't5': [0.392, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.344, 1.6], 't5': [0.419, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.374, 1.6], 't4': [0.39, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.331, 1.6], 't3': [0.375, 1.6], 't5': [0.442, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.532, 1.6], 't5': [0.467, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.459, 1.6], 't1': [0.448, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.532, 1.6], 't3': [0.432, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.353, 1.6], 't3': [0.463, 1.6], 't4': [0.373, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.46, 1.6], 't2': [0.533, 1.6], 't3': [0.334, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.486, 1.6], 't2': [0.3, 1.6], 't5': [0.517, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.427, 1.6], 't1': [0.412, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.396, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.334, 1.6], 't3': [0.327, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.305, 1.6], 't4': [0.451, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.352, 1.6], 't4': [0.333, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.31, 1.6], 't4': [0.339, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.531, 1.6], 't3': [0.404, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.393, 1.6], 't3': [0.438, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.485, 1.6], 't2': [0.504, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.331, 1.6], 't4': [0.41, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.422, 1.6], 't5': [0.357, 1.6], 't2': [0.532, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.368, 1.6], 't1': [0.423, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.365, 1.6], 't4': [0.43, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.473, 1.6], 't4': [0.464, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.427, 1.6], 't5': [0.301, 1.6], 't2': [0.332, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.404, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.411, 1.6], 't4': [0.385, 1.6], 't2': [0.306, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.424, 1.6], 't4': [0.318, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.393, 1.6], 't5': [0.546, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.513, 1.6], 't5': [0.401, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.465, 1.6], 't5': [0.471, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.491, 1.6], 't2': [0.539, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.548, 1.6], 't3': [0.493, 1.6], 't2': [0.479, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.401, 1.6], 't4': [0.445, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.32, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.412, 1.6], 't5': [0.35, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.443, 1.6], 't2': [0.505, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.527, 1.6], 't4': [0.477, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.367, 1.6], 't1': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.347, 1.6], 't5': [0.332, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.544, 1.6], 't4': [0.548, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.384, 1.6], 't4': [0.455, 1.6], 't3': [0.308, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.41, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.359, 1.6], 't2': [0.516, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.337, 1.6], 't1': [0.453, 1.6], 't3': [0.337, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.324, 1.6], 't3': [0.433, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.483, 1.6], 't2': [0.475, 1.6], 't3': [0.377, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.321, 1.6], 't2': [0.541, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.434, 1.6], 't2': [0.377, 1.6], 't1': [0.532, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.456, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.396, 1.6], 't3': [0.507, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.542, 1.6], 't3': [0.513, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.309, 1.6], 't3': [0.335, 1.6], 't5': [0.433, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.35, 1.6], 't3': [0.374, 1.6], 't5': [0.359, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.418, 1.6], 't4': [0.476, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.322, 1.6], 't3': [0.333, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.38, 1.6], 't4': [0.483, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.496, 1.6], 't4': [0.501, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.339, 1.6], 't3': [0.333, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.317, 1.6], 't2': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.508, 1.6], 't3': [0.468, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.533, 1.6], 't3': [0.505, 1.6], 't4': [0.352, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.391, 1.6], 't2': [0.344, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.304, 1.6], 't2': [0.476, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.546, 1.6], 't2': [0.527, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.478, 1.6], 't5': [0.31, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.336, 1.6], 't4': [0.469, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.338, 1.6], 't1': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.539, 1.6], 't3': [0.523, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.491, 1.6], 't2': [0.42, 1.6], 't4': [0.401, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.411, 1.6], 't2': [0.33, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.503, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.425, 1.6], 't2': [0.405, 1.6], 't4': [0.549, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1': [0.308, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.359, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.327, 1.6], 't3': [0.394, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.499, 1.6], 't3': [0.493, 1.6], 't5': [0.43, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.535, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.301, 1.6], 't5': [0.546, 1.6], 't2': [0.32, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.511, 1.6], 't3': [0.423, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.338, 1.6], 't2': [0.308, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.434, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.395, 1.6], 't2': [0.384, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.38, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.516, 1.6], 't4': [0.508, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.338, 1.6], 't3': [0.399, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.524, 1.6], 't2': [0.367, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.38, 1.6], 't4': [0.451, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.338, 1.6], 't4': [0.491, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.335, 1.6], 't4': [0.401, 1.6], 't5': [0.301, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.537, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.378, 1.6], 't5': [0.302, 1.6], 't3': [0.479, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.402, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.47, 1.6], 't4': [0.511, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.379, 1.6], 't4': [0.541, 1.6], 't1': [0.35, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.311, 1.6], 't3': [0.369, 1.6], 't1': [0.457, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.394, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.542, 1.6], 't2': [0.473, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.409, 1.6], 't3': [0.41, 1.6], 't4': [0.377, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.385, 1.6], 't5': [0.354, 1.6], 't1': [0.392, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.49, 1.6], 't3': [0.307, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.445, 1.6], 't3': [0.341, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.541, 1.6], 't2': [0.312, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.462, 1.6], 't2': [0.324, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.372, 1.6], 't4': [0.311, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.448, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.438, 1.6], 't1': [0.481, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.353, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.315, 1.6], 't2': [0.415, 1.6], 't3': [0.469, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.391, 1.6], 't4': [0.38, 1.6], 't3': [0.48, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.491, 1.6], 't5': [0.491, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.302, 1.6], 't3': [0.496, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.49, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.485, 1.6], 't4': [0.385, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.325, 1.6], 't3': [0.545, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.421, 1.6], 't4': [0.302, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.397, 1.6], 't1': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.301, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.498, 1.6], 't4': [0.46, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.442, 1.6], 't2': [0.523, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.314, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.448, 1.6], 't4': [0.34, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.452, 1.6], 't2': [0.344, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.44, 1.6], 't5': [0.512, 1.6], 't4': [0.394, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.408, 1.6], 't3': [0.475, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1': [0.422, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.533, 1.6], 't3': [0.512, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.522, 1.6], 't1': [0.39, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.362, 1.6], 't5': [0.436, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.536, 1.6], 't4': [0.508, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.449, 1.6], 't4': [0.343, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.435, 1.6], 't2': [0.306, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.345, 1.6], 't5': [0.514, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.416, 1.6], 't5': [0.469, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.413, 1.6], 't3': [0.403, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.529, 1.6], 't4': [0.325, 1.6], 't5': [0.347, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.354, 1.6], 't4': [0.497, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.438, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.374, 1.6], 't3': [0.329, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.535, 1.6], 't5': [0.396, 1.6], 't2': [0.321, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.382, 1.6], 't2': [0.493, 1.6], 't1': [0.35, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.542, 1.6], 't2': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.449, 1.6], 't3': [0.417, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.327, 1.6], 't3': [0.521, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.529, 1.6], 't2': [0.419, 1.6], 't4': [0.482, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.373, 1.6], 't3': [0.537, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.397, 1.6], 't4': [0.394, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.432, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.308, 1.6], 't3': [0.53, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.402, 1.6], 't4': [0.48, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.302, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.521, 1.6], 't3': [0.39, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.517, 1.6], 't2': [0.545, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.344, 1.6], 't3': [0.407, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.33, 1.6], 't4': [0.344, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.466, 1.6], 't2': [0.51, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.519, 1.6], 't2': [0.511, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.407, 1.6], 't3': [0.506, 1.6], 't2': [0.315, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.501, 1.6], 't3': [0.434, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.432, 1.6], 't3': [0.472, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.507, 1.6], 't2': [0.325, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.366, 1.6], 't4': [0.353, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.439, 1.6], 't4': [0.366, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.36, 1.6], 't3': [0.324, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.482, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.543, 1.6], 't4': [0.524, 1.6]})] task_check5 = {'t1': 127, 't2': 426, 't3': 580, 't4': 697, 't5': 334} data_list6 = [({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.326, 1.6], 't2': [0.415, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.475, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.337, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.384, 1.6], 't3': [0.436, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.442, 1.6], 't5': [0.456, 1.6], 't3': [0.426, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.405, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.326, 1.6], 't1': [0.36, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.514, 1.6], 't3': [0.336, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.325, 1.6], 't4': [0.53, 1.6], 't5': [0.302, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.329, 1.6], 't3': [0.319, 1.6], 't2': [0.462, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.324, 1.6], 't2': [0.361, 1.6], 't3': [0.466, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.412, 1.6], 't2': [0.356, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.505, 1.6], 't5': [0.502, 1.6], 't2': [0.531, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.37, 1.6], 't4': [0.549, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.419, 1.6], 't5': [0.331, 1.6], 't4': [0.422, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.487, 1.6], 't5': [0.408, 1.6], 't3': [0.497, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.461, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.342, 1.6], 't4': [0.382, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.31, 1.6], 't2': [0.459, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.39, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.344, 1.6], 't5': [0.341, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.363, 1.6], 't5': [0.537, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.383, 1.6], 't3': [0.49, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.523, 1.6], 't3': [0.349, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.302, 1.6], 't4': [0.457, 1.6], 't5': [0.369, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.368, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.457, 1.6], 't2': [0.331, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.342, 1.6], 't3': [0.306, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.327, 1.6], 't4': [0.355, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.352, 1.6], 't3': [0.362, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.356, 1.6], 't2': [0.311, 1.6], 't3': [0.524, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.4, 1.6], 't4': [0.509, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.549, 1.6], 't1': [0.38, 1.6], 't4': [0.324, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.334, 1.6], 't3': [0.389, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.483, 1.6], 't2': [0.508, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.336, 1.6], 't2': [0.479, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.495, 1.6], 't5': [0.32, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.313, 1.6], 't4': [0.486, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.326, 1.6], 't3': [0.504, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.523, 1.6], 't2': [0.454, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.416, 1.6], 't3': [0.343, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.446, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.375, 1.6], 't1': [0.424, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.536, 1.6], 't3': [0.39, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.467, 1.6], 't5': [0.376, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.545, 1.6], 't2': [0.508, 1.6], 't3': [0.41, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.431, 1.6], 't3': [0.378, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.374, 1.6], 't2': [0.387, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.482, 1.6], 't2': [0.477, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.354, 1.6], 't5': [0.424, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.343, 1.6], 't3': [0.423, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.434, 1.6], 't4': [0.466, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.326, 1.6], 't2': [0.435, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.496, 1.6], 't2': [0.305, 1.6], 't3': [0.516, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.539, 1.6], 't1': [0.499, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.423, 1.6], 't1': [0.39, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.468, 1.6], 't2': [0.374, 1.6], 't5': [0.483, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.312, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.406, 1.6], 't3': [0.479, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.429, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.526, 1.6], 't4': [0.536, 1.6], 't3': [0.509, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.399, 1.6], 't2': [0.362, 1.6], 't4': [0.491, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.389, 1.6], 't2': [0.475, 1.6], 't4': [0.507, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.3, 1.6], 't3': [0.31, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.547, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.482, 1.6], 't4': [0.456, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.348, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.305, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.309, 1.6], 't4': [0.474, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.338, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.496, 1.6], 't2': [0.47, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.385, 1.6], 't3': [0.465, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.542, 1.6], 't3': [0.456, 1.6], 't2': [0.392, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.486, 1.6], 't1': [0.496, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.33, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.455, 1.6], 't3': [0.308, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.368, 1.6], 't4': [0.532, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.394, 1.6], 't3': [0.406, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.342, 1.6], 't4': [0.401, 1.6], 't3': [0.432, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.467, 1.6], 't3': [0.34, 1.6], 't5': [0.34, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.32, 1.6], 't4': [0.313, 1.6], 't5': [0.317, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.435, 1.6], 't3': [0.375, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.314, 1.6], 't2': [0.361, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.534, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.421, 1.6], 't2': [0.503, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.322, 1.6], 't1': [0.472, 1.6], 't2': [0.368, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.332, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.337, 1.6], 't2': [0.303, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.427, 1.6], 't4': [0.38, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.344, 1.6], 't5': [0.376, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.515, 1.6], 't5': [0.308, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.541, 1.6], 't1': [0.311, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.512, 1.6], 't5': [0.304, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.389, 1.6], 't4': [0.473, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.42, 1.6], 't1': [0.382, 1.6], 't3': [0.305, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.368, 1.6], 't5': [0.472, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.483, 1.6], 't5': [0.359, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.482, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.326, 1.6], 't5': [0.305, 1.6], 't3': [0.353, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.409, 1.6], 't4': [0.43, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.333, 1.6], 't2': [0.547, 1.6], 't4': [0.443, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.363, 1.6], 't4': [0.313, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.454, 1.6], 't5': [0.349, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.349, 1.6], 't3': [0.36, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.458, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.343, 1.6], 't5': [0.453, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.339, 1.6], 't5': [0.451, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.453, 1.6], 't5': [0.341, 1.6], 't2': [0.328, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.38, 1.6], 't4': [0.376, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.481, 1.6], 't4': [0.343, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.302, 1.6], 't4': [0.455, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.526, 1.6], 't4': [0.534, 1.6], 't3': [0.357, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.442, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.317, 1.6], 't5': [0.482, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.397, 1.6], 't3': [0.539, 1.6], 't2': [0.355, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.394, 1.6], 't2': [0.544, 1.6], 't3': [0.429, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.459, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.301, 1.6], 't2': [0.396, 1.6], 't4': [0.345, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.471, 1.6], 't5': [0.41, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.527, 1.6], 't4': [0.434, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.334, 1.6], 't4': [0.408, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.506, 1.6], 't4': [0.451, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.371, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.538, 1.6], 't2': [0.441, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.486, 1.6], 't4': [0.458, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.542, 1.6], 't5': [0.459, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.536, 1.6], 't2': [0.336, 1.6], 't4': [0.33, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.334, 1.6], 't3': [0.386, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.357, 1.6], 't2': [0.332, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.499, 1.6], 't3': [0.335, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.493, 1.6], 't3': [0.433, 1.6], 't4': [0.512, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.33, 1.6], 't2': [0.485, 1.6], 't4': [0.493, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.345, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.46, 1.6], 't1': [0.438, 1.6], 't3': [0.471, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.374, 1.6], 't2': [0.303, 1.6], 't4': [0.439, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.482, 1.6], 't5': [0.363, 1.6], 't1': [0.491, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.533, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.506, 1.6], 't3': [0.325, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.472, 1.6], 't5': [0.315, 1.6], 't4': [0.433, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.528, 1.6], 't4': [0.383, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.451, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.419, 1.6], 't3': [0.518, 1.6], 't4': [0.325, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.405, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.477, 1.6], 't4': [0.342, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.528, 1.6], 't4': [0.433, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.308, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.41, 1.6], 't3': [0.346, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.466, 1.6], 't2': [0.329, 1.6], 't4': [0.338, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.44, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.314, 1.6], 't2': [0.357, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.52, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.496, 1.6], 't4': [0.46, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.51, 1.6], 't2': [0.462, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.43, 1.6], 't4': [0.35, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.536, 1.6], 't1': [0.541, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.45, 1.6], 't1': [0.433, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.472, 1.6], 't5': [0.504, 1.6], 't2': [0.483, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.447, 1.6], 't3': [0.362, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.39, 1.6], 't4': [0.371, 1.6], 't5': [0.477, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.431, 1.6], 't3': [0.537, 1.6], 't2': [0.308, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.397, 1.6], 't5': [0.394, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.379, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.311, 1.6], 't5': [0.476, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.383, 1.6], 't3': [0.543, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.41, 1.6], 't3': [0.485, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.493, 1.6], 't5': [0.415, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.519, 1.6], 't3': [0.423, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.505, 1.6], 't4': [0.544, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.356, 1.6], 't2': [0.47, 1.6], 't5': [0.515, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.43, 1.6], 't4': [0.311, 1.6], 't3': [0.536, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.436, 1.6], 't5': [0.376, 1.6], 't1': [0.39, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.428, 1.6], 't5': [0.325, 1.6], 't1': [0.506, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.388, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.528, 1.6], 't3': [0.379, 1.6], 't4': [0.361, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.31, 1.6], 't2': [0.326, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.348, 1.6], 't5': [0.537, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.488, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.539, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.312, 1.6], 't3': [0.491, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.428, 1.6], 't4': [0.499, 1.6], 't2': [0.383, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.417, 1.6], 't5': [0.422, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.481, 1.6], 't3': [0.356, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.374, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.307, 1.6], 't3': [0.414, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.411, 1.6], 't4': [0.368, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.539, 1.6], 't2': [0.372, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.347, 1.6], 't1': [0.437, 1.6], 't5': [0.392, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.443, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.44, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.353, 1.6], 't4': [0.319, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.46, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.393, 1.6], 't4': [0.408, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.547, 1.6], 't5': [0.475, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.532, 1.6], 't2': [0.534, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.446, 1.6], 't4': [0.377, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.494, 1.6], 't2': [0.365, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.317, 1.6], 't2': [0.308, 1.6], 't4': [0.454, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.516, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.541, 1.6], 't5': [0.523, 1.6], 't4': [0.459, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.328, 1.6], 't3': [0.503, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.323, 1.6], 't5': [0.46, 1.6], 't4': [0.336, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.484, 1.6], 't3': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.424, 1.6], 't3': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.402, 1.6], 't5': [0.45, 1.6], 't2': [0.309, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.358, 1.6], 't4': [0.443, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.517, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.437, 1.6], 't2': [0.373, 1.6], 't4': [0.482, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.377, 1.6], 't3': [0.499, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.392, 1.6], 't5': [0.484, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.368, 1.6], 't3': [0.336, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.369, 1.6], 't4': [0.388, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.448, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.381, 1.6], 't3': [0.512, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.48, 1.6], 't4': [0.456, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.481, 1.6], 't2': [0.424, 1.6], 't5': [0.442, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.411, 1.6], 't3': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.389, 1.6], 't5': [0.373, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.312, 1.6], 't3': [0.332, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.353, 1.6], 't4': [0.337, 1.6], 't2': [0.519, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.43, 1.6], 't3': [0.419, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.451, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.423, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.485, 1.6], 't2': [0.388, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.373, 1.6], 't5': [0.326, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.363, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.364, 1.6], 't4': [0.348, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.512, 1.6], 't3': [0.495, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.476, 1.6], 't2': [0.357, 1.6], 't4': [0.434, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.458, 1.6], 't3': [0.33, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.519, 1.6], 't1': [0.392, 1.6], 't4': [0.49, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.451, 1.6], 't3': [0.306, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.378, 1.6], 't3': [0.317, 1.6], 't5': [0.357, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.373, 1.6], 't3': [0.427, 1.6], 't2': [0.324, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.347, 1.6], 't2': [0.423, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.442, 1.6], 't3': [0.374, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.359, 1.6], 't4': [0.339, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.304, 1.6], 't4': [0.489, 1.6], 't5': [0.433, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.539, 1.6], 't5': [0.35, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.405, 1.6], 't3': [0.364, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.381, 1.6], 't4': [0.408, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.45, 1.6], 't1': [0.528, 1.6], 't4': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.426, 1.6], 't4': [0.509, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.345, 1.6], 't1': [0.481, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.549, 1.6], 't3': [0.466, 1.6], 't1': [0.531, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.315, 1.6], 't3': [0.533, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.382, 1.6], 't5': [0.329, 1.6], 't3': [0.341, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.496, 1.6], 't4': [0.518, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.318, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.405, 1.6], 't1': [0.371, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.502, 1.6], 't1': [0.436, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.472, 1.6], 't1': [0.544, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.547, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.523, 1.6], 't3': [0.517, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.33, 1.6], 't4': [0.302, 1.6], 't1': [0.465, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.527, 1.6], 't2': [0.381, 1.6], 't4': [0.339, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.39, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.372, 1.6], 't3': [0.442, 1.6], 't5': [0.503, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.55, 1.6], 't2': [0.329, 1.6], 't4': [0.415, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.48, 1.6], 't5': [0.503, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.453, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.448, 1.6], 't3': [0.527, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.477, 1.6], 't4': [0.313, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.302, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.528, 1.6], 't3': [0.369, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.31, 1.6], 't3': [0.389, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.32, 1.6], 't1': [0.482, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.501, 1.6], 't4': [0.393, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.533, 1.6], 't5': [0.397, 1.6], 't1': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.314, 1.6], 't2': [0.535, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.366, 1.6], 't5': [0.338, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.48, 1.6], 't2': [0.381, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.335, 1.6], 't5': [0.321, 1.6], 't4': [0.401, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.39, 1.6], 't3': [0.538, 1.6], 't4': [0.518, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.532, 1.6], 't2': [0.473, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.343, 1.6], 't3': [0.441, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.452, 1.6], 't2': [0.476, 1.6], 't5': [0.421, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.447, 1.6], 't5': [0.435, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.343, 1.6], 't4': [0.463, 1.6], 't2': [0.364, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.49, 1.6], 't4': [0.382, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.353, 1.6], 't4': [0.55, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.466, 1.6], 't4': [0.427, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.49, 1.6], 't4': [0.519, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.387, 1.6], 't5': [0.472, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.513, 1.6], 't4': [0.374, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.492, 1.6], 't4': [0.424, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.537, 1.6], 't2': [0.447, 1.6], 't5': [0.375, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.408, 1.6], 't3': [0.381, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.34, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.416, 1.6], 't5': [0.361, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.369, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.489, 1.6], 't3': [0.484, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.304, 1.6], 't3': [0.33, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.351, 1.6], 't3': [0.416, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.474, 1.6], 't4': [0.365, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.346, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.354, 1.6], 't4': [0.482, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.527, 1.6], 't2': [0.301, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.341, 1.6], 't4': [0.46, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.407, 1.6], 't3': [0.369, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.38, 1.6], 't3': [0.496, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.368, 1.6], 't3': [0.375, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.485, 1.6], 't2': [0.494, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.304, 1.6], 't3': [0.452, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.417, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.31, 1.6], 't4': [0.396, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.378, 1.6], 't4': [0.384, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.358, 1.6], 't4': [0.349, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.465, 1.6], 't3': [0.524, 1.6], 't2': [0.418, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.425, 1.6], 't4': [0.449, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.343, 1.6], 't4': [0.367, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.508, 1.6], 't3': [0.508, 1.6], 't5': [0.442, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.449, 1.6], 't3': [0.378, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.526, 1.6], 't4': [0.43, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.36, 1.6], 't4': [0.496, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.537, 1.6], 't3': [0.462, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.47, 1.6], 't4': [0.481, 1.6], 't5': [0.538, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.528, 1.6], 't2': [0.329, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.364, 1.6], 't5': [0.483, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.368, 1.6], 't4': [0.32, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.493, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.41, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.422, 1.6], 't2': [0.313, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.326, 1.6], 't3': [0.369, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.502, 1.6], 't3': [0.385, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.301, 1.6], 't5': [0.539, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.346, 1.6], 't4': [0.425, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.402, 1.6], 't1': [0.313, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.501, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.41, 1.6], 't5': [0.4, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.521, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.413, 1.6], 't4': [0.424, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.505, 1.6], 't3': [0.342, 1.6], 't4': [0.493, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.433, 1.6], 't4': [0.491, 1.6], 't1': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.487, 1.6], 't5': [0.368, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.403, 1.6], 't5': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.478, 1.6], 't3': [0.459, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.419, 1.6], 't2': [0.516, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.309, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.375, 1.6], 't3': [0.463, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.485, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.544, 1.6], 't4': [0.374, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.448, 1.6], 't2': [0.457, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.437, 1.6], 't2': [0.401, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.527, 1.6], 't1': [0.477, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.4, 1.6], 't3': [0.384, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.476, 1.6], 't3': [0.367, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.515, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.343, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.45, 1.6], 't3': [0.412, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.327, 1.6], 't3': [0.373, 1.6], 't2': [0.485, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.407, 1.6], 't5': [0.435, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.35, 1.6], 't5': [0.405, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.422, 1.6], 't3': [0.454, 1.6], 't2': [0.301, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.539, 1.6], 't5': [0.42, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.483, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.316, 1.6], 't1': [0.378, 1.6], 't4': [0.451, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.5, 1.6], 't5': [0.309, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.388, 1.6], 't2': [0.504, 1.6], 't4': [0.523, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.365, 1.6], 't5': [0.493, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.412, 1.6], 't3': [0.511, 1.6], 't4': [0.444, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.347, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.437, 1.6], 't5': [0.373, 1.6], 't4': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.451, 1.6], 't1': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.495, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.341, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.412, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.475, 1.6], 't4': [0.454, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.543, 1.6], 't4': [0.515, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.521, 1.6], 't3': [0.441, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.308, 1.6], 't4': [0.518, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.435, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.417, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.366, 1.6], 't3': [0.362, 1.6], 't2': [0.529, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.342, 1.6], 't2': [0.302, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.417, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.344, 1.6], 't2': [0.536, 1.6], 't1': [0.486, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.368, 1.6], 't5': [0.402, 1.6], 't1': [0.534, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.462, 1.6], 't3': [0.432, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.485, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.514, 1.6], 't5': [0.453, 1.6], 't4': [0.492, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.381, 1.6], 't3': [0.312, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.491, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.455, 1.6], 't2': [0.487, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.445, 1.6], 't3': [0.42, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.437, 1.6], 't3': [0.351, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.31, 1.6], 't4': [0.499, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.458, 1.6], 't3': [0.361, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.373, 1.6], 't4': [0.516, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.511, 1.6], 't5': [0.53, 1.6], 't2': [0.342, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.404, 1.6], 't1': [0.368, 1.6], 't5': [0.371, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.391, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.321, 1.6], 't4': [0.384, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.355, 1.6], 't2': [0.361, 1.6], 't1': [0.319, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.35, 1.6], 't1': [0.462, 1.6], 't5': [0.418, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.432, 1.6], 't5': [0.339, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.431, 1.6], 't2': [0.523, 1.6], 't3': [0.503, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.406, 1.6], 't4': [0.4, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.46, 1.6], 't5': [0.512, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.379, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.543, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.322, 1.6], 't2': [0.492, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.342, 1.6], 't3': [0.356, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.369, 1.6], 't4': [0.473, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.362, 1.6], 't2': [0.456, 1.6], 't1': [0.487, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.444, 1.6], 't4': [0.394, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.429, 1.6], 't4': [0.37, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.395, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.41, 1.6], 't3': [0.428, 1.6], 't1': [0.413, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.43, 1.6], 't3': [0.376, 1.6], 't4': [0.351, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.309, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.459, 1.6], 't4': [0.301, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.472, 1.6], 't4': [0.384, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.508, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.503, 1.6], 't5': [0.489, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.447, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.33, 1.6], 't4': [0.346, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.395, 1.6], 't4': [0.416, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.407, 1.6], 't3': [0.495, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.439, 1.6], 't2': [0.364, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.485, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.423, 1.6], 't4': [0.355, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.509, 1.6], 't4': [0.536, 1.6], 't2': [0.447, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.46, 1.6], 't1': [0.346, 1.6], 't3': [0.502, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.443, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.462, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.492, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.409, 1.6], 't3': [0.459, 1.6], 't4': [0.487, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.386, 1.6], 't4': [0.326, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.315, 1.6], 't5': [0.371, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.36, 1.6], 't1': [0.38, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.377, 1.6], 't4': [0.512, 1.6], 't5': [0.462, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.426, 1.6], 't4': [0.495, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.414, 1.6], 't5': [0.37, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.549, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1': [0.375, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.513, 1.6], 't2': [0.328, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.445, 1.6], 't4': [0.464, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.313, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.375, 1.6], 't2': [0.461, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.441, 1.6], 't4': [0.415, 1.6], 't2': [0.476, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.334, 1.6], 't4': [0.512, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.306, 1.6], 't4': [0.523, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.499, 1.6], 't5': [0.362, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.451, 1.6], 't2': [0.347, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.357, 1.6], 't4': [0.46, 1.6], 't3': [0.312, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.358, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.509, 1.6], 't4': [0.402, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.48, 1.6], 't2': [0.416, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.401, 1.6], 't3': [0.519, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.433, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.327, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.519, 1.6], 't5': [0.483, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.46, 1.6], 't4': [0.547, 1.6], 't2': [0.374, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.303, 1.6], 't2': [0.532, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.353, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.357, 1.6], 't4': [0.544, 1.6], 't5': [0.347, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.361, 1.6], 't2': [0.361, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.405, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.39, 1.6], 't2': [0.543, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.52, 1.6], 't5': [0.357, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.527, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.54, 1.6], 't3': [0.51, 1.6], 't4': [0.458, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.511, 1.6], 't1': [0.529, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.362, 1.6], 't2': [0.494, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.326, 1.6], 't4': [0.469, 1.6], 't2': [0.386, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.357, 1.6], 't3': [0.361, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.344, 1.6], 't4': [0.486, 1.6], 't2': [0.304, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.356, 1.6], 't3': [0.37, 1.6], 't2': [0.472, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.392, 1.6], 't2': [0.481, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.516, 1.6], 't5': [0.4, 1.6], 't4': [0.311, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.37, 1.6], 't3': [0.302, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.478, 1.6], 't2': [0.533, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.426, 1.6], 't5': [0.439, 1.6], 't4': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.311, 1.6], 't2': [0.54, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.406, 1.6], 't5': [0.367, 1.6], 't2': [0.468, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.387, 1.6], 't1': [0.331, 1.6], 't4': [0.452, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.431, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.42, 1.6], 't5': [0.433, 1.6], 't3': [0.419, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.355, 1.6], 't3': [0.324, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.376, 1.6], 't4': [0.355, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.529, 1.6], 't3': [0.417, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.337, 1.6], 't3': [0.355, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.304, 1.6], 't4': [0.368, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.343, 1.6], 't4': [0.346, 1.6], 't5': [0.53, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.446, 1.6], 't4': [0.486, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.3, 1.6], 't3': [0.397, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.469, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.335, 1.6], 't4': [0.457, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.38, 1.6], 't2': [0.411, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.313, 1.6], 't3': [0.358, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.322, 1.6], 't2': [0.428, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.433, 1.6], 't4': [0.544, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.326, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.543, 1.6], 't5': [0.375, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.384, 1.6], 't5': [0.405, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.335, 1.6], 't4': [0.355, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.446, 1.6], 't2': [0.311, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.36, 1.6], 't4': [0.301, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.415, 1.6], 't5': [0.513, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.471, 1.6], 't4': [0.536, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.368, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.452, 1.6], 't4': [0.308, 1.6], 't5': [0.498, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.456, 1.6], 't3': [0.419, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.429, 1.6], 't2': [0.506, 1.6], 't4': [0.412, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.386, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.398, 1.6], 't3': [0.364, 1.6], 't2': [0.525, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.372, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.392, 1.6], 't4': [0.301, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.332, 1.6], 't3': [0.529, 1.6], 't5': [0.417, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.308, 1.6], 't4': [0.401, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.454, 1.6], 't4': [0.521, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.331, 1.6], 't4': [0.425, 1.6], 't3': [0.372, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.304, 1.6], 't3': [0.44, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.477, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.45, 1.6], 't3': [0.458, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.443, 1.6], 't3': [0.4, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.489, 1.6], 't5': [0.517, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.38, 1.6], 't3': [0.32, 1.6], 't4': [0.449, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.396, 1.6], 't3': [0.543, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.32, 1.6], 't1': [0.481, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.515, 1.6], 't3': [0.479, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.39, 1.6], 't4': [0.488, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.52, 1.6], 't2': [0.505, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.537, 1.6], 't3': [0.525, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.392, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.386, 1.6], 't3': [0.533, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.449, 1.6], 't5': [0.498, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.42, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.337, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.306, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.4, 1.6], 't1': [0.378, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.417, 1.6], 't4': [0.466, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.534, 1.6], 't5': [0.354, 1.6], 't2': [0.326, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.511, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.346, 1.6], 't1': [0.459, 1.6], 't3': [0.449, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.307, 1.6], 't2': [0.398, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.304, 1.6], 't3': [0.443, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.452, 1.6], 't5': [0.487, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.504, 1.6], 't4': [0.497, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.348, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.378, 1.6], 't4': [0.414, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.434, 1.6], 't5': [0.387, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.396, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.473, 1.6], 't3': [0.506, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.517, 1.6], 't2': [0.304, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.491, 1.6], 't2': [0.435, 1.6], 't3': [0.304, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.345, 1.6], 't2': [0.463, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.482, 1.6], 't2': [0.549, 1.6], 't1': [0.482, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.351, 1.6], 't3': [0.315, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.52, 1.6], 't2': [0.495, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.325, 1.6], 't2': [0.489, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.336, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.512, 1.6], 't3': [0.346, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.517, 1.6], 't3': [0.439, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.32, 1.6], 't4': [0.482, 1.6], 't2': [0.489, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.427, 1.6], 't5': [0.341, 1.6], 't2': [0.341, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.457, 1.6], 't4': [0.319, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.375, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.451, 1.6], 't4': [0.466, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.405, 1.6], 't1': [0.507, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.322, 1.6], 't4': [0.492, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.466, 1.6], 't5': [0.433, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.444, 1.6], 't3': [0.496, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.313, 1.6], 't5': [0.446, 1.6], 't4': [0.312, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.512, 1.6], 't3': [0.496, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.382, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.31, 1.6], 't5': [0.483, 1.6], 't4': [0.307, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.43, 1.6], 't2': [0.433, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.399, 1.6], 't3': [0.538, 1.6], 't4': [0.301, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.413, 1.6], 't3': [0.474, 1.6], 't2': [0.367, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.455, 1.6], 't2': [0.441, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.417, 1.6], 't2': [0.515, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.307, 1.6], 't4': [0.453, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.528, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.374, 1.6], 't2': [0.301, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.523, 1.6], 't4': [0.48, 1.6], 't3': [0.422, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.336, 1.6], 't2': [0.543, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.486, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.391, 1.6], 't1': [0.423, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.386, 1.6], 't2': [0.361, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.496, 1.6], 't2': [0.373, 1.6], 't4': [0.425, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.471, 1.6], 't3': [0.333, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.477, 1.6], 't1': [0.377, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.474, 1.6], 't4': [0.452, 1.6], 't3': [0.53, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.529, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1': [0.409, 1.6], 't5': [0.519, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.36, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.416, 1.6], 't3': [0.422, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.352, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.384, 1.6], 't4': [0.327, 1.6], 't5': [0.526, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1': [0.489, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.384, 1.6], 't3': [0.478, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.426, 1.6], 't3': [0.55, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.319, 1.6], 't3': [0.34, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.499, 1.6], 't2': [0.431, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.52, 1.6], 't2': [0.476, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.303, 1.6], 't5': [0.385, 1.6], 't1': [0.405, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.486, 1.6], 't3': [0.324, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.314, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.398, 1.6], 't4': [0.313, 1.6], 't5': [0.401, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.395, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.509, 1.6], 't4': [0.466, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.477, 1.6], 't2': [0.547, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.443, 1.6], 't4': [0.313, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.397, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.375, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.302, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.448, 1.6], 't3': [0.433, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.322, 1.6], 't3': [0.456, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.407, 1.6], 't4': [0.311, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.323, 1.6], 't3': [0.424, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.328, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.462, 1.6], 't1': [0.423, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.452, 1.6], 't2': [0.398, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.425, 1.6], 't4': [0.461, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.513, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.472, 1.6], 't5': [0.394, 1.6], 't3': [0.362, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.478, 1.6], 't3': [0.447, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.327, 1.6], 't2': [0.356, 1.6], 't4': [0.524, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.548, 1.6], 't3': [0.302, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.53, 1.6], 't5': [0.433, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.455, 1.6], 't3': [0.448, 1.6], 't5': [0.344, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.334, 1.6], 't3': [0.392, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.499, 1.6], 't2': [0.506, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.474, 1.6], 't2': [0.327, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.342, 1.6], 't3': [0.414, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.326, 1.6], 't4': [0.418, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.539, 1.6], 't5': [0.353, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.444, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.409, 1.6], 't3': [0.505, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.391, 1.6], 't3': [0.416, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.534, 1.6], 't3': [0.334, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.549, 1.6], 't1': [0.322, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.447, 1.6], 't3': [0.475, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.424, 1.6], 't3': [0.303, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.487, 1.6], 't3': [0.344, 1.6], 't4': [0.451, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.461, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.454, 1.6], 't4': [0.521, 1.6], 't2': [0.336, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.436, 1.6], 't5': [0.48, 1.6], 't4': [0.542, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.425, 1.6], 't3': [0.444, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.383, 1.6], 't5': [0.312, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.497, 1.6], 't4': [0.356, 1.6], 't5': [0.307, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.494, 1.6], 't4': [0.458, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.483, 1.6], 't3': [0.512, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.471, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.31, 1.6], 't3': [0.314, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.434, 1.6], 't5': [0.485, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.474, 1.6], 't4': [0.473, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.487, 1.6], 't3': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.536, 1.6], 't2': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.339, 1.6], 't3': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.474, 1.6], 't2': [0.533, 1.6], 't4': [0.333, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.497, 1.6], 't1': [0.378, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.429, 1.6], 't3': [0.41, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.537, 1.6], 't4': [0.319, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.417, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.41, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.474, 1.6], 't3': [0.474, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.492, 1.6], 't5': [0.328, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.332, 1.6], 't1': [0.329, 1.6], 't2': [0.316, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.492, 1.6], 't3': [0.488, 1.6], 't4': [0.355, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.548, 1.6], 't3': [0.318, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.487, 1.6], 't3': [0.35, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.411, 1.6], 't5': [0.389, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.332, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.361, 1.6], 't4': [0.534, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.502, 1.6], 't4': [0.315, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.547, 1.6], 't5': [0.34, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.404, 1.6], 't4': [0.426, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.532, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.307, 1.6], 't4': [0.465, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.367, 1.6], 't5': [0.341, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.542, 1.6], 't3': [0.441, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.464, 1.6], 't3': [0.434, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.457, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.351, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.441, 1.6], 't3': [0.497, 1.6], 't2': [0.433, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.46, 1.6], 't1': [0.412, 1.6], 't2': [0.351, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.376, 1.6], 't5': [0.467, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.488, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.328, 1.6], 't4': [0.375, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.521, 1.6], 't4': [0.546, 1.6], 't5': [0.445, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.529, 1.6], 't5': [0.459, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.526, 1.6], 't2': [0.47, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.389, 1.6], 't5': [0.526, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.383, 1.6], 't5': [0.306, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.438, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.473, 1.6], 't2': [0.336, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.51, 1.6], 't5': [0.469, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.396, 1.6], 't3': [0.408, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.525, 1.6], 't3': [0.423, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.498, 1.6], 't4': [0.476, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.349, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.459, 1.6], 't3': [0.461, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1': [0.546, 1.6], 't4': [0.439, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.417, 1.6], 't2': [0.468, 1.6], 't4': [0.336, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.361, 1.6], 't3': [0.425, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.414, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.491, 1.6], 't2': [0.329, 1.6], 't4': [0.305, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.474, 1.6], 't4': [0.499, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.344, 1.6], 't5': [0.378, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.334, 1.6], 't4': [0.464, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.478, 1.6], 't3': [0.5, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.428, 1.6], 't4': [0.499, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.353, 1.6], 't2': [0.478, 1.6], 't4': [0.477, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.375, 1.6], 't3': [0.317, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.432, 1.6], 't3': [0.379, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.432, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.318, 1.6], 't4': [0.401, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.55, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.42, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.359, 1.6], 't3': [0.376, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.518, 1.6], 't5': [0.36, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.308, 1.6], 't5': [0.487, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.514, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.512, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.494, 1.6], 't2': [0.437, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.435, 1.6], 't4': [0.36, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.362, 1.6], 't1': [0.397, 1.6], 't3': [0.473, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.41, 1.6], 't4': [0.374, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.468, 1.6], 't2': [0.455, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.397, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.439, 1.6], 't1': [0.513, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.487, 1.6], 't3': [0.546, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.472, 1.6], 't2': [0.384, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.549, 1.6], 't5': [0.343, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.306, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.499, 1.6], 't4': [0.468, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.465, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.493, 1.6], 't2': [0.441, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1': [0.541, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.413, 1.6], 't2': [0.504, 1.6], 't4': [0.435, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.479, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.312, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.443, 1.6], 't5': [0.546, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.316, 1.6], 't2': [0.483, 1.6], 't5': [0.53, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2': [0.373, 1.6], 't1': [0.353, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.33, 1.6], 't5': [0.325, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.34, 1.6], 't5': [0.471, 1.6], 't4': [0.524, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.47, 1.6], 't4': [0.326, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.361, 1.6], 't3': [0.518, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.502, 1.6], 't5': [0.442, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.399, 1.6], 't2': [0.385, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.439, 1.6], 't3': [0.377, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.503, 1.6], 't4': [0.485, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.471, 1.6], 't5': [0.397, 1.6], 't2': [0.368, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.412, 1.6], 't3': [0.421, 1.6], 't4': [0.504, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.333, 1.6], 't4': [0.325, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.485, 1.6], 't2': [0.339, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.482, 1.6], 't4': [0.306, 1.6], 't3': [0.379, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.429, 1.6], 't3': [0.498, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.473, 1.6], 't4': [0.319, 1.6], 't3': [0.411, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.34, 1.6], 't2': [0.535, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.436, 1.6], 't3': [0.512, 1.6], 't4': [0.501, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.314, 1.6], 't5': [0.519, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.47, 1.6], 't4': [0.399, 1.6], 't1': [0.48, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.486, 1.6], 't4': [0.305, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1': [0.47, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.424, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.421, 1.6], 't5': [0.301, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.335, 1.6], 't3': [0.403, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.464, 1.6], 't2': [0.542, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.306, 1.6], 't3': [0.432, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.416, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.393, 1.6], 't3': [0.508, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.536, 1.6], 't1': [0.49, 1.6], 't2': [0.34, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.458, 1.6], 't3': [0.446, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.434, 1.6], 't4': [0.533, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.438, 1.6], 't4': [0.492, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.336, 1.6], 't3': [0.312, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.362, 1.6], 't4': [0.475, 1.6], 't2': [0.54, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.424, 1.6], 't4': [0.476, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.456, 1.6], 't5': [0.512, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.422, 1.6], 't1': [0.472, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.442, 1.6], 't5': [0.369, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.535, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.349, 1.6], 't4': [0.428, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.402, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.361, 1.6], 't5': [0.361, 1.6], 't2': [0.42, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.432, 1.6], 't2': [0.426, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.52, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.42, 1.6], 't4': [0.318, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.542, 1.6], 't3': [0.301, 1.6], 't4': [0.525, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.501, 1.6], 't1': [0.429, 1.6], 't3': [0.332, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.385, 1.6], 't2': [0.355, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.326, 1.6], 't3': [0.33, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.34, 1.6], 't5': [0.52, 1.6], 't3': [0.495, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.375, 1.6], 't4': [0.394, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.466, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.429, 1.6], 't2': [0.379, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.528, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.464, 1.6], 't4': [0.376, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.421, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.388, 1.6], 't3': [0.368, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.533, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.479, 1.6], 't3': [0.525, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.439, 1.6], 't3': [0.429, 1.6], 't4': [0.31, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.407, 1.6], 't5': [0.334, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.423, 1.6], 't2': [0.342, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.321, 1.6], 't5': [0.322, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.329, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.308, 1.6], 't3': [0.337, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.348, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.393, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1': [0.344, 1.6], 't2': [0.343, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.537, 1.6], 't2': [0.49, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.514, 1.6], 't2': [0.354, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.386, 1.6], 't4': [0.524, 1.6]}), ({'t1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1': [0.513, 1.6], 't3': [0.463, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5': [0.39, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.466, 1.6], 't2': [0.406, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.408, 1.6], 't5': [0.404, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.336, 1.6], 't1': [0.464, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.548, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.545, 1.6], 't4': [0.329, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.398, 1.6], 't2': [0.443, 1.6], 't5': [0.491, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.529, 1.6], 't2': [0.405, 1.6], 't4': [0.537, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2': [0.354, 1.6], 't3': [0.306, 1.6], 't4': [0.502, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.523, 1.6], 't2': [0.501, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.453, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.341, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.501, 1.6], 't4': [0.482, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5': [0.467, 1.6], 't1': [0.446, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.428, 1.6], 't2': [0.441, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.428, 1.6], 't5': [0.419, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3': [0.313, 1.6], 't1': [0.52, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.526, 1.6], 't2': [0.473, 1.6], 't3': [0.503, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.386, 1.6], 't3': [0.302, 1.6], 't5': [0.453, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.345, 1.6], 't4': [0.457, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.338, 1.6], 't3': [0.391, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.33, 1.6], 't4': [0.334, 1.6], 't3': [0.387, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.549, 1.6], 't1': [0.463, 1.6], 't3': [0.317, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.482, 1.6], 't5': [0.479, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.429, 1.6], 't5': [0.524, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.507, 1.6], 't2': [0.451, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5': [0.414, 1.6], 't3': [0.547, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.528, 1.6], 't5': [0.442, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.542, 1.6], 't3': [0.345, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.376, 1.6], 't3': [0.538, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.315, 1.6], 't1': [0.444, 1.6], 't2': [0.437, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.514, 1.6], 't3': [0.307, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.443, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.364, 1.6], 't3': [0.342, 1.6], 't2': [0.311, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5': [0.549, 1.6], 't2': [0.469, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.334, 1.6], 't3': [0.374, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.539, 1.6], 't5': [0.307, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4': [0.323, 1.6], 't3': [0.515, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3': [0.498, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4': [0.366, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.372, 1.6], 't5': [0.389, 1.6], 't2': [0.351, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.334, 1.6], 't5': [0.528, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3': [0.366, 1.6], 't2': [0.541, 1.6], 't5': [0.376, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.376, 1.6], 't5': [0.47, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2': [0.414, 1.6], 't3': [0.421, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2': [0.466, 1.6]}), ({'t5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5': [0.411, 1.6], 't4': [0.494, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.472, 1.6], 't5': [0.474, 1.6], 't2': [0.51, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4': [0.401, 1.6], 't5': [0.535, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.433, 1.6], 't2': [0.35, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3': [0.362, 1.6], 't2': [0.341, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4': [0.422, 1.6], 't2': [0.534, 1.6], 't1': [0.361, 1.6]}), ({'t4': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4': [0.394, 1.6], 't2': [0.513, 1.6]}), ({'t2': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2': [0.47, 1.6], 't5': [0.309, 1.6]}), ({'t3': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3': [0.472, 1.6], 't4': [0.334, 1.6]})] task_check6 = {'t1': 128, 't2': 456, 't3': 551, 't4': 687, 't5': 335} # Homogeneous dataset mec4 = [4, 3, 1, 2, 2, 4, 3, 1, 4, 4, 4, 2, 3, 4, 1, 4, 2, 1, 1, 1, 2, 4, 4, 1, 4, 4, 1, 2, 1, 1, 2, 2, 3, 2, 1, 2, 2, 3, 2, 2, 4, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 3, 4, 4, 2, 2, 1, 3, 3, 1, 1, 1, 4, 4, 3, 3, 2, 2, 2, 2, 2, 4, 1, 2, 4, 1, 2, 2, 1, 3, 1, 4, 4, 4, 4, 4, 3, 4, 3, 3, 1, 3, 1, 3, 1, 3, 3, 2, 1, 3, 4, 2, 3, 2, 2, 4, 1, 3, 1, 1, 2, 1, 2, 2, 3, 3, 3, 4, 4, 2, 2, 1, 4, 3, 2, 2, 2, 1, 2, 4, 4, 3, 4, 1, 2, 3, 3, 2, 3, 4, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 1, 2, 4, 1, 2, 3, 1, 3, 3, 3, 3, 1, 3, 3, 2, 4, 1, 2, 4, 3, 2, 2, 4, 3, 3, 2, 1, 2, 1, 2, 1, 2, 3, 4, 1, 4, 1, 3, 2, 1, 3, 4, 1, 1, 2, 2, 1, 2, 2, 4, 4, 2, 2, 2, 3, 4, 4, 3, 3, 1, 4, 2, 1, 2, 4, 4, 3, 2, 4, 2, 4, 1, 2, 3, 3, 1, 4, 3, 1, 4, 2, 2, 1, 3, 1, 2, 2, 3, 4, 4, 3, 1, 3, 2, 3, 2, 2, 1, 1, 2, 1, 4, 2, 2, 4, 1, 2, 2, 2, 1, 2, 2, 3, 3, 1, 1, 2, 1, 4, 1, 4, 4, 4, 3, 3, 4, 2, 1, 1, 1, 1, 4, 1, 1, 4, 2, 3, 4, 1, 3, 2, 4, 1, 3, 4, 1, 4, 4, 4, 1, 1, 2, 3, 2, 1, 2, 4, 1, 3, 3, 2, 2, 3, 1, 1, 2, 4, 3, 2, 3, 1, 3, 1, 4, 2, 2, 2, 1, 1, 2, 3, 1, 2, 1, 1, 4, 1, 1, 1, 3, 3, 1, 4, 1, 3, 1, 2, 3, 2, 1, 3, 4, 1, 3, 3, 1, 2, 1, 2, 4, 4, 3, 3, 2, 2, 2, 3, 4, 4, 3, 1, 3, 1, 2, 3, 4, 4, 1, 1, 3, 1, 3, 3, 1, 3, 4, 1, 4, 1, 3, 2, 4, 1, 4, 4, 3, 2, 3, 3, 1, 4, 4, 3, 3, 1, 2, 3, 1, 4, 1, 3, 2, 3, 4, 4, 3, 3, 2, 1, 1, 1, 1, 1, 1, 3, 1, 4, 2, 1, 3, 4, 3, 1, 2, 3, 2, 3, 2, 4, 4, 3, 2, 2, 1, 1, 2, 4, 3, 1, 2, 3, 3, 3, 2, 3, 3, 4, 2, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 3, 4, 2, 4, 4, 1, 3, 3, 1, 3, 3, 4, 1, 4, 3, 1, 4, 1, 2, 2, 4, 1, 1, 2, 4, 3, 4, 3, 1, 4, 1, 4, 4, 3, 3, 2, 2, 4, 1, 2, 4, 4, 1, 1, 1, 3, 1, 1, 4, 1, 1, 4, 3, 3, 4, 1, 3, 1, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 1, 2, 2, 1, 2, 2, 3, 4, 1, 3, 4, 1, 3, 2, 2, 3, 2, 4, 1, 4, 4, 3, 4, 4, 4, 2, 1, 2, 3, 3, 1, 2, 3, 4, 4, 1, 3, 2, 4, 3, 4, 4, 2, 1, 4, 2, 4, 3, 4, 3, 3, 1, 2, 1, 2, 3, 4, 2, 4, 3, 3, 4, 2, 2, 1, 4, 1, 3, 4, 3, 4, 3, 1, 2, 3, 2, 3, 4, 1, 2, 3, 4, 2, 3, 3, 4, 4, 2, 2, 2, 3, 4, 3, 2, 2, 4, 3, 3, 1, 2, 1, 3, 2, 4, 4, 3, 2, 3, 2, 2, 4, 3, 2, 1, 2, 4, 4, 3, 4, 4, 3, 4, 4, 4, 3, 2, 4, 1, 3, 3, 3, 2, 3, 4, 4, 2, 3, 2, 3, 2, 1, 1, 2, 3, 2, 3, 1, 3, 3, 3, 4, 2, 3, 2, 3, 1, 3, 3, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 3, 2, 4, 4, 2, 4, 1, 2, 3, 3, 3, 2, 3, 3, 1, 1, 2, 3, 1, 2, 3, 3, 4, 2, 3, 2, 2, 4, 4, 1, 4, 1, 3, 2, 3, 1, 3, 3, 4, 4, 2, 2, 3, 4, 1, 3, 2, 1, 1, 3, 4, 4, 2, 3, 4, 1, 4, 4, 1, 3, 1, 1, 2, 3, 1, 2, 4, 1, 4, 1, 1, 1, 4, 1, 2, 1, 1, 3, 4, 4, 2, 1, 4, 2, 1, 4, 1, 4, 2, 4, 3, 4, 1, 1, 4, 3, 4, 2, 3, 4, 4, 4, 3, 4, 2, 1, 1, 3, 2, 4, 4, 2, 3, 3, 3, 4, 3, 2, 1, 1, 2, 3, 3, 2, 2, 2, 1, 3, 2, 4, 4, 4, 1, 4, 2, 4, 1, 1, 3, 3, 2, 4, 4, 1, 1, 4, 4, 1, 3, 3, 1, 2, 4, 3, 1, 3, 4, 2, 1, 3, 1, 1, 4, 2, 3, 4, 3, 3, 2, 1, 3, 1, 1, 4, 3, 4, 2, 3, 1, 1, 3, 2, 3, 3, 1, 2, 3, 1, 3, 4, 2, 2, 1, 1, 4, 4, 3, 1, 1, 2, 3, 4, 4, 4, 4, 3, 1, 1, 3, 1, 1, 2, 3, 4, 4, 3, 1, 1, 4, 4, 1, 3, 3, 2, 1, 4, 4, 3, 3, 3, 2, 4, 2, 2, 2, 4, 4, 2, 3, 3, 3, 1, 4, 2, 3, 2, 1, 4, 3, 3, 1, 1, 2, 1, 4, 1, 3, 3, 4, 4, 4, 3, 4, 2, 2, 3, 4, 1, 2, 4, 3, 3, 3, 1, 2, 1, 4, 4, 4, 2, 2, 1, 2, 4, 4, 4, 4, 4, 1, 1, 3, 4, 2, 1, 3, 4, 2, 2, 1, 3, 2, 4, 1, 4, 2, 1, 1, 2, 4, 1, 2, 2, 2, 3, 1, 1, 4, 1, 3, 4, 1, 4, 2, 4, 1, 3, 2, 4, 2, 4, 1, 1, 2, 1, 4, 3, 1, 4, 4, 2, 3, 1, 4, 2, 4, 1, 1, 3, 1, 1, 2, 1, 3, 1, 4, 3, 4, 4, 3, 2, 2, 1, 3, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 1, 2, 1, 2, 2, 3, 2, 1, 3, 3, 2, 2, 3, 2, 2, 4, 3, 3, 4, 2, 2, 2, 3, 3, 4, 4, 3, 2, 1, 3, 1, 4, 4, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, 2, 1, 3, 2, 4, 4, 2, 4, 4, 3, 2, 2, 3, 1, 4, 3, 4, 3, 3, 2, 4, 4, 4, 3, 2, 4, 4, 4, 3, 2, 4, 4, 4, 4, 3, 1, 2, 4, 2, 4, 2, 4, 3, 4, 1, 3, 2, 3, 3, 3, 2, 1, 3, 3, 2, 3, 4, 2, 1, 2, 1, 4, 4, 2, 1, 2, 4, 4, 1, 3, 4, 4, 3, 2, 4, 3, 3, 4, 3, 2, 2, 3, 4, 3, 3, 1, 1, 4, 4, 3, 2, 2, 3, 2, 1, 1, 4, 1, 2, 3, 4, 1, 4, 1, 1, 3, 3, 4, 2, 4, 2, 2, 1, 3, 2, 3, 4, 4, 3, 2, 4, 1, 3, 1, 3, 2, 1, 3, 3, 2, 4, 2, 3, 1, 4, 4, 2, 2, 1, 4, 4, 3, 4, 1, 4, 2, 2, 2, 3, 1, 4, 3, 1, 3, 2, 4, 4, 2, 4, 4, 1, 4, 1, 3, 1, 3, 2, 3, 1, 3, 2, 2, 1, 1, 3, 3, 2, 2, 2, 1, 2, 1, 1, 2, 4, 1, 1, 3, 1, 3, 3, 4, 1, 4, 3, 1, 1, 3, 2, 2, 2, 2, 3, 1, 1, 2, 1, 4, 4, 4, 2, 4, 3, 3, 3, 4, 3, 3, 3, 4, 4, 2, 4, 3, 3, 2, 4, 4, 3, 2, 4, 3, 4, 2, 4, 2, 4, 4, 4, 2, 4, 3, 3, 1, 4, 4, 2, 1, 4, 1, 1, 1, 1, 4, 2, 3, 3, 4, 1, 4, 4, 4, 4, 2, 2, 1, 4, 2, 1, 2, 3, 4, 1, 3, 3, 2, 2, 2, 1, 4, 3, 3, 1, 1, 1, 3, 3, 2, 3, 3, 3, 4, 1, 4, 3, 1, 1, 3, 4, 1, 3, 1, 2, 4, 3, 1, 1, 2, 1, 1, 2, 4, 1, 1, 3, 2, 1, 3, 4, 3, 3, 4, 1, 2, 1, 4, 2, 3, 1, 3, 3, 4, 2, 3, 1, 1, 3, 1, 3, 4, 2, 1, 1, 2, 4, 3, 2, 1, 3, 4, 1, 2, 1, 1, 4, 3, 1, 4, 3, 3, 4, 2, 4, 2, 3, 4, 2, 3, 3, 1, 1, 2, 1, 3, 4, 3, 4, 3, 2, 2, 1, 1, 3, 1, 4, 4, 3, 2, 4, 3, 1, 4, 3, 2, 4, 2, 2, 3, 4, 4, 2, 4, 2, 2, 2, 1, 1, 1, 1, 2, 3, 4, 2, 4, 3, 4, 2, 4, 3, 1, 4, 4, 2, 2, 1, 2, 4, 3, 3, 1, 3, 3, 2, 3, 2, 3, 3, 4, 1, 3, 2, 3, 2, 2, 2, 4, 1, 3, 2, 3, 1, 3, 2, 2, 3, 1, 4, 3, 4, 2, 1, 1, 2, 1, 3, 1, 3, 2, 2, 4, 1, 4, 3, 2, 2, 4, 4, 4, 1, 3, 1, 3, 3, 4, 1, 2, 2, 1, 3, 3, 2, 4, 1, 2, 1, 3, 1, 3, 3, 2, 3, 3, 3, 1, 4, 2, 1, 2, 2, 2, 1, 3, 2, 1, 3, 1, 4, 4, 4, 3, 1, 4, 1, 1, 2, 1, 4, 2, 4, 3, 1, 2, 2, 4, 1, 3, 2, 2, 2, 1, 1, 4, 1, 1, 1, 2, 3, 2, 3, 1, 2, 1, 4, 4, 4, 3, 3, 2, 1, 1, 3, 4, 4, 4, 3, 2, 4, 3, 3, 4, 1, 4, 2, 2, 2, 3, 4, 2, 3, 2, 3, 1, 1, 3, 2, 3, 4, 2, 3, 1, 4, 3, 4, 2, 2, 4, 4, 1, 1, 2, 3, 3, 2, 3, 1, 1, 1, 4, 1, 2, 1, 3, 3, 1, 1, 3, 3, 3, 4, 4, 3, 1, 1, 4, 4, 3, 3, 4, 1, 1, 1, 2, 2, 1, 2, 3, 1, 2, 3, 3, 2, 3, 4, 2, 4, 3, 3, 3, 3, 2, 4, 1, 1, 1, 3, 4, 1, 4, 1, 3, 1, 1, 3, 1, 1, 2, 1, 3, 1, 4, 2, 4, 4, 1, 3, 4, 1, 2, 3, 3, 2, 4, 2, 4, 2, 4, 4, 2, 2, 2, 3, 2, 3, 2, 1, 3, 4, 3, 4, 2, 1, 1, 2, 3, 2, 1, 1, 4, 4, 4, 3, 3, 4, 3, 4, 4, 2, 3, 1, 3, 4, 4, 3, 2, 2, 1, 4, 3, 1, 3, 1, 3, 3, 3, 4, 1, 4, 2, 2, 2, 1, 3, 2, 2, 3, 3, 4, 1, 1, 3, 2, 2, 3, 1, 3, 1, 4, 4, 2, 4, 1, 4, 2, 2, 2, 1, 3, 2, 3, 4, 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, 2, 2, 1, 3, 3, 2, 1, 1, 2, 3, 1, 2, 4, 3, 4, 4, 2, 2, 2, 2, 2, 2, 3, 4, 3, 2, 2, 3, 3, 3, 3, 2, 4, 2, 2, 1, 4, 4, 1, 2, 4, 2, 1, 4, 3, 1, 3, 4, 1, 4, 4, 1, 4, 1, 3, 4, 3, 4, 2, 1, 2, 2, 3, 3, 3, 1, 1, 2, 4, 3, 1, 2, 1, 4, 2, 4, 4, 1, 3, 1, 1, 4, 1, 4, 1, 3, 4, 4, 1, 2, 4, 2, 4, 3, 4, 4, 2, 1, 3, 3, 1, 4, 3, 3, 1, 1, 3, 1, 4, 4, 2, 2, 3, 4, 4, 3, 4, 3, 4, 3, 1, 2, 4, 2, 3, 1, 4, 1, 2, 1, 3, 1, 2, 2, 4, 2, 1, 4, 1, 2, 3, 1, 2, 2, 1, 4, 4, 4, 4, 1, 1, 4, 4, 2, 1, 4, 1, 4, 3, 1, 3, 3, 4, 2, 3, 2, 4, 1, 1, 2, 3, 1, 4, 3, 4, 4, 2, 1, 4, 1, 4, 1, 4, 2, 1, 2, 1, 4, 1, 2, 3, 1, 1, 3, 3, 3, 3, 2, 4, 3, 4, 3, 4, 4, 2, 1, 4, 4, 1, 3, 2, 3, 2, 1, 1, 2, 2, 1, 2, 2, 3, 3, 2, 3, 1, 4, 3, 2, 4, 3, 1, 3, 1, 1, 3, 3, 1, 3, 4, 4, 3, 3, 1, 4, 1, 3, 1, 1, 2, 2, 1, 1, 4, 4, 1, 3, 2, 2, 4, 2, 4, 3, 4, 3, 3, 2, 2, 2, 3, 1, 1, 2, 1, 2, 2, 2, 3, 4, 1, 2, 1, 4, 4, 4, 4, 2, 1, 2, 1, 3, 3, 2, 1, 3, 3, 2, 2, 1, 1, 3, 4, 1, 4, 2, 2, 4, 2, 2, 3, 3, 4, 2, 1, 3, 4, 3, 3, 4, 3, 1, 1, 1, 1, 2, 4, 4, 2, 3, 1, 1, 4, 2, 1, 4, 4, 2, 2, 2, 2, 4, 1, 4, 2, 2, 1, 3, 4, 1, 2, 4, 3, 2, 1, 3, 4, 3, 2, 2, 2, 2, 3, 4, 1, 1, 2, 3, 4, 4, 2, 3, 1, 2, 3, 2, 3, 3, 2, 2, 3, 3, 2, 3, 2, 3, 4, 1, 3, 4, 3, 2, 2, 3, 4, 2, 4, 2, 3, 3, 1, 1, 4, 2, 4, 2, 4, 3, 4, 1, 2, 4, 3, 2, 2, 4, 3, 4, 1, 1, 4, 2, 1, 3, 3, 4, 2, 4, 2, 2, 4, 3, 1, 2, 4, 3, 1, 3, 4, 1, 1, 2, 2, 1, 2, 1, 4, 4, 2, 1, 1, 4, 4, 1, 3, 2, 3, 3, 4, 1, 3, 2, 4, 3, 3, 4, 2, 4, 4, 1, 1, 2, 2, 2, 2, 1, 3, 4, 1, 3, 4, 4, 1, 1, 3, 2, 1, 3, 4, 3, 3, 3, 2, 4, 4, 3, 3, 2, 2, 3, 1, 2, 1, 3, 4, 1, 2, 1, 2, 1, 3, 4, 4, 3, 4, 3, 4, 2, 3, 1, 3, 4, 1, 2, 3, 1, 1, 2, 1, 3, 1, 3, 3, 4, 2, 3, 1, 2, 1, 4, 2, 1, 3, 4, 1, 2, 2, 3, 1, 1, 4, 2, 2, 4, 4, 4, 1, 2, 2, 2, 2, 3, 4, 3, 1, 2, 2, 4, 3, 3, 2, 1, 4, 3, 4, 2, 2, 3, 3, 3, 1, 3, 3, 1, 2, 4, 3, 3, 4, 4, 2, 2, 3, 1, 1, 1, 4, 3, 4, 1, 2, 2, 3, 4, 4, 4, 4, 2, 4, 1, 3, 2, 1, 1, 3, 4, 4, 4, 4, 3, 3, 2, 3, 3, 1, 2, 4, 1, 4, 2, 2, 2, 4, 2, 1, 4, 4, 1, 2, 4, 2, 4, 2, 1, 2, 2, 4, 1, 4, 1, 1, 4, 2, 4, 2, 2, 1, 1, 2, 4, 4, 2, 2, 1, 2, 4, 2, 4, 2, 2, 4, 2, 4, 4, 2, 4, 4, 4, 2, 4, 4, 2, 4, 4, 2, 4, 2, 2, 2, 4, 4, 4, 2, 4, 4] mec7 = [3, 4, 3, 7, 2, 7, 6, 1, 5, 7, 5, 1, 7, 6, 2, 6, 7, 2, 7, 2, 3, 6, 3, 6, 5, 3, 5, 1, 4, 4, 2, 5, 5, 3, 6, 2, 5, 7, 4, 3, 6, 4, 5, 4, 1, 5, 3, 3, 1, 3, 6, 1, 7, 3, 2, 5, 1, 2, 5, 4, 3, 2, 6, 6, 3, 6, 4, 1, 2, 2, 1, 7, 1, 7, 1, 6, 7, 5, 5, 4, 6, 4, 1, 5, 6, 3, 4, 3, 6, 2, 5, 5, 5, 2, 7, 2, 5, 1, 6, 6, 1, 3, 5, 6, 5, 4, 1, 2, 3, 1, 5, 7, 5, 3, 6, 6, 5, 1, 3, 1, 5, 6, 6, 1, 7, 2, 6, 3, 1, 7, 3, 7, 7, 6, 5, 6, 5, 6, 2, 5, 1, 2, 5, 4, 4, 1, 2, 5, 1, 7, 3, 5, 7, 2, 6, 4, 4, 6, 5, 6, 5, 6, 1, 1, 7, 6, 2, 5, 1, 7, 2, 5, 1, 4, 7, 6, 5, 4, 7, 6, 4, 7, 6, 4, 1, 7, 7, 3, 1, 1, 1, 1, 5, 3, 7, 6, 5, 3, 1, 1, 4, 1, 1, 2, 7, 3, 6, 2, 7, 6, 7, 4, 3, 3, 3, 2, 5, 1, 5, 2, 6, 3, 4, 2, 4, 6, 1, 1, 2, 5, 1, 1, 2, 5, 1, 5, 2, 7, 7, 1, 5, 6, 2, 3, 6, 5, 5, 5, 3, 2, 3, 5, 7, 7, 2, 1, 1, 7, 2, 6, 3, 4, 3, 7, 5, 5, 1, 2, 5, 2, 4, 2, 7, 2, 1, 4, 7, 7, 2, 1, 4, 3, 3, 1, 7, 5, 3, 6, 1, 5, 5, 3, 4, 2, 6, 3, 5, 1, 3, 6, 4, 6, 2, 3, 2, 2, 7, 7, 3, 6, 7, 7, 4, 1, 3, 6, 3, 4, 5, 6, 2, 5, 5, 5, 7, 2, 1, 4, 3, 1, 4, 7, 2, 4, 3, 7, 5, 3, 7, 3, 2, 3, 1, 3, 3, 2, 1, 7, 3, 4, 1, 6, 2, 2, 2, 7, 7, 3, 3, 3, 7, 3, 2, 5, 5, 7, 2, 6, 5, 3, 7, 2, 2, 6, 2, 6, 5, 7, 4, 2, 2, 2, 4, 5, 4, 2, 4, 6, 4, 4, 4, 1, 7, 6, 2, 4, 2, 7, 1, 3, 4, 5, 1, 6, 1, 2, 7, 4, 2, 7, 6, 6, 6, 7, 4, 5, 1, 6, 7, 4, 3, 6, 5, 4, 2, 1, 5, 7, 3, 6, 4, 4, 5, 4, 7, 7, 3, 6, 3, 3, 2, 4, 5, 1, 6, 1, 1, 5, 7, 7, 2, 7, 5, 6, 1, 4, 5, 5, 3, 3, 4, 7, 4, 5, 2, 2, 6, 6, 7, 1, 6, 7, 7, 3, 4, 1, 5, 1, 3, 3, 7, 4, 7, 4, 5, 6, 7, 1, 2, 4, 3, 7, 5, 2, 3, 6, 2, 2, 4, 2, 4, 4, 7, 1, 6, 7, 4, 2, 6, 5, 2, 1, 1, 3, 1, 2, 6, 1, 3, 4, 4, 3, 3, 1, 4, 7, 7, 1, 3, 3, 3, 6, 4, 1, 6, 6, 2, 4, 2, 4, 3, 5, 6, 3, 5, 1, 6, 6, 7, 2, 7, 5, 6, 4, 6, 1, 5, 2, 4, 6, 7, 6, 3, 5, 3, 5, 3, 1, 2, 1, 7, 2, 6, 7, 4, 4, 4, 1, 7, 3, 7, 3, 6, 2, 5, 6, 1, 3, 6, 5, 4, 4, 1, 1, 3, 3, 5, 6, 4, 5, 7, 6, 2, 6, 4, 7, 2, 6, 5, 7, 6, 3, 4, 5, 4, 1, 3, 5, 7, 7, 3, 3, 1, 3, 7, 4, 7, 7, 2, 4, 4, 6, 7, 6, 1, 7, 4, 2, 6, 4, 6, 6, 2, 4, 5, 4, 6, 5, 7, 1, 5, 1, 4, 7, 1, 5, 1, 5, 4, 7, 3, 7, 5, 7, 1, 4, 2, 6, 6, 3, 7, 1, 3, 6, 4, 6, 7, 1, 4, 4, 3, 7, 2, 7, 2, 1, 6, 4, 2, 4, 4, 4, 1, 4, 4, 6, 3, 6, 6, 2, 4, 5, 6, 2, 4, 1, 6, 3, 1, 3, 1, 2, 2, 3, 2, 7, 6, 4, 3, 2, 1, 4, 1, 1, 7, 4, 2, 4, 2, 4, 6, 7, 2, 3, 6, 7, 1, 6, 1, 3, 7, 4, 4, 1, 4, 4, 6, 1, 1, 2, 7, 2, 2, 1, 5, 7, 5, 1, 1, 6, 4, 1, 7, 6, 5, 4, 5, 3, 2, 4, 1, 7, 7, 6, 7, 4, 4, 3, 4, 6, 2, 4, 6, 7, 1, 2, 5, 7, 6, 7, 4, 6, 1, 6, 6, 7, 2, 6, 6, 1, 1, 4, 7, 7, 2, 2, 4, 7, 2, 7, 7, 3, 1, 1, 3, 1, 2, 3, 3, 6, 6, 6, 3, 5, 5, 2, 4, 3, 7, 7, 2, 7, 2, 1, 7, 3, 4, 1, 5, 3, 6, 5, 6, 3, 5, 6, 2, 6, 6, 6, 4, 2, 3, 7, 1, 3, 6, 6, 3, 1, 1, 7, 3, 5, 2, 6, 2, 5, 7, 5, 1, 5, 1, 7, 3, 4, 7, 5, 6, 4, 3, 6, 2, 2, 1, 5, 6, 1, 7, 4, 1, 2, 2, 2, 4, 6, 2, 7, 7, 7, 7, 5, 6, 4, 7, 4, 6, 6, 5, 5, 2, 2, 6, 1, 2, 5, 1, 1, 7, 7, 7, 5, 1, 2, 4, 4, 5, 5, 7, 3, 7, 5, 3, 7, 2, 4, 4, 3, 4, 4, 2, 5, 2, 4, 5, 7, 4, 6, 6, 6, 7, 3, 7, 2, 4, 6, 6, 5, 7, 5, 2, 6, 2, 4, 3, 5, 6, 7, 2, 1, 3, 3, 1, 4, 5, 6, 4, 5, 7, 3, 1, 4, 1, 7, 6, 4, 7, 2, 4, 7, 6, 1, 4, 6, 7, 3, 6, 6, 3, 1, 1, 3, 3, 7, 3, 3, 1, 7, 4, 1, 4, 3, 5, 6, 6, 4, 7, 1, 5, 4, 5, 2, 1, 5, 7, 6, 4, 3, 3, 6, 7, 7, 1, 2, 7, 1, 5, 2, 2, 1, 7, 5, 4, 6, 6, 1, 4, 4, 1, 6, 2, 1, 5, 1, 2, 6, 6, 4, 3, 6, 2, 7, 5, 3, 2, 7, 5, 6, 4, 4, 7, 1, 5, 6, 7, 4, 3, 7, 5, 3, 3, 1, 5, 4, 6, 2, 4, 7, 7, 2, 1, 5, 7, 7, 3, 4, 7, 6, 6, 1, 5, 7, 5, 5, 3, 4, 7, 5, 7, 7, 2, 6, 4, 4, 1, 4, 2, 4, 4, 5, 3, 4, 6, 4, 7, 1, 7, 5, 5, 1, 7, 6, 3, 5, 7, 5, 6, 2, 7, 5, 3, 5, 4, 2, 7, 7, 7, 2, 7, 1, 2, 3, 1, 2, 1, 2, 4, 1, 1, 4, 5, 6, 4, 7, 1, 4, 5, 7, 5, 1, 3, 3, 3, 1, 5, 4, 6, 3, 7, 3, 4, 3, 5, 4, 1, 3, 3, 3, 2, 5, 3, 5, 1, 4, 2, 3, 1, 3, 6, 5, 3, 1, 3, 1, 5, 5, 1, 1, 5, 2, 5, 1, 2, 3, 5, 6, 3, 3, 3, 1, 5, 5, 1, 7, 6, 6, 6, 6, 6, 7, 1, 2, 3, 7, 5, 2, 2, 3, 2, 6, 3, 5, 6, 7, 4, 1, 4, 6, 5, 5, 4, 4, 7, 2, 6, 5, 3, 5, 4, 7, 6, 3, 6, 2, 5, 7, 7, 7, 4, 7, 2, 5, 7, 5, 1, 3, 1, 7, 3, 2, 3, 4, 2, 3, 6, 3, 7, 6, 5, 3, 4, 3, 5, 1, 1, 5, 7, 3, 1, 6, 1, 1, 4, 2, 1, 6, 3, 5, 4, 6, 2, 7, 1, 3, 3, 3, 5, 5, 4, 5, 7, 3, 7, 2, 7, 1, 5, 3, 6, 5, 7, 7, 1, 3, 7, 6, 6, 6, 5, 2, 7, 3, 5, 1, 6, 5, 2, 7, 3, 1, 6, 2, 1, 2, 2, 4, 6, 3, 3, 2, 5, 7, 7, 5, 6, 1, 1, 1, 6, 4, 4, 2, 1, 3, 5, 4, 4, 4, 2, 4, 4, 1, 2, 3, 1, 3, 6, 7, 5, 6, 3, 7, 3, 7, 2, 5, 6, 4, 4, 3, 5, 7, 1, 2, 2, 6, 3, 1, 5, 2, 1, 6, 5, 3, 7, 1, 7, 7, 6, 3, 5, 7, 4, 1, 2, 4, 6, 4, 5, 7, 3, 3, 1, 4, 7, 6, 4, 7, 7, 4, 3, 7, 7, 5, 6, 7, 2, 3, 3, 3, 4, 4, 7, 6, 3, 4, 1, 2, 6, 6, 3, 2, 6, 2, 5, 1, 6, 6, 2, 2, 7, 7, 1, 3, 6, 6, 6, 7, 1, 5, 5, 5, 4, 2, 7, 2, 3, 2, 2, 2, 5, 5, 1, 3, 5, 6, 3, 5, 7, 1, 3, 1, 1, 1, 5, 4, 5, 5, 6, 2, 4, 6, 4, 1, 7, 4, 1, 5, 4, 5, 3, 3, 7, 1, 5, 7, 4, 6, 5, 1, 3, 1, 4, 3, 1, 6, 3, 4, 4, 7, 2, 1, 1, 7, 4, 3, 6, 7, 4, 1, 1, 7, 2, 6, 1, 1, 2, 3, 5, 4, 5, 7, 7, 1, 2, 1, 1, 4, 4, 5, 2, 4, 5, 2, 1, 3, 2, 7, 6, 4, 7, 4, 2, 5, 1, 3, 7, 4, 6, 6, 6, 6, 3, 4, 4, 6, 1, 7, 1, 4, 4, 7, 7, 2, 3, 5, 7, 2, 3, 1, 6, 4, 2, 6, 7, 2, 5, 6, 2, 7, 5, 2, 6, 5, 3, 1, 1, 4, 1, 7, 2, 5, 3, 3, 2, 3, 1, 2, 2, 5, 1, 1, 3, 5, 6, 6, 2, 7, 2, 5, 7, 6, 2, 5, 2, 1, 5, 4, 6, 7, 5, 5, 1, 4, 3, 3, 3, 6, 2, 2, 4, 4, 4, 5, 6, 3, 7, 1, 5, 7, 7, 6, 1, 3, 6, 7, 1, 3, 7, 3, 1, 2, 4, 1, 6, 7, 4, 1, 6, 1, 5, 2, 3, 7, 2, 2, 3, 3, 4, 7, 3, 1, 5, 2, 2, 5, 6, 1, 2, 3, 2, 6, 5, 7, 1, 5, 2, 4, 5, 4, 7, 5, 2, 1, 4, 2, 2, 2, 2, 4, 2, 3, 7, 5, 7, 7, 4, 5, 5, 3, 5, 5, 2, 5, 2, 6, 7, 2, 6, 2, 5, 4, 1, 3, 1, 2, 1, 4, 1, 1, 4, 4, 7, 6, 4, 1, 1, 2, 7, 2, 2, 2, 1, 1, 1, 3, 5, 1, 3, 4, 1, 6, 6, 4, 6, 2, 3, 3, 6, 5, 3, 7, 3, 2, 6, 2, 7, 1, 5, 7, 7, 2, 6, 5, 3, 2, 7, 4, 5, 6, 1, 1, 1, 2, 1, 6, 1, 6, 4, 4, 2, 2, 5, 5, 3, 7, 3, 1, 2, 2, 7, 5, 2, 3, 2, 1, 2, 1, 7, 7, 7, 5, 3, 5, 7, 7, 1, 1, 7, 5, 1, 1, 2, 7, 6, 5, 3, 7, 5, 5, 7, 5, 3, 4, 2, 6, 5, 3, 1, 1, 7, 6, 1, 7, 6, 6, 5, 6, 5, 5, 1, 3, 3, 4, 7, 3, 4, 4, 1, 2, 5, 7, 6, 1, 4, 7, 2, 6, 6, 3, 6, 7, 2, 7, 1, 6, 1, 3, 6, 3, 3, 5, 6, 7, 7, 5, 1, 3, 4, 7, 7, 2, 4, 7, 7, 4, 2, 4, 5, 2, 4, 4, 7, 5, 7, 4, 2, 6, 4, 5, 3, 6, 2, 7, 4, 6, 3, 4, 2, 1, 7, 4, 4, 7, 4, 2, 2, 4, 1, 7, 4, 6, 3, 4, 4, 4, 1, 5, 1, 2, 4, 6, 2, 2, 6, 1, 5, 7, 5, 1, 4, 4, 6, 1, 5, 1, 1, 7, 2, 1, 3, 7, 6, 5, 5, 6, 4, 6, 1, 1, 1, 7, 5, 3, 5, 2, 5, 5, 1, 6, 2, 1, 6, 2, 1, 6, 7, 6, 3, 2, 1, 2, 6, 1, 2, 4, 1, 1, 3, 6, 4, 6, 6, 2, 3, 4, 4, 1, 4, 5, 2, 2, 6, 4, 6, 5, 3, 7, 7, 1, 6, 2, 2, 7, 1, 2, 6, 3, 6, 6, 4, 1, 3, 3, 6, 2, 5, 1, 1, 5, 2, 2, 7, 2, 4, 7, 1, 1, 3, 3, 1, 1, 2, 6, 1, 2, 3, 5, 7, 5, 6, 6, 2, 4, 2, 6, 6, 7, 5, 4, 5, 2, 6, 2, 1, 5, 3, 5, 6, 3, 4, 4, 6, 4, 3, 1, 4, 1, 6, 7, 1, 4, 3, 5, 7, 7, 3, 1, 5, 6, 3, 5, 7, 5, 4, 5, 7, 5, 2, 5, 6, 5, 3, 7, 7, 2, 3, 3, 4, 6, 5, 5, 6, 1, 2, 2, 7, 4, 6, 1, 6, 2, 6, 1, 6, 5, 7, 4, 6, 5, 5, 4, 6, 6, 3, 4, 6, 2, 7, 5, 2, 5, 6, 5, 6, 2, 4, 4, 6, 4, 4, 1, 5, 3, 5, 3, 7, 2, 7, 4, 4, 5, 3, 4, 1, 3, 3, 5, 2, 3, 3, 2, 4, 2, 1, 2, 7, 2, 7, 4, 3, 1, 3, 7, 6, 1, 5, 5, 3, 1, 3, 2, 7, 2, 4, 2, 1, 6, 3, 6, 7, 7, 3, 1, 6, 6, 1, 6, 1, 3, 3, 5, 2, 4, 3, 7, 3, 2, 2, 3, 2, 5, 4, 2, 5, 2, 7, 4, 4, 6, 6, 5, 6, 6, 1, 1, 4, 3, 1, 6, 1, 3, 5, 6, 1, 6, 1, 1, 1, 4, 1, 4, 4, 3, 3, 4, 1, 6, 1, 6, 7, 6, 2, 3, 4, 5, 2, 3, 5, 2, 1, 3, 7, 4, 5, 4, 7, 7, 1, 7, 5, 6, 5, 4, 6, 4, 7, 2, 1, 6, 5, 1, 3, 5, 4, 7, 2, 2, 2, 7, 1, 7, 1, 1, 1, 7, 3, 6, 7, 6, 3, 3, 6, 1, 5, 5, 5, 3, 3, 2, 4, 2, 6, 5, 4, 5, 7, 3, 1, 2, 1, 3, 6, 5, 1, 6, 4, 3, 1, 6, 1, 5, 1, 7, 7, 2, 1, 1, 3, 6, 1, 3, 7, 5, 1, 3, 1, 5, 4, 4, 1, 7, 1, 4, 4, 4, 2, 4, 6, 3, 2, 7, 3, 2, 1, 3, 2, 6, 6, 4, 2, 6, 7, 6, 7, 6, 3, 5, 6, 3, 7, 5, 3, 6, 6, 2, 6, 2, 4, 2, 3, 6, 7, 5, 2, 4, 3, 4, 3, 2, 7, 7, 3, 4, 7, 5, 2, 7, 3, 6, 2, 7, 3, 7, 4, 3, 7, 7, 7, 7, 3, 4, 6, 5, 5, 4, 6, 5, 2, 4, 4, 2, 4, 5, 3, 5, 4, 3, 2, 4, 3, 3, 3, 5, 4, 5, 6, 5, 6, 2, 4, 4, 6, 5, 2, 4, 2, 2, 6, 4, 2, 5, 4, 2, 4, 5, 2, 3, 5, 6, 3, 5, 5, 4, 3, 5, 2, 2, 3, 5, 2, 3, 3, 4, 3, 3, 2, 4, 2, 2, 3, 2, 4, 2, 4, 5, 5, 4, 3, 5, 3, 4, 4, 5, 2, 2, 4, 2, 5, 3, 5, 3, 4, 3, 2, 4, 2, 3, 3, 3, 5, 2, 3, 3, 4, 2, 3, 5, 4, 3, 5, 2, 3, 2, 3, 4, 3, 2, 5, 5] mec10 = [2, 9, 2, 10, 3, 1, 6, 7, 2, 10, 4, 5, 8, 3, 7, 4, 2, 4, 6, 9, 1, 4, 7, 1, 10, 4, 2, 1, 6, 4, 3, 1, 6, 3, 8, 9, 7, 7, 8, 3, 7, 7, 5, 10, 4, 10, 10, 8, 1, 4, 3, 9, 9, 8, 10, 9, 7, 7, 1, 3, 5, 6, 9, 5, 1, 3, 6, 7, 8, 6, 7, 6, 7, 4, 9, 6, 10, 6, 10, 2, 6, 4, 4, 6, 8, 6, 3, 4, 3, 6, 8, 2, 6, 2, 7, 1, 10, 1, 8, 7, 7, 3, 4, 5, 4, 4, 5, 5, 3, 7, 3, 6, 5, 4, 3, 10, 5, 1, 8, 6, 7, 1, 3, 10, 2, 10, 2, 1, 6, 9, 4, 5, 2, 7, 10, 8, 10, 7, 6, 4, 1, 10, 4, 4, 6, 3, 5, 7, 2, 10, 5, 1, 7, 3, 3, 1, 2, 1, 10, 2, 3, 8, 9, 8, 7, 8, 9, 2, 4, 6, 10, 7, 7, 7, 4, 3, 2, 7, 10, 1, 7, 4, 7, 2, 3, 7, 6, 4, 8, 4, 1, 5, 9, 8, 10, 6, 5, 1, 5, 10, 9, 6, 10, 3, 9, 7, 10, 4, 4, 1, 4, 1, 1, 5, 4, 6, 4, 1, 10, 7, 6, 8, 9, 6, 8, 9, 1, 3, 9, 3, 8, 8, 7, 6, 2, 9, 1, 9, 10, 5, 8, 2, 5, 1, 1, 2, 3, 6, 9, 5, 9, 1, 1, 1, 1, 10, 7, 10, 4, 1, 6, 2, 5, 7, 4, 5, 10, 6, 5, 6, 3, 1, 6, 4, 6, 6, 4, 6, 8, 7, 7, 5, 8, 9, 3, 4, 6, 3, 10, 4, 6, 8, 10, 3, 1, 9, 10, 5, 1, 10, 3, 8, 4, 3, 5, 2, 9, 3, 6, 6, 10, 4, 10, 10, 1, 3, 3, 6, 9, 6, 10, 2, 8, 3, 4, 7, 5, 3, 8, 2, 7, 8, 10, 4, 4, 2, 2, 6, 8, 9, 7, 2, 10, 10, 5, 4, 5, 1, 10, 6, 6, 2, 7, 6, 4, 7, 3, 5, 3, 5, 8, 6, 6, 4, 5, 7, 9, 6, 4, 9, 1, 9, 6, 2, 2, 8, 6, 7, 6, 1, 6, 8, 10, 4, 6, 9, 2, 10, 10, 6, 8, 3, 1, 6, 8, 8, 9, 7, 7, 7, 8, 5, 9, 2, 4, 10, 3, 9, 4, 7, 10, 6, 8, 5, 4, 9, 5, 5, 1, 7, 10, 10, 10, 6, 3, 10, 4, 4, 9, 2, 5, 6, 1, 1, 7, 9, 8, 10, 9, 5, 7, 6, 4, 9, 1, 5, 10, 10, 5, 5, 10, 4, 6, 8, 7, 1, 1, 4, 2, 8, 1, 9, 7, 1, 3, 6, 5, 5, 10, 4, 3, 5, 8, 9, 9, 2, 7, 2, 3, 7, 10, 10, 9, 7, 6, 2, 4, 1, 3, 8, 6, 8, 3, 1, 5, 5, 10, 5, 2, 1, 3, 6, 3, 5, 7, 2, 4, 8, 3, 3, 1, 9, 8, 2, 2, 10, 4, 7, 3, 5, 8, 10, 4, 3, 4, 8, 7, 8, 2, 4, 7, 10, 6, 1, 8, 1, 6, 9, 7, 9, 7, 1, 3, 2, 6, 9, 6, 10, 7, 1, 2, 5, 8, 2, 10, 1, 4, 9, 9, 6, 5, 3, 9, 4, 1, 7, 8, 10, 2, 6, 2, 4, 8, 5, 2, 2, 5, 4, 1, 4, 3, 2, 9, 2, 5, 6, 2, 8, 2, 4, 10, 2, 5, 1, 1, 2, 6, 5, 8, 7, 10, 1, 1, 4, 9, 5, 10, 10, 5, 8, 7, 7, 10, 10, 4, 7, 2, 3, 5, 8, 9, 4, 8, 3, 10, 3, 3, 5, 3, 7, 2, 4, 3, 2, 8, 10, 10, 2, 6, 9, 7, 1, 5, 6, 10, 8, 4, 5, 8, 2, 7, 4, 3, 10, 8, 9, 9, 5, 3, 2, 4, 6, 9, 8, 6, 10, 1, 9, 6, 1, 4, 3, 6, 1, 6, 1, 5, 7, 7, 10, 2, 7, 1, 7, 7, 2, 4, 4, 10, 1, 7, 1, 1, 7, 5, 2, 2, 5, 7, 6, 9, 4, 1, 5, 2, 10, 4, 3, 3, 10, 7, 1, 9, 9, 3, 3, 5, 9, 3, 6, 2, 2, 10, 2, 6, 8, 3, 3, 3, 4, 1, 8, 1, 4, 4, 9, 2, 7, 10, 3, 4, 7, 2, 3, 10, 4, 4, 7, 5, 4, 10, 2, 7, 3, 8, 5, 3, 1, 1, 1, 6, 6, 10, 1, 3, 9, 3, 5, 6, 10, 1, 8, 6, 10, 8, 10, 3, 9, 6, 8, 1, 6, 4, 2, 8, 9, 2, 5, 9, 4, 9, 4, 8, 7, 10, 4, 10, 9, 8, 10, 6, 3, 2, 10, 4, 5, 10, 9, 6, 4, 10, 5, 1, 3, 7, 4, 3, 7, 6, 9, 7, 8, 10, 6, 2, 4, 8, 6, 5, 1, 6, 6, 8, 1, 2, 7, 8, 7, 10, 7, 9, 8, 1, 6, 3, 1, 1, 5, 9, 1, 1, 3, 3, 3, 1, 6, 9, 6, 10, 5, 4, 5, 10, 2, 9, 5, 2, 2, 7, 6, 1, 5, 3, 4, 6, 1, 2, 6, 3, 4, 1, 8, 5, 2, 2, 7, 7, 4, 8, 1, 4, 1, 8, 9, 2, 5, 6, 10, 8, 8, 7, 4, 10, 6, 8, 3, 7, 5, 8, 4, 4, 5, 3, 4, 5, 6, 10, 7, 7, 7, 9, 4, 1, 6, 5, 6, 7, 6, 10, 3, 10, 3, 3, 2, 2, 4, 6, 1, 5, 9, 9, 9, 6, 9, 7, 6, 2, 5, 10, 10, 4, 2, 4, 7, 10, 4, 5, 10, 1, 5, 4, 7, 4, 1, 9, 2, 3, 7, 6, 9, 9, 5, 2, 1, 4, 6, 2, 7, 1, 4, 4, 6, 8, 9, 3, 4, 2, 4, 10, 9, 4, 8, 9, 5, 6, 9, 3, 3, 6, 7, 10, 7, 3, 5, 9, 5, 10, 3, 9, 10, 9, 6, 10, 7, 1, 4, 8, 7, 4, 10, 8, 3, 3, 10, 6, 1, 10, 1, 1, 1, 7, 6, 6, 2, 5, 6, 8, 10, 7, 4, 4, 9, 8, 2, 1, 1, 10, 2, 10, 9, 9, 7, 4, 6, 4, 7, 7, 8, 9, 9, 1, 9, 6, 10, 9, 6, 8, 5, 6, 9, 3, 6, 1, 10, 4, 7, 10, 1, 6, 8, 4, 3, 9, 1, 2, 2, 2, 10, 1, 7, 6, 8, 6, 1, 6, 6, 6, 10, 5, 9, 9, 5, 4, 9, 9, 1, 3, 10, 7, 3, 1, 4, 5, 9, 1, 1, 8, 3, 6, 6, 10, 5, 9, 5, 4, 9, 4, 7, 8, 7, 4, 8, 4, 4, 2, 9, 10, 9, 5, 3, 5, 7, 3, 8, 6, 3, 9, 2, 6, 9, 7, 6, 2, 3, 3, 10, 9, 3, 4, 3, 8, 9, 6, 2, 3, 9, 6, 8, 3, 5, 8, 3, 2, 10, 3, 3, 2, 1, 2, 1, 2, 8, 7, 6, 4, 6, 4, 5, 1, 2, 5, 1, 8, 10, 6, 2, 7, 6, 4, 3, 4, 6, 9, 1, 1, 8, 8, 3, 10, 3, 10, 9, 4, 4, 9, 10, 8, 1, 2, 7, 6, 4, 1, 5, 8, 10, 2, 3, 5, 8, 4, 6, 8, 2, 7, 3, 4, 8, 9, 3, 4, 8, 1, 10, 8, 5, 6, 8, 4, 9, 10, 3, 8, 5, 9, 8, 7, 3, 9, 2, 9, 9, 3, 3, 5, 5, 4, 6, 10, 6, 5, 6, 6, 7, 9, 10, 9, 9, 1, 8, 8, 8, 9, 7, 10, 9, 9, 7, 1, 8, 9, 2, 7, 9, 4, 5, 1, 4, 7, 1, 2, 3, 8, 7, 2, 7, 4, 9, 1, 3, 10, 10, 3, 1, 1, 4, 2, 8, 4, 5, 2, 4, 7, 5, 7, 6, 9, 6, 8, 8, 10, 3, 9, 5, 8, 2, 3, 4, 3, 5, 10, 5, 8, 10, 9, 4, 7, 4, 10, 5, 1, 2, 9, 8, 3, 6, 5, 8, 4, 7, 3, 5, 6, 6, 1, 9, 7, 7, 9, 8, 10, 7, 5, 6, 9, 6, 4, 9, 9, 6, 10, 1, 5, 2, 4, 7, 9, 3, 3, 4, 2, 6, 3, 1, 8, 5, 10, 9, 7, 5, 9, 10, 5, 7, 7, 8, 7, 6, 9, 4, 3, 6, 1, 7, 7, 9, 1, 3, 7, 8, 3, 9, 6, 2, 5, 5, 1, 8, 2, 3, 9, 7, 5, 9, 6, 7, 4, 3, 4, 7, 2, 1, 1, 4, 6, 2, 9, 8, 3, 2, 8, 2, 5, 1, 3, 6, 1, 6, 7, 3, 3, 1, 3, 6, 10, 1, 6, 5, 4, 3, 6, 7, 8, 3, 6, 2, 3, 5, 9, 9, 9, 2, 10, 10, 1, 3, 4, 10, 8, 5, 10, 4, 2, 1, 7, 3, 2, 10, 6, 4, 3, 4, 4, 7, 8, 5, 2, 4, 4, 6, 9, 8, 8, 4, 4, 6, 9, 4, 7, 6, 4, 8, 8, 10, 2, 10, 6, 4, 3, 10, 2, 10, 6, 10, 9, 8, 2, 3, 9, 5, 3, 3, 2, 8, 1, 2, 1, 9, 4, 5, 4, 8, 9, 10, 10, 8, 7, 10, 3, 3, 1, 1, 10, 8, 2, 5, 8, 4, 7, 9, 6, 3, 6, 6, 4, 2, 2, 3, 9, 6, 7, 4, 8, 4, 9, 7, 1, 8, 4, 7, 5, 7, 4, 2, 5, 5, 5, 1, 6, 6, 3, 7, 6, 7, 1, 9, 8, 5, 6, 10, 6, 8, 6, 5, 3, 2, 3, 9, 5, 2, 5, 6, 2, 6, 8, 9, 4, 7, 9, 7, 10, 1, 5, 10, 9, 4, 9, 8, 4, 1, 7, 10, 4, 3, 10, 9, 6, 10, 10, 9, 10, 10, 4, 9, 5, 5, 8, 9, 8, 5, 9, 5, 7, 7, 9, 9, 10, 4, 6, 6, 7, 10, 5, 3, 8, 10, 5, 2, 3, 3, 5, 7, 9, 10, 6, 6, 5, 6, 8, 4, 10, 1, 9, 7, 1, 7, 4, 6, 5, 7, 10, 1, 9, 2, 3, 1, 3, 5, 8, 9, 9, 10, 8, 3, 8, 3, 5, 3, 10, 8, 10, 5, 2, 5, 10, 5, 5, 10, 10, 10, 10, 9, 5, 6, 2, 8, 2, 2, 10, 2, 3, 9, 4, 7, 8, 7, 8, 5, 9, 4, 10, 2, 6, 9, 9, 7, 1, 7, 6, 7, 10, 10, 1, 2, 8, 7, 4, 1, 5, 8, 5, 6, 10, 5, 10, 4, 1, 4, 9, 5, 1, 3, 3, 10, 6, 2, 5, 7, 5, 1, 6, 10, 4, 8, 1, 9, 2, 7, 10, 6, 5, 5, 9, 2, 3, 8, 7, 9, 9, 6, 6, 4, 8, 8, 8, 3, 6, 10, 5, 8, 6, 3, 7, 8, 4, 6, 1, 7, 3, 10, 3, 8, 9, 1, 7, 5, 7, 2, 5, 8, 6, 4, 8, 4, 1, 4, 10, 6, 9, 2, 2, 3, 7, 8, 6, 3, 10, 9, 2, 2, 3, 1, 3, 1, 1, 5, 8, 2, 5, 3, 7, 2, 8, 3, 8, 5, 1, 1, 2, 1, 10, 4, 10, 6, 4, 5, 4, 4, 5, 4, 1, 4, 4, 3, 5, 2, 1, 1, 6, 8, 10, 2, 10, 5, 6, 8, 10, 3, 2, 8, 4, 2, 4, 2, 9, 9, 6, 9, 1, 2, 6, 9, 10, 2, 1, 6, 9, 10, 3, 4, 9, 6, 2, 7, 1, 7, 3, 4, 4, 4, 8, 8, 7, 2, 4, 9, 8, 2, 3, 3, 4, 7, 1, 10, 10, 8, 9, 5, 2, 7, 5, 5, 5, 3, 5, 9, 6, 10, 9, 8, 1, 8, 6, 2, 4, 8, 4, 7, 8, 8, 1, 9, 6, 6, 5, 10, 7, 7, 6, 8, 6, 7, 8, 9, 3, 6, 1, 5, 7, 10, 10, 10, 8, 4, 5, 2, 10, 9, 1, 9, 5, 4, 7, 7, 10, 8, 6, 4, 7, 6, 4, 1, 8, 6, 9, 3, 10, 8, 2, 2, 2, 9, 3, 10, 8, 5, 9, 2, 4, 4, 10, 2, 9, 4, 1, 10, 4, 8, 10, 2, 10, 2, 1, 1, 7, 8, 1, 7, 7, 9, 5, 4, 7, 6, 3, 3, 5, 5, 3, 6, 5, 4, 4, 1, 10, 7, 2, 5, 8, 6, 7, 6, 5, 7, 7, 10, 4, 10, 7, 6, 3, 1, 7, 8, 1, 2, 7, 1, 1, 3, 10, 6, 7, 3, 2, 4, 1, 6, 8, 7, 10, 5, 1, 5, 8, 7, 9, 6, 8, 8, 5, 4, 9, 7, 4, 3, 5, 7, 8, 7, 10, 6, 1, 9, 7, 5, 2, 3, 4, 8, 8, 2, 1, 6, 5, 9, 9, 2, 7, 8, 4, 5, 2, 7, 6, 7, 3, 10, 6, 8, 5, 4, 9, 8, 10, 1, 3, 8, 3, 7, 3, 5, 9, 1, 6, 8, 2, 4, 6, 5, 8, 6, 7, 4, 3, 5, 7, 9, 5, 4, 2, 6, 3, 9, 7, 10, 4, 7, 5, 2, 6, 8, 9, 3, 6, 3, 5, 3, 4, 9, 5, 10, 8, 6, 6, 3, 8, 3, 6, 8, 1, 2, 5, 8, 9, 4, 10, 9, 6, 7, 2, 8, 5, 4, 4, 8, 4, 10, 9, 8, 4, 8, 6, 3, 4, 8, 3, 10, 1, 9, 1, 4, 3, 4, 1, 7, 5, 7, 6, 4, 6, 4, 4, 5, 9, 1, 5, 1, 3, 5, 7, 7, 9, 1, 5, 5, 3, 5, 10, 8, 1, 3, 2, 8, 10, 1, 2, 4, 6, 2, 2, 2, 1, 2, 4, 5, 6, 2, 7, 2, 9, 2, 8, 8, 5, 8, 6, 2, 2, 9, 3, 10, 5, 8, 9, 6, 3, 8, 1, 4, 5, 4, 9, 9, 2, 5, 8, 4, 1, 7, 10, 3, 2, 10, 7, 9, 4, 4, 4, 8, 3, 6, 8, 9, 10, 9, 2, 7, 6, 6, 5, 3, 2, 10, 9, 5, 7, 7, 10, 7, 10, 5, 10, 9, 2, 5, 8, 2, 5, 1, 1, 10, 5, 3, 1, 2, 7, 9, 9, 9, 5, 8, 3, 3, 9, 1, 1, 7, 9, 7, 2, 7, 3, 7, 1, 2, 2, 2, 7, 5, 7, 3, 7, 3, 10, 3, 1, 9, 5, 5, 1, 3, 5, 2, 10, 2, 2, 1, 10, 3, 9, 7, 3, 8, 3, 10, 1, 3, 2, 1, 9, 5, 1, 5, 10, 5, 2, 9, 3, 9, 1, 1, 3, 10, 8, 2, 7, 5, 2, 1, 5, 8, 7, 1, 7, 7, 10, 5, 9, 9, 1, 1, 3, 8, 5, 9, 9, 2, 5, 7, 9, 9, 1, 2, 10, 10, 2, 10, 9, 2, 5, 9, 1, 5, 5, 8, 7, 8, 3, 8, 5, 1, 3, 7, 8, 3, 2, 2, 5, 1, 9, 9, 2, 2, 5, 2, 9, 2, 3, 2, 7, 7, 1, 7, 8, 7, 2, 5, 9, 10, 1, 1, 1, 3, 3, 7, 10, 5, 10, 5, 5, 1, 5, 2, 3, 8, 1, 2, 2, 10, 1, 1, 1, 5, 5, 2, 2, 8, 3, 2, 1, 10, 3, 5, 3, 1, 2, 8, 3, 3, 2, 8, 5, 1, 2, 8, 3, 8, 1, 8, 3, 2, 1, 1, 2, 1, 2, 8, 2, 3, 8, 8, 1, 1, 1, 2, 8, 3, 8, 2, 2, 2, 8, 8, 2, 2, 2, 2, 2, 2]
26,634.533333
127,118
0.443995
71,447
399,518
2.482651
0.004087
0.060605
0.265738
0.114918
0.980212
0.966315
0.943223
0.902045
0.889558
0.884602
0
0.210489
0.152321
399,518
14
127,119
28,537
0.31327
0.000048
0
0
0
0
0.291942
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
11
96e4c09a349232869bcbf5cd749bcd958d4609d2
6,744
py
Python
setup_webserver_docker.py
thachnguyen/duesselpore
7d91cfc12cfef392c6fbe0f4cc40d4c903863c5d
[ "MIT" ]
3
2021-11-17T10:48:35.000Z
2021-11-18T07:41:12.000Z
setup_webserver_docker.py
thachnguyen/duesselpore
7d91cfc12cfef392c6fbe0f4cc40d4c903863c5d
[ "MIT" ]
null
null
null
setup_webserver_docker.py
thachnguyen/duesselpore
7d91cfc12cfef392c6fbe0f4cc40d4c903863c5d
[ "MIT" ]
null
null
null
#from netifaces import interfaces, ifaddresses, AF_INET import os, sys def ip4_addresses(): ip_list = [] for interface in interfaces(): try: for link in ifaddresses(interface)[AF_INET]: ip_list.append(link['addr']) except Exception: pass return ip_list if __name__=="__main__": #print('setup IP address') # iplist = ip4_addresses() # f = open('/home/ag-rossi/projects/duesselpore/NGS_webserver/settings.py', 'r').readlines() # f[27] = f[27][:-2]+','+ str(iplist)[1:] + '\n' # f1 = open('/home/ag-rossi/projects/duesselpore/NGS_webserver/settings.py', 'w') # f1.writelines(f) # f1.close() print('Updating duesselpore') os.system('git -C /home/ag-rossi/projects/duesselpore pull') if len(sys.argv) >1: if sys.argv[1]=='light': print('Downloading human reference genome') os.system('wget ftp://ftp.ensembl.org/pub/release-102/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ensembl.org/pub/release-102/gtf/homo_sapiens/Homo_sapiens.GRCh38.102.gtf.gz -P /home/ag-rossi/ReferenceData/') os.system('wget ftp://ftp.ensembl.org/pub/release-104/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz -P /home/ag-rossi/ReferenceData/') print('creating human reference genome indexes, please wait') os.system('minimap2 -t 4 -k14 -w10 -d /home/ag-rossi/ReferenceData/reference_human.mmi /home/ag-rossi/ReferenceData/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz') os.unlink('/home/ag-rossi/ReferenceData/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz') if sys.argv[1]=='full': print('Downloading human reference genome') os.system('wget ftp://ftp.ensembl.org/pub/release-102/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ensembl.org/pub/release-102/gtf/homo_sapiens/Homo_sapiens.GRCh38.102.gtf.gz -P /home/ag-rossi/ReferenceData/') os.system('wget ftp://ftp.ensembl.org/pub/release-104/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz -P /home/ag-rossi/ReferenceData/') print('creating human reference genome indexes, please wait') os.system('minimap2 -t 4 -k15 -w10 -d /home/ag-rossi/ReferenceData/reference_human.mmi /home/ag-rossi/ReferenceData/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz') os.unlink('/home/ag-rossi/ReferenceData/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz') print('Downloading mouse reference genome') os.system('wget ftp://ftp.ensembl.org/pub/release-102/fasta/mus_musculus/dna/Mus_musculus.GRCm38.dna.primary_assembly.fa.gz -P /home/ag-rossi/ReferenceData/') os.system('wget ftp://ftp.ensembl.org/pub/release-102/gtf/mus_musculus/Mus_musculus.GRCm38.102.gtf.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ensembl.org/pub/release-102/fasta/mus_musculus/cdna/Mus_musculus.GRCm38.cdna.all.fa.gz -P /home/ag-rossi/ReferenceData/') print('creating mouse reference genome indexes, please wait') os.system('minimap2 -t 4 -k15 -w10 -d /home/ag-rossi/ReferenceData/Mus_musculus.mmi /home/ag-rossi/ReferenceData/Mus_musculus.GRCm38.dna.primary_assembly.fa.gz') os.unlink('/home/ag-rossi/ReferenceData/Mus_musculus.GRCm38.dna.primary_assembly.fa.gz') print('Downloading rat reference genome') os.system('wget ftp://ftp.ensembl.org/pub/release-102/fasta/rattus_norvegicus/dna/Rattus_norvegicus.Rnor_6.0.dna.toplevel.fa.gz -P /home/ag-rossi/ReferenceData/') os.system('wget ftp://ftp.ensembl.org/pub/release-102/gtf/rattus_norvegicus/Rattus_norvegicus.Rnor_6.0.102.gtf.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ensembl.org/pub/release-102/fasta/rattus_norvegicus/cdna/Rattus_norvegicus.Rnor_6.0.cdna.all.fa.gz -P /home/ag-rossi/ReferenceData/') print('creating rat reference genome indexes, please wait') os.system('minimap2 -t 4 -k15 -w10 -d /home/ag-rossi/ReferenceData/Rattus_norvegicus.mmi /home/ag-rossi/ReferenceData/Rattus_norvegicus.Rnor_6.0.dna.toplevel.fa.gz') os.unlink('/home/ag-rossi/ReferenceData/Rattus_norvegicus.Rnor_6.0.dna.toplevel.fa.gz') print('Downloading zebrafish reference genome') os.system('wget ftp://ftp.ensembl.org/pub/release-102/fasta/danio_rerio/dna/Danio_rerio.GRCz11.dna.primary_assembly.fa.gz -P /home/ag-rossi/ReferenceData/') os.system('wget ftp://ftp.ensembl.org/pub/release-102/gtf/danio_rerio/Danio_rerio.GRCz11.102.gtf.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ensembl.org/pub/release-102/fasta/danio_rerio/cdna/Danio_rerio.GRCz11.cdna.all.fa.gz -P /home/ag-rossi/ReferenceData/') print('creating zebrafish reference genome indexes, please wait') os.system('minimap2 -t 4 -k15 -w10 -d /home/ag-rossi/ReferenceData/Danio_rerio.mmi /home/ag-rossi/ReferenceData/Danio_rerio.GRCz11.dna.primary_assembly.fa.gz') os.unlink('/home/ag-rossi/ReferenceData/Danio_rerio.GRCz11.dna.primary_assembly.fa.gz') print('Downloading C elegans reference genome') os.system('wget ftp://ftp.ensembl.org/pub/release-102/fasta/caenorhabditis_elegans/dna/Caenorhabditis_elegans.WBcel235.dna.toplevel.fa.gz -P /home/ag-rossi/ReferenceData/') os.system('wget ftp://ftp.ensembl.org/pub/release-102/gtf/caenorhabditis_elegans/Caenorhabditis_elegans.WBcel235.102.gtf.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ensembl.org/pub/release-104/fasta/caenorhabditis_elegans/cdna/Caenorhabditis_elegans.WBcel235.cdna.all.fa.gz -P /home/ag-rossi/ReferenceData/') print('creating Celegans reference genome indexes, please wait') os.system('minimap2 -t 4 -k15 -w10 -d /home/ag-rossi/ReferenceData/Caenorhabditis_elegans.mmi /home/ag-rossi/ReferenceData/Caenorhabditis_elegans.WBcel235.dna.toplevel.fa.gz') print('Downloading Covid19 reference genome') os.system('wget http://ftp.ebi.ac.uk/ensemblgenomes/pub/viruses/fasta/sars_cov_2/dna/Sars_cov_2.ASM985889v3.dna.toplevel.fa.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ebi.ac.uk/ensemblgenomes/pub/viruses/gtf/sars_cov_2/Sars_cov_2.ASM985889v3.101.gtf.gz -P /home/ag-rossi/ReferenceData/') os.system('wget http://ftp.ebi.ac.uk/ensemblgenomes/pub/viruses/fasta/sars_cov_2/cdna/Sars_cov_2.ASM985889v3.cdna.all.fa.gz -P /home/ag-rossi/ReferenceData/') print('creating Covid19 reference genome indexes, please wait') os.system('minimap2 -t 4 -k15 -w10 -d /home/ag-rossi/ReferenceData/Covid19.mmi /home/ag-rossi/ReferenceData/Sars_cov_2.ASM985889v3.dna.toplevel.fa.gz') os.unlink('/home/ag-rossi/ReferenceData/Caenorhabditis_elegans.WBcel235.dna.toplevel.fa.gz') os.unlink('/home/ag-rossi/ReferenceData/Sars_cov_2.ASM985889v3.dna.toplevel.fa.gz')
74.10989
178
0.759638
1,044
6,744
4.807471
0.126437
0.053796
0.098625
0.200837
0.849173
0.828452
0.81052
0.793584
0.783224
0.764096
0
0.039554
0.081554
6,744
90
179
74.933333
0.770746
0.051898
0
0.184615
0
0.446154
0.814281
0.50736
0
0
0
0
0
1
0.015385
false
0.015385
0.015385
0
0.046154
0.230769
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
96f0f813a14a75c8291e3cff61bcadded8109925
72
py
Python
standard_lib/hex_decode.py
DahlitzFlorian/python-snippets
212f63f820b6f5842f74913ed08da18d41dfe7a4
[ "MIT" ]
29
2019-03-25T09:35:12.000Z
2022-01-08T22:09:03.000Z
standard_lib/hex_decode.py
DahlitzFlorian/python-snippets
212f63f820b6f5842f74913ed08da18d41dfe7a4
[ "MIT" ]
null
null
null
standard_lib/hex_decode.py
DahlitzFlorian/python-snippets
212f63f820b6f5842f74913ed08da18d41dfe7a4
[ "MIT" ]
4
2020-05-19T21:18:12.000Z
2021-05-18T12:49:21.000Z
print(bytes.fromhex("4d 65 72 72 79 20 43 68 72 69 73 74 6d 61 73 21"))
36
71
0.680556
19
72
2.578947
0.842105
0
0
0
0
0
0
0
0
0
0
0.535714
0.222222
72
1
72
72
0.339286
0
0
0
0
0
0.652778
0
0
1
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
0
null
1
0
0
0
0
0
1
0
0
0
0
1
0
8
96f3dbc1ae1d060b1130b0106261e27de2bff8d1
36
py
Python
modulo-1/exercicios/Hello_World.py
giselemanuel/programa-Ifood-backend
d12544c30e2a26f7e2e2cd85df38a3f2c8860fe7
[ "MIT" ]
3
2021-04-25T23:31:13.000Z
2021-04-26T16:59:12.000Z
modulo-1/exercicios/Hello_World.py
giselemanuel/programa-Ifood-backend
d12544c30e2a26f7e2e2cd85df38a3f2c8860fe7
[ "MIT" ]
null
null
null
modulo-1/exercicios/Hello_World.py
giselemanuel/programa-Ifood-backend
d12544c30e2a26f7e2e2cd85df38a3f2c8860fe7
[ "MIT" ]
null
null
null
print('\033[31mHello, World!\033[m')
36
36
0.694444
6
36
4.166667
0.833333
0
0
0
0
0
0
0
0
0
0
0.228571
0.027778
36
1
36
36
0.485714
0
0
0
0
0
0.72973
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
8
8c2283358c0d17ab1067e2d1964fe7d2372d0bca
5,998
py
Python
file_builder/test/build_dirs_test.py
btrekkie/file-builder
e85726ed647ad7a73839c7410618ef3f118c96c9
[ "MIT" ]
1
2020-05-29T17:13:26.000Z
2020-05-29T17:13:26.000Z
file_builder/test/build_dirs_test.py
btrekkie/file-builder
e85726ed647ad7a73839c7410618ef3f118c96c9
[ "MIT" ]
4
2021-06-14T18:42:55.000Z
2022-03-27T13:36:54.000Z
file_builder/test/build_dirs_test.py
btrekkie/file-builder
e85726ed647ad7a73839c7410618ef3f118c96c9
[ "MIT" ]
null
null
null
import os from .. import FileBuilder from .file_builder_test import FileBuilderTest class BuildDirsTest(FileBuilderTest): """Tests correct determination of whether build directories are present. Tests correct determination of whether the parent directories of output files are present. """ def _build_dirs_build_file1(self, builder, filename): """The build file function for the first build function.""" self._write(filename, 'text') def _build_dirs_build1(self, builder): """The first build function.""" builder.build_file( os.path.join(self._temp_dir, 'Dir1', 'Subdir', 'Output.txt'), 'build_file1', self._build_dirs_build_file1) builder.build_file( os.path.join(self._temp_dir, 'Dir2', 'Subdir', 'Output.txt'), 'build_file1', self._build_dirs_build_file1) def _build_dirs_build_file2(self, builder, filename): """The first build file function for the second build function.""" self.assertTrue(builder.exists(os.path.join(self._temp_dir, 'Dir1'))) raise RuntimeError() def _build_dirs_build_file3(self, builder, filename): """The second build file function for the second build function.""" self.assertTrue(builder.is_dir(os.path.join(self._temp_dir, 'Dir2'))) self._write(filename, 'text') def _build_dirs_build_file4(self, builder, filename): """The third build file function for the second build function.""" self._write(filename, 'text') def _build_dirs_build_file5(self, builder, filename): """The fourth build file function for the second build function.""" raise RuntimeError() def _build_dirs_build2(self, builder): """The second build function.""" self.assertFalse(builder.exists(os.path.join(self._temp_dir, 'Dir1'))) with self.assertRaises(RuntimeError): builder.build_file( os.path.join(self._temp_dir, 'Dir1', 'Subdir', 'Output.txt'), 'build_file2', self._build_dirs_build_file2) self.assertFalse(builder.exists(os.path.join(self._temp_dir, 'Dir1'))) self.assertFalse( builder.exists(os.path.join(self._temp_dir, 'Dir1', 'Subdir'))) self.assertFalse( builder.exists( os.path.join(self._temp_dir, 'Dir1', 'Subdir', 'Output.txt'))) with self.assertRaises(RuntimeError): builder.build_file( os.path.join(self._temp_dir, 'Dir1', 'Subdir', 'Output2.txt'), 'build_file2', self._build_dirs_build_file2) self.assertFalse(builder.exists(os.path.join(self._temp_dir, 'Dir1'))) self.assertFalse( builder.exists(os.path.join(self._temp_dir, 'Dir1', 'Subdir'))) self.assertFalse( builder.exists( os.path.join(self._temp_dir, 'Dir1', 'Subdir', 'Output.txt'))) builder.build_file( os.path.join(self._temp_dir, 'Dir3', 'Subdir', 'Output.txt'), 'build_file4', self._build_dirs_build_file4) with self.assertRaises(RuntimeError): builder.build_file( os.path.join(self._temp_dir, 'Dir3', 'Subdir', 'Output2.txt'), 'build_file5', self._build_dirs_build_file5) self.assertTrue(builder.is_dir(os.path.join(self._temp_dir, 'Dir3'))) self.assertTrue( builder.is_dir(os.path.join(self._temp_dir, 'Dir3', 'Subdir'))) self.assertFalse(builder.exists(os.path.join(self._temp_dir, 'Dir2'))) builder.build_file( os.path.join(self._temp_dir, 'Dir2', 'Subdir', 'Output.txt'), 'build_file3', self._build_dirs_build_file3) self.assertTrue(builder.is_dir(os.path.join(self._temp_dir, 'Dir2'))) self.assertTrue(builder.is_dir(os.path.join(self._temp_dir, 'Dir3'))) self.assertTrue( builder.is_dir(os.path.join(self._temp_dir, 'Dir3', 'Subdir'))) def _build_dirs_build3(self, builder): """The third build function.""" self.assertFalse( builder.exists( os.path.join(self._temp_dir, 'Dir1', 'Subdir', 'Output2.txt'))) self.assertTrue(builder.exists(os.path.join(self._temp_dir, 'Dir2'))) self.assertTrue( builder.exists(os.path.join(self._temp_dir, 'Dir2', 'Subdir'))) self.assertTrue(builder.exists(os.path.join(self._temp_dir, 'Dir3'))) self.assertTrue( builder.exists(os.path.join(self._temp_dir, 'Dir3', 'Subdir'))) builder.declare_read( os.path.join(self._temp_dir, 'Dir3', 'Subdir', 'Output2.txt')) self._check_contents( os.path.join(self._temp_dir, 'Dir3', 'Subdir', 'Output2.txt'), 'text') def test_build_dirs(self): """Test correct determination of whether build directories are present. """ FileBuilder.build( self._cache_filename, 'build_dirs_test', self._build_dirs_build1) FileBuilder.build( self._cache_filename, 'build_dirs_test', self._build_dirs_build2) self._check_contents( os.path.join(self._temp_dir, 'Dir2', 'Subdir', 'Output.txt'), 'text') self.assertFalse(os.path.exists(os.path.join(self._temp_dir, 'Dir1'))) self._write( os.path.join(self._temp_dir, 'Dir2', 'Subdir', 'Output2.txt'), 'text') self._write( os.path.join(self._temp_dir, 'Dir3', 'Subdir', 'Output2.txt'), 'text') FileBuilder.build( self._cache_filename, 'build_dirs_test', self._build_dirs_build3) self.assertFalse(os.path.exists(os.path.join(self._temp_dir, 'Dir1'))) self._check_contents( os.path.join(self._temp_dir, 'Dir2', 'Subdir', 'Output2.txt'), 'text') self._check_contents( os.path.join(self._temp_dir, 'Dir3', 'Subdir', 'Output2.txt'), 'text')
44.102941
79
0.627543
733
5,998
4.878581
0.090041
0.063758
0.100671
0.14094
0.854306
0.794743
0.794743
0.794743
0.735179
0.699105
0
0.015231
0.233745
5,998
135
80
44.42963
0.762837
0.101534
0
0.705882
0
0
0.116441
0
0
0
0
0
0.245098
1
0.088235
false
0
0.029412
0
0.127451
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
8c5e9e131b9c27c5c207f654249849a259965550
25,188
py
Python
opsdroid/connector/gitlab/tests/test_connector_gitlab.py
jacobtomlinson/ops-bot
8b20dd634467097e2dc75af2371e7dec4bbb8960
[ "Apache-2.0" ]
1
2017-08-26T18:31:53.000Z
2017-08-26T18:31:53.000Z
opsdroid/connector/gitlab/tests/test_connector_gitlab.py
jacobtomlinson/ops-bot
8b20dd634467097e2dc75af2371e7dec4bbb8960
[ "Apache-2.0" ]
8
2022-03-01T13:43:05.000Z
2022-03-05T22:51:43.000Z
opsdroid/connector/gitlab/tests/test_connector_gitlab.py
jacobtomlinson/ops-bot
8b20dd634467097e2dc75af2371e7dec4bbb8960
[ "Apache-2.0" ]
null
null
null
import logging import asyncio from pathlib import Path import asynctest.mock as amock import pytest import opsdroid.connector.gitlab.events as gitlab_events from opsdroid.connector.gitlab import ConnectorGitlab from opsdroid.matchers import match_event from opsdroid.testing import call_endpoint, running_opsdroid from opsdroid.const import GITLAB_API_ENDPOINT from opsdroid.events import Message @pytest.fixture async def connector(opsdroid, mock_api_obj): opsdroid.config["connectors"] = {"gitlab": {"webhook-token": "secret-stuff!"}} opsdroid.config["web"] = {"base-url": mock_api_obj.base_url} await opsdroid.load() return opsdroid.get_connector("gitlab") def get_response_path(response: str) -> Path: return Path(__file__).parent / "gitlab_response_payloads" / response def get_webhook_payload(path: str) -> str: with open(get_response_path(path), "r") as fh: return fh.read() def test_app_init(): """Test that the connector is initialised properly when using Gitlab""" connector = ConnectorGitlab({"name": "gitlab", "webhook-token": "secret-stuff!"}) assert connector.name == "gitlab" assert connector.webhook_token == "secret-stuff!" def test_init(opsdroid): connector = ConnectorGitlab({}, opsdroid=opsdroid) assert connector.name == "gitlab" assert connector.opsdroid == opsdroid assert connector.base_url is None def test_optional_config(opsdroid): config = { "name": "my-gitlab", "forward-url": "http://my-awesome-url", "webhook-token": "secret-stuff", } connector = ConnectorGitlab(config, opsdroid) assert connector.name == "my-gitlab" assert connector.base_url == "http://my-awesome-url" assert connector.webhook_token == "secret-stuff" def test_base_url(opsdroid): opsdroid.config["web"] = {"base-url": "http://example.com"} connector = ConnectorGitlab({}, opsdroid) assert connector.base_url == "http://example.com" @pytest.mark.asyncio async def test_gitlab_webhook_handler_excepion(caplog): caplog.set_level(logging.DEBUG) connector = ConnectorGitlab({"name": "gitlab"}) mocked_request = amock.CoroutineMock() mocked_request.json.side_effect = Exception() resp = await connector.gitlab_webhook_handler(mocked_request) assert resp.status == 400 assert "Unable to get JSON from request" in caplog.text @pytest.mark.asyncio async def test_validate_request(opsdroid): config = {"webhook-token": "secret-stuff"} connector = ConnectorGitlab(config, opsdroid) request = amock.CoroutineMock() request.headers = {"X-Gitlab-Token": "secret-stuff"} is_valid = await connector.validate_request(request) assert is_valid fake_request = amock.CoroutineMock() request.headers = {} is_valid = await connector.validate_request(fake_request) assert not is_valid @pytest.mark.asyncio async def test_listen(connector): assert await connector.listen() is None @pytest.mark.asyncio async def test_issue_created(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GitlabIssueCreated) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/issues/1" target = f"{GITLAB_API_ENDPOINT}/projects/30456730/issues/1" assert event.connector.name == "gitlab" assert event.url == url assert event.target == target assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "New test issue" assert event.description == "Test description" assert event.labels == ["test-label"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("issue_created.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_issue_label_updated(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GitlabIssueLabeled) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/issues/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "New test issue" assert event.description == "This should have been filled" assert event.labels == ["test-label"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("issue_label_update.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_issue_labeled(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GitlabIssueLabeled) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/issues/2" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "test" assert event.description == "" assert event.labels == ["blah"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("issue_labeled.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_issue_edited(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GitlabIssueEdited) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/issues/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "New test issue" assert event.description == "This should have been filled" assert event.labels == ["test-label"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("issue_message_edited.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_generic_issue(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GenericIssueEvent) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/issues/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "New test issue" assert event.description == "This should have been filled" assert event.labels == ["test-label"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("generic_issue.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_no_token_returns_401(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GitlabIssueCreated) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/issues/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "New test issue" assert event.description == "Test description" assert event.labels == ["test-label"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "Content-Type": "application/json", }, data=get_webhook_payload("issue_created.json"), ) assert resp.status == 401 assert "Test skill complete" not in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_issue_closed(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GitlabIssueClosed) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/issues/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "New test issue" assert event.description == "This should have been filled" assert event.labels == ["test-label"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("issue_closed.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_generic_issue_event(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GenericGitlabEvent) async def test_skill(opsdroid, config, event): url = "http://example.com/mike/diaspora" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "Diaspora" assert event.user == "jsmith" assert event.title is None assert event.description is None assert event.labels == [] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("push.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_bad_json_file(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.DEBUG) @match_event(gitlab_events.GenericGitlabEvent) async def test_skill(opsdroid, config, event): url = "http://example.com/mike/diaspora" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "Diaspora" assert event.user == "jsmith" assert event.title is None assert event.description is None assert event.labels == [] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("bad_json.json"), ) assert resp.status == 400 assert "Unable to decode json" in caplog.text assert "Test skill complete" not in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_mr_label_update_event(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.MRLabeled) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/merge_requests/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "Test MR" assert event.description == "" assert event.labels == ["blah"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("mr_label_update.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_mr_opened_event(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.MRCreated) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/merge_requests/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "Test MR" assert event.description == "" assert event.labels == [] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("mr_opened.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_mr_merged_event(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.MRMerged) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/merge_requests/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "Test MR" assert event.description == "" assert event.labels == ["blah"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("mr_merged.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_mr_approved_event(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.MRApproved) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/merge_requests/1" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == "Test MR" assert event.description == "" assert event.labels == ["blah"] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("mr_approved.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_mr_closed_event(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.MRClosed) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/merge_requests/2" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == 'Revert Merge branch "test" into "main"' assert event.description == "This reverts merge request !1" assert event.labels == [] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("mr_closed.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text @pytest.mark.asyncio async def test_mr_generic_event(opsdroid, connector, mock_api, caplog): caplog.set_level(logging.INFO) @match_event(gitlab_events.GenericMREvent) async def test_skill(opsdroid, config, event): url = "https://gitlab.com/FabioRosado/test-project/-/merge_requests/2" assert event.connector.name == "gitlab" assert event.url == url assert event.project == "test-project" assert event.user == "FabioRosado" assert event.title == 'Revert Merge branch "test" into "main"' assert event.description == "This reverts merge request !1" assert event.labels == [] logging.getLogger(__name__).info("Test skill complete") opsdroid.register_skill(test_skill, config={"name": "test"}) async with running_opsdroid(opsdroid): resp = await call_endpoint( opsdroid, "/connector/gitlab", "POST", headers={ "X-Gitlab-Token": "secret-stuff!", "Content-Type": "application/json", }, data=get_webhook_payload("generic_mr.json"), ) assert resp.status == 200 assert "Test skill complete" in caplog.text assert "Exception when running skill" not in caplog.text ISSUE_TARGET = "FabioRosado/test-project/-/issues/1" @pytest.mark.asyncio async def test_send_message(opsdroid, caplog): caplog.set_level(logging.DEBUG) connector = ConnectorGitlab( {"webhook-token": "secret-stuff!", "token": "my-token"}, opsdroid=opsdroid, ) response = amock.Mock() response.status = 201 with amock.patch( "aiohttp.ClientSession.post", new=amock.CoroutineMock() ) as patched_request: patched_request.return_value = asyncio.Future() patched_request.return_value.set_result(response) assert opsdroid.__class__.instances test_message = Message( text="This is a test", user="opsdroid", target=ISSUE_TARGET, connector=connector, ) patched_request.return_value = asyncio.Future() patched_request.return_value.set_result(response) result = await connector.send(test_message) assert patched_request.called assert "Responding via Gitlab" in caplog.text assert "Message 'This is a test' sent to GitLab" in caplog.text assert result is True @pytest.mark.asyncio async def test_send_message_bad_status(opsdroid, caplog): caplog.set_level(logging.DEBUG) connector = ConnectorGitlab( {"webhook-token": "secret-stuff!", "token": "my-token"}, opsdroid=opsdroid, ) response = amock.Mock() response.status = 422 with amock.patch( "aiohttp.ClientSession.post", new=amock.CoroutineMock() ) as patched_request: patched_request.return_value = asyncio.Future() patched_request.return_value.set_result(response) assert opsdroid.__class__.instances test_message = Message( text="This is a test", user="opsdroid", target=ISSUE_TARGET, connector=connector, ) patched_request.return_value = asyncio.Future() patched_request.return_value.set_result(response) result = await connector.send(test_message) assert patched_request.called assert "Responding via Gitlab" in caplog.text assert "Unable to send 'This is a test' to GitLab." in caplog.text assert result is False @pytest.mark.asyncio async def test_send_message_no_token(opsdroid, caplog): caplog.set_level(logging.DEBUG) connector = ConnectorGitlab( {"webhook-token": "secret-stuff!"}, opsdroid=opsdroid, ) response = amock.Mock() with amock.patch( "aiohttp.ClientSession.post", new=amock.CoroutineMock() ) as patched_request: patched_request.return_value = asyncio.Future() patched_request.return_value.set_result(response) assert opsdroid.__class__.instances test_message = Message( text="This is a test", user="opsdroid", target=ISSUE_TARGET, connector=connector, ) patched_request.return_value = asyncio.Future() patched_request.return_value.set_result(response) result = await connector.send(test_message) assert not patched_request.called assert "Unable to reply to GitLab" in caplog.text assert result is False
33.718876
85
0.637685
2,820
25,188
5.546454
0.069149
0.074548
0.028387
0.029538
0.891119
0.866569
0.851864
0.84547
0.81849
0.807621
0
0.004344
0.250556
25,188
746
86
33.764075
0.824231
0.002581
0
0.743633
0
0
0.201935
0.009277
0
0
0
0
0.305603
1
0.010187
false
0
0.018676
0.001698
0.033956
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
8c63fbffbf12102e5b77cd4c5fef0f7b30bcc702
3,260
py
Python
dashboard/models.py
devqueue/assaydashboard
550a5392abb366d7b0cefbe9ce4141538a8ff801
[ "MIT" ]
null
null
null
dashboard/models.py
devqueue/assaydashboard
550a5392abb366d7b0cefbe9ce4141538a8ff801
[ "MIT" ]
null
null
null
dashboard/models.py
devqueue/assaydashboard
550a5392abb366d7b0cefbe9ce4141538a8ff801
[ "MIT" ]
null
null
null
from django.db import models import datetime # Create your models here. def current_year(): return datetime.date.today().year class Samples(models.Model): AssayID = models.CharField(primary_key=True, max_length=50) MachineID = models.CharField(max_length=100) Assay = models.CharField(max_length=100) January = models.FloatField() February = models.FloatField() March = models.FloatField() April = models.FloatField() May = models.FloatField() June = models.FloatField() July = models.FloatField() August = models.FloatField() September = models.FloatField() October = models.FloatField() November = models.FloatField() December = models.FloatField() Year = models.IntegerField(default=current_year) class Utilization(models.Model): AssayID = models.CharField(primary_key=True, max_length=50) MachineID = models.CharField(max_length=100) Assay = models.CharField(max_length=100) January = models.FloatField() February = models.FloatField() March = models.FloatField() April = models.FloatField() May = models.FloatField() June = models.FloatField() July = models.FloatField() August = models.FloatField() September = models.FloatField() October = models.FloatField() November = models.FloatField() December = models.FloatField() Year = models.IntegerField(default=current_year) class Revenue(models.Model): AssayID = models.CharField(primary_key=True, max_length=50) MachineID = models.CharField(max_length=100) Assay = models.CharField(max_length=100) January = models.FloatField() February = models.FloatField() March = models.FloatField() April = models.FloatField() May = models.FloatField() June = models.FloatField() July = models.FloatField() August = models.FloatField() September = models.FloatField() October = models.FloatField() November = models.FloatField() December = models.FloatField() Year = models.IntegerField(default=current_year) class MissedRevenue(models.Model): AssayID = models.CharField(primary_key=True, max_length=50) MachineID = models.CharField(max_length=100) Assay = models.CharField(max_length=100) January = models.FloatField() February = models.FloatField() March = models.FloatField() April = models.FloatField() May = models.FloatField() June = models.FloatField() July = models.FloatField() August = models.FloatField() September = models.FloatField() October = models.FloatField() November = models.FloatField() December = models.FloatField() Year = models.IntegerField(default=current_year) class stats(models.Model): AssayID = models.CharField(primary_key=True, max_length=50) MachineID = models.CharField(max_length=100) FullCapacity = models.FloatField() RunTime = models.FloatField() Price = models.FloatField() Maintenance = models.FloatField() class monthlystats(models.Model): AssayID = models.CharField(primary_key=True, max_length=50) MachineID = models.CharField(max_length=100) MaxMonthlyhours = models.FloatField() MaxMonthlyRevenue = models.FloatField() MaxMonthSamples = models.FloatField()
33.608247
63
0.711963
346
3,260
6.630058
0.16185
0.383609
0.078466
0.104621
0.843941
0.843941
0.843941
0.843941
0.843941
0.843941
0
0.015625
0.17546
3,260
97
64
33.608247
0.837798
0.007362
0
0.8
0
0
0
0
0
0
0
0
0
1
0.011765
false
0
0.023529
0.011765
1
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
9
8ca9ea9d11c031a6f8eedf0af0d64df907fdf5e0
175
py
Python
vaspvis/__init__.py
DerekDardzinski/vaspvis
731d18896f1f3571b538cdceeea9d802c69cd35e
[ "MIT" ]
8
2020-07-03T16:22:00.000Z
2022-02-27T12:00:05.000Z
vaspvis/__init__.py
DerekDardzinski/vaspvis
731d18896f1f3571b538cdceeea9d802c69cd35e
[ "MIT" ]
3
2021-06-26T13:56:42.000Z
2021-11-14T14:25:00.000Z
vaspvis/__init__.py
DerekDardzinski/vaspvis
731d18896f1f3571b538cdceeea9d802c69cd35e
[ "MIT" ]
8
2020-07-03T16:22:02.000Z
2021-12-27T00:06:23.000Z
from vaspvis.band import Band from vaspvis.dos import Dos from vaspvis.stm import STM from vaspvis import standard from vaspvis import utils from vaspvis.charge import Charge
25
33
0.84
28
175
5.25
0.321429
0.44898
0.231293
0
0
0
0
0
0
0
0
0
0.137143
175
6
34
29.166667
0.97351
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
50ef70366414f2863d68625f7794a3857c986b39
149
py
Python
src/__init__.py
vzubriichuk/Routes_calculation
fc67823a4b72ff981f2703930884f107b45e4f8f
[ "MIT" ]
null
null
null
src/__init__.py
vzubriichuk/Routes_calculation
fc67823a4b72ff981f2703930884f107b45e4f8f
[ "MIT" ]
null
null
null
src/__init__.py
vzubriichuk/Routes_calculation
fc67823a4b72ff981f2703930884f107b45e4f8f
[ "MIT" ]
1
2020-01-23T14:22:08.000Z
2020-01-23T14:22:08.000Z
from ._version import __title__, __description__, __url__, __version__ from ._version import __author__, __author_email__, __license__, __copyright__
74.5
78
0.85906
15
149
6.2
0.666667
0.236559
0.365591
0
0
0
0
0
0
0
0
0
0.087248
149
2
78
74.5
0.683824
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
0fbd352e7d5343bd92c29a7880cd449450ae89b3
6,059
py
Python
fping.py
rooted-cyber/ultroid-plugin
67b7bdd8b7572413229dd398e64fc207f54c9f85
[ "Apache-2.0" ]
null
null
null
fping.py
rooted-cyber/ultroid-plugin
67b7bdd8b7572413229dd398e64fc207f54c9f85
[ "Apache-2.0" ]
null
null
null
fping.py
rooted-cyber/ultroid-plugin
67b7bdd8b7572413229dd398e64fc207f54c9f85
[ "Apache-2.0" ]
null
null
null
# Plugin by @Testingpluginnn """ ✘ CMD : `{i}fping` > **Ping - Pong Just got better** 🔥 > High chance of getting Floodwaits ; > Use on your own risk -_- """ import asyncio from datetime import datetime from . import * @ultroid_cmd(pattern="fping$") async def _(f): if f.fwd_from: return start = datetime.now() animation_interval = 0.75 eris = await eor(f, "`Pong...`") animation_chars = [ "⬛⬛⬛⬛⬛⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ ", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ ", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛‎📶⬛⬛⬛‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛‎📶⬛⬛⬛‎📶⬛ \n⬛⬛‎📶‎📶⬛⬛‎📶⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛‎📶⬛⬛⬛‎📶⬛ \n⬛⬛‎📶‎📶⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛‎📶⬛⬛⬛‎📶⬛ \n⬛⬛‎📶‎📶⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛‎📶‎📶‎📶‎📶‎📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛‎📶⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛‎📶‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛‎📶⬛⬛⬛ \n⬛⬛⬛⬛‎📶⬛⬛⬛⬛ \n⬛‎📶‎📶‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛⬛‎📶‎📶‎📶‎📶‎📶⬛⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛⬛⬛⬛⬛‎📶⬛ \n⬛‎📶⬛‎📶⬛⬛⬛‎📶⬛ \n⬛⬛‎📶‎📶⬛⬛‎📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛‎📶⬛‎📶‎📶‎📶‎📶‎📶⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛", ] for i in range(25): await asyncio.sleep(animation_interval) await eris.edit(animation_chars[i]) end = datetime.now() time.sleep(1.5) ms = (end - start).microseconds / 10000 await eris.edit( f"‎‎‎‎‎‎‎‎‎⬛⬛⬛⬛⬛⬛⬛⬛⬛\n⬛📶📶📶📶📶📶📶⬛\n⬛⬛⬛⬛📶⬛⬛📶⬛\n⬛⬛⬛⬛📶⬛⬛📶⬛\n⬛⬛⬛⬛📶⬛⬛📶⬛\n⬛⬛⬛⬛⬛📶📶⬛⬛\n⬛⬛⬛⬛⬛⬛⬛⬛⬛\n⬛⬛📶📶📶📶📶⬛⬛\n⬛📶⬛⬛⬛⬛⬛📶⬛\n⬛📶⬛⬛⬛⬛⬛📶⬛\n⬛📶⬛⬛⬛⬛⬛📶⬛\n⬛⬛📶📶📶📶📶⬛⬛\n⬛⬛⬛⬛⬛⬛⬛⬛⬛\n⬛📶📶📶📶📶📶📶⬛\n⬛⬛⬛⬛⬛⬛📶⬛⬛\n⬛⬛⬛⬛⬛📶⬛⬛⬛\n⬛⬛⬛⬛📶⬛⬛⬛⬛\n⬛📶📶📶📶📶📶📶⬛\n⬛⬛⬛⬛⬛⬛⬛⬛⬛\n⬛⬛📶📶📶📶📶⬛⬛\n⬛📶⬛⬛⬛⬛⬛📶⬛\n⬛📶⬛⬛⬛⬛⬛📶⬛\n⬛📶⬛📶⬛⬛⬛📶⬛\n⬛⬛📶📶⬛⬛📶⬛⬛\n⬛⬛⬛⬛⬛⬛⬛⬛⬛\n⬛📶⬛📶📶📶📶📶⬛\n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n‎‎‎‎‎‎‎‎‎ \n \n 🇵 🇮 🇳 🇬 : **{ms}** __ms__" ) HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
97.725806
372
0.130715
788
6,059
6.091371
0.120558
0.147917
0.170625
0.215
0.867708
0.859167
0.859167
0.859167
0.848333
0.823333
0
0.002432
0.117841
6,059
61
373
99.327869
0.142002
0.024426
0
0
0
0.404255
0.859902
0.0598
0
0
0
0
0
1
0
false
0
0.06383
0
0.085106
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
0fcbc1640d478a352953058c8fd7b0961ab3488c
156
py
Python
bin/generate_password.py
sinonkt/tent
2ca1839d81146aa2e0b388f17e15010997fa3497
[ "MIT" ]
null
null
null
bin/generate_password.py
sinonkt/tent
2ca1839d81146aa2e0b388f17e15010997fa3497
[ "MIT" ]
null
null
null
bin/generate_password.py
sinonkt/tent
2ca1839d81146aa2e0b388f17e15010997fa3497
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from notebook.auth import passwd; __, plain_text_password = sys.argv print(passwd(plain_text_password, algorithm='sha1'))
31.2
52
0.794872
23
156
5.130435
0.73913
0.186441
0.254237
0.389831
0
0
0
0
0
0
0
0.014085
0.089744
156
5
52
31.2
0.816901
0.134615
0
0
0
0
0.02963
0
0
0
0
0
0
1
0
true
0.75
0.5
0
0.5
0.25
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
7
ba1ef4403c3304c35f5e684c13cf3e853abccf57
27,812
py
Python
tests/unit/modules/dcnm/test_dcnm_service_node.py
CiscoDevNet/ansible-dcnm
1fa025085342d7d57fc4588471504d3089bd296f
[ "Apache-2.0" ]
28
2020-07-19T02:56:38.000Z
2022-03-03T01:28:10.000Z
tests/unit/modules/dcnm/test_dcnm_service_node.py
CiscoDevNet/ansible-dcnm
1fa025085342d7d57fc4588471504d3089bd296f
[ "Apache-2.0" ]
67
2020-07-17T21:49:00.000Z
2022-03-20T14:59:23.000Z
tests/unit/modules/dcnm/test_dcnm_service_node.py
CiscoDevNet/ansible-dcnm
1fa025085342d7d57fc4588471504d3089bd296f
[ "Apache-2.0" ]
18
2020-07-07T14:42:22.000Z
2022-03-09T12:31:13.000Z
#!/usr/bin/python # # Copyright (c) 2021 Cisco and/or its affiliates. # # 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. # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.ansible.netcommon.tests.unit.compat.mock import patch from ansible_collections.cisco.dcnm.plugins.modules import dcnm_service_node from .dcnm_module import TestDcnmModule, set_module_args, loadPlaybookData import json, copy __copyright__ = "Copyright (c) 2021 Cisco and/or its affiliates." __author__ = "Karthik Babu Harichandra Babu" class TestDcnmServiceNodeModule(TestDcnmModule): module = dcnm_service_node test_data = loadPlaybookData('dcnm_service_node') SUCCESS_RETURN_CODE = 200 mock_ip_sn = test_data.get('mock_ip_sn') sn_inv_data = test_data.get('sn_inv_data') playbook_config = test_data.get('playbook_config') playbook_config_replace_new = test_data.get('playbook_config_replace_new') playbook_config_replace_new1 = test_data.get('playbook_config_replace_new1') playbook_new_config = test_data.get('playbook_new_config') playbook_config_virtual = test_data.get('playbook_config_virtual') playbook_config_load = test_data.get('playbook_config_load') playbook_config_vnf = test_data.get('playbook_config_vnf') playbook_config_vpc = test_data.get('playbook_config_vpc') playbook_config_invalid_vpc = test_data.get('playbook_config_invalid_vpc') playbook_config_no_params = test_data.get('playbook_config_no_params') playbook_config_no_type = test_data.get('playbook_config_no_type') playbook_config_no_ff = test_data.get('playbook_config_no_ff') playbook_config_no_vpc = test_data.get('playbook_config_no_vpc') playbook_config_more_switch = test_data.get('playbook_config_more_switch') playbook_config_name = test_data.get('playbook_config_name') playbook_over_config = test_data.get('playbook_over_config') playbook_config_query = test_data.get('playbook_config_query') get_have_failure = test_data.get('get_have_failure') blank_data = test_data.get('blank_data') blank_data_null = test_data.get('blank_data_null') blank_get_data = test_data.get('blank_get_data') error1 = test_data.get('error1') sn_delete_success_resp = test_data.get('sn_delete_success_resp') sn_query_success_resp = test_data.get('sn_query_success_resp') def init_data(self): # Some of the mock data is re-initialized after each test as previous test might have altered portions # of the mock data. self.mock_sn_1_object = copy.deepcopy(self.test_data.get('mock_sn_1_object')) self.mock_sn_merge_1_success = copy.deepcopy(self.test_data.get('mock_sn_merge_1_success')) self.mock_sn_merge_2_success = copy.deepcopy(self.test_data.get('mock_sn_merge_2_success')) self.mock_sn_merge_3_success = copy.deepcopy(self.test_data.get('mock_sn_merge_3_success')) self.mock_sn_merge_4_success = copy.deepcopy(self.test_data.get('mock_sn_merge_4_success')) self.mock_sn_merge_5_success = copy.deepcopy(self.test_data.get('mock_sn_merge_5_success')) self.mock_sn_merge_6_success = copy.deepcopy(self.test_data.get('mock_sn_merge_6_success')) self.mock_sn_replace_1_success = copy.deepcopy(self.test_data.get('mock_sn_replace_1_success')) self.mock_sn_replace_2_success = copy.deepcopy(self.test_data.get('mock_sn_replace_2_success')) self.mock_sn_have_success = copy.deepcopy(self.test_data.get('mock_sn_have_success')) self.mock_sn_query_success = copy.deepcopy(self.test_data.get('mock_sn_query_success')) def setUp(self): super(TestDcnmServiceNodeModule, self).setUp() self.mock_dcnm_ip_sn = patch('ansible_collections.cisco.dcnm.plugins.modules.dcnm_service_node.get_fabric_inventory_details') self.run_dcnm_ip_sn = self.mock_dcnm_ip_sn.start() self.mock_dcnm_send = patch('ansible_collections.cisco.dcnm.plugins.modules.dcnm_service_node.dcnm_send') self.run_dcnm_send = self.mock_dcnm_send.start() def tearDown(self): super(TestDcnmServiceNodeModule, self).tearDown() self.mock_dcnm_send.stop() self.mock_dcnm_ip_sn.stop() def load_fixtures(self, response=None, device=''): if 'sn_blank_fabric' in self._testMethodName: self.run_dcnm_ip_sn.side_effect = [{}] else: self.run_dcnm_ip_sn.side_effect = [self.sn_inv_data] if 'get_have_failure' in self._testMethodName: self.run_dcnm_send.side_effect = [self.get_have_failure] elif '_check_mode' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_get_data] elif '_merged_one' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data, self.mock_sn_merge_1_success] elif '_merged_two' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data, self.mock_sn_merge_2_success] elif '_merged_three' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data, self.mock_sn_merge_3_success] elif '_merged_four' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data, self.mock_sn_merge_4_success] elif '_merged_five' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data, self.mock_sn_merge_5_success] elif 'error1' in self._testMethodName: self.run_dcnm_send.side_effect = [self.blank_data, self.error1, self.blank_data] elif '_merged_invalid_vpc' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [] elif '_merged_no_params' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [] elif '_merged_no_type' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [] elif '_merged_no_ff' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [] elif '_merged_more_switch' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [] elif '_merged_no_vpc' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [] elif 'delete_std' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success, self.sn_delete_success_resp] elif 'delete_all' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success, self.sn_delete_success_resp] elif 'query_no' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data, self.sn_query_success_resp] elif 'query_on' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success,self.mock_sn_have_success] elif 'query_without_config' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success,self.mock_sn_have_success] elif 'query_withonly_name' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success,self.mock_sn_have_success] elif 'query_invalid_param' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [] elif 'query_null' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data_null] elif 'override_with_additions' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.blank_data, self.mock_sn_merge_1_success] elif 'override_with_deletions' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success, self.sn_delete_success_resp, self.mock_sn_merge_6_success] elif 'override_without_changes' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success] elif 'replace_with_changes' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success, self.mock_sn_replace_1_success] elif 'replace_with_type_changes' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success, self.mock_sn_replace_2_success] elif 'replace_without_changes' in self._testMethodName: self.init_data() self.run_dcnm_send.side_effect = [self.mock_sn_have_success] else: pass def test_dcnm_sn_blank_fabric(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Fabric test_fabric missing on DCNM or does not have any switches') def test_dcnm_sn_get_have_failure(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Fabric test_fabric not present on DCNM') def test_dcnm_sn_check_mode(self): set_module_args(dict(_ansible_check_mode=True, state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=False, failed=False) self.assertFalse(result.get('diff')) self.assertFalse(result.get('response')) def test_dcnm_sn_merged_one(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Physical') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'Firewall') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_merged_two(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_virtual)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Virtual') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'Firewall') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_merged_three(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_load)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Virtual') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'AVB') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_merged_four(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_vnf)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Virtual') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'VNF') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_merged_five(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_vpc)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'vPC1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Physical') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'Firewall') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_error1(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result['msg']['RETURN_CODE'], 400) self.assertEqual(result['msg']['ERROR'], 'There is an error') def test_dcnm_sn_merged_invalid_vpc(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_invalid_vpc)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Fabric: test_fabric - if two switches are provided, vpc is only interface option') def test_dcnm_sn_merged_more_switch(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_more_switch)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Fabric: test_fabric - Upto 2 switches only allowed') def test_dcnm_sn_merged_no_params(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_no_params)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'config: element is mandatory for this state merged') def test_dcnm_sn_merged_no_type(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_no_type)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Invalid parameters in playbook: karth : Invalid choice provided') def test_dcnm_sn_merged_no_ff(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_no_ff)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Invalid parameters in playbook: babu : Invalid choice provided') def test_dcnm_sn_merged_no_vpc(self): set_module_args(dict(state='merged', fabric='test_fabric', service_fabric='external', config=self.playbook_config_no_vpc)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Fabric: test_fabric - For 1 switch, vpc is not the interface option') def test_dcnm_sn_delete_std(self): set_module_args(dict(state='deleted', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['RETURN_CODE'], self.SUCCESS_RETURN_CODE) self.assertEqual(result['response'][0]['METHOD'], 'DELETE') def test_dcnm_sn_delete_all(self): set_module_args(dict(state='deleted', fabric='test_fabric', service_fabric='external', config=[])) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['RETURN_CODE'], self.SUCCESS_RETURN_CODE) self.assertEqual(result['response'][0]['METHOD'], 'DELETE') def test_dcnm_sn_query_no(self): set_module_args(dict(state='query', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=False, failed=False) self.assertFalse(result.get('diff')) self.assertEqual(result.get('response'), []) def test_dcnm_sn_query_on(self): set_module_args(dict(state='query', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=False, failed=False) self.assertFalse(result.get('diff')) self.assertEqual(result['response'][0]['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['fabricName'], 'external') self.assertEqual(result['response'][0]['formFactor'], 'Physical') self.assertEqual(result['response'][0]['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['name'], 'SN-11') self.assertEqual(result['response'][0]['type'], 'Firewall') def test_dcnm_sn_query_without_config(self): set_module_args(dict(state='query', fabric='test_fabric', service_fabric='external', config=[])) result = self.execute_module(changed=False, failed=False) self.assertFalse(result.get('diff')) self.assertEqual(result['response'][0]['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['fabricName'], 'external') self.assertEqual(result['response'][0]['formFactor'], 'Physical') self.assertEqual(result['response'][0]['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['name'], 'SN-11') self.assertEqual(result['response'][0]['type'], 'Firewall') def test_dcnm_sn_query_withonly_name(self): set_module_args(dict(state='query', fabric='test_fabric', service_fabric='external', config=self.playbook_config_name)) result = self.execute_module(changed=False, failed=False) self.assertFalse(result.get('diff')) self.assertEqual(result['response'][0]['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['fabricName'], 'external') self.assertEqual(result['response'][0]['formFactor'], 'Physical') self.assertEqual(result['response'][0]['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['name'], 'SN-11') self.assertEqual(result['response'][0]['type'], 'Firewall') def test_dcnm_sn_query_invalid_param(self): set_module_args(dict(state='query', fabric='test_fabric', service_fabric='external', config=self.playbook_config_query)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Invalid parameters in playbook: name : Required parameter not found') def test_dcnm_sn_query_null(self): set_module_args(dict(state='query', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=False, failed=True) self.assertEqual(result.get('msg'), 'Unable to Service Node under fabric: test_fabric') def test_dcnm_sn_override_with_additions(self): set_module_args(dict(state='overridden', fabric='test_fabric', service_fabric='external', config=self.playbook_config)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Physical') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv1') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'Firewall') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_override_with_deletions(self): set_module_args(dict(state='overridden', fabric='test_fabric', service_fabric='external', config=self.playbook_new_config)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['RETURN_CODE'], self.SUCCESS_RETURN_CODE) self.assertEqual(result['response'][0]['METHOD'], 'DELETE') self.assertEqual(result['response'][1]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][1]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/2') self.assertEqual(result['response'][1]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][1]['DATA']['formFactor'], 'Virtual') self.assertEqual(result['response'][1]['DATA']['interfaceName'], 'scv12') self.assertEqual(result['response'][1]['DATA']['name'], 'SN-12') self.assertEqual(result['response'][1]['DATA']['type'], 'ADC') self.assertEqual(result['response'][1]['RETURN_CODE'], 200) def test_dcnm_sn_override_without_changes(self): set_module_args(dict(state='overridden', fabric='test_fabric', service_fabric='external', config=self.playbook_over_config)) result = self.execute_module(changed=False, failed=False) self.assertFalse(result.get('diff')) self.assertFalse(result.get('response')) def test_dcnm_sn_replace_with_changes(self): set_module_args(dict(state='replaced', fabric='test_fabric', service_fabric='external', config=self.playbook_config_replace_new)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['RETURN_CODE'], self.SUCCESS_RETURN_CODE) self.assertEqual(result['response'][0]['METHOD'], 'PUT') self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Virtual') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv11') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'Firewall') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_replace_with_type_changes(self): set_module_args(dict(state='replaced', fabric='test_fabric', service_fabric='external', config=self.playbook_config_replace_new1)) result = self.execute_module(changed=True, failed=False) self.assertEqual(result['response'][0]['RETURN_CODE'], self.SUCCESS_RETURN_CODE) self.assertEqual(result['response'][0]['METHOD'], 'PUT') self.assertEqual(result['response'][0]['DATA']['attachedFabricName'], 'test_fabric') self.assertEqual(result['response'][0]['DATA']['attachedSwitchInterfaceName'], 'Ethernet1/1') self.assertEqual(result['response'][0]['DATA']['fabricName'], 'external') self.assertEqual(result['response'][0]['DATA']['formFactor'], 'Virtual') self.assertEqual(result['response'][0]['DATA']['interfaceName'], 'scv11') self.assertEqual(result['response'][0]['DATA']['name'], 'SN-11') self.assertEqual(result['response'][0]['DATA']['type'], 'ADC') self.assertEqual(result['response'][0]['RETURN_CODE'], 200) def test_dcnm_sn_replace_without_changes(self): set_module_args(dict(state='replaced', fabric='test_fabric', service_fabric='external', config=self.playbook_over_config)) result = self.execute_module(changed=False, failed=False) self.assertFalse(result.get('diff')) self.assertFalse(result.get('response'))
55.624
133
0.671257
3,355
27,812
5.271535
0.075708
0.098383
0.137736
0.168891
0.833145
0.805213
0.760319
0.743187
0.730126
0.720853
0
0.011034
0.191824
27,812
499
134
55.735471
0.775815
0.026391
0
0.565432
0
0
0.216371
0.040835
0
0
0
0
0.311111
1
0.081481
false
0.002469
0.012346
0
0.167901
0.002469
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
e8693989649870a8a1013dabbcc432f4003f82a9
6,069
py
Python
core/migrations/0002_auto_20190712_1140.py
bpotvin-bccrc/colossus
fa5ca7ce4cfe794c7d2167acb868aa9167988941
[ "MIT" ]
2
2018-10-03T16:05:14.000Z
2019-03-08T23:01:29.000Z
core/migrations/0002_auto_20190712_1140.py
bpotvin-bccrc/colossus
fa5ca7ce4cfe794c7d2167acb868aa9167988941
[ "MIT" ]
3
2019-05-09T22:48:22.000Z
2020-06-05T18:52:05.000Z
core/migrations/0002_auto_20190712_1140.py
bpotvin-bccrc/colossus
fa5ca7ce4cfe794c7d2167acb868aa9167988941
[ "MIT" ]
4
2018-08-16T22:25:10.000Z
2021-02-19T16:10:15.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2019-07-12 18:40 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('core', '0001_initial'), ('dlp', '0001_initial'), ] operations = [ migrations.AddField( model_name='sublibraryinformation', name='library', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dlp.DlpLibrary', verbose_name='Library'), ), migrations.AddField( model_name='sublibraryinformation', name='sample_id', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Sample', verbose_name='Sample_ID'), ), migrations.AddField( model_name='historicalsublibraryinformation', name='chip_region', field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='core.ChipRegion', verbose_name='Chip_Region'), ), migrations.AddField( model_name='historicalsublibraryinformation', name='history_user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='historicalsublibraryinformation', name='library', field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dlp.DlpLibrary', verbose_name='Library'), ), migrations.AddField( model_name='historicalsublibraryinformation', name='sample_id', field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='core.Sample', verbose_name='Sample_ID'), ), migrations.AddField( model_name='historicalsample', name='history_user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='historicalmetadatafield', name='history_user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='historicaljirauser', name='history_user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='historicalchipregionmetadata', name='chip_region', field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='core.ChipRegion', verbose_name='Chip_Region'), ), migrations.AddField( model_name='historicalchipregionmetadata', name='history_user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='historicalchipregionmetadata', name='metadata_field', field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='core.MetadataField', verbose_name='Metadata key'), ), migrations.AddField( model_name='historicalchipregion', name='history_user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='historicalchipregion', name='library', field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dlp.DlpLibrary', verbose_name='Library'), ), migrations.AddField( model_name='historicaladditionalsampleinformation', name='history_user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='historicaladditionalsampleinformation', name='sample', field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='core.Sample', verbose_name='Sample'), ), migrations.AddField( model_name='chipregionmetadata', name='chip_region', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.ChipRegion', verbose_name='Chip_Region'), ), migrations.AddField( model_name='chipregionmetadata', name='metadata_field', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.MetadataField', verbose_name='Metadata key'), ), migrations.AddField( model_name='chipregion', name='library', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dlp.DlpLibrary', verbose_name='Library'), ), migrations.AddField( model_name='additionalsampleinformation', name='sample', field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.Sample', verbose_name='Sample'), ), ]
49.745902
200
0.657934
640
6,069
6.034375
0.121875
0.045572
0.076126
0.119627
0.884516
0.884516
0.762817
0.762817
0.762817
0.762817
0
0.005469
0.216675
6,069
121
201
50.157025
0.806899
0.011369
0
0.778761
1
0
0.173087
0.062365
0
0
0
0
0
1
0
false
0
0.035398
0
0.070796
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
e8b1fbabfb3ca5681392542a9e021397587efeff
8,114
py
Python
tests/chain_integration/test_exchange_proxy.py
dakingha69/relay
bffc37ca9963d8bd5937aa33db86147090de3971
[ "MIT" ]
null
null
null
tests/chain_integration/test_exchange_proxy.py
dakingha69/relay
bffc37ca9963d8bd5937aa33db86147090de3971
[ "MIT" ]
null
null
null
tests/chain_integration/test_exchange_proxy.py
dakingha69/relay
bffc37ca9963d8bd5937aa33db86147090de3971
[ "MIT" ]
null
null
null
import gevent import pytest from relay.blockchain.exchange_proxy import ExchangeProxy from relay.constants import NULL_ADDRESS from relay.exchange.order import SignableOrder @pytest.fixture() def order_token( exchange_address, network_addresses_with_exchange, unw_eth_address, maker, maker_key ): order = SignableOrder( exchange_address=exchange_address, maker_address=maker, taker_address=NULL_ADDRESS, maker_token=unw_eth_address, taker_token=network_addresses_with_exchange[0], fee_recipient=NULL_ADDRESS, maker_token_amount=100, taker_token_amount=200, maker_fee=0, taker_fee=0, expiration_timestamp_in_sec=1230000000000, salt=123, ) order.sign(maker_key) return order @pytest.fixture() def order_trustlines( exchange_address, network_addresses_with_exchange, unw_eth_address, maker, maker_key ): order = SignableOrder( exchange_address=exchange_address, maker_address=maker, taker_address=NULL_ADDRESS, maker_token=network_addresses_with_exchange[0], taker_token=unw_eth_address, fee_recipient=NULL_ADDRESS, maker_token_amount=100, taker_token_amount=200, maker_fee=0, taker_fee=0, expiration_timestamp_in_sec=1230000000000, salt=123, ) order.sign(maker_key) return order @pytest.fixture() def exchange_proxy(web3, exchange_abi, token_abi, exchange_address, address_oracle): return ExchangeProxy( web3, exchange_abi, token_abi, exchange_address, address_oracle ) def test_validate(order_trustlines, exchange_proxy): assert exchange_proxy.validate(order_trustlines) def test_not_enough_funds(order_token, exchange_proxy): assert not exchange_proxy.validate_funds(order_token) assert not exchange_proxy.validate(order_token) def test_enough_funds(order_token, exchange_proxy, testnetworks): unw_eth_contract = testnetworks[2] unw_eth_contract.functions.deposit().transact( {"from": order_token.maker_address, "value": 100} ) assert exchange_proxy.validate_funds(order_token) assert exchange_proxy.validate(order_token) def test_no_filled_amount(order_token, exchange_proxy): assert exchange_proxy.get_filled_amount(order_token) == 0 def test_filled_amount(order_trustlines, exchange_proxy, testnetworks, maker, taker): order = order_trustlines assert maker == order.maker_address exchange_contract = testnetworks[1] exchange_contract.functions.fillOrderTrustlines( [ order.maker_address, order.taker_address, order.maker_token, order.taker_token, order.fee_recipient, ], [ order.maker_token_amount, order.taker_token_amount, order.maker_fee, order.taker_fee, order.expiration_timestamp_in_sec, order.salt, ], 100, [maker, taker], [], order.v, order.r, order.s, ).transact({"from": taker}) assert exchange_proxy.get_filled_amount(order) == 100 assert exchange_proxy.validate_filled_amount(order) exchange_contract.functions.fillOrderTrustlines( [ order.maker_address, order.taker_address, order.maker_token, order.taker_token, order.fee_recipient, ], [ order.maker_token_amount, order.taker_token_amount, order.maker_fee, order.taker_fee, order.expiration_timestamp_in_sec, order.salt, ], 100, [maker, taker], [], order.v, order.r, order.s, ).transact({"from": taker}) assert exchange_proxy.get_filled_amount(order) == 200 assert not exchange_proxy.validate_filled_amount(order) def test_cancelled_amount(order_trustlines, exchange_proxy, testnetworks, maker, taker): order = order_trustlines exchange_contract = testnetworks[1] exchange_contract.functions.cancelOrder( [ order.maker_address, order.taker_address, order.maker_token, order.taker_token, order.fee_recipient, ], [ order.maker_token_amount, order.taker_token_amount, order.maker_fee, order.taker_fee, order.expiration_timestamp_in_sec, order.salt, ], 100, ).transact({"from": maker}) assert exchange_proxy.get_cancelled_amount(order) == 100 def test_unavailable_amount( order_trustlines, exchange_proxy, testnetworks, maker, taker ): order = order_trustlines exchange_contract = testnetworks[1] exchange_contract.functions.fillOrderTrustlines( [ order.maker_address, order.taker_address, order.maker_token, order.taker_token, order.fee_recipient, ], [ order.maker_token_amount, order.taker_token_amount, order.maker_fee, order.taker_fee, order.expiration_timestamp_in_sec, order.salt, ], 10, [maker, taker], [], order.v, order.r, order.s, ).transact({"from": taker}) exchange_contract.functions.cancelOrder( [ order.maker_address, order.taker_address, order.maker_token, order.taker_token, order.fee_recipient, ], [ order.maker_token_amount, order.taker_token_amount, order.maker_fee, order.taker_fee, order.expiration_timestamp_in_sec, order.salt, ], 10, ).transact({"from": maker}) assert exchange_proxy.get_unavailable_amount(order) == 20 def test_listen_on_fill(order_trustlines, exchange_proxy, testnetworks, maker, taker): logs = [] def log(order_hash, maker_token_amount, taker_token_amount): logs.append((order_hash, maker_token_amount, taker_token_amount)) order = order_trustlines exchange_proxy.start_listen_on_fill(log) gevent.sleep(0.001) exchange_contract = testnetworks[1] exchange_contract.functions.fillOrderTrustlines( [ order.maker_address, order.taker_address, order.maker_token, order.taker_token, order.fee_recipient, ], [ order.maker_token_amount, order.taker_token_amount, order.maker_fee, order.taker_fee, order.expiration_timestamp_in_sec, order.salt, ], 100, [maker, taker], [], order.v, order.r, order.s, ).transact({"from": taker}) gevent.sleep(1) log1 = logs[0] assert log1[0] == order.hash() assert log1[1] == 50 assert log1[2] == 100 def test_listen_on_cancel(order_token, exchange_proxy, testnetworks, maker, taker): logs = [] def log(order_hash, maker_token_amount, taker_token_amount): logs.append((order_hash, maker_token_amount, taker_token_amount)) order = order_token exchange_proxy.start_listen_on_cancel(log) gevent.sleep(0.001) exchange_contract = testnetworks[1] exchange_contract.functions.cancelOrder( [ order.maker_address, order.taker_address, order.maker_token, order.taker_token, order.fee_recipient, ], [ order.maker_token_amount, order.taker_token_amount, order.maker_fee, order.taker_fee, order.expiration_timestamp_in_sec, order.salt, ], 100, ).transact({"from": maker}) gevent.sleep(1) log1 = logs[0] assert log1[0] == order.hash() assert log1[1] == 50 assert log1[2] == 100
26.778878
88
0.627927
875
8,114
5.482286
0.094857
0.060454
0.053367
0.045028
0.870544
0.832812
0.78966
0.732333
0.732333
0.711069
0
0.022188
0.289007
8,114
302
89
26.86755
0.809326
0
0
0.759843
0
0
0.00456
0
0
0
0
0
0.074803
1
0.055118
false
0
0.019685
0.003937
0.086614
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
2cf9dd7fe04fad28ae2edf162b82fa32972287ce
2,060
py
Python
cs3api4lab/exception/exceptions.py
SoftwareMind-ScienceMesh-org/cs3api4lab
3de2e3d9fcb920110697686fa37ac06257cd650e
[ "Apache-2.0" ]
null
null
null
cs3api4lab/exception/exceptions.py
SoftwareMind-ScienceMesh-org/cs3api4lab
3de2e3d9fcb920110697686fa37ac06257cd650e
[ "Apache-2.0" ]
null
null
null
cs3api4lab/exception/exceptions.py
SoftwareMind-ScienceMesh-org/cs3api4lab
3de2e3d9fcb920110697686fa37ac06257cd650e
[ "Apache-2.0" ]
null
null
null
class ShareError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class ShareAlreadyExistsError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class ShareNotFoundError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class ResourceNotFoundError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class ProviderNotFoundError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class LockNotFoundError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class OCMDisabledError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class InvalidTypeError(Exception): def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message class ParamError(Exception): def __init__(self, key_error): self.message = "Missing argument: " + str(key_error) super().__init__(self.message) def __str__(self): return self.__class__.__name__ + ": " + self.message
26.753247
60
0.652427
212
2,060
5.481132
0.108491
0.331325
0.219449
0.154905
0.80895
0.80895
0.80895
0.80895
0.80895
0.80895
0
0
0.231068
2,060
77
61
26.753247
0.733586
0
0
0.796296
0
0
0.017467
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
0
0
0
0
null
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
12
fa54949c2c0d27b747b5c93aff480c7a79ed5816
84
py
Python
pypi_sandbox/__init__.py
mattfinnell/pypi-sandbox
6a5b0c446d548aa63bbafa3beb9aa0d901dc895a
[ "MIT" ]
null
null
null
pypi_sandbox/__init__.py
mattfinnell/pypi-sandbox
6a5b0c446d548aa63bbafa3beb9aa0d901dc895a
[ "MIT" ]
null
null
null
pypi_sandbox/__init__.py
mattfinnell/pypi-sandbox
6a5b0c446d548aa63bbafa3beb9aa0d901dc895a
[ "MIT" ]
null
null
null
def echo(): return "Hello from my python package index sandbox project. --Matt"
28
71
0.714286
12
84
5
1
0
0
0
0
0
0
0
0
0
0
0
0.190476
84
2
72
42
0.882353
0
0
0
0
0
0.690476
0
0
0
0
0
0
1
0.5
true
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
7
fa60c95828d4a1b20f5f0380e796f0aaeb89ef63
170
py
Python
funding/routes_admin.py
aluisyonetwork/aluisyo-funding-system
18591adc2fc4b209f00f6cc7e6bebad60fe09298
[ "WTFPL" ]
null
null
null
funding/routes_admin.py
aluisyonetwork/aluisyo-funding-system
18591adc2fc4b209f00f6cc7e6bebad60fe09298
[ "WTFPL" ]
null
null
null
funding/routes_admin.py
aluisyonetwork/aluisyo-funding-system
18591adc2fc4b209f00f6cc7e6bebad60fe09298
[ "WTFPL" ]
null
null
null
from flask.ext.login import login_required from wowfunding.factory import app, db_session @app.route('/admin/index') @login_required def admin_home(): return 'yep'
18.888889
46
0.770588
25
170
5.08
0.72
0.204724
0
0
0
0
0
0
0
0
0
0
0.123529
170
8
47
21.25
0.852349
0
0
0
0
0
0.088235
0
0
0
0
0
0
1
0.166667
true
0
0.333333
0.166667
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
7
3af8bd5fca7fcb7d0887a54c6149d9e3a32d2ba2
69,105
py
Python
scripts/artifacts/knowCall.py
forensicmike/iLEAPP
08b33e68ffa4d4fc7b1fe36c7728e6bc572aea11
[ "MIT" ]
null
null
null
scripts/artifacts/knowCall.py
forensicmike/iLEAPP
08b33e68ffa4d4fc7b1fe36c7728e6bc572aea11
[ "MIT" ]
null
null
null
scripts/artifacts/knowCall.py
forensicmike/iLEAPP
08b33e68ffa4d4fc7b1fe36c7728e6bc572aea11
[ "MIT" ]
null
null
null
import glob import os import json import textwrap import scripts.artifacts.artGlobals from packaging import version from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, kmlgen, is_platform_windows, open_sqlite_db_readonly from scripts.ccl import ccl_bplist from scripts.parse3 import ParseProto def get_knowCall(files_found, report_folder, seeker): iOSversion = scripts.artifacts.artGlobals.versionf if version.parse(iOSversion) < version.parse("12"): logfunc("Unsupported version for KnowledgC Inferred Motion on iOS " + iOSversion) else: file_found = str(files_found[0]) db = open_sqlite_db_readonly(file_found) cursor = db.cursor() cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zsecondsfromgmt/3600, zobject.zvalueinteger, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/inferred/motion' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])) description = '' report = ArtifactHtmlReport('KnowledgeC Inferred Motion') report.start_artifact_report(report_folder, 'Inferred Motion', description) report.add_script() data_headers = ('Start','End','GMT Offset','Value','Usage in Seconds','Usage in Minutes','Day of Week','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Inferred Motion' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Inferred Motion' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Inferred Motion') cursor = db.cursor() cursor.execute(''' select datetime(zobject.zcreationdate+978307200,'unixepoch'), case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__title, datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate+978307200,'unixepoch'), zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelatedcontenturl, datetime(zstructuredmetadata.zcom_apple_calendaruikit_useractivity_date+978307200,'unixepoch'), datetime(zstructuredmetadata.zcom_apple_calendaruikit_useractivity_enddate+978307200,'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/app/activity' order by 'entry creation' ''') all_rows = cursor.fetchall() usageentries = len(all_rows) data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10])) description = '' report = ArtifactHtmlReport('KnowledgeC App Activity') report.start_artifact_report(report_folder, 'App Activity', description) report.add_script() data_headers = ('Entry Creation','Day of the Week','Start','End','Value String', 'Activity Type', 'Title', 'Expiration Date', 'Content URL', 'Calendar Date', 'Calendar End Date' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC App Activity' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC App Activity' timeline(report_folder, tlactivity, data_list, data_headers) if version.parse(iOSversion) >= version.parse("12"): cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zsource.zgroupid, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__contentdescription, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityrequiredstring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelatedcontenturl, zstructuredmetadata.z_dkapplicationactivitymetadatakey__suggestedinvocationphrase, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelateduniqueidentifier, zsource.zsourceid, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemidentifier, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityuuid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate + 978307200, 'unixepoch'), datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate + 978307200, 'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/app/activity' ''') else: cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__title, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelatedcontenturl, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate + 978307200, 'unixepoch'), datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate + 978307200, 'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/app/activity' ''') all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("12"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],row[10],row[11],row[12],row[13],row[14],row[15],row[16])) report = ArtifactHtmlReport('KnowledgeC Application Activity') report.start_artifact_report(report_folder, 'Application Activity') report.add_script() data_headers = ('Start','End','Bundle ID','Group ID','Activity Type', 'Content Description', 'User Activity Required String', 'Content URL','Suggest Invocation Phrase','Unique ID','Source ID','ID','Activity UUID','Day of Week','GMT Offset','Entry Creation','Expiration Date' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application Activity' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application Activity' timeline(report_folder, tlactivity, data_list, data_headers) else: for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9])) report = ArtifactHtmlReport('KnowledgeC Application Activity') report.start_artifact_report(report_folder, 'Application Activity') report.add_script() data_headers = ('Start','End','Bundle ID','Activity Type', 'Title','Content URL','Day of Week','GMT Offset','Entry Creation','Expiration Date') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application Activity' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application Activity' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Application Activity') if version.parse(iOSversion) >= version.parse("12"): cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityrequiredstring , zstructuredmetadata.z_dkapplicationactivitymetadatakey__title, datetime(zstructuredmetadata.zcom_apple_calendaruikit_useractivity_date + 978307200, 'unixepoch'), datetime(zstructuredmetadata.zcom_apple_calendaruikit_useractivity_enddate + 978307200, 'unixepoch'), zsource.zsourceid, case zobject.zstartdayofweek when "1" then "sunday" when "2" then "monday" when "3" then "tuesday" when "4" then "wednesday" when "5" then "thursday" when "6" then "friday" when "7" then "saturday" end , zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate + 978307200, 'unixepoch'), datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate + 978307200, 'unixepoch') from zobject left join zstructuredmetadata on zobject.zstructuredmetadata = zstructuredmetadata.z_pk left join zsource on zobject.zsource = zsource.z_pk where zstreamname = "/app/activity" and (zvaluestring = "com.apple.mobilecal" or zvaluestring = "com.apple.ical") ''') else: cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityrequiredstring , zstructuredmetadata.z_dkapplicationactivitymetadatakey__title, datetime(zstructuredmetadata.zcom_apple_calendaruikit_useractivity_date + 978307200, 'unixepoch'), datetime(zstructuredmetadata.zcom_apple_calendaruikit_useractivity_enddate + 978307200, 'unixepoch'), zsource.zsourceid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end , zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate + 978307200, 'unixepoch'), datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate + 978307200, 'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/app/activity' and (zvaluestring = 'com.apple.mobilecal' or zvaluestring = 'com.apple.ical') ''') all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("12"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],row[10],row[11],row[12])) report = ArtifactHtmlReport('InteractionC Application Activity Calendar') report.start_artifact_report(report_folder, 'Application Activity Calendar') report.add_script() data_headers = ('Start','End','Bundle ID','Activity Type','User Activity Required String','Title','Calendar Date','Calendar End Date','Source ID','Day of Week','GMT Offset','Entry Creation','Expiration Date') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application Activity Calendar' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application Activity Calendar' timeline(report_folder, tlactivity, data_list, data_headers) else: for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],row[10])) report = ArtifactHtmlReport('InteractionC Application Activty Calendar') report.start_artifact_report(report_folder, 'Application Activity Calendar') report.add_script() data_headers = ('Start','End','Bundle ID','Activity Type', 'Title','Expiration Date','Calendar Date','Calendar End Date','Day of Week','GMT Offset','Entry Creation' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application Activity Calendar' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application Activity Calendar' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Application Activity Calendar') if version.parse(iOSversion) >= version.parse("12"): cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__contentdescription, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelatedcontenturl, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityrequiredstring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemidentifier, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelateduniqueidentifier, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityuuid, zsource.zsourceid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate + 978307200, 'unixepoch'), datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate + 978307200, 'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/app/activity' and (zobject.zvaluestring = 'com.apple.mobilesafari' or zobject.zvaluestring = 'com.apple.safari') ''') else: cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelatedcontenturl, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemidentifier, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelateduniqueidentifier, zsource.zsourceid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate + 978307200, 'unixepoch'), datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate + 978307200, 'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/app/activity' and (zobject.zvaluestring = 'com.apple.mobilesafari' or zobject.zvaluestring = 'com.apple.safari') ''') all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("12"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],row[10],row[11],row[12],row[13],row[14])) report = ArtifactHtmlReport('KnowledgeC Application Activity Safari') report.start_artifact_report(report_folder, 'Application Activity Safari') report.add_script() data_headers = ('Start','End','Bundle ID','Activity Type', 'Content Description', 'Content URL','User Activity Required String','ID','Unique ID','Activity UUID','Source ID','Day of Week','GMT Offset','Entry Creation','Expiration Date') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application Activity Safari' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application Activity Safari' timeline(report_folder, tlactivity, data_list, data_headers) else: for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],row[10],row[11])) report = ArtifactHtmlReport('KnowledgeC Application Activty Safari') report.start_artifact_report(report_folder, 'Application Activity Safari') report.add_script() data_headers = ('Start','End','Bundle ID','Activity Type','Content URL','ID','Unique ID','Source ID','Day of Week','GMT Offset','Entry Creation','Expiration Date') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application Activity Safari' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application Activity Safari' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Appplication Activity Safari') if version.parse(iOSversion) >= version.parse("12"): cursor = db.cursor() cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/app/relevantShortcuts' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5])) description = '' report = ArtifactHtmlReport('KnowledgeC Application Relevant Shortcuts') report.start_artifact_report(report_folder, 'App Relevant Shortcuts', description) report.add_script() data_headers = ('Start','End','Bundle ID','Day of the Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application Relevant Shortcuts' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application Relevant Shortcuts' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Relevant Shortcuts') if version.parse(iOSversion) >= version.parse("12"): cursor = db.cursor() cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'no' when '1' then 'yes' end, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zobject.zstreamname = '/display/isBacklit' """) elif version.parse(iOSversion) == version.parse("11"): cursor = db.cursor() cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'no' when '1' then 'yes' end, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zobject.zstreamname = '/display/isBacklit' """) else: logfunc("Unsupported version for KnowledgC Backlit" + iOSversion) return () all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("12"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7])) report = ArtifactHtmlReport('KnowledgeC Device is Backlit') report.start_artifact_report(report_folder, 'Device is Backlit') report.add_script() data_headers = ('Start','End','Screen is Backlit','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Device is Backlit' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Device is Backlit' timeline(report_folder, tlactivity, data_list, data_headers) elif version.parse(iOSversion) == version.parse("11"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6])) report = ArtifactHtmlReport('KnowledgeC Device is Backlit') report.start_artifact_report(report_folder, 'Device is Backlit') report.add_script() data_headers = ('Start','End','Screen is Backlit','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Device is Backlit' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Device is Backlit' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Device is Backlit') if version.parse(iOSversion) >= version.parse("11"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluedouble, (zobject.zenddate - zobject.zstartdate), case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname like '/device/BatteryPercentage' """ ) all_rows = cursor.fetchall() usageentries = len(all_rows) data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6])) description = '' report = ArtifactHtmlReport('KnowledgeC Battery Level') report.start_artifact_report(report_folder, 'Battery Level', description) report.add_script() data_headers = ('Start','End','Battery Level','Usage in Seconds','Day of the Week','GMT Offset','Entry Creation' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Battery Level' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Battery Level' timeline(report_folder, tlactivity, data_list, data_headers) if version.parse(iOSversion) >= version.parse("11"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zstructuredmetadata.z_dkbluetoothmetadatakey__address, zstructuredmetadata.z_dkbluetoothmetadatakey__name, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zstructuredmetadata on zobject.zstructuredmetadata = zstructuredmetadata.z_pk where zstreamname = '/bluetooth/isConnected' """ ) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8])) description = '' report = ArtifactHtmlReport('KnowledgeC Bluetooth Connections') report.start_artifact_report(report_folder, 'Bluetooth Connections', description) report.add_script() data_headers = ('Start','End','Bluetooth Address','Bluetooth Name','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Bluetooth Connections' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Bluetooth Connections' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Bluetooth Connections') if version.parse(iOSversion) >= version.parse("11"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'disconnected' when '1' then 'connected' end, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname is '/carplay/isConnected' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])) description = '' report = ArtifactHtmlReport('KnowledgeC Car Play Connections') report.start_artifact_report(report_folder, 'Car Play Connections', description) report.add_script() data_headers = ('Start','End','Car Play Connected','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Car Play Connections' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Car Play Connections' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Car Play Connections') if version.parse(iOSversion) >= version.parse("13"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zsource.zbundleid, zobject.zvaluestring, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zsource where zobject.zsource = zsource.z_pk and zstreamname = '/disk/subsystemAccess' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8])) description = '' report = ArtifactHtmlReport('KnowledgeC Disk Subsystem Access') report.start_artifact_report(report_folder, 'Disk Subsystem Access', description) report.add_script() data_headers = ('Start','End','Bundle ID','Value String','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Disk Subsystem Access' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Disk Subsystem Access' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Disk Subsystem Access') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvalueinteger, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/inferred/motion' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])) description = '' report = ArtifactHtmlReport('KnowledgeC Do Not Disturb') report.start_artifact_report(report_folder, 'Do Not Disturb', description) report.add_script() data_headers = ('Start','End','Value','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Do Not Disturb' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Do Not Disturb' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Do Not Disturb') data_list = [] if version.parse(iOSversion) >= version.parse("11"): extension = ".bplist" dump = True # create directories outpath = report_folder try: os.mkdir(os.path.join(report_folder, "clean")) os.mkdir(os.path.join(report_folder, "dirty")) except OSError: logfunc("Error making directories") file_found = str(files_found[0]) # connect sqlite databases db = open_sqlite_db_readonly(file_found) cursor = db.cursor() # variable initializations dirtcount = 0 cleancount = 0 intentc = {} intentv = {} cursor.execute( """ SELECT Z_PK, Z_DKINTENTMETADATAKEY__SERIALIZEDINTERACTION, Z_DKINTENTMETADATAKEY__INTENTCLASS, Z_DKINTENTMETADATAKEY__INTENTVERB FROM ZSTRUCTUREDMETADATA WHERE Z_DKINTENTMETADATAKEY__SERIALIZEDINTERACTION is not null """ ) all_rows = cursor.fetchall() for row in all_rows: pkv = str(row[0]) pkvplist = pkv + extension f = row[1] intentclass = str(row[2]) intententverb = str(row[3]) output_file = open(os.path.join(outpath, "dirty", "D_Z_PK" + pkvplist), "wb") # export dirty from DB output_file.write(f) output_file.close() g = open(os.path.join(outpath, "dirty", "D_Z_PK" + pkvplist), "rb") plistg = ccl_bplist.load(g) if version.parse(iOSversion) < version.parse("12"): ns_keyed_archiver_objg = ccl_bplist.deserialise_NsKeyedArchiver(plistg) newbytearray = ns_keyed_archiver_objg else: ns_keyed_archiver_objg = ccl_bplist.deserialise_NsKeyedArchiver(plistg) newbytearray = ns_keyed_archiver_objg["NS.data"] dirtcount = dirtcount + 1 binfile = open(os.path.join(outpath, "clean", "C_Z_PK" + pkvplist), "wb") binfile.write(newbytearray) binfile.close() # add to dictionaries intentc["C_Z_PK" + pkvplist] = intentclass intentv["C_Z_PK" + pkvplist] = intententverb cleancount = cleancount + 1 ''' h = open(outpath + "/StrucMetadata.html", "w") h.write("<html><body>") h.write( "<h2>iOS " + iOSversion + " - KnowledgeC ZSTRUCTUREDMETADATA bplist report</h2>" ) h.write( "<style> table, td {border: 1px solid black; border-collapse: collapse;}tr:nth-child(even) {background-color: #f2f2f2;} .table th { background: #888888; color: #ffffff}.table.sticky th{ position:sticky; top: 0; }</style>" ) h.write("<br/>") ''' for filename in glob.glob(outpath + "/clean/*" + extension): p = open(filename, "rb") cfilename = os.path.basename(filename) plist = ccl_bplist.load(p) ns_keyed_archiver_obj = ccl_bplist.deserialise_NsKeyedArchiver( plist, parse_whole_structure=True ) # deserialize clean # Get dictionary values A = intentc.get(cfilename) B = intentv.get(cfilename) if A is None: A = "No value" if B is None: A = "No value" # logfunc some values from clean bplist if version.parse(iOSversion) >= version.parse("13"): try: NSdata = ns_keyed_archiver_obj["root"]["intent"]["backingStore"][ "bytes" ] except: NSdata = ns_keyed_archiver_obj["root"]["intent"]["backingStore"][ "data" ]["NS.data"] pass else: NSdata = ns_keyed_archiver_obj["root"]["intent"]["backingStore"][ "data" ]["NS.data"] # logfunc(str(NSdata)) parsedNSData = "" # Default true if dump == True: nsdata_file = os.path.join(outpath, "clean", cfilename + "_nsdata.bin") binfile = open(nsdata_file, "wb") if version.parse(iOSversion) >= version.parse("13"): try: binfile.write( ns_keyed_archiver_obj["root"]["intent"]["backingStore"][ "bytes" ] ) except: binfile.write( ns_keyed_archiver_obj["root"]["intent"]["backingStore"][ "data" ]["NS.data"] ) pass else: binfile.write( ns_keyed_archiver_obj["root"]["intent"]["backingStore"]["data"][ "NS.data" ] ) binfile.close() messages = ParseProto(nsdata_file) messages_json_dump = json.dumps( messages, indent=4, sort_keys=True, ensure_ascii=False ) parsedNSData = str(messages_json_dump).encode( encoding="UTF-8", errors="ignore" ) NSstartDate = ccl_bplist.convert_NSDate( (ns_keyed_archiver_obj["root"]["dateInterval"]["NS.startDate"]) ) NSendDate = ccl_bplist.convert_NSDate( (ns_keyed_archiver_obj["root"]["dateInterval"]["NS.endDate"]) ) NSduration = ns_keyed_archiver_obj["root"]["dateInterval"]["NS.duration"] Siri = ns_keyed_archiver_obj["root"]["_donatedBySiri"] if parsedNSData: parsedf = str(parsedNSData).replace("\\n", "<br>") else: parsedf = str(NSdata).replace("\\n", "<br>") data_list.append(( str(NSstartDate),str(A), str(B), str(Siri), str(NSendDate), str(NSduration), parsedf, (textwrap.fill(str(NSdata), width=50)), cfilename)) logfunc("iOS - KnowledgeC ZSTRUCTUREDMETADATA bplist extractor") logfunc("By: @phillmoore & @AlexisBrignoni") logfunc("thinkdfir.com & abrignoni.com") logfunc("") logfunc("Bplists from the Z_DKINTENTMETADATAKEY__SERIALIZEDINTERACTION field.") logfunc("Exported bplists (dirty): " + str(dirtcount)) logfunc("Exported bplists (clean): " + str(cleancount)) logfunc("") logfunc("Incepted bplist extractions in KnowledgeC.db completed") description = '' report = ArtifactHtmlReport('KnowledgeC Intents') report.start_artifact_report(report_folder, 'Intents', description) report.add_script() data_headers = ('NS Start Date','Intent Class','Intent Verb','Siri?','NS Send Date','NS Duration','NS Data Protobuf', 'NS Data', 'Traceback' ) report.write_artifact_data_table(data_headers, data_list, file_found, html_escape=False) report.end_artifact_report() tlactivity = 'KnowledgeC Intents' timeline(report_folder, tlactivity, data_list, data_headers) if version.parse(iOSversion) >= version.parse("9"): cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, (zobject.zenddate-zobject.zstartdate), (zobject.zenddate-zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname is '/app/inFocus' ''') all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("9"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7])) report = ArtifactHtmlReport('KnowledgeC Application In Focus') report.start_artifact_report(report_folder, 'App In Focus') report.add_script() data_headers = ('Start','End','Bundle ID', 'Usage in Seconds', 'Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Application in Focus' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Application in Focus' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Application in Focus') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata .z_dkappinstallmetadatakey__primarycategory, zstructuredmetadata .z_dkappinstallmetadatakey__title, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zstructuredmetadata where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zstreamname = '/app/install' ''') else: cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zstructuredmetadata where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zstreamname = "/app/install" ''') all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("12"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7])) report = ArtifactHtmlReport('KnowledgeC Installed Apps') report.start_artifact_report(report_folder, 'Installed Apps') report.add_script() data_headers = ('Start','End','Bundle ID','App Category', 'App Name','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Installed Apps' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Installed Apps' timeline(report_folder, tlactivity, data_list, data_headers) else: for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5])) report = ArtifactHtmlReport('KnowledgeC Installed Apps') report.start_artifact_report(report_folder, 'Installed Apps') report.add_script() data_headers = ('Start','End','Bundle ID','Day of Week','GMT Offset','Entry Creation' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Installed Apps' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Installed Apps' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Installed Apps') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__locationname, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__displayname, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__fullyformattedaddress, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__city, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__stateorprovince, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__country, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__postalcode_v2, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__subthoroughfare, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__thoroughfare, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__phonenumbers, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__url, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__contentdescription, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityrequiredstring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelatedcontenturl, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelateduniqueidentifier, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__latitude, zstructuredmetadata.z_dklocationapplicationactivitymetadatakey__longitude, zsource.zsourceid, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityuuid, zsource.zitemid, zsource.zsourceid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/app/locationActivity' """ ) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21], row[22], row[23], row[24], row[25], row[26], row[27])) description = '' report = ArtifactHtmlReport('KnowledgeC Location Activity') report.start_artifact_report(report_folder, 'Location Activity', description) report.add_script() data_headers = ('Timestamp','End','Bundle ID','Name','Display Name','Formatted Address', 'City','State/Province','Country','Postal Code','Subthoroughfare','Thoroughfare','Phone Numebers','URL','Activity Type', 'Content Description','User Activity Required String','Content URL','Unique ID','Latitude','Longitude','Source ID','Activity UUID','Item ID','Source ID','Day of the Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Location Activity' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Location Activity' timeline(report_folder, tlactivity, data_list, data_headers) kmlactivity = 'KnowledgeC Location Activity' kmlgen(report_folder, kmlactivity, data_list, data_headers) else: logfunc('No data available in Location Activity') if version.parse(iOSversion) >= version.parse("11"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'unlocked' when '1' then 'locked' end, (zobject.zenddate - zobject.zstartdate), case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/device/isLocked' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6])) description = '' report = ArtifactHtmlReport('KnowledgeC Device Locked') report.start_artifact_report(report_folder, 'Device Locked', description) report.add_script() data_headers = ('Start','End','Is Locked?','Usage in Seconds','Day of the Week','GMT Offset','Entry Creation' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Device Locked' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Device Locked' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data in KnowledgeC Device Locked') if version.parse(iOSversion) >= version.parse("11"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dknowplayingmetadatakey__album, zstructuredmetadata.z_dknowplayingmetadatakey__artist, zstructuredmetadata.z_dknowplayingmetadatakey__genre, zstructuredmetadata.z_dknowplayingmetadatakey__title, zstructuredmetadata.z_dknowplayingmetadatakey__duration, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zstructuredmetadata where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zstreamname = '/media/nowPlaying' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12])) description = '' report = ArtifactHtmlReport('KnowledgeC Media Playing') report.start_artifact_report(report_folder, 'Media Playing', description) report.add_script() data_headers = ('Start','End','Bundle ID','Now Playing Album','Now Playing Artists','Playing Genre','Playing Title', 'Now Playing Duration','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Media Playing' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Media Playing' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Media Playing') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__activitytype, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityrequiredstring, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemidentifier, zstructuredmetadata.z_dkapplicationactivitymetadatakey__itemrelateduniqueidentifier, zstructuredmetadata.z_dkapplicationactivitymetadatakey__useractivityuuid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate + 978307200, 'unixepoch'), datetime(zstructuredmetadata.z_dkapplicationactivitymetadatakey__expirationdate + 978307200, 'unixepoch') from zobject, zstructuredmetadata where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zstreamname = '/app/activity' and (zobject.zvaluestring = 'com.apple.mobilenotes' or zobject.zvaluestring = 'com.apple.Notes') ''') all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],row[10],row[11])) report = ArtifactHtmlReport('KnowledgeC Notes - Activity') report.start_artifact_report(report_folder, 'Notes - Activity') report.add_script() data_headers = ('Start','End','Bundle ID','Activity Type','User Activity Required String','ID','Unique ID','Activity UUID','Day of Week','GMT Offset','Entry Creation','Expiration Date' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Notes Activity' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Notes Activity' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Notes Activity') if version.parse(iOSversion) >= version.parse("11"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'portrait' when '1' then 'landscape' else zobject.zvalueinteger end, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/display/orientation' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])) description = '' report = ArtifactHtmlReport('KnowledgeC Screen Orientation') report.start_artifact_report(report_folder, 'Screen Orientation', description) report.add_script() data_headers = ('Start','End','Orientation','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Screen Orientation' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Screen Orientation' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Screen Orientation') if version.parse(iOSversion) >= version.parse("11"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch') , datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'unplugged' when '1' then 'plugged in' end, (zobject.zenddate - zobject.zstartdate), case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/device/isPluggedIn' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6])) description = '' report = ArtifactHtmlReport('KnowledgeC Plugged In') report.start_artifact_report(report_folder, 'Plugged In', description) report.add_script() data_headers = ('Start','End','Is Plugged In?','Usage in Seconds','Day of the Week','GMT Offset','Entry Creation' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Plugged In' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Plugged In' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data in KnowledgeC Plugged In') if version.parse(iOSversion) >= version.parse("12"): cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zstructuredmetadata.z_dksafarihistorymetadatakey__title, zobject.zvaluestring, zsource.zbundleid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zstructuredmetadata, zsource where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zobject.zsource = zsource.z_pk and zstreamname = '/safari/history' ''') elif version.parse(iOSversion) == version.parse("11"): cursor = db.cursor() cursor.execute(''' select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, zsource.zbundleid, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zsource where zobject.zsource = zsource.z_pk and zstreamname = '/safari/history' ''') else: logfunc("Unsupported version for KnowledgC Safari iOS " + iOSversion) return () all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("12"): for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7])) report = ArtifactHtmlReport('KnowledgeC Safari Browsing') report.start_artifact_report(report_folder, 'Safari Browsing') report.add_script() data_headers = ('Start','End','Title','URL', 'Bundle ID','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Safari Browsing' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Safari Browsing' timeline(report_folder, tlactivity, data_list, data_headers) else: for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6])) report = ArtifactHtmlReport('KnowledgeC Safari Browsing') report.start_artifact_report(report_folder, 'Safari Browsing') report.add_script() data_headers = ('Start','End','URL','Bundle ID','Day of Week','GMT Offset','Entry Creation' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Safari Browsing' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Safari Browsing' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Safari Browsing') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), zobject.zvaluestring, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/siri/ui' """ ) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4])) description = '' report = ArtifactHtmlReport('KnowledgeC Siri Usage') report.start_artifact_report(report_folder, 'Siri Usage', description) report.add_script() data_headers = ('Start','App Name','Weekday','GMT Offset','Entry Creation' ) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Siri Usage' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Siri Usage' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data in KnowledgeC Siri Usage') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/app/usage' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])) description = '' report = ArtifactHtmlReport('KnowledgeC App Usage') report.start_artifact_report(report_folder, 'App Usage', description) report.add_script() data_headers = ('Start','End','Bundle ID','Usage in Seconds','Usage in Minutes','Day of the Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found, html_escape=False) report.end_artifact_report() tsvname = 'KnowledgeC App Usage' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC App Usage' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data in KnowledgeC App Usage') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/system/userWakingEvent' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4])) description = '' report = ArtifactHtmlReport('KnowledgeC User Waking Event') report.start_artifact_report(report_folder, 'User Waking Event', description) report.add_script() data_headers = ('Start','End','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC User Waking Events' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC User Waking Events' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in User Waking Event') if version.parse(iOSversion) >= version.parse("12"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, zstructuredmetadata .z_dkdigitalhealthmetadatakey__webdomain, zstructuredmetadata .z_dkdigitalhealthmetadatakey__webpageurl, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject, zstructuredmetadata where zobject.zstructuredmetadata = zstructuredmetadata.z_pk and zstreamname = '/app/webUsage' """ ) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9])) description = '' report = ArtifactHtmlReport('KnowledgeC Web Usage') report.start_artifact_report(report_folder, 'Web Usage', description) report.add_script() data_headers = ('Start','End','App Name','Usage in Seconds','Usage in Minutes','Domain','URL','Day of the Wekk','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Web Usage' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Web Usage' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Web Usage') if version.parse(iOSversion) < version.parse("12"): cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), zobject.zvaluestring, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zstreamname = '/widgets/viewed' """) all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])) description = '' report = ArtifactHtmlReport('KnowledgeC Widgets Viewed') report.start_artifact_report(report_folder, 'Widgets Viewed', description) report.add_script() data_headers = ('Start','End','Bundle ID','Usage in Seconds','Usage in Minutes','Day of Week','GMT Offset','Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC Widgets Viewed' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC Widgets Viewed' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available in Widgets Viewed') if version.parse(iOSversion) >= version.parse("12"): cursor = db.cursor() cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'no' when '1' then 'yes' end, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zobject.zstreamname = '/user/isFirstBacklightOnAfterWakeup' """) elif version.parse(iOSversion) == version.parse("11"): cursor = db.cursor() cursor.execute(""" select datetime(zobject.zstartdate+978307200,'unixepoch'), datetime(zobject.zenddate+978307200,'unixepoch'), case zobject.zvalueinteger when '0' then 'no' when '1' then 'yes' end, (zobject.zenddate - zobject.zstartdate), (zobject.zenddate - zobject.zstartdate)/60.00, case zobject.zstartdayofweek when '1' then 'sunday' when '2' then 'monday' when '3' then 'tuesday' when '4' then 'wednesday' when '5' then 'thursday' when '6' then 'friday' when '7' then 'saturday' end, zobject.zsecondsfromgmt/3600, datetime(zobject.zcreationdate+978307200,'unixepoch') from zobject where zobject.zstreamname = '/user/isFirstBacklightOnAfterWakeup' """) else: logfunc("Unsupported version for KnowledgC First Backlight on after Wakeup" + iOSversion) return () all_rows = cursor.fetchall() usageentries = len(all_rows) if usageentries > 0: data_list = [] if version.parse(iOSversion) >= version.parse("12"): for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])) report = ArtifactHtmlReport('KnowledgeC First Backlight on after Wakeup') report.start_artifact_report(report_folder, 'First Backlight on after Wakeup') report.add_script() data_headers = ('Start', 'End', 'Backlight', 'Usage in Seconds', 'Usage in Minutes', 'Day of Week', 'GMT Offset', 'Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC First Backlight on after Wakeup' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC First Backlight on after Wakeup' timeline(report_folder, tlactivity, data_list, data_headers) elif version.parse(iOSversion) == version.parse("11"): for row in all_rows: data_list.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6])) report = ArtifactHtmlReport('First Backlight on after Wakeup') report.start_artifact_report(report_folder, 'First Backlight on after Wakeup') report.add_script() data_headers = ('Start', 'End', 'Backlight', 'Usage in Seconds', 'Usage in Minutes', 'Day of Week', 'GMT Offset', 'Entry Creation') report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = 'KnowledgeC First Backlight on after Wakeup' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = 'KnowledgeC First Backlight on after Wakeup' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No data available for First Backlight on after Wakeup')
36.218553
414
0.733493
8,284
69,105
5.971511
0.056012
0.027169
0.020923
0.026502
0.860597
0.848266
0.833751
0.809736
0.797667
0.787115
0
0.033473
0.142725
69,105
1,907
415
36.237546
0.801543
0.003198
0
0.803933
0
0.00298
0.553157
0.219902
0
0
0
0
0
1
0.000596
false
0.001192
0.005959
0
0.008343
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
d718a06f97d063cc0148d44d5428f771c0d8a941
47
py
Python
experiments/treelstm/relay_tlstm/__init__.py
slyubomirsky/relay-bench-1
abe5a262ee7ded76748130d0fcfbc80e570311c1
[ "Apache-2.0" ]
7
2019-10-03T22:41:18.000Z
2020-05-31T18:52:15.000Z
experiments/treelstm/relay_tlstm/__init__.py
slyubomirsky/relay-bench-1
abe5a262ee7ded76748130d0fcfbc80e570311c1
[ "Apache-2.0" ]
14
2019-10-18T19:13:53.000Z
2021-09-08T01:36:37.000Z
experiments/treelstm/relay_tlstm/__init__.py
slyubomirsky/relay-bench-1
abe5a262ee7ded76748130d0fcfbc80e570311c1
[ "Apache-2.0" ]
4
2019-10-03T21:34:03.000Z
2022-02-23T10:29:49.000Z
from . import treelstm from . import converter
15.666667
23
0.787234
6
47
6.166667
0.666667
0.540541
0
0
0
0
0
0
0
0
0
0
0.170213
47
2
24
23.5
0.948718
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
d74ad04191cea2819c378b3c7e9cc14079710c7b
89
py
Python
thirdweb/constants/__init__.py
princetonwong/python-sdk
f35181d97620e29d055498fca75f3702f3bb2449
[ "Apache-2.0" ]
1
2022-02-18T16:59:12.000Z
2022-02-18T16:59:12.000Z
thirdweb/constants/__init__.py
princetonwong/python-sdk
f35181d97620e29d055498fca75f3702f3bb2449
[ "Apache-2.0" ]
null
null
null
thirdweb/constants/__init__.py
princetonwong/python-sdk
f35181d97620e29d055498fca75f3702f3bb2449
[ "Apache-2.0" ]
null
null
null
from .erc_interfaces import * ZeroAddress = "0x0000000000000000000000000000000000000000"
29.666667
58
0.865169
6
89
12.666667
1
0
0
0
0
0
0
0
0
0
0
0.5
0.078652
89
2
59
44.5
0.426829
0
0
0
0
0
0.47191
0.47191
0
0
0.47191
0
0
1
0
false
0
0.5
0
0.5
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
1
null
0
1
0
0
0
0
0
0
1
0
0
0
0
8
d7657d8280c775eccfd6da316dee50a992661826
91
py
Python
krishanfirstpackage/test_dir_2/test_file_2.py
KrisHan999/PythonCustomPackage
e7b95bb35a7c8f0463c4617d5a774fe9c6dbae16
[ "MIT" ]
null
null
null
krishanfirstpackage/test_dir_2/test_file_2.py
KrisHan999/PythonCustomPackage
e7b95bb35a7c8f0463c4617d5a774fe9c6dbae16
[ "MIT" ]
null
null
null
krishanfirstpackage/test_dir_2/test_file_2.py
KrisHan999/PythonCustomPackage
e7b95bb35a7c8f0463c4617d5a774fe9c6dbae16
[ "MIT" ]
null
null
null
def test_func_2(): print("test_func_2 from krishanfirstpackage.test_dir_2.test_file_2")
45.5
72
0.813187
16
91
4.125
0.5625
0.242424
0.272727
0
0
0
0
0
0
0
0
0.048193
0.087912
91
2
72
45.5
0.746988
0
0
0
0
0
0.641304
0.456522
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
1
1
0
0
0
0
1
0
9
d77cc8b1e2d6c3a287e822d0d7ec6a1cc157e065
85
py
Python
anfis/__init__.py
azefanyacaroline/anfis
f48f935941086246a4d49c9bc56d2fc357846008
[ "MIT" ]
146
2015-06-25T18:21:39.000Z
2022-03-22T18:30:24.000Z
anfis/__init__.py
marnoos/anfis
58d40b6ad30233692e4e28352bb7dcf419e05e11
[ "MIT" ]
18
2015-05-14T02:54:54.000Z
2022-03-08T04:46:00.000Z
anfis/__init__.py
marnoos/anfis
58d40b6ad30233692e4e28352bb7dcf419e05e11
[ "MIT" ]
93
2015-04-03T04:05:36.000Z
2022-03-06T13:13:52.000Z
from anfis.membership import membershipfunction from anfis.membership import mfDerivs
42.5
47
0.894118
10
85
7.6
0.6
0.236842
0.5
0.657895
0
0
0
0
0
0
0
0
0.082353
85
2
48
42.5
0.974359
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
ad3b070c3fbe27726b3d27661dc8f68904eaaccf
76
py
Python
file_sorter/__init__.py
S0nic014/file_sorter
9871265a20295a55c8512451a2d04bce2be4257c
[ "MIT" ]
null
null
null
file_sorter/__init__.py
S0nic014/file_sorter
9871265a20295a55c8512451a2d04bce2be4257c
[ "MIT" ]
null
null
null
file_sorter/__init__.py
S0nic014/file_sorter
9871265a20295a55c8512451a2d04bce2be4257c
[ "MIT" ]
null
null
null
from file_sorter.logger import Logger from file_sorter.config import Config
25.333333
37
0.868421
12
76
5.333333
0.5
0.25
0.4375
0
0
0
0
0
0
0
0
0
0.105263
76
2
38
38
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
ad46e08cb7e86c8e9e151625895320085e59313b
7,157
py
Python
analysis/Leo/scripts/project_functions.py
data301-2020-winter2/course-project-group_1039
26d661a543ce9dcea61f579f9edbcde88543e7c3
[ "MIT" ]
1
2021-02-09T02:13:23.000Z
2021-02-09T02:13:23.000Z
analysis/Leo/scripts/project_functions.py
data301-2020-winter2/course-project-group_1039
26d661a543ce9dcea61f579f9edbcde88543e7c3
[ "MIT" ]
31
2021-02-02T17:03:39.000Z
2021-04-13T03:22:16.000Z
analysis/Leo/scripts/project_functions.py
data301-2020-winter2/course-project-group_1039
26d661a543ce9dcea61f579f9edbcde88543e7c3
[ "MIT" ]
1
2021-03-14T05:56:16.000Z
2021-03-14T05:56:16.000Z
import pandas as pd import os # CONSTANT FOR US REGION NORTH_EAST = ['CT', 'DE', 'MA', 'MD', 'ME', 'NH', 'NJ', 'NY', 'PA', 'RI', 'VT'] MID_WEST = ['IA', 'IL', 'IN', 'KS', 'MI', 'MN', 'MO', 'ND', 'NE', 'OH', 'SD', 'WI'] WEST = ['AK', 'AZ', 'CA', 'CO', 'HI', 'ID', 'MT', 'NM', 'NV', 'OR', 'UT', 'WA', 'WY'] SOUTH = ['AL', 'AR', 'DC', 'DE', 'FL', 'GA', 'KY', 'LA', 'MD', 'MS', 'NC', 'OK', 'SC', 'TN', 'TX', 'VA', 'WV'] POPULAR = 2000 def load_and_process_one(source=None): if source is None: raise TypeError("Expecting 1 argument but 0 argument is passed.") elif not os.path.exists(source): raise FileExistsError("Path does not exist.") elif os.path.isdir(source): raise FileNotFoundError("Expected file path but diretory path is given.") return process(pd.read_csv(source, delimiter=',')) def load_and_process_one_national(source=None): if source is None: raise TypeError("Expecting 1 argument but 0 argument is passed.") elif not os.path.exists(source): raise FileExistsError("Path does not exist.") elif os.path.isdir(source): raise FileNotFoundError("Expected file path but diretory path is given.") return process_national(pd.read_csv(source, delimiter=',')) def load_and_process_many(source=None): if source is None: raise TypeError("Expecting 1 argument but 0 argument is passed.") elif not os.path.exists(source): raise FileExistsError("Path does not exist.") elif not os.path.isdir(source): raise TypeError("Path is not a directory.") parts = list() for file in os.listdir(source): if file.endswith(".csv"): parts.append( pd.read_csv(os.path.join(source,file), delimiter=",")) return process(pd.concat(parts, axis=0, ignore_index=True)) def process(dataframe=None): if dataframe is None: raise ValueError("Expecting 1 argument but 0 is passed.") elif not isinstance(dataframe, pd.DataFrame): raise TypeError(f"An oject of type DataFrame is expected but {type(dataframe)} is passed.") df = ( dataframe .drop(columns=['Id']) .dropna() .drop_duplicates(keep='first') .loc[dataframe["Year"] >= 1910] .reset_index(drop=True) ) # if "State" in dataframe.colummns.data: # df= ( df.drop_duplicates(subset=["Name", "State"], keep="first") # .pivot(index="",columns="",values="") # ) # else: # df = df.pivot(index="Year", columns="Name", values="Count") return df def process_national(dataframe=None): if dataframe is None: raise ValueError("Expecting 1 argument but 0 is passed.") elif not isinstance(dataframe, pd.DataFrame): raise TypeError(f"An oject of type DataFrame is expected but {type(dataframe)} is passed.") df = ( dataframe .drop(columns=['Id']) .dropna() .drop_duplicates(keep='first') .loc[dataframe["Year"] >= 1880] .reset_index(drop=True) ) # if "State" in dataframe.colummns.data: # df= ( df.drop_duplicates(subset=["Name", "State"], keep="first") # .pivot(index="",columns="",values="") # ) # else: # df = df.pivot(index="Year", columns="Name", values="Count") return df # Method to get the top names based on decade and gender (move to project_functions) def get_top_names_byDec_gender(dataframe,decade,gender,num_of_names): df_filtered = dataframe.loc[ (dataframe['Year'] >= decade) & (dataframe['Year'] < decade+10) & (dataframe['Gender'] == gender) ] df_cleaned = df_filtered.groupby(['Name','Gender'],as_index=False).agg(sum).sort_values(ascending=False, by=['Count']).head(num_of_names) return df_cleaned def get_top_names_byDec(dataframe,decade,num_of_names): df_filtered = dataframe.loc[(dataframe['Year'] >= decade) & (dataframe['Year'] < decade+10)] df_cleaned = df_filtered.groupby(['Name','Gender'],as_index=False).agg(sum).sort_values(ascending=False, by=['Count']).head(num_of_names) return df_cleaned def get_top_names_byYear(dataframe,year,num_of_names): df_filtered = dataframe.loc[(dataframe['Year'] == year)] df_cleaned = df_filtered.groupby(['Name','Gender'],as_index=False).agg(sum).sort_values(ascending=False, by=['Count']).head(num_of_names) return df_cleaned # returns a dataframe with the top name for each decade filtered by gender def get_top_name_foreachDec_gender(dataframe,gender): data = [] for year in range(1880,2011,10): data.append([year,get_top_names_byDec_gender(dataframe,year,gender,1).iloc[0]['Name'], get_top_names_byDec_gender(dataframe,year,gender,1).iloc[0]['Count']] ) df = pd.DataFrame(data, columns = ['Decade','Name', 'Count']) return df # returns a dataframe with the top name for each decade def get_top_name_foreachDec(dataframe): data = [] for year in range(1880,2011,10): data.append([year,get_top_names_byDec(dataframe,year,1).iloc[0]['Name'], get_top_names_byDec(dataframe,year,1).iloc[0]['Gender'], get_top_names_byDec(dataframe,year,1).iloc[0]['Count']] ) df = pd.DataFrame(data, columns = ['Year','Name', 'Gender','Count']) return df # returns the top name for each year for each gender def get_top_name_foreachYear_male_female(dataframe): data = [] for year in range(1879,2014): data.append([year,get_top_names_byDec_gender(dataframe,year,'F',1).iloc[0]['Name'], get_top_names_byDec(dataframe,year,1).iloc[0]['Gender'], get_top_names_byDec_gender(dataframe,year,'F',1).iloc[0]['Count']] ) df_m = pd.DataFrame(data, columns = ['Decade','Name','Gender','Count']) for year in range(1879,2014): data.append([year,get_top_names_byDec_gender(dataframe,year,'M',1).iloc[0]['Name'], get_top_names_byDec(dataframe,year,1).iloc[0]['Gender'], get_top_names_byDec_gender(dataframe,year,'M',1).iloc[0]['Count']] ) df_f = pd.DataFrame(data, columns = ['Year','Name','Gender', 'Count']) merged_df = df_f.merge(df_m,how='outer') return merged_df # returns a dataframe with the top name for each year def get_top_names_foreachYear(dataframe,num_of_names): data = [] for year in range(1879,2015): data.append([year,get_top_names_byYear(dataframe,year,num_of_names).iloc[0]['Name'], get_top_names_byYear(dataframe,year,num_of_names).iloc[0]['Count']] ) df = pd.DataFrame(data, columns = ['Year','Name', 'Count']) return df if __name__ == "__main__": df = load_and_process_one('data/raw/national/NationalNames.csv') print(df)
39.541436
141
0.607098
940
7,157
4.464894
0.206383
0.065046
0.044556
0.049559
0.811532
0.776507
0.738385
0.738385
0.725042
0.676912
0
0.017515
0.242141
7,157
181
142
39.541436
0.756268
0.113316
0
0.459016
0
0
0.14823
0.005531
0
0
0
0
0
1
0.098361
false
0.057377
0.016393
0
0.213115
0.008197
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7