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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ad6caaf895bc1263240d8f9376ba437ced2dd6f3
| 216
|
py
|
Python
|
source/auxiliary/other_utilities.py
|
JoZimmer/ParOptBeam
|
50d15d8d822a2718f2932807e06c4a7e02f866a3
|
[
"BSD-3-Clause"
] | 1
|
2021-04-09T14:08:20.000Z
|
2021-04-09T14:08:20.000Z
|
source/auxiliary/other_utilities.py
|
JoZimmer/ParOptBeam
|
50d15d8d822a2718f2932807e06c4a7e02f866a3
|
[
"BSD-3-Clause"
] | 2
|
2021-04-28T15:05:01.000Z
|
2021-11-10T15:12:56.000Z
|
source/auxiliary/other_utilities.py
|
JoZimmer/ParOptBeam
|
50d15d8d822a2718f2932807e06c4a7e02f866a3
|
[
"BSD-3-Clause"
] | 2
|
2021-02-01T08:49:45.000Z
|
2021-08-10T02:07:36.000Z
|
from os.path import sep as os_sep
def get_adjusted_path_string(path_string):
for separator in ['\\\\', '\\', '/', '//']:
path_string = path_string.replace(separator, os_sep)
return path_string[:]
| 21.6
| 60
| 0.648148
| 29
| 216
| 4.517241
| 0.517241
| 0.381679
| 0.21374
| 0.305344
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.189815
| 216
| 9
| 61
| 24
| 0.748571
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 6
|
ad7112c3738411a5a1f2089e56459f416d494862
| 17,160
|
py
|
Python
|
tests/diag/test_ccsd.py
|
fevangelista/pyWicked
|
9bc0e13f6e45c86222ea95fdadf1cb66eb59862f
|
[
"MIT"
] | null | null | null |
tests/diag/test_ccsd.py
|
fevangelista/pyWicked
|
9bc0e13f6e45c86222ea95fdadf1cb66eb59862f
|
[
"MIT"
] | null | null | null |
tests/diag/test_ccsd.py
|
fevangelista/pyWicked
|
9bc0e13f6e45c86222ea95fdadf1cb66eb59862f
|
[
"MIT"
] | null | null | null |
import wicked as w
def print_comparison(val, val2):
print(f"Result: {val}")
print(f"Test: {val2}")
def compare_expressions(test, ref):
test_expr = w.Expression()
ref_expr = w.Expression()
for s in ref:
ref_expr += w.string_to_expr(s)
for eq in test:
test_expr += eq.rhs_expression()
print_comparison(test_expr, ref_expr)
assert test_expr == ref_expr
def initialize():
w.reset_space()
w.add_space("o", "fermion", "occupied", ["i", "j", "k", "l", "m", "n"])
w.add_space("v", "fermion", "unoccupied", ["a", "b", "c", "d", "e", "f"])
def test_energy1():
"""CCSD Energy <F T1> (1)"""
initialize()
T1 = w.op("t", ["v+ o"])
Fov = w.op("f", ["o+ v"])
wt = w.WickTheorem()
val = wt.contract(w.rational(1), Fov @ T1, 0, 0)
val2 = w.expression("f^{v_0}_{o_0} t^{o_0}_{v_0}")
print_comparison(val, val2)
assert val == val2
def test_energy2():
"""CCSD Energy <V T2> (2)"""
initialize()
T2 = w.op("t", ["v+ v+ o o"])
Voovv = w.op("v", ["o+ o+ v v"])
wt = w.WickTheorem()
val = wt.contract(w.rational(1), Voovv @ T2, 0, 0)
val2 = w.expression("1/4 t^{o_0,o_1}_{v_0,v_1} v^{v_0,v_1}_{o_0,o_1}")
print_comparison(val, val2)
assert val == val2
def test_energy3():
"""CCSD Energy 1/2 <V T1 T1> (3)"""
initialize()
T1 = w.op("t", ["v+ o"])
Voovv = w.op("v", ["o+ o+ v v"])
wt = w.WickTheorem()
val = wt.contract(w.rational(1, 2), Voovv @ T1 @ T1, 0, 0)
val2 = w.expression("1/2 t^{o0}_{v0} t^{o1}_{v1} v^{v0,v1}_{o0,o1}")
print_comparison(val, val2)
assert val == val2
def test_r1_1():
"""CCSD T1 Residual Fov (1)"""
initialize()
Fvo = w.op("f", ["v+ o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Fvo, 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("f^{o0}_{v0}").canonicalize()
# print(val[0].rhs_term())
print_comparison(val, val2)
assert val == val2
def test_r1_2():
"""CCSD T1 Residual [Fvv,T1] (2)"""
initialize()
T1 = w.op("t", ["v+ o"])
Fvv = w.op("f", ["v+ v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Fvv @ T1, 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("f^{v1}_{v0} t^{o0}_{v1}")
print_comparison(val, val2)
assert val == val2
def test_r1_3():
"""CCSD T1 Residual [Foo,T1] (3)"""
initialize()
T1 = w.op("t", ["v+ o"])
Foo = w.op("f", ["o+ o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Foo @ T1, 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1 f^{o0}_{o1} t^{o1}_{v0}")
print_comparison(val, val2)
assert val == val2
def test_r1_4():
"""CCSD T1 Residual [Vovov,T1] (4)"""
initialize()
T1 = w.op("t", ["v+ o"])
Vovov = w.op("v", ["o+ v+ v o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Vovov @ T1, 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1 t^{o1}_{v1} v^{o0,v1}_{o1,v0}")
print_comparison(val, val2)
assert val == val2
def test_r1_5():
"""CCSD T1 Residual [Fvo,T2] (5)"""
initialize()
T2 = w.op("t", ["v+ v+ o o"])
Fov = w.op("f", ["o+ v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Fov @ T2, 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("1 f^{v1}_{o1} t^{o0,o1}_{v0,v1}")
print_comparison(val, val2)
assert val == val2
def test_r1_6():
"""CCSD T1 Residual [Vovvv,T2] (6)"""
initialize()
T2 = w.op("t", ["v+ v+ o o"])
Vovvv = w.op("v", ["o+ v+ v v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Vovvv @ T2, 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1/2 t^{o0,o1}_{v1,v2} v^{v1,v2}_{o1,v0}")
print_comparison(val, val2)
assert val == val2
def test_r1_7():
"""CCSD T1 Residual [Vooov,T2] (7)"""
initialize()
T2 = w.op("t", ["v+ v+ o o"])
Vooov = w.op("v", ["o+ o+ v o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Vooov @ T2, 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1/2 t^{o1,o2}_{v0,v1} v^{o0,v1}_{o1,o2}")
print_comparison(val, val2)
assert val == val2
def test_r1_8():
"""CCSD T1 Residual 1/2 [[Fov,T1],T1] (8)"""
initialize()
T1 = w.op("t", ["v+ o"])
Fov = w.op("f", ["o+ v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 2), w.commutator(w.commutator(Fov, T1), T1), 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1 f^{v1}_{o1} t^{o1}_{v0} t^{o0}_{v1}")
print_comparison(val, val2)
assert val == val2
def test_r1_9():
"""CCSD T1 Residual 1/2 [[Vooov,T1],T1] (9)"""
initialize()
T1 = w.op("t", ["v+ o"])
Vooov = w.op("v", ["o+ o+ v o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 2), w.commutator(w.commutator(Vooov, T1), T1), 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1 t^{o1}_{v0} t^{o2}_{v1} v^{o0,v1}_{o1,o2}")
print_comparison(val, val2)
assert val == val2
def test_r1_10():
"""CCSD T1 Residual 1/2 [[Vovvv,T1],T1] (10)"""
initialize()
T1 = w.op("t", ["v+ o"])
Vovvv = w.op("v", ["o+ v+ v v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 2), w.commutator(w.commutator(Vovvv, T1), T1), 2, 2)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1 t^{o0}_{v1} t^{o1}_{v2} v^{v1,v2}_{o1,v0}")
print_comparison(val, val2)
assert val == val2
def test_r1_11():
"""CCSD T1 Residual 1/6 [[[Voovv,T1],T1],T1] (11)"""
initialize()
T1 = w.op("t", ["v+ o"])
Voovv = w.op("v", ["o+ o+ v v"])
wt = w.WickTheorem()
sum = wt.contract(
w.rational(1, 6),
w.commutator(w.commutator(w.commutator(Voovv, T1), T1), T1),
2,
2,
)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val2 = w.expression("-1 t^{o1}_{v0} t^{o0}_{v1} t^{o2}_{v2} v^{v1,v2}_{o1,o2}")
print_comparison(val, val2)
assert val == val2
def test_r1_12_14():
"""CCSD T1 Residual [[Voovv,T1],T2] (12-14)"""
initialize()
T1 = w.op("t", ["v+ o"])
T2 = w.op("t", ["v+ v+ o o"])
Voovv = w.op("v", ["o+ o+ v v"])
wt = w.WickTheorem()
sum = wt.contract(
w.rational(1),
w.commutator(w.commutator(Voovv, T1), T2),
2,
2,
)
val = sum.to_manybody_equation("r")["o|v"][0].rhs_expression()
val += sum.to_manybody_equation("r")["o|v"][1].rhs_expression()
val += sum.to_manybody_equation("r")["o|v"][2].rhs_expression()
val2 = (
w.expression("1 t^{o1}_{v1} t^{o0,o2}_{v0,v2} v^{v1,v2}_{o1,o2}")
+ w.expression("-1/2 t^{o0}_{v1} t^{o1,o2}_{v0,v2} v^{v1,v2}_{o1,o2}")
+ w.expression("-1/2 t^{o1}_{v0} t^{o0,o2}_{v1,v2} v^{v1,v2}_{o1,o2}")
)
print_comparison(val, val2)
assert val == val2
def test_r2_1():
"""CCSD T2 Residual Vvvoo (1)"""
Vvvoo = w.op("v", ["v+ v+ o o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), Vvvoo, 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("1/4 v^{o0,o1}_{v0,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_2():
"""CCSD T2 Residual [Fvv,T2] (2)"""
T2 = w.op("t", ["v+ v+ o o"])
Fvv = w.op("f", ["v+ v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), w.commutator(Fvv, T2), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("-1/2 f^{v2}_{v0} t^{o0,o1}_{v1,v2}")
print_comparison(val, val2)
assert val == val2
def test_r2_3():
"""CCSD T2 Residual [Foo,T2] (3)"""
T2 = w.op("t", ["v+ v+ o o"])
Foo = w.op("f", ["o+ o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), w.commutator(Foo, T2), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("1/2 f^{o0}_{o2} t^{o1,o2}_{v0,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_4():
"""CCSD T2 Residual [Voooo,T2] (4)"""
T2 = w.op("t", ["v+ v+ o o"])
Voooo = w.op("v", ["o+ o+ o o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), w.commutator(Voooo, T2), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("1/8 t^{o2,o3}_{v0,v1} v^{o0,o1}_{o2,o3}")
print_comparison(val, val2)
assert val == val2
def test_r2_5():
"""CCSD T2 Residual [Vvvvv,T2] (5)"""
T2 = w.op("t", ["v+ v+ o o"])
Vvvvv = w.op("v", ["v+ v+ v v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), w.commutator(Vvvvv, T2), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("1/8 t^{o0,o1}_{v2,v3} v^{v2,v3}_{v0,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_6():
"""CCSD T2 Residual [Vovov,T2] (6)"""
T2 = w.op("t", ["v+ v+ o o"])
Vovov = w.op("v", ["o+ v+ v o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), w.commutator(Vovov, T2), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("- t^{o0,o2}_{v0,v2} v^{o1,v2}_{o2,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_7():
"""CCSD T2 Residual [Vvvov,T1] (7)"""
T1 = w.op("t", ["v+ o"])
Vvvov = w.op("v", ["v+ v+ v o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), w.commutator(Vvvov, T1), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("-1/2 t^{o0}_{v2} v^{o1,v2}_{v0,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_8():
"""CCSD T2 Residual [Vovoo,T1] (8)"""
T1 = w.op("t", ["v+ o"])
Vovoo = w.op("v", ["o+ v+ o o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1), w.commutator(Vovoo, T1), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("-1/2 t^{o2}_{v0} v^{o0,o1}_{o2,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_9_12():
"""CCSD T2 Residual 1/2 [[Voovv,T2],T2] (9-12)"""
T2 = w.op("t", ["v+ v+ o o"])
Voovv = w.op("v", ["o+ o+ v v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 2), w.commutator(w.commutator(Voovv, T2), T2), 4, 4)
compare_expressions(
sum.to_manybody_equation("r")["oo|vv"],
[
"1/2 t^{o0,o2}_{v0,v2} t^{o1,o3}_{v1,v3} v^{v2,v3}_{o2,o3}",
"-1/4 t^{o0,o1}_{v0,v2} t^{o2,o3}_{v1,v3} v^{v2,v3}_{o2,o3}",
"1/16 t^{o2,o3}_{v0,v1} t^{o0,o1}_{v2,v3} v^{v2,v3}_{o2,o3}",
"-1/4 t^{o0,o2}_{v0,v1} t^{o1,o3}_{v2,v3} v^{v2,v3}_{o2,o3}",
],
)
def test_r2_13():
"""CCSD T2 Residual 1/2 [[Voooo,T1],T1] (13)"""
T1 = w.op("t", ["v+ o"])
Voooo = w.op("v", ["o+ o+ o o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 2), w.commutator(w.commutator(Voooo, T1), T1), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("1/4 t^{o2}_{v0} t^{o3}_{v1} v^{o0,o1}_{o2,o3}")
print_comparison(val, val2)
assert val == val2
def test_r2_14():
"""CCSD T2 Residual 1/2 [[Vvvvv,T1],T1] (14)"""
T1 = w.op("t", ["v+ o"])
Vvvvv = w.op("v", ["v+ v+ v v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 2), w.commutator(w.commutator(Vvvvv, T1), T1), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("1/4 t^{o0}_{v2} t^{o1}_{v3} v^{v2,v3}_{v0,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_15():
"""CCSD T2 Residual 1/2 [[Vovov,T1],T1] (15)"""
T1 = w.op("t", ["v+ o"])
Vovov = w.op("v", ["o+ v+ v o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 2), w.commutator(w.commutator(Vovov, T1), T1), 4, 4)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("t^{o2}_{v0} t^{o0}_{v2} v^{o1,v2}_{o2,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_16_17():
"""CCSD T2 Residual [[Fov,T1],T2] (16-17)"""
T1 = w.op("t", ["v+ o"])
T2 = w.op("t", ["v+ v+ o o"])
Fov = w.op("f", ["o+ v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 1), w.commutator(w.commutator(Fov, T1), T2), 4, 4)
compare_expressions(
sum.to_manybody_equation("r")["oo|vv"],
[
"1/2 f^{v2}_{o2} t^{o0}_{v2} t^{o1,o2}_{v0,v1}",
"1/2 f^{v2}_{o2} t^{o2}_{v0} t^{o0,o1}_{v1,v2}",
],
)
def test_r2_18_21_22():
"""CCSD T2 Residual [[Vooov,T1],T2] (18,21,22)"""
T1 = w.op("t", ["v+ o"])
T2 = w.op("t", ["v+ v+ o o"])
Vooov = w.op("v", ["o+ o+ v o"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 1), w.commutator(w.commutator(Vooov, T1), T2), 4, 4)
compare_expressions(
sum.to_manybody_equation("r")["oo|vv"],
[
"1/2 t^{o2}_{v2} t^{o0,o3}_{v0,v1} v^{o1,v2}_{o2,o3}",
"-1/4 t^{o0}_{v2} t^{o2,o3}_{v0,v1} v^{o1,v2}_{o2,o3}",
"t^{o2}_{v0} t^{o0,o3}_{v1,v2} v^{o1,v2}_{o2,o3}",
],
)
def test_r2_19_20_23():
"""CCSD T2 Residual [[Vovvv,T1],T2] (19,20,23)"""
T1 = w.op("t", ["v+ o"])
T2 = w.op("t", ["v+ v+ o o"])
Vovvv = w.op("v", ["o+ v+ v v"])
wt = w.WickTheorem()
sum = wt.contract(w.rational(1, 1), w.commutator(w.commutator(Vovvv, T1), T2), 4, 4)
compare_expressions(
sum.to_manybody_equation("r")["oo|vv"],
[
"1/2 t^{o2}_{v2} t^{o0,o1}_{v0,v3} v^{v2,v3}_{o2,v1}",
"t^{o0}_{v2} t^{o1,o2}_{v0,v3} v^{v2,v3}_{o2,v1}",
"-1/4 t^{o2}_{v0} t^{o0,o1}_{v2,v3} v^{v2,v3}_{o2,v1}",
],
)
def test_r2_24():
"""CCSD T2 Residual 1/6 [[[Vovvv,T1],T1],T1] (24)"""
T1 = w.op("t", ["v+ o"])
Vovvv = w.op("v", ["o+ v+ v v"])
wt = w.WickTheorem()
sum = wt.contract(
w.rational(1, 6),
w.commutator(w.commutator(w.commutator(Vovvv, T1), T1), T1),
4,
4,
)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("-1/2 t^{o2}_{v0} t^{o0}_{v2} t^{o1}_{v3} v^{v2,v3}_{o2,v1}")
print_comparison(val, val2)
assert val == val2
def test_r2_25():
"""CCSD T2 Residual 1/6 [[[Vooov,T1],T1],T1] (25)"""
T1 = w.op("t", ["v+ o"])
Vooov = w.op("v", ["o+ o+ v o"])
wt = w.WickTheorem()
sum = wt.contract(
w.rational(1, 6),
w.commutator(w.commutator(w.commutator(Vooov, T1), T1), T1),
4,
4,
)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression("-1/2 t^{o2}_{v0} t^{o3}_{v1} t^{o0}_{v2} v^{o1,v2}_{o2,o3}")
print_comparison(val, val2)
assert val == val2
def test_r2_26_30():
"""CCSD T2 Residual [[[Voovv,T1],T1],T2] (26-30)"""
T1 = w.op("t", ["v+ o"])
T2 = w.op("t", ["v+ v+ o o"])
Voovv = w.op("v", ["o+ o+ v v"])
wt = w.WickTheorem()
sum = wt.contract(
w.rational(1, 2),
w.commutator(w.commutator(w.commutator(Voovv, T1), T1), T2),
4,
4,
)
compare_expressions(
sum.to_manybody_equation("r")["oo|vv"],
[
"-1/2 t^{o0}_{v2} t^{o2}_{v3} t^{o1,o3}_{v0,v1} v^{v2,v3}_{o2,o3}",
"1/8 t^{o0}_{v2} t^{o1}_{v3} t^{o2,o3}_{v0,v1} v^{v2,v3}_{o2,o3}",
"-1/2 t^{o2}_{v0} t^{o3}_{v2} t^{o0,o1}_{v1,v3} v^{v2,v3}_{o2,o3}",
"-1 t^{o2}_{v0} t^{o0}_{v2} t^{o1,o3}_{v1,v3} v^{v2,v3}_{o2,o3}",
"1/8 t^{o2}_{v0} t^{o3}_{v1} t^{o0,o1}_{v2,v3} v^{v2,v3}_{o2,o3}",
],
)
def test_r2_31():
"""CCSD T2 Residual 1/24 [[[[Voovv,T1],T1],T1],T1] (31)"""
T1 = w.op("t", ["v+ o"])
Voovv = w.op("v", ["o+ o+ v v"])
wt = w.WickTheorem()
sum = wt.contract(
w.rational(1, 24),
w.commutator(w.commutator(w.commutator(w.commutator(Voovv, T1), T1), T1), T1),
4,
4,
)
val = sum.to_manybody_equation("r")["oo|vv"][0].rhs_expression()
val2 = w.expression(
"1/4 t^{o2}_{v0} t^{o3}_{v1} t^{o0}_{v2} t^{o1}_{v3} v^{v2,v3}_{o2,o3}"
)
print_comparison(val, val2)
assert val == val2
if __name__ == "__main__":
test_energy1()
test_energy2()
test_energy3()
test_r1_1()
test_r1_2()
test_r1_3()
test_r1_4()
test_r1_5()
test_r1_6()
test_r1_7()
test_r1_8()
test_r1_9()
test_r1_10()
test_r1_11()
test_r1_12_14()
test_r2_1()
test_r2_2()
test_r2_3()
test_r2_4()
test_r2_5()
test_r2_6()
test_r2_7()
test_r2_8()
test_r2_9_12()
test_r2_13()
test_r2_14()
test_r2_15()
test_r2_16_17()
test_r2_18_21_22()
test_r2_19_20_23()
test_r2_24()
test_r2_25()
test_r2_26_30()
test_r2_31()
| 31.030741
| 88
| 0.534324
| 2,970
| 17,160
| 2.9367
| 0.041414
| 0.024421
| 0.016969
| 0.021211
| 0.81667
| 0.784338
| 0.755561
| 0.736987
| 0.723917
| 0.687457
| 0
| 0.088383
| 0.223951
| 17,160
| 552
| 89
| 31.086957
| 0.566569
| 0.073368
| 0
| 0.545035
| 0
| 0.099307
| 0.189892
| 0.00267
| 0
| 0
| 0
| 0
| 0.069284
| 1
| 0.08545
| false
| 0
| 0.002309
| 0
| 0.08776
| 0.076212
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
a8e92779935c13faae8293404567f0278d30ae7e
| 138
|
py
|
Python
|
scripts/reactor/autogen_ludiquest2.py
|
hsienjan/SideQuest-Server
|
3e88debaf45615b759d999255908f99a15283695
|
[
"MIT"
] | null | null | null |
scripts/reactor/autogen_ludiquest2.py
|
hsienjan/SideQuest-Server
|
3e88debaf45615b759d999255908f99a15283695
|
[
"MIT"
] | null | null | null |
scripts/reactor/autogen_ludiquest2.py
|
hsienjan/SideQuest-Server
|
3e88debaf45615b759d999255908f99a15283695
|
[
"MIT"
] | null | null | null |
# ParentID: 2202002
# Character field ID when accessed: 220020000
# ObjectID: 1000016
# Object Position X: -228
# Object Position Y: -198
| 23
| 45
| 0.746377
| 18
| 138
| 5.722222
| 0.888889
| 0.271845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.252174
| 0.166667
| 138
| 5
| 46
| 27.6
| 0.643478
| 0.92029
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
a8ec8c2dda24550165672ed485cf1f2b5ef00950
| 30
|
py
|
Python
|
python/orcreader/__init__.py
|
nqbao/python-orc-reader
|
c4d6a06851b12a309f485ef208c0d84e80b22f8b
|
[
"BSD-3-Clause"
] | 15
|
2016-07-04T17:05:31.000Z
|
2020-06-28T02:15:49.000Z
|
python/orcreader/__init__.py
|
nqbao/python-orc-reader
|
c4d6a06851b12a309f485ef208c0d84e80b22f8b
|
[
"BSD-3-Clause"
] | 3
|
2017-05-15T06:01:18.000Z
|
2018-04-18T21:14:17.000Z
|
python/orcreader/__init__.py
|
nqbao/python-orc-reader
|
c4d6a06851b12a309f485ef208c0d84e80b22f8b
|
[
"BSD-3-Clause"
] | 6
|
2017-01-23T23:47:52.000Z
|
2018-11-01T17:43:40.000Z
|
from .reader import OrcReader
| 15
| 29
| 0.833333
| 4
| 30
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 30
| 1
| 30
| 30
| 0.961538
| 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
| 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
| 6
|
a8fbf8ce338a6262976301ea199c5ca131183f5f
| 49
|
py
|
Python
|
reloader/__init__.py
|
gerardroche/AutomaticPackageReloader
|
e90c22a50f6bfb195394cc6eedab0e7977a0011d
|
[
"MIT"
] | 30
|
2017-03-05T12:28:31.000Z
|
2022-03-23T11:32:23.000Z
|
reloader/__init__.py
|
gerardroche/AutomaticPackageReloader
|
e90c22a50f6bfb195394cc6eedab0e7977a0011d
|
[
"MIT"
] | 34
|
2017-03-14T05:59:58.000Z
|
2021-08-24T16:25:05.000Z
|
reloader/__init__.py
|
randy3k/PackageReloader
|
1255fcb0bc8effb66956e2240c42b7ae10615860
|
[
"MIT"
] | 16
|
2017-03-09T12:03:21.000Z
|
2019-10-18T08:19:37.000Z
|
from .reloader import reload_package, load_dummy
| 24.5
| 48
| 0.857143
| 7
| 49
| 5.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102041
| 49
| 1
| 49
| 49
| 0.909091
| 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
| 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
| 6
|
d10113d3430723c74844cb610a13bb918fa54c11
| 46
|
py
|
Python
|
bunruija/modules/__init__.py
|
tma15/bunruija
|
64a5c993a06e9de75f8f382cc4b817f91965223f
|
[
"MIT"
] | 4
|
2020-12-22T11:12:35.000Z
|
2021-12-15T13:30:02.000Z
|
bunruija/modules/__init__.py
|
tma15/bunruija
|
64a5c993a06e9de75f8f382cc4b817f91965223f
|
[
"MIT"
] | 4
|
2021-01-16T07:34:22.000Z
|
2021-08-14T06:56:07.000Z
|
bunruija/modules/__init__.py
|
tma15/bunruija
|
64a5c993a06e9de75f8f382cc4b817f91965223f
|
[
"MIT"
] | null | null | null |
from .static_embedding import StaticEmbedding
| 23
| 45
| 0.891304
| 5
| 46
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 46
| 1
| 46
| 46
| 0.952381
| 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
| 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
| 6
|
d10682fb60ec99068c4dbd7e5b8bac0fee1bcbce
| 32
|
py
|
Python
|
dag_executor/Executor/__init__.py
|
GennadiiTurutin/dag_executor
|
ddc7eab1e0e98753309e245247ac00e465e52ec1
|
[
"MIT"
] | null | null | null |
dag_executor/Executor/__init__.py
|
GennadiiTurutin/dag_executor
|
ddc7eab1e0e98753309e245247ac00e465e52ec1
|
[
"MIT"
] | null | null | null |
dag_executor/Executor/__init__.py
|
GennadiiTurutin/dag_executor
|
ddc7eab1e0e98753309e245247ac00e465e52ec1
|
[
"MIT"
] | null | null | null |
from .executor import Executor
| 16
| 31
| 0.8125
| 4
| 32
| 6.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 32
| 1
| 32
| 32
| 0.962963
| 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
| 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
| 6
|
d154ae1217c3ae34783bb85b3da68ecf82e62291
| 223
|
py
|
Python
|
app/__init__.py
|
cca/libraries_syllabus_notifications
|
0d42c96ca6fd777e501024bb986418e8897b3dbc
|
[
"ECL-2.0"
] | null | null | null |
app/__init__.py
|
cca/libraries_syllabus_notifications
|
0d42c96ca6fd777e501024bb986418e8897b3dbc
|
[
"ECL-2.0"
] | 5
|
2016-01-02T20:12:21.000Z
|
2022-01-21T20:31:39.000Z
|
app/__init__.py
|
cca/libraries_syllabus_notifications
|
0d42c96ca6fd777e501024bb986418e8897b3dbc
|
[
"ECL-2.0"
] | null | null | null |
# @TODO we want to "from .app import main" so the test suite can import the
# main() function but if we do that then app.py throws errors when importing
# from config.py & its other dependencies
from .has_syllabus import *
| 44.6
| 76
| 0.753363
| 39
| 223
| 4.282051
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183857
| 223
| 4
| 77
| 55.75
| 0.917582
| 0.843049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
d1720a3f200947c6d598c557c5d06099c334bc22
| 11,905
|
py
|
Python
|
chatbrick/brick/icn.py
|
BluehackRano/cb-wh
|
ecf11100ad83df71eac9d56f6abbd59ceeda9d83
|
[
"MIT"
] | null | null | null |
chatbrick/brick/icn.py
|
BluehackRano/cb-wh
|
ecf11100ad83df71eac9d56f6abbd59ceeda9d83
|
[
"MIT"
] | null | null | null |
chatbrick/brick/icn.py
|
BluehackRano/cb-wh
|
ecf11100ad83df71eac9d56f6abbd59ceeda9d83
|
[
"MIT"
] | 1
|
2019-03-05T06:50:11.000Z
|
2019-03-05T06:50:11.000Z
|
import logging
import blueforge.apis.telegram as tg
import requests
from blueforge.apis.facebook import Message, ImageAttachment, QuickReply, QuickReplyTextItem, TemplateAttachment, \
GenericTemplate, Element, PostBackButton
from chatbrick.util import get_items_from_xml, UNKNOWN_ERROR_MSG
import time
logger = logging.getLogger(__name__)
BRICK_DEFAULT_IMAGE = 'https://www.chatbrick.io/api/static/brick/img_brick_13_001.png'
GATE_INFO = {
'0': '원할',
'1': '보통',
'2': '혼잡',
'3': '매우혼잡',
'9': '종료'
}
class Icn(object):
def __init__(self, fb, brick_db):
self.brick_db = brick_db
self.fb = fb
async def facebook(self, command):
if command == 'get_started':
# send_message = [
# Message(
# attachment=ImageAttachment(
# url=BRICK_DEFAULT_IMAGE
# )
# ),
# Message(
# text='인천국제공항공사에서 제공하는 "출국장 대기인원 조회 서비스"에요.'
# ),
# Message(
# attachment=TemplateAttachment(
# payload=GenericTemplate(
# elements=[
# Element(
# image_url='https://www.chatbrick.io/api/static/brick/img_brick_13_002.png',
# title='제 1여객터미널',
# subtitle='제 1여객터미널의 게이트별 대기인원을 알려드려요.',
# buttons=[
# PostBackButton(
# title='1여객터미널 조회',
# payload='brick|icn|1'
# )
# ]
# ),
# Element(
# image_url='https://www.chatbrick.io/api/static/brick/img_brick_13_002.png',
# title='제 2여객터미널',
# subtitle='제 2여객터미널의 게이트별 대기인원을 알려드려요.',
# buttons=[
# PostBackButton(
# title='2여객터미널 조회',
# payload='brick|icn|2'
# )
# ]
# )
# ]
# )
# )
# )
# ]
send_message = [
Message(
attachment=TemplateAttachment(
payload=GenericTemplate(
elements=[
Element(image_url=BRICK_DEFAULT_IMAGE,
title='출국장 대기인원 조회 서비스',
subtitle='인천국제공항공사에서 제공하는 "출국장 대기인원 조회 서비스"에요.')
]
)
)
),
Message(
attachment=TemplateAttachment(
payload=GenericTemplate(
elements=[
Element(
image_url='https://www.chatbrick.io/api/static/brick/img_brick_13_002.png',
title='제 1여객터미널',
subtitle='제 1여객터미널의 게이트별 대기인원을 알려드려요.',
buttons=[
PostBackButton(
title='1여객터미널 조회',
payload='brick|icn|1'
)
]
),
Element(
image_url='https://www.chatbrick.io/api/static/brick/img_brick_13_002.png',
title='제 2여객터미널',
subtitle='제 2여객터미널의 게이트별 대기인원을 알려드려요.',
buttons=[
PostBackButton(
title='2여객터미널 조회',
payload='brick|icn|2'
)
]
)
]
)
)
)
]
await self.fb.send_messages(send_message)
await self.brick_db.save()
elif command == '1' or command == '2':
input_data = await self.brick_db.get()
res = requests.get(
url='http://openapi.airport.kr/openapi/service/StatusOfDepartures/getDeparturesCongestion?serviceKey=%s&terno=%s' % (
input_data['data']['api_key'], command), headers={
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'})
items = get_items_from_xml(res)
if type(items) is dict:
if items.get('code', '00') == '99' or items.get('code', '00') == '30':
send_message = [
Message(
text='chatbrick 홈페이지에 올바르지 않은 API key를 입력했어요. 다시 한번 확인해주세요.',
)
]
else:
send_message = [
Message(
text=UNKNOWN_ERROR_MSG
)
]
else:
if command == '1':
the_other = '2'
else:
the_other = '1'
raw_data = items[0]
sending_message = '제 {terno} 여객터미널\n조회날짜 : {cgtdt}\n조회시간 : {cgthm}'.format(**raw_data)
if command == '1':
sending_message += '\n2번 출국장: %s명 (%s)' % (raw_data['gateinfo1'], GATE_INFO[raw_data['gate1']])
sending_message += '\n3번 출국장: %s명 (%s)' % (raw_data['gateinfo2'], GATE_INFO[raw_data['gate2']])
sending_message += '\n4번 출국장: %s명 (%s)' % (raw_data['gateinfo3'], GATE_INFO[raw_data['gate3']])
sending_message += '\n5번 출국장: %s명 (%s)' % (raw_data['gateinfo4'], GATE_INFO[raw_data['gate4']])
elif command == '2':
sending_message += '\n1번 출국장: %s명 (%s)' % (raw_data['gateinfo1'], GATE_INFO[raw_data['gate1']])
sending_message += '\n2번 출국장: %s명 (%s)' % (raw_data['gateinfo2'], GATE_INFO[raw_data['gate2']])
send_message = [
Message(
text=sending_message,
quick_replies=QuickReply(
quick_reply_items=[
QuickReplyTextItem(
title='새로고침',
payload='brick|icn|%s' % command
),
QuickReplyTextItem(
title='제%s여객터미널 조회' % the_other,
payload='brick|icn|%s' % the_other
)
]
)
)
]
await self.fb.send_messages(send_message)
return None
async def telegram(self, command):
if command == 'get_started':
send_message = [
tg.SendPhoto(
photo=BRICK_DEFAULT_IMAGE
),
tg.SendMessage(
text='인천국제공항공사에서 제공하는 "출국장 대기인원 조회 서비스"에요.',
reply_markup=tg.MarkUpContainer(
inline_keyboard=[
[
tg.CallbackButton(
text='제1여객터미널',
callback_data='BRICK|icn|1'
),
tg.CallbackButton(
text='제2여객터미널',
callback_data='BRICK|icn|2'
)
]
]
)
)
]
await self.fb.send_messages(send_message)
await self.brick_db.save()
elif command == '1' or command == '2':
input_data = await self.brick_db.get()
res = requests.get(
url='http://openapi.airport.kr/openapi/service/StatusOfDepartures/getDeparturesCongestion?serviceKey=%s&terno=%s' % (
input_data['data']['api_key'], command), headers={
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'})
items = get_items_from_xml(res)
if type(items) is dict:
if items.get('code', '00') == '99' or items.get('code', '00') == '30':
send_message = [
tg.SendMessage(
text='chatbrick 홈페이지에 올바르지 않은 API key를 입력했어요. 다시 한번 확인해주세요.',
)
]
else:
send_message = [
tg.SendMessage(
text=UNKNOWN_ERROR_MSG
)
]
else:
if command == '1':
the_other = '2'
else:
the_other = '1'
raw_data = items[0]
sending_message = '*제 {terno} 여객터미널*\n조회날짜 : {cgtdt}\n조회시간 : {cgthm}'.format(**raw_data)
if command == '1':
sending_message += '\n2번 출국장: %s명 (%s)' % (raw_data['gateinfo1'], GATE_INFO[raw_data['gate1']])
sending_message += '\n3번 출국장: %s명 (%s)' % (raw_data['gateinfo2'], GATE_INFO[raw_data['gate2']])
sending_message += '\n4번 출국장: %s명 (%s)' % (raw_data['gateinfo3'], GATE_INFO[raw_data['gate3']])
sending_message += '\n5번 출국장: %s명 (%s)' % (raw_data['gateinfo4'], GATE_INFO[raw_data['gate4']])
elif command == '2':
sending_message += '\n1번 출국장: %s명 (%s)' % (raw_data['gateinfo1'], GATE_INFO[raw_data['gate1']])
sending_message += '\n2번 출국장: %s명 (%s)' % (raw_data['gateinfo2'], GATE_INFO[raw_data['gate2']])
send_message = [
tg.SendMessage(
text=sending_message,
parse_mode='Markdown',
reply_markup=tg.MarkUpContainer(
inline_keyboard=[
[
tg.CallbackButton(
text='새로고침',
callback_data='BRICK|icn|%s' % command
)
],
[
tg.CallbackButton(
text='제%s여객터미널 조회' % the_other,
callback_data='BRICK|icn|%s' % the_other
)
]
]
)
)
]
await self.fb.send_messages(send_message)
return None
| 44.256506
| 159
| 0.374549
| 901
| 11,905
| 4.766926
| 0.214206
| 0.045634
| 0.016764
| 0.025146
| 0.798603
| 0.772992
| 0.772992
| 0.772992
| 0.745518
| 0.698021
| 0
| 0.030616
| 0.528097
| 11,905
| 268
| 160
| 44.421642
| 0.733891
| 0.126417
| 0
| 0.533981
| 0
| 0.019417
| 0.161661
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.004854
| false
| 0
| 0.029126
| 0
| 0.048544
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 6
|
66f4c17269c6170a21fe09050ef187d175632d22
| 3,384
|
py
|
Python
|
compiler/parser/expression_models/comparison.py
|
Fire-Script/FireScript
|
8103b9bafe68163c8018aae2e760b6ad50310595
|
[
"MIT"
] | 2
|
2021-12-31T02:23:13.000Z
|
2022-01-13T09:59:52.000Z
|
compiler/parser/expression_models/comparison.py
|
classPythonAddike/FireScript
|
8103b9bafe68163c8018aae2e760b6ad50310595
|
[
"MIT"
] | 1
|
2021-12-31T13:24:07.000Z
|
2021-12-31T13:24:07.000Z
|
compiler/parser/expression_models/comparison.py
|
classPythonAddike/FireScript
|
8103b9bafe68163c8018aae2e760b6ad50310595
|
[
"MIT"
] | 3
|
2021-12-31T12:08:23.000Z
|
2022-01-02T12:00:57.000Z
|
from compiler.bytecode.opcodes import OpCodes
from compiler.errors.errors import FTypeError
from compiler.parser.expressions import Expression
from typing import List, Dict
class EqualToExp(Expression):
"""
Syntax: (= arg1 arg2)
Argument Types: Any
Return Type: Bool
Check if two objects are equal
"""
def __init__(self, line: int, *args: "Expression"):
self.line = line
self.lval = args[0]
self.rval = args[1]
def eval(self, variables: Dict[str, int]) -> List[List[str]]:
return self.rval.eval(variables) + self.lval.eval(variables) + [[OpCodes.COMPARE, "0"]]
def load_type(self, variables: Dict[str, str]) -> Dict[str, str]:
variables = self.lval.load_type(variables)
variables = self.rval.load_type(variables)
if self.lval.value_type != self.rval.value_type:
FTypeError(
self.line,
f"Cannot compare objects of type {self.lval.value_type} and {self.rval.value_type}!"
).raise_error()
self._value_type = "Bool"
return variables
@classmethod
def keyword(cls) -> str:
return "="
@classmethod
def num_args(cls) -> int:
return 2
class GreaterThanExp(EqualToExp):
"""
Syntax: (> arg1 arg2)
Argument Types: Integer | Float
Return Type: Bool
Check if arg1 > arg2
"""
def load_type(self, variables: Dict[str, str]) -> Dict[str, str]:
variables = self.lval.load_type(variables)
variables = self.rval.load_type(variables)
if self.lval.value_type != self.rval.value_type:
FTypeError(
self.line,
f"Cannot compare objects of type {self.lval.value_type} and {self.rval.value_type}!"
).raise_error()
if self.lval.value_type not in ["Integer", "Float"]:
FTypeError(
self.line,
f"Cannot compare objects of type {self.lval.value_type}!"
).raise_error()
self._value_type = "Bool"
return variables
def eval(self, variables: Dict[str, int]) -> List[List[str]]:
return self.rval.eval(variables) + self.lval.eval(variables) + [[OpCodes.COMPARE, "1"]]
@classmethod
def keyword(cls) -> str:
return ">"
class LessThanExp(GreaterThanExp):
"""
Syntax: (< arg1 arg2)
Argument Types: Integer | Float
Return Type: Bool
Check if arg1 < arg2
"""
def __init__(self, line: int, *args: "Expression"):
self.line = line
self.lval = args[1]
self.rval = args[0]
@classmethod
def keyword(cls) -> str:
return "<"
class GreaterThanOrEqualExp(GreaterThanExp):
"""
Syntax: (>= arg1 arg2)
Argument Types: Integer | Float
Return Type: Bool
Check if arg1 >= arg2
"""
def eval(self, variables: Dict[str, int]) -> List[List[str]]:
return self.rval.eval(variables) + self.lval.eval(variables) + [[OpCodes.COMPARE, "2"]]
@classmethod
def keyword(cls) -> str:
return ">" # First identifier will be `>`
@classmethod
def num_args(cls) -> int:
return 3 # 1 argument for the `=`
class LessThanOrEqualExp(GreaterThanOrEqualExp):
def __init__(self, line: int, *args: "Expression"):
self.line = line
self.lval = args[1]
self.rval = args[0]
| 27.737705
| 100
| 0.60195
| 403
| 3,384
| 4.962779
| 0.17866
| 0.056
| 0.039
| 0.051
| 0.814
| 0.7805
| 0.7475
| 0.6765
| 0.6765
| 0.6765
| 0
| 0.010591
| 0.274527
| 3,384
| 121
| 101
| 27.966942
| 0.804073
| 0.125296
| 0
| 0.714286
| 0
| 0
| 0.095789
| 0.039649
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.057143
| 0.128571
| 0.485714
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 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
| 1
| 0
| 0
|
0
| 6
|
0f1a8a8fdf277ed1542030735b29d945045c82ec
| 40
|
py
|
Python
|
tools/RNN/rnn_quantizer/tensorflow/tf_nndct/utils/__init__.py
|
hito0512/Vitis-AI
|
996459fb96cb077ed2f7e789d515893b1cccbc95
|
[
"Apache-2.0"
] | 1
|
2021-04-01T06:38:48.000Z
|
2021-04-01T06:38:48.000Z
|
tools/RNN/rnn_quantizer/tensorflow/tf_nndct/utils/__init__.py
|
hito0512/Vitis-AI
|
996459fb96cb077ed2f7e789d515893b1cccbc95
|
[
"Apache-2.0"
] | null | null | null |
tools/RNN/rnn_quantizer/tensorflow/tf_nndct/utils/__init__.py
|
hito0512/Vitis-AI
|
996459fb96cb077ed2f7e789d515893b1cccbc95
|
[
"Apache-2.0"
] | null | null | null |
from nndct_shared.utils import registry
| 20
| 39
| 0.875
| 6
| 40
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 40
| 1
| 40
| 40
| 0.944444
| 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
| 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
| 6
|
0f8b3458e256dcb554d3948811ed8426a35f7e37
| 2,067
|
py
|
Python
|
tests/test_entrez.py
|
ckrusemd/meta-analysis-tool
|
31685973f767c198952df4b87813a9c8345554b6
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_entrez.py
|
ckrusemd/meta-analysis-tool
|
31685973f767c198952df4b87813a9c8345554b6
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_entrez.py
|
ckrusemd/meta-analysis-tool
|
31685973f767c198952df4b87813a9c8345554b6
|
[
"BSD-3-Clause"
] | null | null | null |
import requests
from loguru import logger
def test_entrez_query():
json_ = { "query": "kruse eiken vestergaard", "email": "XXX@YYY.com" }
response = requests.post("http://api:8080/entrez/query", json = json_)
assert response.status_code == 200
assert response.json()
logger.info( response.json() )
def test_entrez_summary_single():
json_ = { "uid": "28197643", "email": "XXX@YYY.com" }
response = requests.post("http://api:8080/entrez/summary/single", json = json_)
assert response.status_code == 200
assert response.json()
logger.info( response.json() )
def test_entrez_summary_list():
json_ = { "uid_list": ["28197643","29679305","27848006"], "email": "XXX@YYY.com" }
response = requests.post("http://api:8080/entrez/summary/list", json = json_)
assert response.status_code == 200
assert response.json()
logger.info( response.json() )
def test_entrez_abstract_single():
json_ = { "uid": "28197643", "email": "XXX@YYY.com" }
response = requests.post("http://api:8080/entrez/abstract/single", json = json_)
assert response.status_code == 200
assert response.json()
logger.info( response.json() )
def test_entrez_abstract_list():
json_ = { "uid_list": ["28197643","29679305","27848006"], "email": "XXX@YYY.com" }
response = requests.post("http://api:8080/entrez/abstract/list", json = json_)
assert response.status_code == 200
assert response.json()
logger.info( response.json() )
def test_entrez_elink_single():
json_ = { "uid": "28197643", "email": "XXX@YYY.com" }
response = requests.post("http://api:8080/entrez/elink/single", json = json_)
assert response.status_code == 200
assert response.json()
logger.info( response.json() )
def test_entrez_elink_list():
json_ = { "uid_list": ["28197643","29679305","27848006"], "email": "XXX@YYY.com" }
response = requests.post("http://api:8080/entrez/elink/list", json = json_)
assert response.status_code == 200
assert response.json()
logger.info( response.json() )
| 39.75
| 86
| 0.669086
| 260
| 2,067
| 5.15
| 0.138462
| 0.146378
| 0.067961
| 0.073189
| 0.933532
| 0.933532
| 0.933532
| 0.933532
| 0.933532
| 0.933532
| 0
| 0.083912
| 0.164006
| 2,067
| 52
| 87
| 39.75
| 0.690972
| 0
| 0
| 0.613636
| 0
| 0
| 0.247218
| 0
| 0
| 0
| 0
| 0
| 0.318182
| 1
| 0.159091
| false
| 0
| 0.045455
| 0
| 0.204545
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
7e2848ed83aa47cbc6a16174581fc8a9c100f6b0
| 79,206
|
py
|
Python
|
xanalysis_groundstate_paper_figs.py
|
kseetharam/genPolaron
|
b4eb05c595f1dc7151aa564f56fcfbdeded570c5
|
[
"MIT"
] | null | null | null |
xanalysis_groundstate_paper_figs.py
|
kseetharam/genPolaron
|
b4eb05c595f1dc7151aa564f56fcfbdeded570c5
|
[
"MIT"
] | null | null | null |
xanalysis_groundstate_paper_figs.py
|
kseetharam/genPolaron
|
b4eb05c595f1dc7151aa564f56fcfbdeded570c5
|
[
"MIT"
] | null | null | null |
import numpy as np
import pandas as pd
import xarray as xr
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib.lines import Line2D
import matplotlib.colors as colors
from matplotlib.animation import writers
from matplotlib.patches import ConnectionPatch
import matplotlib.image as mpimg
import os
import itertools
import pf_dynamic_cart as pfc
import pf_dynamic_sph as pfs
import Grid
from scipy import interpolate
from timeit import default_timer as timer
import scipy.stats as ss
import colors as col
if __name__ == "__main__":
# # Initialization
# matplotlib.rcParams.update({'font.size': 12, 'text.usetex': True})
mpegWriter = writers['ffmpeg'](fps=0.75, bitrate=1800)
matplotlib.rcParams.update({'font.size': 16, 'font.family': 'Times New Roman', 'text.usetex': True, 'mathtext.fontset': 'dejavuserif'})
axl = matplotlib.rcParams['axes.linewidth']
# ---- INITIALIZE GRIDS ----
(Lx, Ly, Lz) = (21, 21, 21)
(dx, dy, dz) = (0.375, 0.375, 0.375)
# (Lx, Ly, Lz) = (105, 105, 105)
# (dx, dy, dz) = (0.375, 0.375, 0.375)
NGridPoints_cart = (1 + 2 * Lx / dx) * (1 + 2 * Ly / dy) * (1 + 2 * Lz / dz)
# Toggle parameters
toggleDict = {'Dynamics': 'imaginary', 'Interaction': 'on', 'Grid': 'spherical', 'Coupling': 'twophonon', 'IRcuts': 'false', 'ReducedInterp': 'false', 'kGrid_ext': 'false'}
# ---- SET OUTPUT DATA FOLDER ----
datapath = '/Users/kis/Dropbox/VariationalResearch/HarvardOdyssey/genPol_data/NGridPoints_{:.2E}/massRatio={:.1f}'.format(NGridPoints_cart, 1)
animpath = '/Users/kis/Dropbox/VariationalResearch/DataAnalysis/figs'
if toggleDict['Dynamics'] == 'real':
innerdatapath = datapath + '/redyn'
animpath = animpath + '/rdyn'
elif toggleDict['Dynamics'] == 'imaginary':
innerdatapath = datapath + '/imdyn'
animpath = animpath + '/idyn'
if toggleDict['Grid'] == 'cartesian':
innerdatapath = innerdatapath + '_cart'
elif toggleDict['Grid'] == 'spherical':
innerdatapath = innerdatapath + '_spherical'
if toggleDict['Coupling'] == 'frohlich':
innerdatapath = innerdatapath + '_froh'
animpath = animpath + '_frohlich'
elif toggleDict['Coupling'] == 'twophonon':
innerdatapath = innerdatapath
animpath = animpath + '_twophonon'
if toggleDict['IRcuts'] == 'true':
innerdatapath = innerdatapath + '_IRcuts'
elif toggleDict['IRcuts'] == 'false':
innerdatapath = innerdatapath
print(innerdatapath)
# figdatapath = '/Users/kis/Dropbox/Apps/Overleaf/Quantum Cherenkov Transition in Bose Polaron Systems/figures/figdump'
figdatapath = '/Users/kis/Dropbox/Apps/Overleaf/Cherenkov Polaron Paper pt1/figures/figdump'
innerdatapath_cart = innerdatapath[0:-10] + '_cart'
# # Analysis of Total Dataset
base02 = col.base02.ashexstring()
base2 = col.base2.ashexstring()
red = col.red.ashexstring()
green = col.green.ashexstring()
cyan = col.cyan.ashexstring()
blue = col.blue.ashexstring()
violet = col.violet.ashexstring()
aIBi = -2
# qds = xr.open_dataset(innerdatapath + '/quench_Dataset.nc')
# qds_aIBi = qds.sel(aIBi=aIBi)
qds = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
qds_aIBi = qds
PVals = qds['P'].values
tVals = qds['t'].values
n0 = qds.attrs['n0']
gBB = qds.attrs['gBB']
mI = qds.attrs['mI']
mB = qds.attrs['mB']
nu = np.sqrt(n0 * gBB / mB)
aBB = (mB / (4 * np.pi)) * gBB
xi = (8 * np.pi * n0 * aBB)**(-1 / 2)
print(qds.attrs['k_mag_cutoff'] * xi)
aIBi_Vals = np.array([-12.5, -10.0, -9.0, -8.0, -7.0, -5.0, -3.5, -2.0, -1.0, -0.75, -0.5, -0.1]) # used by many plots (spherical)
# # # # FIG SCHEMATIC - POLARON GRAPHIC + BOGO DISPERSION + POLARON DISPERSION
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# fig1 = plt.figure(constrained_layout=False)
# # gs1 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.1, top=0.95, left=0.05, right=0.2)
# # gs2 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.15, top=0.91, left=0.32, right=0.58)
# # gs3 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.15, top=0.91, left=0.7, right=0.97)
# gs2 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.15, top=0.91, left=0.08, right=0.45)
# gs3 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.15, top=0.91, left=0.57, right=0.97)
# # ax_pol = fig1.add_subplot(gs1[0], frame_on=False); ax_pol.get_xaxis().set_visible(False); ax_pol.get_yaxis().set_visible(False)
# ax_bogo = fig1.add_subplot(gs2[0])
# ax_gsE = fig1.add_subplot(gs3[0])
# # fig1.text(0.01, 0.95, '(a)', fontsize=labelsize)
# # fig1.text(0.24, 0.95, '(b)', fontsize=labelsize)
# # fig1.text(0.65, 0.95, '(c)', fontsize=labelsize)
# fig1.text(0.01, 0.95, '(a)', fontsize=labelsize)
# fig1.text(0.52, 0.95, '(b)', fontsize=labelsize)
# fig1.set_size_inches(7.8, 3.5)
# # # POLARON GRAPHIC
# # polimg = mpimg.imread('images/PolaronGraphic.png')
# # imgplot = ax_pol.imshow(polimg)
# # BOGOLIUBOV DISPERSION (SPHERICAL)
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', qds.coords['k'].values); kgrid.initArray_premade('th', qds.coords['th'].values)
# kVals = kgrid.getArray('k')
# wk_Vals = pfs.omegak(kVals, mB, n0, gBB)
# mask = (wk_Vals < 2) * (wk_Vals > 0)
# ax_bogo.plot(kVals[mask], wk_Vals[mask], 'k-', label='')
# ax_bogo.plot(kVals[mask], nu * kVals[mask], color=red, linestyle='--', label=r'$c|\mathbf{k}|$')
# ax_bogo.set_xlabel(r'$|\mathbf{k}|$', fontsize=labelsize)
# ax_bogo.set_ylabel(r'$\omega_{|\mathbf{k}|}$', fontsize=labelsize)
# ax_bogo.set_xlim([0 - 0.09, np.max(kVals[mask]) + 0.09])
# ax_bogo.xaxis.set_major_locator(plt.MaxNLocator(2))
# ax_bogo.set_ylim([0 - 0.09, 2 + 0.09])
# ax_bogo.yaxis.set_major_locator(plt.MaxNLocator(3))
# ax_bogo.legend(loc=2, fontsize=legendsize)
# # # GROUND STATE ENERGY (SPHERICAL)
# aIBi = -5
# print(aIBi * xi)
# qds_aIBi = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# PVals = qds_aIBi['P'].values
# CSAmp_ds = qds_aIBi['Real_CSAmp'] + 1j * qds_aIBi['Imag_CSAmp']
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', CSAmp_ds.coords['k'].values); kgrid.initArray_premade('th', CSAmp_ds.coords['th'].values)
# Energy_Vals = np.zeros((PVals.size, tVals.size))
# for Pind, P in enumerate(PVals):
# for tind, t in enumerate(tVals):
# CSAmp = CSAmp_ds.sel(P=P, t=t).values
# Energy_Vals[Pind, tind] = pfs.Energy(CSAmp, kgrid, P, aIBi, mI, mB, n0, gBB)
# Energy_Vals_inf = Energy_Vals[:, -1]
# Einf_tck = interpolate.splrep(PVals, Energy_Vals_inf, s=0)
# # Pinf_Vals = np.linspace(np.min(PVals), np.max(PVals), 5 * PVals.size)
# Pinf_Vals = np.linspace(0, np.max(PVals), 5 * PVals.size)
# Einf_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=0)
# Einf_1stderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=1)
# Einf_2ndderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=2)
# sound_mask = np.abs(Einf_2ndderiv_Vals) <= 5e-3
# Einf_sound = Einf_Vals[sound_mask]
# Pinf_sound = Pinf_Vals[sound_mask]
# [vsound, vs_const] = np.polyfit(Pinf_sound, Einf_sound, deg=1)
# ms_mask = Pinf_Vals <= 0.5
# Einf_1stderiv_ms = Einf_1stderiv_Vals[ms_mask]
# Pinf_ms = Pinf_Vals[ms_mask]
# [ms, ms_const] = np.polyfit(Pinf_ms, Einf_1stderiv_ms, deg=1)
# mask = (Pinf_Vals / (mI * nu)) < 2.2
# Ecrit = Einf_Vals[np.argmin(np.gradient(Einf_2ndderiv_Vals)) - 0]
# ax_gsE.plot(Pinf_Vals[mask][1:-1] / (mI * nu), Einf_Vals[mask][1:-1] / np.abs(Ecrit), 'k-')
# ax_gsE.set_xlabel(r'$P/(m_{I}c)$', fontsize=labelsize)
# ax_gsE.set_ylabel(r'$E/E_{\rm crit}$', fontsize=labelsize)
# # ymin = -2.1 / np.abs(Ecrit); ymax = -1 / np.abs(Ecrit)
# ymin = -1.3; ymax = -0.6
# # ax_gsE.set_ylim([ymin, ymax]); ax_gsE.set_xlim([0, 2.2])
# ax_gsE.set_ylim([ymin - 0.02, ymax + 0.02]); ax_gsE.set_xlim([-0.05, 2.2 + 0.05])
# ax_gsE.yaxis.set_major_locator(plt.MaxNLocator(2))
# Pcrit = Pinf_Vals[np.argmin(np.gradient(Einf_2ndderiv_Vals)) - 0]
# ax_gsE.axvline(x=Pcrit / (mI * nu), ymin=0.03, ymax=0.975, linestyle=':', color=green, lw=2)
# ax_bogo.tick_params(direction='in', right=True, top=True)
# ax_gsE.tick_params(direction='in', right=True, top=True)
# ax_bogo.set_title('BEC without Impurity')
# ax_gsE.set_title('BEC with Impurity')
# subVals = np.linspace(0, Pcrit / (mI * nu), 100)
# supVals = np.linspace(Pcrit / (mI * nu), np.max(Pinf_Vals[mask] / (mI * nu)), 100)
# ax_gsE.fill_between(supVals, ymin, ymax, facecolor=base2, alpha=0.75)
# ax_gsE.fill_between(subVals, ymin, ymax, facecolor=base02, alpha=0.3)
# font = {'family': 'serif', 'color': 'black', 'size': legendsize}
# sfont = {'family': 'serif', 'color': 'black', 'size': legendsize - 1}
# ax_gsE.text(0.16, -1.3 / np.abs(Ecrit), 'Polaron', fontdict=font)
# ax_gsE.text(0.16, -1.4 / np.abs(Ecrit), '(quadratic)', fontdict=sfont)
# ax_gsE.text(1.3, -1.8 / np.abs(Ecrit), 'Cherenkov', fontdict=font)
# ax_gsE.text(1.3, -1.9 / np.abs(Ecrit), '(linear)', fontdict=sfont)
# # ax_gsE.margins(1.05, 1.05)
# fig1.savefig(figdatapath + '/FigSchematic.pdf')
# # # # FIG 1 - PHASE DIAGRAM + DISTRIBUTION PLOTS - LETTER
# matplotlib.rcParams['axes.linewidth'] = 0.5 * axl
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# fig1 = plt.figure(constrained_layout=False)
# gs1 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.13, top=0.94, left=0.08, right=0.55)
# # gs2 = fig1.add_gridspec(nrows=2, ncols=1, bottom=0.13, top=0.94, left=0.67, right=0.99, height_ratios=[1, 1], hspace=0.2) # for ground state impurity distributions
# gs2 = fig1.add_gridspec(nrows=2, ncols=1, bottom=0.13, top=0.94, left=0.63, right=0.915, height_ratios=[1, 1], hspace=0.2) # for dynamical real space density distributions
# gs3 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.13, top=0.94, left=0.93, right=0.945); ax_colorbar = fig1.add_subplot(gs3[0]) # for dynamical real space density distributions
# ax_PD = fig1.add_subplot(gs1[0])
# ax_supDist = fig1.add_subplot(gs2[0])
# ax_subDist = fig1.add_subplot(gs2[1])
# fig1.text(0.01, 0.95, '(a)', fontsize=labelsize)
# fig1.text(0.575, 0.95, '(b)', fontsize=labelsize)
# fig1.text(0.575, 0.52, '(c)', fontsize=labelsize)
# fig1.set_size_inches(7.8, 4.5)
# # PHASE DIAGRAM (SPHERICAL)
# Pcrit = np.zeros(aIBi_Vals.size)
# ms_Vals = np.zeros(aIBi_Vals.size)
# for aind, aIBi in enumerate(aIBi_Vals):
# qds_aIBi = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# CSAmp_ds = qds_aIBi['Real_CSAmp'] + 1j * qds_aIBi['Imag_CSAmp']
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', CSAmp_ds.coords['k'].values); kgrid.initArray_premade('th', CSAmp_ds.coords['th'].values)
# Energy_Vals_inf = np.zeros(PVals.size)
# for Pind, P in enumerate(PVals):
# CSAmp = CSAmp_ds.sel(P=P).isel(t=-1).values
# Energy_Vals_inf[Pind] = pfs.Energy(CSAmp, kgrid, P, aIBi, mI, mB, n0, gBB)
# Einf_tck = interpolate.splrep(PVals, Energy_Vals_inf, s=0)
# Pinf_Vals = np.linspace(np.min(PVals), np.max(PVals), 2 * PVals.size)
# Einf_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=0)
# Einf_1stderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=1)
# Einf_2ndderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=2)
# # Pcrit[aind] = Pinf_Vals[np.argwhere(Einf_2ndderiv_Vals < 0)[-2][0] + 3]
# Pcrit[aind] = Pinf_Vals[np.argmin(np.gradient(Einf_2ndderiv_Vals)) - 0] # there is a little bit of fudging with the -3 here so that aIBi=-10 gives me Pcrit/(mI*c) = 1 -> I can also just generate data for weaker interactions and see if it's better
# ms_mask = Pinf_Vals < 0.3
# Einf_1stderiv_ms = Einf_1stderiv_Vals[ms_mask]
# Pinf_ms = Pinf_Vals[ms_mask]
# [ms_Vals[aind], ms_const] = np.polyfit(Pinf_ms, Einf_1stderiv_ms, deg=1)
# Pcrit_norm = Pcrit / (mI * nu)
# Pcrit_tck = interpolate.splrep(aIBi_Vals, Pcrit_norm, s=0, k=3)
# aIBi_interpVals = np.linspace(np.min(aIBi_Vals), np.max(aIBi_Vals), 5 * aIBi_Vals.size)
# Pcrit_interpVals = 1 * interpolate.splev(aIBi_interpVals, Pcrit_tck, der=0)
# print(Pcrit_norm)
# print(Pcrit_norm[1], Pcrit_norm[5], Pcrit_norm[-5])
# massEnhancement_Vals = (1 / ms_Vals) / mI
# mE_tck = interpolate.splrep(aIBi_Vals, massEnhancement_Vals, s=0)
# aIBi_interpVals = np.linspace(np.min(aIBi_Vals), np.max(aIBi_Vals), 5 * aIBi_Vals.size)
# mE_interpVals = 1 * interpolate.splev(aIBi_interpVals, mE_tck, der=0)
# # scalefac = 1.0
# scalefac = 0.95 # just to align weakly interacting case slightly to 1 (it's pretty much there, would just need higher resolution data)
# Pcrit_norm = scalefac * Pcrit_norm
# Pcrit_interpVals = scalefac * Pcrit_interpVals
# # xmin = np.min(aIBi_interpVals / xi); xmax = 1.01 * np.max(aIBi_interpVals / xi)
# # ymin = 0; ymax = 1.01 * np.max(Pcrit_interpVals)
# xmin = -11.45; xmax = 0.25
# ymin = -0.1; ymax = 4.0
# font = {'family': 'serif', 'color': 'black', 'size': legendsize}
# sfont = {'family': 'serif', 'color': 'black', 'size': legendsize - 1}
# ax_PD.plot(aIBi_Vals * xi, Pcrit_norm, marker='s', linestyle='None', mec='k', mfc='None', ms=5)
# ax_PD.plot(aIBi_interpVals * xi, Pcrit_interpVals, 'k-')
# # f1 = interpolate.interp1d(aIBi_Vals, Pcrit_norm, kind='cubic')
# # ax_PD.plot(aIBi_interpVals, f1(aIBi_interpVals), 'k-')
# ax_PD.set_xlabel(r'$a_{\rm IB}^{-1}/\xi^{-1}$', fontsize=labelsize)
# ax_PD.set_ylabel(r'Total Momentum $P/(m_{I}c)$', fontsize=labelsize)
# ax_PD.set_xlim([xmin, xmax]); ax_PD.set_ylim([ymin, ymax])
# ax_PD.fill_between(aIBi_interpVals * xi, Pcrit_interpVals, ymax - 0.1, facecolor=base2, alpha=0.75)
# ax_PD.fill_between(aIBi_interpVals * xi, ymin + 0.1, Pcrit_interpVals, facecolor=base02, alpha=0.3)
# # ax_PD.text(-3.2, ymin + 0.155 * (ymax - ymin), 'Polaron', fontdict=font)
# # ax_PD.text(-3.1, ymin + 0.08 * (ymax - ymin), '(' + r'$Z>0$' + ')', fontdict=sfont)
# ax_PD.text(-10.5, ymin + 0.155 * (ymax - ymin), 'Subsonic', fontdict=font)
# # ax_PD.text(-10.5, ymin + 0.155 * (ymax - ymin), 'Polaron', fontdict=font)
# ax_PD.text(-10.2, ymin + 0.08 * (ymax - ymin), r'$Z>0$', fontdict=sfont)
# ax_PD.text(-10.5, ymin + 0.86 * (ymax - ymin), 'Cherenkov', fontdict=font)
# ax_PD.text(-10.2, ymin + 0.785 * (ymax - ymin), r'$Z=0$', fontdict=sfont)
# # ax_PD.text(-5.7, ymin + 0.5 * (ymax - ymin), 'Dynamical', fontdict=font, color=red)
# # ax_PD.text(-5.6, ymin + 0.44 * (ymax - ymin), 'Transition', fontdict=font, color=red)
# # # POLARON EFFECTIVE MASS (SPHERICAL)
# # ax_PD.plot(aIBi_Vals * xi, massEnhancement_Vals, color='#ba9e88', marker='D', linestyle='None', markerfacecolor='None', mew=1, ms=5)
# ax_PD.plot(aIBi_interpVals * xi, mE_interpVals, color='k', linestyle='dashed')
# # CONNECTING LINES TO DISTRIBUTION FUNCTIONS
# supDist_coords = [-5.0 * xi, 3.0] # is [aIBi/xi, P/(mI*c)]
# subDist_coords = [-5.0 * xi, 0.5] # is [aIBi/xi, P/(mI*c)]
# ax_PD.plot(supDist_coords[0], supDist_coords[1], linestyle='', marker='8', mec='k', mfc='k', ms=10)
# ax_PD.plot(subDist_coords[0], subDist_coords[1], linestyle='', marker='8', mec='k', mfc='k', ms=10)
# # # For ground state impurity distributions
# # con_sup = ConnectionPatch(xyA=(supDist_coords[0], supDist_coords[1]), xyB=(0, 0.49), coordsA="data", coordsB="data", axesA=ax_PD, axesB=ax_supDist, color='k', linestyle='dotted', lw=0.5)
# # con_sub = ConnectionPatch(xyA=(subDist_coords[0], subDist_coords[1]), xyB=(0, 0.34), coordsA="data", coordsB="data", axesA=ax_PD, axesB=ax_subDist, color='k', linestyle='dotted', lw=0.5)
# # For dynamical real space density distributions
# con_sup = ConnectionPatch(xyA=(supDist_coords[0], supDist_coords[1]), xyB=(0, -7), coordsA="data", coordsB="data", axesA=ax_PD, axesB=ax_supDist, color='k', linestyle='dotted', lw=0.5)
# con_sub = ConnectionPatch(xyA=(subDist_coords[0], subDist_coords[1]), xyB=(0, -25), coordsA="data", coordsB="data", axesA=ax_PD, axesB=ax_subDist, color='k', linestyle='dotted', lw=0.5)
# ax_PD.add_artist(con_sup)
# ax_PD.add_artist(con_sub)
# # # GROUND STATE IMPURITY DISTRIBUTION (CARTESIAN)
# # # GaussianBroadening = True; sigma = 0.0168
# # GaussianBroadening = True; sigma = 0.02
# # incoh_color = green
# # delta_color = base02
# # def GPDF(xVals, mean, stdev):
# # return (1 / (stdev * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# # # return (1 / (1 * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# # aIBi = -5
# # qds_aIBi = xr.open_dataset(innerdatapath_cart + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# # PVals = qds_aIBi['P'].values
# # nPIm_FWHM_indices = []
# # nPIm_distPeak_index = np.zeros(PVals.size, dtype=int)
# # nPIm_FWHM_Vals = np.zeros(PVals.size)
# # nPIm_distPeak_Vals = np.zeros(PVals.size)
# # nPIm_deltaPeak_Vals = np.zeros(PVals.size)
# # nPIm_Tot_Vals = np.zeros(PVals.size)
# # nPIm_Vec = np.empty(PVals.size, dtype=np.object)
# # PIm_Vec = np.empty(PVals.size, dtype=np.object)
# # for ind, P in enumerate(PVals):
# # qds_nPIm_inf = qds_aIBi['nPI_mag'].sel(P=P).isel(t=-1).dropna('PI_mag')
# # PIm_Vals = qds_nPIm_inf.coords['PI_mag'].values
# # dPIm = PIm_Vals[1] - PIm_Vals[0]
# # nPIm_Vec[ind] = qds_nPIm_inf.values
# # PIm_Vec[ind] = PIm_Vals
# # # # Calculate nPIm(t=inf) normalization
# # nPIm_Tot_Vals[ind] = np.sum(qds_nPIm_inf.values * dPIm) + qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# # # Calculate FWHM, distribution peak, and delta peak
# # nPIm_FWHM_Vals[ind] = pfc.FWHM(PIm_Vals, qds_nPIm_inf.values)
# # nPIm_distPeak_Vals[ind] = np.max(qds_nPIm_inf.values)
# # nPIm_deltaPeak_Vals[ind] = qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# # D = qds_nPIm_inf.values - np.max(qds_nPIm_inf.values) / 2
# # indices = np.where(D > 0)[0]
# # nPIm_FWHM_indices.append((indices[0], indices[-1]))
# # nPIm_distPeak_index[ind] = np.argmax(qds_nPIm_inf.values)
# # Pnorm = PVals / (mI * nu)
# # Pratio_sup = 3.0; Pind_sup = np.abs(Pnorm - Pratio_sup).argmin()
# # Pratio_sub = 0.5; Pind_sub = np.abs(Pnorm - Pratio_sub).argmin()
# # print(Pnorm[Pind_sup], Pnorm[Pind_sub])
# # print(nPIm_deltaPeak_Vals[Pind_sup], nPIm_deltaPeak_Vals[Pind_sub])
# # ax_supDist.plot(PIm_Vec[Pind_sup] / (mI * nu), nPIm_Vec[Pind_sup], color=incoh_color, lw=1.0, label='Incoherent Part')
# # ax_supDist.set_xlim([-0.01, 5])
# # ax_supDist.set_ylim([0, 1.05])
# # ax_supDist.set_ylabel(r'$n_{|\mathbf{P}_{\rm imp}|}$', fontsize=labelsize)
# # # ax_supDist.set_xlabel(r'$|\vec{P_{I}}|/(m_{I}c)$', fontsize=labelsize)
# # ax_supDist.fill_between(PIm_Vec[Pind_sup] / (mI * nu), np.zeros(PIm_Vals.size), nPIm_Vec[Pind_sup], facecolor=incoh_color, alpha=0.25)
# # if GaussianBroadening:
# # Pnorm_sup = PVals[Pind_sup] / (mI * nu)
# # deltaPeak_sup = nPIm_deltaPeak_Vals[Pind_sup]
# # PIm_norm_sup = PIm_Vec[Pind_sup] / (mI * nu)
# # delta_GB_sup = deltaPeak_sup * GPDF(PIm_norm_sup, Pnorm_sup, sigma)
# # # ax_supDist.plot(PIm_norm_sup, delta_GB_sup, linestyle='-', color=delta_color, linewidth=1, label=r'$\delta$-Peak')
# # ax_supDist.plot(PIm_norm_sup, delta_GB_sup, linestyle='-', color=delta_color, linewidth=1.0, label='')
# # ax_supDist.fill_between(PIm_norm_sup, np.zeros(PIm_norm_sup.size), delta_GB_sup, facecolor=delta_color, alpha=0.25)
# # else:
# # ax_supDist.plot((PVals[Pind_sup] / (mI * nu)) * np.ones(PIm_Vals.size), np.linspace(0, nPIm_deltaPeak_Vals[Pind_sup], PIm_Vals.size), linestyle='-', color=delta_color, linewidth=1.5, label='Delta Peak (Z-factor)')
# # ax_supDist.legend(loc=1, fontsize=legendsize, frameon=False)
# # ax_subDist.plot(PIm_Vec[Pind_sub] / (mI * nu), nPIm_Vec[Pind_sub], color=incoh_color, lw=1.0, label='Incoherent Part')
# # # ax_subDist.set_xlim([-0.01, np.max(PIm_Vec[Pind_sub] / (mI*nu))])
# # ax_subDist.set_xlim([-0.01, 5])
# # ax_subDist.set_ylim([0, 1.05])
# # ax_subDist.set_ylabel(r'$n_{|\mathbf{P}_{\rm imp}|}$', fontsize=labelsize)
# # ax_subDist.set_xlabel(r'$|\mathbf{P}_{\rm imp}|/(m_{I}c)$', fontsize=labelsize)
# # ax_subDist.fill_between(PIm_Vec[Pind_sub] / (mI * nu), np.zeros(PIm_Vals.size), nPIm_Vec[Pind_sub], facecolor=incoh_color, alpha=0.25)
# # if GaussianBroadening:
# # Pnorm_sub = PVals[Pind_sub] / (mI * nu)
# # deltaPeak_sub = nPIm_deltaPeak_Vals[Pind_sub]
# # PIm_norm_sub = PIm_Vec[Pind_sub] / (mI * nu)
# # delta_GB_sub = deltaPeak_sub * GPDF(PIm_norm_sub, Pnorm_sub, sigma)
# # print(np.trapz(delta_GB_sub, PIm_norm_sub))
# # # ax_subDist.plot(PIm_norm_sub, delta_GB_sub, linestyle='-', color=delta_color, linewidth=1.0, label=r'$\delta$-Peak')
# # # ax_subDist.fill_between(PIm_norm_sub, np.zeros(PIm_norm_sub.size), delta_GB_sub, facecolor=delta_color, alpha=0.25)
# # ax_subDist.axvline(x=Pnorm_sub - 0.05, linestyle='-', color=delta_color, lw=1)
# # ax_subDist.axvline(x=Pnorm_sub + 0.05, linestyle='-', color=delta_color, lw=1)
# # else:
# # ax_subDist.plot((PVals[Pind_sub] / (mI * nu)) * np.ones(PIm_Vals.size), np.linspace(0, nPIm_deltaPeak_Vals[Pind_sub], PIm_Vals.size), linestyle='-', color=delta_color, linewidth=1, label='Delta Peak (Z-factor)')
# # ax_subDist.legend(loc=1, fontsize=legendsize, frameon=False)
# # print(deltaPeak_sub, deltaPeak_sup)
# # ax_PD.tick_params(direction='in', right=True, top=True)
# # ax_subDist.tick_params(direction='in', right=True, top=True)
# # ax_supDist.tick_params(direction='in', right=True, top=True)
# # ax_supDist.xaxis.set_ticklabels([])
# # GAS DENSITY REAL SPACE DISTRIBUTION (CARTESIAN INTERPOLATION)
# interpdatapath = '/Users/kis/Dropbox/VariationalResearch/HarvardOdyssey/genPol_data/NGridPoints_1.11E+08_resRat_0.50/massRatio=1.0/redyn_spherical/interp'
# cmap = 'afmhot'
# avmin = 1e-5; avmax = 1e-1
# aIBi = -5
# Pratio_sup = 3.0
# Pratio_sub = 0.52
# tratio = 39.99
# nu = 0.7926654595212022
# xi = 0.8920620580763856
# tscale = xi / nu
# linDimMajor, linDimMinor = (10, 10)
# interp_ds_sup = xr.open_dataset(interpdatapath + '/InterpDat_P_{:.2f}_aIBi_{:.2f}_t_{:.2f}_lDM_{:.2f}_lDm_{:.2f}.nc'.format(Pratio_sup * nu, aIBi, tratio * tscale, linDimMajor, linDimMinor))
# interp_ds_sub = xr.open_dataset(interpdatapath + '/InterpDat_P_{:.2f}_aIBi_{:.2f}_t_{:.2f}_lDM_{:.2f}_lDm_{:.2f}.nc'.format(Pratio_sub * nu, aIBi, tratio * tscale, linDimMajor, linDimMinor))
# n0 = interp_ds_sup.attrs['n0']; gBB = interp_ds_sup.attrs['gBB']; mI = interp_ds_sup.attrs['mI']; mB = interp_ds_sup.attrs['mB']
# nu = np.sqrt(n0 * gBB / mB)
# mc = mI * nu
# aBB = (mB / (4 * np.pi)) * gBB
# xi = (8 * np.pi * n0 * aBB)**(-1 / 2)
# tscale = xi / nu
# P_sup = interp_ds_sup.attrs['P']; Pratio_sup = P_sup / mc
# P_sub = interp_ds_sub.attrs['P']; Pratio_sub = P_sub / mc
# xL = interp_ds_sup['x'].values; yL = interp_ds_sup['y'].values; zL = interp_ds_sup['z'].values
# xLg, zLg = np.meshgrid(xL, zL, indexing='ij')
# dx = xL[1] - xL[0]; dy = yL[1] - yL[0]; dz = zL[1] - zL[0]
# na_xz_int_sup = interp_ds_sup['na_xz_int'].values; na_xz_int_norm_sup = na_xz_int_sup / (np.sum(na_xz_int_sup) * dx * dz)
# na_xz_int_sub = interp_ds_sub['na_xz_int'].values; na_xz_int_norm_sub = na_xz_int_sub / (np.sum(na_xz_int_sub) * dx * dz)
# quad_sup = ax_supDist.pcolormesh(zLg / xi, xLg / xi, na_xz_int_norm_sup, norm=colors.LogNorm(vmin=avmin, vmax=avmax), cmap=cmap, rasterized=True)
# # ax_supDist.text(0.57, 0.85, r'$t/(\xi c^{-1})$' + ': {:.1f}'.format(tratio), transform=ax_supDist.transAxes, color='w', fontsize=legendsize - 1)
# ax_supDist.set_ylabel(r'$x/\xi$', labelpad=-10, fontsize=labelsize)
# quad_sub = ax_subDist.pcolormesh(zLg / xi, xLg / xi, na_xz_int_norm_sub, norm=colors.LogNorm(vmin=avmin, vmax=avmax), cmap=cmap, rasterized=True)
# # ax_subDist.text(0.57, 0.85, r'$t/(\xi c^{-1})$' + ': {:.1f}'.format(tratio), transform=ax_subDist.transAxes, color='w', fontsize=legendsize - 1)
# ax_subDist.set_xlabel(r'$z/\xi$', fontsize=labelsize)
# ax_subDist.set_ylabel(r'$x/\xi$', labelpad=-10, fontsize=labelsize)
# fig1.colorbar(quad_sup, cax=ax_colorbar, extend='both')
# ax_PD.tick_params(direction='in', right=True, top=True)
# ax_subDist.tick_params(direction='in', right=True, top=True)
# ax_supDist.tick_params(direction='in', right=True, top=True)
# ax_supDist.xaxis.set_ticklabels([])
# # # # DPT
# qds = xr.open_dataset('/Users/kis/Dropbox/VariationalResearch/HarvardOdyssey/genPol_data/NGridPoints_1.11E+08_resRat_0.50/massRatio=1.0_noCSAmp/redyn_spherical' + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# tVals = qds['t'].values
# DynOvExp_NegMask = False
# DynOvExp_Cut = False
# cut = 1e-4
# consecDetection = True
# consecSamples = 10
# def powerfunc(t, a, b):
# return b * t**(-1 * a)
# tmin = 90
# tmax = 100
# tfVals = tVals[(tVals <= tmax) * (tVals >= tmin)]
# rollwin = 1
# colorList = ['red', '#7e1e9c', 'green', 'orange', '#60460f', 'blue', 'magenta']
# lineList = ['solid', 'dashed', 'dotted', '-.']
# aIBi_des = np.array([-10.0, -5.0, -3.5, -2.5, -2.0, -1.75])
# massRat_des = np.array([1.0])
# datapath = '/Users/kis/Dropbox/VariationalResearch/HarvardOdyssey/genPol_data/NGridPoints_1.11E+08_resRat_0.50/massRatio=1.0_noCSAmp'
# Pcrit_da = xr.DataArray(np.full(aIBi_des.size, np.nan, dtype=float), coords=[aIBi_des], dims=['aIBi'])
# for inda, aIBi in enumerate(aIBi_des):
# mds = xr.open_dataset(datapath + '/redyn_spherical/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# Plen = mds.coords['P'].values.size
# Pstart_ind = 0
# PVals = mds.coords['P'].values[Pstart_ind:Plen]
# n0 = mds.attrs['n0']
# gBB = mds.attrs['gBB']
# mI = mds.attrs['mI']
# mB = mds.attrs['mB']
# nu = np.sqrt(n0 * gBB / mB)
# vI0_Vals = (PVals - mds.isel(t=0, P=np.arange(Pstart_ind, Plen))['Pph'].values) / mI
# mds_ts = mds.sel(t=tfVals)
# DynOv_Exponents = np.zeros(PVals.size)
# DynOv_Constants = np.zeros(PVals.size)
# for indP, P in enumerate(PVals):
# DynOv_raw = np.abs(mds_ts.isel(P=indP)['Real_DynOv'].values + 1j * mds_ts.isel(P=indP)['Imag_DynOv'].values).real.astype(float)
# DynOv_ds = xr.DataArray(DynOv_raw, coords=[tfVals], dims=['t'])
# # DynOv_ds = DynOv_ds.rolling(t=rollwin, center=True).mean().dropna('t')
# DynOv_Vals = DynOv_ds.values
# tDynOvc_Vals = DynOv_ds['t'].values
# S_slope, S_intercept, S_rvalue, S_pvalue, S_stderr = ss.linregress(np.log(tDynOvc_Vals), np.log(DynOv_Vals))
# DynOv_Exponents[indP] = -1 * S_slope
# DynOv_Constants[indP] = np.exp(S_intercept)
# if DynOvExp_NegMask:
# DynOv_Exponents[DynOv_Exponents < 0] = 0
# if DynOvExp_Cut:
# DynOv_Exponents[np.abs(DynOv_Exponents) < cut] = 0
# if consecDetection:
# crit_ind = 0
# for indE, exp in enumerate(DynOv_Exponents):
# if indE > DynOv_Exponents.size - consecDetection:
# break
# expSlice = DynOv_Exponents[indE:(indE + consecSamples)]
# if np.all(expSlice > 0):
# crit_ind = indE
# break
# DynOv_Exponents[0:crit_ind] = 0
# Pcrit_da[inda] = PVals[crit_ind] / (mI * nu)
# DynOvf_Vals = powerfunc(1e1000, DynOv_Exponents, DynOv_Constants)
# ax_PD.plot(aIBi_des * xi, Pcrit_da.values, linestyle='None', marker='D', mec=red, mfc=red, mew=2, ms=5)
# print(aIBi_des)
# print(Pcrit_da.values)
# fig1.savefig(figdatapath + '/Fig1_Letter.pdf')
# # fig1.savefig(figdatapath + '/Fig1_Letter.jpg', quality=100)
# matplotlib.rcParams['axes.linewidth'] = axl
# # # # FIG 2 - LETTER
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# fig2 = plt.figure(constrained_layout=False)
# gs1 = fig2.add_gridspec(nrows=2, ncols=1, bottom=0.23, top=0.95, left=0.12, right=0.48, hspace=0.1)
# gs2 = fig2.add_gridspec(nrows=2, ncols=1, bottom=0.23, top=0.95, left=0.61, right=0.98, hspace=0.1)
# ax_gsZ = fig2.add_subplot(gs1[1])
# ax_gsVel = fig2.add_subplot(gs1[0])
# ax_dynS = fig2.add_subplot(gs2[1])
# ax_dynVel = fig2.add_subplot(gs2[0])
# fig2.text(0.02, 0.95, '(a)', fontsize=labelsize)
# fig2.text(0.02, 0.55, '(b)', fontsize=labelsize)
# fig2.text(0.52, 0.95, '(c)', fontsize=labelsize)
# fig2.text(0.52, 0.55, '(d)', fontsize=labelsize)
# # colorList = ['red', 'green', 'blue']
# colorList = [red, green, blue]
# # colorList = ['red', '#7e1e9c', 'green', 'orange', '#60460f', 'blue', 'magenta']
# lineList = ['solid', 'dashed', 'dotted', '-.']
# dyndatapath = '/Users/kis/Dropbox/VariationalResearch/HarvardOdyssey/genPol_data/NGridPoints_1.11E+08_resRat_0.50/massRatio=1.0_noCSAmp/redyn_spherical'
# # ax_GSE1.set_ylim([0, 1.2 * np.max(Einf_1stderiv_Vals / np.abs(Ecrit))])
# # aIBi_des = np.array([-10.0, -5.0, -3.5, -2.0, -1.0])
# # aIBi_Vals = np.array([-10.0, -5.0, -3.5, -2.0]) # used by many plots (spherical)
# aIBi_Vals = np.array([-10.0, -3.5, -2.0]) # used by many plots (spherical)
# # # POLARON SOUND VELOCITY (SPHERICAL)
# # Check to see if linear part of polaron (total system) energy spectrum has slope equal to sound velocity
# vsound_Vals = np.zeros(aIBi_Vals.size)
# vI_Vals = np.zeros(aIBi_Vals.size)
# for aind, aIBi in enumerate(aIBi_Vals):
# qds = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# qds_aIBi = qds.isel(t=-1)
# ZVals = np.exp(-1 * qds_aIBi['Nph'].values)
# CSAmp_ds = qds_aIBi['Real_CSAmp'] + 1j * qds_aIBi['Imag_CSAmp']
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', CSAmp_ds.coords['k'].values); kgrid.initArray_premade('th', CSAmp_ds.coords['th'].values)
# Energy_Vals_inf = np.zeros(PVals.size)
# PI_Vals = np.zeros(PVals.size)
# for Pind, P in enumerate(PVals):
# CSAmp = CSAmp_ds.sel(P=P).values
# Energy_Vals_inf[Pind] = pfs.Energy(CSAmp, kgrid, P, aIBi, mI, mB, n0, gBB)
# PI_Vals[Pind] = P - qds_aIBi.sel(P=P)['Pph'].values
# Einf_tck = interpolate.splrep(PVals, Energy_Vals_inf, s=0)
# Pinf_Vals = np.linspace(np.min(PVals), np.max(PVals), 2 * PVals.size)
# Einf_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=0)
# Einf_1stderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=1)
# Einf_1stderiv_Vals_subsamp = 1 * interpolate.splev(PVals, Einf_tck, der=1)
# xmask = (PVals / (mI * nu)) <= 4
# ax_gsZ.plot(PVals[xmask] / (mI * nu), ZVals[xmask], color=colorList[aind], linestyle='solid', marker='D', ms=4)
# # ax_gsVel.plot(Pinf_Vals / (mI * nu), Einf_1stderiv_Vals / nu, color=colorList[aind], linestyle='solid', marker='D', ms=4)
# ax_gsVel.plot(PVals[xmask] / (mI * nu), Einf_1stderiv_Vals_subsamp[xmask] / nu, color=colorList[aind], linestyle='solid', marker='D', ms=4)
# ax_gsVel.plot(Pinf_Vals / (mI * nu), np.ones(Pinf_Vals.size), 'k:')
# ax_gsZ.set_xlabel(r'$P/(m_{I}c)$', fontsize=13)
# ax_gsVel.set_ylabel(r'$v_{\rm pol}/c$', fontsize=13)
# ax_gsZ.set_ylabel(r'$Z$', fontsize=13)
# # DYN S(t) AND VELOCITY
# qds = xr.open_dataset('/Users/kis/Dropbox/VariationalResearch/HarvardOdyssey/genPol_data/NGridPoints_1.11E+08_resRat_0.50/massRatio=1.0_noCSAmp/redyn_spherical' + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# tVals = qds['t'].values
# mc = mI * nu
# DynOvData_roll = False
# DynOvData_rollwin = 2
# PimpData_roll = False
# PimpData_rollwin = 2
# DynOvExp_roll = False
# DynOvExp_rollwin = 2
# DynOvExp_NegMask = False
# DynOvExp_Cut = False
# cut = 1e-4
# consecDetection = True
# consecSamples = 10
# flattenAboveC = True
# # aIBi_des = np.array([-10.0, -5.0, -3.5, -2.5, -2.0, -1.75])
# Pnorm = PVals / mc
# tmin = 90; tmax = 100
# tfVals = tVals[(tVals <= tmax) * (tVals >= tmin)]
# def powerfunc(t, a, b):
# return b * t**(-1 * a)
# Pcrit_da = xr.DataArray(np.full(aIBi_Vals.size, np.nan, dtype=float), coords=[aIBi_Vals], dims=['aIBi'])
# for inda, aIBi in enumerate(aIBi_Vals):
# qds_aIBi = xr.open_dataset(dyndatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# # print(qds_aIBi['t'].values)
# qds_aIBi_ts = qds_aIBi.sel(t=tfVals)
# PVals = qds_aIBi['P'].values
# Pnorm = PVals / mc
# DynOv_Exponents = np.zeros(PVals.size)
# DynOv_Cov = np.full(PVals.size, np.nan)
# vImp_Exponents = np.zeros(PVals.size)
# vImp_Cov = np.full(PVals.size, np.nan)
# Plen = PVals.size
# Pstart_ind = 0
# vI0_Vals = (PVals - qds_aIBi.isel(t=0, P=np.arange(Pstart_ind, Plen))['Pph'].values) / mI
# DynOv_Exponents = np.zeros(PVals.size)
# DynOv_Constants = np.zeros(PVals.size)
# vImp_Exponents = np.zeros(PVals.size)
# vImp_Constants = np.zeros(PVals.size)
# DynOv_Rvalues = np.zeros(PVals.size)
# DynOv_Pvalues = np.zeros(PVals.size)
# DynOv_stderr = np.zeros(PVals.size)
# DynOv_tstat = np.zeros(PVals.size)
# DynOv_logAve = np.zeros(PVals.size)
# for indP, P in enumerate(PVals):
# DynOv_raw = np.abs(qds_aIBi_ts.isel(P=indP)['Real_DynOv'].values + 1j * qds_aIBi_ts.isel(P=indP)['Imag_DynOv'].values).real.astype(float)
# DynOv_ds = xr.DataArray(DynOv_raw, coords=[tfVals], dims=['t'])
# Pph_ds = xr.DataArray(qds_aIBi_ts.isel(P=indP)['Pph'].values, coords=[tfVals], dims=['t'])
# if DynOvData_roll:
# DynOv_ds = DynOv_ds.rolling(t=DynOvData_rollwin, center=True).mean().dropna('t')
# if PimpData_roll:
# Pph_ds = Pph_ds.rolling(t=PimpData_rollwin, center=True).mean().dropna('t')
# DynOv_Vals = DynOv_ds.values
# tDynOv_Vals = DynOv_ds['t'].values
# vImpc_Vals = (P - Pph_ds.values) / mI - nu
# tvImpc_Vals = Pph_ds['t'].values
# S_slope, S_intercept, S_rvalue, S_pvalue, S_stderr = ss.linregress(np.log(tDynOv_Vals), np.log(DynOv_Vals))
# DynOv_Exponents[indP] = -1 * S_slope
# DynOv_Constants[indP] = np.exp(S_intercept)
# DynOv_Rvalues[indP] = S_rvalue
# DynOv_Pvalues[indP] = S_pvalue
# DynOv_stderr[indP] = S_stderr
# DynOv_tstat[indP] = S_slope / S_stderr
# DynOv_logAve[indP] = np.average(np.log(DynOv_Vals))
# # if (-1 * S_slope) < 0:
# # DynOv_Exponents[indP] = 0
# if vImpc_Vals[-1] < 0:
# vImp_Exponents[indP] = 0
# vImp_Constants[indP] = vImpc_Vals[-1]
# else:
# vI_slope, vI_intercept, vI_rvalue, vI_pvalue, vI_stderr = ss.linregress(np.log(tvImpc_Vals), np.log(vImpc_Vals))
# vImp_Exponents[indP] = -1 * vI_slope
# vImp_Constants[indP] = np.exp(vI_intercept)
# if (-1 * vI_slope) < 0:
# vImp_Exponents[indP] = 0
# DynOvExponents_da = xr.DataArray(DynOv_Exponents, coords=[PVals], dims=['P'])
# if DynOvExp_roll:
# DynOvExponents_da = DynOvExponents_da.rolling(P=DynOvExp_rollwin, center=True).mean().dropna('P')
# if DynOvExp_NegMask:
# ExpMask = DynOvExponents_da.values < 0
# DynOvExponents_da[ExpMask] = 0
# if DynOvExp_Cut:
# ExpMask = np.abs(DynOvExponents_da.values) < cut
# DynOvExponents_da[ExpMask] = 0
# DynOv_Exponents = DynOvExponents_da.values
# if consecDetection:
# crit_ind = 0
# for indE, exp in enumerate(DynOv_Exponents):
# if indE > DynOv_Exponents.size - consecDetection:
# break
# expSlice = DynOv_Exponents[indE:(indE + consecSamples)]
# if np.all(expSlice > 0):
# crit_ind = indE
# break
# DynOvExponents_da[0:crit_ind] = 0
# DynOv_Exponents = DynOvExponents_da.values
# Pnorm_dynov = DynOvExponents_da['P'].values / mc
# DynOvf_Vals = powerfunc(1e1000, DynOv_Exponents, DynOv_Constants)
# Pcrit_da[inda] = PVals[crit_ind] / (mI * nu)
# vIf_Vals = nu + powerfunc(1e1000, vImp_Exponents, vImp_Constants)
# if flattenAboveC:
# vIf_Vals[vIf_Vals > nu] = nu
# xmask = (vI0_Vals / nu) <= 4
# ax_dynS.plot(vI0_Vals[xmask] / nu, DynOvf_Vals[xmask], color=colorList[inda], linestyle='solid', marker='D', ms=4)
# ax_dynVel.plot(vI0_Vals[xmask] / nu, vIf_Vals[xmask] / nu, label='{:.2f}'.format(aIBi * xi), color=colorList[inda], linestyle='solid', marker='D', ms=4)
# ax_dynS.set_ylabel(r'$S(t_{\infty})$', fontsize=13)
# ax_dynVel.plot(vI0_Vals / nu, np.ones(vI0_Vals.size), 'k:')
# ax_dynS.set_xlabel(r'$v_{\rm imp}(t_{0})/c$', fontsize=13)
# ax_dynVel.set_ylabel(r'$v_{\rm imp}(t_{\infty})/c$', fontsize=13)
# ax_dynS.tick_params(which='both', direction='in', right=True, top=True)
# ax_dynVel.tick_params(which='both', direction='in', right=True, top=True)
# # GENERAL
# handles, labels = ax_dynVel.get_legend_handles_labels()
# plt.rcParams['legend.title_fontsize'] = 13
# # fig2.legend(handles, labels, title=r'$a_{\rm IB}^{-1}/\xi^{-1}$', ncol=aIBi_Vals.size, loc='lower center', bbox_to_anchor=(0.55, 0.001), fontsize=12)
# fig2.legend(handles, labels, title=r'$a_{\rm IB}^{-1}/\xi^{-1}$', ncol=aIBi_Vals.size, loc='lower center', bbox_to_anchor=(0.55, 0.001), fontsize=12)
# ax_gsVel.xaxis.set_ticklabels([])
# ax_dynVel.xaxis.set_ticklabels([])
# # ax_gsVel.set_xticks([0.0, 1.0, 2.0])
# ax_gsZ.tick_params(direction='in', right=True, top=True)
# ax_gsVel.tick_params(direction='in', right=True, top=True)
# ax_dynS.tick_params(direction='in', right=True, top=True)
# ax_dynVel.tick_params(direction='in', right=True, top=True)
# ax_gsZ.set_xlim([0, 4.14]); ax_gsZ.set_ylim([-0.05, 1.1])
# ax_gsVel.set_xlim([0, 4.14]); ax_gsVel.set_ylim([-0.05, 1.2])
# ax_dynS.set_xlim([-0.05, 4.14]); ax_dynS.set_ylim([-0.05, 1.1])
# ax_dynVel.set_xlim([-0.05, 4.14]); ax_dynVel.set_ylim([-0.05, 1.2])
# fig2.set_size_inches(7.8, 5.2)
# fig2.savefig(figdatapath + '/Fig2_Letter.pdf')
# # # # # # #############################################################################################################################
# # # # # # FIG SM1 - LETTER
# # # # # #############################################################################################################################
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# figSM1 = plt.figure(constrained_layout=False)
# gs1 = figSM1.add_gridspec(nrows=1, ncols=1, bottom=0.18, top=0.93, left=0.08, right=0.31)
# gs2 = figSM1.add_gridspec(nrows=1, ncols=1, bottom=0.18, top=0.93, left=0.37, right=0.60)
# gs3 = figSM1.add_gridspec(nrows=1, ncols=1, bottom=0.18, top=0.93, left=0.70, right=0.94)
# ax_subDist = figSM1.add_subplot(gs1[0])
# ax_supDist = figSM1.add_subplot(gs2[0])
# ax_distChar = figSM1.add_subplot(gs3[0])
# # figSM1.set_size_inches(7.8, 3.5)
# figSM1.set_size_inches(7.8, 2.5)
# figSM1.text(0.005, 0.93, '(a)', fontsize=labelsize)
# figSM1.text(0.325, 0.93, '(b)', fontsize=labelsize)
# figSM1.text(0.62, 0.93, '(c)', fontsize=labelsize)
# # GROUND STATE IMPURITY DISTRIBUTION (CARTESIAN)
# # GaussianBroadening = True; sigma = 0.0168
# GaussianBroadening = True; sigma = 0.02
# incoh_color = green
# delta_color = base02
# def GPDF(xVals, mean, stdev):
# return (1 / (stdev * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# # return (1 / (1 * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# aIBi = -5
# qds_aIBi = xr.open_dataset(innerdatapath_cart + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# PVals = qds_aIBi['P'].values
# print('Interaction: {0}'.format(aIBi * xi))
# nPIm_FWHM_indices = []
# nPIm_distPeak_index = np.zeros(PVals.size, dtype=int)
# nPIm_FWHM_Vals = np.zeros(PVals.size)
# nPIm_distPeak_Vals = np.zeros(PVals.size)
# nPIm_deltaPeak_Vals = np.zeros(PVals.size)
# nPIm_Tot_Vals = np.zeros(PVals.size)
# nPIm_Vec = np.empty(PVals.size, dtype=np.object)
# PIm_Vec = np.empty(PVals.size, dtype=np.object)
# for ind, P in enumerate(PVals):
# qds_nPIm_inf = qds_aIBi['nPI_mag'].sel(P=P).isel(t=-1).dropna('PI_mag')
# PIm_Vals = qds_nPIm_inf.coords['PI_mag'].values
# dPIm = PIm_Vals[1] - PIm_Vals[0]
# nPIm_Vec[ind] = qds_nPIm_inf.values
# PIm_Vec[ind] = PIm_Vals
# # # Calculate nPIm(t=inf) normalization
# nPIm_Tot_Vals[ind] = np.sum(qds_nPIm_inf.values * dPIm) + qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# # Calculate FWHM, distribution peak, and delta peak
# nPIm_FWHM_Vals[ind] = pfc.FWHM(PIm_Vals, qds_nPIm_inf.values)
# nPIm_distPeak_Vals[ind] = np.max(qds_nPIm_inf.values)
# nPIm_deltaPeak_Vals[ind] = qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# D = qds_nPIm_inf.values - np.max(qds_nPIm_inf.values) / 2
# indices = np.where(D > 0)[0]
# nPIm_FWHM_indices.append((indices[0], indices[-1]))
# nPIm_distPeak_index[ind] = np.argmax(qds_nPIm_inf.values)
# Pnorm = PVals / (mI * nu)
# Pratio_sup = 3.0; Pind_sup = np.abs(Pnorm - Pratio_sup).argmin()
# Pratio_sub = 0.5; Pind_sub = np.abs(Pnorm - Pratio_sub).argmin()
# print(Pnorm[Pind_sup], Pnorm[Pind_sub])
# print(nPIm_deltaPeak_Vals[Pind_sup], nPIm_deltaPeak_Vals[Pind_sub])
# ax_supDist.plot(PIm_Vec[Pind_sup] / (mI * nu), nPIm_Vec[Pind_sup], color=incoh_color, lw=1.0, label='Incoherent Part')
# ax_supDist.set_xlim([-0.01, 5])
# ax_supDist.set_ylim([0, 1.05])
# # ax_supDist.set_ylabel(r'$n_{|\mathbf{P}_{\rm imp}|}$', fontsize=labelsize)
# ax_supDist.set_xlabel(r'$|\mathbf{P}_{\rm imp}|/(m_{I}c)$', fontsize=labelsize)
# ax_supDist.fill_between(PIm_Vec[Pind_sup] / (mI * nu), np.zeros(PIm_Vals.size), nPIm_Vec[Pind_sup], facecolor=incoh_color, alpha=0.25)
# if GaussianBroadening:
# Pnorm_sup = PVals[Pind_sup] / (mI * nu)
# deltaPeak_sup = nPIm_deltaPeak_Vals[Pind_sup]
# PIm_norm_sup = PIm_Vec[Pind_sup] / (mI * nu)
# delta_GB_sup = deltaPeak_sup * GPDF(PIm_norm_sup, Pnorm_sup, sigma)
# # ax_supDist.plot(PIm_norm_sup, delta_GB_sup, linestyle='-', color=delta_color, linewidth=1, label=r'$\delta$-Peak')
# ax_supDist.plot(PIm_norm_sup, delta_GB_sup, linestyle='-', color=delta_color, linewidth=1.0, label='')
# ax_supDist.fill_between(PIm_norm_sup, np.zeros(PIm_norm_sup.size), delta_GB_sup, facecolor=delta_color, alpha=0.25)
# else:
# ax_supDist.plot((PVals[Pind_sup] / (mI * nu)) * np.ones(PIm_Vals.size), np.linspace(0, nPIm_deltaPeak_Vals[Pind_sup], PIm_Vals.size), linestyle='-', color=delta_color, linewidth=1.5, label='Delta Peak (Z-factor)')
# ax_supDist.legend(loc=1, fontsize=legendsize - 3, frameon=False)
# ax_subDist.plot(PIm_Vec[Pind_sub] / (mI * nu), nPIm_Vec[Pind_sub], color=incoh_color, lw=1.0, label='Incoherent Part')
# # ax_subDist.set_xlim([-0.01, np.max(PIm_Vec[Pind_sub] / (mI*nu))])
# ax_subDist.set_xlim([-0.01, 5])
# ax_subDist.set_ylim([0, 1.05])
# ax_subDist.set_ylabel(r'$n_{|\mathbf{P}_{\rm imp}|}$', fontsize=labelsize)
# ax_subDist.set_xlabel(r'$|\mathbf{P}_{\rm imp}|/(m_{I}c)$', fontsize=labelsize)
# ax_subDist.fill_between(PIm_Vec[Pind_sub] / (mI * nu), np.zeros(PIm_Vals.size), nPIm_Vec[Pind_sub], facecolor=incoh_color, alpha=0.25)
# if GaussianBroadening:
# Pnorm_sub = PVals[Pind_sub] / (mI * nu)
# deltaPeak_sub = nPIm_deltaPeak_Vals[Pind_sub]
# PIm_norm_sub = PIm_Vec[Pind_sub] / (mI * nu)
# delta_GB_sub = deltaPeak_sub * GPDF(PIm_norm_sub, Pnorm_sub, sigma)
# print(np.trapz(delta_GB_sub, PIm_norm_sub))
# ax_subDist.plot(PIm_norm_sub, delta_GB_sub, linestyle='-', color=delta_color, linewidth=1.0, label=r'$\delta$-Peak')
# ax_subDist.fill_between(PIm_norm_sub, np.zeros(PIm_norm_sub.size), delta_GB_sub, facecolor=delta_color, alpha=0.25)
# # ax_subDist.axvline(x=Pnorm_sub - 0.05, linestyle='-', color=delta_color, lw=1)
# # ax_subDist.axvline(x=Pnorm_sub + 0.05, linestyle='-', color=delta_color, lw=1)
# else:
# ax_subDist.plot((PVals[Pind_sub] / (mI * nu)) * np.ones(PIm_Vals.size), np.linspace(0, nPIm_deltaPeak_Vals[Pind_sub], PIm_Vals.size), linestyle='-', color=delta_color, linewidth=1, label='Delta Peak (Z-factor)')
# ax_subDist.legend(loc=1, fontsize=legendsize - 3, frameon=False)
# print(deltaPeak_sub, deltaPeak_sup)
# ax_subDist.set_yticks([0.0, 0.5, 1.0])
# ax_supDist.set_yticks([0.0, 0.5, 1.0])
# ax_subDist.tick_params(direction='in', right=True, top=True)
# ax_supDist.tick_params(direction='in', right=True, top=True)
# ax_supDist.yaxis.set_ticklabels([])
# ax_distChar2 = ax_distChar.twinx()
# ax_distChar.tick_params(axis='y', labelcolor=delta_color, direction='in')
# ax_distChar2.tick_params(axis='y', labelcolor=incoh_color, direction='in')
# ax_distChar.tick_params(direction='in', top=True)
# ax_distChar.plot(PVals / (mI * nu), nPIm_deltaPeak_Vals, linestyle='-', color=delta_color, alpha=0.75)
# ax_distChar2.plot(PVals / (mI * nu), nPIm_FWHM_Vals, linestyle='-', color=incoh_color)
# ax_distChar.set_xlim([-0.01, 5])
# ax_distChar.set_xlabel(r'$P/(m_{I}c)$', fontsize=labelsize)
# ax_distChar.set_ylim([-0.05, 1.05])
# ax_distChar.set_yticks([0.0, 0.5, 1.0])
# ax_distChar2.set_ylim([-0.05, 2.05])
# ax_distChar2.set_yticks([0.0, 1.0, 2.0])
# ax_distChar.set_ylabel(r'$\delta$-Peak Magnitude', fontsize=labelsize, color=delta_color, alpha=0.75)
# ax_distChar2.set_ylabel('Incoherent Part FWHM', rotation=270, labelpad=17, fontsize=labelsize, color=incoh_color)
# figSM1.savefig(figdatapath + '/FigSM1_Letter.pdf')
# # # # # # #############################################################################################################################
# # # # # # FIG SM2 - LETTER
# # # # # #############################################################################################################################
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# figSM2 = plt.figure(constrained_layout=False)
# gs1 = figSM2.add_gridspec(nrows=1, ncols=1, bottom=0.16, top=0.93, left=0.1, right=0.45)
# gs2 = figSM2.add_gridspec(nrows=1, ncols=1, bottom=0.16, top=0.93, left=0.6, right=0.98)
# ax_supDist = figSM2.add_subplot(gs2[0])
# ax_subDist = figSM2.add_subplot(gs1[0])
# figSM2.set_size_inches(7.8, 3.5)
# figSM2.text(0.01, 0.94, '(a)', fontsize=labelsize)
# figSM2.text(0.5, 0.94, '(b)', fontsize=labelsize)
# interpdatapath = '/Users/kis/Dropbox/VariationalResearch/HarvardOdyssey/genPol_data/NGridPoints_1.11E+08_resRat_0.50/massRatio=1.0/redyn_spherical/interp'
# zlim = 20
# aIBi = -5
# Pratio_sup = 3.0
# Pratio_sub = 0.52
# tratio = 39.99
# nu = 0.7926654595212022
# xi = 0.8920620580763856
# tscale = xi / nu
# linDimMajor, linDimMinor = (10, 10)
# interp_ds_sup = xr.open_dataset(interpdatapath + '/InterpDat_P_{:.2f}_aIBi_{:.2f}_t_{:.2f}_lDM_{:.2f}_lDm_{:.2f}.nc'.format(Pratio_sup * nu, aIBi, tratio * tscale, linDimMajor, linDimMinor))
# interp_ds_sub = xr.open_dataset(interpdatapath + '/InterpDat_P_{:.2f}_aIBi_{:.2f}_t_{:.2f}_lDM_{:.2f}_lDm_{:.2f}.nc'.format(Pratio_sub * nu, aIBi, tratio * tscale, linDimMajor, linDimMinor))
# n0 = interp_ds_sup.attrs['n0']; gBB = interp_ds_sup.attrs['gBB']; mI = interp_ds_sup.attrs['mI']; mB = interp_ds_sup.attrs['mB']
# nu = np.sqrt(n0 * gBB / mB)
# mc = mI * nu
# aBB = (mB / (4 * np.pi)) * gBB
# xi = (8 * np.pi * n0 * aBB)**(-1 / 2)
# tscale = xi / nu
# P_sup = interp_ds_sup.attrs['P']; Pratio_sup = P_sup / mc
# P_sub = interp_ds_sub.attrs['P']; Pratio_sub = P_sub / mc
# xL = interp_ds_sup['x'].values; yL = interp_ds_sup['y'].values; zL = interp_ds_sup['z'].values
# dx = xL[1] - xL[0]; dy = yL[1] - yL[0]; dz = zL[1] - zL[0]
# na_xz_int_sup = interp_ds_sup['na_xz_int'].values; na_xz_int_norm_sup = na_xz_int_sup / (np.sum(na_xz_int_sup) * dx * dz)
# na_xz_int_sub = interp_ds_sub['na_xz_int'].values; na_xz_int_norm_sub = na_xz_int_sub / (np.sum(na_xz_int_sub) * dx * dz)
# na_z_int_sup = np.sum(na_xz_int_norm_sup, axis=0) * dx
# na_z_int_sub = np.sum(na_xz_int_norm_sub, axis=0) * dx
# ax_supDist.plot(zL / xi, na_z_int_sup, color=red, linestyle='-')
# ax_supDist.set_xlim([-1 * zlim, zlim])
# ax_supDist.set_xlabel(r'$z/\xi$', fontsize=labelsize)
# ax_supDist.set_ylabel(r'$n_{a}(z)$', fontsize=labelsize)
# ax_supDist.set_ylim([0, 0.12])
# ax_subDist.plot(zL / xi, na_z_int_sub, color=red, linestyle='-')
# ax_subDist.set_xlim([-1 * zlim, zlim])
# ax_subDist.set_xlabel(r'$z/\xi$', fontsize=labelsize)
# ax_subDist.set_ylabel(r'$n_{a}(z)$', fontsize=labelsize)
# ax_subDist.set_ylim([0, 0.12])
# ax_supDist.tick_params(direction='in', right=True, top=True)
# ax_subDist.tick_params(direction='in', right=True, top=True)
# from matplotlib.patches import Rectangle
# rect = Rectangle((0.2, 0.0135), 8.3, 0.05, linestyle='dashed', facecolor='None', edgecolor='k')
# ax_supDist.add_patch(rect)
# figSM2.savefig(figdatapath + '/FigSM2_Letter.pdf')
# # # # # # #############################################################################################################################
# # # # # # FIG SM3 - LETTER
# # # # # #############################################################################################################################
# # # # # # #############################################################################################################################
# # # # # # OLD FIGS
# # # # # #############################################################################################################################
# # # # FIG 1 (OLD) - POLARON GRAPHIC + BOGO DISPERSION + PHASE DIAGRAM + DISTRIBUTION PLOTS
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# fig1 = plt.figure(constrained_layout=False)
# gs1 = fig1.add_gridspec(nrows=2, ncols=1, bottom=0.55, top=0.95, left=0.12, right=0.35, height_ratios=[1, 1])
# gs2 = fig1.add_gridspec(nrows=1, ncols=1, bottom=0.55, top=0.95, left=0.5, right=0.98)
# gs3 = fig1.add_gridspec(nrows=1, ncols=2, bottom=0.08, top=0.4, left=0.12, right=0.96, wspace=0.3)
# ax_pol = fig1.add_subplot(gs1[0], frame_on=False); ax_pol.get_xaxis().set_visible(False); ax_pol.get_yaxis().set_visible(False)
# ax_bogo = fig1.add_subplot(gs1[1])
# ax_PD = fig1.add_subplot(gs2[0])
# ax_supDist = fig1.add_subplot(gs3[0])
# ax_subDist = fig1.add_subplot(gs3[1])
# fig1.text(0.01, 0.97, '(a)', fontsize=labelsize)
# fig1.text(0.01, 0.75, '(b)', fontsize=labelsize)
# fig1.text(0.43, 0.97, '(c)', fontsize=labelsize)
# fig1.text(0.01, 0.42, '(d)', fontsize=labelsize)
# fig1.text(0.51, 0.42, '(e)', fontsize=labelsize)
# # POLARON GRAPHIC
# polimg = mpimg.imread('images/PolaronGraphic.png')
# imgplot = ax_pol.imshow(polimg)
# # BOGOLIUBOV DISPERSION (SPHERICAL)
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', qds.coords['k'].values); kgrid.initArray_premade('th', qds.coords['th'].values)
# kVals = kgrid.getArray('k')
# wk_Vals = pfs.omegak(kVals, mB, n0, gBB)
# ax_bogo.plot(kVals, wk_Vals, 'k-', label='')
# ax_bogo.plot(kVals, nu * kVals, 'b--', label=r'$c|k|$')
# ax_bogo.set_xlabel(r'$|k|$', fontsize=labelsize)
# ax_bogo.set_ylabel(r'$\omega_{|k|}$', fontsize=labelsize)
# ax_bogo.set_xlim([0, 2])
# ax_bogo.xaxis.set_major_locator(plt.MaxNLocator(2))
# ax_bogo.set_ylim([0, 3])
# ax_bogo.yaxis.set_major_locator(plt.MaxNLocator(3))
# ax_bogo.legend(loc=2, fontsize=legendsize)
# # PHASE DIAGRAM (SPHERICAL)
# Pcrit = np.zeros(aIBi_Vals.size)
# for aind, aIBi in enumerate(aIBi_Vals):
# qds_aIBi = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# CSAmp_ds = qds_aIBi['Real_CSAmp'] + 1j * qds_aIBi['Imag_CSAmp']
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', CSAmp_ds.coords['k'].values); kgrid.initArray_premade('th', CSAmp_ds.coords['th'].values)
# Energy_Vals_inf = np.zeros(PVals.size)
# for Pind, P in enumerate(PVals):
# CSAmp = CSAmp_ds.sel(P=P).isel(t=-1).values
# Energy_Vals_inf[Pind] = pfs.Energy(CSAmp, kgrid, P, aIBi, mI, mB, n0, gBB)
# Einf_tck = interpolate.splrep(PVals, Energy_Vals_inf, s=0)
# Pinf_Vals = np.linspace(np.min(PVals), np.max(PVals), 2 * PVals.size)
# Einf_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=0)
# Einf_2ndderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=2)
# # Pcrit[aind] = Pinf_Vals[np.argwhere(Einf_2ndderiv_Vals < 0)[-2][0] + 3]
# Pcrit[aind] = Pinf_Vals[np.argmin(np.gradient(Einf_2ndderiv_Vals)) - 0] # there is a little bit of fudging with the -3 here so that aIBi=-10 gives me Pcrit/(mI*c) = 1 -> I can also just generate data for weaker interactions and see if it's better
# Pcrit_norm = Pcrit / (mI * nu)
# Pcrit_tck = interpolate.splrep(aIBi_Vals, Pcrit_norm, s=0, k=3)
# aIBi_interpVals = np.linspace(np.min(aIBi_Vals), np.max(aIBi_Vals), 5 * aIBi_Vals.size)
# Pcrit_interpVals = 1 * interpolate.splev(aIBi_interpVals, Pcrit_tck, der=0)
# print(Pcrit_norm)
# print(Pcrit_norm[1], Pcrit_norm[5], Pcrit_norm[-5])
# scalefac = 1.0
# # scalefac = 0.95 # just to align weakly interacting case slightly to 1 (it's pretty much there, would just need higher resolution data)
# Pcrit_norm = scalefac * Pcrit_norm
# Pcrit_interpVals = scalefac * Pcrit_interpVals
# xmin = np.min(aIBi_interpVals / xi)
# xmax = 1.01 * np.max(aIBi_interpVals / xi)
# ymin = 0
# ymax = 1.01 * np.max(Pcrit_interpVals)
# font = {'family': 'serif', 'color': 'black', 'size': legendsize}
# sfont = {'family': 'serif', 'color': 'black', 'size': legendsize - 1}
# ax_PD.plot(aIBi_Vals / xi, Pcrit_norm, 'kx')
# ax_PD.plot(aIBi_interpVals / xi, Pcrit_interpVals, 'k-')
# # f1 = interpolate.interp1d(aIBi_Vals, Pcrit_norm, kind='cubic')
# # ax_PD.plot(aIBi_interpVals, f1(aIBi_interpVals), 'k-')
# ax_PD.set_xlabel(r'$a_{IB}^{-1}$ [$\xi$]', fontsize=labelsize)
# ax_PD.set_ylabel(r'Total Momentum $P$ [$m_{I}c$]', fontsize=labelsize)
# ax_PD.set_xlim([xmin, xmax])
# ax_PD.set_ylim([ymin, ymax])
# ax_PD.fill_between(aIBi_interpVals / xi, Pcrit_interpVals, ymax, facecolor='b', alpha=0.25)
# ax_PD.fill_between(aIBi_interpVals / xi, ymin, Pcrit_interpVals, facecolor='g', alpha=0.25)
# ax_PD.text(-3.2, ymin + 0.175 * (ymax - ymin), 'Polaron', fontdict=font)
# ax_PD.text(-3.1, ymin + 0.1 * (ymax - ymin), '(' + r'$Z>0$' + ')', fontdict=sfont)
# # ax_PD.text(-6.5, ymin + 0.6 * (ymax - ymin), 'Cherenkov', fontdict=font)
# # ax_PD.text(-6.35, ymin + 0.525 * (ymax - ymin), '(' + r'$Z=0$' + ')', fontdict=sfont)
# ax_PD.text(-12.8, ymin + 0.86 * (ymax - ymin), 'Cherenkov', fontdict=font)
# ax_PD.text(-12.65, ymin + 0.785 * (ymax - ymin), '(' + r'$Z=0$' + ')', fontdict=sfont)
# supDist_coords = [-5.0 / xi, 3.0] # is [aIBi/xi, P/(mI*c)]
# subDist_coords = [-5.0 / xi, 0.5] # is [aIBi/xi, P/(mI*c)]
# ax_PD.plot(supDist_coords[0], supDist_coords[1], linestyle='', marker='8', mec='#8f1402', mfc='#8f1402', ms=10)
# ax_PD.plot(subDist_coords[0], subDist_coords[1], linestyle='', marker='8', mec='#8f1402', mfc='#8f1402', ms=10)
# # IMPURITY DISTRIBUTION (CARTESIAN)
# GaussianBroadening = True; sigma = 0.1
# incoh_color = '#8f1402'
# delta_color = '#bf9005'
# def GPDF(xVals, mean, stdev):
# return (1 / (stdev * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# # return (1 / (1 * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# aIBi = -5
# qds_aIBi = xr.open_dataset(innerdatapath_cart + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# PVals = qds_aIBi['P'].values
# nPIm_FWHM_indices = []
# nPIm_distPeak_index = np.zeros(PVals.size, dtype=int)
# nPIm_FWHM_Vals = np.zeros(PVals.size)
# nPIm_distPeak_Vals = np.zeros(PVals.size)
# nPIm_deltaPeak_Vals = np.zeros(PVals.size)
# nPIm_Tot_Vals = np.zeros(PVals.size)
# nPIm_Vec = np.empty(PVals.size, dtype=np.object)
# PIm_Vec = np.empty(PVals.size, dtype=np.object)
# for ind, P in enumerate(PVals):
# qds_nPIm_inf = qds_aIBi['nPI_mag'].sel(P=P).isel(t=-1).dropna('PI_mag')
# PIm_Vals = qds_nPIm_inf.coords['PI_mag'].values
# dPIm = PIm_Vals[1] - PIm_Vals[0]
# nPIm_Vec[ind] = qds_nPIm_inf.values
# PIm_Vec[ind] = PIm_Vals
# # # Calculate nPIm(t=inf) normalization
# nPIm_Tot_Vals[ind] = np.sum(qds_nPIm_inf.values * dPIm) + qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# # Calculate FWHM, distribution peak, and delta peak
# nPIm_FWHM_Vals[ind] = pfc.FWHM(PIm_Vals, qds_nPIm_inf.values)
# nPIm_distPeak_Vals[ind] = np.max(qds_nPIm_inf.values)
# nPIm_deltaPeak_Vals[ind] = qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# D = qds_nPIm_inf.values - np.max(qds_nPIm_inf.values) / 2
# indices = np.where(D > 0)[0]
# nPIm_FWHM_indices.append((indices[0], indices[-1]))
# nPIm_distPeak_index[ind] = np.argmax(qds_nPIm_inf.values)
# Pnorm = PVals / (mI * nu)
# Pratio_sup = 3.0; Pind_sup = np.abs(Pnorm - Pratio_sup).argmin()
# Pratio_sub = 0.5; Pind_sub = np.abs(Pnorm - Pratio_sub).argmin()
# print(Pnorm[Pind_sup], Pnorm[Pind_sub])
# print(nPIm_deltaPeak_Vals[Pind_sup], nPIm_deltaPeak_Vals[Pind_sub])
# ax_supDist.plot(PIm_Vec[Pind_sup] / (mI * nu), nPIm_Vec[Pind_sup], color=incoh_color, lw=0.5, label='Incoherent Part')
# ax_supDist.set_xlim([-0.01, 10])
# ax_supDist.set_ylim([0, 1.05])
# ax_supDist.set_ylabel(r'$n_{|\vec{P_{I}}|}$', fontsize=labelsize)
# ax_supDist.set_xlabel(r'$|\vec{P_{I}}|/(m_{I}c)$', fontsize=labelsize)
# ax_supDist.fill_between(PIm_Vec[Pind_sup] / (mI * nu), np.zeros(PIm_Vals.size), nPIm_Vec[Pind_sup], facecolor=incoh_color, alpha=0.25)
# if GaussianBroadening:
# Pnorm_sup = PVals[Pind_sup] / (mI * nu)
# deltaPeak_sup = nPIm_deltaPeak_Vals[Pind_sup]
# PIm_norm_sup = PIm_Vec[Pind_sup] / (mI * nu)
# delta_GB_sup = deltaPeak_sup * GPDF(PIm_norm_sup, Pnorm_sup, sigma)
# # ax_supDist.plot(PIm_norm_sup, delta_GB_sup, linestyle='-', color=delta_color, linewidth=1, label=r'$\delta$-Peak')
# ax_supDist.plot(PIm_norm_sup, delta_GB_sup, linestyle='-', color=delta_color, linewidth=1, label='')
# ax_supDist.fill_between(PIm_norm_sup, np.zeros(PIm_norm_sup.size), delta_GB_sup, facecolor=delta_color, alpha=0.25)
# else:
# ax_supDist.plot((PVals[Pind_sup] / (mI * nu)) * np.ones(PIm_Vals.size), np.linspace(0, nPIm_deltaPeak_Vals[Pind_sup], PIm_Vals.size), linestyle='-', color=delta_color, linewidth=1, label='Delta Peak (Z-factor)')
# ax_supDist.legend(loc=1, fontsize=legendsize)
# ax_subDist.plot(PIm_Vec[Pind_sub] / (mI * nu), nPIm_Vec[Pind_sub], color=incoh_color, lw=0.5, label='Incoherent Part')
# # ax_subDist.set_xlim([-0.01, np.max(PIm_Vec[Pind_sub] / (mI*nu))])
# ax_subDist.set_xlim([-0.01, 10])
# ax_subDist.set_ylim([0, 1.05])
# ax_subDist.set_ylabel(r'$n_{|\vec{P_{I}}|}$', fontsize=labelsize)
# ax_subDist.set_xlabel(r'$|\vec{P_{I}}|/(m_{I}c)$', fontsize=labelsize)
# ax_subDist.fill_between(PIm_Vec[Pind_sub] / (mI * nu), np.zeros(PIm_Vals.size), nPIm_Vec[Pind_sub], facecolor=incoh_color, alpha=0.25)
# if GaussianBroadening:
# Pnorm_sub = PVals[Pind_sub] / (mI * nu)
# deltaPeak_sub = nPIm_deltaPeak_Vals[Pind_sub]
# PIm_norm_sub = PIm_Vec[Pind_sub] / (mI * nu)
# delta_GB_sub = deltaPeak_sub * GPDF(PIm_norm_sub, Pnorm_sub, sigma)
# ax_subDist.plot(PIm_norm_sub, delta_GB_sub, linestyle='-', color=delta_color, linewidth=1, label=r'$\delta$-Peak')
# ax_subDist.fill_between(PIm_norm_sub, np.zeros(PIm_norm_sub.size), delta_GB_sub, facecolor=delta_color, alpha=0.25)
# else:
# ax_subDist.plot((PVals[Pind_sub] / (mI * nu)) * np.ones(PIm_Vals.size), np.linspace(0, nPIm_deltaPeak_Vals[Pind_sub], PIm_Vals.size), linestyle='-', color=delta_color, linewidth=1, label='Delta Peak (Z-factor)')
# ax_subDist.legend(loc=1, fontsize=legendsize)
# fig1.set_size_inches(7.8, 9)
# fig1.savefig(figdatapath + '/Fig1.pdf')
# # # # FIG 2 - ENERGY DERIVATIVES + SOUND VELOCITY + EFFECTIVE MASS
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# fig2 = plt.figure(constrained_layout=False)
# # gs1 = fig2.add_gridspec(nrows=3, ncols=1, bottom=0.12, top=0.925, left=0.12, right=0.40, hspace=1.0)
# # gs2 = fig2.add_gridspec(nrows=2, ncols=1, bottom=0.12, top=0.925, left=0.58, right=0.98, hspace=0.7)
# gs1 = fig2.add_gridspec(nrows=3, ncols=1, bottom=0.12, top=0.95, left=0.12, right=0.40, hspace=0.2)
# gs2 = fig2.add_gridspec(nrows=2, ncols=1, bottom=0.12, top=0.95, left=0.58, right=0.98, hspace=0.1)
# ax_GSE0 = fig2.add_subplot(gs1[0])
# ax_GSE1 = fig2.add_subplot(gs1[1])
# ax_GSE2 = fig2.add_subplot(gs1[2])
# ax_Vel = fig2.add_subplot(gs2[0])
# ax_Mass = fig2.add_subplot(gs2[1])
# # fig2.text(0.01, 0.95, '(a)', fontsize=labelsize)
# # fig2.text(0.01, 0.65, '(b)', fontsize=labelsize)
# # fig2.text(0.01, 0.32, '(c)', fontsize=labelsize)
# # fig2.text(0.47, 0.95, '(d)', fontsize=labelsize)
# # fig2.text(0.47, 0.47, '(e)', fontsize=labelsize)
# fig2.text(0.01, 0.95, '(a)', fontsize=labelsize)
# fig2.text(0.01, 0.65, '(b)', fontsize=labelsize)
# fig2.text(0.01, 0.37, '(c)', fontsize=labelsize)
# fig2.text(0.47, 0.95, '(d)', fontsize=labelsize)
# fig2.text(0.47, 0.52, '(e)', fontsize=labelsize)
# # # ENERGY DERIVATIVES (SPHERICAL)
# aIBi = -5
# qds_aIBi = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# PVals = qds_aIBi['P'].values
# print(aIBi * xi)
# CSAmp_ds = qds_aIBi['Real_CSAmp'] + 1j * qds_aIBi['Imag_CSAmp']
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', CSAmp_ds.coords['k'].values); kgrid.initArray_premade('th', CSAmp_ds.coords['th'].values)
# Energy_Vals = np.zeros((PVals.size, tVals.size))
# for Pind, P in enumerate(PVals):
# for tind, t in enumerate(tVals):
# CSAmp = CSAmp_ds.sel(P=P, t=t).values
# Energy_Vals[Pind, tind] = pfs.Energy(CSAmp, kgrid, P, aIBi, mI, mB, n0, gBB)
# Energy_Vals_inf = Energy_Vals[:, -1]
# Einf_tck = interpolate.splrep(PVals, Energy_Vals_inf, s=0)
# Pinf_Vals = np.linspace(np.min(PVals), np.max(PVals), 5 * PVals.size)
# Einf_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=0)
# Einf_1stderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=1)
# Einf_2ndderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=2)
# sound_mask = np.abs(Einf_2ndderiv_Vals) <= 5e-3
# Einf_sound = Einf_Vals[sound_mask]
# Pinf_sound = Pinf_Vals[sound_mask]
# [vsound, vs_const] = np.polyfit(Pinf_sound, Einf_sound, deg=1)
# ms_mask = Pinf_Vals <= 0.5
# Einf_1stderiv_ms = Einf_1stderiv_Vals[ms_mask]
# Pinf_ms = Pinf_Vals[ms_mask]
# [ms, ms_const] = np.polyfit(Pinf_ms, Einf_1stderiv_ms, deg=1)
# Ecrit = Einf_Vals[np.argmin(np.gradient(Einf_2ndderiv_Vals))]
# # ax_GSE0.plot(Pinf_Vals / (mI * nu), Einf_Vals / np.abs(Ecrit), 'k-', lw=1.5)
# ax_GSE0.plot(Pinf_Vals[::2] / (mI * nu), Einf_Vals[::2] / np.abs(Ecrit), 'ko', ms=6)
# # ax_GSE0.set_title('Ground State Energy (' + r'$a_{IB}^{-1}=$' + '{0})'.format(aIBi))
# # ax_GSE0.set_xlabel(r'$P$ [$m_{I}c$]', fontsize=labelsize)
# ax_GSE0.set_ylabel(r'$E$', fontsize=labelsize)
# ax_GSE0.set_ylim([1.1 * np.min(Einf_Vals / np.abs(Ecrit)), -0.5 / np.abs(Ecrit)])
# ax_GSE0.set_xlim([0, 2.0])
# # ax_GSE1.plot(Pinf_Vals / (mI * nu), Einf_1stderiv_Vals / np.abs(Ecrit), 'k-', lw=1.5)
# ax_GSE1.plot(Pinf_Vals[::2] / (mI * nu), Einf_1stderiv_Vals[::2] / np.abs(Ecrit), 'ko', ms=6)
# # ax_GSE1.set_title('First Derivative of Energy')
# # ax_GSE1.set_xlabel(r'$P$ [$m_{I}c$]', fontsize=labelsize)
# ax_GSE1.set_ylabel(r'$dE/dP$', fontsize=labelsize)
# ax_GSE1.plot(Pinf_Vals / (mI * nu), vsound * np.ones(Pinf_Vals.size) / np.abs(Ecrit), color=red, linestyle='--', linewidth=2.0)
# ax_GSE1.set_ylim([0, 1.2 * np.max(Einf_1stderiv_Vals / np.abs(Ecrit))])
# ax_GSE1.set_xlim([0, 2.0])
# # ax_GSE2.plot(Pinf_Vals / (mI * nu), Einf_2ndderiv_Vals / np.abs(Ecrit), 'k-', lw=1.5)
# ax_GSE2.plot(Pinf_Vals[::2] / (mI * nu), Einf_2ndderiv_Vals[::2] / np.abs(Ecrit), 'ko', ms=6)
# # ax_GSE2.set_title('Second Derivative of Energy')
# ax_GSE2.set_xlabel(r'$P/(m_{I}c)$', fontsize=labelsize)
# ax_GSE2.set_ylabel(r'$d^{2}E/dP^{2}$', fontsize=labelsize)
# ax_GSE2.plot(Pinf_Vals / (mI * nu), ms * np.ones(Pinf_Vals.size) / np.abs(Ecrit), color=blue, linestyle='--', linewidth=2.0)
# ax_GSE2.set_ylim([-.12, 1.2 * np.max(Einf_2ndderiv_Vals / np.abs(Ecrit))])
# ax_GSE2.set_xlim([0, 2.0])
# # including a Pcrit line
# Pcrit = Pinf_Vals[np.argmin(np.gradient(Einf_2ndderiv_Vals)) - 0]
# # Pcrit_2 = Pinf_Vals[sound_mask][0]; print(Pcrit, Pcrit_2)
# ax_GSE0.axvline(x=Pcrit / (mI * nu), linestyle=':', color=green, lw=2)
# ax_GSE1.axvline(x=Pcrit / (mI * nu), linestyle=':', color=green, lw=2)
# ax_GSE2.axvline(x=Pcrit / (mI * nu), linestyle=':', color=green, lw=2)
# # # POLARON SOUND VELOCITY (SPHERICAL)
# # Check to see if linear part of polaron (total system) energy spectrum has slope equal to sound velocity
# vsound_Vals = np.zeros(aIBi_Vals.size)
# vI_Vals = np.zeros(aIBi_Vals.size)
# for aind, aIBi in enumerate(aIBi_Vals):
# qds = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# qds_aIBi = qds.isel(t=-1)
# CSAmp_ds = qds_aIBi['Real_CSAmp'] + 1j * qds_aIBi['Imag_CSAmp']
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', CSAmp_ds.coords['k'].values); kgrid.initArray_premade('th', CSAmp_ds.coords['th'].values)
# Energy_Vals_inf = np.zeros(PVals.size)
# PI_Vals = np.zeros(PVals.size)
# for Pind, P in enumerate(PVals):
# CSAmp = CSAmp_ds.sel(P=P).values
# Energy_Vals_inf[Pind] = pfs.Energy(CSAmp, kgrid, P, aIBi, mI, mB, n0, gBB)
# PI_Vals[Pind] = P - qds_aIBi.sel(P=P)['Pph'].values
# Einf_tck = interpolate.splrep(PVals, Energy_Vals_inf, s=0)
# Pinf_Vals = np.linspace(np.min(PVals), np.max(PVals), 2 * PVals.size)
# Einf_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=0)
# Einf_2ndderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=2)
# sound_mask = np.abs(Einf_2ndderiv_Vals) <= 5e-3
# Einf_sound = Einf_Vals[sound_mask]
# Pinf_sound = Pinf_Vals[sound_mask]
# [vsound_Vals[aind], vs_const] = np.polyfit(Pinf_sound, Einf_sound, deg=1)
# vI_inf_tck = interpolate.splrep(PVals, PI_Vals / mI, s=0)
# vI_inf_Vals = 1 * interpolate.splev(Pinf_Vals, vI_inf_tck, der=0)
# vI_Vals[aind] = np.polyfit(Pinf_sound, vI_inf_Vals[sound_mask], deg=0)
# print(vsound_Vals)
# print(100 * (vsound_Vals - nu) / nu)
# ax_Vel.plot(aIBi_Vals * xi, vsound_Vals / nu, linestyle='None', mec=red, mfc=red, marker='x', mew=1, ms=10, label='Polaron')
# ax_Vel.plot(aIBi_Vals * xi, vI_Vals / nu, 'ko', mew=1, ms=10, markerfacecolor='none', label='Impurity')
# ax_Vel.plot(aIBi_Vals * xi, np.ones(aIBi_Vals.size), color='grey', linestyle='dashdot', linewidth=2.0, label='$c$')
# ax_Vel.set_ylim([0.5, 1.25])
# # ax_Vel.set_ylim([0.8, 1.25])
# ax_Vel.legend(loc=(0.25, 0.1), fontsize=legendsize)
# # ax_Vel.set_xlabel(r'$a_{IB}^{-1}$ [$\xi$]', fontsize=labelsize)
# ax_Vel.set_ylabel(r'Velocity', fontsize=labelsize)
# # # POLARON EFFECTIVE MASS (SPHERICAL)
# ms_Vals = np.zeros(aIBi_Vals.size)
# for aind, aIBi in enumerate(aIBi_Vals):
# qds = xr.open_dataset(innerdatapath + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# qds_aIBi = qds.isel(t=-1)
# CSAmp_ds = qds_aIBi['Real_CSAmp'] + 1j * qds_aIBi['Imag_CSAmp']
# kgrid = Grid.Grid("SPHERICAL_2D"); kgrid.initArray_premade('k', CSAmp_ds.coords['k'].values); kgrid.initArray_premade('th', CSAmp_ds.coords['th'].values)
# Energy_Vals_inf = np.zeros(PVals.size)
# PI_Vals = np.zeros(PVals.size)
# for Pind, P in enumerate(PVals):
# CSAmp = CSAmp_ds.sel(P=P).values
# Energy_Vals_inf[Pind] = pfs.Energy(CSAmp, kgrid, P, aIBi, mI, mB, n0, gBB)
# PI_Vals[Pind] = P - qds_aIBi.sel(P=P)['Pph'].values
# Einf_tck = interpolate.splrep(PVals, Energy_Vals_inf, s=0)
# Pinf_Vals = np.linspace(np.min(PVals), np.max(PVals), 2 * PVals.size)
# Einf_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=0)
# Einf_1stderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=1)
# Einf_2ndderiv_Vals = 1 * interpolate.splev(Pinf_Vals, Einf_tck, der=2)
# ms_mask = Pinf_Vals < 0.3
# Einf_1stderiv_ms = Einf_1stderiv_Vals[ms_mask]
# Pinf_ms = Pinf_Vals[ms_mask]
# [ms_Vals[aind], ms_const] = np.polyfit(Pinf_ms, Einf_1stderiv_ms, deg=1)
# massEnhancement_Vals = (1 / ms_Vals) / mI
# mE_tck = interpolate.splrep(aIBi_Vals, massEnhancement_Vals, s=0)
# aIBi_interpVals = np.linspace(np.min(aIBi_Vals), np.max(aIBi_Vals), 5 * aIBi_Vals.size)
# mE_interpVals = 1 * interpolate.splev(aIBi_interpVals, mE_tck, der=0)
# ax_Mass.plot(aIBi_Vals * xi, massEnhancement_Vals, linestyle='None', marker='D', mec=blue, mfc=blue, mew=1, ms=5)
# ax_Mass.plot(aIBi_interpVals * xi, mE_interpVals, color=blue, linestyle='-')
# ax_Mass.set_xlabel(r'$a_{\rm IB}^{-1}/\xi^{-1}$', fontsize=labelsize)
# # ax_Mass.set_ylabel(r'$\frac{m^{*}}{m_{I}} = \frac{1}{m_{I}}\frac{\partial^{2} E}{\partial P^{2}}$')
# ax_Mass.set_ylabel(r'Effective Mass', fontsize=labelsize)
# ax_GSE0.xaxis.set_ticklabels([])
# ax_GSE1.xaxis.set_ticklabels([])
# ax_Vel.xaxis.set_ticklabels([])
# ax_GSE0.set_xticks([0.0, 1.0, 2.0])
# ax_GSE1.set_xticks([0.0, 1.0, 2.0])
# ax_GSE2.set_xticks([0.0, 1.0, 2.0])
# ax_GSE0.tick_params(direction='in', right=True, top=True)
# ax_GSE1.tick_params(direction='in', right=True, top=True)
# ax_GSE2.tick_params(direction='in', right=True, top=True)
# ax_Vel.tick_params(direction='in', right=True, top=True)
# ax_Mass.tick_params(direction='in', right=True, top=True)
# vel_coords = [2, vsound / np.abs(Ecrit)]
# effM_coords = [2, ms / np.abs(Ecrit)]
# con_vel = ConnectionPatch(xyA=(vel_coords[0], vel_coords[1]), xyB=(-11, 1.0), coordsA="data", coordsB="data", axesA=ax_GSE1, axesB=ax_Vel, color=red, linestyle='dashed', lw=0.5)
# con_effM = ConnectionPatch(xyA=(effM_coords[0], effM_coords[1]), xyB=(-11, 1.92), coordsA="data", coordsB="data", axesA=ax_GSE2, axesB=ax_Mass, color=blue, linestyle='dashed', lw=0.5)
# ax_GSE1.add_artist(con_vel)
# ax_GSE2.add_artist(con_effM)
# fig2.set_size_inches(7.8, 5.0)
# fig2.savefig(figdatapath + '/Fig2.pdf')
# # FIG 3 - IMPURITY DISTRIBUTION WITH CHARACTERIZATION (CARTESIAN)
# matplotlib.rcParams.update({'font.size': 12})
# labelsize = 13
# legendsize = 12
# GaussianBroadening = True; sigma = 0.1
# incoh_color = green
# delta_color = base02
# fwhm_color = red
# def GPDF(xVals, mean, stdev):
# return (1 / (stdev * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# # return (1 / (1 * np.sqrt(2 * np.pi))) * np.exp(-0.5 * ((xVals - mean) / stdev)**2)
# aIBi = -2
# print('int: {0}'.format(aIBi * xi))
# qds_aIBi = xr.open_dataset(innerdatapath_cart + '/quench_Dataset_aIBi_{:.2f}.nc'.format(aIBi))
# PVals = qds_aIBi['P'].values
# nPIm_FWHM_indices = []
# nPIm_distPeak_index = np.zeros(PVals.size, dtype=int)
# nPIm_FWHM_Vals = np.zeros(PVals.size)
# nPIm_distPeak_Vals = np.zeros(PVals.size)
# nPIm_deltaPeak_Vals = np.zeros(PVals.size)
# nPIm_Tot_Vals = np.zeros(PVals.size)
# nPIm_Vec = np.empty(PVals.size, dtype=np.object)
# PIm_Vec = np.empty(PVals.size, dtype=np.object)
# for ind, P in enumerate(PVals):
# qds_nPIm_inf = qds_aIBi['nPI_mag'].sel(P=P).isel(t=-1).dropna('PI_mag')
# PIm_Vals = qds_nPIm_inf.coords['PI_mag'].values
# dPIm = PIm_Vals[1] - PIm_Vals[0]
# # # Plot nPIm(t=inf)
# # qds_nPIm_inf.plot(ax=ax, label='P: {:.1f}'.format(P))
# nPIm_Vec[ind] = qds_nPIm_inf.values
# PIm_Vec[ind] = PIm_Vals
# # # Calculate nPIm(t=inf) normalization
# nPIm_Tot_Vals[ind] = np.sum(qds_nPIm_inf.values * dPIm) + qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# # Calculate FWHM, distribution peak, and delta peak
# nPIm_FWHM_Vals[ind] = pfc.FWHM(PIm_Vals, qds_nPIm_inf.values)
# nPIm_distPeak_Vals[ind] = np.max(qds_nPIm_inf.values)
# nPIm_deltaPeak_Vals[ind] = qds_aIBi.sel(P=P).isel(t=-1)['mom_deltapeak'].values
# D = qds_nPIm_inf.values - np.max(qds_nPIm_inf.values) / 2
# indices = np.where(D > 0)[0]
# nPIm_FWHM_indices.append((indices[0], indices[-1]))
# nPIm_distPeak_index[ind] = np.argmax(qds_nPIm_inf.values)
# Pratio = 1.4
# Pnorm = PVals / (mI * nu)
# Pind = np.abs(Pnorm - Pratio).argmin()
# print(Pnorm[Pind], aIBi / xi)
# print(nPIm_deltaPeak_Vals[Pind])
# fig3, axes3 = plt.subplots(nrows=1, ncols=3)
# ind_s, ind_f = nPIm_FWHM_indices[Pind]
# ind_f = ind_f - 1 # this is just to make the FWHM marker on the plot look a little cleaner
# axes3[0].plot(PIm_Vec[Pind] / (mI * nu), nPIm_Vec[Pind], color=incoh_color, lw=1.0, label='Incoherent Part')
# axes3[0].set_xlim([-0.01, 10])
# axes3[0].set_ylim([0, 1.05])
# axes3[0].set_ylabel(r'$n_{|\mathbf{P}_{\rm imp}|}$', fontsize=labelsize)
# axes3[0].set_xlabel(r'$|\mathbf{P}_{\rm imp}|/(m_{I}c)$', fontsize=labelsize)
# axes3[0].fill_between(PIm_Vec[Pind] / (mI * nu), np.zeros(PIm_Vals.size), nPIm_Vec[Pind], facecolor=incoh_color, alpha=0.25)
# if GaussianBroadening:
# Pnorm = PVals[Pind] / (mI * nu)
# deltaPeak = nPIm_deltaPeak_Vals[Pind]
# PIm_norm = PIm_Vec[Pind] / (mI * nu)
# delta_GB = deltaPeak * GPDF(PIm_norm, Pnorm, sigma)
# axes3[0].plot(PIm_norm, delta_GB, linestyle='-', color=delta_color, linewidth=1, label='Delta Peak')
# axes3[0].fill_between(PIm_norm, np.zeros(PIm_norm.size), delta_GB, facecolor=delta_color, alpha=0.25)
# else:
# axes3[0].plot((PVals[Pind] / (mI * nu)) * np.ones(PIm_Vals.size), np.linspace(0, nPIm_deltaPeak_Vals[Pind], PIm_Vals.size), linestyle='-', color=delta_color, linewidth=1, label='Delta Peak Weight (Z-factor)')
# # axes3[0].legend(loc=1, fontsize=legendsize)
# axes3[0].plot(np.linspace(PIm_Vec[Pind][ind_s] / (mI * nu), PIm_Vec[Pind][ind_f] / (mI * nu), 100), nPIm_Vec[Pind][ind_s] * np.ones(100), linestyle='-', color=fwhm_color, linewidth=2.0, label='Incoherent Part FWHM')
# axes3[0].plot(np.linspace(PIm_Vec[Pind][ind_s] / (mI * nu), PIm_Vec[Pind][ind_f] / (mI * nu), 2), nPIm_Vec[Pind][ind_s] * np.ones(2), marker='D', color=fwhm_color, mew=0.5, ms=4, label='')
# axes3[1].plot(PVals / (mI * nu), nPIm_deltaPeak_Vals, linestyle='-', color=delta_color)
# axes3[1].set_xlabel(r'$P/(m_{I}c)$', fontsize=labelsize)
# axes3[1].set_ylabel(r'Quasiparticle Residue ($Z$)', fontsize=labelsize)
# axes3[2].plot(PVals / (mI * nu), nPIm_FWHM_Vals, linestyle='-', color=fwhm_color)
# axes3[2].set_xlabel(r'$P/(m_{I}c)$', fontsize=labelsize)
# axes3[2].set_ylabel('Incoherent Part FWHM', fontsize=labelsize)
# axes3[2].set_ylim([0.5, 2.5])
# axes3[2].yaxis.set_major_locator(plt.MaxNLocator(4))
# axes3[0].tick_params(direction='in', right=True, top=True)
# axes3[1].tick_params(direction='in', right=True, top=True)
# axes3[2].tick_params(direction='in', right=True, top=True)
# fig3.text(0.01, 0.95, '(a)', fontsize=labelsize)
# fig3.text(0.33, 0.95, '(b)', fontsize=labelsize)
# fig3.text(0.66, 0.95, '(c)', fontsize=labelsize)
# fig3.subplots_adjust(left=0.1, bottom=0.17, top=0.91, right=0.98, wspace=0.6)
# fig3.set_size_inches(7.8, 3.5)
# fig3.savefig(figdatapath + '/Fig3.pdf')
# # plt.show()
| 51.332469
| 257
| 0.626985
| 11,850
| 79,206
| 3.980675
| 0.063207
| 0.029912
| 0.010939
| 0.014585
| 0.803354
| 0.763584
| 0.728689
| 0.703313
| 0.678213
| 0.646435
| 0
| 0.041277
| 0.18669
| 79,206
| 1,542
| 258
| 51.365759
| 0.690976
| 0.851135
| 0
| 0.027027
| 0
| 0.013514
| 0.072165
| 0.024592
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.27027
| 0
| 0.27027
| 0.027027
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
7e3819a044cb8584161c27f50d05ce5285d87d92
| 84
|
py
|
Python
|
org.beerware.empty.app/assets/axp.py
|
pmp-p/projects
|
e958ef2c6d89d0d818086d4c88668d46044ace14
|
[
"MIT"
] | null | null | null |
org.beerware.empty.app/assets/axp.py
|
pmp-p/projects
|
e958ef2c6d89d0d818086d4c88668d46044ace14
|
[
"MIT"
] | 3
|
2020-11-01T18:54:24.000Z
|
2020-11-15T03:59:34.000Z
|
org.beerware.empty.app/assets/axp.py
|
pmp-p/projects
|
e958ef2c6d89d0d818086d4c88668d46044ace14
|
[
"MIT"
] | null | null | null |
from android import *
print(widget.Button)
from android.widget import TextView
| 9.333333
| 35
| 0.77381
| 11
| 84
| 5.909091
| 0.636364
| 0.338462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 84
| 8
| 36
| 10.5
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 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
| 0
|
0
| 6
|
7e3f28a79344a9233183603246e2d32fc400d428
| 141
|
py
|
Python
|
holobot/extensions/crypto/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 1
|
2021-05-24T00:17:46.000Z
|
2021-05-24T00:17:46.000Z
|
holobot/extensions/crypto/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 41
|
2021-03-24T22:50:09.000Z
|
2021-12-17T12:15:13.000Z
|
holobot/extensions/crypto/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | null | null | null |
from .alert_manager_interface import AlertManagerInterface
from .alert_manager import AlertManager
from .crypto_updater import CryptoUpdater
| 35.25
| 58
| 0.893617
| 16
| 141
| 7.625
| 0.625
| 0.147541
| 0.262295
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085106
| 141
| 3
| 59
| 47
| 0.945736
| 0
| 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
| 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
| 6
|
7e95766c342499bfa038fc67107c66bd872341ac
| 24
|
py
|
Python
|
src/models/__init__.py
|
WorqHat/Stanford-MRnet-Challenge
|
0a8a7438f55503307d5b6b0ddaaa3c50fa4d692b
|
[
"MIT"
] | 1
|
2021-06-27T18:22:57.000Z
|
2021-06-27T18:22:57.000Z
|
src/models/__init__.py
|
WorqHat/Stanford-MRnet-Challenge
|
0a8a7438f55503307d5b6b0ddaaa3c50fa4d692b
|
[
"MIT"
] | null | null | null |
src/models/__init__.py
|
WorqHat/Stanford-MRnet-Challenge
|
0a8a7438f55503307d5b6b0ddaaa3c50fa4d692b
|
[
"MIT"
] | 2
|
2020-05-28T07:30:39.000Z
|
2021-06-27T18:22:59.000Z
|
from .MRnet import MRnet
| 24
| 24
| 0.833333
| 4
| 24
| 5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 24
| 1
| 24
| 24
| 0.952381
| 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
| 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
| 6
|
7ec9f217b2ef0eef366902d1d8043f6411d178a9
| 143
|
py
|
Python
|
_longname.py
|
michaelshumshum/kahoot-annoyer
|
a4f35e6ac6e54390815164fc9d81e28d8c301057
|
[
"MIT"
] | 4
|
2021-02-20T10:55:33.000Z
|
2021-09-25T06:20:16.000Z
|
_longname.py
|
michaelshumshum/kahoot-annoyer
|
a4f35e6ac6e54390815164fc9d81e28d8c301057
|
[
"MIT"
] | 7
|
2021-01-07T13:57:21.000Z
|
2021-09-30T06:28:15.000Z
|
_longname.py
|
michaelshumshum/kahoot-annoyer
|
a4f35e6ac6e54390815164fc9d81e28d8c301057
|
[
"MIT"
] | 5
|
2021-01-19T12:27:49.000Z
|
2021-09-23T12:29:44.000Z
|
from random import randint
def longname():
return ''.join(chr(randint(0,143859)) for i in range(10000)).encode('utf-8','ignore').decode()
| 28.6
| 98
| 0.692308
| 22
| 143
| 4.5
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103175
| 0.118881
| 143
| 4
| 99
| 35.75
| 0.68254
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 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
| 0
| 0
|
0
| 6
|
7edaeae2fc38a800bb95865424b3192bce1ad4c5
| 96
|
py
|
Python
|
cubes/query/__init__.py
|
digitalsatori/cubes
|
140133e8c2e3f2ff60631cc3ebc9966d16c1655e
|
[
"MIT"
] | 1,020
|
2015-01-02T03:05:26.000Z
|
2022-02-12T18:48:51.000Z
|
cubes/query/__init__.py
|
digitalsatori/cubes
|
140133e8c2e3f2ff60631cc3ebc9966d16c1655e
|
[
"MIT"
] | 259
|
2015-01-02T22:35:14.000Z
|
2021-09-02T04:20:41.000Z
|
cubes/query/__init__.py
|
digitalsatori/cubes
|
140133e8c2e3f2ff60631cc3ebc9966d16c1655e
|
[
"MIT"
] | 288
|
2015-01-08T00:42:26.000Z
|
2022-03-31T17:25:10.000Z
|
from .browser import *
from .cells import *
from .computation import *
from .statutils import *
| 19.2
| 26
| 0.75
| 12
| 96
| 6
| 0.5
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 96
| 4
| 27
| 24
| 0.9
| 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
| 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
| 6
|
7d17c5d4335dc7c37aaf77acd240d8436fc7dcc4
| 69
|
py
|
Python
|
sample/core.py
|
trs319843/mypackage
|
cdcefaac5635805a577c26bea8e3437dc3f7e049
|
[
"MIT"
] | null | null | null |
sample/core.py
|
trs319843/mypackage
|
cdcefaac5635805a577c26bea8e3437dc3f7e049
|
[
"MIT"
] | null | null | null |
sample/core.py
|
trs319843/mypackage
|
cdcefaac5635805a577c26bea8e3437dc3f7e049
|
[
"MIT"
] | null | null | null |
# sample\core.py
def run_core():
print("In pycharm run_core")
| 9.857143
| 32
| 0.652174
| 11
| 69
| 3.909091
| 0.727273
| 0.325581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202899
| 69
| 6
| 33
| 11.5
| 0.781818
| 0.202899
| 0
| 0
| 0
| 0
| 0.365385
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0.5
| 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
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 6
|
ada57bfdb85d2618a08b453ff23946dc9309abc3
| 54,652
|
py
|
Python
|
tests/main/views/test_agreements.py
|
uk-gov-mirror/alphagov.digitalmarketplace-api
|
5a1db63691d0c4a435714837196ab6914badaf62
|
[
"MIT"
] | 25
|
2015-01-14T10:45:13.000Z
|
2021-05-26T17:21:41.000Z
|
tests/main/views/test_agreements.py
|
uk-gov-mirror/alphagov.digitalmarketplace-api
|
5a1db63691d0c4a435714837196ab6914badaf62
|
[
"MIT"
] | 641
|
2015-01-15T11:10:50.000Z
|
2021-06-15T22:18:42.000Z
|
tests/main/views/test_agreements.py
|
uk-gov-mirror/alphagov.digitalmarketplace-api
|
5a1db63691d0c4a435714837196ab6914badaf62
|
[
"MIT"
] | 22
|
2015-06-13T15:37:45.000Z
|
2021-08-19T23:40:49.000Z
|
import json
from datetime import datetime
from freezegun import freeze_time
from app.models import AuditEvent, db, Framework, FrameworkAgreement, User
from tests.helpers import fixture_params
from tests.bases import BaseApplicationTest
class BaseFrameworkAgreementTest(BaseApplicationTest):
def create_agreement(self, supplier_framework, **framework_agreement_kwargs):
framework = Framework.query.filter(Framework.slug == supplier_framework['frameworkSlug']).first()
agreement = FrameworkAgreement(
supplier_id=supplier_framework['supplierId'],
framework_id=framework.id,
**framework_agreement_kwargs)
db.session.add(agreement)
db.session.commit()
return agreement.id
class TestCreateFrameworkAgreement(BaseApplicationTest):
def post_create_agreement(self, supplier_id=None, framework_slug=None):
agreement_data = {}
if supplier_id:
agreement_data['supplierId'] = supplier_id
if framework_slug:
agreement_data['frameworkSlug'] = framework_slug
return self.client.post(
'/agreements',
data=json.dumps(
{
'updated_by': 'interested@example.com',
'agreement': agreement_data
}),
content_type='application/json')
def test_can_create_framework_agreement(self, supplier_framework):
res = self.post_create_agreement(
supplier_id=supplier_framework['supplierId'],
framework_slug=supplier_framework['frameworkSlug']
)
assert res.status_code == 201
res_agreement_json = json.loads(res.get_data(as_text=True))['agreement']
assert res_agreement_json['id'] > 0
assert res_agreement_json['supplierId'] == supplier_framework['supplierId']
assert res_agreement_json['frameworkSlug'] == supplier_framework['frameworkSlug']
assert res_agreement_json['status'] == 'draft'
res2 = self.client.get('/agreements/{}'.format(res_agreement_json['id']))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == res_agreement_json
def test_create_framework_agreement_makes_an_audit_event(self, supplier_framework):
res = self.post_create_agreement(
supplier_id=supplier_framework['supplierId'],
framework_slug=supplier_framework['frameworkSlug']
)
assert res.status_code == 201
agreement_id = json.loads(res.get_data(as_text=True))['agreement']['id']
agreement = FrameworkAgreement.query.filter(
FrameworkAgreement.id == agreement_id
).first()
audit = AuditEvent.query.filter(
AuditEvent.object == agreement
).first()
assert audit.type == "create_agreement"
assert audit.user == "interested@example.com"
assert audit.data == {
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug']
}
def test_404_if_creating_framework_agreement_with_no_supplier_framework(self, supplier_framework):
res = self.post_create_agreement(
supplier_id=7,
framework_slug='dos'
)
assert res.status_code == 404
assert json.loads(res.get_data(as_text=True))['error'] == "supplier_id '7' is not on framework 'dos'"
@fixture_params('supplier_framework', {'on_framework': False})
def test_404_if_creating_framework_agreement_with_supplier_framework_not_on_framework(self, supplier_framework):
res = self.post_create_agreement(
supplier_id=supplier_framework['supplierId'],
framework_slug=supplier_framework['frameworkSlug']
)
assert res.status_code == 404
assert (
json.loads(res.get_data(as_text=True))['error'] ==
"supplier_id '{}' is not on framework '{}'".format(
supplier_framework['supplierId'], supplier_framework['frameworkSlug']
)
)
def test_can_not_create_framework_agreement_if_no_supplier_id_provided(self, supplier_framework):
res = self.post_create_agreement(
framework_slug=supplier_framework['frameworkSlug']
)
assert res.status_code == 400
assert (
json.loads(res.get_data(as_text=True))['error'] ==
"Invalid JSON must have 'supplierId' keys"
)
def test_can_not_create_framework_agreement_if_no_framework_slug_provided(self, supplier_framework):
res = self.post_create_agreement(
supplier_id=supplier_framework['supplierId']
)
assert res.status_code == 400
assert (
json.loads(res.get_data(as_text=True))['error'] ==
"Invalid JSON must have 'frameworkSlug' keys"
)
class TestGetFrameworkAgreement(BaseFrameworkAgreementTest):
def test_it_gets_a_newly_created_framework_agreement_by_id(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework
)
res = self.client.get('/agreements/{}'.format(agreement_id))
assert res.status_code == 200
assert json.loads(res.get_data(as_text=True))['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'draft'
}
def test_it_returns_a_framework_agreement_with_details_only(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={'details': 'here'}
)
res = self.client.get('/agreements/{}'.format(agreement_id))
assert res.status_code == 200
assert json.loads(res.get_data(as_text=True))['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'signedAgreementDetails': {'details': 'here'},
'status': 'draft'
}
def test_it_gets_a_signed_framework_agreement_by_id(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
signed_agreement_details={'details': 'here'},
signed_agreement_path='path'
)
res = self.client.get('/agreements/{}'.format(agreement_id))
assert res.status_code == 200
assert json.loads(res.get_data(as_text=True))['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'signed',
'signedAgreementDetails': {'details': 'here'},
'signedAgreementPath': 'path',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
}
def test_it_gets_an_on_hold_framework_agreement_by_id(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
signed_agreement_details={'details': 'here'},
signed_agreement_path='path',
signed_agreement_put_on_hold_at=datetime(2016, 11, 1, 1, 1, 1),
)
res = self.client.get('/agreements/{}'.format(agreement_id))
assert res.status_code == 200
assert json.loads(res.get_data(as_text=True))['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'on-hold',
'signedAgreementDetails': {'details': 'here'},
'signedAgreementPath': 'path',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'signedAgreementPutOnHoldAt': '2016-11-01T01:01:01.000000Z',
}
def test_it_gets_an_approved_framework_agreement_by_id(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
signed_agreement_details={'details': 'here'},
signed_agreement_path='path',
countersigned_agreement_details={'countersigneddetails': 'here'},
countersigned_agreement_returned_at=datetime(2016, 11, 1, 1, 1, 1),
)
res = self.client.get('/agreements/{}'.format(agreement_id))
assert res.status_code == 200
assert json.loads(res.get_data(as_text=True))['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved',
'signedAgreementDetails': {'details': 'here'},
'signedAgreementPath': 'path',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'countersignedAgreementDetails': {'countersigneddetails': 'here'},
'countersignedAgreementReturnedAt': '2016-11-01T01:01:01.000000Z',
}
def test_it_gets_a_countersigned_framework_agreement_by_id(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
signed_agreement_details={'details': 'here'},
signed_agreement_path='path',
countersigned_agreement_details={'countersigneddetails': 'here'},
countersigned_agreement_returned_at=datetime(2016, 11, 1, 1, 1, 1),
countersigned_agreement_path='path'
)
res = self.client.get('/agreements/{}'.format(agreement_id))
assert res.status_code == 200
assert json.loads(res.get_data(as_text=True))['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'countersigned',
'signedAgreementDetails': {'details': 'here'},
'signedAgreementPath': 'path',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'countersignedAgreementDetails': {'countersigneddetails': 'here'},
'countersignedAgreementReturnedAt': '2016-11-01T01:01:01.000000Z',
'countersignedAgreementPath': 'path'
}
def test_it_gets_a_countersigned_and_uploaded_framework_agreement_by_id(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
signed_agreement_details={'details': 'here'},
signed_agreement_path='path',
countersigned_agreement_details={'countersigneddetails': 'here'},
countersigned_agreement_returned_at=datetime(2016, 11, 1, 1, 1, 1),
countersigned_agreement_path='/example.pdf'
)
res = self.client.get('/agreements/{}'.format(agreement_id))
assert res.status_code == 200
assert json.loads(res.get_data(as_text=True))['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'countersigned',
'signedAgreementDetails': {'details': 'here'},
'signedAgreementPath': 'path',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'countersignedAgreementDetails': {'countersigneddetails': 'here'},
'countersignedAgreementReturnedAt': '2016-11-01T01:01:01.000000Z',
'countersignedAgreementPath': '/example.pdf'
}
class TestUpdateFrameworkAgreement(BaseFrameworkAgreementTest):
def post_agreement_update(self, agreement_id, agreement):
return self.client.post(
'/agreements/{}'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'interested@example.com',
'agreement': agreement
}),
content_type='application/json')
@fixture_params('live_example_framework', {'framework_agreement_details': None})
def test_cant_set_agreement_details_for_framework_without_agreement_version(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.client.post(
'/agreements/{}'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'interested@example.com',
'agreement': {
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
}
}
}),
content_type='application/json')
assert res.status_code == 400
assert (
json.loads(res.get_data(as_text=True))['error'] ==
"Can not update signedAgreementDetails for a framework agreement without a frameworkAgreementVersion"
)
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_update_framework_agreement_details(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
}
})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
expected_agreement_json = {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'draft',
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
}
}
assert data['agreement'] == expected_agreement_json
res2 = self.client.get('/agreements/{}'.format(agreement_id))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == expected_agreement_json
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_update_signed_agreement_path(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedAgreementPath': '/example.pdf'
})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
expected_agreement_json = {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'draft',
'signedAgreementPath': '/example.pdf'
}
assert data['agreement'] == expected_agreement_json
res2 = self.client.get('/agreements/{}'.format(agreement_id))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == expected_agreement_json
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_update_signed_agreement_details_and_signed_agreement_path(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
},
'signedAgreementPath': '/example.pdf'
})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
expected_agreement_json = {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'draft',
'signedAgreementPath': '/example.pdf',
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
}
}
assert data['agreement'] == expected_agreement_json
res2 = self.client.get('/agreements/{}'.format(agreement_id))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == expected_agreement_json
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_audit_event_created_when_updating_framework_agreement(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
},
'signedAgreementPath': '/example.pdf'
})
assert res.status_code == 200
agreement = FrameworkAgreement.query.filter(
FrameworkAgreement.id == agreement_id
).first()
audit = AuditEvent.query.filter(
AuditEvent.object == agreement
).first()
assert audit.type == "update_agreement"
assert audit.user == "interested@example.com"
assert audit.data == {
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'update': {
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
},
'signedAgreementPath': '/example.pdf'
}
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_not_set_framework_agreement_version_directly(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'frameworkAgreementVersion': 'v23.4'
})
assert res.status_code == 400
assert json.loads(res.get_data(as_text=True)) == {
'error': "Invalid JSON should not have 'frameworkAgreementVersion' keys"
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_agreement_returned_at_timestamp_cannot_be_set(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedAgreementReturnedAt': '2013-13-13T00:00:00.000000Z'
})
assert res.status_code == 400
assert json.loads(res.get_data(as_text=True)) == {
'error': "Invalid JSON should not have 'signedAgreementReturnedAt' keys"
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_400_cannot_update_signed_agreement(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework, signed_agreement_returned_at=datetime.utcnow())
res = self.post_agreement_update(agreement_id, {
'signedAgreementPath': '/example.pdf'
})
assert res.status_code == 400
assert json.loads(res.get_data(as_text=True)) == {
'error': 'Can not update signedAgreementDetails or signedAgreementPath if agreement has been signed'
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_400_if_unknown_field_present_in_update_json(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedRandomKey': 'banana'
})
assert res.status_code == 400
assert json.loads(res.get_data(as_text=True)) == {
'error': "Invalid JSON should not have 'signedRandomKey' keys"
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_400_if_unknown_field_present_in_signed_agreement_details(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedAgreementDetails': {
'signerName': 'name',
'randomKey': 'value',
}
})
assert res.status_code == 400
data = json.loads(res.get_data(as_text=True))
# split assertions into keyphrases due to nested unicode string in python 2
strings_we_expect_in_the_error_message = [
'Additional properties are not allowed', 'randomKey', 'was unexpected']
for error_string in strings_we_expect_in_the_error_message:
assert error_string in data['error']['_form'][0]
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_200_if_signed_agreement_details_is_empty_object(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {'signedAgreementDetails': {}})
assert res.status_code == 200
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_400_if_signed_agreement_details_contains_empty_strings_as_values(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.post_agreement_update(agreement_id, {
'signedAgreementDetails': {
'signerName': '',
'signerRole': '',
}
})
assert res.status_code == 400
assert json.loads(res.get_data(as_text=True)) == {
'error': {'signerName': 'answer_required', 'signerRole': 'answer_required'}
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_update_countersigned_agreement_path_for_framework_with_agreement_version(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={
'signerName': 'name',
'signerRole': 'role',
},
signed_agreement_path='path/file.pdf',
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
countersigned_agreement_returned_at=datetime(2016, 11, 1, 1, 1, 1)
)
res = self.post_agreement_update(agreement_id, {
'countersignedAgreementPath': 'countersigned/file.jpg'
})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
expected_agreement_json = {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'countersigned',
'signedAgreementPath': 'path/file.pdf',
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
},
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'countersignedAgreementReturnedAt': '2016-11-01T01:01:01.000000Z',
'countersignedAgreementPath': 'countersigned/file.jpg'
}
assert data['agreement'] == expected_agreement_json
res2 = self.client.get('/agreements/{}'.format(agreement_id))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == expected_agreement_json
@fixture_params('live_example_framework', {'framework_agreement_details': None})
def test_can_update_countersigned_agreement_path_for_framework_without_agreement_version(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_path='path/file.pdf',
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
countersigned_agreement_returned_at=datetime(2016, 11, 1, 1, 1, 1)
)
res = self.post_agreement_update(agreement_id, {
'countersignedAgreementPath': 'countersigned/file.jpg'
})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
expected_agreement_json = {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'countersigned',
'signedAgreementPath': 'path/file.pdf',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'countersignedAgreementReturnedAt': '2016-11-01T01:01:01.000000Z',
'countersignedAgreementPath': 'countersigned/file.jpg'
}
assert data['agreement'] == expected_agreement_json
res2 = self.client.get('/agreements/{}'.format(agreement_id))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == expected_agreement_json
@fixture_params(
'live_example_framework', {
'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'},
'slug': 'g-cloud-11',
}
)
def test_cannot_update_countersigned_agreement_path_if_agreement_has_not_been_approved(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_path='path/file.pdf',
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1)
)
res = self.post_agreement_update(agreement_id, {
'countersignedAgreementPath': 'countersigned/file.jpg'
})
assert res.status_code == 400
assert json.loads(res.get_data(as_text=True)) == {
'error': 'Can not update countersignedAgreementPath if agreement has not been approved for countersigning'
}
@fixture_params(
'live_example_framework', {
'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'},
'slug': 'g-cloud-12',
}
)
def test_can_update_countersigned_agreement_path_without_approval_for_esignature_framework(
self, supplier_framework
):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_path='path/file.pdf',
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1)
)
res = self.post_agreement_update(agreement_id, {
'countersignedAgreementPath': 'countersigned/file.jpg'
})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
expected_agreement_json = {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'countersigned',
'signedAgreementPath': 'path/file.pdf',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'countersignedAgreementPath': 'countersigned/file.jpg'
}
assert data['agreement'] == expected_agreement_json
res2 = self.client.get('/agreements/{}'.format(agreement_id))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == expected_agreement_json
def test_can_unset_countersigned_agreement_path(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_path='path/file.pdf',
signed_agreement_returned_at=datetime(2016, 10, 1, 1, 1, 1),
countersigned_agreement_returned_at=datetime(2016, 11, 1, 1, 1, 1),
countersigned_agreement_path='countersigned/that/bad/boy.pdf'
)
res = self.post_agreement_update(agreement_id, {
'countersignedAgreementPath': None
})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
expected_agreement_json = {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved',
'signedAgreementPath': 'path/file.pdf',
'signedAgreementReturnedAt': '2016-10-01T01:01:01.000000Z',
'countersignedAgreementReturnedAt': '2016-11-01T01:01:01.000000Z'
}
assert data['agreement'] == expected_agreement_json
res2 = self.client.get('/agreements/{}'.format(agreement_id))
assert res2.status_code == 200
assert json.loads(res2.get_data(as_text=True))['agreement'] == expected_agreement_json
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
class TestSignFrameworkAgreementThatHasFrameworkAgreementVersion(BaseFrameworkAgreementTest):
def sign_agreement(self, agreement_id, agreement):
return self.client.post(
'/agreements/{}/sign'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'interested@example.com',
'agreement': agreement
}),
content_type='application/json')
def test_can_sign_framework_agreement(self, user_role_supplier, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={'signerName': 'name', 'signerRole': 'role'},
signed_agreement_path='/example.pdf'
)
with freeze_time('2016-12-12'):
res = self.sign_agreement(agreement_id, {'signedAgreementDetails': {'uploaderUserId': 1}})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'signed',
'signedAgreementPath': '/example.pdf',
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
'uploaderUserId': user_role_supplier,
'frameworkAgreementVersion': 'v1.0'
},
'signedAgreementReturnedAt': '2016-12-12T00:00:00.000000Z'
}
def test_signing_framework_agreement_produces_audit_event(self, user_role_supplier, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={'signerName': 'name', 'signerRole': 'role'},
signed_agreement_path='/example.pdf'
)
res = self.sign_agreement(agreement_id, {'signedAgreementDetails': {'uploaderUserId': user_role_supplier}})
assert res.status_code == 200
agreement = FrameworkAgreement.query.filter(
FrameworkAgreement.id == agreement_id
).first()
audit = AuditEvent.query.filter(
AuditEvent.object == agreement
).first()
assert audit.type == "sign_agreement"
assert audit.user == "interested@example.com"
assert audit.data == {
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'update': {'signedAgreementDetails': {'uploaderUserId': user_role_supplier}}
}
def test_can_re_sign_framework_agreement(self, user_role_supplier, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={
'signerName': 'name',
'signerRole': 'role',
'uploaderUserId': 2,
'frameworkAgreementVersion': 'v1.0'
},
signed_agreement_path='/example.pdf',
signed_agreement_returned_at=datetime.utcnow()
)
with freeze_time('2016-12-12'):
res = self.sign_agreement(agreement_id, {'signedAgreementDetails': {'uploaderUserId': user_role_supplier}})
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'signed',
'signedAgreementPath': '/example.pdf',
'signedAgreementDetails': {
'signerName': 'name',
'signerRole': 'role',
'uploaderUserId': 1,
'frameworkAgreementVersion': 'v1.0'
},
'signedAgreementReturnedAt': '2016-12-12T00:00:00.000000Z'
}
def test_can_not_sign_framework_agreement_that_has_no_signer_name(self, user_role_supplier, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={'signerRole': 'role'},
signed_agreement_path='/example.pdf'
)
res = self.sign_agreement(agreement_id, {'signedAgreementDetails': {'uploaderUserId': user_role_supplier}})
assert res.status_code == 400
assert (
json.loads(res.get_data(as_text=True))['error'] == {'signerName': 'answer_required'})
def test_can_not_sign_framework_agreement_that_has_no_signer_role(self, user_role_supplier, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={'signerName': 'name'},
signed_agreement_path='/example.pdf'
)
res = self.sign_agreement(agreement_id, {'signedAgreementDetails': {'uploaderUserId': user_role_supplier}})
assert res.status_code == 400
assert (
json.loads(res.get_data(as_text=True))['error'] == {'signerRole': 'answer_required'})
def test_400_if_user_signing_framework_agreement_does_not_exist(self, user_role_supplier, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_details={'signerName': 'name', 'signerRole': 'role'},
signed_agreement_path='/example.pdf'
)
# The user_role_supplier fixture sets up user with ID 1; there is no user with ID 20
res = self.sign_agreement(agreement_id, {'signedAgreementDetails': {'uploaderUserId': 20}})
assert res.status_code == 400
assert (
json.loads(res.get_data(as_text=True))['error'] == "No user found with id '20'")
# Frameworks prior to G-Cloud 8 do not have framework_agreement_version set, and signing these stores only the timestamp
class TestSignFrameworkAgreementThatHasNoFrameworkAgreementVersion(BaseFrameworkAgreementTest):
def sign_agreement(self, agreement_id):
return self.client.post(
'/agreements/{}/sign'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'interested@example.com'
}),
content_type='application/json')
def test_can_sign_framework_agreement(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
with freeze_time('2016-12-12'):
res = self.sign_agreement(agreement_id)
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'signed',
'signedAgreementReturnedAt': '2016-12-12T00:00:00.000000Z'
}
def test_signing_framework_agreement_produces_audit_event(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.sign_agreement(agreement_id)
assert res.status_code == 200
agreement = FrameworkAgreement.query.filter(
FrameworkAgreement.id == agreement_id
).first()
audit = AuditEvent.query.filter(
AuditEvent.object == agreement
).first()
assert audit.type == "sign_agreement"
assert audit.user == "interested@example.com"
assert audit.data == {
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
}
def test_can_re_sign_framework_agreement(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime.utcnow()
)
with freeze_time('2016-12-12'):
res = self.sign_agreement(agreement_id)
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'signed',
'signedAgreementReturnedAt': '2016-12-12T00:00:00.000000Z'
}
class TestPutFrameworkAgreementOnHold(BaseFrameworkAgreementTest):
def put_framework_agreement_on_hold(self, agreement_id):
return self.client.post(
'/agreements/{}/on-hold'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'interested@example.com'
}),
content_type='application/json')
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_put_framework_agreement_on_hold(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1),
)
with freeze_time('2016-12-12'):
res = self.put_framework_agreement_on_hold(agreement_id)
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'on-hold',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
'signedAgreementPutOnHoldAt': '2016-12-12T00:00:00.000000Z'
}
agreement = FrameworkAgreement.query.filter(
FrameworkAgreement.id == agreement_id
).first()
audit = AuditEvent.query.filter(
AuditEvent.object == agreement
).first()
assert audit.type == "update_agreement"
assert audit.user == "interested@example.com"
assert audit.data == {
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'on-hold'
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_not_put_unsigned_framework_agreement_on_hold(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.put_framework_agreement_on_hold(agreement_id)
assert res.status_code == 400
error_message = json.loads(res.get_data(as_text=True))['error']
assert error_message == "Framework agreement must have status 'signed' to be put on hold"
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_not_put_countersigned_framework_agreement_on_hold(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 9, 1),
countersigned_agreement_returned_at=datetime(2016, 10, 1)
)
res = self.put_framework_agreement_on_hold(agreement_id)
assert res.status_code == 400
error_message = json.loads(res.get_data(as_text=True))['error']
assert error_message == "Framework agreement must have status 'signed' to be put on hold"
def test_can_not_put_framework_agreement_on_hold_that_has_no_framework_agreement_version(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1)
)
res = self.put_framework_agreement_on_hold(agreement_id)
assert res.status_code == 400
error_message = json.loads(res.get_data(as_text=True))['error']
assert error_message == "Framework agreement must have a 'frameworkAgreementVersion' to be put on hold"
class TestApproveFrameworkAgreement(BaseFrameworkAgreementTest):
def approve_framework_agreement(self, agreement_id):
return self.client.post(
'/agreements/{}/approve'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'chris@example.com',
'agreement': {'userId': '1234'}
}),
content_type='application/json')
def unapprove_framework_agreement(self, agreement_id):
return self.client.post(
'/agreements/{}/approve'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'made-a-whoopsie@example.com',
'agreement': {'userId': '1234', 'unapprove': True}
}),
content_type='application/json')
@fixture_params(
'live_example_framework', {
'framework_agreement_details': {
'frameworkAgreementVersion': 'v1.0',
'countersignerName': 'The Boss',
'countersignerRole': 'Director of Strings'
}
}
)
def test_can_approve_signed_framework_agreement(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1),
)
with freeze_time('2016-12-12'):
res = self.approve_framework_agreement(agreement_id)
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
'countersignedAgreementReturnedAt': '2016-12-12T00:00:00.000000Z',
'countersignedAgreementDetails': {
'countersignerName': 'The Boss',
'countersignerRole': 'Director of Strings',
'approvedByUserId': '1234'
}
}
agreement = FrameworkAgreement.query.filter(
FrameworkAgreement.id == agreement_id
).first()
audit = AuditEvent.query.filter(
AuditEvent.object == agreement
).first()
assert audit.type == "countersign_agreement"
assert audit.user == "chris@example.com"
assert audit.data == {
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved'
}
@fixture_params(
'live_example_framework', {
'framework_agreement_details': {
'frameworkAgreementVersion': 'v1.0',
'countersignerName': 'The Boss',
'countersignerRole': 'Director of Strings'
}
}
)
def test_can_approve_on_hold_framework_agreement(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1),
)
with freeze_time('2016-10-02'):
on_hold_res = self.client.post(
'/agreements/{}/on-hold'.format(agreement_id),
data=json.dumps(
{
'updated_by': 'interested@example.com'
}),
content_type='application/json')
assert on_hold_res.status_code == 200
on_hold_data = json.loads(on_hold_res.get_data(as_text=True))['agreement']
assert on_hold_data['status'] == 'on-hold'
with freeze_time('2016-10-03'):
res = self.approve_framework_agreement(agreement_id)
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert 'signedAgreementPutOnHoldAt' not in data['agreement']
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
'countersignedAgreementReturnedAt': '2016-10-03T00:00:00.000000Z',
'countersignedAgreementDetails': {
'countersignerName': 'The Boss',
'countersignerRole': 'Director of Strings',
'approvedByUserId': '1234'
}
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_not_approve_unsigned_framework_agreement(self, supplier_framework):
agreement_id = self.create_agreement(supplier_framework)
res = self.approve_framework_agreement(agreement_id)
assert res.status_code == 400
error_message = json.loads(res.get_data(as_text=True))['error']
assert error_message == "Framework agreement must have status 'signed' or 'on hold' to be countersigned"
def test_can_approve_framework_agreement_that_has_no_framework_agreement_version(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1)
)
with freeze_time('2016-10-03'):
res = self.approve_framework_agreement(agreement_id)
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
'countersignedAgreementReturnedAt': '2016-10-03T00:00:00.000000Z',
'countersignedAgreementDetails': {'approvedByUserId': '1234'}
}
@fixture_params('live_example_framework', {'framework_agreement_details': {'frameworkAgreementVersion': 'v1.0'}})
def test_can_approve_framework_agreement_with_agreement_version_but_no_name_or_role(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1)
)
with freeze_time('2016-10-03'):
res = self.approve_framework_agreement(agreement_id)
assert res.status_code == 200
data = json.loads(res.get_data(as_text=True))
assert data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
'countersignedAgreementReturnedAt': '2016-10-03T00:00:00.000000Z',
'countersignedAgreementDetails': {'approvedByUserId': '1234'}
}
@fixture_params(
'live_example_framework', {
'framework_agreement_details': {
'frameworkAgreementVersion': 'v1.0',
'countersignerName': 'The Boss',
'countersignerRole': 'Director of Strings'
}
}
)
def test_serialized_supplier_framework_contains_updater_details_after_approval(self, supplier_framework):
user = User(
id=1234,
name='Chris',
email_address='chris@crowncommercial.gov.uk',
password='password',
active=True,
created_at=datetime.now(),
password_changed_at=datetime.now(),
role='admin-ccs-sourcing'
)
db.session.add(user)
db.session.commit()
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1),
signed_agreement_details={},
countersigned_agreement_details={
"countersignerRole": "Director of Strings",
"approvedByUserId": 1234,
"countersignerName": "The Boss"
},
countersigned_agreement_returned_at=datetime.now()
)
agreement = FrameworkAgreement.query.filter(FrameworkAgreement.id == agreement_id).first()
supplier_framework = agreement.supplier_framework.serialize(with_users=True)
assert supplier_framework['countersignedDetails']['approvedByUserName'] == 'Chris'
assert supplier_framework['countersignedDetails']['approvedByUserEmail'] == 'chris@crowncommercial.gov.uk'
def test_can_unapprove_approved_agreement(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1)
)
with freeze_time('2016-12-12'):
res1 = self.approve_framework_agreement(agreement_id)
agreement_before_unapprove_data = json.loads(res1.get_data(as_text=True))
# Check that the agreement is definitely approved
assert agreement_before_unapprove_data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'approved',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
'countersignedAgreementReturnedAt': '2016-12-12T00:00:00.000000Z',
'countersignedAgreementDetails': {'approvedByUserId': '1234'}
}
res2 = self.unapprove_framework_agreement(agreement_id)
assert res2.status_code == 200
unapproved_agreement_data = json.loads(res2.get_data(as_text=True))
# Check that status is reverted to 'signed' and countersigned info has been removed
assert unapproved_agreement_data['agreement'] == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'signed',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
}
agreement = FrameworkAgreement.query.filter(
FrameworkAgreement.id == agreement_id
).first()
# Get the most recent audit event and check it is the "unapprove" event
audit = AuditEvent.query.filter(
AuditEvent.object == agreement
).order_by(AuditEvent.created_at.desc()).first()
assert audit.type == "countersign_agreement"
assert audit.user == "made-a-whoopsie@example.com"
assert audit.data == {
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'unapproved'
}
def test_can_not_unapprove_countersigned_agreement(self, supplier_framework):
agreement_id = self.create_agreement(
supplier_framework,
signed_agreement_returned_at=datetime(2016, 10, 1),
countersigned_agreement_returned_at=datetime(2016, 10, 2),
countersigned_agreement_path='/path/to/countersigned/document'
)
res1 = self.client.get('/agreements/{}'.format(agreement_id))
data1 = json.loads(res1.get_data(as_text=True))['agreement']
assert data1['status'] == 'countersigned'
res2 = self.unapprove_framework_agreement(agreement_id)
data2 = json.loads(res2.get_data(as_text=True))
assert res2.status_code == 400
assert data2['error'] == "Framework agreement must have status 'approved' to be unapproved"
# Check that status has not been changed
res3 = self.client.get('/agreements/{}'.format(agreement_id))
data3 = json.loads(res3.get_data(as_text=True))['agreement']
assert data3 == {
'id': agreement_id,
'supplierId': supplier_framework['supplierId'],
'frameworkSlug': supplier_framework['frameworkSlug'],
'status': 'countersigned',
'signedAgreementReturnedAt': '2016-10-01T00:00:00.000000Z',
'countersignedAgreementReturnedAt': '2016-10-02T00:00:00.000000Z',
'countersignedAgreementPath': '/path/to/countersigned/document'
}
| 43.443561
| 120
| 0.633701
| 5,280
| 54,652
| 6.265152
| 0.055303
| 0.095073
| 0.01578
| 0.022793
| 0.865145
| 0.844831
| 0.829958
| 0.812364
| 0.796554
| 0.778688
| 0
| 0.034799
| 0.255983
| 54,652
| 1,257
| 121
| 43.478123
| 0.778737
| 0.009405
| 0
| 0.686916
| 0
| 0
| 0.237188
| 0.108997
| 0
| 0
| 0
| 0
| 0.133645
| 1
| 0.05514
| false
| 0.001869
| 0.005607
| 0.005607
| 0.075701
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bc21fb987995424da0c4a8da3583644d72bd8f6a
| 3,326
|
py
|
Python
|
test_prime_numbers.py
|
zekedran/python_tdd_ci_tutorial
|
6a318ce5f26953dd44ca49da73815de4a2634fe5
|
[
"MIT"
] | null | null | null |
test_prime_numbers.py
|
zekedran/python_tdd_ci_tutorial
|
6a318ce5f26953dd44ca49da73815de4a2634fe5
|
[
"MIT"
] | null | null | null |
test_prime_numbers.py
|
zekedran/python_tdd_ci_tutorial
|
6a318ce5f26953dd44ca49da73815de4a2634fe5
|
[
"MIT"
] | null | null | null |
from prime_numbers import is_prime
def test_is_prime():
assert is_prime(-1) is False
assert is_prime(0) is False
assert is_prime(4) is False
assert is_prime(6) is False
assert is_prime(8) is False
assert is_prime(9) is False
assert is_prime(10) is False
assert is_prime(12) is False
assert is_prime(14) is False
assert is_prime(15) is False
assert is_prime(16) is False
assert is_prime(18) is False
assert is_prime(20) is False
assert is_prime(21) is False
assert is_prime(22) is False
assert is_prime(24) is False
assert is_prime(25) is False
assert is_prime(26) is False
assert is_prime(27) is False
assert is_prime(28) is False
assert is_prime(30) is False
assert is_prime(32) is False
assert is_prime(33) is False
assert is_prime(34) is False
assert is_prime(35) is False
assert is_prime(36) is False
assert is_prime(38) is False
assert is_prime(39) is False
assert is_prime(40) is False
assert is_prime(42) is False
assert is_prime(44) is False
assert is_prime(45) is False
assert is_prime(46) is False
assert is_prime(48) is False
assert is_prime(49) is False
assert is_prime(50) is False
assert is_prime(51) is False
assert is_prime(52) is False
assert is_prime(54) is False
assert is_prime(55) is False
assert is_prime(56) is False
assert is_prime(57) is False
assert is_prime(58) is False
assert is_prime(60) is False
assert is_prime(62) is False
assert is_prime(63) is False
assert is_prime(64) is False
assert is_prime(65) is False
assert is_prime(66) is False
assert is_prime(68) is False
assert is_prime(69) is False
assert is_prime(70) is False
assert is_prime(72) is False
assert is_prime(74) is False
assert is_prime(75) is False
assert is_prime(76) is False
assert is_prime(77) is False
assert is_prime(78) is False
assert is_prime(80) is False
assert is_prime(81) is False
assert is_prime(82) is False
assert is_prime(84) is False
assert is_prime(85) is False
assert is_prime(86) is False
assert is_prime(87) is False
assert is_prime(88) is False
assert is_prime(90) is False
assert is_prime(91) is False
assert is_prime(92) is False
assert is_prime(93) is False
assert is_prime(94) is False
assert is_prime(95) is False
assert is_prime(96) is False
assert is_prime(98) is False
assert is_prime(99) is False
assert is_prime(2) is True
assert is_prime(3) is True
assert is_prime(5) is True
assert is_prime(7) is True
assert is_prime(11) is True
assert is_prime(13) is True
assert is_prime(17) is True
assert is_prime(19) is True
assert is_prime(23) is True
assert is_prime(29) is True
assert is_prime(31) is True
assert is_prime(37) is True
assert is_prime(41) is True
assert is_prime(43) is True
assert is_prime(47) is True
assert is_prime(53) is True
assert is_prime(59) is True
assert is_prime(61) is True
assert is_prime(67) is True
assert is_prime(71) is True
assert is_prime(73) is True
assert is_prime(79) is True
assert is_prime(83) is True
assert is_prime(89) is True
assert is_prime(97) is True
| 31.084112
| 34
| 0.695129
| 610
| 3,326
| 3.619672
| 0.180328
| 0.32337
| 0.588768
| 0.509511
| 0.88587
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075517
| 0.243536
| 3,326
| 106
| 35
| 31.377358
| 0.802067
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.980392
| 1
| 0.009804
| true
| 0
| 0.009804
| 0
| 0.019608
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bc22939116e8ef6b4d13b61eab3aac762d3ff398
| 7,386
|
py
|
Python
|
client/tests/test_up_args.py
|
gefyrahq/gefyra
|
0bc205b4b01100c640081ead671bdb195761299b
|
[
"Apache-2.0"
] | 41
|
2022-03-24T15:45:56.000Z
|
2022-03-31T08:07:19.000Z
|
client/tests/test_up_args.py
|
Schille/gefyra
|
43abd17b8ed5867a26266b5e7a5d6f9edfebab4a
|
[
"Apache-2.0"
] | 23
|
2021-12-02T10:29:09.000Z
|
2022-03-17T18:10:57.000Z
|
client/tests/test_up_args.py
|
Schille/gefyra
|
43abd17b8ed5867a26266b5e7a5d6f9edfebab4a
|
[
"Apache-2.0"
] | 3
|
2022-02-18T21:16:10.000Z
|
2022-03-09T22:46:28.000Z
|
from gefyra.__main__ import up_parser, up_command
from gefyra.configuration import ClientConfiguration, __VERSION__
REGISTRY_URL = "my-reg.io/gefyra"
QUAY_REGISTRY_URL = "quay.io/gefyra"
STOWAWAY_LATEST = "my-reg.io/gefyra/stowaway:latest"
CARGO_LATEST = "my-reg.io/gefyra/cargo:latest"
OPERATOR_LATEST = "my-reg.io/gefyra/operator:latest"
CARRIER_LATEST = "my-reg.io/gefyra/carrier:latest"
KUBE_CONFIG = "~/.kube/config"
def test_parse_registry_a():
args = up_parser.parse_args(["--registry", REGISTRY_URL])
configuration = ClientConfiguration(registry_url=args.registry)
assert configuration.REGISTRY_URL == REGISTRY_URL
def test_parse_registry_b():
args = up_parser.parse_args(["--registry", "my-reg.io/gefyra/"])
configuration = ClientConfiguration(registry_url=args.registry)
assert configuration.REGISTRY_URL, REGISTRY_URL
args = up_parser.parse_args(["-r", "my-reg.io/gefyra/"])
configuration = ClientConfiguration(registry_url=args.registry)
assert configuration.REGISTRY_URL == REGISTRY_URL
def test_parse_no_registry():
args = up_parser.parse_args()
configuration = ClientConfiguration(registry_url=args.registry)
assert configuration.REGISTRY_URL == QUAY_REGISTRY_URL
def test_parse_no_stowaway_image():
args = up_parser.parse_args()
configuration = ClientConfiguration(stowaway_image_url=args.stowaway)
assert configuration.STOWAWAY_IMAGE == f"quay.io/gefyra/stowaway:{__VERSION__}"
def test_parse_no_carrier_image():
args = up_parser.parse_args()
configuration = ClientConfiguration(carrier_image_url=args.carrier)
assert configuration.CARRIER_IMAGE == f"quay.io/gefyra/carrier:{__VERSION__}"
def test_parse_no_operator_image():
args = up_parser.parse_args()
configuration = ClientConfiguration(operator_image_url=args.operator)
assert configuration.OPERATOR_IMAGE == f"quay.io/gefyra/operator:{__VERSION__}"
def test_parse_no_cargo_image():
args = up_parser.parse_args()
configuration = ClientConfiguration(cargo_image_url=args.cargo)
assert configuration.CARGO_IMAGE == f"quay.io/gefyra/cargo:{__VERSION__}"
def test_parse_stowaway_image():
args = up_parser.parse_args(["--stowaway", STOWAWAY_LATEST])
configuration = ClientConfiguration(stowaway_image_url=args.stowaway)
assert configuration.STOWAWAY_IMAGE == STOWAWAY_LATEST
args = up_parser.parse_args(["-s", STOWAWAY_LATEST])
configuration = ClientConfiguration(stowaway_image_url=args.stowaway)
assert configuration.STOWAWAY_IMAGE == STOWAWAY_LATEST
args = up_parser.parse_args(["-s", STOWAWAY_LATEST, "-r", QUAY_REGISTRY_URL])
configuration = ClientConfiguration(
registry_url=args.registry, stowaway_image_url=args.stowaway
)
assert configuration.STOWAWAY_IMAGE == STOWAWAY_LATEST
def test_parse_cargo_image():
args = up_parser.parse_args(["--cargo", CARGO_LATEST])
configuration = ClientConfiguration(cargo_image_url=args.cargo)
assert configuration.CARGO_IMAGE == CARGO_LATEST
args = up_parser.parse_args(["-a", CARGO_LATEST])
configuration = ClientConfiguration(cargo_image_url=args.cargo)
assert configuration.CARGO_IMAGE == CARGO_LATEST
args = up_parser.parse_args(["-a", CARGO_LATEST, "-r", QUAY_REGISTRY_URL])
configuration = ClientConfiguration(
registry_url=args.registry, cargo_image_url=args.cargo
)
assert configuration.CARGO_IMAGE == CARGO_LATEST
def test_parse_operator_image():
args = up_parser.parse_args(["--operator", OPERATOR_LATEST])
configuration = ClientConfiguration(operator_image_url=args.operator)
assert configuration.OPERATOR_IMAGE == OPERATOR_LATEST
args = up_parser.parse_args(["-o", OPERATOR_LATEST])
configuration = ClientConfiguration(operator_image_url=args.operator)
assert configuration.OPERATOR_IMAGE == OPERATOR_LATEST
args = up_parser.parse_args(["-o", OPERATOR_LATEST, "-r", QUAY_REGISTRY_URL])
configuration = ClientConfiguration(
registry_url=args.registry, operator_image_url=args.operator
)
assert configuration.OPERATOR_IMAGE == OPERATOR_LATEST
def test_parse_carrier_image():
args = up_parser.parse_args(["--carrier", CARRIER_LATEST])
configuration = ClientConfiguration(carrier_image_url=args.carrier)
assert configuration.CARRIER_IMAGE == CARRIER_LATEST
args = up_parser.parse_args(["-c", CARRIER_LATEST])
configuration = ClientConfiguration(carrier_image_url=args.carrier)
assert configuration.CARRIER_IMAGE == CARRIER_LATEST
args = up_parser.parse_args(["-c", CARRIER_LATEST, "-r", QUAY_REGISTRY_URL])
configuration = ClientConfiguration(
registry_url=args.registry, carrier_image_url=args.carrier
)
assert configuration.CARRIER_IMAGE == CARRIER_LATEST
def test_parse_combination_a():
args = up_parser.parse_args(["-c", CARRIER_LATEST])
configuration = ClientConfiguration(
registry_url=args.registry,
stowaway_image_url=args.stowaway,
operator_image_url=args.operator,
cargo_image_url=args.cargo,
carrier_image_url=args.carrier,
)
assert configuration.REGISTRY_URL == QUAY_REGISTRY_URL
assert configuration.OPERATOR_IMAGE == f"quay.io/gefyra/operator:{__VERSION__}"
assert configuration.CARRIER_IMAGE == CARRIER_LATEST
def test_parse_combination_b():
args = up_parser.parse_args(["-r", REGISTRY_URL])
configuration = ClientConfiguration(
registry_url=args.registry,
stowaway_image_url=args.stowaway,
operator_image_url=args.operator,
cargo_image_url=args.cargo,
carrier_image_url=args.carrier,
)
assert configuration.REGISTRY_URL == REGISTRY_URL
assert configuration.OPERATOR_IMAGE == f"my-reg.io/gefyra/operator:{__VERSION__}"
assert configuration.CARRIER_IMAGE == f"my-reg.io/gefyra/carrier:{__VERSION__}"
def test_parse_combination_c():
args = up_parser.parse_args(
["-r", REGISTRY_URL, "-c", "quay.io/gefyra/carrier:latest"]
)
configuration = ClientConfiguration(
registry_url=args.registry,
stowaway_image_url=args.stowaway,
operator_image_url=args.operator,
cargo_image_url=args.cargo,
carrier_image_url=args.carrier,
)
assert configuration.REGISTRY_URL == REGISTRY_URL
assert configuration.OPERATOR_IMAGE == f"my-reg.io/gefyra/operator:{__VERSION__}"
assert configuration.CARRIER_IMAGE == "quay.io/gefyra/carrier:latest"
def test_parse_endpoint():
args = up_parser.parse_args(["-e", "10.30.34.25:31820"])
configuration = ClientConfiguration(
cargo_endpoint=args.endpoint,
registry_url=args.registry,
stowaway_image_url=args.stowaway,
operator_image_url=args.operator,
cargo_image_url=args.cargo,
carrier_image_url=args.carrier,
)
assert configuration.CARGO_ENDPOINT == "10.30.34.25:31820"
def test_parse_up_fct(monkeypatch):
monkeypatch.setattr("gefyra.api.up", lambda config: True)
args = up_parser.parse_args(["-e", "10.30.34.25:31820"])
up_command(args)
def test_parse_up_kube_conf():
configuration = ClientConfiguration(kube_config_file=KUBE_CONFIG)
assert configuration.KUBE_CONFIG_FILE == KUBE_CONFIG
def test_parse_up_no_kube_conf():
configuration = ClientConfiguration()
assert configuration.KUBE_CONFIG_FILE is None
| 37.876923
| 85
| 0.753859
| 893
| 7,386
| 5.87458
| 0.06159
| 0.060046
| 0.073199
| 0.081014
| 0.882005
| 0.814335
| 0.794129
| 0.740945
| 0.70854
| 0.70854
| 0
| 0.006157
| 0.142432
| 7,386
| 194
| 86
| 38.072165
| 0.822071
| 0
| 0
| 0.517007
| 0
| 0
| 0.096805
| 0.064852
| 0
| 0
| 0
| 0
| 0.217687
| 1
| 0.122449
| false
| 0
| 0.013605
| 0
| 0.136054
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bc32a3234dd90ad352aba5adb527d79b901adc29
| 303
|
py
|
Python
|
examples/fixture.no_background/features/steps/use_steplib_behave4cmd.py
|
wombat70/behave
|
c54493b0531795d946ac6754bfc643248cf3056a
|
[
"BSD-2-Clause"
] | 13
|
2019-10-03T19:15:14.000Z
|
2019-10-16T02:01:57.000Z
|
examples/fixture.no_background/features/steps/use_steplib_behave4cmd.py
|
wombat70/behave
|
c54493b0531795d946ac6754bfc643248cf3056a
|
[
"BSD-2-Clause"
] | 2
|
2020-03-21T22:37:54.000Z
|
2021-10-04T17:14:14.000Z
|
examples/fixture.no_background/features/steps/use_steplib_behave4cmd.py
|
fluendo/behave
|
eeffde083456dcf1a0ea9b6139b32091970118c0
|
[
"BSD-2-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Use behave4cmd0 step library (predecessor of behave4cmd).
"""
from __future__ import absolute_import
# -- REGISTER-STEPS FROM STEP-LIBRARY:
# import behave4cmd0.__all_steps__
# import behave4cmd0.failing_steps
import behave4cmd0.passing_steps
import behave4cmd0.note_steps
| 23.307692
| 57
| 0.785479
| 36
| 303
| 6.25
| 0.555556
| 0.302222
| 0.293333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044776
| 0.115512
| 303
| 12
| 58
| 25.25
| 0.794776
| 0.60396
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 6
|
70ae466b7e7db5a0d09e04c20a68c88f305a4aac
| 77
|
py
|
Python
|
build_start.py
|
sanman00/SpongeSkills
|
7a54e424071a21a55a84479e0177ed7ebacc9c31
|
[
"MIT"
] | null | null | null |
build_start.py
|
sanman00/SpongeSkills
|
7a54e424071a21a55a84479e0177ed7ebacc9c31
|
[
"MIT"
] | 4
|
2017-05-05T15:51:09.000Z
|
2017-05-08T17:18:27.000Z
|
build_start.py
|
sanman00/SpongeSkills
|
7a54e424071a21a55a84479e0177ed7ebacc9c31
|
[
"MIT"
] | null | null | null |
from build import replace_text, version
replace_text("@{version}", version)
| 19.25
| 39
| 0.779221
| 10
| 77
| 5.8
| 0.6
| 0.37931
| 0.62069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103896
| 77
| 3
| 40
| 25.666667
| 0.84058
| 0
| 0
| 0
| 0
| 0
| 0.12987
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 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
| 0
| 0
|
0
| 6
|
70cae01a3bbf35c083ab9e6723658c85595554ce
| 983
|
py
|
Python
|
problems/test_ic_1_stock_prices.py
|
gregdferrell/algo
|
974ae25b028d49bcb7ded6655a7e11dcf6aa221d
|
[
"MIT"
] | null | null | null |
problems/test_ic_1_stock_prices.py
|
gregdferrell/algo
|
974ae25b028d49bcb7ded6655a7e11dcf6aa221d
|
[
"MIT"
] | null | null | null |
problems/test_ic_1_stock_prices.py
|
gregdferrell/algo
|
974ae25b028d49bcb7ded6655a7e11dcf6aa221d
|
[
"MIT"
] | null | null | null |
from .ic_1_stock_prices import stock_prices_1_brute_force, stock_prices_2_greedy
def test_stock_price_algorithms_lose():
stock_prices = [10, 9, 7]
assert stock_prices_1_brute_force(stock_prices) == -1
assert stock_prices_2_greedy(stock_prices) == -1
def test_stock_price_algorithms_no_gain():
stock_prices = [2, 2, 1, 1]
assert stock_prices_1_brute_force(stock_prices) == 0
assert stock_prices_2_greedy(stock_prices) == 0
def test_stock_price_algorithms_gain_1():
stock_prices = [1, 2, 3, 4, 5]
assert stock_prices_1_brute_force(stock_prices) == 4
assert stock_prices_2_greedy(stock_prices) == 4
def test_stock_price_algorithms_gain_2():
stock_prices = [10, 7, 5, 8, 11, 9]
assert stock_prices_1_brute_force(stock_prices) == 6
assert stock_prices_2_greedy(stock_prices) == 6
def test_stock_price_algorithms_gain_3():
stock_prices = [9, 8, 10, 7, 11, 6, 12]
assert stock_prices_1_brute_force(stock_prices) == 6
assert stock_prices_2_greedy(stock_prices) == 6
| 30.71875
| 80
| 0.787386
| 169
| 983
| 4.08284
| 0.171598
| 0.446377
| 0.246377
| 0.147826
| 0.802899
| 0.724638
| 0.589855
| 0.389855
| 0.22029
| 0.22029
| 0
| 0.065668
| 0.116989
| 983
| 31
| 81
| 31.709677
| 0.729263
| 0
| 0
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.47619
| 1
| 0.238095
| false
| 0
| 0.047619
| 0
| 0.285714
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
70ecc3bb253029a64b550829a901f26d30203690
| 31
|
py
|
Python
|
arxivtimes_indicator/server/__init__.py
|
chakki-works/arXivTimesIndicator
|
501413571dc0024b5a9d0bc2e9f17f805de92690
|
[
"Apache-2.0"
] | 34
|
2017-08-02T07:01:13.000Z
|
2019-01-06T10:35:57.000Z
|
arxivtimes_indicator/server/__init__.py
|
arXivTimes/arXivTimesIndicator
|
501413571dc0024b5a9d0bc2e9f17f805de92690
|
[
"Apache-2.0"
] | 4
|
2017-08-09T06:47:26.000Z
|
2017-10-13T01:47:01.000Z
|
arxivtimes_indicator/server/__init__.py
|
arXivTimes/arXivTimesIndicator
|
501413571dc0024b5a9d0bc2e9f17f805de92690
|
[
"Apache-2.0"
] | 2
|
2020-10-21T12:31:02.000Z
|
2021-11-05T05:26:15.000Z
|
from .server import Application
| 31
| 31
| 0.870968
| 4
| 31
| 6.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 31
| 1
| 31
| 31
| 0.964286
| 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
| 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
| 6
|
cb0d83bca9047c82889cf5995c31524e13285dd4
| 39
|
py
|
Python
|
perses/samplers/__init__.py
|
schallerdavid/perses
|
58bd6e626e027879e136f56e175683893e016f8c
|
[
"MIT"
] | 99
|
2016-01-19T18:10:37.000Z
|
2022-03-26T02:43:08.000Z
|
perses/samplers/__init__.py
|
schallerdavid/perses
|
58bd6e626e027879e136f56e175683893e016f8c
|
[
"MIT"
] | 878
|
2015-09-18T19:25:30.000Z
|
2022-03-31T02:33:04.000Z
|
perses/samplers/__init__.py
|
schallerdavid/perses
|
58bd6e626e027879e136f56e175683893e016f8c
|
[
"MIT"
] | 30
|
2015-09-21T15:26:35.000Z
|
2022-01-10T20:07:24.000Z
|
from perses.samplers.samplers import *
| 19.5
| 38
| 0.820513
| 5
| 39
| 6.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102564
| 39
| 1
| 39
| 39
| 0.914286
| 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
| 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
| 6
|
cb207174c9db151c0797349e4b3c26422a817936
| 5,416
|
py
|
Python
|
test_nlp_util.py
|
kenttw/2021-bitbrain-shopee
|
f63975babc17f03718209432013e325b6eb5e39e
|
[
"Apache-2.0"
] | null | null | null |
test_nlp_util.py
|
kenttw/2021-bitbrain-shopee
|
f63975babc17f03718209432013e325b6eb5e39e
|
[
"Apache-2.0"
] | null | null | null |
test_nlp_util.py
|
kenttw/2021-bitbrain-shopee
|
f63975babc17f03718209432013e325b6eb5e39e
|
[
"Apache-2.0"
] | null | null | null |
import nlp_util
def testGC():
raw_address = 'isn s.h. & rekan, somba opu 76'
result = nlp_util.genCC(raw_address)
print(result)
assert result
def test_getPair():
# label, raw = "hanief sembilan mtr -h", "kuripan hanief semb mtr -h, gajah mada, 58112"
# print(getPair(label, raw))
raw = " ".join(['a', 'b', 'c', 'd'])
label = " ".join(['ba', '-', 'cc'])
assert nlp_util.get_fuzzy_pairs(raw, label) == [1, [('ba', 'b'), ('-', None), ('cc', 'c')]]
raw = " ".join(['b', '-', 'c', 'd'])
label = " ".join(['ba', 'cc'])
assert nlp_util.get_fuzzy_pairs(raw, label) == [0, [('ba', 'b'), ('cc', 'c')]]
raw = ['a', 'b', 'c', 'd']
label = ['ba', 'cc']
assert nlp_util.get_fuzzy_pairs(raw, label) == [1, [('ba', 'b'), ('cc', 'c')]]
def test_get_range_kent():
label,raw = "hanief sembilan mtr -h", "kuripan hanief semb mtr -h, gajah mada, 58112"
result = nlp_util.get_range_kent(label,raw)
print(result)
assert raw[result[0]:result[1]] == 'hanief semb mtr -h'
def test_get_bio_tagging_range():
print("")
# case 1:
poi,street,raw = "toko bb kids", "raya samb gede", "xxx raya. sa-mb gede, 299 toko bb k&ids yyy",
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,street,poi)
print("case1")
print("POI==>", raw[p_start:p_end])
assert raw[p_start:p_end] == 'toko bb k&ids'
print("Street==>", raw[s_start:s_end])
assert raw[s_start:s_end] =='raya. sa-mb gede'
# case 2:
poi,street,raw = "toko bb kids", "raya samb gede", " toko bb kids, raya samb gede, 299",
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,street,poi)
print("case2")
print("POI==>", raw[p_start:p_end])
print("Street==>", raw[s_start:s_end])
# case 3:
poi,street,raw = "toko bb kids", "raya samb gede", "aaa toko bb kids, raya samb gede, 299",
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,street,poi)
print("case3")
print("POI==>", raw[p_start:p_end])
print("Street==>", raw[s_start:s_end])
poi,street,raw = "tahu jontor bung tomo ", "bung tomo", "tahu jon bung tomo bung tomo, sungai keledang samarinda seberang"
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,street,poi)
print("case4")
print("POI==>", raw[p_start:p_end])
print("Street==>", raw[s_start:s_end])
poi,street,raw = '',"citra yuda iv peru depok", "raya. sa-mb gede, 299 toko bb k&ids yyy"
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,street,poi)
print("case5")
print("POI==>", raw[p_start:p_end])
print("Street==>", raw[s_start:s_end])
print("")
# case 6:
poi,street,raw = "toko bb kids", "raya samb gede", "xxx raya. sa-mb gede, 299 toko bb k&ids yyy",
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,street,'')
print("case6")
assert p_start == None
print("Street==>", raw[s_start:s_end])
assert raw[s_start:s_end] =='raya. sa-mb gede'
print("")
# case 7:
poi,street,raw = "toko bb kids", "raya samb gede", "xxx raya. sa-mb gede, 299 toko bb k&ids yyy",
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,'',poi)
print("case7")
print("POI==>", raw[p_start:p_end])
assert raw[p_start:p_end] == 'toko bb k&ids'
assert s_start==None
poi, street, raw = 'sd neg 12 anggrek', '', 'sd negeri 12 anggrek'
p_start,p_end,s_start,s_end = nlp_util.get_bio_tagging_range(raw,street,poi)
print("case8")
print("POI==>", raw[p_start:p_end])
# print("Street==>", raw[s_start:s_end])
assert s_start == None
def test_get_bio_tagging_string():
print("")
# case 1:
poi, street, raw = "toko bb kids", "raya samb gede", "xxx raya. sa-mb gede, 299 toko bb k&ids yyy",
BIO = nlp_util.get_bio_tagging_string(raw, street, poi)
print(BIO)
print("")
poi,street,raw = None,"citra yuda iv peru depok", "raya. sa-mb gede, 299 toko bb k&ids yyy"
BIO = nlp_util.get_bio_tagging_string(raw, street, poi)
print(BIO)
poi,street,raw = "lapangan futsal sukaluyu", "tang", "xxx raya. sa-mb gede, 299 toko bb k&ids yyy"
BIO = nlp_util.get_bio_tagging_string(raw, street, poi)
print(BIO)
poi,street,raw = "lapangan futsal sukaluyu", "tang", "xxx raya. sa-mb gede, 299 toko bb k&ids yyy"
BIO = nlp_util.get_bio_tagging_string(raw, None, poi)
print(BIO)
poi,street,raw = "lapangan futsal sukaluyu", "tang", "xxx raya. sa-mb gede, 299 toko bb k&ids yyy"
BIO = nlp_util.get_bio_tagging_string(raw, None, None)
print(BIO)
def test_find_sub_list():
print("")
poi,street,raw = "tahu jontor bung tomo ", "bung tomo", "tahu jon bung tomo bung tomo, sungai keledang samarinda seberang"
p_start, p_end, s_start, s_end = nlp_util.get_bio_tagging_range(raw, street, poi)
text_splits = nlp_util.prepare_text(raw) #['tahu', 'jon', 'bung', 'tomo', 'bung', 'tomo', ',', 'sungai', 'keledang', 'samarinda', 'seberang']
p_splits = nlp_util.prepare_text(raw[p_start:p_end])
start, end = nlp_util.find_sub_list(p_splits, text_splits)
s_splits = nlp_util.prepare_text(raw[s_start:s_end])
start_2, end_2 = nlp_util.find_sub_list(s_splits, text_splits, (start,end))
set1 = set(range(start, end))
set2 = set(range(start_2, end_2))
print(start,end,start_2,end_2)
assert len(set1.intersection(set2))==0
| 37.351724
| 145
| 0.64051
| 906
| 5,416
| 3.618102
| 0.124724
| 0.053386
| 0.040574
| 0.057962
| 0.812691
| 0.763575
| 0.738865
| 0.738865
| 0.737035
| 0.71629
| 0
| 0.01793
| 0.186484
| 5,416
| 145
| 146
| 37.351724
| 0.726055
| 0.055207
| 0
| 0.51
| 0
| 0
| 0.259252
| 0
| 0
| 0
| 0
| 0
| 0.13
| 1
| 0.06
| false
| 0
| 0.01
| 0
| 0.07
| 0.35
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
cb321935a3fe0e9c8f187816524cd352184e7a6b
| 629
|
py
|
Python
|
day_1/day1.py
|
mickeelm/aoc2019
|
7fd532d2237e1cf0686c9b331a2b97515ee94c03
|
[
"Unlicense"
] | 1
|
2021-02-02T08:32:36.000Z
|
2021-02-02T08:32:36.000Z
|
day_1/day1.py
|
mickeelm/aoc2019
|
7fd532d2237e1cf0686c9b331a2b97515ee94c03
|
[
"Unlicense"
] | null | null | null |
day_1/day1.py
|
mickeelm/aoc2019
|
7fd532d2237e1cf0686c9b331a2b97515ee94c03
|
[
"Unlicense"
] | null | null | null |
def fuel_required_single_module(mass):
fuel = int(mass / 3) - 2
return fuel if fuel > 0 else 0
def fuel_required_multiple_modules(masses):
total_fuel = 0
for mass in masses:
total_fuel += fuel_required_single_module(mass)
return total_fuel
def recursive_fuel_required_single_module(mass):
total_fuel = 0
while mass := fuel_required_single_module(mass):
total_fuel += mass
return total_fuel
def recursive_fuel_required_multiple_modules(masses):
total_fuel = 0
for mass in masses:
total_fuel += recursive_fuel_required_single_module(mass)
return total_fuel
| 25.16
| 65
| 0.72814
| 89
| 629
| 4.775281
| 0.235955
| 0.190588
| 0.211765
| 0.282353
| 0.88
| 0.814118
| 0.792941
| 0.647059
| 0.315294
| 0.315294
| 0
| 0.014113
| 0.211447
| 629
| 24
| 66
| 26.208333
| 0.842742
| 0
| 0
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0
| 0
| 0.444444
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 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
| 6
|
cb4d4cf11ac360c8c881c5f2263fff2c5582e3f9
| 299
|
py
|
Python
|
Cracking the Coding Interview/ctci-solutions-master/ch-06-math-and-logic-puzzles/07-the-apocalypse.py
|
nikku1234/Code-Practise
|
94eb6680ea36efd10856c377000219285f77e5a4
|
[
"Apache-2.0"
] | 9
|
2020-07-02T06:06:17.000Z
|
2022-02-26T11:08:09.000Z
|
Cracking the Coding Interview/ctci-solutions-master/ch-06-math-and-logic-puzzles/07-the-apocalypse.py
|
nikku1234/Code-Practise
|
94eb6680ea36efd10856c377000219285f77e5a4
|
[
"Apache-2.0"
] | 1
|
2021-11-04T17:26:36.000Z
|
2021-11-04T17:26:36.000Z
|
Cracking the Coding Interview/ctci-solutions-master/ch-06-math-and-logic-puzzles/07-the-apocalypse.py
|
nikku1234/Code-Practise
|
94eb6680ea36efd10856c377000219285f77e5a4
|
[
"Apache-2.0"
] | 8
|
2021-01-31T10:31:12.000Z
|
2022-03-13T09:15:55.000Z
|
# What will the gender ratio be after every family stops having children after
# after they have a girl and not until then.
def birth_ratio():
# Everytime a child is born, there is a 0.5 chance of the baby being male
# and 0.5 chance of the baby being a girl. So the ratio is 1:1.
return 1
| 33.222222
| 78
| 0.725753
| 59
| 299
| 3.661017
| 0.627119
| 0.046296
| 0.074074
| 0.092593
| 0.203704
| 0.203704
| 0.203704
| 0
| 0
| 0
| 0
| 0.030303
| 0.227425
| 299
| 8
| 79
| 37.375
| 0.904762
| 0.849498
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 6
|
cb6279ec0b7ded0ba4cb59e073b1c143b3a2125e
| 2,197
|
py
|
Python
|
tests/test_contributors.py
|
chfw/gease
|
dc5e69840c368dab15e0929824a7c952bd7074c3
|
[
"MIT"
] | 1
|
2019-01-12T19:39:35.000Z
|
2019-01-12T19:39:35.000Z
|
tests/test_contributors.py
|
chfw/gease
|
dc5e69840c368dab15e0929824a7c952bd7074c3
|
[
"MIT"
] | 10
|
2017-10-20T07:24:49.000Z
|
2020-10-18T11:37:51.000Z
|
tests/test_contributors.py
|
chfw/gease
|
dc5e69840c368dab15e0929824a7c952bd7074c3
|
[
"MIT"
] | null | null | null |
from mock import MagicMock, patch
from nose.tools import eq_
from gease.contributors import EndPoint
from gease.exceptions import NoGeaseConfigFound
class TestPublish:
@patch("gease.contributors.get_token")
@patch("gease.contributors.Api.get_public_api")
def test_all_contributors(self, fake_api, get_token):
get_token.side_effect = [NoGeaseConfigFound]
sample_reply = [
{"login": "howdy", "url": "https://api.github.com/users/howdy"}
]
fake_api.return_value = MagicMock(
get=MagicMock(
side_effect=[
sample_reply,
{"name": "hello world", "html_url": ""},
]
)
)
repo = EndPoint("test", "repo")
contributors = repo.get_all_contributors()
eq_(
contributors,
[{"name": "hello world", "html_url": ""}],
)
@patch("gease.contributors.get_token")
@patch("gease.contributors.Api.get_public_api")
def test_private_api(self, fake_api, get_token):
get_token.side_effect = [NoGeaseConfigFound]
sample_reply = [
{"login": "howdy", "url": "https://api.github.com/users/howdy"}
]
fake_api.return_value = MagicMock(
get=MagicMock(
side_effect=[sample_reply, {"name": None, "html_url": ""}]
)
)
repo = EndPoint("test", "repo")
contributors = repo.get_all_contributors()
eq_(
contributors,
[{"name": "howdy", "html_url": ""}],
)
@patch("gease.contributors.get_token")
@patch("gease.contributors.Api.get_api")
def test_no_names(self, fake_api, _):
sample_reply = [
{"login": "howdy", "url": "https://api.github.com/users/howdy"}
]
fake_api.return_value = MagicMock(
get=MagicMock(
side_effect=[sample_reply, {"name": None, "html_url": ""}]
)
)
repo = EndPoint("test", "repo")
contributors = repo.get_all_contributors()
eq_(
contributors,
[{"name": "howdy", "html_url": ""}],
)
| 30.09589
| 75
| 0.549841
| 217
| 2,197
| 5.313364
| 0.211982
| 0.103209
| 0.114484
| 0.065048
| 0.830009
| 0.812663
| 0.812663
| 0.812663
| 0.812663
| 0.812663
| 0
| 0
| 0.311789
| 2,197
| 72
| 76
| 30.513889
| 0.762566
| 0
| 0
| 0.57377
| 0
| 0
| 0.208011
| 0.085571
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04918
| false
| 0
| 0.065574
| 0
| 0.131148
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
cb8d02b22bb2917353763bb8532feaa16e03096a
| 202
|
py
|
Python
|
Server/Python/src/dbs/dao/MySQL/File/MgrtList.py
|
vkuznet/DBS
|
14df8bbe8ee8f874fe423399b18afef911fe78c7
|
[
"Apache-2.0"
] | 8
|
2015-08-14T04:01:32.000Z
|
2021-06-03T00:56:42.000Z
|
Server/Python/src/dbs/dao/MySQL/File/MgrtList.py
|
yuyiguo/DBS
|
14df8bbe8ee8f874fe423399b18afef911fe78c7
|
[
"Apache-2.0"
] | 162
|
2015-01-07T21:34:47.000Z
|
2021-10-13T09:42:41.000Z
|
Server/Python/src/dbs/dao/MySQL/File/MgrtList.py
|
yuyiguo/DBS
|
14df8bbe8ee8f874fe423399b18afef911fe78c7
|
[
"Apache-2.0"
] | 16
|
2015-01-22T15:27:29.000Z
|
2021-04-28T09:23:28.000Z
|
#!/usr/bin/env python
"""
This module provides File.MgrtList data access object.
"""
from dbs.dao.Oracle.File.MgrtList import MgrtList as OraFileMgrtList
class MgrtList(OraFileMgrtList):
pass
| 20.2
| 68
| 0.752475
| 26
| 202
| 5.846154
| 0.807692
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148515
| 202
| 9
| 69
| 22.444444
| 0.883721
| 0.371287
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 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
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 6
|
cbd3598d91ff793b9cf6d9fdbee232e97be7c505
| 35,768
|
py
|
Python
|
morphological_analysis_v4.py
|
rivernuthead/DoD_analysis
|
b06219d4026e89a9b9f1e8939010a63612750c80
|
[
"MIT"
] | null | null | null |
morphological_analysis_v4.py
|
rivernuthead/DoD_analysis
|
b06219d4026e89a9b9f1e8939010a63612750c80
|
[
"MIT"
] | null | null | null |
morphological_analysis_v4.py
|
rivernuthead/DoD_analysis
|
b06219d4026e89a9b9f1e8939010a63612750c80
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 25 16:02:58 2022
@author: erri
"""
import os
import numpy as np
import math
from morph_quantities_func_v2 import morph_quantities
import matplotlib.pyplot as plt
# SINGLE RUN NAME
run = 'q07_1'
DoD_name = 'DoD_s1-s0_filt_nozero_rst.txt'
# Step between surveys
DoD_delta = 1
# Base length in terms of columns. If the windows dimensions are channel width
# multiples, the windows_length_base is 12 columns
windows_length_base = 12
window_mode = 1
'''
windows_mode:
0 = fixed windows (all the channel)
1 = expanding window
2 = floating fixed windows (WxW, Wx2W, Wx3W, ...) without overlapping
3 = floating fixed windows (WxW, Wx2W, Wx3W, ...) with overlapping
'''
plot_mode = 2
'''
plot_mode:
1 = only summary plot
2 = all single DoD plot
'''
# Parameters
# Survey pixel dimension
px_x = 50 # [mm]
px_y = 5 # [mm]
W = 0.6 # Width [m]
d50 = 0.001
NaN = -999
# setup working directory and DEM's name
home_dir = os.getcwd()
# Source DoDs folder
DoDs_folder = os.path.join(home_dir, 'DoDs', 'DoD_'+run)
DoDs_name_array = [] # List the file's name of the DoDs with step of delta_step
for f in sorted(os.listdir(DoDs_folder)):
if f.endswith('_filt_nozero_rst.txt') and f.startswith('DoD_'):
delta = eval(f[5]) - eval(f[8])
if delta == DoD_delta:
DoDs_name_array = np.append(DoDs_name_array, f)
else:
pass
# Initialize overall arrays
dep_vol_w_array_all = []
sco_vol_w_array_all = []
# Loop over the DoDs with step of delta_step
for f in DoDs_name_array:
DoD_name = f
print(f)
DoD_path = os.path.join(DoDs_folder,DoD_name)
DoD_filt_nozero = np.loadtxt(DoD_path, delimiter='\t')
# DoD length
DoD_length = DoD_filt_nozero.shape[1]*px_x/1000 # DoD length [m]
dim_x = DoD_filt_nozero.shape[1]
# Initialize array
# Define total volume matrix, Deposition matrix and Scour matrix
DoD_vol = np.where(np.isnan(DoD_filt_nozero), 0, DoD_filt_nozero) # Total volume matrix
DoD_vol = np.where(DoD_vol==NaN, 0, DoD_vol)
dep_DoD = (DoD_vol>0)*DoD_vol # DoD of only deposition data
sco_DoD = (DoD_vol<0)*DoD_vol # DoD of only scour data
# Active pixel matrix:
act_px_matrix = np.where(DoD_vol!=0, 1, 0) # Active pixel matrix, both scour and deposition
act_px_matrix_dep = np.where(dep_DoD != 0, 1, 0) # Active deposition matrix
act_px_matrix_sco = np.where(sco_DoD != 0, 1, 0) # Active scour matrix
# Initialize array for each window dimension
###################################################################
# MOVING WINDOWS ANALYSIS
###################################################################
array = DoD_filt_nozero
W=windows_length_base
mean_array_tot = []
std_array_tot= []
window_boundary = np.array([0,0])
x_data_tot=[]
tot_vol_array=[] # Tot volume
tot_vol_mean_array=[]
tot_vol_std_array=[]
sum_vol_array=[] # Sum of scour and deposition volume
dep_vol_array=[] # Deposition volume
sco_vol_array=[] # Scour volume
morph_act_area_array=[] # Total active area array
morph_act_area_dep_array=[] # Deposition active area array
morph_act_area_sco_array=[] # Active active area array
act_width_mean_array=[] # Total active width mean array
act_width_mean_dep_array=[] # Deposition active width mean array
act_width_mean_sco_array=[] # Scour active width mean array
if window_mode == 1:
# With overlapping
for w in range(1, int(math.floor(array.shape[1]/W))+1): # W*w is the dimension of every possible window
# Initialize arrays that stock data for each window position
x_data=[]
tot_vol_w_array = []
sum_vol_w_array = []
dep_vol_w_array = []
sco_vol_w_array =[]
morph_act_area_w_array = []
morph_act_area_dep_w_array = []
morph_act_area_sco_w_array = []
act_width_mean_w_array = []
act_width_mean_dep_w_array = []
act_width_mean_sco_w_array = []
act_thickness_w_array = []
act_thickness_dep_w_array = []
act_thickness_sco_w_array = []
for i in range(0, array.shape[1]+1):
if i+w*W <= array.shape[1]:
window = array[:, i:W*w+i]
boundary = np.array([i,W*w+i])
window_boundary = np.vstack((window_boundary, boundary))
x_data=np.append(x_data, w)
# Calculate morphological quantities
tot_vol, sum_vol, dep_vol, sco_vol, morph_act_area, morph_act_area_dep, morph_act_area_sco, act_width_mean, act_width_mean_dep, act_width_mean_sco, act_thickness, act_thickness_dep, act_thickness_sco = morph_quantities(window)
# Append single data to array
# For each window position the calculated parameters will be appended to _array
tot_vol_w_array=np.append(tot_vol_w_array, tot_vol)
sum_vol_w_array=np.append(sum_vol_w_array, sum_vol)
dep_vol_w_array=np.append(dep_vol_w_array, dep_vol)
sco_vol_w_array=np.append(sco_vol_w_array, sco_vol)
morph_act_area_w_array=np.append(morph_act_area_w_array, morph_act_area)
morph_act_area_dep_w_array=np.append(morph_act_area_dep_w_array, morph_act_area_dep)
morph_act_area_sco_w_array=np.append(morph_act_area_sco_w_array, morph_act_area_sco)
act_width_mean_w_array=np.append(act_width_mean_w_array, act_width_mean)
act_width_mean_dep_w_array=np.append(act_width_mean_dep_w_array, act_width_mean_dep)
act_width_mean_sco_w_array=np.append(act_width_mean_sco_w_array, act_width_mean_sco)
act_thickness_w_array=np.append(act_thickness_w_array, act_thickness)
act_thickness_dep_w_array=np.append(act_thickness_dep_w_array, act_thickness_dep)
act_thickness_sco_w_array=np.append(act_thickness_sco_w_array, act_thickness_sco)
# For each window dimension w*W,
x_data_tot=np.append(x_data_tot, np.nanmean(x_data)) # Append one value of x_data
tot_vol_mean_array=np.append(tot_vol_mean_array, np.nanmean(tot_vol_w_array)) # Append the tot_vol_array mean
tot_vol_std_array=np.append(tot_vol_std_array, np.nanstd(tot_vol_w_array)) # Append the tot_vol_array mean
# sum_vol_array=
# dep_vol_array=
# sco_vol_array=
# morph_act_area_array=
# morph_act_area_dep_array=
# morph_act_area_sco_array=
# act_width_mean_array=
# act_width_mean_dep_array=
# act_width_mean_sco_array=
# Slice window boundaries array to delete [0,0] when initialized
window_boundary = window_boundary[1,:]
if window_mode == 2:
# Without overlapping
for w in range(1, int(math.floor(array.shape[1]/W))+1): # W*w is the dimension of every possible window
mean_array = []
std_array= []
x_data=[]
for i in range(0, array.shape[1]+1):
if W*w*(i+1) <= array.shape[1]:
window = array[:, W*w*i:W*w*(i+1)]
boundary = np.array([W*w*i,W*w*(i+1)])
window_boundary = np.vstack((window_boundary, boundary))
mean = np.nanmean(window)
std = np.nanstd(window)
mean_array = np.append(mean_array, mean)
std_array = np.append(std_array, std)
x_data=np.append(x_data, w)
mean_array_tot = np.append(mean_array_tot, np.nanmean(mean_array))
std_array_tot= np.append(std_array_tot, np.nanstd(std_array)) #TODO check this
x_data_tot=np.append(x_data_tot, np.nanmean(x_data))
# Slice window boundaries array to delete [0,0] when initialized
window_boundary = window_boundary[1,:]
if window_mode == 3:
# Increasing window dimension keeping still the upstream cross section
mean_array = []
std_array= []
x_data=[]
for i in range(0, array.shape[1]+1):
if W*(i+1) <= array.shape[1]:
window = array[:, 0:W*(i+1)]
boundary = np.array([0,W*(i+1)])
window_boundary = np.vstack((window_boundary, boundary))
mean = np.nanmean(window)
std = np.nanstd(window)
mean_array = np.append(mean_array, mean)
std_array = np.append(std_array, std)
x_data=np.append(x_data, i)
mean_array_tot = np.append(mean_array_tot, np.nanmean(mean_array))
std_array_tot= np.append(std_array_tot, np.nanstd(std_array)) #TODO check this
x_data_tot=np.append(x_data_tot, np.nanmean(x_data))
# Slice window boundaries array to delete [0,0] when initialized
window_boundary = window_boundary[1,:]
# # TODO Go on with this section
# if windows_mode == 1:
# # Define x_data for plots
# x_data = np.linspace(W,dim_x,math.floor(DoD_length/W))*px_x/1e03
# for n in range(1,math.floor(DoD_length/W)+1):
# w_cols = n*round(W/(px_x/1000)) # Window analysis length in number of columns
# w_len = round(n*W,1) # Window analysis lenght im meter [m]
# # Define total volume matrix, Deposition matrix and Scour matrix
# DoD_vol_w = DoD_vol[:,0:w_cols] # Total volume matrix
# dep_DoD_w = dep_DoD[:,0:w_cols] # DoD of only deposition data
# sco_DoD_w = sco_DoD[:,0:w_cols] # DoD of only scour data
# # Define active pixel matrix
# act_px_matrix_w = act_px_matrix[:,0:w_cols] # Active pixel matrix, both scour and deposition
# act_px_matrix_dep_w = act_px_matrix_dep[:,0:w_cols] # Active deposition matrix
# act_px_matrix_sco_w = act_px_matrix_sco[:,0:w_cols] # Active scour matrix
# # Calculate principal quantities:
# # Volumes
# tot_vol_w = np.sum(DoD_vol_w)*px_x*px_y/(W*w_len*d50*1e09)# Total volume as V/(L*W*d50) [-] considering negative sign for scour
# sum_vol_w = np.sum(np.abs(DoD_vol_w))*px_x*px_y/(W*w_len*d50*1e09) # Sum of scour and deposition volume as V/(L*W*d50) [-]
# dep_vol_w = np.sum(dep_DoD_w)*px_x*px_y/(W*w_len*d50*1e09) # Deposition volume as V/(L*W*d50) [-]
# sco_vol_w = np.sum(sco_DoD_w)*px_x*px_y/(W*w_len*d50*1e09) # Scour volume as V/(L*W*d50) [-]
# # Areas:
# morph_act_area_w = np.count_nonzero(act_px_matrix_w)*px_x*px_y/(W*w_len*1e06) # Active area both in terms of scour and deposition as A/(W*L) [-]
# morph_act_area_dep_w = np.count_nonzero(act_px_matrix_dep_w)*px_x*px_y/(W*w_len*1e06) # Active deposition area as A/(W*L) [-]
# morph_act_area_sco_w = np.count_nonzero(act_px_matrix_sco_w)*px_x*px_y/(W*w_len*1e06) # Active scour area as A/(W*L) [-]
# # Widths:
# act_width_mean_w = np.count_nonzero(act_px_matrix_w)*px_x*px_y/(W*w_len*1e06) # Total mean active width [%] - Wact/W
# act_width_mean_dep_w = np.count_nonzero(act_px_matrix_dep_w)*px_x*px_y/(W*w_len*1e06) # Deposition mean active width [%] - Wact/W
# act_width_mean_sco_w = np.count_nonzero(act_px_matrix_sco_w)*px_x*px_y/(W*w_len*1e06) # Scour mean active width [%] - Wact/W
# # Thicknesses:
# act_thickness_w = sum_vol_w/morph_act_area_w*(d50*1e03) # Total active thickness (abs(V_sco) + V_dep)/act_area [mm]
# act_thickness_dep_w = dep_vol_w/morph_act_area_dep_w*(d50*1e03) # Deposition active thickness V_dep/act_area [mm]
# act_thickness_sco_w = sco_vol_w/act_width_mean_sco_w*(d50*1e03) # Scour active thickness V_sco/act_area [mm]
# # Append all values in arrays
# tot_vol_w_array = np.append(tot_vol_w_array, tot_vol_w)
# sum_vol_w_array = np.append(sum_vol_w_array, sum_vol_w)
# dep_vol_w_array = np.append(dep_vol_w_array, dep_vol_w)
# sco_vol_w_array = np.append(sco_vol_w_array, sco_vol_w)
# morph_act_area_w_array = np.append(morph_act_area_w_array, morph_act_area_w)
# morph_act_area_dep_w_array = np.append(morph_act_area_dep_w_array, morph_act_area_dep_w)
# morph_act_area_sco_w_array = np.append(morph_act_area_sco_w_array, morph_act_area_sco_w)
# act_width_mean_w_array = np.append(act_width_mean_w_array, act_width_mean_w)
# act_width_mean_dep_w_array = np.append(act_width_mean_dep_w_array, act_width_mean_dep_w)
# act_width_mean_sco_w_array = np.append(act_width_mean_sco_w_array, act_width_mean_sco_w)
# act_thickness_w_array = np.append(act_thickness_w_array, act_thickness_w)
# act_thickness_dep_w_array = np.append(act_thickness_dep_w_array, act_thickness_dep_w)
# act_thickness_sco_w_array = np.append(act_thickness_sco_w_array, act_thickness_sco_w)
# if plot_mode ==2:
# # Plots
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, dep_vol_w_array, '-', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Deposition volumes V/(W*L*d50) [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, sco_vol_w_array, '-', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Scour volumes V/(W*L*d50) [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, act_width_mean_w_array, '-', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Active width actW/W [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, act_thickness_w_array, '-', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Longitudinal coordinate [m]')
# axs.set_ylabel('Active thickness [mm]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# # Fixed window without overlapping
# if windows_mode == 2:
# # Calculate the number of suitable windows in the channel length
# c_array = []
# W_cols = int(W/px_x*1e03)
# for i in range(1, round(dim_x/W_cols)):
# c = math.floor(dim_x/(W_cols*i))
# if c*W_cols*i<=dim_x:
# c_array = np.append(c_array, c)
# else:
# pass
# # Define the components of the slicing operation (exclude the first one)
# f_cols_array = [0,0]
# x_data = [] # X data for the plot
# n = 0 # Initialize variable count
# for m in range(0,len(c_array)):
# # m is the window dimension in columns
# n+=1
# for i in range(1,(math.floor(dim_x/(W_cols*(m+1)))+1)):
# f_cols = [round(W_cols*(m+1)*(i-1), 1), round(W_cols*(m+1)*(i),1)]
# f_cols_array = np.vstack((f_cols_array, f_cols))
# x_data = np.append(x_data, n)
# x_data = (x_data)*W
# # Resize f_cols_array
# f_cols_array = f_cols_array[1:]
# for p in range(0, f_cols_array.shape[0]): # Loop over all the available window
# w_len = (f_cols_array[p,1] - f_cols_array[p,0])*px_x/1e03 # Define the window lwgth
# # Define total volume matrix, Deposition matrix and Scour matrix
# DoD_vol_w = DoD_vol[:, f_cols_array[p,0]:f_cols_array[p,1]] # Total volume matrix
# dep_DoD_w = dep_DoD[:, f_cols_array[p,0]:f_cols_array[p,1]] # DoD of only deposition data
# sco_DoD_w = sco_DoD[:, f_cols_array[p,0]:f_cols_array[p,1]] # DoD of only scour data
# # Define active pixel matrix
# act_px_matrix_w = act_px_matrix[:, f_cols_array[p,0]:f_cols_array[p,1]] # Active pixel matrix, both scour and deposition
# act_px_matrix_dep_w = act_px_matrix_dep[:, f_cols_array[p,0]:f_cols_array[p,1]] # Active deposition matrix
# act_px_matrix_sco_w = act_px_matrix_sco[:, f_cols_array[p,0]:f_cols_array[p,1]] # Active scour matrix
# # Calculate principal quantities:
# # Volumes
# tot_vol_w = np.sum(DoD_vol_w)*px_x*px_y/(W*w_len*d50*1e09)# Total volume as V/(L*W*d50) [-] considering negative sign for scour
# sum_vol_w = np.sum(np.abs(DoD_vol_w))*px_x*px_y/(W*w_len*d50*1e09) # Sum of scour and deposition volume as V/(L*W*d50) [-]
# dep_vol_w = np.sum(dep_DoD_w)*px_x*px_y/(W*w_len*d50*1e09) # Deposition volume as V/(L*W*d50) [-]
# sco_vol_w = np.sum(sco_DoD_w)*px_x*px_y/(W*w_len*d50*1e09) # Scour volume as V/(L*W*d50) [-]
# # Areas:
# morph_act_area_w = np.count_nonzero(act_px_matrix_w)*px_x*px_y/(W*w_len*1e06) # Active area both in terms of scour and deposition as A/(W*L) [-]
# morph_act_area_dep_w = np.count_nonzero(act_px_matrix_dep_w)*px_x*px_y/(W*w_len*1e06) # Active deposition area as A/(W*L) [-]
# morph_act_area_sco_w = np.count_nonzero(act_px_matrix_sco_w)*px_x*px_y/(W*w_len*1e06) # Active scour area as A/(W*L) [-]
# # Widths:
# act_width_mean_w = np.count_nonzero(act_px_matrix_w)*px_x*px_y/(W*w_len*1e06) # Total mean active width [%] - Wact/W
# act_width_mean_dep_w = np.count_nonzero(act_px_matrix_dep_w)*px_x*px_y/(W*w_len*1e06) # Deposition mean active width [%] - Wact/W
# act_width_mean_sco_w = np.count_nonzero(act_px_matrix_sco_w)*px_x*px_y/(W*w_len*1e06) # Scour mean active width [%] - Wact/W
# # Thicknesses:
# act_thickness_w = sum_vol_w/morph_act_area_w*(d50*1e03) # Total active thickness (abs(V_sco) + V_dep)/act_area [mm]
# act_thickness_dep_w = dep_vol_w/morph_act_area_dep_w*(d50*1e03) # Deposition active thickness V_dep/act_area [mm]
# act_thickness_sco_w = sco_vol_w/act_width_mean_sco_w*(d50*1e03) # Scour active thickness V_sco/act_area [mm]
# # Append all values in arrays
# tot_vol_w_array = np.append(tot_vol_w_array, tot_vol_w)
# sum_vol_w_array = np.append(sum_vol_w_array, sum_vol_w)
# dep_vol_w_array = np.append(dep_vol_w_array, dep_vol_w)
# sco_vol_w_array = np.append(sco_vol_w_array, sco_vol_w)
# morph_act_area_w_array = np.append(morph_act_area_w_array, morph_act_area_w)
# morph_act_area_dep_w_array = np.append(morph_act_area_dep_w_array, morph_act_area_dep_w)
# morph_act_area_sco_w_array = np.append(morph_act_area_sco_w_array, morph_act_area_sco_w)
# act_width_mean_w_array = np.append(act_width_mean_w_array, act_width_mean_w)
# act_width_mean_dep_w_array = np.append(act_width_mean_dep_w_array, act_width_mean_dep_w)
# act_width_mean_sco_w_array = np.append(act_width_mean_sco_w_array, act_width_mean_sco_w)
# act_thickness_w_array = np.append(act_thickness_w_array, act_thickness_w)
# act_thickness_dep_w_array = np.append(act_thickness_dep_w_array, act_thickness_dep_w)
# act_thickness_sco_w_array = np.append(act_thickness_sco_w_array, act_thickness_sco_w)
# if plot_mode ==2:
# # Plots
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, dep_vol_w_array, 'o', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Deposition volumes V/(W*L*d50) [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, sco_vol_w_array, 'o', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Scour volumes V/(W*L*d50) [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, act_width_mean_w_array, 'o', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Active width actW/W [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, act_thickness_w_array, 'o', c='brown')
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Active thickness [mm]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# # Fixed window with overlapping
# if windows_mode == 3:
# # Calculate the number of suitable windows in the channel length
# c_array = []
# W_cols = int(W/px_x*1e03) # Minimum windows length WxW dimension in columns
# for i in range(1, math.floor(dim_x/W_cols)+1): # per each windows analysis WxWi
# c = dim_x - W_cols*i
# c_array = np.append(c_array, c) # Contains the number of windows for each dimension WxW*i
# else:
# pass
# f_cols_array = [0,0]
# x_data = []
# n = 0
# for m in range(1,int(dim_x/W_cols)+1):
# w_length = m*W_cols # Analysis windows length
# # print(w_length)
# n+=1
# for i in range(0,dim_x): # i is the lower limit of the analysis window
# low_lim = i # Analisys window lower limit
# upp_lim = i + w_length # Analisys window upper limit
# if upp_lim<=dim_x:
# # print(low_lim, upp_lim)
# # print(i+w_length)
# f_cols = [low_lim, upp_lim] # Lower and upper boundary of the analysis window
# f_cols_array = np.vstack((f_cols_array, f_cols))
# x_data = np.append(x_data, n)
# else:
# pass
# x_data = x_data*W
# # Resize f_cols_array
# f_cols_array = f_cols_array[1:]
# for p in range(0, f_cols_array.shape[0]):
# w_len = (f_cols_array[p,1] - f_cols_array[p,0])*px_x/1e03 # Define the window length
# # print()
# # print(f_cols_array[p,:])
# # print(w_len)
# # Define total volume matrix, Deposition matrix and Scour matrix
# DoD_vol_w = DoD_vol[:, f_cols_array[p,0]:f_cols_array[p,1]] # Total volume matrix
# dep_DoD_w = dep_DoD[:, f_cols_array[p,0]:f_cols_array[p,1]] # DoD of only deposition data
# sco_DoD_w = sco_DoD[:, f_cols_array[p,0]:f_cols_array[p,1]] # DoD of only scour data
# # Define active pixel matrix
# act_px_matrix_w = act_px_matrix[:, f_cols_array[p,0]:f_cols_array[p,1]] # Active pixel matrix, both scour and deposition
# act_px_matrix_dep_w = act_px_matrix_dep[:, f_cols_array[p,0]:f_cols_array[p,1]] # Active deposition matrix
# act_px_matrix_sco_w = act_px_matrix_sco[:, f_cols_array[p,0]:f_cols_array[p,1]] # Active scour matrix
# # Calculate principal quantities:
# # Volumes
# tot_vol_w = np.sum(DoD_vol_w)*px_x*px_y/(W*w_len*d50*1e09)# Total volume as V/(L*W*d50) [-] considering negative sign for scour
# sum_vol_w = np.sum(np.abs(DoD_vol_w))*px_x*px_y/(W*w_len*d50*1e09) # Sum of scour and deposition volume as V/(L*W*d50) [-]
# dep_vol_w = np.sum(dep_DoD_w)*px_x*px_y/(W*w_len*d50*1e09) # Deposition volume as V/(L*W*d50) [-]
# sco_vol_w = np.sum(sco_DoD_w)*px_x*px_y/(W*w_len*d50*1e09) # Scour volume as V/(L*W*d50) [-]
# # Areas:
# morph_act_area_w = np.count_nonzero(act_px_matrix_w)*px_x*px_y/(W*w_len*1e06) # Active area both in terms of scour and deposition as A/(W*L) [-]
# morph_act_area_dep_w = np.count_nonzero(act_px_matrix_dep_w)*px_x*px_y/(W*w_len*1e06) # Active deposition area as A/(W*L) [-]
# morph_act_area_sco_w = np.count_nonzero(act_px_matrix_sco_w)*px_x*px_y/(W*w_len*1e06) # Active scour area as A/(W*L) [-]
# # Widths:
# act_width_mean_w = np.count_nonzero(act_px_matrix_w)*px_x*px_y/(W*w_len*1e06) # Total mean active width [%] - Wact/W
# act_width_mean_dep_w = np.count_nonzero(act_px_matrix_dep_w)*px_x*px_y/(W*w_len*1e06) # Deposition mean active width [%] - Wact/W
# act_width_mean_sco_w = np.count_nonzero(act_px_matrix_sco_w)*px_x*px_y/(W*w_len*1e06) # Scour mean active width [%] - Wact/W
# # Thicknesses:
# act_thickness_w = sum_vol_w/morph_act_area_w*(d50*1e03) # Total active thickness (abs(V_sco) + V_dep)/act_area [mm]
# act_thickness_dep_w = dep_vol_w/morph_act_area_dep_w*(d50*1e03) # Deposition active thickness V_dep/act_area [mm]
# act_thickness_sco_w = sco_vol_w/act_width_mean_sco_w*(d50*1e03) # Scour active thickness V_sco/act_area [mm]
# # Append all values in arrays
# tot_vol_w_array = np.append(tot_vol_w_array, tot_vol_w)
# sum_vol_w_array = np.append(sum_vol_w_array, sum_vol_w)
# dep_vol_w_array = np.append(dep_vol_w_array, dep_vol_w)
# sco_vol_w_array = np.append(sco_vol_w_array, sco_vol_w)
# morph_act_area_w_array = np.append(morph_act_area_w_array, morph_act_area_w)
# morph_act_area_dep_w_array = np.append(morph_act_area_dep_w_array, morph_act_area_dep_w)
# morph_act_area_sco_w_array = np.append(morph_act_area_sco_w_array, morph_act_area_sco_w)
# act_width_mean_w_array = np.append(act_width_mean_w_array, act_width_mean_w)
# act_width_mean_dep_w_array = np.append(act_width_mean_dep_w_array, act_width_mean_dep_w)
# act_width_mean_sco_w_array = np.append(act_width_mean_sco_w_array, act_width_mean_sco_w)
# act_thickness_w_array = np.append(act_thickness_w_array, act_thickness_w)
# act_thickness_dep_w_array = np.append(act_thickness_dep_w_array, act_thickness_dep_w)
# act_thickness_sco_w_array = np.append(act_thickness_sco_w_array, act_thickness_sco_w)
# if plot_mode ==2:
# # Plots
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, dep_vol_w_array, 'o', c='brown', markersize=0.1)
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Deposition volumes V/(W*L*d50) [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, sco_vol_w_array, 'o', c='brown', markersize=0.1)
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Scour volumes V/(W*L*d50) [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, act_width_mean_w_array, 'o', c='brown', markersize=0.1)
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Active width actW/W [-]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# axs.plot(x_data, act_thickness_w_array, 'o', c='brown', markersize=0.1)
# axs.set_title(run)
# axs.set_xlabel('Window analysis length [m]')
# axs.set_ylabel('Active thickness [mm]')
# # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# plt.show()
# if f == DoDs_name_array[0]:
# dep_vol_w_array_all = np.transpose(np.array(dep_vol_w_array))
# sco_vol_w_array_all = np.transpose(np.array(sco_vol_w_array))
# else:
# pass
# dep_vol_w_array_all = np.vstack((dep_vol_w_array_all,dep_vol_w_array))
# dep_vol_mean = np.mean(dep_vol_w_array_all, axis=0)
# dep_vol_std = np.std(dep_vol_w_array_all, axis=0)
# sco_vol_w_array_all = np.vstack((sco_vol_w_array_all,sco_vol_w_array))
# sco_vol_mean = np.mean(sco_vol_w_array_all, axis=0)
# sco_vol_std = np.std(sco_vol_w_array_all, axis=0)
# if windows_mode==2:
# # Loop to define the windows to clusterize data
# array = [0]
# num=0
# for n in range(0,len(c_array)):
# num += c_array[n]
# array = np.append(array, num) # Clusterize window dimension
# dep_vol_mean = []
# sco_vol_mean = []
# dep_vol_std = []
# sco_vol_std = []
# x_data_full = x_data
# x_data = []
# for n in range(0, len(array)-1):
# x_data = np.append(x_data, x_data_full[int(array[n])])
# for n in f_cols_array:
# dep_vol_mean = np.append(dep_vol_mean, np.mean(dep_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# sco_vol_mean = np.append(sco_vol_mean, np.mean(sco_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# dep_vol_std = np.append(dep_vol_std, np.std(dep_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# sco_vol_std = np.append(sco_vol_std, np.std(sco_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# # To finish
# if windows_mode == 3:
# # Loop to define the windows to clusterize data
# array = [0]
# num=0
# for n in range(0,len(c_array)):
# num += c_array[n]
# array = np.append(array, num) # Clusterize window dimension
# dep_vol_mean = []
# sco_vol_mean = []
# dep_vol_std = []
# sco_vol_std = []
# x_data_full = x_data
# x_data = []
# for n in range(0, len(array)-1):
# # low_lim = int(f_cols_array[n,0])
# # upp_lim = int(f_cols_array[n,1])
# x_data = np.append(x_data, round(x_data_full[int(array[n])+n],1))
# # dep_vol_mean = np.append(dep_vol_mean, np.mean(dep_vol_w_array_all[:,low_lim:upp_lim]))
# # sco_vol_mean = np.append(sco_vol_mean, np.mean(sco_vol_w_array_all[:,low_lim:upp_lim]))
# # dep_vol_std = np.append(dep_vol_std, np.std(dep_vol_w_array_all[:,low_lim:upp_lim]))
# # sco_vol_std = np.append(sco_vol_std, np.std(sco_vol_w_array_all[:,low_lim:upp_lim]))
# dep_vol_mean = np.append(dep_vol_mean, np.mean(dep_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# sco_vol_mean = np.append(sco_vol_mean, np.mean(sco_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# dep_vol_std = np.append(dep_vol_std, np.std(dep_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# sco_vol_std = np.append(sco_vol_std, np.std(sco_vol_w_array_all[:,int(array[n]):int(array[n+1])]))
# # print(int(array[n]),int(array[n+1]))
# # TODO To finish
# fig3, axs = plt.subplots(2,1,dpi=80, figsize=(10,6), sharex=True, tight_layout=True)
# fig3.suptitle(run + ' - Volume')
# axs[0].errorbar(x_data, sco_vol_mean, sco_vol_std, linestyle='--', marker='^', color='red')
# # axs[0].set_ylim(bottom=0)
# axs[0].set_title('Scour')
# # axs[0].set_xlabel()
# axs[0].set_ylabel('Scour volume V/(L*W*d50) [-]')
# axs[1].errorbar(x_data, dep_vol_mean, dep_vol_std, linestyle='--', marker='^', color='blue')
# axs[1].set_ylim(bottom=0)
# axs[1].set_title('Deposition')
# axs[1].set_xlabel('Analysis window length [m]')
# axs[1].set_ylabel('Deposition volume V/(L*W*d50) [-]')
# # plt.savefig(os.path.join(plot_dir, run +'dep_scour.png'), dpi=200)
# plt.show()
# # # Plots
# # fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# # axs.plot(x_data, dep_vol_w_array, 'o', c='brown')
# # axs.set_title(run)
# # axs.set_xlabel('Longitudinal coordinate [m]')
# # axs.set_ylabel('Deposition volumes V/(W*L*d50) [-]')
# # # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# # plt.show()
# # fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# # axs.plot(x_data, sco_vol_w_array, 'o', c='brown')
# # axs.set_title(run)
# # axs.set_xlabel('Longitudinal coordinate [m]')
# # axs.set_ylabel('Scour volumes V/(W*L*d50) [-]')
# # # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# # plt.show()
# # fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# # axs.plot(x_data, act_width_mean_w_array, 'o', c='brown')
# # axs.set_title(run)
# # axs.set_xlabel('Longitudinal coordinate [m]')
# # axs.set_ylabel('Active width actW/W [-]')
# # # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# # plt.show()
# # fig1, axs = plt.subplots(1,1,dpi=200, sharex=True, tight_layout=True)
# # axs.plot(x_data, act_thickness_w_array, 'o', c='brown')
# # axs.set_title(run)
# # axs.set_xlabel('Longitudinal coordinate [m]')
# # axs.set_ylabel('Active thickness [mm]')
# # # plt.savefig(os.path.join(plot_dir, run +'_morphW_interp.png'), dpi=200)
# # plt.show()
| 50.87909
| 246
| 0.605374
| 5,536
| 35,768
| 3.562681
| 0.053107
| 0.049891
| 0.033768
| 0.036911
| 0.840136
| 0.812148
| 0.787152
| 0.763423
| 0.744714
| 0.734219
| 0
| 0.023415
| 0.270465
| 35,768
| 703
| 247
| 50.87909
| 0.732429
| 0.742256
| 0
| 0.255474
| 0
| 0
| 0.008343
| 0.003558
| 0
| 0
| 0
| 0.001422
| 0
| 1
| 0
| false
| 0.007299
| 0.036496
| 0
| 0.036496
| 0.007299
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
1dab593015997d8eba3dbafe4c8fcbe0f12b7e14
| 35
|
py
|
Python
|
build/lib/zorb/models/__init__.py
|
varunranga/zorb
|
ffad98d15c3200eafc1b10c68860ce34ebf78f62
|
[
"MIT"
] | 3
|
2021-05-13T16:28:39.000Z
|
2022-02-18T23:10:35.000Z
|
src/zorb/models/__init__.py
|
varunranga/zorb
|
ffad98d15c3200eafc1b10c68860ce34ebf78f62
|
[
"MIT"
] | null | null | null |
src/zorb/models/__init__.py
|
varunranga/zorb
|
ffad98d15c3200eafc1b10c68860ce34ebf78f62
|
[
"MIT"
] | null | null | null |
from .Sequential import Sequential
| 17.5
| 34
| 0.857143
| 4
| 35
| 7.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 35
| 1
| 35
| 35
| 0.967742
| 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
| 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
| 6
|
1db9f8268801e37ed09678dd7bdfdf9e618fd8da
| 2,324
|
py
|
Python
|
tests/test_nestedprops.py
|
atviriduomenys/spinta
|
77a10e201f8cdc63143fce7996fd0898acb1ff58
|
[
"MIT"
] | 2
|
2019-03-14T06:41:14.000Z
|
2019-03-26T11:48:14.000Z
|
tests/test_nestedprops.py
|
sirex/spinta
|
77a10e201f8cdc63143fce7996fd0898acb1ff58
|
[
"MIT"
] | 44
|
2019-04-05T15:52:45.000Z
|
2022-03-30T07:41:33.000Z
|
tests/test_nestedprops.py
|
sirex/spinta
|
77a10e201f8cdc63143fce7996fd0898acb1ff58
|
[
"MIT"
] | 1
|
2019-04-01T09:54:27.000Z
|
2019-04-01T09:54:27.000Z
|
import pytest
@pytest.mark.models(
'backends/mongo/report',
'backends/postgres/report',
)
def test_update_object(model, app):
app.authmodel(model, ['insert', 'patch', 'getone'])
resp = app.post(f'/{model}', json={
'status': 'ok',
'sync': {
'sync_revision': '1',
'sync_resources': [
{
'sync_id': '2',
'sync_source': 'report'
}
]
}
})
assert resp.status_code == 201, resp.json()
id_ = resp.json()['_id']
rev = resp.json()['_revision']
resp = app.patch(f'/{model}/{id_}', json={
'_revision': rev,
'sync': {
'sync_revision': '3'
}
})
assert resp.status_code == 200, resp.json()
rev = resp.json()['_revision']
resp = app.get(f'/{model}/{id_}')
assert resp.status_code == 200, resp.json()
assert resp.json()['sync'] == {
'sync_revision': '3',
'sync_resources': [
{
'sync_id': '2',
'sync_source': 'report'
}
]
}
@pytest.mark.models(
'backends/mongo/report',
'backends/postgres/report',
)
def test_update_object_array(model, app):
app.authmodel(model, ['insert', 'patch', 'getone'])
resp = app.post(f'/{model}', json={
'status': 'ok',
'sync': {
'sync_revision': '1',
'sync_resources': [
{
'sync_id': '2',
'sync_source': 'report'
}
]
}
})
assert resp.status_code == 201, resp.json()
id_ = resp.json()['_id']
rev = resp.json()['_revision']
resp = app.patch(f'/{model}/{id_}', json={
'_revision': rev,
'sync': {
'sync_resources': [{
'sync_id': '3',
'sync_source': 'troper'
}],
}
})
assert resp.status_code == 200, resp.json()
rev = resp.json()['_revision']
resp = app.get(f'/{model}/{id_}')
assert resp.status_code == 200, resp.json()
assert resp.json()['sync'] == {
'sync_revision': '1',
'sync_resources': [
{
'sync_id': '3',
'sync_source': 'troper'
}
]
}
| 24.463158
| 55
| 0.449656
| 224
| 2,324
| 4.464286
| 0.178571
| 0.112
| 0.096
| 0.12
| 0.973
| 0.973
| 0.973
| 0.973
| 0.868
| 0.868
| 0
| 0.019113
| 0.369621
| 2,324
| 94
| 56
| 24.723404
| 0.663481
| 0
| 0
| 0.678571
| 0
| 0
| 0.241394
| 0.038726
| 0
| 0
| 0
| 0
| 0.095238
| 1
| 0.02381
| false
| 0
| 0.011905
| 0
| 0.035714
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
1dfcb4d77e3deb4901ba246b595206ea283bb0d6
| 136,009
|
py
|
Python
|
src_data/community_health_metrics.py
|
marcmiquel/WDO
|
7d8d8e912f8dbacb2cdc0f6fd5c26370b8310cbb
|
[
"MIT"
] | 3
|
2020-12-21T06:06:16.000Z
|
2021-08-28T12:52:07.000Z
|
src_data/community_health_metrics.py
|
marcmiquel/WDO
|
7d8d8e912f8dbacb2cdc0f6fd5c26370b8310cbb
|
[
"MIT"
] | 1
|
2021-01-27T19:33:20.000Z
|
2021-01-27T19:33:20.000Z
|
src_data/community_health_metrics.py
|
marcmiquel/WDO
|
7d8d8e912f8dbacb2cdc0f6fd5c26370b8310cbb
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# script
import wikilanguages_utils
from wikilanguages_utils import *
# time
import time
import datetime
from dateutil import relativedelta
import calendar
# system
import os
import sys
import shutil
import re
import random
import operator
# databases
import MySQLdb as mdb, MySQLdb.cursors as mdb_cursors
import sqlite3
# files
import gzip
import zipfile
import bz2
import json
import csv
import codecs
# requests and others
import requests
import urllib
import webbrowser
import reverse_geocoder as rg
import numpy as np
from random import shuffle
# data
import pandas as pd
import gc
# https://stats.wikimedia.org/#/all-projects
# https://meta.wikimedia.org/wiki/List_of_Wikipedias/ca
# https://meta.wikimedia.org/wiki/Research:Metrics#Volume_of_contribution
# https://meta.wikimedia.org/wiki/Research:Wikistats_metrics/Active_editors
community_health_metrics_db = 'community_health_metrics.db'
# MAIN
def main():
create_community_health_metrics_db()
for languagecode in wikilanguagecodes: # wikilanguagecodes
print (languagecode)
editor_metrics_dump_iterator(languagecode) # it fills the database cawiki_editors, cawiki_editor_metrics
print ('dump iterator done.\n')
# # input('')
# editor_metrics_db_iterator(languagecode) # it fills the database cawiki_editor_metrics
# print ('database iterator done.\n')
# print ('hell yeh')
# input('')
# community_metrics_db_iterator(languagecode) # it fills the database cawiki_community_metrics
# input('')
print ('done')
###
# export_community_health_metrics_csv(languagecode) # it fills the database cawiki_editor_metrics
# editor_metrics_content_diversity(languagecode)
# editor_metrics_multilingual(languagecode)
################################################################
# FUNCTIONS
def create_community_health_metrics_db():
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
for languagecode in wikilanguagecodes:
table_name = languagecode+'wiki_editors'
try:
cursor.execute("DROP TABLE "+table_name+";")
except:
pass
query = ("CREATE TABLE IF NOT EXISTS "+table_name+" (user_id integer, user_name text, bot text, user_flags text, highest_flag text, highest_flag_year_month text, gender text, primarybinary integer, primarylang text, primarybinary_ecount integer, totallangs_ecount integer, numberlangs integer, registration_date, year_month_registration, first_edit_timestamp text, year_month_first_edit text, year_first_edit text, lustrum_first_edit text, survived60d text, last_edit_timestamp text, year_last_edit text, lifetime_days integer, editing_days integer, percent_editing_days real, days_since_last_edit integer, seconds_between_last_two_edits integer, PRIMARY KEY (user_id, user_name))")
cursor.execute(query)
table_name = languagecode+'wiki_editor_metrics'
try:
cursor.execute("DROP TABLE "+table_name+";")
except:
pass
query = ("CREATE TABLE IF NOT EXISTS "+table_name+" (user_id integer, user_name text, abs_value real, rel_value real, metric_name text, year_month text, timestamp text, PRIMARY KEY (user_id, metric_name, year_month, timestamp))")
cursor.execute(query)
table_name = languagecode+'wiki_community_metrics'
try:
cursor.execute("DROP TABLE "+table_name+";")
except:
pass
query = ("CREATE TABLE IF NOT EXISTS "+table_name+" (year_month text, topic text, m1 text, m1_calculation text, m1_value text, m2 text, m2_calculation text, m2_value text, m1_count float, m2_count float, PRIMARY KEY (topic, m1, m1_calculation, m1_value, m2, m2_calculation, m2_value))")
cursor.execute(query)
table_name = languagecode+'wiki_article_metrics'
try:
cursor.execute("DROP TABLE "+table_name+";")
except:
pass
query = ("CREATE TABLE IF NOT EXISTS "+table_name+" (qitem text, page_id integer, page_title text, abs_value real, rel_value, metric_name text, year_month text, PRIMARY KEY (metric_name, year_month))")
cursor.execute(query)
### ---- ###
table_name = languagecode+'wiki_editor_content_metrics'
try:
cursor.execute("DROP TABLE "+table_name+";")
except:
pass
query = ("CREATE TABLE IF NOT EXISTS "+table_name+" (user_id integer, user_name text, content_type text, abs_value real, rel_value real, year_month text, PRIMARY KEY (user_name, user_id, content_type))")
cursor.execute(query)
conn.commit()
def get_mediawiki_paths(languagecode):
cym = cycle_year_month
d_paths = []
print ('/public/dumps/public/other/mediawiki_history/'+cym)
if os.path.isdir('/public/dumps/public/other/mediawiki_history/'+cym)==False:
cym = datetime.datetime.strptime(cym,'%Y-%m')-dateutil.relativedelta.relativedelta(months=1)
cym = cym.strftime('%Y-%m')
print ('/public/dumps/public/other/mediawiki_history/'+cym)
dumps_path = '/public/dumps/public/other/mediawiki_history/'+cym+'/'+languagecode+'wiki/'+cym+'.'+languagecode+'wiki.all-time.tsv.bz2'
if os.path.isfile(dumps_path):
print ('one all-time file.')
d_paths.append(dumps_path)
else:
print ('multiple files.')
for year in range (1999, 2025):
dumps_path = '/public/dumps/public/other/mediawiki_history/'+cym+'/'+languagecode+'wiki/'+cym+'.'+languagecode+'wiki.'+str(year)+'.tsv.bz2'
if os.path.isfile(dumps_path):
d_paths.append(dumps_path)
if len(d_paths) == 0:
for year in range(1999, 2025): # months
for month in range(0, 13):
if month > 9:
dumps_path = '/public/dumps/public/other/mediawiki_history/'+cym+'/'+languagecode+'wiki/'+cym+'.'+languagecode+'wiki.'+str(year)+'-'+str(month)+'.tsv.bz2'
else:
dumps_path = '/public/dumps/public/other/mediawiki_history/'+cym+'/'+languagecode+'wiki/'+cym+'.'+languagecode+'wiki.'+str(year)+'-0'+str(month)+'.tsv.bz2'
if os.path.isfile(dumps_path) == True:
d_paths.append(dumps_path)
print(len(d_paths))
print (d_paths)
return d_paths, cym
def editor_metrics_dump_iterator(languagecode):
functionstartTime = time.time()
function_name = 'editor_metrics_dump_iterator '+languagecode
print (function_name)
d_paths, cym = get_mediawiki_paths(languagecode)
if (len(d_paths)==0):
print ('dump error. this language has no mediawiki_history dump: '+languagecode)
# wikilanguages_utils.send_email_toolaccount('dump error at script '+script_name, dumps_path)
# quit()
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
user_id_user_name_dict = {}
user_id_bot_dict = {}
user_id_user_groups_dict = {}
editor_first_edit_timestamp = {}
editor_registration_date = {}
editor_last_edit_timestamp = {}
editor_seconds_since_last_edit = {}
editor_user_group_dict = {}
editor_user_group_dict_timestamp = {}
# for the survival part
survived_dict = {}
survival_measures = []
user_id_edit_count = {}
editor_user_page_edit_count = {}
editor_user_page_talk_page_edit_count = {}
# for the monthly part
editor_monthly_namespace0_edits = {}
editor_monthly_namespace1_edits = {}
editor_monthly_namespace2_edits = {}
editor_monthly_namespace3_edits = {}
editor_monthly_namespace4_edits = {}
editor_monthly_namespace5_edits = {}
editor_monthly_namespace6_edits = {}
editor_monthly_namespace7_edits = {}
editor_monthly_namespace8_edits = {}
editor_monthly_namespace9_edits = {}
editor_monthly_namespace10_edits = {}
editor_monthly_namespace11_edits = {}
editor_monthly_namespace12_edits = {}
editor_monthly_namespace13_edits = {}
editor_monthly_namespace14_edits = {}
editor_monthly_namespace15_edits = {}
editor_monthly_user_page_edit_count = {}
editor_monthly_user_page_talk_page_edit_count = {}
editor_monthly_edits = {}
editor_monthly_seconds_between_edits = {}
editor_monthly_editing_days = {}
editor_monthly_created_articles = {}
editor_monthly_deleted_articles = {}
editor_monthly_moved_articles = {}
editor_monthly_undeleted_articles = {}
editor_monthly_accounts_created = {}
editor_monthly_users_renamed = {}
editor_monthly_autoblocks = {}
editor_monthly_edits_reverted = {}
editor_monthly_reverts_made = {}
last_year_month = 0
first_date = datetime.datetime.strptime('2001-01-01 01:15:15','%Y-%m-%d %H:%M:%S')
for dump_path in d_paths:
print('\n'+dump_path)
iterTime = time.time()
dump_in = bz2.open(dump_path, 'r')
line = 'something'
line = dump_in.readline()
while line != '':
# print ('*')
# print (line)
# print (seconds_since_last_edit)
# print ('*')
# input('')
line = dump_in.readline()
line = line.rstrip().decode('utf-8')[:-1]
values = line.split('\t')
if len(values)==1: continue
event_entity = values[1]
event_type = values[2]
event_user_id = values[5]
try: int(event_user_id)
except:
continue
event_user_text = values[7]
if event_user_text != '': user_id_user_name_dict[event_user_id] = event_user_text
else:
continue
try:
editor_last_edit = editor_last_edit_timestamp[event_user_id]
last_edit_date_dt = datetime.datetime.strptime(editor_last_edit[:len(editor_last_edit)-2],'%Y-%m-%d %H:%M:%S')
last_edit_year_month_day = datetime.datetime.strptime(last_edit_date_dt.strftime('%Y-%m-%d'),'%Y-%m-%d')
except:
last_edit_year_month_day = ''
event_timestamp = values[3]
event_timestamp_dt = datetime.datetime.strptime(event_timestamp[:len(event_timestamp)-2],'%Y-%m-%d %H:%M:%S')
editor_last_edit_timestamp[event_user_id] = event_timestamp
event_user_groups = values[11]
if event_user_groups != '':
user_id_user_groups_dict[event_user_id] = event_user_groups
page_namespace = values[28]
if event_entity == 'revision':
revision_is_identity_reverted = values[64]
# són edits que seran reverted en el futur.
if revision_is_identity_reverted == 'true':
try: editor_monthly_edits_reverted[event_user_id] = editor_monthly_edits_reverted[event_user_id]+1
except: editor_monthly_edits_reverted[event_user_id] = 1
# print ('made',revision_is_identity_reverted, values)
# input('')
revision_is_identity_revert = values[67]
# són edits que revert un altre edit
if revision_is_identity_revert == 'true':
try: editor_monthly_reverts_made[event_user_id] = editor_monthly_reverts_made[event_user_id]+1
except: editor_monthly_reverts_made[event_user_id] = 1
# print ('received',revision_is_identity_revert, values)
# input('')
elif event_entity == 'page' and page_namespace == '0':
if event_type == 'create':
try: editor_monthly_created_articles[event_user_id] = editor_monthly_created_articles[event_user_id]+1
except: editor_monthly_created_articles[event_user_id] = 1
elif event_type == 'delete':
try: editor_monthly_deleted_articles[event_user_id] = editor_monthly_deleted_articles[event_user_id]+1
except: editor_monthly_deleted_articles[event_user_id] = 1
elif event_type == 'move':
try: editor_monthly_moved_articles[event_user_id] = editor_monthly_moved_articles[event_user_id]+1
except: editor_monthly_moved_articles[event_user_id] = 1
elif event_type == 'restore':
try: editor_monthly_undeleted_articles[event_user_id] = editor_monthly_undeleted_articles[event_user_id]+1
except: editor_monthly_undeleted_articles[event_user_id] = 1
elif event_entity == 'user':
user_text = str(values[38]) # this is target of the event
if event_type == 'create' and event_user_text != user_text:
try: editor_monthly_accounts_created[event_user_id] = editor_monthly_accounts_created[event_user_id]+1
except: editor_monthly_accounts_created[event_user_id] = 1
elif event_type == 'rename':
try: editor_monthly_users_renamed[event_user_id] = editor_monthly_users_renamed[event_user_id]+1
except: editor_monthly_users_renamed[event_user_id] = 1
elif event_type == 'altergroups':
user_id = values[36]
user_group = values[41]
cur_ug = ''
if user_group != '' and user_group != None:
try:
cur_ug = editor_user_group_dict[user_id]
if len(cur_ug) < len(user_group):
change = user_group.replace(cur_ug,'').strip(',')
metric_name = 'granted_flag'
else:
change = cur_ug.replace(user_group,'').strip(',')
metric_name = 'removed_flag' # this is only for the case that one flag is removed by another editor. when an editor removes him/herself the flag, it does not appear here.
except:
change = user_group
metric_name = 'granted_flag'
# change (what is new + o -);
# user_group (what is he has after the change);
# cur_ug (what he had right before);
# values[42] (what he'll have in the future and in the end)
# input('')
editor_user_group_dict[user_id] = user_group
if change != '':
# user_text = values[38]
# print (user_id, user_text, ' - ', change, ' - ', user_group, ' - ', cur_ug ,' - ', values[42], ' - ', metric_name, event_timestamp)
# print ('\n',event_type, event_entity, event_user_text, cur_ug, event_user_groups,'\n',line)
if ',' in change:
change_ = change.split(',')
event_timestamp2 = event_timestamp[:len(event_timestamp)-2]
editor_user_group_dict_timestamp[user_id,event_timestamp] = [metric_name, change_[0], cur_ug]
editor_user_group_dict_timestamp[user_id,event_timestamp2] = [metric_name, change_[1], cur_ug]
else:
editor_user_group_dict_timestamp[user_id,event_timestamp] = [metric_name, change, cur_ug]
elif event_type == 'alterblocks':
try: editor_monthly_autoblocks[event_user_id] = editor_monthly_autoblocks[event_user_id]+1
except: editor_monthly_autoblocks[event_user_id] = 1
event_is_bot_by = values[13]
if event_is_bot_by != '':
user_id_bot_dict[event_user_id] = event_is_bot_by
# print (event_user_text, event_is_bot_by)
event_user_is_anonymous = values[17]
if event_user_is_anonymous == True or event_user_id == '': continue
event_user_registration_date = values[18]
if event_user_id not in editor_registration_date:
if event_user_registration_date != '':
editor_registration_date[event_user_id] = event_user_registration_date
####### ---------
# MONTHLY EDITS COUNTER
try: editor_monthly_edits[event_user_id] = editor_monthly_edits[event_user_id]+1
except: editor_monthly_edits[event_user_id] = 1
# MONTHLY NAMESPACES EDIT COUNTER
if page_namespace == '0':
try: editor_monthly_namespace0_edits[event_user_id] = editor_monthly_namespace0_edits[event_user_id]+1
except: editor_monthly_namespace0_edits[event_user_id] = 1
elif page_namespace == '1':
try: editor_monthly_namespace1_edits[event_user_id] = editor_monthly_namespace1_edits[event_user_id]+1
except: editor_monthly_namespace1_edits[event_user_id] = 1
elif page_namespace == '2':
try: editor_monthly_namespace2_edits[event_user_id] = editor_monthly_namespace2_edits[event_user_id]+1
except: editor_monthly_namespace2_edits[event_user_id] = 1
elif page_namespace == '3':
try: editor_monthly_namespace3_edits[event_user_id] = editor_monthly_namespace3_edits[event_user_id]+1
except: editor_monthly_namespace3_edits[event_user_id] = 1
elif page_namespace == '4':
try: editor_monthly_namespace4_edits[event_user_id] = editor_monthly_namespace4_edits[event_user_id]+1
except: editor_monthly_namespace4_edits[event_user_id] = 1
elif page_namespace == '5':
try: editor_monthly_namespace5_edits[event_user_id] = editor_monthly_namespace5_edits[event_user_id]+1
except: editor_monthly_namespace5_edits[event_user_id] = 1
elif page_namespace == '6':
try: editor_monthly_namespace6_edits[event_user_id] = editor_monthly_namespace6_edits[event_user_id]+1
except: editor_monthly_namespace6_edits[event_user_id] = 1
elif page_namespace == '7':
try: editor_monthly_namespace7_edits[event_user_id] = editor_monthly_namespace7_edits[event_user_id]+1
except: editor_monthly_namespace7_edits[event_user_id] = 1
elif page_namespace == '8':
try: editor_monthly_namespace8_edits[event_user_id] = editor_monthly_namespace8_edits[event_user_id]+1
except: editor_monthly_namespace8_edits[event_user_id] = 1
elif page_namespace == '9':
try: editor_monthly_namespace9_edits[event_user_id] = editor_monthly_namespace9_edits[event_user_id]+1
except: editor_monthly_namespace9_edits[event_user_id] = 1
elif page_namespace == '10':
try: editor_monthly_namespace10_edits[event_user_id] = editor_monthly_namespace10_edits[event_user_id]+1
except: editor_monthly_namespace10_edits[event_user_id] = 1
elif page_namespace == '11':
try: editor_monthly_namespace11_edits[event_user_id] = editor_monthly_namespace11_edits[event_user_id]+1
except: editor_monthly_namespace11_edits[event_user_id] = 1
elif page_namespace == '12':
try: editor_monthly_namespace12_edits[event_user_id] = editor_monthly_namespace12_edits[event_user_id]+1
except: editor_monthly_namespace12_edits[event_user_id] = 1
elif page_namespace == '13':
try: editor_monthly_namespace13_edits[event_user_id] = editor_monthly_namespace13_edits[event_user_id]+1
except: editor_monthly_namespace13_edits[event_user_id] = 1
elif page_namespace == '14':
try: editor_monthly_namespace14_edits[event_user_id] = editor_monthly_namespace14_edits[event_user_id]+1
except: editor_monthly_namespace14_edits[event_user_id] = 1
elif page_namespace == '15':
try: editor_monthly_namespace15_edits[event_user_id] = editor_monthly_namespace15_edits[event_user_id]+1
except: editor_monthly_namespace15_edits[event_user_id] = 1
# MONTHLY USER PAGE/USER PAGE TALK PAGE EDIT COUNTER
page_title = values[25]
if event_user_text == page_title and page_namespace == '2':
try:
editor_monthly_user_page_edit_count[event_user_id] = editor_monthly_user_page_edit_count[event_user_id]+1
except:
editor_monthly_user_page_edit_count[event_user_id] = 1
if event_user_text == page_title and page_namespace == '3':
try:
editor_monthly_user_page_talk_page_edit_count[event_user_id] = editor_monthly_user_page_talk_page_edit_count[event_user_id]+1
except:
editor_monthly_user_page_talk_page_edit_count[event_user_id] = 1
# MONTHLY AVERAGE SECONDS BETWEEN EDITS COUNTER
seconds_since_last_edit = values[22]
if seconds_since_last_edit != None and seconds_since_last_edit != '':
seconds_since_last_edit = int(seconds_since_last_edit)
editor_seconds_since_last_edit[event_user_id] = seconds_since_last_edit
if seconds_since_last_edit != None and seconds_since_last_edit != '':
if event_user_id != '' and event_user_id != 0:
try:
editor_monthly_seconds_between_edits[event_user_id].append(seconds_since_last_edit)
except:
editor_monthly_seconds_between_edits[event_user_id] = [seconds_since_last_edit]
# COUNTING DAYS
current_year_month_day = datetime.datetime.strptime(event_timestamp_dt.strftime('%Y-%m-%d'),'%Y-%m-%d')
if current_year_month_day != last_edit_year_month_day:
try: editor_monthly_editing_days[event_user_id]+=1
except: editor_monthly_editing_days[event_user_id]=1
#######--------- --------- --------- --------- --------- ---------
# CHECK MONTH CHANGE AND INSERT MONTHLY EDITS/NAMESPACES EDITS/SECONDS
current_year_month = datetime.datetime.strptime(event_timestamp_dt.strftime('%Y-%m'),'%Y-%m')
if last_year_month != current_year_month and last_year_month != 0:
lym = last_year_month.strftime('%Y-%m')
print (current_year_month, lym, cym)
lym_sp = lym.split('-')
ly = lym_sp[0]
lm = lym_sp[1]
lym_days = calendar.monthrange(int(ly),int(lm))[1]
monthly_articles = []
monthly_user_actions = []
monthly_reverts = []
monthly_edits = []
monthly_seconds = []
namespaces = []
for user_id, edits in editor_monthly_created_articles.items():
monthly_articles.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_created_articles', lym, ''))
for user_id, edits in editor_monthly_deleted_articles.items():
monthly_articles.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_deleted_articles', lym, ''))
for user_id, edits in editor_monthly_moved_articles.items():
monthly_articles.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_moved_articles', lym, ''))
for user_id, edits in editor_monthly_undeleted_articles.items():
monthly_articles.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_undeleted_articles', lym, ''))
for user_id, edits in editor_monthly_accounts_created.items():
monthly_user_actions.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_accounts_created', lym, ''))
for user_id, edits in editor_monthly_users_renamed.items():
monthly_user_actions.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_users_renamed', lym, ''))
for user_id, edits in editor_monthly_autoblocks.items():
monthly_user_actions.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_autoblocks', lym, ''))
for user_id, edits in editor_monthly_edits_reverted.items():
monthly_user_actions.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_reverted', lym, ''))
for user_id, edits in editor_monthly_reverts_made.items():
monthly_user_actions.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_reverts_made', lym, ''))
for user_id, edits in editor_monthly_edits.items():
monthly_edits.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits', lym, ''))
for user_id, seconds_list in editor_monthly_seconds_between_edits.items():
if seconds_list == None: continue
elif len(seconds_list) > 1:
average_seconds = np.mean(seconds_list)
monthly_seconds.append((user_id, user_id_user_name_dict[user_id], average_seconds, None, 'monthly_average_seconds_between_edits', lym, ''))
for user_id, edits in editor_monthly_namespace0_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns0_main', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace1_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns1_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace2_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns2_user', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace3_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns3_user_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace4_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns4_project', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace5_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns5_project_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace6_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns6_file', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace7_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns7_file_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace8_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns8_mediawiki', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace9_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns9_mediawiki_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace10_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns10_template', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace11_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns11_template_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace12_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns12_help', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace13_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns13_help_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace14_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns14_category', lym, ''))
except: pass
for user_id, edits in editor_monthly_namespace15_edits.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_edits_ns15_category_talk', lym, ''))
except: pass
for user_id, edits in editor_monthly_user_page_edit_count.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_user_page_edit_count', lym, ''))
except: pass
for user_id, edits in editor_monthly_user_page_talk_page_edit_count.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], edits, None, 'monthly_user_page_talk_page_edit_count', lym, ''))
except: pass
for user_id, days in editor_monthly_editing_days.items():
try: namespaces.append((user_id, user_id_user_name_dict[user_id], days, 100*(days/lym_days), 'monthly_editing_days', lym, ''))
except: pass
for key, data in editor_user_group_dict_timestamp.items():
user_id = key[0]
timestamp = key[1]
metric_name = data[0]
flags = data[1]
old_flags = data[2]
try:
if metric_name == 'removed_flag':
namespaces.append((user_id, user_id_user_name_dict[user_id], old_flags, None, metric_name, lym, timestamp))
# print ((user_id, user_id_user_name_dict[user_id], old_flags, None, metric_name, lym, timestamp))
else:
namespaces.append((user_id, user_id_user_name_dict[user_id], flags, None, metric_name, lym, timestamp))
# print ((user_id, user_id_user_name_dict[user_id], flags, None, metric_name, lym, timestamp))
except: pass
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) VALUES (?,?,?,?,?,?,?);'
cursor.executemany(query,monthly_articles)
cursor.executemany(query,monthly_edits)
cursor.executemany(query,monthly_reverts)
cursor.executemany(query,monthly_user_actions)
cursor.executemany(query,namespaces)
cursor.executemany(query,monthly_seconds)
conn.commit()
monthly_articles = []
monthly_user_actions = []
monthly_reverts = []
monthly_edits = []
monthly_seconds = []
namespaces = []
editor_monthly_created_articles = {}
editor_monthly_deleted_articles = {}
editor_monthly_moved_articles = {}
editor_monthly_undeleted_articles = {}
editor_monthly_accounts_created = {}
editor_monthly_users_renamed = {}
editor_monthly_autoblocks = {}
editor_monthly_edits_reverted = {}
editor_monthly_reverts_made = {}
editor_monthly_namespace0_edits = {}
editor_monthly_namespace1_edits = {}
editor_monthly_namespace2_edits = {}
editor_monthly_namespace3_edits = {}
editor_monthly_namespace4_edits = {}
editor_monthly_namespace5_edits = {}
editor_monthly_namespace6_edits = {}
editor_monthly_namespace7_edits = {}
editor_monthly_namespace8_edits = {}
editor_monthly_namespace9_edits = {}
editor_monthly_namespace10_edits = {}
editor_monthly_namespace11_edits = {}
editor_monthly_namespace12_edits = {}
editor_monthly_namespace13_edits = {}
editor_monthly_namespace14_edits = {}
editor_monthly_namespace15_edits = {}
editor_monthly_edits = {}
editor_monthly_seconds_between_edits = {}
editor_monthly_user_page_edit_count = {}
editor_monthly_user_page_talk_page_edit_count = {}
editor_monthly_editing_days = {}
editor_user_group_dict_timestamp = {}
last_year_month = current_year_month
####### ---------
# SURVIVAL MEASURES
event_user_first_edit_timestamp = values[20]
if event_user_id not in editor_first_edit_timestamp:
editor_first_edit_timestamp[event_user_id] = event_user_first_edit_timestamp
if event_user_first_edit_timestamp == '' or event_user_first_edit_timestamp == None:
event_user_first_edit_timestamp = editor_first_edit_timestamp[event_user_id]
if event_user_first_edit_timestamp != '' and event_user_id not in survived_dict:
event_user_first_edit_timestamp_dt = datetime.datetime.strptime(event_user_first_edit_timestamp[:len(event_user_first_edit_timestamp)-2],'%Y-%m-%d %H:%M:%S')
# thresholds
first_edit_timestamp_1day_dt = (event_user_first_edit_timestamp_dt + relativedelta.relativedelta(days=1))
first_edit_timestamp_7days_dt = (event_user_first_edit_timestamp_dt + relativedelta.relativedelta(days=7))
first_edit_timestamp_1months_dt = (event_user_first_edit_timestamp_dt + relativedelta.relativedelta(months=1))
first_edit_timestamp_2months_dt = (event_user_first_edit_timestamp_dt + relativedelta.relativedelta(months=2))
try: ec = user_id_edit_count[event_user_id]
except: ec = 1
# at 1 day
if event_timestamp_dt >= first_edit_timestamp_1day_dt:
survival_measures.append((event_user_id, event_user_text, ec, None, 'edit_count_24h', first_edit_timestamp_1day_dt.strftime('%Y-%m'),first_edit_timestamp_1day_dt.strftime('%Y-%m-%d %H:%M:%S')))
if event_user_id in editor_user_page_edit_count:
survival_measures.append((event_user_id, event_user_text, editor_user_page_edit_count[event_user_id], None, 'user_page_edit_count_24h', first_edit_timestamp_1day_dt.strftime('%Y-%m'),first_edit_timestamp_1day_dt.strftime('%Y-%m-%d %H:%M:%S')))
if event_user_id in editor_user_page_talk_page_edit_count:
survival_measures.append((event_user_id, event_user_text, editor_user_page_talk_page_edit_count[event_user_id], None, 'user_page_talk_page_edit_count_24h', first_edit_timestamp_1day_dt.strftime('%Y-%m'),first_edit_timestamp_1day_dt.strftime('%Y-%m-%d %H:%M:%S')))
# at 7 days
if event_timestamp_dt >= first_edit_timestamp_7days_dt:
survival_measures.append((event_user_id, event_user_text, ec, None, 'edit_count_7d', first_edit_timestamp_7days_dt.strftime('%Y-%m'),first_edit_timestamp_7days_dt.strftime('%Y-%m-%d %H:%M:%S')))
# at 1 month
if event_timestamp_dt >= first_edit_timestamp_1months_dt:
survival_measures.append((event_user_id, event_user_text, ec, None, 'edit_count_30d', first_edit_timestamp_1months_dt.strftime('%Y-%m'),first_edit_timestamp_1months_dt.strftime('%Y-%m-%d %H:%M:%S')))
if event_user_id in editor_user_page_edit_count:
survival_measures.append((event_user_id, event_user_text, editor_user_page_edit_count[event_user_id], None, 'user_page_edit_count_1month', first_edit_timestamp_1day_dt.strftime('%Y-%m'),first_edit_timestamp_1day_dt.strftime('%Y-%m-%d %H:%M:%S')))
if event_user_id in editor_user_page_talk_page_edit_count:
survival_measures.append((event_user_id, event_user_text, editor_user_page_talk_page_edit_count[event_user_id], None, 'user_page_talk_page_edit_count_1month', first_edit_timestamp_1day_dt.strftime('%Y-%m'),first_edit_timestamp_1day_dt.strftime('%Y-%m-%d %H:%M:%S')))
# at 2 months
if event_timestamp_dt >= first_edit_timestamp_2months_dt:
survival_measures.append((event_user_id, event_user_text, ec, None, 'edit_count_60d', first_edit_timestamp_2months_dt.strftime('%Y-%m'),first_edit_timestamp_2months_dt.strftime('%Y-%m-%d %H:%M:%S')))
survived_dict[event_user_id]=event_user_text
try: del user_id_edit_count[event_user_id]
except: pass
try: del editor_user_page_talk_page_edit_count[event_user_id]
except: pass
try: del editor_user_page_edit_count[event_user_id]
except: pass
# USER PAGE EDIT COUNT, ADD ONE MORE EDIT.
if event_user_id not in survived_dict:
if event_user_text == page_title and page_namespace == '2':
try:
editor_user_page_edit_count[event_user_id] = editor_user_page_edit_count[event_user_id]+1
except:
editor_user_page_edit_count[event_user_id] = 1
if event_user_text == page_title and page_namespace == '3':
try:
editor_user_page_talk_page_edit_count[event_user_id] = editor_user_page_talk_page_edit_count[event_user_id]+1
except:
editor_user_page_talk_page_edit_count[event_user_id] = 1
# EDIT COUNT, ADD ONE MORE EDIT.
event_user_revision_count = values[21]
if event_user_revision_count != '':
user_id_edit_count[event_user_id] = event_user_revision_count
elif event_user_id in user_id_edit_count:
user_id_edit_count[event_user_id] = int(user_id_edit_count[event_user_id]) + 1
else:
user_id_edit_count[event_user_id] = 1
####### ---------
# SURVIVAL MEASURES INSERT
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) VALUES (?,?,?,?,?,?,?);'
cursor.executemany(query,survival_measures)
conn.commit()
survival_measures = []
# MONTHLY EDITS/SECONDS INSERT (LAST ROUND)
lym = last_year_month.strftime('%Y-%m')
if lym != cym:
monthly_edits = []
for event_user_id, edits in editor_monthly_edits.items():
monthly_edits.append((event_user_id, user_id_user_name_dict[event_user_id], edits, None, 'monthly_edits', lym, ''))
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) VALUES (?,?,?,?,?,?,?);'
cursor.executemany(query,monthly_edits)
conn.commit()
editor_monthly_edits = {}
monthly_edits = []
monthly_seconds = []
for event_user_id, seconds_list in editor_monthly_seconds_between_edits.items():
if seconds_list == None: continue
elif len(seconds_list) > 1:
average_seconds = np.mean(seconds_list)
monthly_seconds.append((event_user_id, user_id_user_name_dict[event_user_id], average_seconds, None, 'monthly_average_seconds_between_edits', lym, ''))
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) VALUES (?,?,?,?,?,?,?);'
cursor.executemany(query,monthly_seconds)
conn.commit()
editor_monthly_seconds_between_edits = {}
monthly_seconds = []
# USER CHARACTERISTICS INSERT
user_characteristics1 = []
user_characteristics2 = []
for user_id, user_name in user_id_user_name_dict.items():
try: user_flags = user_id_user_groups_dict[user_id]
except: user_flags = ''
try: bot = user_id_bot_dict[user_id]
except: bot = 'editor'
if user_id in survived_dict: survived60d = '1'
else: survived60d = '0'
try: registration_date = editor_registration_date[user_id]
except: registration_date = ''
if registration_date == '': # THIS IS SOMETHING WE "ASSUME" BECAUSE THERE ARE MANY ACCOUNTS WITHOUT A REGISTRATION DATE.
try: registration_date = editor_first_edit_timestamp[user_id]
except: registration_date = ''
if registration_date != '': year_month_registration = datetime.datetime.strptime(registration_date[:len(registration_date)-2],'%Y-%m-%d %H:%M:%S').strftime('%Y-%m')
else: year_month_registration = ''
try: fe = editor_first_edit_timestamp[user_id]
except: fe = ''
try:
le = editor_last_edit_timestamp[user_id]
year_last_edit = datetime.datetime.strptime(le[:len(le)-2],'%Y-%m-%d %H:%M:%S').strftime('%Y')
except:
le = ''
year_last_edit
if fe != '':
year_month = datetime.datetime.strptime(fe[:len(fe)-2],'%Y-%m-%d %H:%M:%S').strftime('%Y-%m')
year_first_edit = datetime.datetime.strptime(fe[:len(fe)-2],'%Y-%m-%d %H:%M:%S').strftime('%Y')
if int(year_first_edit) >= 2001 < 2006: lustrum_first_edit = '2001-2005'
if int(year_first_edit) >= 2006 < 2011: lustrum_first_edit = '2006-2010'
if int(year_first_edit) >= 2011 < 2016: lustrum_first_edit = '2011-2015'
if int(year_first_edit) >= 2016 < 2021: lustrum_first_edit = '2016-2020'
if int(year_first_edit) >= 2020 < 2026: lustrum_first_edit = '2021-2025'
fe_d = datetime.datetime.strptime(fe[:len(fe)-2],'%Y-%m-%d %H:%M:%S')
else:
year_month = ''
year_first_edit = ''
lustrum_first_edit = ''
fe_d = ''
if le != '':
le_d = datetime.datetime.strptime(le[:len(le)-2],'%Y-%m-%d %H:%M:%S')
days_since_last_edit = (event_timestamp_dt - le_d).days
else:
le_d = ''
days_since_last_edit = ''
if fe != '' and le != '': lifetime_days = (le_d - fe_d).days
else: lifetime_days = 0
try: se = editor_seconds_since_last_edit[user_id]
except: se = ''
user_characteristics1.append((user_id, user_name, registration_date, year_month_registration, fe, year_month, year_first_edit, lustrum_first_edit, survived60d))
user_characteristics2.append((bot, user_flags, le, year_last_edit, lifetime_days, days_since_last_edit, se, user_id, user_name))
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editors (user_id, user_name, registration_date, year_month_registration, first_edit_timestamp, year_month_first_edit, year_first_edit, lustrum_first_edit, survived60d) VALUES (?,?,?,?,?,?,?,?,?);'
cursor.executemany(query,user_characteristics1)
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editors (bot, user_flags, last_edit_timestamp, year_last_edit, lifetime_days, days_since_last_edit, seconds_between_last_two_edits, user_id, user_name) VALUES (?,?,?,?,?,?,?,?,?);'
cursor.executemany(query,user_characteristics2)
query = 'UPDATE '+languagecode+'wiki_editors SET bot = ?, user_flags = ?, last_edit_timestamp = ?, year_last_edit = ?, lifetime_days = ?, days_since_last_edit = ?, seconds_between_last_two_edits = ? WHERE user_id = ? AND user_name = ?;'
cursor.executemany(query,user_characteristics2)
conn.commit()
print (len(user_characteristics1),len(user_characteristics2))
user_characteristics1 = []
user_characteristics2 = []
# insert or ignore + update
user_id_bot_dict = {}
user_id_user_groups_dict = {}
editor_last_edit_timestamp = {}
editor_seconds_since_last_edit = {}
# insert or ignore
editor_first_edit_timestamp = {}
editor_registration_date = {}
# END OF THE DUMP!!!!
print ('end of the dump.')
print ('*')
print (str(datetime.timedelta(seconds=time.time() - iterTime)))
# AGGREGATED METRICS (EDIT COUNTS)
monthly_aggregated_metrics = {'monthly_edits':'edit_count', 'monthly_user_page_edit_count': 'edit_count_editor_user_page', 'monthly_user_page_talk_page_edit_count': 'edit_count_editor_user_page_talk_page', 'monthly_edits_ns0_main':'edit_count_ns0_main', 'monthly_edits_ns1_talk':'edit_count_ns1_talk', 'monthly_edits_ns2_user':'edit_count_ns2_user', 'monthly_edits_ns3_user_talk': 'edit_count_ns3_user_talk', 'monthly_edits_ns4_project':'edit_count_ns4_project', 'monthly_edits_ns5_project_talk': 'edit_count_ns5_project_talk', 'monthly_edits_ns6_file': 'edit_count_edits_ns6_file', 'monthly_edits_ns7_file_talk':'edit_count_ns7_file_talk', 'monthly_edits_ns8_mediawiki': 'edit_count_ns8_mediawiki', 'monthly_edits_ns9_mediawiki_talk': 'edit_count_ns9_mediawiki_talk', 'monthly_edits_ns10_template':'edit_count_ns10_template', 'monthly_edits_ns11_template_talk':'edit_count_ns11_template_talk', 'monthly_edits_ns12_help':'edit_count_ns12_help','monthly_edits_ns13_help_talk':'edit_count_ns13_help_talk','monthly_edits_ns14_category':'edit_count_ns14_category','monthly_edits_ns15_category_talk':'edit_count_ns15_category_talk','monthly_created_articles':'created_articles_count','monthly_deleted_articles':'deleted_articles_count','monthly_moved_articles':'moved_articles_count','monthly_undeleted_articles':'undeleted_articles_count','monthly_accounts_created':'created_accounts_count','monthly_users_renamed':'users_renamed_count','monthly_autoblocks':'autoblocks_count','monthly_edits_reverted':'edits_reverted_count','monthly_reverts_made':'reverts_made_count'}
conn2 = sqlite3.connect(databases_path + community_health_metrics_db); cursor2 = conn2.cursor()
for monthly_metric_name, metric_name in monthly_aggregated_metrics.items():
edit_counts = []
query = 'SELECT user_id, user_name, SUM(abs_value) FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "'+monthly_metric_name+'" GROUP BY 2;'
for row in cursor.execute(query):
edit_counts.append((row[0],row[1],row[2],metric_name,lym))
if metric_name == 'edit_count':
ec = row[2]
bin_v = ''
if ec > 1 and ec <= 100: bin_v = '1-100'
if ec > 100 and ec <= 500: bin_v = '101-500'
if ec > 500 and ec <= 1000: bin_v = '501-1000'
if ec > 1000 and ec <= 5000: bin_v = '1001-5000'
if ec > 5000 and ec <= 10000: bin_v = '5001-10000'
if ec > 10000 and ec <= 50000: bin_v = '10001-50000'
if ec > 50000 and ec <= 100000: bin_v = '50001-100000'
if ec > 100000 and ec <= 500000: bin_v = '100001-500000'
if ec > 500000 and ec <= 1000000: bin_v = '500001-1000000'
if ec > 1000000: bin_v = '1000001+'
if bin_v != '':
edit_counts.append((row[0],row[1],bin_v,'edit_count_bin',lym))
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, metric_name, year_month) VALUES (?,?,?,?,?);';
cursor2.executemany(query,edit_counts)
conn2.commit()
edit_counts = []
query = 'SELECT user_id, user_name, AVG(abs_value) FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_edits" GROUP BY 2;'
for row in cursor.execute(query):
ec = row[2]
bin_v = ''
if ec > 1 and ec <= 5: bin_v = '1-5'
if ec > 5 and ec <= 10: bin_v = '6-10'
if ec > 10 and ec <= 100: bin_v = '11-100'
if ec > 100 and ec <= 500: bin_v = '101-500'
if ec > 500 and ec <= 1000: bin_v = '501-1000'
if ec > 1000 and ec <= 5000: bin_v = '1001-5000'
if ec > 5000: bin_v = '5001+'
if bin_v != '':
edit_counts.append((row[0],row[1],bin_v,'monthly_edit_count_bin',lym))
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, metric_name, year_month) VALUES (?,?,?,?,?);';
cursor2.executemany(query,edit_counts)
conn2.commit()
edit_counts = []
# print ('stop monthly edit count'); input('stop');
# FLAGS UPDATE
# Getting the highest flag
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
query = 'SELECT user_flags, count(user_id) FROM '+languagecode+'wiki_editors WHERE user_flags != "" GROUP BY 1;'
flags_count_dict = {}
for row in cursor.execute(query):
flags = row[0]
count = row[1]
if ',' in flags:
fs = flags.split(',')
for x in fs:
try:
flags_count_dict[x]+=count
except:
flags_count_dict[x]=1
else:
try:
flags_count_dict[flags]+=count
except:
flags_count_dict[flags]=1
print ('Number of editors for each flag')
print (flags_count_dict)
# print ('in')
# input('')
flag_ranks = {
'confirmed':1,'ipblock-exempt':1,
'filemover':2,'accountcreator':2,'autopatrolled':2,'reviewer':2,'autoreviewer':2,'rollbacker':2,'abusefilter':2,'abusefilter-ehlper':2,'interface-admin':2,'eventcoordinator':2,'extendedconfirmed':2,'extendedmover':2, 'filemover':2, 'massmessage-sender':2, 'patroller':2, 'researcher':2, 'templateeditor':2,
'sysop':3,'bureaucrat':3.5,
'checkuser':4,'oversight':4.5,
'steward':5.5, 'import':5,
'founder':6
}
query = 'SELECT user_id, user_flags, user_name FROM '+languagecode+'wiki_editors WHERE user_flags != "";'
params = []
user_id_flag = {}
for row in cursor.execute(query):
user_id = row[0]
user_flags = row[1]
user_name = row[2]
highest_rank = {}
highest_count = {}
if ',' in user_flags:
uf = user_flags.split(',')
for x in uf:
if x in flag_ranks and 'bot' not in x:
val = flag_ranks[x]
highest_rank[x] = val
if len(highest_rank) > 1:
maxval = max(highest_rank.values())
highest_rank = {key:val for key, val in highest_rank.items() if val == maxval} # we are choosing the flag of highest rank.
if len(highest_rank)>1:
for x in highest_rank.keys():
val = flags_count_dict[x]
highest_count[x] = val
maxval = max(highest_count.values())
highest_count = {key:val for key, val in highest_count.items() if val == maxval} # we are choosing the flag that exists more in the community.
f = list(highest_count.keys())[0]
params.append((f, user_id, user_name))
user_id_flag[user_id]=f
else:
f = list(highest_rank.keys())[0]
params.append((f, user_id, user_name))
user_id_flag[user_id]=f
else:
if user_flags in flag_ranks and 'bot' not in user_flags:
params.append((user_flags, user_id, user_name))
user_id_flag[user_id]=user_flags
query = 'UPDATE '+languagecode+'wiki_editors SET highest_flag = ? WHERE user_id = ? AND user_name = ?;'
cursor.executemany(query,params)
conn.commit()
print ('Updated the editors table with highest flag')
# let's update the highest_flag_year_month
query = 'SELECT year_month, user_id, user_name, abs_value FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "granted_flag";'
params2 = []
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
for row in cursor.execute(query):
year_month=row[0]
user_id=row[1]
user_name=row[2]
flag = row[3]
try:
ex_flag = user_id_flag[user_id]
except:
continue
# print ((ex_flag, flag,year_month,user_id,user_name))
if ex_flag in flag:
# print ((ex_flag, flag,year_month,user_id,user_name))
params2.append((year_month,user_id,user_name))
# print (params2)
query = 'UPDATE '+languagecode+'wiki_editors SET highest_flag_year_month = ? WHERE user_id = ? AND user_name = ?;'
cursor.executemany(query,params2)
conn.commit()
print ('Updated the editors table with the year month they obtained the highest flag.')
# print(list(highest_flag.values()).count('bureaucrat'))
# print ('stop highest flag year month'); input('stop');
# If an editor has been granted the 'bot' flag, even if it has been taken away, it must be a flag.
query = 'SELECT user_id, user_name FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "granted_flag" AND abs_value LIKE "%bot";'
params = []
for row in cursor.execute(query):
username = row[1]
if 'bot' in username:
bottype = 'name,group'
else:
bottype = 'group'
params.append((bottype,row[0],username))
query = 'UPDATE '+languagecode+'wiki_editors SET bot = ? WHERE user_id = ? AND user_name = ?;'
cursor.executemany(query,params)
conn.commit()
print ('Updated the table with the bots from flag.')
def gender(languagecode):
functionstartTime = time.time()
function_name = 'gender '+languagecode
print (function_name)
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
gender_params = []
query = 'SELECT up_value, user_name, up_user FROM user INNER JOIN user_properties ON user_id = up_user WHERE up_property = "gender";'
mysql_con_read = wikilanguages_utils.establish_mysql_connection_read(languagecode); mysql_cur_read = mysql_con_read.cursor()
mysql_cur_read.execute(query)
rows = mysql_cur_read.fetchall()
for row in rows:
gender_params.append((row[0], row[1], row[2]))
if len(gender_params) % 10000 == 0:
query = 'UPDATE '+languagecode+'wiki_editors SET gender = ? WHERE user_id = ? AND user_name = ?;'
cursor.executemany(query,user_characteristics2)
conn.commit()
gender_params = []
duration = str(datetime.timedelta(seconds=time.time() - functionstartTime))
print(languagecode+' '+ function_name+' '+ duration)
# gender(languagecode)
duration = str(datetime.timedelta(seconds=time.time() - functionstartTime))
print(languagecode+' '+ function_name+' '+ duration)
def editor_metrics_db_iterator(languagecode):
functionstartTime = time.time()
function_name = 'editor_metrics_db_iterator '+languagecode
print (function_name)
d_paths, cym = get_mediawiki_paths(languagecode)
cycle_year_month = cym
print (cycle_year_month)
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
# MONTHLY EDITS LOOP
query = 'SELECT abs_value, year_month, user_id, user_name FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_edits" ORDER BY user_name, year_month'
# AND user_name in ("Toniher","Marcmiquel","Barcelona","TaronjaSatsuma","Kippelboy")
# print (query)
user_count = 0
old_user_id = ''
old_edits = None
expected_year_month_dt = ''
# parameters = []
# editors_edits_baseline_parameters = []
active_months = 0
active_months_row = 0
total_months = 0
max_active_months_row = 0
inactivity_periods = 0
inactive_months = 0
max_inactive_months_row = 0
total_edits = []
edits_increase_decrease = 0
try: os.remove(databases_path +'temporary_editor_metrics.txt')
except: pass
edfile2 = open(databases_path+'temporary_editor_metrics.txt', "w")
for row in cursor.execute(query):
edits=row[0]
current_year_month = row[1]
cur_user_id = row[2]
cur_user_name = row[3]
if cur_user_id != old_user_id and old_user_id != '':
user_count += 1
cycle_year_month_dt = datetime.datetime.strptime(cycle_year_month,'%Y-%m')
months_since_last_edit = (cycle_year_month_dt.year - current_year_month_dt.year) * 12 + cycle_year_month_dt.month - current_year_month_dt.month
if months_since_last_edit < 0: months_since_last_edit = 0
if months_since_last_edit > 0:
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(months_since_last_edit)+'\t'+" "+'\t'+"months_since_last_edit"+'\t'+old_year_month+'\t'+" "+'\n')
if months_since_last_edit > max_inactive_months_row:
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(months_since_last_edit)+'\t'+" "+'\t'+"max_inactive_months_row"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(1)+'\t'+" "+'\t'+"over_past_max_inactive_months_row"+'\t'+cycle_year_month+'\t'+" "+'\n')
else:
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(max_inactive_months_row)+'\t'+" "+'\t'+"max_inactive_months_row"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(inactivity_periods)+'\t'+" "+'\t'+"inactivity_periods"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(active_months)+'\t'+" "+'\t'+"active_months"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(max_active_months_row)+'\t'+" "+'\t'+"max_active_months_row"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(total_months)+'\t'+" "+'\t'+"total_months"+'\t'+old_year_month+'\t'+" "+'\n')
active_months = 0
total_months = 0
active_months_row = 0
max_active_months_row = 0
inactivity_periods = 0
inactive_months = 0
max_inactive_months_row = 0
total_edits = []
old_edits = None
current_year_month_dt = datetime.datetime.strptime(current_year_month,'%Y-%m')
# here there is a change of month
# if the month is not the expected one
if expected_year_month_dt != current_year_month_dt and expected_year_month_dt != '' and old_user_id == cur_user_id:
inactivity_periods += 1
while expected_year_month_dt < current_year_month_dt:
# print (expected_year_month_dt, current_year_month_dt)
inactive_months = inactive_months + 1
expected_year_month_dt = (expected_year_month_dt + relativedelta.relativedelta(months=1))
total_months = total_months + 1
if inactive_months > max_inactive_months_row:
max_inactive_months_row = inactive_months
if active_months_row > max_active_months_row:
max_active_months_row = active_months_row
edfile2.write(str(cur_user_id)+'\t'+cur_user_name+'\t'+str(inactive_months)+'\t'+" "+'\t'+"inactive_months_row"+'\t'+current_year_month+'\t'+" "+'\n')
active_months_row = 1
inactive_months = 0
edits_increase_decrease = 1
edfile2.write(str(cur_user_id)+'\t'+cur_user_name+'\t'+str(edits_increase_decrease)+'\t'+" "+'\t'+"monthly_edits_increasing_decreasing"+'\t'+current_year_month+'\t'+" "+'\n')
else:
active_months_row = active_months_row + 1
if active_months_row > 1:
edfile2.write(str(cur_user_id)+'\t'+cur_user_name+'\t'+str(active_months_row)+'\t'+" "+'\t'+"active_months_row"+'\t'+current_year_month+'\t'+" "+'\n')
if active_months_row > max_active_months_row:
max_active_months_row = active_months_row
if inactive_months == 0 and total_months == 0:
edfile2.write(str(cur_user_id)+'\t'+cur_user_name+'\t'+str(-1)+'\t'+" "+'\t'+"inactive_months_row"+'\t'+current_year_month+'\t'+" "+'\n')
else:
edfile2.write(str(cur_user_id)+'\t'+cur_user_name+'\t'+str(inactive_months)+'\t'+" "+'\t'+"inactive_months_row"+'\t'+current_year_month+'\t'+" "+'\n')
if old_edits != None:
if old_edits > edits:
if edits_increase_decrease <= 0: edits_increase_decrease = edits_increase_decrease - 1
else: edits_increase_decrease = -1
elif old_edits < edits:
if edits_increase_decrease >= 0: edits_increase_decrease = edits_increase_decrease + 1
else: edits_increase_decrease = 1
else:
edits_increase_decrease = 0
edfile2.write(str(cur_user_id)+'\t'+cur_user_name+'\t'+str(edits_increase_decrease)+'\t'+" "+'\t'+"monthly_edits_increasing_decreasing"+'\t'+current_year_month+'\t'+" "+'\n')
else:
edits_increase_decrease = 1
if total_edits != []:
median_total_edits = np.median(total_edits)
edfile2.write(str(cur_user_id)+'\t'+cur_user_name+'\t'+str((100*edits/median_total_edits - 100))+'\t'+" "+'\t'+"monthly_edits_to_baseline"+'\t'+current_year_month+'\t'+" "+'\n')
# if cur_user_name == '-Erick-':
# print (str(cur_user_id)+'\t'+cur_user_name+','+str((100*edits/median_total_edits - 100))+'\t'+" "+'\t'+"monthly_edits_to_baseline"+'\t'+current_year_month+'\n')
total_edits.append(edits)
old_edits = edits
total_months = total_months + 1
active_months = active_months + 1
old_year_month = current_year_month
expected_year_month_dt = (datetime.datetime.strptime(old_year_month,'%Y-%m') + relativedelta.relativedelta(months=1))
old_user_id = cur_user_id
old_user_name = cur_user_name
# print ('# update: ',old_user_id, old_user_name, active_months, max_active_months_row, max_inactive_months_row, total_months)
# input('')
cycle_year_month_dt = datetime.datetime.strptime(cycle_year_month,'%Y-%m')
if current_year_month_dt == None:
print ('The table is empty. ERROR.')
months_since_last_edit = (cycle_year_month_dt.year - current_year_month_dt.year) * 12 + cycle_year_month_dt.month - current_year_month_dt.month
if months_since_last_edit < 0: months_since_last_edit = 0
if months_since_last_edit > 0:
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(months_since_last_edit)+'\t'+" "+'\t'+"months_since_last_edit"+'\t'+old_year_month+'\t'+" "+'\n')
if months_since_last_edit > max_inactive_months_row:
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(months_since_last_edit)+'\t'+" "+'\t'+"max_inactive_months_row"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(1)+'\t'+" "+'\t'+"over_past_max_inactive_months_row"+'\t'+cycle_year_month+'\t'+" "+'\n')
else:
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(max_inactive_months_row)+'\t'+" "+'\t'+"max_inactive_months_row"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(inactivity_periods)+'\t'+" "+'\t'+"inactivity_periods"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(active_months)+'\t'+" "+'\t'+"active_months"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(max_active_months_row)+'\t'+" "+'\t'+"max_active_months_row"+'\t'+old_year_month+'\t'+" "+'\n')
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(total_months)+'\t'+" "+'\t'+"total_months"+'\t'+old_year_month+'\t'+" "+'\n')
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
a_file = open(databases_path+"temporary_editor_metrics.txt")
editors_metrics_parameters = csv.reader(a_file, delimiter="\t", quotechar = '|')
# edfile2 = open(databases_path+'temporary_editor_metrics.txt', "r")
# editors_metrics_parameters = []
# while True:
# user_count+=1
# line = edfile2.readline()
# char = line.strip().split('\t')
# # print (char)
# try:
# metric_name = char[4]
# # print (metric_name)
# if metric_name != '': editors_metrics_parameters.append((char[0],char[1],char[2],char[3],metric_name,char[5]))
# except:
# pass
# if user_count % 100000 == 0:
# query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month) VALUES (?,?,?,?,?,?);'
# cursor.executemany(query,editors_metrics_parameters)
# # print (len(editors_metrics_parameters))
# conn.commit()
# editors_metrics_parameters = []
# if not line: break
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) VALUES (?,?,?,?,?,?,?);'
cursor.executemany(query,editors_metrics_parameters)
conn.commit()
os.remove(databases_path +'temporary_editor_metrics.txt')
editors_metrics_parameters = []
print ('done with the monthly edits.')
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
conn2 = sqlite3.connect(databases_path + community_health_metrics_db); cursor2 = conn2.cursor()
# MONTHLY EDITING DAYS LOOP
query = 'SELECT abs_value, year_month, user_id, user_name FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_editing_days" ORDER BY user_id, year_month'
# print (query)
user_count = 0
old_user_id = ''
expected_year_month_dt = ''
editing_days = []
sum_editing_days = 0
try: os.remove(databases_path +'temporary_editors.txt')
except: pass
try: os.remove(databases_path +'temporary_editor_metrics.txt')
except: pass
edfile = open(databases_path+'temporary_editors.txt', "w")
edfile2 = open(databases_path+'temporary_editor_metrics.txt', "w")
for row in cursor.execute(query):
monthly_editing_days=row[0]
current_year_month = row[1]
cur_user_id = row[2]
cur_user_name = row[3]
# print (row)
if cur_user_id != old_user_id and old_user_id != '':
user_count += 1
sum_editing_days = int(sum(editing_days))
edfile.write(str(sum_editing_days)+'\t'+str(old_user_id)+'\t'+old_user_name+'\n')
if editing_days != []:
median_editing_days = np.median(editing_days)
if median_editing_days == 0:
value = 0
else:
value = (100*monthly_editing_days/median_editing_days - 100)
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(value)+'\t'+" "+'\t'+"monthly_editing_days_to_baseline"+'\t'+current_year_month+'\n')
sum_editing_days = 0
editing_days = []
current_year_month_dt = datetime.datetime.strptime(current_year_month,'%Y-%m')
if expected_year_month_dt != current_year_month_dt and expected_year_month_dt != '' and old_user_id == cur_user_id:
while expected_year_month_dt < current_year_month_dt:
editing_days.append(0)
expected_year_month_dt = (expected_year_month_dt + relativedelta.relativedelta(months=1))
editing_days.append(monthly_editing_days)
old_year_month = current_year_month
expected_year_month_dt = (datetime.datetime.strptime(old_year_month,'%Y-%m') + relativedelta.relativedelta(months=1))
old_user_id = cur_user_id
old_user_name = cur_user_name
# print ('out of the loop')
# print (user_count)
# last row percent baseline
if editing_days != []:
median_editing_days = np.median(editing_days)
if median_editing_days == 0:
value = 0
else:
value = (100*monthly_editing_days/median_editing_days - 100)
edfile2.write(str(old_user_id)+'\t'+old_user_name+'\t'+str(value)+'\t'+" "+'\t'+"monthly_editing_days_to_baseline"+'\t'+current_year_month+'\n')
sum_editing_days = sum(editing_days)
edfile.write(str(sum_editing_days)+','+str(old_user_id)+','+old_user_name+'\n')
# BASELINE MEASURES
# edfile = open(databases_path+'temporary_editor_metrics.txt', "r")
# editors_metrics_parameters = []
a_file = open(databases_path+"temporary_editor_metrics.txt")
editors_metrics_parameters = csv.reader(a_file, delimiter="\t", quotechar = '|')
# while True:
# user_count+=1
# line = edfile.readline()
# char = line.strip().split('\t')
# try:
# metric_name = char[4]
# if metric_name != '': editors_metrics_parameters.append((char[0],char[1],char[2],char[3],metric_name,char[5]))
# except:
# pass
# if user_count % 100000 == 0:
# query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month) VALUES (?,?,?,?,?,?);'
# cursor2.executemany(query,editors_metrics_parameters)
# conn2.commit()
# editors_metrics_parameters = []
# if not line: break
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month) VALUES (?,?,?,?,?,?);'
cursor2.executemany(query,editors_metrics_parameters)
conn2.commit()
os.remove(databases_path +'temporary_editor_metrics.txt')
# EDITING DAYS
# sum
# edfile = open(databases_path+'temporary_editors.txt', "r")
# editors_characteristics_parameters = []
a_file = open(databases_path+"temporary_editors.txt")
editors_characteristics_parameters = csv.reader(a_file, delimiter="\t", quotechar = '|')
# while True:
# user_count+=1
# line = edfile.readline()
# char = line.strip().split('\t')
# try:
# editors_characteristics_parameters.append((char[0],char[1],char[2]))
# except:
# pass
# if user_count % 100000 == 0:
# query = 'UPDATE '+languagecode+'wiki_editors SET editing_days = ? WHERE user_id = ? AND user_name = ?;'
# cursor2.executemany(query,editors_characteristics_parameters)
# conn2.commit()
# editors_characteristics_parameters = []
# if not line: break
query = 'UPDATE '+languagecode+'wiki_editors SET editing_days = ? WHERE user_id = ? AND user_name = ?;'
cursor2.executemany(query,editors_characteristics_parameters)
conn2.commit()
os.remove(databases_path +'temporary_editors.txt')
editors_characteristics_parameters = []
# percent
query = 'UPDATE '+languagecode+'wiki_editors SET percent_editing_days = (100*editing_days/lifetime_days);'
cursor.execute(query)
conn.commit()
print ('done with the monthly editing days.')
duration = str(datetime.timedelta(seconds=time.time() - functionstartTime))
#### --------- --------- --------- --------- --------- --------- --------- --------- ---------
# # OVER PAST MAX INACTIVE MONTHS ROW
# query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) SELECT i1.user_id, i1.user_name, (i1.abs_value - i2.abs_value), i1.rel_value, "over_past_max_inactive_months_row", i2.year_month, i2.timestamp FROM '+languagecode+'wiki_editor_metrics i1 INNER JOIN '+languagecode+'wiki_editor_metrics i2 ON i1.user_id = i2.user_id WHERE i1.metric_name = "max_inactive_months_row" AND i2.metric_name = "months_since_last_edit";'
# cursor.execute(query)
# conn.commit()
# OVER EDIT BIN AVERAGE PAST MAX INACTIVE MONTHS ROW
edit_bin_average_past_max_inactive_months_row = {}
query = 'SELECT i2.abs_value, AVG(i1.abs_value) FROM '+languagecode+'wiki_editor_metrics i1 INNER JOIN '+languagecode+'wiki_editor_metrics i2 ON i1.user_id = i2.user_id WHERE i1.metric_name = "max_inactive_months_row" AND i2.metric_name = "edit_count_bin" GROUP BY i2.abs_value;';
for row in cursor.execute(query):
edit_bin_average_past_max_inactive_months_row[row[0]]=row[1]
for edit_bin, average in edit_bin_average_past_max_inactive_months_row.items():
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) SELECT i1.user_id, i1.user_name, (? - i2.abs_value), i1.rel_value, "over_edit_bin_average_past_max_inactive_months_row", i2.year_month, i2.timestamp FROM '+languagecode+'wiki_editor_metrics i1 INNER JOIN '+languagecode+'wiki_editor_metrics i2 ON i1.user_id = i2.user_id WHERE i1.metric_name = "edit_count_bin" AND i1.abs_value = ? AND i2.metric_name = "months_since_last_edit";'
cursor.execute(query,(average, edit_bin))
conn.commit()
# OVER MONTHLY EDIT BIN AVERAGE PAST MAX INACTIVE MONTHS ROW
edit_bin_average_past_max_inactive_months_row = {}
query = 'SELECT i2.abs_value, AVG(i1.abs_value) FROM '+languagecode+'wiki_editor_metrics i1 INNER JOIN '+languagecode+'wiki_editor_metrics i2 ON i1.user_id = i2.user_id WHERE i1.metric_name = "max_inactive_months_row" AND i2.metric_name = "monthly_edit_count_bin" GROUP BY i2.abs_value;';
for row in cursor.execute(query):
edit_bin_average_past_max_inactive_months_row[row[0]]=row[1]
for edit_bin, average in edit_bin_average_past_max_inactive_months_row.items():
query = 'INSERT OR IGNORE INTO '+languagecode+'wiki_editor_metrics (user_id, user_name, abs_value, rel_value, metric_name, year_month, timestamp) SELECT i1.user_id, i1.user_name, (? - i2.abs_value), i1.rel_value, "over_monthly_edit_bin_average_past_max_inactive_months_row", i2.year_month, i2.timestamp FROM '+languagecode+'wiki_editor_metrics i1 INNER JOIN '+languagecode+'wiki_editor_metrics i2 ON i1.user_id = i2.user_id WHERE i1.metric_name = "monthly_edit_count_bin" AND i1.abs_value = ? AND i2.metric_name = "months_since_last_edit";'
cursor.execute(query,(average, edit_bin))
conn.commit()
duration = str(datetime.timedelta(seconds=time.time() - functionstartTime))
print(languagecode+' '+ function_name+' '+ duration)
def community_metrics_db_iterator(languagecode):
functionstartTime = time.time()
function_name = 'community_metrics_db_iterator '+languagecode
print (function_name)
conn = sqlite3.connect(databases_path + community_health_metrics_db); cursor = conn.cursor()
d_paths, cym = get_mediawiki_paths(languagecode)
cycle_year_month = cym
print (cycle_year_month)
query_cm = 'INSERT OR IGNORE INTO '+languagecode+'wiki_community_metrics (year_month, topic, m1, m1_calculation, m1_value, m2, m2_calculation, m2_value, m1_count, m2_count) VALUES (?,?,?,?,?,?,?,?,?,?);'
def participation():
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000
parameters = []
edit_bins_count = {}
query = 'SELECT count(user_id), abs_value, year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "edit_count_bin" GROUP by abs_value;'
for row in cursor.execute(query):
m1_count = row[0]
m1_value = row[1]
year_month = row[2]
edit_bins_count[m1_value] = m1_count
parameters.append((year_month, 'editor_participation', 'total_edits', 'bin', m1_value, None, None, None, m1_count, None))
cursor.executemany(query_cm,parameters)
conn.commit()
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 monthly_edits threshold 5
parameters = []
query = 'SELECT count(e1.user_id), e1.abs_value, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" AND e2.metric_name = "monthly_edits" AND e2.abs_value >= 5 GROUP BY e1.abs_value ORDER BY e1.abs_value DESC;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
year_month = row[2]
m1_count = edit_bins_count[m1_value]
parameters.append((year_month, 'editor_participation', 'total_edits', 'bin', m1_value, 'monthly_edits', 'threshold', 5, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 year_first_edit bin 2001-2021
parameters = []
query = 'SELECT count(e1.user_id), e1.abs_value, e2.year_first_edit, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" GROUP by e1.abs_value, e2.year_first_edit;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
m1_count = edit_bins_count[m1_value]
year_month = row[3]
parameters.append((year_month, 'editor_participation', 'total_edits', 'bin', m1_value, 'year_first_edit', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 lustrum_first_edit bin 2001, 2006, 2011, 2016, 2021
parameters = []
query = 'SELECT count(e1.user_id), e1.abs_value, e2.lustrum_first_edit, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" GROUP by e1.abs_value, e2.lustrum_first_edit;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
m1_count = edit_bins_count[m1_value]
year_month = row[3]
parameters.append((year_month, 'editor_participation', 'total_edits', 'bin', m1_value, 'lustrum_first_edit', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
editing_days = {(1,100):'1-100',(101,500):'101-500', (501,1000):'501-1000', (1001,1500):'1001-1500', (1501,2500):'1501-2500', (2501,3500):'2501-3500', (3501,4500):'3501-4500', (4501,5500):'4501-5500', (5501,6500):'5501-6500', (6501,7500):'6501-7500'}
percent_editing_days = {(0,10):'0-10',(11,20):'11-20',(21,30):'21-30',(31,40):'31-40',(41,50):'41-50',(51,60):'51-60',(61,70):'61-70',(71,80):'71-80',(81,90):'81-90',(91,100):'91-100'}
active_months = {(0,0):'0', (217, 228): '217-228', (301, 312): '301-312', (277, 288): '277-288', (25, 36): '25-36', (241, 252): '241-252', (109, 120): '109-120', (85, 96): '85-96', (61, 72): '61-72', (205, 216): '205-216', (289, 300): '289-300', (193, 204): '193-204', (73, 84): '73-84', (49, 60): '49-60', (37, 48): '37-48', (265, 276): '265-276', (181, 192): '181-192', (145, 156): '145-156', (13, 24): '13-24', (253, 264): '253-264', (133, 144): '133-144', (1, 12): '1-12', (121, 132): '121-132', (169, 180): '169-180', (157, 168): '157-168', (229, 240): '229-240', (97, 108): '97-108'}
bin_dicts = {'editing_days':editing_days, 'percent_editing_days':percent_editing_days, 'active_months':active_months}
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 editing_days bin 0_100, 100_500, 500_1000, 1000-1500, 1500-2500, 2500-3500, 3500-5000, 5000-6500, 6500-7500…
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 percent_editing_days bin 1-10 to 100
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 active_months bin 1-10, 10-20, 30-40,... to 150
parameters = []
for variable_name, bin_dict in bin_dicts.items():
for interval, label in bin_dict.items():
query = 'SELECT count(e1.user_id), e1.abs_value, e1.year_month, "'+label+'" FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" AND e2.'+variable_name+' BETWEEN '+str(interval[0])+' AND '+str(interval[1])+' GROUP by e1.abs_value;'
m2_count = row[0]
m1_value = row[1]
m2_value = label
year_month = row[2]
m1_count = edit_bins_count[m1_value]
parameters.append((year_month, 'editor_participation', 'total_edits', 'bin', m1_value, variable_name, 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 flag name sysop, autopatrolled, bureaucrat, etc.
parameters = []
query = 'SELECT count(e1.user_id), e1.abs_value, e2.highest_flag, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" GROUP by e1.abs_value, e2.highest_flag;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
year_month = row[3]
m1_count = edit_bins_count[m1_value]
parameters.append((year_month, 'editor_participation', 'total_edits', 'bin', m1_value, 'highest_flag', 'name', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
print ('editor_participation')
def flags():
# flags granted_flag name sysop, autopatrolled, bureaucrat, etc.
# flags removed_flag name sysop, autopatrolled, bureaucrat, etc.
for variablef in ['granted_flag','removed_flag']:
parameters = []
year_month = cycle_year_month
query = 'SELECT count(user_id), abs_value, year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "'+variablef+'" AND abs_value != "bot" GROUP BY year_month, abs_value;'
for row in cursor.execute(query):
m1_count = row[0]
m1_value = row[1]
year_month = row[2]
parameters.append((year_month, 'editor_flags', 'highest_flag', 'name', m1_value, None, None, None, m1_count, None))
cursor.executemany(query_cm,parameters)
conn.commit()
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc.
parameters = []
highest_flag_count = {}
year_month = cycle_year_month
query = 'SELECT count(user_id), highest_flag FROM '+languagecode+'wiki_editors GROUP by highest_flag;'
for row in cursor.execute(query):
m1_count = row[0]
m1_value = row[1]
highest_flag_count[m1_value] = m1_count
parameters.append((year_month, 'editor_flags', 'highest_flag', 'name', m1_value, None, None, None, m1_count, None))
cursor.executemany(query_cm,parameters)
conn.commit()
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. monthly_edits threshold 5
parameters = []
query = 'SELECT count(e1.user_id), e1.highest_flag, e2.year_month FROM '+languagecode+'wiki_editors e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e2.metric_name = "monthly_edits" AND e2.abs_value >= 5 GROUP BY e1.highest_flag, e2.year_month ORDER BY e1.highest_flag, e2.year_month ASC;'
for row in cursor.execute(query):
m1_count = highest_flag_count[m1_value]
m2_count = row[0]
m1_value = row[1]
year_month = row[2]
parameters.append((year_month, 'editor_flags', 'highest_flag', 'name', m1_value, 'monthly_edits', 'threshold', 5, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. highest_flag_year_month bin 2001-2021 x: g1, y: g2 (last year_month)
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. year_first_edit bin 2001-2021
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. lustrum_first_edit bin 2001, 2006, 2011, 2016, 2021
m2s = ['highest_flag_year_month', 'year_first_edit','lustrum_first_edit']
for g2 in m2s:
parameters = []
query = 'SELECT count(user_id), highest_flag, '+g2+' FROM '+languagecode+'wiki_editors GROUP BY highest_flag, '+g2
year_month = cycle_year_month
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
m1_count = highest_flag_count[m1_value]
parameters.append((year_month, 'editor_flags', 'highest_flag', 'name', m1_value, g2, 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
editing_days = {(1,100):'1-100',(101,500):'101-500', (501,1000):'501-1000', (1001,1500):'1001-1500', (1501,2500):'1501-2500', (2501,3500):'2501-3500', (3501,4500):'3501-4500', (4501,5500):'4501-5500', (5501,6500):'5501-6500', (6501,7500):'6501-7500'}
percent_editing_days = {(0,10):'0-10',(11,20):'11-20',(21,30):'21-30',(31,40):'31-40',(41,50):'41-50',(51,60):'51-60',(61,70):'61-70',(71,80):'71-80',(81,90):'81-90',(91,100):'91-100'}
active_months = {(0,0):'0', (217, 228): '217-228', (301, 312): '301-312', (277, 288): '277-288', (25, 36): '25-36', (241, 252): '241-252', (109, 120): '109-120', (85, 96): '85-96', (61, 72): '61-72', (205, 216): '205-216', (289, 300): '289-300', (193, 204): '193-204', (73, 84): '73-84', (49, 60): '49-60', (37, 48): '37-48', (265, 276): '265-276', (181, 192): '181-192', (145, 156): '145-156', (13, 24): '13-24', (253, 264): '253-264', (133, 144): '133-144', (1, 12): '1-12', (121, 132): '121-132', (169, 180): '169-180', (157, 168): '157-168', (229, 240): '229-240', (97, 108): '97-108'}
bin_dicts = {'editing_days':editing_days, 'percent_editing_days':percent_editing_days}
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. editing_days bin 1-100, 100-200, etc.
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. percent_editing_days bin 1-10 to 100
for variable_name, bin_dict in bin_dicts.items():
parameters = []
for interval, label in bin_dict.items():
query = 'SELECT count(e1.user_id), e1.abs_value, e1.year_month, "'+label+'" FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" AND e2.'+variable_name+' BETWEEN '+str(interval[0])+' AND '+str(interval[1])+' GROUP by e1.abs_value;'
m2_count = row[0]
m1_value = row[1]
m2_value = label
year_month = row[2]
m1_count = highest_flag_count[m1_value]
parameters.append((year_month, 'editor_flags', 'highest_flag', 'name', m1_value, variable_name, 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. active_months bin 1-10, 10-20, 30-40,... to 150
for interval, label in active_months.items():
query = 'SELECT count(e1.user_id), e1.abs_value, e1.year_month, "'+label+'" FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" AND e2.metric_name = "active_months" AND e2.abs_value BETWEEN '+str(interval[0])+' AND '+str(interval[0])+' GROUP by e1.abs_value;'
m2_count = row[0]
m1_value = row[1]
m2_value = label
year_month = row[2]
m1_count = highest_flag_count[m1_value]
parameters.append((year_month, 'editor_flags', 'highest_flag', 'name', m1_value, "active_months", 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000
parameters = []
query = 'SELECT count(e1.user_id), e1.highest_flag, e2.abs_value, e2.year_month FROM '+languagecode+'wiki_editors e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e2.metric_name = "edit_count_bin" GROUP BY e1.highest_flag, e2.abs_value;'
for row in cursor.execute(query):
m1_count = highest_flag_count[m1_value]
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
year_month = row[3]
parameters.append((year_month, 'editor_flags', 'highest_flag', 'name', m1_value, 'total_edits', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
print ('editor_flags')
# ACTIVE CONTRIBUTORS (THRESHOLD, NO BINS)
# active_editors, active_editors_5, active_editors_10, active_editors_50, active_editors_100, active_editors_500, active_editors_1000
def active_editors():
# active_editors monthly_edits threshold 1, 5, 10, 50, 100, 500, 1000
active_editors_5_year_month = {}
values = [1,5,10,50,100,500,1000,5000]
parameters = []
for v in values:
query = 'SELECT count(distinct user_id), year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_edits" AND abs_value >= '+str(v)+' GROUP BY year_month ORDER BY year_month'
for row in cursor.execute(query):
# print (row)
m1_count=row[0];
year_month=row[1]
if year_month == '': continue
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', v, None, None, None, m1_count, None))
if v == 5: active_editors_5_year_month[year_month] = m1_count
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits bin 1, 5, 10, 50, 100, 500, 1000
parameters = []
values = [1,5,10,50,100,500,1000,5000]
for x in range(0,len(values)):
v = values[x]
if x < len(values)-1:
w = values[x+1]
query = 'SELECT count(distinct user_id), year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_edits" AND abs_value >= '+str(v)+' AND abs_value < '+str(w)+' GROUP BY year_month ORDER BY year_month'
w = w - 1
else:
w = 'inf'
query = 'SELECT count(distinct user_id), year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_edits" AND abs_value >= '+str(v)+' GROUP BY year_month ORDER BY year_month'
# print (query)
for row in cursor.execute(query):
# print (row)
m1_count=row[0];
year_month=row[1]
if year_month == '': continue
parameters.append((year_month, 'active_editors', 'monthly_edits', 'bin', str(v)+'_'+str(w) , None, None, None, m1_count, None))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 year_first_edit bin 2001-2021
query = 'SELECT count(e1.user_id), e1.year_month, e2.year_first_edit FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 on e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 GROUP BY e1.year_month, e2.year_first_edit;'
parameters = []
for row in cursor.execute(query):
# print (row)
m2_count=row[0];
year_month=row[1]
year_first_edit=row[2]
if year_month == '': continue
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', 5, 'year_first_edit', 'bin', year_first_edit, active_editors_5_year_month[year_month], m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 lustrum_first_edit bin 2001, 2006, 2011, 2016, 2021
query = 'SELECT count(e1.user_id), e1.year_month, e2.lustrum_first_edit FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 on e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 GROUP BY e1.year_month, e2.lustrum_first_edit;'
parameters = []
for row in cursor.execute(query):
# print (row)
m2_count=row[0];
year_month=row[1]
lustrum_first_edit=row[2]
if year_month == '': continue
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', 5, 'lustrum_first_edit', 'bin', lustrum_first_edit, active_editors_5_year_month[year_month], m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 active_months bin 1-10, 10-20, 30-40,... to 150
active_months = {(0,0):'0', (217, 228): '217-228', (301, 312): '301-312', (277, 288): '277-288', (25, 36): '25-36', (241, 252): '241-252', (109, 120): '109-120', (85, 96): '85-96', (61, 72): '61-72', (205, 216): '205-216', (289, 300): '289-300', (193, 204): '193-204', (73, 84): '73-84', (49, 60): '49-60', (37, 48): '37-48', (265, 276): '265-276', (181, 192): '181-192', (145, 156): '145-156', (13, 24): '13-24', (253, 264): '253-264', (133, 144): '133-144', (1, 12): '1-12', (121, 132): '121-132', (169, 180): '169-180', (157, 168): '157-168', (229, 240): '229-240', (97, 108): '97-108'}
parameters = []
for interval, label in active_months.items():
query = 'SELECT count(e1.user_id), e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 AND e2.metric_name = "active_months" AND e2.abs_value BETWEEN '+str(interval[0])+' AND '+str(interval[1])+' GROUP by e1.year_month, e1.abs_value;'
for row in cursor.execute(query):
m2_count = row[0]
year_month = row[1]
m2_value = label
m1_count = active_editors_5_year_month[year_month]
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', 5, "active_months", 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 active_months_row bin 2, 3, 4, 5, …
# active_editors monthly_edits threshold 5 max_active_months_row bin 2, 3, 4, 5, …
# active_editors monthly_edits threshold 5 inactive_months_row bin -1, 0, 1, 2, 3, 4, 5, … 12, …
# active_editors monthly_edits threshold 5 max_inactive_months_row bin 2, 3, 4, 5, …
m2s = ['inactivity_periods','active_months_row', 'inactive_months_row','max_active_months_row','max_inactive_months_row', 'monthly_edits_increasing_decreasing']
for m2 in m2s:
parameters = []
query = 'SELECT count(e1.user_id), e2.abs_value, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 AND e2.metric_name = "'+m2+'" GROUP BY e1.year_month, e2.abs_value;'
for row in cursor.execute(query):
m2_count = row[0]
m2_value = row[1]
year_month = row[2]
m1_count = active_editors_5_year_month[year_month]
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', 5, m2, 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000
parameters = []
query = 'SELECT count(e1.user_id), e2.abs_value, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 AND e2.metric_name = "edit_count_bin" GROUP BY e2.abs_value;'
for row in cursor.execute(query):
m2_count = row[0]
m2_value = row[1]
year_month = row[2]
m1_count = active_editors_5_year_month[year_month]
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', 5, 'total_edits', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 flag name sysop, autopatrolled, bureaucrat, etc.
parameters = []
query = 'SELECT count(e1.user_id), e2.highest_flag, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 GROUP by e1.abs_value, e2.highest_flag;'
for row in cursor.execute(query):
m2_count = row[0]
m2_value = row[1]
year_month = row[2]
m1_count = active_editors_5_year_month[year_month]
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', 5, 'highest_flag', 'name', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 monthly_editing_days bin 1-10 to 100
parameters = []
query = 'SELECT count(e1.user_id), e2.abs_value, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 AND e2.metric_name = "monthly_editing_days" GROUP BY e1.year_month, e2.abs_value;'
for row in cursor.execute(query):
m2_count = row[0]
m2_value = row[1]
year_month = row[2]
m1_count = active_editors_5_year_month[year_month]
parameters.append((year_month, 'active_editors', 'monthly_edits', 'threshold', 5, 'monthly_editing_days', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
print ('active_editors')
def retention():
# monthly_registered_first_edit
parameters = []
registered_baseline = {}
query = 'SELECT count(distinct user_id), year_month_registration FROM '+languagecode+'wiki_editors GROUP BY 2 ORDER BY 2 ASC;'
for row in cursor.execute(query):
value=row[0];
year_month=row[1]
if year_month == '': continue
try: registered_baseline[year_month] = int(value)
except: pass
parameters.append((year_month, 'editor_retention', 'register', 'threshold', 1, None, None, None, value, None))
retention_baseline = {}
query = 'SELECT count(distinct user_id), year_month_first_edit FROM '+languagecode+'wiki_editors GROUP BY 2 ORDER BY 2 ASC;'
for row in cursor.execute(query):
value=row[0];
year_month=row[1]
if year_month == '': continue
try: retention_baseline[year_month] = int(value)
except: pass
parameters.append((year_month, 'editor_retention', 'first_edit', 'threshold', 1, None, None, None, value, None))
try:
m1_count = registered_baseline[year_month]
except:
m1_count = 0
parameters.append((year_month, 'editor_retention', 'register', 'threshold', 1, 'first_edit', 'threshold', 1, m1_count, value))
cursor.executemany(query_cm,parameters)
conn.commit()
parameters = []
queries_retention_dict = {}
# RETENTION
# number of editors who edited at least once 24h after the first edit
queries_retention_dict['24h'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "edit_count_24h" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited at least once 7 days after the first edit
queries_retention_dict['7d'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "edit_count_7d" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited at least once 30 days after the first edit
queries_retention_dict['30d'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "edit_count_30d" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited at least once 60 days after the first edit
queries_retention_dict['60d'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "edit_count_60d" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited at least once 365 days after the first edit
queries_retention_dict['365d'] = 'SELECT count(distinct user_id), year_month_first_edit FROM '+languagecode+'wiki_editors WHERE lifetime_days >= 365 GROUP BY 2 ORDER BY 1;'
# number of editors who edited at least once 730 days after the first edit
queries_retention_dict['730d'] = 'SELECT count(distinct user_id), year_month_first_edit FROM '+languagecode+'wiki_editors WHERE lifetime_days >= 730 GROUP BY 2 ORDER BY 1;'
for metric_name, query in queries_retention_dict.items():
for row in cursor.execute(query):
value=row[0];
year_month=row[1]
if year_month == '': continue
try: m1_count = retention_baseline[year_month]
except: m1_count = 0
parameters.append((year_month, 'editor_retention', 'first_edit', 'threshold', 1, 'edited_after_time', 'threshold', metric_name, m1_count, value))
try: m1_count = registered_baseline[year_month]
except: m1_count = 0
parameters.append((year_month, 'editor_retention', 'register', 'threshold', 1, 'edited_after_time', 'threshold', metric_name, m1_count, value))
cursor.executemany(query_cm,parameters)
conn.commit()
parameters = []
queries_retention_dict = {}
# USER PAGES
# number of editors who edited their user_page at least once during the first 24h after their first edit
queries_retention_dict['editors_edited_user_page_d24h_afe'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "user_page_edit_count_24h" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited their user_page at least once during the first 30 days after their first edit
queries_retention_dict['editors_edited_user_page_d30d_afe'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "user_page_edit_count_1month" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited their user_page at least once
queries_retention_dict['editors_edited_user_page_afe'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "monthly_edits_ns2_user" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
for metric_name, query in queries_retention_dict.items():
for row in cursor.execute(query):
value=row[0];
year_month=row[1]
if year_month == '': continue
try: m1_count = retention_baseline[year_month]
except: m1_count = 0
parameters.append((year_month, 'editor_retention', 'first_edit', 'threshold', 1, 'edited_user_page_after_time', 'threshold', metric_name, m1_count, value))
try: m1_count = registered_baseline[year_month]
except: m1_count = 0
parameters.append((year_month, 'editor_retention', 'register', 'threshold', 1, 'edited_user_page_after_time', 'threshold', metric_name, m1_count, value))
cursor.executemany(query_cm,parameters)
conn.commit()
parameters = []
queries_retention_dict = {}
# USER PAGE TALK PAGE
# number of editors who edited their user_page_talk_page at least once during the first 24h after their first edit
queries_retention_dict['editors_edited_user_page_talk_page_d24h_afe'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "user_page_talk_page_edit_count_24h" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited their user_page_talk_page at least once during the first 30 daysafter their first edit
queries_retention_dict['editors_edited_user_page_talk_page_d30d_afe'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "user_page_talk_page_edit_count_1month" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
# number of editors who edited their user_page_talk_page at least once after the first edit
queries_retention_dict['editors_edited_user_page_talk_page_afe'] = 'SELECT count(distinct ch.user_id), ch.year_month_first_edit FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "monthly_edits_ns3_user_talk" AND ce.abs_value > 0 GROUP BY 2 ORDER BY 2 ASC;'
for metric_name, query in queries_retention_dict.items():
for row in cursor.execute(query):
value=row[0];
year_month=row[1]
if year_month == '': continue
try: m1_count = retention_baseline[year_month]
except: m1_count = 0
parameters.append((year_month, 'editor_retention', 'first_edit', 'threshold', 1, 'edited_user_page_talk_page_after_time', 'threshold', metric_name, m1_count, value))
try: m1_count = registered_baseline[year_month]
except: m1_count = 0
parameters.append((year_month, 'editor_retention', 'register', 'threshold', 1, 'edited_user_page_talk_page_after_time', 'threshold', metric_name, m1_count, value))
cursor.executemany(query_cm,parameters)
conn.commit()
print ('editor_retention')
def drop_off():
year_month = cycle_year_month
lustrum_first_edit_dict = {}
query = 'SELECT count(user_id), lustrum_first_edit FROM '+languagecode+'wiki_editors WHERE lustrum_first_edit != "" GROUP BY lustrum_first_edit;'
for row in cursor.execute(query):
lustrum_first_edit_dict[row[1]]=row[0]
year_first_edit_dict = {}
query = 'SELECT count(user_id), year_first_edit FROM '+languagecode+'wiki_editors WHERE year_first_edit != "" GROUP BY year_first_edit;'
for row in cursor.execute(query):
year_first_edit_dict[row[1]]=row[0]
edit_bins_count = {}
query = 'SELECT count(user_id), abs_value, year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "edit_count_bin" GROUP by abs_value;'
for row in cursor.execute(query):
edit_bins_count[row[1]] = row[0]
highest_flag_dict = {}
query = 'SELECT count(user_id), highest_flag FROM '+languagecode+'wiki_editors WHERE highest_flag != "" GROUP BY highest_flag;'
for row in cursor.execute(query):
highest_flag_dict[row[1]]=row[0]
# registered_editors lustrum_first_edit bin 2001, 2006, 2011, 2016, 2020 year_last_edit bin 2001-2021 (180 days since last edit)
parameters = []
query = 'SELECT count(user_id), lustrum_first_edit, year_last_edit FROM '+languagecode+'wiki_editors WHERE lustrum_first_edit != "" AND days_since_last_edit >= 180 GROUP BY lustrum_first_edit, year_last_edit ORDER BY lustrum_first_edit, year_last_edit;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
parameters.append((year_month, 'editor_drop_off', 'lustrum_first_edit', 'bin', m1_value, 'year_last_edit', 'bin', m2_value, lustrum_first_edit_dict[m1_value], m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# registered_editors year_first_edit bin 2001-2021 year_last_edit bin 2001-2021 (180 days since last edit)
parameters = []
query = 'SELECT count(user_id), year_first_edit, year_last_edit FROM '+languagecode+'wiki_editors WHERE year_first_edit != "" AND days_since_last_edit >= 180 GROUP BY year_first_edit, year_last_edit ORDER BY year_first_edit, year_last_edit;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
parameters.append((year_month, 'editor_drop_off', 'year_first_edit', 'bin', m1_value, 'year_last_edit', 'bin', m2_value, year_first_edit_dict[m1_value], m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 year_last_edit bin 2001-2021
parameters = []
query = 'SELECT count(e1.user_id), e1.abs_value, e2.year_last_edit, e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" GROUP by e1.abs_value, e2.year_last_edit;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
m1_count = edit_bins_count[m1_value]
year_month = row[3]
parameters.append((year_month, 'editor_drop_off', 'total_edits', 'bin', m1_value, 'year_last_edit', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 over_past_max_inactive_months_row threshold
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 over_edit_bin_average_past_max_inactive_months_row threshold
m2s = ['over_past_max_inactive_months_row','over_edit_bin_average_past_max_inactive_months_row','over_monthly_edit_bin_average_past_max_inactive_months_row']
for m2 in m2s:
parameters = []
query = 'SELECT count(e1.user_id), e1.abs_value FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" AND e2.metric_name = "'+m2+'" AND e2.abs_value > 0 GROUP by e1.abs_value;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m1_count = edit_bins_count[m1_value]
parameters.append((year_month, 'editor_drop_off', 'total_edits', 'bin', m1_value, m2, 'threshold', 0, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# registered_editors lustrum_first_edit bin 2001, 2006, 2011, 2016, 2020 over_past_max_inactive_months_row threshold > 0
# registered_editors year_first_edit bin 2001-2021 over_edit_bin_average_past_max_inactive_months_row threshold > 0
# registered_editors lustrum_first_edit bin 2001, 2006, 2011, 2016, 2020 over_edit_bin_average_past_max_inactive_months_row threshold > 0
# registered_editors year_first_edit bin 2001-2021 over_past_max_inactive_months_row threshold > 0
m1s = ['year_first_edit','lustrum_first_edit']
m2s = ['over_past_max_inactive_months_row','over_edit_bin_average_past_max_inactive_months_row','over_monthly_edit_bin_average_past_max_inactive_months_row']
for m1 in m1s:
for m2 in m2s:
parameters = []
query = 'SELECT count(e1.user_id), e1.'+m1+' FROM '+languagecode+'wiki_editors e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e2.metric_name = "'+m2+'" AND e2.abs_value > 0 GROUP by e1.'+m1+';'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
if m1 == 'year_first_edit':
try:
m1_count = year_first_edit_dict[m1_value]
except:
m1_count = 0
elif m1 == 'lustrum_first_edit':
try:
m1_count = lustrum_first_edit[m1_value]
except:
m1_count = 0
parameters.append((year_month, 'editor_drop_off', m1, 'bin', m1_value, m2, 'threshold', 0, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# participative_editors total_edits bin 0_100, 100_500, 500_1000, 1000_5000, 5000_10000, 10000_50000, 50000_100000, 100000_500000, 500000_1000000, 1000000_1000000000000 days_since_last_edit bin 60, 120, 180.
days_since_last_edit = 60
while days_since_last_edit <= 1095: # 20 years = 7200 days
parameters = []
next_value_days_since_last_edit = days_since_last_edit + 60
if next_value_days_since_last_edit < 1095:
query = 'SELECT count(e1.user_id), e1.abs_value FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" AND days_since_last_edit BETWEEN '+str(days_since_last_edit)+' AND '+str(next_value_days_since_last_edit)+' GROUP by e1.abs_value;'
else:
query = 'SELECT count(e1.user_id), e1.abs_value FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "edit_count_bin" AND days_since_last_edit > '+str(days_since_last_edit)+' GROUP by e1.abs_value;'
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m1_count = edit_bins_count[m1_value]
m2_value = days_since_last_edit
parameters.append((year_month, 'editor_drop_off', 'total_edits', 'bin', m1_value, 'days_since_last_edit', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
days_since_last_edit = next_value_days_since_last_edit
# flags highest_flag name sysop, autopatrolled, bureaucrat, etc. year_last_edit bin 2001-2021 (180 days inactive since calculation)
parameters = []
query = 'SELECT count(user_id), highest_flag, year_last_edit FROM '+languagecode+'wiki_editors WHERE days_since_last_edit >= 180 GROUP BY year_last_edit, highest_flag'
year_month = cycle_year_month
for row in cursor.execute(query):
m2_count = row[0]
m1_value = row[1]
m2_value = row[2]
try:
m1_count = highest_flag_dict[m1_value]
except:
m1_count = 0
parameters.append((year_month, 'editor_drop_off', 'highest_flag', 'name', m1_value, 'year_last_edit', 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
# active_editors monthly_edits threshold 5 monthly_edits_to_baseline bin 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
# active_editors monthly_edits threshold 5 monthly_editing_days_to_baseline bin 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
active_editors_5_year_month = {}
query = 'SELECT count(distinct user_id), year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_edits" AND abs_value >= '+str(5)+' GROUP BY year_month ORDER BY year_month'
for row in cursor.execute(query):
active_editors_5_year_month[row[1]] = row[0]
m2s = ['monthly_edits_to_baseline','monthly_editing_days_to_baseline']
for m2 in m2s:
query = 'SELECT count(e1.user_id), e1.year_month, e2.abs_value FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "monthly_edits" AND e1.abs_value >= 5 AND e2.metric_name = "'+m2+'" GROUP by e1.year_month, e2.abs_value;'
for row in cursor.execute(query):
m2_count = row[0]
year_month = row[1]
m2_value = row[2]
m1_count = active_editors_5_year_month[year_month]
parameters.append((year_month, 'editor_drop_off', 'monthly_edits', 'bin', 5, m2, 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
print ('editor_drop_off')
def actions():
year_month = cycle_year_month
# monthly_edits monthly_edits sum main, monthly_edits_ns0_main, etc.
m1s = ['monthly_editing_days','monthly_edits','monthly_edits_ns0_main','monthly_edits_ns10_template','monthly_edits_ns11_template_talk','monthly_edits_ns12_help','monthly_edits_ns13_help_talk','monthly_edits_ns14_category','monthly_edits_ns15_category_talk','monthly_edits_ns1_talk','monthly_edits_ns2_user','monthly_edits_ns3_user_talk','monthly_edits_ns4_project','monthly_edits_ns5_project_talk','monthly_edits_ns6_file','monthly_edits_ns7_file_talk','monthly_edits_ns8_mediawiki','monthly_edits_ns9_mediawiki_talk']
parameters = []
sum_monthly_edits = {}
for m1 in m1s:
query = 'SELECT SUM(abs_value), year_month FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "'+m1+'" GROUP BY year_month ORDER BY year_month'
for row in cursor.execute(query):
m1_count = row[0]
sum_monthly_edits[m1,row[1]] = m1_count
parameters.append((year_month, 'editor_actions', 'monthly_edits', 'sum', m1, None, None, None, m1_count, None))
cursor.executemany(query_cm,parameters)
conn.commit()
# edits
m2s = ['lustrum_first_edit','year_first_edit','year_last_edit','highest_flag']
for m2 in m2s:
for m1 in m1s:
if m2 == 'year_last_edit':
query = 'SELECT SUM(e1.abs_value), e2.'+m2+', e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE metric_name = "'+m1+'" AND days_since_last_edit >= 180 GROUP BY e1.year_month, e2.'+m2+' ORDER BY e1.year_month, e2.'+m2
else:
query = 'SELECT SUM(e1.abs_value), e2.'+m2+', e1.year_month FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editors e2 ON e1.user_id = e2.user_id WHERE metric_name = "'+m1+'" GROUP BY e1.year_month, e2.'+m2+' ORDER BY e1.year_month, e2.'+m2
# print (m1, m2)
# print (query)
# input('')
for row in cursor.execute(query):
m2_value = row[1]
m2_count = row[0]
year_month = row[2]
m1_count = sum_monthly_edits[m1,year_month]
parameters.append((year_month, 'editor_actions', 'monthly_edits', 'sum', m1, m2, 'bin', m2_value, m1_count, m2_count))
# print (len(parameters))
cursor.executemany(query_cm,parameters)
conn.commit()
# monthly_edits sum main, monthly_edits_ns0_main, etc. active_months bin 1-10, 10-20, 30-40,... to 150
active_months = {(1,100):'0', (217, 228): '217-228', (301, 312): '301-312', (277, 288): '277-288', (25, 36): '25-36', (241, 252): '241-252', (109, 120): '109-120', (85, 96): '85-96', (61, 72): '61-72', (205, 216): '205-216', (289, 300): '289-300', (193, 204): '193-204', (73, 84): '73-84', (49, 60): '49-60', (37, 48): '37-48', (265, 276): '265-276', (181, 192): '181-192', (145, 156): '145-156', (13, 24): '13-24', (253, 264): '253-264', (133, 144): '133-144', (1, 12): '1-12', (121, 132): '121-132', (169, 180): '169-180', (157, 168): '157-168', (229, 240): '229-240', (97, 108): '97-108'}
year_months = set()
parameters = []
for m1 in m1s:
for interval, label in active_months.items():
query = 'SELECT SUM(e1.abs_value), e1.year_month, "'+label+'" FROM '+languagecode+'wiki_editor_metrics e1 INNER JOIN '+languagecode+'wiki_editor_metrics e2 ON e1.user_id = e2.user_id WHERE e1.metric_name = "'+m1+'" AND e2.metric_name = "active_months" AND e2.abs_value BETWEEN '+str(interval[0])+' AND '+str(interval[1])+' GROUP by e1.year_month, e1.abs_value;'
for row in cursor.execute(query):
m2_value = row[2]
m2_count = row[0]
year_month = row[1]
m1_count = sum_monthly_edits[m1,year_month]
year_months.add(year_month)
parameters.append((year_month, 'editor_actions', 'monthly_edits', 'sum', m1, "active_months", 'bin', m2_value, m1_count, m2_count))
cursor.executemany(query_cm,parameters)
conn.commit()
"""
# GINI
def gini_calculation(x):
# (Warning: This is a concise implementation, but it is O(n**2)
# in time and memory, where n = len(x). *Don't* pass in huge
# samples!)
# Mean absolute difference
mad = np.abs(np.subtract.outer(x, x)).mean()
# Relative mean absolute difference
rmad = mad/np.mean(x)
# Gini coefficient
g = 0.5 * rmad
return g
parameters = []
ym = sorted(list(year_months))
for year_month in ym:
query = 'SELECT ce.abs_value FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "monthly_edits" AND year_month="'+year_month+'" AND ch.bot = "editor" AND ce.abs_value > 0;'
query = 'SELECT abs_value FROM '+languagecode+'wiki_editor_metrics WHERE metric_name = "monthly_edits" AND year_month="'+year_month+'"'
values = []
for row in cursor.execute(query): values.append(row[0]);
v = gini_calculation(values)
parameters.append((year_month, 'monthly_edits', 'monthly_edits', 'gini', 'monthly_edits', None, None, None, v, None))
# query = 'SELECT ce.abs_value FROM '+languagecode+'wiki_editors ch INNER JOIN '+languagecode+'wiki_editor_metrics ce ON ch.user_id = ce.user_id WHERE ce.metric_name = "edit_count" AND ch.bot = "editor" AND ce.abs_value > 0;'
# values = []
# for row in cursor.execute(query): values.append(row[0]);
# v = gini(values)
# print (v)
# parameters.append((v, 'gini_edits', year_month))
# parameters.append((year_month, 'monthly_edits', 'monthly_edits', 'gini', 'monthly_edits', None, None, None, v, None))
cursor.executemany(query_cm,parameters)
conn.commit()
"""
print ('editor_actions')
# participation()
# flags()
# active_editors()
# retention()
drop_off()
# actions()
duration = str(datetime.timedelta(seconds=time.time() - functionstartTime))
print(languagecode+' '+ function_name+' '+ duration)
"""
def editor_metrics_social(languagecode):
pass
Iteració sencera a MediaWiki history
Mètriques mensuals.
Iterar pel mes que anem.
Consulta a cada mes als registrats d'aquell mes o dos abans.
Comprovar quants d'aquests s'hi interactua I fer els comptadors
Cal guardar les últimes edicions de tots els usuaris per comprovar si hi ha interacció.
Fetes
Interactions newcomers_user_page_talk_page_edits
Interactions newcomers_article_talk_page_edits
Interactions newcomer_count
Interactions survivors_count (aquesta sempre hi haurà un decalatge de dos mesos) -> quants dels newcomers amb qui has interactuat sobreviuen.
Interaccions rebudes
User talk pages
Article talk pages
Hipòtesi. Quan els editors estan a punt de fer drop off... Deixen abans d'interactuar amb newcomers.
Hipòtesi. Quan els editors deixen d'interactuar amb ells... Estan més a prop del drop off.
def editor_metrics_multilingual(languagecode):
print('')
# * wiki_editors
# (user_id integer, user_name text, bot text, user_flags text, primarybinary, primarylang text, primarybinary_ecount, totallangs_ecount, numberlangs integer)
# FUNCTION
# multilingualism: això cal una funció que passi per les diferents bases de dades i creï aquesta
def editor_metrics_content_diversity(languagecode):
print('')
# https://stackoverflow.com/questions/28816330/sqlite-insert-if-not-exist-else-increase-integer-value
# PER NO GUARDAR-HO TOT EN MEMÒRIA. FER L'INSERT DELS CCC EDITATS A CADA ARXIU.
# * wiki_editor_content_metrics
# (user_id integer, user_name text, content_type text, value real)
# FUNCTION
# això cal una funció que corri el mediawiki history amb aquest objectiu havent preseleccionat editors també.
functionstartTime = time.time()
function_name = 'editor_metrics_content_diversity '+languagecode
print (function_name)
print (languagecode)
d_paths = get_mediawiki_paths(languagecode)
if (len(d_paths)==0):
print ('dump error. this language has no mediawiki_history dump: '+languagecode)
# wikilanguages_utils.send_email_toolaccount('dump error at script '+script_name, dumps_path)
# quit()
for dump_path in d_paths:
print(dump_path)
iterTime = time.time()
dump_in = bz2.open(dump_path, 'r')
line = dump_in.readline()
line = line.rstrip().decode('utf-8')[:-1]
values = line.split(' ')
parameters = []
editors_params = []
iter = 0
while line != '':
# iter += 1
# if iter % 1000000 == 0: print (str(iter/1000000)+' million lines.')
line = dump_in.readline()
line = line.rstrip().decode('utf-8')[:-1]
values = line.split('\t')
if len(values)==1: continue
page_id = values[23]
page_title = values[25]
page_namespace = int(values[28])
edit_count = values[34]
Pel tema Edits A Ccc
Diccionari de diccionaris amb el què va editant cada editor cada mes. Més ràpid pel hash.
dict_editors {}
dict_CCC_per_editor {}
Els Edits mensuals a cada CCC? els anem col·locant a una bbdd, que pot ser la mateixa o una altra.
Després sumar l'acumulat final i ja està.
S'esborren els mensuals... Ja que és massa contingut.
"""
#######################################################################################
class Logger_out(object): # this prints both the output to a file and to the terminal screen.
def __init__(self):
self.terminal = sys.stdout
self.log = open("community_health_metrics2.out", "w")
def write(self, message):
self.terminal.write(message)
self.log.write(message)
def flush(self):
pass
class Logger_err(object): # this prints both the output to a file and to the terminal screen.
def __init__(self):
self.terminal = sys.stdout
self.log = open("community_health_metrics.err", "w")
def write(self, message):
self.terminal.write(message)
self.log.write(message)
def flush(self):
pass
### MAIN:
if __name__ == '__main__':
sys.stdout = Logger_out()
sys.stderr = Logger_err()
startTime = time.time()
cycle_year_month = (datetime.date.today() - relativedelta.relativedelta(months=1)).strftime('%Y-%m')
territories = wikilanguages_utils.load_wikipedia_languages_territories_mapping()
languages = wikilanguages_utils.load_wiki_projects_information();
wikilanguagecodes = sorted(languages.index.tolist())
print ('checking languages Replicas databases and deleting those without one...')
# Verify/Remove all languages without a replica database
for a in wikilanguagecodes:
if wikilanguages_utils.establish_mysql_connection_read(a)==None:
wikilanguagecodes.remove(a)
print (wikilanguagecodes)
# wikilanguagecodes = ['eu','it']
wikilanguagecodes = ['gl','eu','oc']
# wikilanguagecodes = ['ca']
wikilanguagecodes = ['es','fr','it']
wikilanguagecodes = ['ca','eu','es','fr','it']
wikilanguagecodes = ['oc','gl','is','ca','eu']
print ('* Starting the COMMUNITY HEALTH METRICS '+cycle_year_month+' at this exact time: ' + str(datetime.datetime.now().strftime("%m/%d/%Y, %H:%M:%S")))
main()
finishTime = time.time()
print ('* Done with the COMMUNITY HEALTH METRICS completed successfuly after: ' + str(datetime.timedelta(seconds=finishTime - startTime)))
wikilanguages_utils.finish_email(startTime,'community_health_metrics.out', 'COMMUNITY HEALTH METRICS')
| 48.436254
| 1,569
| 0.642068
| 17,801
| 136,009
| 4.565755
| 0.04966
| 0.041193
| 0.019489
| 0.029972
| 0.813793
| 0.7804
| 0.75621
| 0.704965
| 0.632175
| 0.600332
| 0
| 0.054937
| 0.245844
| 136,009
| 2,807
| 1,570
| 48.453509
| 0.737248
| 0.114713
| 0
| 0.532787
| 0
| 0.029634
| 0.246039
| 0.050004
| 0
| 0
| 0
| 0
| 0
| 1
| 0.01198
| false
| 0.022068
| 0.018285
| 0
| 0.032156
| 0.027743
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 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
| 6
|
1dfdf1dc9d560dd375ad6fcdf3b6923ca0b72a86
| 36
|
py
|
Python
|
core/parsers/__init__.py
|
andrewisakov/taximaster
|
b92f06894bbc3414086ec77f1c918a3c0f085241
|
[
"MIT"
] | null | null | null |
core/parsers/__init__.py
|
andrewisakov/taximaster
|
b92f06894bbc3414086ec77f1c918a3c0f085241
|
[
"MIT"
] | null | null | null |
core/parsers/__init__.py
|
andrewisakov/taximaster
|
b92f06894bbc3414086ec77f1c918a3c0f085241
|
[
"MIT"
] | null | null | null |
from .parsers import request_parser
| 18
| 35
| 0.861111
| 5
| 36
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 36
| 1
| 36
| 36
| 0.9375
| 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
| 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
| 6
|
380c11403c1a76b0d531997f5e39af651f1a3bb9
| 31
|
py
|
Python
|
djshed/__init__.py
|
carthage-college/django-djshed
|
122dc2f9dd582fd943915b6268d4e90dc84993ca
|
[
"BSD-3-Clause"
] | null | null | null |
djshed/__init__.py
|
carthage-college/django-djshed
|
122dc2f9dd582fd943915b6268d4e90dc84993ca
|
[
"BSD-3-Clause"
] | 9
|
2020-03-04T16:04:21.000Z
|
2022-02-14T17:34:07.000Z
|
djshed/__init__.py
|
carthage-college/django-djshed
|
122dc2f9dd582fd943915b6268d4e90dc84993ca
|
[
"BSD-3-Clause"
] | null | null | null |
from djshed.constants import *
| 15.5
| 30
| 0.806452
| 4
| 31
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 31
| 1
| 31
| 31
| 0.925926
| 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
| 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
| 6
|
382cc8f8f5ea8df980757417230fc969f24fd71f
| 110
|
py
|
Python
|
pyfantasy/__init__.py
|
markwhat1/pyfantasy
|
318a7afc97c7bf6ba978ff8bb8c4c58f8ea0d420
|
[
"MIT"
] | null | null | null |
pyfantasy/__init__.py
|
markwhat1/pyfantasy
|
318a7afc97c7bf6ba978ff8bb8c4c58f8ea0d420
|
[
"MIT"
] | null | null | null |
pyfantasy/__init__.py
|
markwhat1/pyfantasy
|
318a7afc97c7bf6ba978ff8bb8c4c58f8ea0d420
|
[
"MIT"
] | null | null | null |
from .pyfantasy import Connection
from .pyfantasy import League, Team, Player
from .yahoo_oauth import OAuth2
| 27.5
| 43
| 0.827273
| 15
| 110
| 6
| 0.666667
| 0.288889
| 0.422222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010417
| 0.127273
| 110
| 3
| 44
| 36.666667
| 0.927083
| 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
| 0
| 0
|
0
| 6
|
69b4c48501471d49ec2d4fd4b79c4ecc8adb3282
| 204
|
py
|
Python
|
util/data/gen/BloonsTD6.exe.py
|
56kyle/bloons_auto
|
419d55b51d1cddc49099593970adf1c67985b389
|
[
"MIT"
] | null | null | null |
util/data/gen/BloonsTD6.exe.py
|
56kyle/bloons_auto
|
419d55b51d1cddc49099593970adf1c67985b389
|
[
"MIT"
] | null | null | null |
util/data/gen/BloonsTD6.exe.py
|
56kyle/bloons_auto
|
419d55b51d1cddc49099593970adf1c67985b389
|
[
"MIT"
] | null | null | null |
symbols = []
exports = [{'type': 'function', 'name': 'AmdPowerXpressRequestHighPerformance', 'address': '0x7ff66dd14004'}, {'type': 'function', 'name': 'NvOptimusEnablement', 'address': '0x7ff66dd14000'}]
| 102
| 191
| 0.70098
| 14
| 204
| 10.214286
| 0.714286
| 0.167832
| 0.223776
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095745
| 0.078431
| 204
| 2
| 191
| 102
| 0.664894
| 0
| 0
| 0
| 0
| 0
| 0.629268
| 0.17561
| 0
| 0
| 0.136585
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
0e148b2e22f2b41098a22593e27a07d48422bed6
| 163
|
py
|
Python
|
website_multi_company/__init__.py
|
RL-OtherApps/website-addons
|
b0903daefa492c298084542de2c99f1ab13cd4b4
|
[
"MIT"
] | 1
|
2020-03-01T03:04:21.000Z
|
2020-03-01T03:04:21.000Z
|
website_multi_company/__init__.py
|
RL-OtherApps/website-addons
|
b0903daefa492c298084542de2c99f1ab13cd4b4
|
[
"MIT"
] | null | null | null |
website_multi_company/__init__.py
|
RL-OtherApps/website-addons
|
b0903daefa492c298084542de2c99f1ab13cd4b4
|
[
"MIT"
] | null | null | null |
from . import models
def post_load():
# use post_load to avoid overriding _get_search_domain when this module is not installed
from . import controllers
| 23.285714
| 92
| 0.760736
| 24
| 163
| 4.958333
| 0.833333
| 0.168067
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202454
| 163
| 6
| 93
| 27.166667
| 0.915385
| 0.527607
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.666667
| 0
| 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
| 0
| 1
| 0
|
0
| 6
|
38985d959385d3a2057ea5f7a76d2853b1c2d13c
| 23,684
|
py
|
Python
|
Model&Data/tf-VAEGAN/main.py
|
LiangjunFeng/Generative-Any-Shot-Learning
|
693c4ab92f2eb04cc453c870782710a982f98e80
|
[
"Apache-2.0"
] | null | null | null |
Model&Data/tf-VAEGAN/main.py
|
LiangjunFeng/Generative-Any-Shot-Learning
|
693c4ab92f2eb04cc453c870782710a982f98e80
|
[
"Apache-2.0"
] | null | null | null |
Model&Data/tf-VAEGAN/main.py
|
LiangjunFeng/Generative-Any-Shot-Learning
|
693c4ab92f2eb04cc453c870782710a982f98e80
|
[
"Apache-2.0"
] | null | null | null |
import argparse
from train_images import run
# generalized ZSL
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 0 --generalized True > awa1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train False --num_shots 0 --generalized True > sun.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset CUB --few_train False --num_shots 0 --generalized True > cub.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True > flo.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 0 --generalized True > awa2.log 2>&1 &
# naive feature
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 0 --generalized True --image_embedding res101_naive > awa2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train False --num_shots 0 --generalized True --image_embedding res101_naive > sun.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset CUB --few_train False --num_shots 0 --generalized True --image_embedding res101_naive > cub.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True --image_embedding res101_naive > flo.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset aPY --few_train False --num_shots 0 --generalized True --image_embedding res101_naive > apy.log 2>&1 &
# finetue feature
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 0 --generalized True --image_embedding res101_finetune > awa2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train False --num_shots 0 --generalized True --image_embedding res101_finetune > sun.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset CUB --few_train False --num_shots 0 --generalized True --image_embedding res101_finetune > cub.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True --image_embedding res101_finetune > flo.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset aPY --few_train False --num_shots 0 --generalized True --image_embedding res101_finetune > apy.log 2>&1 &
# reg feature
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True --image_embedding res101_reg > flo.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset CUB --few_train False --num_shots 0 --generalized True --image_embedding res101_reg > cub.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset SUN --few_train False --num_shots 0 --generalized True --image_embedding res101_reg > sun.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 0 --generalized True --image_embedding res101_reg > awa2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset aPY --few_train False --num_shots 0 --generalized True --image_embedding res101_reg > apy.log 2>&1 &
# few shot
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train False --num_shots 1 --generalized True --image_embedding res101_reg > flo0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train False --num_shots 5 --generalized True --image_embedding res101_reg > flo1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset FLO --few_train False --num_shots 10 --generalized True --image_embedding res101_reg > flo2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset FLO --few_train False --num_shots 20 --generalized True --image_embedding res101_reg > flo3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train True --num_shots 1 --generalized True --image_embedding res101_naive > flo0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train True --num_shots 5 --generalized True --image_embedding res101_naive > flo1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset FLO --few_train True --num_shots 10 --generalized True --image_embedding res101_naive > flo2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset FLO --few_train True --num_shots 20 --generalized True --image_embedding res101_naive > flo3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset CUB --few_train False --num_shots 1 --generalized True --image_embedding res101_reg > cub0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset CUB --few_train False --num_shots 5 --generalized True --image_embedding res101_reg > cub1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset CUB --few_train False --num_shots 10 --generalized True --image_embedding res101_reg > cub2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset CUB --few_train False --num_shots 20 --generalized True --image_embedding res101_reg > cub3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset CUB --few_train True --num_shots 1 --generalized True --image_embedding res101_naive > cub0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset CUB --few_train True --num_shots 5 --generalized True --image_embedding res101_naive > cub1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset CUB --few_train True --num_shots 10 --generalized True --image_embedding res101_naive > cub2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset CUB --few_train True --num_shots 20 --generalized True --image_embedding res101_naive > cub3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset SUN --few_train False --num_shots 1 --generalized True --image_embedding res101_reg > sun0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train False --num_shots 5 --generalized True --image_embedding res101_reg > sun1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset SUN --few_train False --num_shots 10 --generalized True --image_embedding res101_reg > sun2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset SUN --few_train True --num_shots 1 --generalized True --image_embedding res101 > sun0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train True --num_shots 5 --generalized True --image_embedding res101 > sun1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset SUN --few_train True --num_shots 10 --generalized True --image_embedding res101 > sun2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 1 --generalized True --image_embedding res101_naive > awa20.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 5 --generalized True --image_embedding res101_naive > awa21.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 10 --generalized True --image_embedding res101_naive > awa22.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 20 --generalized True --image_embedding res101_naive > awa23.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 1 --generalized True --image_embedding res101_naive > awa20.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 5 --generalized True --image_embedding res101_naive > awa21.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 10 --generalized True --image_embedding res101_naive > awa22.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 20 --generalized True --image_embedding res101_naive > awa23.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 1 --generalized True --image_embedding res101 > awa10.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 5 --generalized True --image_embedding res101 > awa11.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 10 --generalized True --image_embedding res101 > awa12.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 20 --generalized True --image_embedding res101 > awa13.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 1 --generalized True --image_embedding res101 > awa10.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 5 --generalized True --image_embedding res101 > awa11.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 10 --generalized True --image_embedding res101 > awa12.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 20 --generalized True --image_embedding res101 > awa13.log 2>&1 &
# few shot
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train False --num_shots 1 --generalized True --image_embedding res101_reg > flo0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train False --num_shots 5 --generalized True --image_embedding res101_reg > flo1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset FLO --few_train False --num_shots 10 --generalized True --image_embedding res101_reg > flo2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset FLO --few_train False --num_shots 20 --generalized True --image_embedding res101_reg > flo3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train True --num_shots 1 --generalized True --image_embedding res101_naive > flo0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train True --num_shots 5 --generalized True --image_embedding res101_naive > flo1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset FLO --few_train True --num_shots 10 --generalized True --image_embedding res101_naive > flo2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset FLO --few_train True --num_shots 20 --generalized True --image_embedding res101_naive > flo3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset CUB --few_train False --num_shots 1 --generalized True --image_embedding res101_reg > cub0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset CUB --few_train False --num_shots 5 --generalized True --image_embedding res101_reg > cub1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset CUB --few_train False --num_shots 10 --generalized True --image_embedding res101_reg > cub2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset CUB --few_train False --num_shots 20 --generalized True --image_embedding res101_reg > cub3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset CUB --few_train True --num_shots 1 --generalized True --image_embedding res101_naive > cub0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset CUB --few_train True --num_shots 5 --generalized True --image_embedding res101_naive > cub1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset CUB --few_train True --num_shots 10 --generalized True --image_embedding res101_naive > cub2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset CUB --few_train True --num_shots 20 --generalized True --image_embedding res101_naive > cub3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset SUN --few_train False --num_shots 1 --generalized True --image_embedding res101_reg > sun0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train False --num_shots 5 --generalized True --image_embedding res101_reg > sun1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset SUN --few_train False --num_shots 10 --generalized True --image_embedding res101_reg > sun2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset SUN --few_train True --num_shots 1 --generalized True --image_embedding res101 > sun0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset SUN --few_train True --num_shots 5 --generalized True --image_embedding res101 > sun1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset SUN --few_train True --num_shots 10 --generalized True --image_embedding res101 > sun2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 1 --generalized True --image_embedding res101_naive > awa20.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 5 --generalized True --image_embedding res101_naive > awa21.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 10 --generalized True --image_embedding res101_naive > awa22.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA2 --few_train False --num_shots 20 --generalized True --image_embedding res101_naive > awa23.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 1 --generalized True --image_embedding res101_naive > awa20.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 5 --generalized True --image_embedding res101_naive > awa21.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 10 --generalized True --image_embedding res101_naive > awa22.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA2 --few_train True --num_shots 20 --generalized True --image_embedding res101_naive > awa23.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 1 --generalized True --image_embedding res101 > awa10.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 5 --generalized True --image_embedding res101 > awa11.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 10 --generalized True --image_embedding res101 > awa12.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA1 --few_train False --num_shots 20 --generalized True --image_embedding res101 > awa13.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 1 --generalized True --image_embedding res101 > awa10.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 5 --generalized True --image_embedding res101 > awa11.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 10 --generalized True --image_embedding res101 > awa12.log 2>&1 &
# CUDA_VISIBLE_DEVICES=3 nohup python -u main.py --dataset AWA1 --few_train True --num_shots 20 --generalized True --image_embedding res101 > awa13.log 2>&1 &
# reg feature + att
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True --image_embedding res101_reg --class_embedding att > flo0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True --image_embedding res101_reg --class_embedding att_naive > flo1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True --image_embedding res101_reg --class_embedding att_GRU > flo2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train False --num_shots 0 --generalized True --image_embedding res101_reg --class_embedding att_GRU_biased > flo3.log 2>&1 &
# few shot + class
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train False --num_shots 1 --generalized True --image_embedding res101_reg --class_embedding att_GRU_biased > flo0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train False --num_shots 5 --generalized True --image_embedding res101_reg --class_embedding att_GRU_biased > flo1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=2 nohup python -u main.py --dataset FLO --few_train False --num_shots 10 --generalized True --image_embedding res101_reg --class_embedding att_GRU_biased > flo2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train False --num_shots 20 --generalized True --image_embedding res101_reg --class_embedding att_GRU_biased > flo3.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train True --num_shots 1 --generalized True --image_embedding res101_naive --class_embedding att_GRU_biased > flo0.log 2>&1 &
# CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --dataset FLO --few_train True --num_shots 5 --generalized True --image_embedding res101_naive --class_embedding att_GRU_biased > flo1.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train True --num_shots 10 --generalized True --image_embedding res101_naive --class_embedding att_GRU_biased > flo2.log 2>&1 &
# CUDA_VISIBLE_DEVICES=1 nohup python -u main.py --dataset FLO --few_train True --num_shots 20 --generalized True --image_embedding res101_naive --class_embedding att_GRU_biased > flo3.log 2>&1 &
def str2bool(v):
if v.lower() in ('yes', 'true', 't', 'y', '1'):
return True
elif v.lower() in ('no', 'false', 'f', 'n', '0'):
return False
else:
raise argparse.ArgumentTypeError('Boolean value expected.')
parser = argparse.ArgumentParser()
parser.add_argument('--dataset', default='FLO', help='FLO')
parser.add_argument('--few_train', default = False, type = str2bool, help='use few train samples')
parser.add_argument('--num_shots', type=int, default=5, help='the number of shots, if few_train, then num_shots is for train classes, else for test classes')
parser.add_argument('--generalized', default=False, type = str2bool, help='enable generalized zero-shot learning')
parser.add_argument('--image_embedding', default='res101', help='res101')
parser.add_argument('--class_embedding', default='att', help='att')
args = parser.parse_args()
class myArgs():
def __init__(self, args):
self.dataset = args.dataset
self.few_train = args.few_train
self.num_shots = args.num_shots
self.generalized = args.generalized
self.image_embedding = args.image_embedding
self.class_embedding = args.class_embedding
self.dataroot = "../data"
self.syn_num = 100; self.preprocessing = False; self.standardization = False; self.workers = 8
self.batch_size = 64; self.resSize = 2048; self.attSize = 1024; self.nz = 312; self.ngh = 4096
self.ndh = 1024; self.nepoch = 2000; self.critic_iter = 5; self.lambda1 = 10; self.lambda2 = 10
self.lr = 0.001; self.feed_lr = 0.0001; self.dec_lr = 0.0001; self.classifier_lr = 0.001
self.beta1 = 0.5; self.cuda = True; self.encoded_noise = False; self.manualSeed = 0
self.nclass_all = 200; self.validation = False; self.encoder_layer_sizes = [8192, 4096]
self.decoder_layer_sizes = [4096, 8192]; self.gammaD = 1000; self.gammaG = 1000
self.gammaG_D2 = 1000; self.gammaD2 = 1000; self.latent_size = 312; self.conditional = True
self.a1 = 1.0; self.a2 = 1.0; self.recons_weight = 1.0; self.feedback_loop = 2
self.freeze_dec = False
if self.dataset in ["AWA1", "AWA2"]:
self.gammaD = 10; self.gammaG = 10; self.encoded_noise = True
self.manualSeed = 9182; self.preprocessing = True; self.cuda = True
self.nepoch = 120; self.syn_num = 1800; self.ngh = 4096; self.ndh = 4096
self.lambda1 = 10; self.critic_iter = 5; self.nclass_all = 50; self.batch_size = 64; self.nz = 85
self.latent_size = 85; self.attSize=85; self.resSize = 2048; self.lr = 0.00001; self.classifier_lr = 0.001;
self.recons_weight = 0.1; self.freeze_dec = True; self.feed_lr = 0.0001; self.dec_lr = 0.0001; self.feedback_loop = 2;
self.a1 = 0.01; self.a2 = 0.01
elif self.dataset == "CUB":
self.gammaD = 10; self.gammaG = 10; self.manualSeed = 3483; self.encoded_noise = True; self.preprocessing = True
self.cuda = True; self.nepoch = 300; self.ngh = 4096
self.ndh = 4096; self.lr = 0.0001; self.classifier_lr = 0.001; self.lambda1 = 10; self.critic_iter = 5
self.nclass_all = 200; self.batch_size = 64; self.nz = 312; self.latent_size = 312; self.attSize = 312
self.resSize = 2048; self.syn_num = 300; self.recons_weight = 0.01; self.a1 = 1; self.a2 = 1
self.feed_lr = 0.00001; self.dec_lr = 0.0001; self.feedback_loop = 2
elif self.dataset == "FLO":
self.gammaD = 10; self.gammaG = 10; self.nclass_all = 102; self.latent_size = 1024; self.manualSeed = 806
self.syn_num = 1200; self.preprocessing = True; self.nepoch = 500
self.ngh = 4096; self.ndh = 4096; self.lambda1 = 10; self.critic_iter = 5; self.batch_size = 64
self.nz = 1024; self.attSize = 1024; self.resSize = 2048; self.lr = 0.0001; self.classifier_lr = 0.001
self.cuda = True; self.recons_weight = 0.01; self.feedback_loop = 2
self.feed_lr = 0.00001; self.a1 = 0.5; self.a2 = 0.5; self.dec_lr = 0.0001
elif self.dataset == "SUN":
self.gammaD = 1; self.gammaG = 1; self.manualSeed = 4115; self.encoded_noise = True; self.preprocessing = True
self.cuda = True; self.nepoch = 400
self.ngh = 4096; self.ndh = 4096; self.lambda1 = 10; self.critic_iter = 5; self.batch_size = 64
self.nz = 102; self.latent_size = 102; self.attSize = 102; self.lr = 0.001; self.classifier_lr = 0.0005
self.syn_num = 400; self.nclass_all = 717; self.recons_weight = 0.01; self.a1 = 0.1; self.a2 = 0.01
self.feedback_loop = 2; self.feed_lr = 0.0001
if self.image_embedding == "res101_reg":
self.self.lr = 0.0001; self.classifier_lr = 0.0001; self.recons_weight = 0.0001
elif self.dataset == "aPY":
self.gammaD = 10; self.gammaG = 10; self.nclass_all = 32; self.latent_size = 1024; self.manualSeed = 806
self.syn_num = 1200; self.preprocessing = True; self.nepoch = 500
self.ngh = 4096; self.ndh = 4096; self.lambda1 = 10; self.critic_iter = 5; self.batch_size = 64
self.nz = 64; self.attSize = 64; self.resSize = 2048; self.lr = 0.0001; self.classifier_lr = 0.001
self.cuda = True; self.recons_weight = 0.01; self.feedback_loop = 2
self.feed_lr = 0.00001; self.a1 = 0.5; self.a2 = 0.5; self.dec_lr = 0.0001
opt = myArgs(args)
opt.lambda2 = opt.lambda1
opt.encoder_layer_sizes[0] = opt.resSize
opt.decoder_layer_sizes[-1] = opt.resSize
opt.latent_size = opt.attSize
print("lr: ", opt.lr, "classifier_lr: ", opt.classifier_lr, "recons_weight: ", opt.recons_weight, "a1: ", opt.a1, opt.a2, "a2: ", "feed_lr: ", opt.feed_lr)
run(opt)
| 92.515625
| 195
| 0.728973
| 3,817
| 23,684
| 4.324338
| 0.050563
| 0.054768
| 0.117775
| 0.104689
| 0.883739
| 0.863928
| 0.857628
| 0.849085
| 0.843814
| 0.834909
| 0
| 0.071819
| 0.14989
| 23,684
| 255
| 196
| 92.878431
| 0.747988
| 0.742315
| 0
| 0.111111
| 0
| 0
| 0.064397
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.024691
| false
| 0
| 0.024691
| 0
| 0.08642
| 0.012346
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
2a6ac7f9df2f1802e7060c999c2722525fb5cfb6
| 647
|
py
|
Python
|
tests/expectations/cat-hs-x-cat-date-smoothed-col-pct-w3.py
|
Crunch-io/crunch-cube
|
80986d5b2106c774f05176fb6c6a5ea0d840f09d
|
[
"MIT"
] | 3
|
2021-01-22T20:42:31.000Z
|
2021-06-02T17:53:19.000Z
|
tests/expectations/cat-hs-x-cat-date-smoothed-col-pct-w3.py
|
Crunch-io/crunch-cube
|
80986d5b2106c774f05176fb6c6a5ea0d840f09d
|
[
"MIT"
] | 331
|
2017-11-13T22:41:56.000Z
|
2021-12-02T21:59:43.000Z
|
tests/expectations/cat-hs-x-cat-date-smoothed-col-pct-w3.py
|
Crunch-io/crunch-cube
|
80986d5b2106c774f05176fb6c6a5ea0d840f09d
|
[
"MIT"
] | 1
|
2021-02-19T02:49:00.000Z
|
2021-02-19T02:49:00.000Z
|
[
[float("NaN"), float("NaN"), 73.55631426, 76.45173763],
[float("NaN"), float("NaN"), 71.11031587, 73.6557548],
[float("NaN"), float("NaN"), 11.32891221, 9.80444014],
[float("NaN"), float("NaN"), 10.27812002, 8.15602626],
[float("NaN"), float("NaN"), 21.60703222, 17.9604664],
[float("NaN"), float("NaN"), 2.44599839, 2.79598283],
[float("NaN"), float("NaN"), 0.61043458, 0.41397093],
[float("NaN"), float("NaN"), 2.65390256, 2.9383991],
[float("NaN"), float("NaN"), 1.36865038, 1.84961059],
[float("NaN"), float("NaN"), 0.20366599, 0.38581535],
[float("NaN"), float("NaN"), 1.57231637, 2.23542594],
]
| 46.214286
| 59
| 0.585781
| 88
| 647
| 4.306818
| 0.409091
| 0.46438
| 0.377309
| 0.46438
| 0.269129
| 0
| 0
| 0
| 0
| 0
| 0
| 0.364452
| 0.139104
| 647
| 13
| 60
| 49.769231
| 0.315978
| 0
| 0
| 0
| 0
| 0
| 0.102009
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 6
|
aa5fa5ff3ffffa84887da1cb448b70b03ad5cd67
| 45
|
py
|
Python
|
ahmed-package/__init__.py
|
gokcelahmed/ahmed-package
|
a6c34fb2d85105ad33063b840c84f70ff7a0aa4d
|
[
"MIT"
] | null | null | null |
ahmed-package/__init__.py
|
gokcelahmed/ahmed-package
|
a6c34fb2d85105ad33063b840c84f70ff7a0aa4d
|
[
"MIT"
] | null | null | null |
ahmed-package/__init__.py
|
gokcelahmed/ahmed-package
|
a6c34fb2d85105ad33063b840c84f70ff7a0aa4d
|
[
"MIT"
] | null | null | null |
from ahmed-package.functions import printName
| 45
| 45
| 0.888889
| 6
| 45
| 6.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 45
| 1
| 45
| 45
| 0.952381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 1
| null | null | 1
| 1
| 1
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 6
|
aab47503ee8d0e3164856b1141204d18fa2f42fa
| 41
|
py
|
Python
|
fixture/__init__.py
|
hippa777/python_training
|
568c12e1a21c3c7eb40a1af25a9db83690a1b26d
|
[
"Apache-2.0"
] | null | null | null |
fixture/__init__.py
|
hippa777/python_training
|
568c12e1a21c3c7eb40a1af25a9db83690a1b26d
|
[
"Apache-2.0"
] | null | null | null |
fixture/__init__.py
|
hippa777/python_training
|
568c12e1a21c3c7eb40a1af25a9db83690a1b26d
|
[
"Apache-2.0"
] | null | null | null |
from .contact_helper import ContactHelper
| 41
| 41
| 0.902439
| 5
| 41
| 7.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073171
| 41
| 1
| 41
| 41
| 0.947368
| 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
| 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
| 6
|
2acb3aee2e0f5e506188c20bf399d1690f3f87a1
| 35
|
py
|
Python
|
webapp/journal_plugins/example_plugin/models.py
|
TheCDC/journal_app
|
18c84acfc7b996329d34c3bdd54348cdfdd55252
|
[
"MIT"
] | 2
|
2018-03-08T16:21:45.000Z
|
2018-10-22T02:13:22.000Z
|
webapp/journal_plugins/example_plugin/models.py
|
TheCDC/journal_app
|
18c84acfc7b996329d34c3bdd54348cdfdd55252
|
[
"MIT"
] | 3
|
2018-05-25T04:21:09.000Z
|
2020-02-10T00:46:37.000Z
|
webapp/journal_plugins/example_plugin/models.py
|
TheCDC/journal_app
|
18c84acfc7b996329d34c3bdd54348cdfdd55252
|
[
"MIT"
] | null | null | null |
from webapp.extensions import db
| 8.75
| 32
| 0.8
| 5
| 35
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171429
| 35
| 3
| 33
| 11.666667
| 0.965517
| 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
| 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
| 6
|
2d83d5ac7ec09bb8e96ad46997e6e2b1b848abb9
| 231
|
py
|
Python
|
hcap_utils/contrib/material/views/__init__.py
|
fabiommendes/capacidade_hospitalar
|
4f675b574573eb3f51e6be8a927ea230bf2712c7
|
[
"MIT"
] | null | null | null |
hcap_utils/contrib/material/views/__init__.py
|
fabiommendes/capacidade_hospitalar
|
4f675b574573eb3f51e6be8a927ea230bf2712c7
|
[
"MIT"
] | 31
|
2020-04-11T13:38:17.000Z
|
2021-09-22T18:51:11.000Z
|
hcap_utils/contrib/material/views/__init__.py
|
fabiommendes/capacidade_hospitalar
|
4f675b574573eb3f51e6be8a927ea230bf2712c7
|
[
"MIT"
] | 1
|
2020-04-08T17:04:39.000Z
|
2020-04-08T17:04:39.000Z
|
from .create_model_view import CreateModelView
from .delete_model_view import DeleteModelView
from .detail_model_view import DetailModelView
from .list_model_view import ListModelView
from .update_model_view import UpdateModelView
| 38.5
| 46
| 0.891775
| 30
| 231
| 6.533333
| 0.466667
| 0.229592
| 0.382653
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08658
| 231
| 5
| 47
| 46.2
| 0.92891
| 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
| 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
| 6
|
2db96537947c81899effbd609c7adfa473931eeb
| 33
|
py
|
Python
|
datasets/__init__.py
|
Masterchef365/pvcnn
|
db13331a46f672e74e7b5bde60e7bf30d445cd2d
|
[
"MIT"
] | 477
|
2019-12-10T01:03:43.000Z
|
2022-03-28T14:10:08.000Z
|
datasets/__init__.py
|
chaomath/pvcnn
|
8f07316611067e9a0e2df8b35e4a729a03e0806b
|
[
"MIT"
] | 57
|
2019-12-10T10:14:26.000Z
|
2022-03-26T04:59:43.000Z
|
datasets/__init__.py
|
chaomath/pvcnn
|
8f07316611067e9a0e2df8b35e4a729a03e0806b
|
[
"MIT"
] | 126
|
2019-12-10T07:59:50.000Z
|
2022-03-12T07:21:19.000Z
|
from datasets.s3dis import S3DIS
| 16.5
| 32
| 0.848485
| 5
| 33
| 5.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0.121212
| 33
| 1
| 33
| 33
| 0.896552
| 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
| 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
| 6
|
2dc6b64392d41e06755147486243708c0cbcc454
| 2,362
|
py
|
Python
|
venv/src/pages/forms.py
|
ddelgadoJS/ProyectoWeb
|
f899c910bf16a79d5c3498bc6e8aa6b741fb56e1
|
[
"MIT"
] | 1
|
2019-10-28T03:44:38.000Z
|
2019-10-28T03:44:38.000Z
|
venv/src/pages/forms.py
|
ddelgadoJS/ProyectoWeb
|
f899c910bf16a79d5c3498bc6e8aa6b741fb56e1
|
[
"MIT"
] | null | null | null |
venv/src/pages/forms.py
|
ddelgadoJS/ProyectoWeb
|
f899c910bf16a79d5c3498bc6e8aa6b741fb56e1
|
[
"MIT"
] | null | null | null |
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import *
class EmpresaCreateForm(forms.ModelForm):
class Meta:
model = Empresa
fields = [
'nombre',
'description',
'direccion',
'horario',
'telefono',
'correo',
'serv_origen',
'serv_destino',
'latitud',
'longitud'
]
class EmpresaUpdateForm(forms.ModelForm):
class Meta:
model = Empresa
fields = [
'nombre',
'description',
'direccion',
'horario',
'telefono',
'correo',
'serv_origen',
'serv_destino',
'latitud',
'longitud'
]
class UsuarioUpdateForm(forms.ModelForm):
class Meta:
model = User
fields = [
'username',
'email',
'first_name',
'last_name'
]
class RutaCreateForm(forms.ModelForm):
class Meta:
model = Ruta
fields = [
'empresa',
'nombre',
'description',
'costo',
'horario',
'duracion_viaje',
'inclusivo',
'origen_latitud',
'origen_longitud',
'destino_latitud',
'destino_longitud'
]
class RutaUpdateForm(forms.ModelForm):
class Meta:
model = Ruta
fields = [
'empresa',
'nombre',
'description',
'costo',
'horario',
'duracion_viaje',
'inclusivo',
'origen_latitud',
'origen_longitud',
'destino_latitud',
'destino_longitud'
]
class ParadaCreateForm(forms.ModelForm):
class Meta:
model = Parada
fields = [
'ruta',
'nombre',
'description',
'horario',
'latitud',
'longitud'
]
class ParadaUpdateForm(forms.ModelForm):
class Meta:
model = Parada
fields = [
'ruta',
'nombre',
'description',
'horario',
'latitud',
'longitud'
]
| 22.495238
| 54
| 0.453006
| 158
| 2,362
| 6.670886
| 0.278481
| 0.092979
| 0.126186
| 0.152751
| 0.726755
| 0.70019
| 0.70019
| 0.70019
| 0.70019
| 0.70019
| 0
| 0
| 0.446232
| 2,362
| 105
| 55
| 22.495238
| 0.80581
| 0
| 0
| 0.762887
| 0
| 0
| 0.222598
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.041237
| 0
| 0.185567
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 6
|
2dcaf1c764e04a5631433a84042c46eeee80f0f9
| 28
|
py
|
Python
|
losses/__init__.py
|
xieqk/SEF
|
2163a159933d8d9ecad5ff9341cfa626f662a778
|
[
"MIT"
] | null | null | null |
losses/__init__.py
|
xieqk/SEF
|
2163a159933d8d9ecad5ff9341cfa626f662a778
|
[
"MIT"
] | null | null | null |
losses/__init__.py
|
xieqk/SEF
|
2163a159933d8d9ecad5ff9341cfa626f662a778
|
[
"MIT"
] | null | null | null |
from .ranking import Triplet
| 28
| 28
| 0.857143
| 4
| 28
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 28
| 1
| 28
| 28
| 0.96
| 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
| 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
| 6
|
930100236a4359a4387dd68192ff211e5a4519df
| 149
|
py
|
Python
|
roona/roona/doctype/roona_app_setting/test_roona_app_setting.py
|
mohsinalimat/roona
|
b24336d9d56eb443a883131afffd9091c9a66add
|
[
"MIT"
] | 1
|
2021-08-28T04:24:00.000Z
|
2021-08-28T04:24:00.000Z
|
roona/roona/doctype/roona_app_setting/test_roona_app_setting.py
|
mohsinalimat/roona
|
b24336d9d56eb443a883131afffd9091c9a66add
|
[
"MIT"
] | null | null | null |
roona/roona/doctype/roona_app_setting/test_roona_app_setting.py
|
mohsinalimat/roona
|
b24336d9d56eb443a883131afffd9091c9a66add
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2021, Roona and Contributors
# See license.txt
# import frappe
import unittest
class TestRoonaAppSetting(unittest.TestCase):
pass
| 16.555556
| 45
| 0.785235
| 18
| 149
| 6.5
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 0.14094
| 149
| 8
| 46
| 18.625
| 0.882813
| 0.483221
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 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
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 6
|
930766e7b8ffd5a77cf2414fe0de6b57a69af041
| 48
|
py
|
Python
|
levelpy/async/__init__.py
|
rch/levelpy
|
59e546854b3d478f3467bd573eb5f6b4da62d239
|
[
"MIT"
] | 4
|
2015-11-06T22:50:22.000Z
|
2020-05-31T14:49:58.000Z
|
levelpy/async/__init__.py
|
rch/levelpy
|
59e546854b3d478f3467bd573eb5f6b4da62d239
|
[
"MIT"
] | null | null | null |
levelpy/async/__init__.py
|
rch/levelpy
|
59e546854b3d478f3467bd573eb5f6b4da62d239
|
[
"MIT"
] | 3
|
2017-01-25T22:26:40.000Z
|
2021-03-24T07:49:33.000Z
|
#
# levelpy/async/__init__.py
#
import asyncio
| 8
| 27
| 0.729167
| 6
| 48
| 5.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145833
| 48
| 5
| 28
| 9.6
| 0.756098
| 0.520833
| 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
| 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
| 6
|
935fa4a7ed04d049f63c5a737cdba5df5fb7e88c
| 25
|
py
|
Python
|
src/engines/train/__init__.py
|
cr3ux53c/DenseNet-Tensorflow2
|
208143bf4086c407e524e01cd945fd3b0741b48d
|
[
"MIT"
] | 60
|
2020-07-08T02:39:06.000Z
|
2022-03-28T14:26:34.000Z
|
src/engines/train/__init__.py
|
cr3ux53c/DenseNet-Tensorflow2
|
208143bf4086c407e524e01cd945fd3b0741b48d
|
[
"MIT"
] | 28
|
2019-08-13T22:20:46.000Z
|
2020-02-17T19:27:32.000Z
|
src/engines/train/__init__.py
|
cr3ux53c/DenseNet-Tensorflow2
|
208143bf4086c407e524e01cd945fd3b0741b48d
|
[
"MIT"
] | 18
|
2020-08-26T02:06:32.000Z
|
2022-03-22T03:04:40.000Z
|
from .train import train
| 12.5
| 24
| 0.8
| 4
| 25
| 5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 25
| 1
| 25
| 25
| 0.952381
| 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
| 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
| 6
|
9361e059240f0fd25cbcad6c1466201786c8b48a
| 164
|
py
|
Python
|
genie_core/services/KeyBoardService.py
|
JereMIbq1995/genie-core
|
f87b6de56749630a46200298f7021047e854c8a3
|
[
"MIT"
] | null | null | null |
genie_core/services/KeyBoardService.py
|
JereMIbq1995/genie-core
|
f87b6de56749630a46200298f7021047e854c8a3
|
[
"MIT"
] | null | null | null |
genie_core/services/KeyBoardService.py
|
JereMIbq1995/genie-core
|
f87b6de56749630a46200298f7021047e854c8a3
|
[
"MIT"
] | null | null | null |
class KeyBoardService():
def __init__(self):
pass
def is_key_pressed(self, *keys):
pass
def is_key_released(self, *key):
pass
| 16.4
| 36
| 0.591463
| 20
| 164
| 4.45
| 0.55
| 0.157303
| 0.202247
| 0.269663
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.310976
| 164
| 10
| 37
| 16.4
| 0.787611
| 0
| 0
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0.428571
| 0
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 6
|
fa97149416601cbc0c317503ce2c46c344e58e58
| 121
|
py
|
Python
|
src/connections/_sqlalchemy.py
|
Freonius/tranquillity
|
bb190b4a8facf643d5018a710100b3ff45d6d640
|
[
"MIT"
] | null | null | null |
src/connections/_sqlalchemy.py
|
Freonius/tranquillity
|
bb190b4a8facf643d5018a710100b3ff45d6d640
|
[
"MIT"
] | 20
|
2021-12-31T15:28:20.000Z
|
2022-02-15T18:24:16.000Z
|
src/connections/_sqlalchemy.py
|
Freonius/tranquillity
|
bb190b4a8facf643d5018a710100b3ff45d6d640
|
[
"MIT"
] | null | null | null |
from sqlalchemy.engine import Engine, Connection
from .__interface import IConnection
class Sql(IConnection):
pass
| 17.285714
| 48
| 0.801653
| 14
| 121
| 6.785714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14876
| 121
| 6
| 49
| 20.166667
| 0.92233
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.25
| 0.5
| 0
| 0.75
| 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
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 6
|
faa59189fcb0db287ca016ded409105514d4c263
| 15,742
|
py
|
Python
|
tests/test_fluids_bw92.py
|
trhallam/digirock
|
05b1199d741a384345a4930605be97369c9ec270
|
[
"MIT"
] | null | null | null |
tests/test_fluids_bw92.py
|
trhallam/digirock
|
05b1199d741a384345a4930605be97369c9ec270
|
[
"MIT"
] | 2
|
2022-02-28T08:51:53.000Z
|
2022-02-28T13:24:33.000Z
|
tests/test_fluids_bw92.py
|
trhallam/digirock
|
05b1199d741a384345a4930605be97369c9ec270
|
[
"MIT"
] | null | null | null |
"""Test functions for pem.fluid.bw92 module
"""
import pytest
from pytest import approx
from _pytest.fixtures import SubRequest
from hypothesis import given, settings, strategies as st
import numpy as np
import digirock.fluids.bw92 as bw92
from .strategies import n_varshp_arrays
@pytest.fixture(scope="module")
def tol():
return {
"rel": 0.05, # relative testing tolerance in percent
"abs": 0.00001, # absolute testing tolerance
}
def test_GAS_R():
assert bw92.GAS_R == 8.31441
# p (MPa), t (degC)
@pytest.mark.parametrize(
"args,ans", (((10 * 1e6, 273.15), 0.00045422), ((50 * 1e6, 373.15), 0.00010747))
)
@given(data=st.data())
def test_gas_vmol(args, ans, data, tol):
(test_p, test_t), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_vmol(test_t, test_p)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), t (degC), m (methane molecular weight)
@pytest.mark.parametrize(
"args,ans",
(
((10 * 1e6, 273.15, 16.04), 35313.5783218),
((50 * 1e6, 373.15, 16.04), 149248.08786351),
),
)
@given(data=st.data())
def test_gas_density(args, ans, data, tol):
(test_p, test_t, test_m), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_density(test_m, test_t, test_p)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), t (degC)
@pytest.mark.parametrize(
"args,ans",
(((np.r_[10 * 1e6, 50 * 1e6], 273.15), 2e-08),),
)
def test_gas_isotherm_comp(args, ans, tol):
v1, v2 = bw92.gas_vmol(args[1], args[0])
assert bw92.gas_isotherm_comp(v1, v2, args[0][0], args[0][1]) == approx(ans)
# t (degC), m (methane molecular weight),
@pytest.mark.parametrize(
"args,ans",
(
((273.15, 16.04), 16.8278695),
((373.15, 16.04), 18.30335126),
),
)
@given(data=st.data())
def test_gas_isotherm_vp(args, ans, data, tol):
(test_t, test_m), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_isotherm_vp(test_m, test_t)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# G spec grav
@pytest.mark.parametrize(
"args,ans",
(((0.56,), 4.665312),), # methane
)
@given(data=st.data())
def test_gas_pseudocrit_pres(args, ans, data, tol):
(test_G,), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_pseudocrit_pres(test_G)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# fmt: off
# p (MPa), G spec grav
@pytest.mark.parametrize(
"args,ans",
(
((10 * 1e6, 0.56,), 2143479.36429546,),
((50 * 1e6, 0.56), 10717396.82147732),
),
)
# fmt: on
@given(data=st.data())
def test_gas_pseudored_pres(args, ans, data, tol):
(
test_p,
test_G,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_pseudored_pres(test_p, test_G)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# G spec grav
@pytest.mark.parametrize(
"args,ans",
(((0.56,), 190.34),), # methane
)
@given(data=st.data())
def test_gas_pseudocrit_temp(args, ans, data, tol):
(test_G,), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_pseudocrit_temp(test_G)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# t (degC), G (spec grav)
# fmt: off
@pytest.mark.parametrize(
"args,ans",
(
((273.15, 0.56,), 2.87012714,),
((373.15, 0.56), 3.39550278),
),
)
# fmt: on
@given(data=st.data())
def test_gas_pseudored_temp(args, ans, data, tol):
(
test_t,
test_G,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_pseudored_temp(test_t, test_G)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), t (degC), G (spec grav)
@pytest.mark.parametrize(
"args,ans",
(
((10 * 1e6, 273.15, 0.56), 0.5289487894),
((50 * 1e6, 373.15, 0.56), 0.46664469),
),
)
@given(data=st.data())
def test_gas_oga_density(args, ans, data, tol):
(
test_p,
test_t,
test_G,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_oga_density(test_t, test_p, test_G)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
def test_gas_oga_density_warning():
with pytest.warns(UserWarning):
bw92.gas_oga_density(4.5, 4.5, 1)
# p (MPa), t (degC), G (spec grav)
@pytest.mark.parametrize(
"args,ans",
(
((10 * 1e6, 273.15, 0.56), 673174274.6197122),
((50 * 1e6, 373.15, 0.56), 1.87375111e10),
),
)
@given(data=st.data())
def test_gas_adiabatic_bulkmod(args, ans, data, tol):
(
test_p,
test_t,
test_G,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_adiabatic_bulkmod(test_t, test_p, test_G)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), t (degC), G (spec grav)
@pytest.mark.parametrize(
"args,ans",
(
((10 * 1e6, 273.15, 0.56), 0.0204339351378),
((50 * 1e6, 373.15, 0.56), 0.03011878),
),
)
@given(data=st.data())
def test_gas_adiabatic_viscosity(args, ans, data, tol):
(
test_p,
test_t,
test_G,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.gas_adiabatic_viscosity(test_t, test_p / 1e6, test_G)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), rho (g/cc)
@pytest.mark.parametrize(
"args,ans",
(
((10 * 1e6, 0.8), 0.8068623025),
((10 * 1e6, 0.9), 0.90521056),
((50 * 1e6, 0.8), 0.83179781),
((50 * 1e6, 0.9), 0.92477031),
),
)
@given(data=st.data())
def test_oil_isothermal_density(args, ans, data, tol):
(
test_p,
test_rho,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_isothermal_density(test_rho, test_p / 1e6)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), rho (g/cc), t (degC)
@pytest.mark.parametrize(
"args,ans",
(
((10 * 1e6, 0.8, 273.15), 0.63475419),
((10 * 1e6, 0.9, 273.15), 0.71212423),
((50 * 1e6, 0.8, 273.15), 0.65437082),
((50 * 1e6, 0.9, 273.15), 0.72751178),
((10 * 1e6, 0.8, 373.15), 0.57827437),
((10 * 1e6, 0.9, 373.15), 0.6487601),
((50 * 1e6, 0.8, 373.15), 0.59614553),
((50 * 1e6, 0.9, 373.15), 0.65437082),
),
)
@given(data=st.data())
def test_oil_density(args, ans, data, tol):
(
test_p,
test_rho,
test_t
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_density(test_rho, test_p / 1e6, test_t)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho (g/cc), G (spec_grav), rg (L/L), t (degC)
@pytest.mark.parametrize(
"args,ans",
(
((0.8, 0.56, 120, 273.15), 1.57823582),
)
)
@given(data=st.data())
def test_oil_fvf(args, ans, data, tol):
(
test_rho,
test_G,
test_rg,
test_t,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_fvf(test_rho, test_G, test_rg, test_t)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho (g/cc), G (spec_grav), p (MPa), t (degC)
@pytest.mark.parametrize(
"args,ans",
(((0.8, 0.6, 50, 100), 415.709664),)
)
@given(data=st.data())
def test_oil_rg_rho(args, ans, data, tol):
(
test_rho,
test_G,
test_p,
test_t,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_rg(test_rho, test_G, test_p, test_t, mode="rho")
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho (g/cc), G (spec_grav), p (MPa), t (degC)
@pytest.mark.parametrize(
"args,ans",
(((45, 0.6, 50, 100), 415.709664),)
)
@given(data=st.data())
def test_oil_rg_api(args, ans, data, tol):
(
test_rho,
test_G,
test_p,
test_t,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_rg(test_rho, test_G, test_p, test_t, mode="api")
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
def test_oil_rg_bad_mode():
with pytest.raises(ValueError):
assert bw92.oil_rg(1, 1, 1, 1, mode="bad_mode")
# rho0, g, rg, b0
@pytest.mark.parametrize(
"args,ans",
(
((0.8, 0.6, 50, 1.1), 0.76),
((0.9, 0.6, 70, 1.1), 0.864),
((0.9, 0.6, 70, 0.0), 0.0)
),
)
@given(data=st.data())
def test_oil_rho_sat(args, ans, data, tol):
(
test_rho0,
test_g,
test_rg,
test_b0,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_rho_sat(test_rho0, test_g, test_rg, test_b0)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho0, rg, b0
@pytest.mark.parametrize(
"args,ans",
(
((0.8, 50, 1.1), 0.69264069264),
((0.9, 70, 1.1), 0.764655904),
((0.9, 70, 0.0), 0.0)),
)
@given(data=st.data())
def test_oil_rho_pseudo(args, ans, data, tol):
(
test_rho0,
test_rg,
test_b0,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_rho_pseudo(test_rho0, test_rg, test_b0)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho0,p,t,g,rg,b0
@pytest.mark.parametrize(
"args,ans",
(
((0.8, 50, 100, 0.6, 120), 1101.21832685),
),
)
@given(data=st.data())
def test_oil_velocity_nobo(args, ans, data, tol):
(
test_rho0,
test_p,
test_t,
test_g,
test_rg,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_velocity(test_rho0, test_p, test_t, test_g, test_rg, b0=None)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho0,p,t,g,rg,b0
@pytest.mark.parametrize(
"args,ans",
(
((0.8, 50, 100, 0.6, 120), 1206.74469093),
),
)
@given(data=st.data())
def test_oil_velocity_bo(args, ans, data, tol):
(
test_rho0,
test_p,
test_t,
test_g,
test_rg,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_velocity(test_rho0, test_p, test_t, test_g, test_rg, b0=np.r_[1.1])
assert np.allclose(test, ans, rtol=tol["rel"])
# assert np.squeeze(test).shape == result_shape
# rho, vp
@pytest.mark.parametrize(
"args,ans",
(
((0.8, 1200), 1.152),
),
)
@given(data=st.data())
def test_oil_bulkmod(args, ans, data, tol):
(
test_rho,
test_vp,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.oil_bulkmod(test_rho, test_vp)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), t (degC)
@pytest.mark.parametrize(
"args,ans", (((10 * 1e6, 273.15), 1063.23709), ((50 * 1e6, 373.15), 847.72401465))
)
@given(data=st.data())
@settings(deadline=None) # due to njit
def test_wat_velocity_pure(args, ans, data, tol):
(
test_p,
test_t,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.wat_velocity_pure(test_t, test_p / 1e6)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), t (degC), sal (ppm)
@pytest.mark.parametrize(
"args,ans", (((10 * 1e6, 273.15, 32000), 1095.70072), ((50 * 1e6, 373.15, 150000), 980.48475247))
)
@given(data=st.data())
@settings(deadline=None) # due to njit
def test_wat_velocity_brine(args, ans, data, tol):
(
test_p,
test_t,
test_sal
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.wat_velocity_brine(test_t, test_p / 1e6, test_sal / 1e6)
assert np.allclose(test, ans, rtol=tol["rel"])
# p (MPa), t (degC)
@pytest.mark.parametrize(
"args,ans", (((10 * 1e6, 273.15), 0.77622433), ((50 * 1e6, 373.15), 0.66363597))
)
@given(data=st.data())
def test_wat_density_pure(args, ans, data, tol):
(
test_p,
test_t,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.wat_density_pure(test_t, test_p / 1e6)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# p (MPa), t (degC), sal (ppm)
@pytest.mark.parametrize(
"args,ans", (((10 * 1e6, 273.15, 32000), 0.80405636), ((50 * 1e6, 373.15, 150000), 0.79606398))
)
@given(data=st.data())
def test_wat_density_brine(args, ans, data, tol):
(
test_p,
test_t,
test_sal
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.wat_density_brine(test_t, test_p / 1e6, test_sal / 1e6)
assert np.allclose(test, ans, rtol=tol["rel"])
# p (MPa), t (degC), sal (ppm)
@pytest.mark.parametrize(
"args,ans", (((10 * 1e6, 273.15, 32000), None), ((50 * 1e6, 373.15, 150000), None))
)
def test_wat_salinity_brine(args, ans):
(
test_p,
test_t,
test_sal
) = args
test_den = bw92.wat_density_brine(test_t, test_p / 1e6, test_sal / 1e6)
test = bw92.wat_salinity_brine(test_t, test_p / 1e6, test_den) * 1e6
assert test == approx(test_sal, abs=250)
# rho (g/cc), v (m/s)
@pytest.mark.parametrize(
"args,ans", (((1.0, 1300), 1.69), ((1.1, 1450), 2.31275))
)
@given(data=st.data())
def test_wat_bulkmod(args, ans, data, tol):
(
test_rho,
test_vp,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.wat_bulkmod(test_rho, test_vp)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho (g/cc), v (vfrac), ...
@pytest.mark.parametrize(
"args,ans",
(
((2, 0.5, 2, 0.5), 2),
((2, 0.5, 1, 0.5), 1.5),
((2, 0.3, 2, 0.3, 2,), 2),
((2, 0.5, 1, 0.5, 2,), 1.5),
)
)
@given(data=st.data())
def test_mixed_density(args, ans, data, tol):
args, result_shape = data.draw(n_varshp_arrays(args))
test = bw92.mixed_density(*args)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# rho (g/cc), v (m/s)
@pytest.mark.parametrize(
"args,ans", (((1.0, 1300), 1.69), ((1.1, 1450), 2.31275))
)
@given(data=st.data())
def test_bulkmod(args, ans, data, tol):
(
test_rho,
test_vp,
), result_shape = data.draw(n_varshp_arrays(args))
test = bw92.bulkmod(test_rho, test_vp)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
# k (GPa), v (vfrac), ...
@pytest.mark.parametrize(
"args,ans",
(
((2, 0.5, 2, 0.5), 2),
((2, 0.5, 1, 0.5), 1.3333),
((2, 0.3, 2, 0.3, 2,), 2),
((2, 0.5, 1, 0.5, 2,), 1.3333),
)
)
@given(data=st.data())
def test_woods_bulkmod(args, ans, data, tol):
args, result_shape = data.draw(n_varshp_arrays(args))
test = bw92.woods_bulkmod(*args)
assert np.allclose(test, ans, rtol=tol["rel"])
assert test.shape == result_shape
| 28.363964
| 102
| 0.581629
| 2,368
| 15,742
| 3.690456
| 0.092905
| 0.04806
| 0.072091
| 0.085822
| 0.824579
| 0.807758
| 0.780639
| 0.734409
| 0.706374
| 0.671587
| 0
| 0.107007
| 0.248444
| 15,742
| 554
| 103
| 28.415162
| 0.631646
| 0.062826
| 0
| 0.535088
| 0
| 0
| 0.024731
| 0
| 0
| 0
| 0
| 0
| 0.125
| 1
| 0.074561
| false
| 0
| 0.015351
| 0.002193
| 0.092105
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
fab73276314f39860cdf6b1e49f429594d065a0f
| 14,376
|
py
|
Python
|
codes/models/modules/sftmd_arch.py
|
Mark-sloan/IKC
|
f70af607e9434931c22e4971469aaed7683a22a3
|
[
"Apache-2.0"
] | 1
|
2020-02-27T09:27:17.000Z
|
2020-02-27T09:27:17.000Z
|
codes/models/modules/sftmd_arch.py
|
Mark-sloan/IKC
|
f70af607e9434931c22e4971469aaed7683a22a3
|
[
"Apache-2.0"
] | null | null | null |
codes/models/modules/sftmd_arch.py
|
Mark-sloan/IKC
|
f70af607e9434931c22e4971469aaed7683a22a3
|
[
"Apache-2.0"
] | null | null | null |
'''
architecture for sftmd
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
class Predictor(nn.Module):
def __init__(self, input_channel=3, code_len=10, ndf=64, use_bias=True):
super(Predictor, self).__init__()
self.ConvNet = nn.Sequential(*[
nn.Conv2d(input_channel, ndf, kernel_size=5, stride=1, padding=2),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=2, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, code_len, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
])
# self.lrelu = nn.LeakyReLU(negative_slope=0.2, inplace=True)
self.globalPooling = nn.AdaptiveAvgPool2d((1,1))
def forward(self, input):
conv = self.ConvNet(input)
flat = self.globalPooling(conv)
return flat.view(flat.size()[:2]) # torch size: [B, code_len]
class Corrector(nn.Module):
def __init__(self, input_channel=3, code_len=10, ndf=64, use_bias=True):
super(Corrector, self).__init__()
self.ConvNet = nn.Sequential(*[
nn.Conv2d(input_channel, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=2, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=2, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, ndf, kernel_size=5, stride=1, padding=2, bias=use_bias),
nn.LeakyReLU(0.2, True),
])
self.code_dense = nn.Sequential(*[
nn.Linear(code_len, ndf, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Linear(ndf, ndf, bias=use_bias),
nn.LeakyReLU(0.2, True),
])
self.global_dense = nn.Sequential(*[
nn.Conv2d(ndf * 2, ndf * 2, kernel_size=1, stride=1, padding=0, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf * 2, ndf, kernel_size=1, stride=1, padding=0, bias=use_bias),
nn.LeakyReLU(0.2, True),
nn.Conv2d(ndf, code_len, kernel_size=1, stride=1, padding=0, bias=use_bias),
])
self.ndf = ndf
self.globalPooling = nn.AdaptiveAvgPool2d([1, 1])
def forward(self, input, code, res=False):
conv_input = self.ConvNet(input)
B, C_f, H_f, W_f = conv_input.size() # LR_size
conv_code = self.code_dense(code).view((B, self.ndf, 1, 1)).expand((B, self.ndf, H_f, W_f)) # h_stretch
conv_mid = torch.cat((conv_input, conv_code), dim=1)
code_res = self.global_dense(conv_mid)
# Delta_h_p
flat = self.globalPooling(code_res)
Delta_h_p = flat.view(flat.size()[:2])
if res:
return Delta_h_p
else:
return Delta_h_p + code
class SFT_Layer(nn.Module):
def __init__(self, ndf=64, para=10):
super(SFT_Layer, self).__init__()
self.mul_conv1 = nn.Conv2d(para + ndf, 32, kernel_size=3, stride=1, padding=1)
self.mul_leaky = nn.LeakyReLU(0.2)
self.mul_conv2 = nn.Conv2d(32, ndf, kernel_size=3, stride=1, padding=1)
self.add_conv1 = nn.Conv2d(para + ndf, 32, kernel_size=3, stride=1, padding=1)
self.add_leaky = nn.LeakyReLU(0.2)
self.add_conv2 = nn.Conv2d(32, ndf, kernel_size=3, stride=1, padding=1)
def forward(self, feature_maps, para_maps):
cat_input = torch.cat((feature_maps, para_maps), dim=1)
mul = F.sigmoid(self.mul_conv2(self.mul_leaky(self.mul_conv1(cat_input))))
add = self.add_conv2(self.add_leaky(self.add_conv1(cat_input)))
return feature_maps * mul + add
class SFT_Residual_Block(nn.Module):
def __init__(self, ndf=64, para=10):
super(SFT_Residual_Block, self).__init__()
self.sft1 = SFT_Layer(ndf=ndf, para=para)
self.sft2 = SFT_Layer(ndf=ndf, para=para)
self.conv1 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
self.conv2 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
def forward(self, feature_maps, para_maps):
fea1 = F.relu(self.sft1(feature_maps, para_maps))
fea2 = F.relu(self.sft2(self.conv1(fea1), para_maps))
fea3 = self.conv2(fea2)
return torch.add(feature_maps, fea3)
class SFTMD(nn.Module):
def __init__(self, input_channel=3, input_para=10, scale=4, min=0.0, max=1.0, residuals=16):
super(SFTMD, self).__init__()
self.min = min
self.max = max
self.para = input_para
self.num_blocks = residuals
self.conv1 = nn.Conv2d(input_channel, 64, 3, stride=1, padding=1)
self.relu_conv1 = nn.LeakyReLU(0.2)
self.conv2 = nn.Conv2d(64, 64, 3, stride=1, padding=1)
self.relu_conv2 = nn.LeakyReLU(0.2)
self.conv3 = nn.Conv2d(64, 64, 3, stride=1, padding=1)
sft_branch = []
for i in range(residuals):
sft_branch.append(SFT_Residual_Block())
self.sft_branch = nn.Sequential(*sft_branch)
for i in range(residuals):
self.add_module('SFT-residual' + str(i + 1), SFT_Residual_Block(ndf=64, para=input_para))
self.sft = SFT_Layer(ndf=64, para=input_para)
self.conv_mid = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
if scale == 4:
self.upscale = nn.Sequential(
nn.Conv2d(in_channels=64, out_channels=64 * scale, kernel_size=3, stride=1, padding=1, bias=True),
nn.PixelShuffle(scale // 2),
nn.LeakyReLU(0.2, inplace=True),
nn.Conv2d(in_channels=64, out_channels=64 * scale, kernel_size=3, stride=1, padding=1, bias=True),
nn.PixelShuffle(scale // 2),
nn.LeakyReLU(0.2, inplace=True),
)
else:
self.upscale = nn.Sequential(
nn.Conv2d(in_channels=64, out_channels=64*scale**2, kernel_size=3, stride=1, padding=1, bias=True),
nn.PixelShuffle(scale),
nn.LeakyReLU(0.2, inplace=True),
)
self.conv_output = nn.Conv2d(in_channels=64, out_channels=input_channel, kernel_size=9, stride=1, padding=4, bias=True)
def forward(self, input, ker_code):
B, C, H, W = input.size() # I_LR batch
B_h, C_h = ker_code.size() # Batch, Len=10
ker_code_exp = ker_code.view((B_h, C_h, 1, 1)).expand((B_h, C_h, H, W)) #kernel_map stretch
fea_bef = self.conv3(self.relu_conv2(self.conv2(self.relu_conv1(self.conv1(input)))))
fea_in = fea_bef
for i in range(self.num_blocks):
fea_in = self.__getattr__('SFT-residual' + str(i + 1))(fea_in, ker_code_exp)
fea_mid = fea_in
#fea_in = self.sft_branch((fea_in, ker_code_exp))
fea_add = torch.add(fea_mid, fea_bef)
fea = self.upscale(self.conv_mid(self.sft(fea_add, ker_code_exp)))
out = self.conv_output(fea)
return torch.clamp(out, min=self.min, max=self.max)
class Residual_Block(nn.Module):
def __init__(self):
super(Residual_Block, self).__init__()
self.conv1 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
self.conv2 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
self.conv3 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
self.conv4 = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
self.lrelu = nn.LeakyReLU(negative_slope=0.2, inplace=True)
def forward(self, input):
fea = input
fea1 = self.lrelu(self.conv1(fea))
fea2 = self.lrelu(self.conv2(fea1))
fea3 = self.lrelu(self.conv3(fea2))
fea4 = self.conv4(fea3)
output = input + fea4
return output
class SRResNet(nn.Module):
def __init__(self, input_channel=3, input_para=32, scale=4, min=0.0, max=1.0, residuals=16):
super(SRResNet, self).__init__()
self.min = min
self.max = max
self.para = input_para
self.num_blocks = residuals
self.conv1 = nn.Conv2d(input_channel, 64, 3, stride=1, padding=1)
self.relu_conv1 = nn.LeakyReLU(0.2)
self.conv2 = nn.Conv2d(64, 64, 3, stride=1, padding=1)
self.relu_conv2 = nn.LeakyReLU(0.2)
self.conv3 = nn.Conv2d(64, 64, 3, stride=1, padding=1)
sft_branch = []
for i in range(residuals):
sft_branch.append(Residual_Block())
self.sft_branch = nn.Sequential(*sft_branch)
#for i in range(residuals):
# self.add_module('SFT-residual' + str(i + 1), SFT_Residual_Block(ndf=64, para=input_para))
#self.sft = SFT_Layer(ndf=64, para=input_para)
self.mul_conv1 = nn.Conv2d(64, 32, kernel_size=3, stride=1, padding=1)
self.mul_leaky = nn.LeakyReLU(0.2)
self.mul_conv2 = nn.Conv2d(32, 64, kernel_size=3, stride=1, padding=1)
self.conv_mid = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=True)
self.upscale = nn.Sequential(
nn.Conv2d(in_channels=64, out_channels=64*scale**2, kernel_size=3, stride=1, padding=1, bias=True),
nn.PixelShuffle(scale),
nn.LeakyReLU(0.2, inplace=True),
)
self.conv_output = nn.Conv2d(in_channels=64, out_channels=input_channel, kernel_size=9, stride=1, padding=4, bias=True)
def forward(self, input):
#B, C, H, W = input.size() # I_LR batch
#B_h, C_h = ker_code.size() # Batch, Len=32
#ker_code_exp = ker_code.view((B_h, C_h, 1, 1)).expand((B_h, C_h, H, W)) #kernel_map stretch
fea_bef = self.conv3(self.relu_conv2(self.conv2(self.relu_conv1(self.conv1(input)))))
fea_in = fea_bef
fea_mid = self.sft_branch(fea_in)
fea_add = torch.add(fea_mid, fea_bef)
fea = self.upscale(self.conv_mid(self.mul_conv2(self.mul_leaky(self.mul_conv1(fea_add)))))
out = self.conv_output(fea)
return torch.clamp(out, min=self.min, max=self.max)
class SFTMD_DEMO(nn.Module):
def __init__(self, input_channel=3, input_para=10, scala=4, min=0.0, max=1.0, residuals=16):
super(SFTMD_DEMO, self).__init__()
self.min = min
self.max = max
self.para = input_para
self.reses = residuals
self.conv1 = nn.Conv2d(input_channel + input_para, 64, 3, stride=1, padding=1)
self.relu_conv1 = nn.LeakyReLU(0.2)
self.conv2 = nn.Conv2d(64, 64, 3, stride=1, padding=1)
self.relu_conv2 = nn.LeakyReLU(0.2)
self.conv3 = nn.Conv2d(64, 64, 3, stride=1, padding=1)
for i in range(residuals):
self.add_module('SFT-residual' + str(i + 1), SFT_Residual_Block(ndf=64, para=input_para))
self.sft_mid = SFT_Layer(ndf=64, para=input_para)
self.conv_mid = nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, stride=1, padding=1, bias=False)
self.scala = scala
if scala == 4:
self.upscale = nn.Sequential(
nn.Conv2d(in_channels=64, out_channels=256, kernel_size=3, stride=1, padding=1, bias=False),
nn.PixelShuffle(2),
nn.LeakyReLU(0.2, inplace=True),
nn.Conv2d(in_channels=64, out_channels=256, kernel_size=3, stride=1, padding=1, bias=False),
nn.PixelShuffle(2),
nn.LeakyReLU(0.2, inplace=True),
)
elif scala == 3:
self.upscale = nn.Sequential(
nn.Conv2d(in_channels=64, out_channels=64*9, kernel_size=3, stride=1, padding=1, bias=False),
nn.PixelShuffle(3),
nn.LeakyReLU(0.2, inplace=True),
)
elif scala == 2:
self.upscale = nn.Sequential(
nn.Conv2d(in_channels=64, out_channels=256, kernel_size=3, stride=1, padding=1, bias=False),
nn.PixelShuffle(2),
nn.LeakyReLU(0.2, inplace=True),
)
else:
self.upscale = nn.Sequential(
nn.Conv2d(in_channels=64, out_channels=256, kernel_size=3, stride=1, padding=1, bias=False),
nn.PixelShuffle(2),
nn.LeakyReLU(0.2, inplace=True),
nn.Conv2d(in_channels=64, out_channels=256, kernel_size=3, stride=1, padding=1, bias=False),
nn.PixelShuffle(2),
nn.LeakyReLU(0.2, inplace=True),
)
self.conv_output = nn.Conv2d(in_channels=64, out_channels=input_channel, kernel_size=9, stride=1, padding=4, bias=False)
def forward(self, input, code, clip=False):
B, C, H, W = input.size()
B, C_l = code.size()
code_exp = code.view((B, C_l, 1, 1)).expand((B, C_l, H, W))
input_cat = torch.cat([input, code_exp], dim=1)
before_res = self.conv3(self.relu_conv2(self.conv2(self.relu_conv1(self.conv1(input_cat)))))
res = before_res
for i in range(self.reses):
res = self.__getattr__('SFT-residual' + str(i + 1))(res, code_exp)
mid = self.sft_mid(res, code_exp)
mid = F.relu(mid)
mid = self.conv_mid(mid)
befor_up = torch.add(before_res, mid)
uped = self.upscale(befor_up)
out = self.conv_output(uped)
return torch.clamp(out, min=self.min, max=self.max) if clip else out
| 42.40708
| 128
| 0.61081
| 2,168
| 14,376
| 3.863007
| 0.061347
| 0.050627
| 0.083582
| 0.055881
| 0.831403
| 0.80406
| 0.79594
| 0.76597
| 0.757612
| 0.739582
| 0
| 0.055586
| 0.250417
| 14,376
| 339
| 129
| 42.40708
| 0.721604
| 0.039093
| 0
| 0.526923
| 0
| 0
| 0.003481
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.061538
| false
| 0
| 0.011538
| 0
| 0.138462
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
8789474f74a671f6ddfeccf4cb104d024e738101
| 32
|
py
|
Python
|
poetry/console/commands/cache/__init__.py
|
hongquan/poetry
|
d12f6421b1c34067e3968ddec2d821ae7f316af7
|
[
"MIT"
] | 1
|
2020-12-22T12:51:11.000Z
|
2020-12-22T12:51:11.000Z
|
poetry/console/commands/cache/__init__.py
|
hongquan/poetry
|
d12f6421b1c34067e3968ddec2d821ae7f316af7
|
[
"MIT"
] | null | null | null |
poetry/console/commands/cache/__init__.py
|
hongquan/poetry
|
d12f6421b1c34067e3968ddec2d821ae7f316af7
|
[
"MIT"
] | null | null | null |
from .cache import CacheCommand
| 16
| 31
| 0.84375
| 4
| 32
| 6.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 32
| 1
| 32
| 32
| 0.964286
| 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
| 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
| 6
|
359e4a1d1a339ad0c2dbb1f04272dbcd884b9fc0
| 163
|
py
|
Python
|
HSTB/shared/settings.py
|
noaa-ocs-hydrography/shared
|
d2004e803c708dffa43d09d3ffea4e4045811b28
|
[
"CC0-1.0"
] | null | null | null |
HSTB/shared/settings.py
|
noaa-ocs-hydrography/shared
|
d2004e803c708dffa43d09d3ffea4e4045811b28
|
[
"CC0-1.0"
] | null | null | null |
HSTB/shared/settings.py
|
noaa-ocs-hydrography/shared
|
d2004e803c708dffa43d09d3ffea4e4045811b28
|
[
"CC0-1.0"
] | null | null | null |
from sys import platform
if 'win' in platform:
from .winreg import *
elif 'linux' in platform:
from posixreg import *
import posixreg
posixreg.__init__()
| 18.111111
| 25
| 0.730061
| 22
| 163
| 5.227273
| 0.545455
| 0.173913
| 0.243478
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196319
| 163
| 8
| 26
| 20.375
| 0.877863
| 0
| 0
| 0
| 0
| 0
| 0.04908
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.571429
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 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
| 6
|
35d72c0843e71e8c73c42625fa71b7593cdf2c85
| 192
|
py
|
Python
|
KSFGHAction/__init__.py
|
KOLANICH-GHActions/KSFGHAction.py
|
e1d54ae0043d93d8b190f8e758b978bf8e779c51
|
[
"Unlicense"
] | null | null | null |
KSFGHAction/__init__.py
|
KOLANICH-GHActions/KSFGHAction.py
|
e1d54ae0043d93d8b190f8e758b978bf8e779c51
|
[
"Unlicense"
] | 3
|
2019-12-23T22:58:40.000Z
|
2019-12-25T11:20:13.000Z
|
KSFGHAction/__init__.py
|
KOLANICH/KSFGHAction.py
|
e1d54ae0043d93d8b190f8e758b978bf8e779c51
|
[
"Unlicense"
] | null | null | null |
#!/usr/bin/env python3
import typing
from .utils import ClassDictMeta
from .issueParser import *
from .linter import *
from miniGHAPI.GitHubAPI import *
from miniGHAPI.GHActionsEnv import *
| 19.2
| 36
| 0.791667
| 24
| 192
| 6.333333
| 0.583333
| 0.197368
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006024
| 0.135417
| 192
| 9
| 37
| 21.333333
| 0.909639
| 0.109375
| 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
| 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
| 6
|
ea230ac82e5bb4386e749cb1be502c5bdba91b6d
| 76
|
py
|
Python
|
dotfiles/common/.gdbinit.d/eigen.py
|
HaoZeke/Dotfiles
|
f4ac24b0d7e08d87b1f402af67e463c528b1b69d
|
[
"Unlicense"
] | 14
|
2018-10-29T18:54:25.000Z
|
2021-12-21T00:22:52.000Z
|
dotfiles/common/.gdbinit.d/eigen.py
|
HaoZeke/Dotfiles
|
f4ac24b0d7e08d87b1f402af67e463c528b1b69d
|
[
"Unlicense"
] | 1
|
2018-08-20T17:41:10.000Z
|
2018-08-20T17:42:23.000Z
|
dotfiles/common/.gdbinit.d/eigen.py
|
HaoZeke/Dotfiles
|
f4ac24b0d7e08d87b1f402af67e463c528b1b69d
|
[
"Unlicense"
] | 3
|
2018-08-20T17:36:29.000Z
|
2021-01-23T05:18:30.000Z
|
# Eigen pretty printer
__import__('eigengdb').register_eigen_printers(None)
| 25.333333
| 52
| 0.828947
| 9
| 76
| 6.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065789
| 76
| 2
| 53
| 38
| 0.802817
| 0.263158
| 0
| 0
| 0
| 0
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 1
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 1
|
0
| 6
|
ea37e30aaa000862cd2a845865431af3031ecbc6
| 188
|
py
|
Python
|
src/plugins/hk_reporter/platform/__init__.py
|
panda361/nonebot-hk-reporter
|
b94f6cc31844e9307e355fc81f387ea42501a014
|
[
"MIT"
] | null | null | null |
src/plugins/hk_reporter/platform/__init__.py
|
panda361/nonebot-hk-reporter
|
b94f6cc31844e9307e355fc81f387ea42501a014
|
[
"MIT"
] | null | null | null |
src/plugins/hk_reporter/platform/__init__.py
|
panda361/nonebot-hk-reporter
|
b94f6cc31844e9307e355fc81f387ea42501a014
|
[
"MIT"
] | null | null | null |
from .bilibili import Bilibili
from .rss import Rss
from .weibo import Weibo
from .utils import check_sub_target
from .platform import PlatformNoTarget
from .utils import platform_manager
| 26.857143
| 38
| 0.840426
| 27
| 188
| 5.740741
| 0.444444
| 0.116129
| 0.193548
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12766
| 188
| 6
| 39
| 31.333333
| 0.945122
| 0
| 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
| 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
| 6
|
ea4f94dc62eb152286ddb45f21d8cbc92ac2d88f
| 1,697
|
py
|
Python
|
sample_data/make_sample_data.py
|
mhernan88/reshape_tools
|
e08de72629079457f4194a8a14dbb8641b5b0a13
|
[
"MIT"
] | null | null | null |
sample_data/make_sample_data.py
|
mhernan88/reshape_tools
|
e08de72629079457f4194a8a14dbb8641b5b0a13
|
[
"MIT"
] | null | null | null |
sample_data/make_sample_data.py
|
mhernan88/reshape_tools
|
e08de72629079457f4194a8a14dbb8641b5b0a13
|
[
"MIT"
] | null | null | null |
import pandas as pd
from datetime import datetime
def sample_data1() -> pd.DataFrame:
times = [
datetime(year=2020, month=11, day=1),
datetime(year=2020, month=11, day=2),
datetime(year=2020, month=11, day=3),
datetime(year=2020, month=11, day=4),
datetime(year=2020, month=11, day=5),
datetime(year=2020, month=12, day=6),
datetime(year=2020, month=12, day=7),
datetime(year=2020, month=12, day=8),
datetime(year=2020, month=12, day=9),
datetime(year=2020, month=12, day=10),
]
val1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
val2 = [20, 40, 60, 80, 100, 120, 140, 160, 180, 200]
out = pd.DataFrame({"times": times, "val1": val1, "val2": val2})
out["times"] = (out["times"] - datetime(1970, 1, 1)).dt.total_seconds()
return out
def sample_data2() -> pd.DataFrame:
times = [
datetime(year=2020, month=11, day=1, hour=8),
datetime(year=2020, month=11, day=1, hour=9),
datetime(year=2020, month=11, day=1, hour=10),
datetime(year=2020, month=11, day=1, hour=11),
datetime(year=2020, month=11, day=1, hour=12),
datetime(year=2020, month=11, day=2, hour=8),
datetime(year=2020, month=11, day=2, hour=9),
datetime(year=2020, month=11, day=2, hour=10),
datetime(year=2020, month=11, day=2, hour=11),
datetime(year=2020, month=11, day=2, hour=12),
]
val1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
val2 = [20, 40, 60, 80, 100, 120, 140, 160, 180, 200]
out = pd.DataFrame({"times": times, "val1": val1, "val2": val2})
out["times"] = (out["times"] - datetime(1970, 1, 1)).dt.total_seconds()
return out
| 37.711111
| 75
| 0.5769
| 268
| 1,697
| 3.63806
| 0.175373
| 0.246154
| 0.328205
| 0.430769
| 0.916923
| 0.914872
| 0.701538
| 0.673846
| 0.371282
| 0.371282
| 0
| 0.197845
| 0.234532
| 1,697
| 44
| 76
| 38.568182
| 0.552733
| 0
| 0
| 0.315789
| 0
| 0
| 0.027107
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.052632
| false
| 0
| 0.052632
| 0
| 0.157895
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 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
| 6
|
ea93a4863758bc25492b7cc4b0d277a031dd4e69
| 427
|
py
|
Python
|
Python/Tutorial - 3/check.py
|
JC2295/FCC_Tutorial_Projects
|
990e1221b2177acb9e4db0264adab518620404a0
|
[
"MIT"
] | null | null | null |
Python/Tutorial - 3/check.py
|
JC2295/FCC_Tutorial_Projects
|
990e1221b2177acb9e4db0264adab518620404a0
|
[
"MIT"
] | null | null | null |
Python/Tutorial - 3/check.py
|
JC2295/FCC_Tutorial_Projects
|
990e1221b2177acb9e4db0264adab518620404a0
|
[
"MIT"
] | null | null | null |
x = float(input("Enter Number: "))
if(x % 2) == 0 and x > 0:
print("The number you entered is positive and even.")
elif(x % 2) == 0 and x < 0:
print("The number you entered is negative and even.")
elif(x % 2) != 0 and x > 0:
print("The number you entered is positive and odd.")
elif(x % 2) != 0 and x < 0:
print("The number you entered is negative and odd.")
else:
print("Please enter a non zero number.")
| 32.846154
| 57
| 0.618267
| 77
| 427
| 3.428571
| 0.311688
| 0.030303
| 0.045455
| 0.090909
| 0.757576
| 0.757576
| 0.757576
| 0.757576
| 0.757576
| 0.757576
| 0
| 0.03681
| 0.236534
| 427
| 12
| 58
| 35.583333
| 0.773006
| 0
| 0
| 0
| 0
| 0
| 0.512881
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.454545
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 1
|
0
| 6
|
577688ba8ec27db2c2499b1d093cb54fc4a94c4c
| 71
|
py
|
Python
|
Server/app/schema/utils/__init__.py
|
Team-SeeTo/SeeTo-Backend
|
19990cd6f4895e773eaa504f7b7a07ddbb5856e5
|
[
"Apache-2.0"
] | 4
|
2018-06-18T06:50:12.000Z
|
2018-11-15T00:08:24.000Z
|
Server/app/schema/utils/__init__.py
|
Team-SeeTo/SeeTo-Backend
|
19990cd6f4895e773eaa504f7b7a07ddbb5856e5
|
[
"Apache-2.0"
] | null | null | null |
Server/app/schema/utils/__init__.py
|
Team-SeeTo/SeeTo-Backend
|
19990cd6f4895e773eaa504f7b7a07ddbb5856e5
|
[
"Apache-2.0"
] | null | null | null |
from .activity_logger import idea_activity_logger, todo_activity_logger
| 71
| 71
| 0.915493
| 10
| 71
| 6
| 0.6
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056338
| 71
| 1
| 71
| 71
| 0.895522
| 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
| 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
| 6
|
57a3a8a709c11a11c55c20bbf889cce49b9d06df
| 223
|
py
|
Python
|
adjutant-plugin/mfa_views/models.py
|
catalyst-cloud/adjutant-mfa
|
d9e99dd006a895ca33b840e7d92bc5107ec4ba8d
|
[
"Apache-2.0"
] | 2
|
2018-02-15T12:56:05.000Z
|
2018-03-10T09:45:08.000Z
|
adjutant-plugin/mfa_views/models.py
|
catalyst-cloud/adjutant-mfa
|
d9e99dd006a895ca33b840e7d92bc5107ec4ba8d
|
[
"Apache-2.0"
] | 1
|
2018-05-24T23:08:17.000Z
|
2018-05-24T23:08:17.000Z
|
adjutant-plugin/mfa_views/models.py
|
catalyst-cloud/adjutant-mfa
|
d9e99dd006a895ca33b840e7d92bc5107ec4ba8d
|
[
"Apache-2.0"
] | 3
|
2018-02-09T03:27:43.000Z
|
2018-07-02T10:45:35.000Z
|
from adjutant.api.v1.models import register_taskview_class
from mfa_views import views
register_taskview_class(r'^openstack/edit-mfa/?$', views.EditMFA)
register_taskview_class(r'^openstack/users/?$', views.UserListMFA)
| 27.875
| 66
| 0.816143
| 31
| 223
| 5.645161
| 0.548387
| 0.274286
| 0.36
| 0.251429
| 0.354286
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004808
| 0.067265
| 223
| 7
| 67
| 31.857143
| 0.836538
| 0
| 0
| 0
| 0
| 0
| 0.184685
| 0.099099
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 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
| 0
| 0
|
0
| 6
|
57bd96ec29c38dc1f3e044540afbb8ecbffccd50
| 106
|
py
|
Python
|
dogpile/__init__.py
|
dhellmann/dogpile.cache
|
03cbee8b9a812a78a37fe1d54edafe848f696737
|
[
"MIT"
] | null | null | null |
dogpile/__init__.py
|
dhellmann/dogpile.cache
|
03cbee8b9a812a78a37fe1d54edafe848f696737
|
[
"MIT"
] | null | null | null |
dogpile/__init__.py
|
dhellmann/dogpile.cache
|
03cbee8b9a812a78a37fe1d54edafe848f696737
|
[
"MIT"
] | null | null | null |
__version__ = '0.9.3'
from .lock import Lock # noqa
from .lock import NeedRegenerationException # noqa
| 21.2
| 51
| 0.745283
| 14
| 106
| 5.357143
| 0.642857
| 0.213333
| 0.373333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034091
| 0.169811
| 106
| 4
| 52
| 26.5
| 0.818182
| 0.084906
| 0
| 0
| 0
| 0
| 0.053191
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
17f4968f43abac4e2306cd72253ba000d15a0329
| 49
|
py
|
Python
|
bitswap/block_storage/__init__.py
|
VladislavSufyanov/py-bitswap
|
875d15944e485c33b16af9965f24c1d85cb34c55
|
[
"MIT"
] | null | null | null |
bitswap/block_storage/__init__.py
|
VladislavSufyanov/py-bitswap
|
875d15944e485c33b16af9965f24c1d85cb34c55
|
[
"MIT"
] | null | null | null |
bitswap/block_storage/__init__.py
|
VladislavSufyanov/py-bitswap
|
875d15944e485c33b16af9965f24c1d85cb34c55
|
[
"MIT"
] | null | null | null |
from .base_block_storage import BaseBlockStorage
| 24.5
| 48
| 0.897959
| 6
| 49
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 49
| 1
| 49
| 49
| 0.933333
| 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
| 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
| 6
|
aa177fa6cb0e8f56b34cd0aa79227c8c06214fe1
| 85
|
py
|
Python
|
src/lib/__init__.py
|
nekoffski/bachelor-thesis
|
23f350e2c5e0a184620bf66f851be6e94df7cdbb
|
[
"MIT"
] | 2
|
2021-08-09T09:00:34.000Z
|
2021-08-20T09:31:00.000Z
|
src/lib/__init__.py
|
nekoffski/bachelor-thesis
|
23f350e2c5e0a184620bf66f851be6e94df7cdbb
|
[
"MIT"
] | null | null | null |
src/lib/__init__.py
|
nekoffski/bachelor-thesis
|
23f350e2c5e0a184620bf66f851be6e94df7cdbb
|
[
"MIT"
] | null | null | null |
from .cvision import *
from .models import *
from .net import *
from .util import *
| 14.166667
| 22
| 0.705882
| 12
| 85
| 5
| 0.5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 85
| 5
| 23
| 17
| 0.882353
| 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
| 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
| 6
|
aa1c025ad6114c52c33a5057e8bad9a15f3be813
| 10,790
|
py
|
Python
|
yemek.py
|
raydingoz/cerrahapp
|
81a242dcf20d525f44a54f025414e9e8775caa37
|
[
"MIT"
] | 2
|
2017-12-14T10:30:45.000Z
|
2022-01-11T19:19:33.000Z
|
yemek.py
|
raydingoz/cerrahapp
|
81a242dcf20d525f44a54f025414e9e8775caa37
|
[
"MIT"
] | null | null | null |
yemek.py
|
raydingoz/cerrahapp
|
81a242dcf20d525f44a54f025414e9e8775caa37
|
[
"MIT"
] | null | null | null |
##bu python kodu, selenium ve chromedriver ile çalışmakta, siteyi normal kullanıcı gibi ziyaret edip, gerekli verileri parse ediyor
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import os
from bs4 import BeautifulSoup
import time, datetime
import json
import requests
import sys
import ftplib
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--window-size=1920x1080")
chrome_driver = os.getcwd() +"\\chromedriver.exe"
browser = webdriver.Chrome(chrome_options=chrome_options, executable_path=chrome_driver) #replace with .Firefox(), or with the browser of your choice
url = "http://sks.istanbulc.edu.tr/tr/yemeklistesi"
browser.get(url) #navigate to the page
time.sleep(10)
kah_buton = browser.find_element_by_xpath('//*[@id="4E00590053005F006D004C00500035005500720059003100"]/div/div/div[2]/ul/li[1]')
ogle_buton = browser.find_element_by_xpath('//*[@id="4E00590053005F006D004C00500035005500720059003100"]/div/div/div[2]/ul/li[2]')
#aksam_buton = browser.find_element_by_xpath('//*[@id="4E00590053005F006D004C00500035005500720059003100"]/div/div/div[2]/ul/li[3]')
vegan_buton = browser.find_element_by_xpath('//*[@id="4E00590053005F006D004C00500035005500720059003100"]/div/div/div[2]/ul/li[6]')
kumanya_buton = browser.find_element_by_xpath('//*[@id="4E00590053005F006D004C00500035005500720059003100"]/div/div/div[2]/ul/li[4]')
son = {}
son["yemek_liste"] = []
def kah_json_olustur():
time.sleep(5)
kah = browser.find_element_by_id("tab-kahvalti")
bs = BeautifulSoup(kah.get_attribute('innerHTML'), "lxml")
bs2 = bs.find_all('table')
js = []
for h in bs2:
b = h.find_all('tr')
try:
yemek1 = b[1].text.split('\n')[2]
except:
yemek1="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek2 = b[1].text.split('\n')[3]
except:
yemek2="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek3 = b[1].text.split('\n')[4]
except:
yemek3="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek4 = b[1].text.split('\n')[5]
except:
yemek4="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
calori = b[2].text.replace("\n", "")
except:
calori="---"
print("Oops!", sys.exc_info()[0], "occured.")
if yemek1 == "":
yemek1 = "---"
if yemek2 == "":
yemek2 = "---"
if yemek3 == "":
yemek3 = "---"
if yemek4 == "":
yemek4 = "---"
dt = datetime.datetime.strptime(b[0].text.replace("\n", ""), '%d.%m.%Y')
dt = dt.strftime('%Y-%m-%d %H:%M:%S')
ta = {"tarih": dt,"ogun":"Kahvaltı","yemek1":yemek1,"yemek2":yemek2,"yemek3":yemek3,"yemek4":yemek4,"calori":calori }
son["yemek_liste"].append(ta)
def ogle_json_olustur():
time.sleep(5)
kah = browser.find_element_by_id("tab-ogle")
bs = BeautifulSoup(kah.get_attribute('innerHTML'), "lxml")
bs2 = bs.find_all('table')
js = []
for h in bs2:
b = h.find_all('tr')
try:
yemek1 = b[1].text.split('\n')[1]
except:
yemek1="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek2 = b[1].text.split('\n')[2]
except:
yemek2="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek3 = b[1].text.split('\n')[3]
except:
yemek3="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek4 = b[1].text.split('\n')[4]
except:
yemek4="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
calori = b[2].text.replace("\n", "")
except:
calori="---"
print("Oops!", sys.exc_info()[0], "occured.")
dt = datetime.datetime.strptime(b[0].text.replace("\n", ""), '%d.%m.%Y')
dt = dt.strftime('%Y-%m-%d %H:%M:%S')
if yemek1 == "":
yemek1 = "---"
if yemek2 == "":
yemek2 = "---"
if yemek3 == "":
yemek3 = "---"
if yemek4 == "":
yemek4 = "---"
ta = {"tarih": dt,"ogun":"Öğle Yemeği","yemek1":yemek1,"yemek2":yemek2,"yemek3":yemek3,"yemek4":yemek4,"calori":calori}
son["yemek_liste"].append(ta)
def aksam_json_olustur():
time.sleep(5)
kah = browser.find_element_by_id("tab-ogle")
bs = BeautifulSoup(kah.get_attribute('innerHTML'), "lxml")
bs2 = bs.find_all('table')
js = []
for h in bs2:
b = h.find_all('tr')
try:
yemek1 = b[1].text.split('\n')[1]
except:
yemek1="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek2 = b[1].text.split('\n')[2]
except:
yemek2="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek3 = b[1].text.split('\n')[3]
except:
yemek3="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek4 = b[1].text.split('\n')[4]
except:
yemek4="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
calori = b[2].text.replace("\n", "")
except:
calori="---"
print("Oops!", sys.exc_info()[0], "occured.")
if yemek1 == "":
yemek1 = "---"
if yemek2 == "":
yemek2 = "---"
if yemek3 == "":
yemek3 = "---"
if yemek4 == "":
yemek4 = "---"
dt = datetime.datetime.strptime(b[0].text.replace("\n", ""), '%d.%m.%Y')
dt = dt.strftime('%Y-%m-%d %H:%M:%S')
ta = {"tarih": dt,"ogun":"Akşam Yemeği","yemek1":yemek1,"yemek2":yemek2,"yemek3":yemek3,"yemek4":yemek4,"calori": calori}
son["yemek_liste"].append(ta)
def vegan_json_olustur():
time.sleep(5)
kah = browser.find_element_by_id("tab-vegan")
bs = BeautifulSoup(kah.get_attribute('innerHTML'), "lxml")
bs2 = bs.find_all('table')
for h in bs2:
b = h.find_all('tr')
try:
yemek1 = b[1].text.split('\n')[1]
except:
yemek1="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek2 = b[1].text.split('\n')[2]
except:
yemek2="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek3 = b[1].text.split('\n')[3]
except:
yemek3="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek4 = b[1].text.split('\n')[4]
except:
yemek4="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
calori = b[2].text.replace("\n", "")
except:
calori="---"
print("Oops!", sys.exc_info()[0], "occured.")
if yemek1 == "":
yemek1 = "---"
if yemek2 == "":
yemek2 = "---"
if yemek3 == "":
yemek3 = "---"
if yemek4 == "":
yemek4 = "---"
dt = datetime.datetime.strptime(b[0].text.replace("\n", ""), '%d.%m.%Y')
dt = dt.strftime('%Y-%m-%d %H:%M:%S')
ta = {"tarih": dt,"ogun":"Vegan","yemek1":yemek1,"yemek2":yemek2,"yemek3":yemek3,"yemek4":yemek4,"calori": calori}
son["yemek_liste"].append(ta)
def kumanya_json_olustur():
time.sleep(5)
kah = browser.find_element_by_id("tab-kumanya")
bs = BeautifulSoup(kah.get_attribute('innerHTML'), "lxml")
bs2 = bs.find_all('table')
for h in bs2:
b = h.find_all('tr')
try:
yemek1 = b[1].text.split('\n')[1]
except:
yemek1="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek2 = b[1].text.split('\n')[2]
except:
yemek2="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek3 = b[1].text.split('\n')[3]
except:
yemek3="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
yemek4 = b[1].text.split('\n')[4]
except:
yemek4="---"
print("Oops!", sys.exc_info()[0], "occured.")
try:
calori = b[2].text.replace("\n", "")
except:
calori="---"
print("Oops!", sys.exc_info()[0], "occured.")
if yemek1 == "":
yemek1 = "---"
if yemek2 == "":
yemek2 = "---"
if yemek3 == "":
yemek3 = "---"
if yemek4 == "":
yemek4 = "---"
dt = datetime.datetime.strptime(b[0].text.replace("\n", ""), '%d.%m.%Y')
dt = dt.strftime('%Y-%m-%d %H:%M:%S')
ta = {"tarih": dt,"ogun":"Öğle Yemeği","yemek1":yemek1,"yemek2":yemek2,"yemek3":yemek3,"yemek4":yemek4,"calori": calori}
son["yemek_liste"].append(ta)
def dosya_olsutur():
with open('yemek.json', 'w') as outfile:
json.dump(son, outfile)
def mysql_isleri():
requests.get("*****")
def ftp_yukle():
print("----------------")
print(" ")
print("ftp deneniyor...")
import ftplib
ftp = ftplib.FTP()
host = "****"
port = 21
ftp.connect(host, port)
print(ftp.getwelcome())
File2Send = "yemek.json"
Output_Directory = "//****//"
try:
print("Giriş Yapılıyor...")
ftp.login("****", "****")
time.sleep(6)
mysql_isleri()
print("Başarılı")
except Exception as e:
print(e)
try:
file = open('yemek.json', 'rb') # file to send
ftp.storbinary('STOR yemek.json', file) # send the file
except Exception as e:
print(e)
ftp.quit()
print(" ")
print("----------------")
def sonuc():
dosya_olsutur()
ftp_yukle()
try:
kah_buton.click()
kah_json_olustur()
except:
print("Kahvaltı oluşturalamadı", sys.exc_info()[0])
try:
ogle_buton.click()
ogle_json_olustur()
except:
print("Öğle oluşturalamadı", sys.exc_info()[0])
try:
ogle_buton.click()
aksam_json_olustur()
except:
print("Akşam oluşturalamadı", sys.exc_info()[0])
try:
vegan_buton.click()
vegan_json_olustur()
except:
print("Vegan oluşturalamadı", sys.exc_info()[0])
try:
kumanya_buton.click()
kumanya_json_olustur()
except:
print("Kumanya oluşturalamadı", sys.exc_info()[0])
browser.close()
print(json.dumps(son))
print("-------------")
sonuc()
time.sleep(5)
mysql_isleri()
print("-----Güncelleme Bitti----")
| 29.80663
| 149
| 0.510843
| 1,252
| 10,790
| 4.299521
| 0.140575
| 0.033439
| 0.055731
| 0.061304
| 0.73695
| 0.732305
| 0.712985
| 0.712428
| 0.712428
| 0.696823
| 0
| 0.059669
| 0.283967
| 10,790
| 361
| 150
| 29.889197
| 0.63707
| 0.03392
| 0
| 0.748408
| 0
| 0
| 0.174589
| 0.034092
| 0
| 0
| 0
| 0
| 0
| 1
| 0.028662
| false
| 0
| 0.031847
| 0
| 0.06051
| 0.136943
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 6
|
aa23ed79c757b361839b4005aa702d809d5ea5a0
| 43
|
py
|
Python
|
Very Easy/hello.py
|
Maverick-cmd/Python-Practice
|
4dc3f1eb5d633e20057052531cfc6e04772bc061
|
[
"MIT"
] | null | null | null |
Very Easy/hello.py
|
Maverick-cmd/Python-Practice
|
4dc3f1eb5d633e20057052531cfc6e04772bc061
|
[
"MIT"
] | null | null | null |
Very Easy/hello.py
|
Maverick-cmd/Python-Practice
|
4dc3f1eb5d633e20057052531cfc6e04772bc061
|
[
"MIT"
] | null | null | null |
def hello():
return "hello edabit.com"
| 14.333333
| 29
| 0.651163
| 6
| 43
| 4.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.209302
| 43
| 2
| 30
| 21.5
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0.372093
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0.5
| 1
| 0
| 1
| 1
| 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
| 0
| 1
| 0
| 0
|
0
| 6
|
aa282f1ac7388b3707ced3a023f5c1233c6cf501
| 156
|
py
|
Python
|
tests/middlewares/__init__.py
|
caputomarcos/mongorest
|
57d6b28d75e18afed5cef7160522958153b5be15
|
[
"BSD-3-Clause"
] | 16
|
2015-04-18T02:51:09.000Z
|
2020-12-15T18:05:16.000Z
|
tests/middlewares/__init__.py
|
caputomarcos/mongorest
|
57d6b28d75e18afed5cef7160522958153b5be15
|
[
"BSD-3-Clause"
] | 8
|
2015-11-24T23:06:03.000Z
|
2016-07-21T17:57:59.000Z
|
tests/middlewares/__init__.py
|
caputomarcos/mongorest
|
57d6b28d75e18afed5cef7160522958153b5be15
|
[
"BSD-3-Clause"
] | 2
|
2015-12-04T13:45:32.000Z
|
2016-06-11T13:44:53.000Z
|
# -*- encoding: UTF-8 -*-
from __future__ import absolute_import, unicode_literals
from .authentication_middleware import *
from .cors_middleware import *
| 26
| 56
| 0.788462
| 18
| 156
| 6.388889
| 0.666667
| 0.278261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007299
| 0.121795
| 156
| 5
| 57
| 31.2
| 0.832117
| 0.147436
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
a4ea59238b7b0825e3fc20672e4667b0dd688bec
| 165
|
py
|
Python
|
fnss/traffic/__init__.py
|
brucespang/fnss
|
8e1d95744347afa77383092e6f144980d84e222d
|
[
"BSD-2-Clause"
] | 114
|
2015-01-19T14:15:07.000Z
|
2022-02-22T01:47:19.000Z
|
fnss/traffic/__init__.py
|
brucespang/fnss
|
8e1d95744347afa77383092e6f144980d84e222d
|
[
"BSD-2-Clause"
] | 15
|
2016-02-11T09:09:02.000Z
|
2021-04-05T12:57:09.000Z
|
fnss/traffic/__init__.py
|
brucespang/fnss
|
8e1d95744347afa77383092e6f144980d84e222d
|
[
"BSD-2-Clause"
] | 36
|
2015-02-08T12:28:04.000Z
|
2021-11-19T06:08:17.000Z
|
"""Tools for creating and manipulating event schedules and traffic matrices"""
from fnss.traffic.eventscheduling import *
from fnss.traffic.trafficmatrices import *
| 41.25
| 78
| 0.818182
| 20
| 165
| 6.75
| 0.7
| 0.118519
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109091
| 165
| 3
| 79
| 55
| 0.918367
| 0.436364
| 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
| 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
| 6
|
354a546386259b039381e2eef2517c0b0f0d4c22
| 150
|
py
|
Python
|
pyomt5/api/__init__.py
|
paulorodriguesxv/pyomt5
|
9287395f9f72b049c945e625e3b75c491ae50407
|
[
"MIT"
] | 8
|
2019-09-06T02:44:04.000Z
|
2021-07-08T04:10:11.000Z
|
pyomt5/api/__init__.py
|
dausech/pyomt5
|
691dbf7b9732728425e57a7b9055d971838c5c4d
|
[
"MIT"
] | null | null | null |
pyomt5/api/__init__.py
|
dausech/pyomt5
|
691dbf7b9732728425e57a7b9055d971838c5c4d
|
[
"MIT"
] | 2
|
2019-09-10T16:41:16.000Z
|
2020-10-14T13:49:33.000Z
|
from .metatradercom import (MetatraderCom, ConnectionTimeoutError,
DataNotFoundError)
from .timeframe import MT5TimeFrame
| 37.5
| 66
| 0.706667
| 10
| 150
| 10.6
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008929
| 0.253333
| 150
| 3
| 67
| 50
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 1
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 6
|
103fc50711d0b0de84f01f2724705c3318868eda
| 273
|
py
|
Python
|
src/aijack/attack/inversion/__init__.py
|
luoshenseeker/AIJack
|
4e871a5b3beb4b7c976d38060d6956efcebf880d
|
[
"MIT"
] | 1
|
2022-03-17T21:17:44.000Z
|
2022-03-17T21:17:44.000Z
|
src/aijack/attack/inversion/__init__.py
|
luoshenseeker/AIJack
|
4e871a5b3beb4b7c976d38060d6956efcebf880d
|
[
"MIT"
] | null | null | null |
src/aijack/attack/inversion/__init__.py
|
luoshenseeker/AIJack
|
4e871a5b3beb4b7c976d38060d6956efcebf880d
|
[
"MIT"
] | 1
|
2022-03-17T21:17:46.000Z
|
2022-03-17T21:17:46.000Z
|
from .gan_attack import GAN_Attack # noqa: F401
from .generator_attack import Generator_Attack # noqa: F401
from .gradientinversion import GradientInversion_Attack # noqa: F401
from .mi_face import MI_FACE # noqa: F401
from .utils import DataRepExtractor # noqa: F401
| 45.5
| 69
| 0.798535
| 37
| 273
| 5.702703
| 0.324324
| 0.189573
| 0.227488
| 0.255924
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064378
| 0.14652
| 273
| 5
| 70
| 54.6
| 0.841202
| 0.197802
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 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
| 6
|
1071230a1f43893cad26a92ac7143ffa8a21a932
| 47
|
py
|
Python
|
Lesson5/srez.py
|
shinkai-tester/python_beginner
|
a934328c9a50241cc3f02a423060e16aab53b425
|
[
"Apache-2.0"
] | 2
|
2021-06-01T13:24:04.000Z
|
2021-06-01T13:27:47.000Z
|
Lesson5/srez.py
|
shinkai-tester/python_beginner
|
a934328c9a50241cc3f02a423060e16aab53b425
|
[
"Apache-2.0"
] | null | null | null |
Lesson5/srez.py
|
shinkai-tester/python_beginner
|
a934328c9a50241cc3f02a423060e16aab53b425
|
[
"Apache-2.0"
] | null | null | null |
a = [1, 2, 3, 4, 5]
b = a[:3]
print(b)
print(a)
| 11.75
| 19
| 0.446809
| 13
| 47
| 1.615385
| 0.615385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0.234043
| 47
| 4
| 20
| 11.75
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 6
|
10a46c5b25f3ebf58bddf11dc9dfc17dcf31469d
| 8,540
|
py
|
Python
|
tests/ocr/test_suggestion_medication_administration.py
|
lifeomic/phc-sdk-py
|
51709c1c2f129a3fbe336a44e4d501ae0249859e
|
[
"MIT"
] | 1
|
2020-07-22T12:46:58.000Z
|
2020-07-22T12:46:58.000Z
|
tests/ocr/test_suggestion_medication_administration.py
|
lifeomic/phc-sdk-py
|
51709c1c2f129a3fbe336a44e4d501ae0249859e
|
[
"MIT"
] | 54
|
2019-10-09T16:19:04.000Z
|
2022-01-19T20:28:59.000Z
|
tests/ocr/test_suggestion_medication_administration.py
|
lifeomic/phc-sdk-py
|
51709c1c2f129a3fbe336a44e4d501ae0249859e
|
[
"MIT"
] | 2
|
2019-10-30T19:54:43.000Z
|
2020-12-03T18:57:15.000Z
|
import pandas as pd
from phc.easy.ocr.suggestion import (expand_array_column,
expand_medication_administrations,
frame_for_type)
sample = expand_array_column(
pd.DataFrame(
[
{
"suggestions": [
{
"id": "728e79cd-6cd2-421f-9e38-3181200c301",
"condition": {
"conditionCode": [],
"onsetDate": [],
"abatementDate": [],
"bodySite": [],
},
"observation": {},
"medicationAdministration": {
"medicationCode": [
{
"value": {
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "3640",
"display": "doxycycline",
},
"dataSource": {"source": "comprehend"},
"confidence": 0.996650755405426,
"sourceText": {
"text": "doxycycline",
"location": {
"startIndex": 11,
"endIndex": 22,
},
},
}
],
"date": [],
"endDate": [],
"status": [
{
"value": "unknown",
"dataSource": {"source": "comprehend"},
"confidence": 0.9,
},
{
"value": "completed",
"dataSource": {"source": "comprehend"},
"confidence": 0.9,
},
{
"value": "in-progress",
"dataSource": {"source": "comprehend"},
"confidence": 0.9,
},
],
"dosage": [
{
"value": {
"id": "0",
"strength": None,
"dosage": None,
"duration": None,
"form": None,
"frequencey": None,
"rate": None,
"route": "po",
},
"dataSource": {"source": "comprehend"},
"confidence": 0.996650755405426,
"sourceText": {
"text": "po",
"location": {
"startIndex": 23,
"endIndex": 25,
},
},
}
],
},
}
],
"anchorDate": "2021-02-24T12:58:32.058Z",
"version": 4,
"suggestionId": "00022-00007-00001",
}
]
),
key="suggestions",
)
def test_medication_administration_expansion():
df = expand_medication_administrations(
frame_for_type(sample, "medicationAdministration")
)
pd.testing.assert_frame_equal(
df,
pd.DataFrame(
[
{
"anchorDate": "2021-02-24T12:58:32.058Z",
"version": 4,
"suggestionId": "00022-00007-00001",
"id": "728e79cd-6cd2-421f-9e38-3181200c301",
"status_value": "unknown",
"status_confidence": 0.9,
"status_dataSource_source": "comprehend",
"dosage_confidence": 0.996650755405426,
"dosage_dataSource_source": "comprehend",
"dosage_value_id": "0",
"dosage_value_strength": None,
"dosage_value_dosage": None,
"dosage_value_duration": None,
"dosage_value_form": None,
"dosage_value_frequencey": None,
"dosage_value_rate": None,
"dosage_value_route": "po",
"code_confidence": 0.996650755405426,
"code_dataSource_source": "comprehend",
"code_value_system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code_value_code": "3640",
"code_value_display": "doxycycline",
"dosage_sourceText": "po",
"code_sourceText": "doxycycline",
"type": "medicationAdministration",
},
{
"anchorDate": "2021-02-24T12:58:32.058Z",
"version": 4,
"suggestionId": "00022-00007-00001",
"id": "728e79cd-6cd2-421f-9e38-3181200c301",
"status_value": "completed",
"status_confidence": 0.9,
"status_dataSource_source": "comprehend",
"dosage_confidence": 0.996650755405426,
"dosage_dataSource_source": "comprehend",
"dosage_value_id": "0",
"dosage_value_strength": None,
"dosage_value_dosage": None,
"dosage_value_duration": None,
"dosage_value_form": None,
"dosage_value_frequencey": None,
"dosage_value_rate": None,
"dosage_value_route": "po",
"code_confidence": 0.996650755405426,
"code_dataSource_source": "comprehend",
"code_value_system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code_value_code": "3640",
"code_value_display": "doxycycline",
"dosage_sourceText": "po",
"code_sourceText": "doxycycline",
"type": "medicationAdministration",
},
{
"anchorDate": "2021-02-24T12:58:32.058Z",
"version": 4,
"suggestionId": "00022-00007-00001",
"id": "728e79cd-6cd2-421f-9e38-3181200c301",
"status_value": "in-progress",
"status_confidence": 0.9,
"status_dataSource_source": "comprehend",
"dosage_confidence": 0.996650755405426,
"dosage_dataSource_source": "comprehend",
"dosage_value_id": "0",
"dosage_value_strength": None,
"dosage_value_dosage": None,
"dosage_value_duration": None,
"dosage_value_form": None,
"dosage_value_frequencey": None,
"dosage_value_rate": None,
"dosage_value_route": "po",
"code_confidence": 0.996650755405426,
"code_dataSource_source": "comprehend",
"code_value_system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code_value_code": "3640",
"code_value_display": "doxycycline",
"dosage_sourceText": "po",
"code_sourceText": "doxycycline",
"type": "medicationAdministration",
},
]
),
)
| 45.668449
| 96
| 0.353396
| 481
| 8,540
| 6.027027
| 0.212058
| 0.09486
| 0.093136
| 0.06623
| 0.801656
| 0.801656
| 0.777165
| 0.713694
| 0.668161
| 0.668161
| 0
| 0.100953
| 0.545316
| 8,540
| 186
| 97
| 45.913978
| 0.645635
| 0
| 0
| 0.549451
| 0
| 0
| 0.300117
| 0.08911
| 0
| 0
| 0
| 0
| 0.005495
| 1
| 0.005495
| false
| 0
| 0.010989
| 0
| 0.016484
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 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
| 6
|
10ae75ed502594e92857e84f0c648a364231335c
| 158
|
py
|
Python
|
ISA/Util/__init__.py
|
tumido/FIT-VUT-projects
|
0e23c38a11d0aee55921e15b8865256efddefc53
|
[
"BSD-2-Clause"
] | null | null | null |
ISA/Util/__init__.py
|
tumido/FIT-VUT-projects
|
0e23c38a11d0aee55921e15b8865256efddefc53
|
[
"BSD-2-Clause"
] | null | null | null |
ISA/Util/__init__.py
|
tumido/FIT-VUT-projects
|
0e23c38a11d0aee55921e15b8865256efddefc53
|
[
"BSD-2-Clause"
] | 3
|
2015-05-16T00:29:59.000Z
|
2021-02-03T00:31:16.000Z
|
from .Announce import get_announce, announce_to_txt
from .Torrent import get_torrent_file, parse_torrent_file
from .Tracker import get_peerlist, save_peerlist
| 52.666667
| 57
| 0.873418
| 24
| 158
| 5.375
| 0.5
| 0.209302
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088608
| 158
| 3
| 58
| 52.666667
| 0.895833
| 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
| 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
| 6
|
52b9eddf6573e3f16266c439e6b72ad18cdb718c
| 24
|
py
|
Python
|
__init__.py
|
yuta-hi/chainer_extensions
|
f0dbc898623c25251aa0820bfda8417e9edced6a
|
[
"MIT"
] | 1
|
2020-01-23T10:15:53.000Z
|
2020-01-23T10:15:53.000Z
|
__init__.py
|
yuta-hi/chainer_extensions
|
f0dbc898623c25251aa0820bfda8417e9edced6a
|
[
"MIT"
] | null | null | null |
__init__.py
|
yuta-hi/chainer_extensions
|
f0dbc898623c25251aa0820bfda8417e9edced6a
|
[
"MIT"
] | null | null | null |
from . import extensions
| 24
| 24
| 0.833333
| 3
| 24
| 6.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 24
| 1
| 24
| 24
| 0.952381
| 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
| 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
| 6
|
eaae12f421ef051bdaca1bac1d8f9528a09f72e1
| 4,036
|
py
|
Python
|
tests/nn/softmax_test.py
|
kbrodt/tor4
|
d09740b746c534e67a72f492c7c03654f5888a46
|
[
"MIT"
] | null | null | null |
tests/nn/softmax_test.py
|
kbrodt/tor4
|
d09740b746c534e67a72f492c7c03654f5888a46
|
[
"MIT"
] | null | null | null |
tests/nn/softmax_test.py
|
kbrodt/tor4
|
d09740b746c534e67a72f492c7c03654f5888a46
|
[
"MIT"
] | null | null | null |
import numpy as np
import tor4
import tor4.nn as nn
def test_softmax():
a = tor4.tensor(data=[0, 0, 0.0])
a_sm = nn.functional.softmax(a, dim=0)
assert not a_sm.requires_grad
assert a_sm.tolist() == [1 / 3, 1 / 3, 1 / 3]
def test_softmax2():
a = tor4.tensor(data=[[0, 0, 0], [0, 0, 0.0]])
a_sm0 = nn.functional.softmax(a, dim=0)
a_sm1 = nn.functional.softmax(a, dim=1)
assert not a_sm0.requires_grad
assert a_sm0.tolist() == [[1 / 2, 1 / 2, 1 / 2], [1 / 2, 1 / 2, 1 / 2]]
assert not a_sm1.requires_grad
assert a_sm1.tolist() == [[1 / 3, 1 / 3, 1 / 3], [1 / 3, 1 / 3, 1 / 3]]
def test_softmax_backward():
a = tor4.tensor(data=[0, 0, 0.0], requires_grad=True)
a_sm = nn.functional.softmax(a, dim=-1)
a_sm.backward(tor4.tensor([1, 1, 1.0]))
assert a_sm.requires_grad
assert a_sm.tolist() == [1 / 3, 1 / 3, 1 / 3]
assert a.grad.tolist() == [0, 0, 0]
def test_softmax_backward2():
a = tor4.tensor(data=[0, 0, 0.0], requires_grad=True)
a_sm = nn.functional.softmax(a, dim=-1)
a_sm.backward(tor4.tensor([0, 1, -1.0]))
assert a_sm.requires_grad
assert a_sm.tolist() == [1 / 3, 1 / 3, 1 / 3]
assert a.grad.tolist() == [0, 1 / 3, -1 / 3]
def test_softmax2d_backward():
a = tor4.tensor(data=[[0, 1, -1.0], [1, -2, 3]], requires_grad=True)
a_sm = nn.functional.softmax(a, dim=-1)
a_sm.backward(tor4.tensor([[1, 1, 1.0], [1, 1, 1]]))
assert a_sm.requires_grad
assert np.allclose(
a_sm.tolist(),
[[0.2447, 0.6652, 0.09], [0.1185, 0.0059, 0.8756]],
atol=1e-4,
rtol=1e-4,
)
assert np.allclose(a.grad.tolist(), [[0, 0, 0], [0, 0, 0]])
def test_softmax2d_backward2():
a = tor4.tensor(data=[[0, 1, -1.0], [1, -2, 3]], requires_grad=True)
a_sm = nn.functional.softmax(a, dim=0)
a_sm.backward(tor4.tensor([[1, 1, 1.0], [1, 1, 1]]))
assert a_sm.requires_grad
assert np.allclose(
a_sm.tolist(),
[[0.2689, 0.9526, 0.018], [0.7311, 0.0474, 0.982]],
atol=1e-4,
rtol=1e-4,
)
assert np.allclose(a.grad.tolist(), [[0, 0, 0], [0, 0, 0]])
def test_softmax2d_backward3():
a = tor4.tensor(data=[[0, 1, -1.0], [1, -2, 3]], requires_grad=True)
a_sm = nn.functional.softmax(a, dim=-1)
a_sm.backward(tor4.tensor([[0, -1, 1.0], [2, 0, -1]]))
assert a_sm.requires_grad
assert np.allclose(
a_sm.tolist(),
[[0.2447, 0.6652, 0.09], [0.1185, 0.0059, 0.8756]],
atol=1e-4,
rtol=1e-4,
)
assert np.allclose(
a.grad.tolist(),
[[0.1408, -0.2826, 0.1418], [0.3127, 0.0038, -0.3164]],
atol=1e-4,
rtol=1e-4,
)
def test_softmax2d_backward4():
a = tor4.tensor(data=[[0, 1, -1.0], [1, -2, 3]], requires_grad=True)
a_sm = nn.functional.softmax(a, dim=0)
a_sm.backward(tor4.tensor([[-5, 3, 0.0], [0, 0, 1]]))
assert a_sm.requires_grad
assert np.allclose(
a_sm.tolist(),
[[0.2689, 0.9526, 0.018], [0.7311, 0.0474, 0.982]],
atol=1e-4,
rtol=1e-4,
)
assert np.allclose(
a.grad.tolist(),
[[-0.9831, 0.1355, -0.0177], [0.9831, -0.1355, 0.0177]],
atol=1e-4,
rtol=1e-4,
)
def test_softmax3d_backward():
a = tor4.tensor(
data=[[[0, 1, -1.0], [1, -2, 3]], [[1, 4, -2], [0, 0, -3]]], requires_grad=True,
)
a_sm = nn.functional.softmax(a, dim=1)
a_sm.backward(tor4.tensor([[[-5, 3, 0.0], [0, 0, 1]], [[3, 0, -3], [1, 2, 3]]]))
assert a_sm.requires_grad
assert np.allclose(
a_sm.tolist(),
[
[[0.2689, 0.9526, 0.018], [0.7311, 0.0474, 0.982]],
[[0.7311, 0.982, 0.7311], [0.2689, 0.018, 0.2689]],
],
atol=1e-4,
rtol=1e-4,
)
assert np.allclose(
a.grad.tolist(),
[
[[-0.9831, 0.1355, -0.0177], [0.9831, -0.1355, 0.0177]],
[[0.3932, -0.0353, -1.1797], [-0.3932, 0.0353, 1.1797]],
],
atol=1e-4,
rtol=1e-4,
)
| 28.422535
| 88
| 0.529485
| 697
| 4,036
| 2.965567
| 0.091822
| 0.032898
| 0.034833
| 0.029028
| 0.870827
| 0.8597
| 0.806967
| 0.791485
| 0.732946
| 0.732946
| 0
| 0.178393
| 0.256938
| 4,036
| 141
| 89
| 28.624113
| 0.510837
| 0
| 0
| 0.60177
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238938
| 1
| 0.079646
| false
| 0
| 0.026549
| 0
| 0.106195
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
eacbdadce424c8674d1462fffb1cb970c545200c
| 2,506
|
py
|
Python
|
emails/utils.py
|
jmhubbard/quote_of_the_day_custom_user
|
27024b2953c1c94fd2970563c3ab31ad444912b6
|
[
"Unlicense"
] | 1
|
2020-11-25T04:57:16.000Z
|
2020-11-25T04:57:16.000Z
|
emails/utils.py
|
jmhubbard/quote_of_the_day_custom_user
|
27024b2953c1c94fd2970563c3ab31ad444912b6
|
[
"Unlicense"
] | null | null | null |
emails/utils.py
|
jmhubbard/quote_of_the_day_custom_user
|
27024b2953c1c94fd2970563c3ab31ad444912b6
|
[
"Unlicense"
] | null | null | null |
import os
from django.core.mail import send_mail
from django.urls import reverse
from django.contrib.sites.models import Site
from django.template.loader import render_to_string
def email_all_users_an_email(user, showlist):
#Gets the current domain name
domain = Site.objects.get_current().domain
# reverse a url in a view to get the path after the domain
path = reverse('login')
url = 'http://{domain}{path}'.format(domain=domain, path=path)
context = {
"unsubscribe_uri": url,
"showlist": showlist,
}
message_text = render_to_string("emails/email_all_users.txt", context=context)
message_html = render_to_string("emails/email_all_users.html", context=context)
return send_mail(
"New Shows Added",
message_text,
os.getenv("EMAIL_HOST_USER"),
[user],
fail_silently=False,
html_message=message_html,
)
def email_test(user, message):
send_mail(
'Quote test',
message,
os.getenv("EMAIL_HOST_USER"),
[user],
fail_silently=False,
)
def email_daily_tv_quote(quote, user):
#Gets the current domain name
domain = Site.objects.get_current().domain
# reverse a url in a view to get the path after the domain
path = reverse('login')
url = 'http://{domain}{path}'.format(domain=domain, path=path)
context = {
"unsubscribe_uri": url,
"quote": quote,
}
message_text = render_to_string("emails/tv_email.txt", context=context)
message_html = render_to_string("emails/tv_email.html", context=context)
return send_mail(
"Quote Of The Day",
message_text,
os.getenv("EMAIL_HOST_USER"),
[user],
fail_silently=False,
html_message=message_html,
)
def email_daily_movie_quote(quote, user):
#Gets the current domain name
domain = Site.objects.get_current().domain
# reverse a url in a view to get the path after the domain
path = reverse('login')
url = 'http://{domain}{path}'.format(domain=domain, path=path)
context = {
"unsubscribe_uri": url,
"quote": quote,
}
message_text = render_to_string("emails/movie_email.txt", context=context)
message_html = render_to_string("emails/movie_email.html", context=context)
return send_mail(
"Quote Of The Day",
message_text,
os.getenv("EMAIL_HOST_USER"),
[user],
fail_silently=False,
html_message=message_html,
)
| 30.560976
| 83
| 0.65842
| 329
| 2,506
| 4.799392
| 0.197568
| 0.056998
| 0.062065
| 0.075997
| 0.824573
| 0.824573
| 0.788474
| 0.759341
| 0.759341
| 0.702343
| 0
| 0
| 0.233041
| 2,506
| 82
| 84
| 30.560976
| 0.82154
| 0.101756
| 0
| 0.597015
| 0
| 0
| 0.175868
| 0.043633
| 0
| 0
| 0
| 0
| 0
| 1
| 0.059701
| false
| 0
| 0.074627
| 0
| 0.179104
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
eadcff9016e474eb3c8f61f0826e29c9a4160b3b
| 159
|
py
|
Python
|
accounts/admin.py
|
kamel2700/Build-a-team-for-Startup
|
3955eb5a990e27f100981b7186f3593f7b821128
|
[
"MIT"
] | null | null | null |
accounts/admin.py
|
kamel2700/Build-a-team-for-Startup
|
3955eb5a990e27f100981b7186f3593f7b821128
|
[
"MIT"
] | null | null | null |
accounts/admin.py
|
kamel2700/Build-a-team-for-Startup
|
3955eb5a990e27f100981b7186f3593f7b821128
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from accounts.models import *
admin.site.register(UserProfile)
admin.site.register(ProjectPage)
admin.site.register(Comment)
| 22.714286
| 32
| 0.830189
| 21
| 159
| 6.285714
| 0.571429
| 0.204545
| 0.386364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075472
| 159
| 6
| 33
| 26.5
| 0.897959
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 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
| 0
| 0
|
0
| 6
|
eaea558a7bb60d7e0462270ff2a5a8f1d8c33727
| 248
|
py
|
Python
|
tests/python-reference/bool/bool-isinstance.py
|
jpolitz/lambda-py-paper
|
746ef63fc1123714b4adaf78119028afbea7bd76
|
[
"Apache-2.0"
] | 25
|
2015-04-16T04:31:49.000Z
|
2022-03-10T15:53:28.000Z
|
tests/python-reference/bool/bool-isinstance.py
|
jpolitz/lambda-py-paper
|
746ef63fc1123714b4adaf78119028afbea7bd76
|
[
"Apache-2.0"
] | 1
|
2018-11-21T22:40:02.000Z
|
2018-11-26T17:53:11.000Z
|
tests/python-reference/bool/bool-isinstance.py
|
jpolitz/lambda-py-paper
|
746ef63fc1123714b4adaf78119028afbea7bd76
|
[
"Apache-2.0"
] | 1
|
2021-03-26T03:36:19.000Z
|
2021-03-26T03:36:19.000Z
|
___assertIs(isinstance(True, bool), True)
___assertIs(isinstance(False, bool), True)
___assertIs(isinstance(True, int), True)
___assertIs(isinstance(False, int), True)
___assertIs(isinstance(1, bool), False)
___assertIs(isinstance(0, bool), False)
| 35.428571
| 42
| 0.782258
| 30
| 248
| 5.866667
| 0.266667
| 0.613636
| 0.5
| 0.295455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008696
| 0.072581
| 248
| 6
| 43
| 41.333333
| 0.756522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
eaff872f4834bf2846f82c2e9bc383d651070c30
| 129
|
py
|
Python
|
starfish/image/_segmentation/__init__.py
|
ttung/starfish
|
1bd8abf55a335620e4b20abb041f478334714081
|
[
"MIT"
] | null | null | null |
starfish/image/_segmentation/__init__.py
|
ttung/starfish
|
1bd8abf55a335620e4b20abb041f478334714081
|
[
"MIT"
] | null | null | null |
starfish/image/_segmentation/__init__.py
|
ttung/starfish
|
1bd8abf55a335620e4b20abb041f478334714081
|
[
"MIT"
] | null | null | null |
from starfish.pipeline import import_all_submodules
from ._base import Segmentation
import_all_submodules(__file__, __package__)
| 32.25
| 51
| 0.883721
| 16
| 129
| 6.3125
| 0.625
| 0.178218
| 0.376238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077519
| 129
| 3
| 52
| 43
| 0.84874
| 0
| 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
| 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
| 6
|
d81f398ba332a8ddc4a369fda6218312310af6ed
| 33
|
py
|
Python
|
test/regression/features/imports/fromImport.py
|
ppelleti/berp
|
30925288376a6464695341445688be64ac6b2600
|
[
"BSD-3-Clause"
] | 90
|
2015-02-03T23:56:30.000Z
|
2022-02-10T03:55:32.000Z
|
test/regression/features/imports/fromImport.py
|
ppelleti/berp
|
30925288376a6464695341445688be64ac6b2600
|
[
"BSD-3-Clause"
] | 4
|
2015-04-01T13:49:13.000Z
|
2019-07-09T19:28:56.000Z
|
test/regression/features/imports/fromImport.py
|
bjpop/berp
|
30925288376a6464695341445688be64ac6b2600
|
[
"BSD-3-Clause"
] | 8
|
2015-04-25T03:47:52.000Z
|
2019-07-27T06:33:56.000Z
|
from DefinesX import x
print(x)
| 8.25
| 22
| 0.757576
| 6
| 33
| 4.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 33
| 3
| 23
| 11
| 0.925926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 1
| 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
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 6
|
dc36fd31dfeeb75d7050190c4caf81b68761883e
| 8,634
|
py
|
Python
|
megumin/modulos/admin/mute.py
|
davitudoplugins1234/WhiterKang
|
f4779d2c440849fa97e7014cd856f885b0abbc87
|
[
"MIT"
] | 2
|
2022-02-01T17:55:44.000Z
|
2022-03-27T17:21:55.000Z
|
megumin/modulos/admin/mute.py
|
davitudoplugins1234/WhiterKang
|
f4779d2c440849fa97e7014cd856f885b0abbc87
|
[
"MIT"
] | null | null | null |
megumin/modulos/admin/mute.py
|
davitudoplugins1234/WhiterKang
|
f4779d2c440849fa97e7014cd856f885b0abbc87
|
[
"MIT"
] | null | null | null |
import asyncio
from pyrogram import filters
from pyrogram.errors import PeerIdInvalid, UserIdInvalid, UsernameInvalid
from pyrogram.types import ChatPermissions, Message
from megumin import megux
from megumin.utils import (
check_bot_rights,
check_rights,
extract_time,
is_admin,
is_dev,
is_self,
sed_sticker,
get_collection,
)
@megux.on_message(filters.command("mute", prefixes=["/", "!"]))
async def _mute_user(_, message: Message):
DISABLED = get_collection(f"DISABLED {message.chat.id}")
query = "mute"
off = await DISABLED.find_one({"_cmd": query})
if off:
return
chat_id = message.chat.id
if not await check_rights(chat_id, message.from_user.id, "can_restrict_members"):
await message.reply("Você não tem direitos suficientes para silenciar usuários")
return
cmd = len(message.text)
replied = message.reply_to_message
reason = ""
if replied:
id_ = replied.from_user.id
if cmd > 5:
_, reason = message.text.split(maxsplit=1)
elif cmd > 5:
_, args = message.text.split(maxsplit=1)
if " " in args:
id_, reason = args.split(" ", maxsplit=1)
else:
id_ = args
else:
await message.reply("`Nenhum User_id válido ou mensagem especificada.`")
return
try:
user = await megux.get_users(id_)
user_id = user.id
mention = user.mention
except (UsernameInvalid, PeerIdInvalid, UserIdInvalid):
await message.reply(
"`User_id ou nome de usuário inválido, tente novamente com informações válidas ⚠`"
)
return
if await is_self(user_id):
await message.reply("Eu não vou mutar!")
return
if is_dev(user_id):
await message.reply("Porque eu iria mutar meu desenvolvedor? Isso me parece uma idéia muito idiota.")
return
if is_admin(chat_id, user_id):
await message.reply("Porque eu iria mutar um(a) administrador(a)? Isso me parece uma idéia bem idiota.")
return
if not await check_rights(chat_id, megux.me.id, "can_restrict_members"):
await message.reply("Não posso restringir as pessoas aqui! Certifique-se de que sou administrador e de que posso adicionar novos administradores.")
await sed_sticker(message)
return
sent = await message.reply("`Mutando Usuário...`")
try:
await megux.restrict_chat_member(chat_id, user_id, ChatPermissions())
await asyncio.sleep(1)
await sent.edit(
f"{mention} está silenciado(mutado) em <b>{message.chat.title}</b>\n"
f"<b>Motivo:</b> `{reason or None}`"
)
except Exception as e_f:
await sent.edit(f"`Algo deu errado 🤔`\n\n**ERROR**: `{e_f}`")
@megux.on_message(filters.command("tmute", prefixes=["/", "!"]))
async def _tmute_user(_, message: Message):
DISABLED = get_collection(f"DISABLED {message.chat.id}")
query = "tmute"
off = await DISABLED.find_one({"_cmd": query})
if off:
return
chat_id = message.chat.id
if not await check_rights(chat_id, message.from_user.id, "can_restrict_members"):
await message.reply("Você não tem direitos suficientes para silenciar usuários")
return
cmd = len(message.text)
replied = message.reply_to_message
if replied:
id_ = replied.from_user.id
if cmd <= 6:
await message.reply("__Você deve especificar um tempo após o comando. Por exemplo:__ <b>/tmute 7d.</b>")
return
_, args = message.text.split(maxsplit=1)
elif cmd > 6:
_, text = message.text.split(maxsplit=1)
if " " in text:
id_, args = text.split(" ", maxsplit=1)
else:
await message.reply("__Você deve especificar um tempo após o comando. Por exemplo:__ **/tmute 7d.**")
else:
await message.reply("`Nenhum User_id válido ou mensagem especificada.`")
return
if " " in args:
split = args.split(None, 1)
time_val = split[0].lower()
reason = split[1]
else:
time_val = args
reason = ""
time_ = await extract_time(message, time_val)
if not time_:
return
try:
user = await megux.get_users(id_)
user_id = user.id
mention = user.mention
except (UsernameInvalid, PeerIdInvalid, UserIdInvalid):
await message.reply(
"`User_id ou nome de usuário inválido, tente novamente com informações válidas ⚠`"
)
return
if await is_self(user_id):
await message.reply("Eu não vou mutar!")
return
if is_dev(user_id):
await message.reply("Porque eu iria mutar meu desenvolvedor? Isso me parece uma idéia muito idiota.")
return
if is_admin(chat_id, user_id):
await message.reply("Porque eu iria mutar um(a) administrador(a)? Isso me parece uma idéia bem idiota.")
return
if not await check_rights(chat_id, megux.me.id, "can_restrict_members"):
await message.reply("Não posso restringir as pessoas aqui! Certifique-se de que sou administrador e de que posso adicionar novos administradores.")
await sed_sticker(message)
return
sent = await message.reply("`Mutando usuário...`")
try:
await megux.restrict_chat_member(chat_id, user_id, ChatPermissions(), time_)
await asyncio.sleep(1)
await sent.edit(
f"{mention} está silenciado(mutado) por <b>{time_val}</b> em <b>{message.chat.title}</b>\n"
f"<b>Motivo</b>: `{reason or None}`"
)
except Exception as e_f: # pylint: disable=broad-except
await sent.edit(f"`Algo deu errado 🤔`\n\n**ERROR**: `{e_f}`")
@megux.on_message(filters.command("unmute", prefixes=["/", "!"]))
async def _unmute_user(_, message: Message):
DISABLED = get_collection(f"DISABLED {message.chat.id}")
query = "unmute"
off = await DISABLED.find_one({"_cmd": query})
if off:
return
chat_id = message.chat.id
if not await check_rights(chat_id, message.from_user.id, "can_restrict_members"):
await message.reply("Você não tem direitos suficientes para silenciar usuários")
return
replied = message.reply_to_message
if replied:
id_ = replied.from_user.id
elif len(message.text) > 7:
_, id_ = message.text.split(maxsplit=1)
else:
await message.reply("`Nenhum User_id válido ou mensagem especificada.`")
return
try:
user = (await megux.get_users(id_))
mention = user.mention
user_id = user.id
except (UsernameInvalid, PeerIdInvalid, UserIdInvalid):
await message.reply(
"`User_id ou nome de usuário inválido, tente novamente com informações válidas ⚠`"
)
return
if await is_self(user_id):
return
if is_admin(chat_id, user_id):
await message.reply("Este usuario é administrador(a), ele não precisa ser desmutado(a).")
return
if not await check_rights(chat_id, megux.me.id, "can_restrict_members"):
await message.reply("Não posso restringir as pessoas aqui! Certifique-se de que sou administrador e de que posso adicionar novos administradores.")
await sed_sticker(message)
return
sent = await message.reply("Desmutando Usuário...")
try:
await megux.unban_chat_member(chat_id, user_id)
await sent.edit(f"Ok, {mention} já pode começar a falar novamente em {message.chat.title}!")
except Exception as e_f:
await sent.edit(f"`Algo deu errado!` 🤔\n\n**ERROR:** `{e_f}`")
@megux.on_message(filters.command("muteme", prefixes=["/", "!"]))
async def muteme_(_, message: Message):
DISABLED = get_collection(f"DISABLED {message.chat.id}")
query = "muteme"
off = await DISABLED.find_one({"_cmd": query})
if off:
return
chat_id = message.chat.id
user_id = message.from_user.id
if is_admin(chat_id, user_id):
await message.reply("Por que eu mutaria um(a) administrador(a)? Parece uma ideia bem idiota.")
return
else:
try:
if not await check_rights(chat_id, megux.me.id, "can_restrict_members"):
await message.reply("Não posso restringir as pessoas aqui! Certifique-se de que sou administrador e de que posso adicionar novos administradores.")
return
await message.reply("Sem Problemas, Mutado!")
await megux.restrict_chat_member(chat_id, user_id, ChatPermissions())
except Exception as e:
await message.reply(f"**ERRO:**\n{e}")
| 39.245455
| 163
| 0.643734
| 1,143
| 8,634
| 4.71741
| 0.160105
| 0.036721
| 0.088279
| 0.02003
| 0.813427
| 0.802485
| 0.796921
| 0.774295
| 0.766877
| 0.759829
| 0
| 0.002929
| 0.248668
| 8,634
| 219
| 164
| 39.424658
| 0.827347
| 0.003243
| 0
| 0.663462
| 0
| 0.033654
| 0.294049
| 0.009182
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.028846
| 0
| 0.163462
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
dc49d0efef00a025032ec403a6bd5a00b82ee89b
| 140
|
py
|
Python
|
python/module/calc/example.py
|
wjiec/packages
|
4ccaf8f717265a1f8a9af533f9a998b935efb32a
|
[
"MIT"
] | null | null | null |
python/module/calc/example.py
|
wjiec/packages
|
4ccaf8f717265a1f8a9af533f9a998b935efb32a
|
[
"MIT"
] | 1
|
2016-09-15T07:06:15.000Z
|
2016-09-15T07:06:15.000Z
|
python/module/calc/example.py
|
wjiec/packages
|
4ccaf8f717265a1f8a9af533f9a998b935efb32a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python35
import calc
from calc import mult
print(calc.add(1, 2))
print(calc.dec(2, 3))
print(calc.div(1, 2))
print(mult(2, 3))
| 14
| 21
| 0.678571
| 28
| 140
| 3.392857
| 0.5
| 0.284211
| 0.147368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081301
| 0.121429
| 140
| 9
| 22
| 15.555556
| 0.691057
| 0.128571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.666667
| 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
| 0
| 1
|
0
| 6
|
dc52b025b8a7aecbe2b78cacb4452f154781595d
| 88
|
py
|
Python
|
catkin_ws/src/00-infrastructure/easy_logs/include/easy_logs/cli/__init__.py
|
yxiao1996/dev
|
e2181233aaa3d16c472b792b58fc4863983825bd
|
[
"CC-BY-2.0"
] | 2
|
2018-06-25T02:51:25.000Z
|
2018-06-25T02:51:27.000Z
|
catkin_ws/src/00-infrastructure/easy_logs/include/easy_logs/cli/__init__.py
|
yxiao1996/dev
|
e2181233aaa3d16c472b792b58fc4863983825bd
|
[
"CC-BY-2.0"
] | null | null | null |
catkin_ws/src/00-infrastructure/easy_logs/include/easy_logs/cli/__init__.py
|
yxiao1996/dev
|
e2181233aaa3d16c472b792b58fc4863983825bd
|
[
"CC-BY-2.0"
] | 2
|
2018-09-04T06:44:21.000Z
|
2018-10-15T02:30:50.000Z
|
from .easy_logs_summary_imp import *
from .dropbox_links import *
from .require import *
| 29.333333
| 36
| 0.806818
| 13
| 88
| 5.153846
| 0.692308
| 0.298507
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 88
| 3
| 37
| 29.333333
| 0.87013
| 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
| 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
| 6
|
dc7d2a5bf7773798fe0cb25e532c00e8fdc1e5bb
| 148
|
py
|
Python
|
utils/postprocessing/__init__.py
|
bdvllrs/misinformation-detection-tensor-embeddings
|
eb43e55fb7d4317f4ca0d5c1db8191be3d543716
|
[
"MIT"
] | 7
|
2020-03-18T03:40:48.000Z
|
2021-12-29T11:04:53.000Z
|
utils/postprocessing/__init__.py
|
bdvllrs/misinformation-detection-tensor-embeddings
|
eb43e55fb7d4317f4ca0d5c1db8191be3d543716
|
[
"MIT"
] | null | null | null |
utils/postprocessing/__init__.py
|
bdvllrs/misinformation-detection-tensor-embeddings
|
eb43e55fb7d4317f4ca0d5c1db8191be3d543716
|
[
"MIT"
] | 3
|
2019-09-30T05:41:59.000Z
|
2020-12-03T19:49:10.000Z
|
from utils.postprocessing.PostProcessing import PostProcessing
from utils.postprocessing.SelectLabelsPostprocessor import SelectLabelsPostprocessor
| 49.333333
| 84
| 0.918919
| 12
| 148
| 11.333333
| 0.416667
| 0.132353
| 0.338235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054054
| 148
| 2
| 85
| 74
| 0.971429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 1
| null | 0
| 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
| 6
|
dcbbfc2a1126bf01e035f0cedab6dd794f1ffb72
| 48
|
py
|
Python
|
user_orders/models/__init__.py
|
Vitamal/shop
|
facf04da00b8b674f2d8024aca4dae272a0c3de8
|
[
"MIT"
] | null | null | null |
user_orders/models/__init__.py
|
Vitamal/shop
|
facf04da00b8b674f2d8024aca4dae272a0c3de8
|
[
"MIT"
] | null | null | null |
user_orders/models/__init__.py
|
Vitamal/shop
|
facf04da00b8b674f2d8024aca4dae272a0c3de8
|
[
"MIT"
] | null | null | null |
from .order import Order
from .user import User
| 16
| 24
| 0.791667
| 8
| 48
| 4.75
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 48
| 2
| 25
| 24
| 0.95
| 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
| 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
| 6
|
f4da84214e93efb0d8a87ad63fc141e1f58417ac
| 166
|
py
|
Python
|
maguey/tests/test_systems_api.py
|
andrewmagill/maguey
|
54efb60a5cab432cf5a3f1cbdaae0d1ffd1f3763
|
[
"MIT"
] | null | null | null |
maguey/tests/test_systems_api.py
|
andrewmagill/maguey
|
54efb60a5cab432cf5a3f1cbdaae0d1ffd1f3763
|
[
"MIT"
] | null | null | null |
maguey/tests/test_systems_api.py
|
andrewmagill/maguey
|
54efb60a5cab432cf5a3f1cbdaae0d1ffd1f3763
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
import maguey
class TestSystems(TestCase):
def test_add_system(self):
pass
def test_delete_system(self):
pass
| 16.6
| 33
| 0.704819
| 21
| 166
| 5.380952
| 0.666667
| 0.123894
| 0.247788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.240964
| 166
| 9
| 34
| 18.444444
| 0.896825
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.285714
| 0.285714
| 0
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 6
|
f4e13e171e02dd82b6bb13fe5bf5609262caa599
| 4,284
|
py
|
Python
|
tests/test_compare.py
|
grst/jupytext
|
0bbcd61297d8ee75b4f0329e2617acbbade3eb10
|
[
"MIT"
] | null | null | null |
tests/test_compare.py
|
grst/jupytext
|
0bbcd61297d8ee75b4f0329e2617acbbade3eb10
|
[
"MIT"
] | null | null | null |
tests/test_compare.py
|
grst/jupytext
|
0bbcd61297d8ee75b4f0329e2617acbbade3eb10
|
[
"MIT"
] | null | null | null |
import pytest
from nbformat.v4.nbbase import new_notebook, \
new_markdown_cell, new_code_cell, new_raw_cell
import jupytext
from jupytext.compare import compare_notebooks, \
test_round_trip_conversion as round_trip_conversion
jupytext.file_format_version.FILE_FORMAT_VERSION = {}
def test_raise_on_different_metadata():
ref = new_notebook(metadata={'main_language': 'python'},
cells=[new_markdown_cell('Cell one')])
test = new_notebook(metadata={'main_language': 'R'},
cells=[new_markdown_cell('Cell one')])
with pytest.raises(AssertionError):
compare_notebooks(ref, test)
def test_raise_on_different_cell_count():
ref = new_notebook(cells=[new_markdown_cell('Cell one'),
new_code_cell('Cell two')])
test = new_notebook(cells=[new_markdown_cell('Cell one')])
with pytest.raises(AssertionError):
compare_notebooks(ref, test)
def test_raise_on_different_cell_type():
ref = new_notebook(cells=[new_markdown_cell('Cell one'),
new_code_cell('Cell two')])
test = new_notebook(cells=[new_markdown_cell('Cell one'),
new_raw_cell('Cell two')])
with pytest.raises(AssertionError):
compare_notebooks(ref, test)
def test_raise_on_different_cell_content():
ref = new_notebook(cells=[new_markdown_cell('Cell one'),
new_code_cell('Cell two')])
test = new_notebook(cells=[new_markdown_cell('Cell one'),
new_code_cell('Modified cell two')])
with pytest.raises(AssertionError):
compare_notebooks(ref, test)
def test_raise_on_split_markdown_cell():
ref = new_notebook(cells=[new_markdown_cell('Cell one\n\n\nsecond line')])
test = new_notebook(cells=[new_markdown_cell('Cell one'),
new_markdown_cell('second line')])
with pytest.raises(AssertionError):
compare_notebooks(ref, test)
def test_raise_on_incomplete_markdown_cell():
ref = new_notebook(cells=[new_markdown_cell('Cell one\n\n\nsecond line')])
test = new_notebook(cells=[new_markdown_cell('Cell one')])
with pytest.raises(AssertionError):
compare_notebooks(ref, test, allow_split_markdown=True)
def test_dont_raise_on_split_markdown_cell():
ref = new_notebook(cells=[new_markdown_cell('Cell one\n\n\nsecond line')])
test = new_notebook(cells=[new_markdown_cell('Cell one'),
new_markdown_cell('second line')])
compare_notebooks(ref, test, allow_split_markdown=True)
def test_raise_on_different_cell_metadata():
ref = new_notebook(cells=[new_code_cell('1+1')])
test = new_notebook(
cells=[new_code_cell('1+1', metadata={'metakey': 'value'})])
with pytest.raises(AssertionError):
compare_notebooks(ref, test)
def test_dont_raise_on_different_outputs():
ref = new_notebook(cells=[new_code_cell('1+1')])
test = new_notebook(cells=[new_code_cell('1+1', outputs=[
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
])])
compare_notebooks(ref, test)
def test_raise_on_different_outputs():
ref = new_notebook(cells=[new_code_cell('1+1')])
test = new_notebook(cells=[new_code_cell('1+1', outputs=[
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
])])
with pytest.raises(AssertionError):
compare_notebooks(ref, test, test_outputs=True)
def test_test_round_trip_conversion():
notebook = new_notebook(cells=[new_code_cell('1+1', outputs=[
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
])], metadata={'main_language': 'python'})
round_trip_conversion(notebook, '.py', test_outputs=True)
| 34
| 78
| 0.613445
| 498
| 4,284
| 4.921687
| 0.130522
| 0.098735
| 0.124031
| 0.147287
| 0.820481
| 0.782538
| 0.763362
| 0.763362
| 0.741738
| 0.729498
| 0
| 0.00666
| 0.264006
| 4,284
| 125
| 79
| 34.272
| 0.770695
| 0
| 0
| 0.60396
| 0
| 0
| 0.119281
| 0
| 0
| 0
| 0
| 0
| 0.079208
| 1
| 0.108911
| false
| 0
| 0.039604
| 0
| 0.148515
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
52408c78b60c7bc5958da33b916643304a15847c
| 20,554
|
py
|
Python
|
monk/tf_keras_1/finetune/level_11_optimizers_main.py
|
Sanskar329/monk_v1
|
51a497a925ec1fb2c8fef1d51245ea7040a5a65a
|
[
"Apache-2.0"
] | 7
|
2020-07-26T08:37:29.000Z
|
2020-10-30T10:23:11.000Z
|
monk/tf_keras_1/finetune/level_11_optimizers_main.py
|
mursalfk/monk_v1
|
62f34a52f242772186ffff7e56764e958fbcd920
|
[
"Apache-2.0"
] | null | null | null |
monk/tf_keras_1/finetune/level_11_optimizers_main.py
|
mursalfk/monk_v1
|
62f34a52f242772186ffff7e56764e958fbcd920
|
[
"Apache-2.0"
] | null | null | null |
from tf_keras_1.finetune.imports import *
from system.imports import *
from tf_keras_1.finetune.level_10_schedulers_main import prototype_schedulers
class prototype_optimizers(prototype_schedulers):
'''
Main class for all optimizers in expert mode
Args:
verbose (int): Set verbosity levels
0 - Print Nothing
1 - Print desired details
'''
@accepts("self", verbose=int, post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def __init__(self, verbose=1):
super().__init__(verbose=verbose);
###############################################################################################################################################
@warning_checks(None, ["lt", 1], momentum=["lt", 1.5], weight_decay=["lt", 0.01], momentum_dampening_rate=None,
clipnorm=None, clipvalue=None, post_trace=False)
@error_checks(None, ["gt", 0], momentum=["gte", 0], weight_decay=["gte", 0], momentum_dampening_rate=None,
clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], momentum=[int, float], weight_decay=[int, float], momentum_dampening_rate=[int, float],
clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_sgd(self, learning_rate, momentum=0, weight_decay=0, momentum_dampening_rate=0, clipnorm=0.0, clipvalue=0.0):
'''
Select stochastic gradient descent optimizer
Args:
learning_rate (float): Initial base learning rate
momentum (float): Momentum value for driving the weights towards minima
weight_decay (float): Value for regularizing weights post every update
momentum_dampening_rate (float): Reduction rate for momentum
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = sgd(self.system_dict, learning_rate,
momentum=momentum, weight_decay=weight_decay, momentum_dampening_rate=momentum_dampening_rate, clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk");
self.custom_print("");
ConstraintWarning("ArgumentWarning: momentum_dampening_rate is active only for pytorch in current version of Monk");
self.custom_print("");
###############################################################################################################################################
###############################################################################################################################################
@warning_checks(None, ["lt", 1], momentum=["lt", 1.5], weight_decay=["lt", 0.01], momentum_dampening_rate=None,
clipnorm=None, clipvalue=None, post_trace=False)
@error_checks(None, ["gt", 0], momentum=["gte", 0], weight_decay=["gte", 0], momentum_dampening_rate=None,
clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], momentum=[int, float], weight_decay=[int, float], momentum_dampening_rate=[int, float],
clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_nesterov_sgd(self, learning_rate, momentum=0, weight_decay=0, momentum_dampening_rate=0, clipnorm=0.0, clipvalue=0.0):
'''
Select stochastic gradient descent optimizer with nesterov acceleration
Args:
learning_rate (float): Initial base learning rate
momentum (float): Momentum value for driving the weights towards minima
weight_decay (float): Value for regularizing weights post every update
momentum_dampening_rate (float): Reduction rate for momentum
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = nesterov_sgd(self.system_dict, learning_rate,
momentum=momentum, weight_decay=weight_decay, momentum_dampening_rate=momentum_dampening_rate, clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk");
self.custom_print("");
ConstraintWarning("ArgumentWarning: momentum_dampening_rate is active only for pytorch in current version of Monk");
self.custom_print("");
###############################################################################################################################################
###############################################################################################################################################
@warning_checks(None, ["lt", 1], decay_rate=["lt", 1], epsilon=["lt", 0.001], weight_decay=["lt", 0.01],
clipnorm=None, clipvalue=None, post_trace=None)
@error_checks(None, ["gt", 0], decay_rate=["gt", 0], epsilon=["gte", 0], weight_decay=["gte", 0],
clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], decay_rate=[int, float], epsilon=[int, float], weight_decay=[int, float],
clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_rmsprop(self, learning_rate, decay_rate=0.99, epsilon=1e-08, weight_decay=0, clipnorm=0.0, clipvalue=0.0):
'''
Select root mean score prop optimizer
Args:
learning_rate (float): Initial base learning rate
decay_rate (float): A decay factor of moving average over past squared gradient.
epsilon (float): A value to avoid division by zero
weight_decay (float): Value for regularizing weights post every update
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = rmsprop(self.system_dict , learning_rate,
decay_rate=decay_rate, epsilon=epsilon, weight_decay=weight_decay, clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk");
self.custom_print("");
###############################################################################################################################################
###############################################################################################################################################
@warning_checks(None, ["lt, 1"], beta1=["lt", 1], beta2=["lt", 1], epsilon=["lt", 0.001], weight_decay=["lt", 0.01], amsgrad=None,
clipnorm=None, clipvalue=None, post_trace=False)
@error_checks(None, ["gt", 0], beta1=["gte", 0], beta2=["gte", 0], epssilon=["gte", 0], weight_decay=["gte", 0], amsgrad=None,
clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], beta1=[int, float], beta2=[int, float], epsilon=[int, float], weight_decay=[int, float], amsgrad=bool,
clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_adam(self, learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-08, weight_decay=0, amsgrad=False,
clipnorm=0.0, clipvalue=0.0):
'''
Select ADAM optimizer
Args:
learning_rate (float): Initial base learning rate
beta1 (float): Exponential decay rate for first momentum estimates
beta2 (float): Exponential decay rate for first second estimates
weight_decay (float): Value for regularizing weights post every update
amsgrad (bool): If True, AMSGrad variant of this algorithm is used
epsilon (float): A value to avoid division by zero
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = adam(self.system_dict, learning_rate,
beta1=beta1, beta2=beta2, epsilon=epsilon, weight_decay=weight_decay, amsgrad=amsgrad, clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk");
self.custom_print("");
ConstraintWarning("ArgumentWarning: amsgrad is active only for keras and pytorch in current version of Monk");
self.custom_print("");
###############################################################################################################################################
###############################################################################################################################################
@warning_checks(None, ["lt, 1"], beta1=["lt", 1], beta2=["lt", 1], epsilon=["lt", 0.001], weight_decay=["lt", 0.01], amsgrad=None,
momentum_decay=None, clipnorm=None, clipvalue=None, post_trace=False)
@error_checks(None, ["gt", 0], beta1=["gte", 0], beta2=["gte", 0], epssilon=["gte", 0], weight_decay=["gte", 0], amsgrad=None,
momentum_decay=None, clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], beta1=[int, float], beta2=[int, float], epsilon=[int, float], weight_decay=[int, float], amsgrad=bool,
momentum_decay=[int, float], clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_nesterov_adam(self, learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-08, weight_decay=0, amsgrad=False,
momentum_decay=0.004, clipnorm=0.0, clipvalue=0.0):
'''
Select ADAM optimizer with nesterov momentum acceleration
Args:
learning_rate (float): Initial base learning rate
beta1 (float): Exponential decay rate for first momentum estimates
beta2 (float): Exponential decay rate for first second estimates
weight_decay (float): Value for regularizing weights post every update
amsgrad (bool): If True, AMSGrad variant of this algorithm is used
epsilon (float): A value to avoid division by zero
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = nesterov_adam(self.system_dict, learning_rate,
beta1=beta1, beta2=beta2, epsilon=epsilon, weight_decay=weight_decay, amsgrad=amsgrad,
momentum_decay=momentum_decay, clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("OptimizerWarning: nesterov adam is active only for keras and gluon in current version of Monk");
self.custom_print("");
ConstraintWarning("ArgumentWarning: amsgrad is inactive in current version of Monk");
self.custom_print("");
###############################################################################################################################################
###############################################################################################################################################
@warning_checks(None, ["lt", 1], beta1=["lt", 1], beta2=["lt", 1], epsilon=["lt", 0.001], weight_decay=["lt", 0.01],
clipnorm=None, clipvalue=None, post_trace=False)
@error_checks(None, ["gt", 0], beta1=["gte", 0], beta2=["gte", 0], epsilon=["gte", 0], weight_decay=["gte", 0],
clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], beta1=[int, float], beta2=[int, float], epsilon=[int, float], weight_decay=[int, float],
clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_adamax(self, learning_rate, beta1=0.9, beta2=0.999, epsilon=1e-08, weight_decay=0,
clipnorm=0.0, clipvalue=0.0):
'''
Select Adamax optimizer
Args:
learning_rate (float): Initial base learning rate
beta1 (float): Exponential decay rate for first momentum estimates
beta2 (float): Exponential decay rate for first second estimates
weight_decay (float): Value for regularizing weights post every update
epsilon (float): A value to avoid division by zero
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = adamax(self.system_dict, learning_rate,
beta1=beta1, beta2=beta2, epsilon=epsilon, weight_decay=weight_decay, clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk");
self.custom_print("");
###############################################################################################################################################
###############################################################################################################################################
@warning_checks(None, ["lt", 1], rho=["lt", 1], epsilon=["lt", 0.001], weight_decay=["lt", 0.01],
clipnorm=None, clipvalue=None, post_trace=False)
@error_checks(None, ["gt", 0], rho=["gt", 0], epsilon=["gte", 0], weight_decay=["gte", 0],
clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], rho=[int, float], epsilon=[int, float], weight_decay=[int, float],
clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_adadelta(self, learning_rate, rho=0.9, epsilon=1e-06, weight_decay=0,
clipnorm=0.0, clipvalue=0.0):
'''
Select Adadelta optimizer
Args:
learning_rate (float): Initial base learning rate
rho (float): Exponential decay rate for momentum estimates
weight_decay (float): Value for regularizing weights post every update
epsilon (float): A value to avoid division by zero
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = adadelta(self.system_dict, learning_rate,
rho=rho, epsilon=epsilon, weight_decay=weight_decay, clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk");
self.custom_print("");
###############################################################################################################################################
###############################################################################################################################################
@warning_checks(None, ["lt", 1], learning_rate_decay=None, weight_decay=["lt", 0.01], epsilon=None,
clipnorm=None, clipvalue=None, post_trace=False)
@error_checks(None, ["gt", 0], learning_rate_decay=None, weight_decay=["gte", 0], epsilon=None,
clipnorm=None, clipvalue=None, post_trace=False)
@accepts("self", [int, float], learning_rate_decay=[int, float], weight_decay=[int, float],
epsilon=[int, float], clipnorm=[int, float], clipvalue=[int, float], post_trace=False)
#@TraceFunction(trace_args=True, trace_rv=True)
def optimizer_adagrad(self, learning_rate, learning_rate_decay=0, weight_decay=0, epsilon=1e-08,
clipnorm=0.0, clipvalue=0.0):
'''
Select Adagrad optimizer
Args:
learning_rate (float): Initial base learning rate
learning_rate_decay (float): Learning rate decay factor
weight_decay (float): Value for regularizing weights post every update
epsilon (float): A value to avoid division by zero
clipnorm (float): Gradient clipping factor
clipvalue (float): Value for clipping
Returns:
None
'''
self.system_dict = adagrad(self.system_dict, learning_rate,
learning_rate_decay=learning_rate_decay, weight_decay=weight_decay, epsilon=epsilon,
clipnorm=clipnorm, clipvalue=clipvalue);
self.custom_print("Optimizer");
self.custom_print(" Name: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["name"]));
self.custom_print(" Learning rate: {}".format(self.system_dict["hyper-parameters"]["learning_rate"]));
self.custom_print(" Params: {}".format(self.system_dict["hyper-parameters"]["optimizer"]["params"]));
self.custom_print("");
ConstraintWarning("ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk");
self.custom_print("");
ConstraintWarning("ArgumentWarning: learning_rate_decay is active only for pytorch in current version of Monk");
self.custom_print("");
###############################################################################################################################################
| 58.062147
| 151
| 0.579352
| 2,183
| 20,554
| 5.303252
| 0.068713
| 0.059083
| 0.068671
| 0.041462
| 0.926924
| 0.90628
| 0.894619
| 0.892286
| 0.892286
| 0.865768
| 0
| 0.014103
| 0.192761
| 20,554
| 353
| 152
| 58.226629
| 0.683643
| 0.205994
| 0
| 0.664474
| 0
| 0
| 0.200562
| 0.003493
| 0
| 0
| 0
| 0
| 0
| 1
| 0.059211
| false
| 0
| 0.019737
| 0
| 0.085526
| 0.348684
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bfde0530e9195e24f4af021d544ddf9f69b16e9f
| 38,456
|
py
|
Python
|
tests/integration/resources_permissions/test_epics_resources.py
|
aavcc/taiga-openshift
|
7c33284573ceed38f755b8159ad83f3f68d2f7cb
|
[
"MIT"
] | null | null | null |
tests/integration/resources_permissions/test_epics_resources.py
|
aavcc/taiga-openshift
|
7c33284573ceed38f755b8159ad83f3f68d2f7cb
|
[
"MIT"
] | 12
|
2019-11-25T14:08:32.000Z
|
2021-06-24T10:35:51.000Z
|
tests/integration/resources_permissions/test_epics_resources.py
|
threefoldtech/Threefold-Circles
|
cbc433796b25cf7af9a295af65d665a4a279e2d6
|
[
"Apache-2.0"
] | 1
|
2018-06-07T10:58:15.000Z
|
2018-06-07T10:58:15.000Z
|
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2017 Anler Hernández <hello@anler.me>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import uuid
from django.core.urlresolvers import reverse
from taiga.base.utils import json
from taiga.projects import choices as project_choices
from taiga.projects.models import Project
from taiga.projects.epics.serializers import EpicSerializer
from taiga.projects.epics.models import Epic
from taiga.projects.epics.utils import attach_extra_info as attach_epic_extra_info
from taiga.projects.utils import attach_extra_info as attach_project_extra_info
from taiga.permissions.choices import MEMBERS_PERMISSIONS, ANON_PERMISSIONS
from taiga.projects.occ import OCCResourceMixin
from tests import factories as f
from tests.utils import helper_test_http_method, reconnect_signals
from taiga.projects.votes.services import add_vote
from taiga.projects.notifications.services import add_watcher
from unittest import mock
import pytest
pytestmark = pytest.mark.django_db
def setup_function(function):
reconnect_signals()
@pytest.fixture
def data():
m = type("Models", (object,), {})
m.registered_user = f.UserFactory.create()
m.project_member_with_perms = f.UserFactory.create()
m.project_member_without_perms = f.UserFactory.create()
m.project_owner = f.UserFactory.create()
m.other_user = f.UserFactory.create()
m.public_project = f.ProjectFactory(is_private=False,
anon_permissions=list(map(lambda x: x[0], ANON_PERMISSIONS)),
public_permissions=list(map(lambda x: x[0], ANON_PERMISSIONS)) + ["comment_epic"],
owner=m.project_owner,
epics_csv_uuid=uuid.uuid4().hex)
m.public_project = attach_project_extra_info(Project.objects.all()).get(id=m.public_project.id)
m.private_project1 = f.ProjectFactory(is_private=True,
anon_permissions=list(map(lambda x: x[0], ANON_PERMISSIONS)),
public_permissions=list(map(lambda x: x[0], ANON_PERMISSIONS)),
owner=m.project_owner,
epics_csv_uuid=uuid.uuid4().hex)
m.private_project1 = attach_project_extra_info(Project.objects.all()).get(id=m.private_project1.id)
m.private_project2 = f.ProjectFactory(is_private=True,
anon_permissions=[],
public_permissions=[],
owner=m.project_owner,
epics_csv_uuid=uuid.uuid4().hex)
m.private_project2 = attach_project_extra_info(Project.objects.all()).get(id=m.private_project2.id)
m.blocked_project = f.ProjectFactory(is_private=True,
anon_permissions=[],
public_permissions=[],
owner=m.project_owner,
epics_csv_uuid=uuid.uuid4().hex,
blocked_code=project_choices.BLOCKED_BY_STAFF)
m.blocked_project = attach_project_extra_info(Project.objects.all()).get(id=m.blocked_project.id)
m.public_membership = f.MembershipFactory(
project=m.public_project,
user=m.project_member_with_perms,
role__project=m.public_project,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
m.private_membership1 = f.MembershipFactory(
project=m.private_project1,
user=m.project_member_with_perms,
role__project=m.private_project1,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
f.MembershipFactory(
project=m.private_project1,
user=m.project_member_without_perms,
role__project=m.private_project1,
role__permissions=[])
m.private_membership2 = f.MembershipFactory(
project=m.private_project2,
user=m.project_member_with_perms,
role__project=m.private_project2,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
f.MembershipFactory(
project=m.private_project2,
user=m.project_member_without_perms,
role__project=m.private_project2,
role__permissions=[])
m.blocked_membership = f.MembershipFactory(
project=m.blocked_project,
user=m.project_member_with_perms,
role__project=m.blocked_project,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
f.MembershipFactory(project=m.blocked_project,
user=m.project_member_without_perms,
role__project=m.blocked_project,
role__permissions=[])
f.MembershipFactory(project=m.public_project,
user=m.project_owner,
is_admin=True)
f.MembershipFactory(project=m.private_project1,
user=m.project_owner,
is_admin=True)
f.MembershipFactory(project=m.private_project2,
user=m.project_owner,
is_admin=True)
f.MembershipFactory(project=m.blocked_project,
user=m.project_owner,
is_admin=True)
m.public_epic = f.EpicFactory(project=m.public_project,
status__project=m.public_project)
m.public_epic = attach_epic_extra_info(Epic.objects.all()).get(id=m.public_epic.id)
m.private_epic1 = f.EpicFactory(project=m.private_project1,
status__project=m.private_project1)
m.private_epic1 = attach_epic_extra_info(Epic.objects.all()).get(id=m.private_epic1.id)
m.private_epic2 = f.EpicFactory(project=m.private_project2,
status__project=m.private_project2)
m.private_epic2 = attach_epic_extra_info(Epic.objects.all()).get(id=m.private_epic2.id)
m.blocked_epic = f.EpicFactory(project=m.blocked_project,
status__project=m.blocked_project)
m.blocked_epic = attach_epic_extra_info(Epic.objects.all()).get(id=m.blocked_epic.id)
m.public_us = f.UserStoryFactory(project=m.public_project)
m.private_us1 = f.UserStoryFactory(project=m.private_project1)
m.private_us2 = f.UserStoryFactory(project=m.private_project2)
m.blocked_us = f.UserStoryFactory(project=m.blocked_project)
m.public_related_us = f.RelatedUserStory(epic=m.public_epic, user_story=m.public_us)
m.private_related_us1 = f.RelatedUserStory(epic=m.private_epic1, user_story=m.private_us1)
m.private_related_us2 = f.RelatedUserStory(epic=m.private_epic2, user_story=m.private_us2)
m.blocked_related_us = f.RelatedUserStory(epic=m.blocked_epic, user_story=m.blocked_us)
m.public_project.default_epic_status = m.public_epic.status
m.public_project.save()
m.private_project1.default_epic_status = m.private_epic1.status
m.private_project1.save()
m.private_project2.default_epic_status = m.private_epic2.status
m.private_project2.save()
m.blocked_project.default_epic_status = m.blocked_epic.status
m.blocked_project.save()
return m
def test_epic_list(client, data):
url = reverse('epics-list')
response = client.get(url)
epics_data = json.loads(response.content.decode('utf-8'))
assert len(epics_data) == 2
assert response.status_code == 200
client.login(data.registered_user)
response = client.get(url)
epics_data = json.loads(response.content.decode('utf-8'))
assert len(epics_data) == 2
assert response.status_code == 200
client.login(data.project_member_with_perms)
response = client.get(url)
epics_data = json.loads(response.content.decode('utf-8'))
assert len(epics_data) == 4
assert response.status_code == 200
client.login(data.project_owner)
response = client.get(url)
epics_data = json.loads(response.content.decode('utf-8'))
assert len(epics_data) == 4
assert response.status_code == 200
def test_epic_retrieve(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'get', public_url, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url1, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url2, None, users)
assert results == [401, 403, 403, 200, 200]
results = helper_test_http_method(client, 'get', blocked_url, None, users)
assert results == [401, 403, 403, 200, 200]
def test_epic_create(client, data):
url = reverse('epics-list')
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
create_data = json.dumps({
"subject": "test",
"ref": 1,
"project": data.public_project.pk,
"status": data.public_project.epic_statuses.all()[0].pk,
})
results = helper_test_http_method(client, 'post', url, create_data, users)
assert results == [401, 403, 403, 201, 201]
create_data = json.dumps({
"subject": "test",
"ref": 2,
"project": data.private_project1.pk,
"status": data.private_project1.epic_statuses.all()[0].pk,
})
results = helper_test_http_method(client, 'post', url, create_data, users)
assert results == [401, 403, 403, 201, 201]
create_data = json.dumps({
"subject": "test",
"ref": 3,
"project": data.private_project2.pk,
"status": data.private_project2.epic_statuses.all()[0].pk,
})
results = helper_test_http_method(client, 'post', url, create_data, users)
assert results == [401, 403, 403, 201, 201]
create_data = json.dumps({
"subject": "test",
"ref": 3,
"project": data.blocked_project.pk,
"status": data.blocked_project.epic_statuses.all()[0].pk,
})
results = helper_test_http_method(client, 'post', url, create_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_put_update(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
with mock.patch.object(OCCResourceMixin, "_validate_and_update_version"):
epic_data = EpicSerializer(data.public_epic).data
epic_data["subject"] = "test"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', public_url, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.private_epic1).data
epic_data["subject"] = "test"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', private_url1, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.private_epic2).data
epic_data["subject"] = "test"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', private_url2, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.blocked_epic).data
epic_data["subject"] = "test"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', blocked_url, epic_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_put_comment(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
with mock.patch.object(OCCResourceMixin, "_validate_and_update_version"):
epic_data = EpicSerializer(data.public_epic).data
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', public_url, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.private_epic1).data
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', private_url1, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.private_epic2).data
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', private_url2, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.blocked_epic).data
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', blocked_url, epic_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_put_update_and_comment(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
with mock.patch.object(OCCResourceMixin, "_validate_and_update_version"):
epic_data = EpicSerializer(data.public_epic).data
epic_data["subject"] = "test"
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', public_url, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.private_epic1).data
epic_data["subject"] = "test"
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', private_url1, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.private_epic2).data
epic_data["subject"] = "test"
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', private_url2, epic_data, users)
assert results == [401, 403, 403, 200, 200]
epic_data = EpicSerializer(data.blocked_epic).data
epic_data["subject"] = "test"
epic_data["comment"] = "test comment"
epic_data = json.dumps(epic_data)
results = helper_test_http_method(client, 'put', blocked_url, epic_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_put_update_with_project_change(client):
user1 = f.UserFactory.create()
user2 = f.UserFactory.create()
user3 = f.UserFactory.create()
user4 = f.UserFactory.create()
project1 = f.ProjectFactory()
project2 = f.ProjectFactory()
epic_status1 = f.EpicStatusFactory.create(project=project1)
epic_status2 = f.EpicStatusFactory.create(project=project2)
project1.default_epic_status = epic_status1
project2.default_epic_status = epic_status2
project1.save()
project2.save()
project1 = attach_project_extra_info(Project.objects.all()).get(id=project1.id)
project2 = attach_project_extra_info(Project.objects.all()).get(id=project2.id)
f.MembershipFactory(project=project1,
user=user1,
role__project=project1,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
f.MembershipFactory(project=project2,
user=user1,
role__project=project2,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
f.MembershipFactory(project=project1,
user=user2,
role__project=project1,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
f.MembershipFactory(project=project2,
user=user3,
role__project=project2,
role__permissions=list(map(lambda x: x[0], MEMBERS_PERMISSIONS)))
epic = f.EpicFactory.create(project=project1)
epic = attach_epic_extra_info(Epic.objects.all()).get(id=epic.id)
url = reverse('epics-detail', kwargs={"pk": epic.pk})
# Test user with permissions in both projects
client.login(user1)
epic_data = EpicSerializer(epic).data
epic_data["project"] = project2.id
epic_data = json.dumps(epic_data)
response = client.put(url, data=epic_data, content_type="application/json")
assert response.status_code == 200
epic.project = project1
epic.save()
# Test user with permissions in only origin project
client.login(user2)
epic_data = EpicSerializer(epic).data
epic_data["project"] = project2.id
epic_data = json.dumps(epic_data)
response = client.put(url, data=epic_data, content_type="application/json")
assert response.status_code == 403
epic.project = project1
epic.save()
# Test user with permissions in only destionation project
client.login(user3)
epic_data = EpicSerializer(epic).data
epic_data["project"] = project2.id
epic_data = json.dumps(epic_data)
response = client.put(url, data=epic_data, content_type="application/json")
assert response.status_code == 403
epic.project = project1
epic.save()
# Test user without permissions in the projects
client.login(user4)
epic_data = EpicSerializer(epic).data
epic_data["project"] = project2.id
epic_data = json.dumps(epic_data)
response = client.put(url, data=epic_data, content_type="application/json")
assert response.status_code == 403
epic.project = project1
epic.save()
def test_epic_patch_update(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
with mock.patch.object(OCCResourceMixin, "_validate_and_update_version"):
patch_data = json.dumps({"subject": "test", "version": data.public_epic.version})
results = helper_test_http_method(client, 'patch', public_url, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({"subject": "test", "version": data.private_epic1.version})
results = helper_test_http_method(client, 'patch', private_url1, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({"subject": "test", "version": data.private_epic2.version})
results = helper_test_http_method(client, 'patch', private_url2, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({"subject": "test", "version": data.blocked_epic.version})
results = helper_test_http_method(client, 'patch', blocked_url, patch_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_patch_comment(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
with mock.patch.object(OCCResourceMixin, "_validate_and_update_version"):
patch_data = json.dumps({"comment": "test comment", "version": data.public_epic.version})
results = helper_test_http_method(client, 'patch', public_url, patch_data, users)
assert results == [401, 200, 200, 200, 200]
patch_data = json.dumps({"comment": "test comment", "version": data.private_epic1.version})
results = helper_test_http_method(client, 'patch', private_url1, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({"comment": "test comment", "version": data.private_epic2.version})
results = helper_test_http_method(client, 'patch', private_url2, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({"comment": "test comment", "version": data.blocked_epic.version})
results = helper_test_http_method(client, 'patch', blocked_url, patch_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_patch_update_and_comment(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
with mock.patch.object(OCCResourceMixin, "_validate_and_update_version"):
patch_data = json.dumps({
"subject": "test",
"comment": "test comment",
"version": data.public_epic.version
})
results = helper_test_http_method(client, 'patch', public_url, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({
"subject": "test",
"comment": "test comment",
"version": data.private_epic1.version
})
results = helper_test_http_method(client, 'patch', private_url1, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({
"subject": "test",
"comment": "test comment",
"version": data.private_epic2.version
})
results = helper_test_http_method(client, 'patch', private_url2, patch_data, users)
assert results == [401, 403, 403, 200, 200]
patch_data = json.dumps({
"subject": "test",
"comment": "test comment",
"version": data.blocked_epic.version
})
results = helper_test_http_method(client, 'patch', blocked_url, patch_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_delete(client, data):
public_url = reverse('epics-detail', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-detail', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-detail', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-detail', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
]
results = helper_test_http_method(client, 'delete', public_url, None, users)
assert results == [401, 403, 403, 204]
results = helper_test_http_method(client, 'delete', private_url1, None, users)
assert results == [401, 403, 403, 204]
results = helper_test_http_method(client, 'delete', private_url2, None, users)
assert results == [401, 403, 403, 204]
results = helper_test_http_method(client, 'delete', blocked_url, None, users)
assert results == [401, 403, 403, 451]
def test_epic_action_bulk_create(client, data):
url = reverse('epics-bulk-create')
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
bulk_data = json.dumps({
"bulk_epics": "test1\ntest2",
"project_id": data.public_epic.project.pk,
})
results = helper_test_http_method(client, 'post', url, bulk_data, users)
assert results == [401, 403, 403, 200, 200]
bulk_data = json.dumps({
"bulk_epics": "test1\ntest2",
"project_id": data.private_epic1.project.pk,
})
results = helper_test_http_method(client, 'post', url, bulk_data, users)
assert results == [401, 403, 403, 200, 200]
bulk_data = json.dumps({
"bulk_epics": "test1\ntest2",
"project_id": data.private_epic2.project.pk,
})
results = helper_test_http_method(client, 'post', url, bulk_data, users)
assert results == [401, 403, 403, 200, 200]
bulk_data = json.dumps({
"bulk_epics": "test1\ntest2",
"project_id": data.blocked_epic.project.pk,
})
results = helper_test_http_method(client, 'post', url, bulk_data, users)
assert results == [401, 403, 403, 451, 451]
def test_epic_action_upvote(client, data):
public_url = reverse('epics-upvote', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-upvote', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-upvote', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-upvote', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'post', public_url, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url1, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url2, "", users)
assert results == [404, 404, 404, 200, 200]
results = helper_test_http_method(client, 'post', blocked_url, "", users)
assert results == [404, 404, 404, 451, 451]
def test_epic_action_downvote(client, data):
public_url = reverse('epics-downvote', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-downvote', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-downvote', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-downvote', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'post', public_url, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url1, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url2, "", users)
assert results == [404, 404, 404, 200, 200]
results = helper_test_http_method(client, 'post', blocked_url, "", users)
assert results == [404, 404, 404, 451, 451]
def test_epic_voters_list(client, data):
public_url = reverse('epic-voters-list', kwargs={"resource_id": data.public_epic.pk})
private_url1 = reverse('epic-voters-list', kwargs={"resource_id": data.private_epic1.pk})
private_url2 = reverse('epic-voters-list', kwargs={"resource_id": data.private_epic2.pk})
blocked_url = reverse('epic-voters-list', kwargs={"resource_id": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'get', public_url, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url1, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url2, None, users)
assert results == [401, 403, 403, 200, 200]
results = helper_test_http_method(client, 'get', blocked_url, None, users)
assert results == [401, 403, 403, 200, 200]
def test_epic_voters_retrieve(client, data):
add_vote(data.public_epic, data.project_owner)
public_url = reverse('epic-voters-detail', kwargs={"resource_id": data.public_epic.pk,
"pk": data.project_owner.pk})
add_vote(data.private_epic1, data.project_owner)
private_url1 = reverse('epic-voters-detail', kwargs={"resource_id": data.private_epic1.pk,
"pk": data.project_owner.pk})
add_vote(data.private_epic2, data.project_owner)
private_url2 = reverse('epic-voters-detail', kwargs={"resource_id": data.private_epic2.pk,
"pk": data.project_owner.pk})
add_vote(data.blocked_epic, data.project_owner)
blocked_url = reverse('epic-voters-detail', kwargs={"resource_id": data.blocked_epic.pk,
"pk": data.project_owner.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'get', public_url, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url1, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url2, None, users)
assert results == [401, 403, 403, 200, 200]
results = helper_test_http_method(client, 'get', blocked_url, None, users)
assert results == [401, 403, 403, 200, 200]
def test_epic_action_watch(client, data):
public_url = reverse('epics-watch', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-watch', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-watch', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-watch', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'post', public_url, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url1, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url2, "", users)
assert results == [404, 404, 404, 200, 200]
results = helper_test_http_method(client, 'post', blocked_url, "", users)
assert results == [404, 404, 404, 451, 451]
def test_epic_action_unwatch(client, data):
public_url = reverse('epics-unwatch', kwargs={"pk": data.public_epic.pk})
private_url1 = reverse('epics-unwatch', kwargs={"pk": data.private_epic1.pk})
private_url2 = reverse('epics-unwatch', kwargs={"pk": data.private_epic2.pk})
blocked_url = reverse('epics-unwatch', kwargs={"pk": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'post', public_url, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url1, "", users)
assert results == [401, 200, 200, 200, 200]
results = helper_test_http_method(client, 'post', private_url2, "", users)
assert results == [404, 404, 404, 200, 200]
results = helper_test_http_method(client, 'post', blocked_url, "", users)
assert results == [404, 404, 404, 451, 451]
def test_epic_watchers_list(client, data):
public_url = reverse('epic-watchers-list', kwargs={"resource_id": data.public_epic.pk})
private_url1 = reverse('epic-watchers-list', kwargs={"resource_id": data.private_epic1.pk})
private_url2 = reverse('epic-watchers-list', kwargs={"resource_id": data.private_epic2.pk})
blocked_url = reverse('epic-watchers-list', kwargs={"resource_id": data.blocked_epic.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'get', public_url, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url1, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url2, None, users)
assert results == [401, 403, 403, 200, 200]
results = helper_test_http_method(client, 'get', blocked_url, None, users)
assert results == [401, 403, 403, 200, 200]
def test_epic_watchers_retrieve(client, data):
add_watcher(data.public_epic, data.project_owner)
public_url = reverse('epic-watchers-detail', kwargs={"resource_id": data.public_epic.pk,
"pk": data.project_owner.pk})
add_watcher(data.private_epic1, data.project_owner)
private_url1 = reverse('epic-watchers-detail', kwargs={"resource_id": data.private_epic1.pk,
"pk": data.project_owner.pk})
add_watcher(data.private_epic2, data.project_owner)
private_url2 = reverse('epic-watchers-detail', kwargs={"resource_id": data.private_epic2.pk,
"pk": data.project_owner.pk})
add_watcher(data.blocked_epic, data.project_owner)
blocked_url = reverse('epic-watchers-detail', kwargs={"resource_id": data.blocked_epic.pk,
"pk": data.project_owner.pk})
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'get', public_url, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url1, None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', private_url2, None, users)
assert results == [401, 403, 403, 200, 200]
results = helper_test_http_method(client, 'get', blocked_url, None, users)
assert results == [401, 403, 403, 200, 200]
def test_epics_csv(client, data):
url = reverse('epics-csv')
csv_public_uuid = data.public_project.epics_csv_uuid
csv_private1_uuid = data.private_project1.epics_csv_uuid
csv_private2_uuid = data.private_project1.epics_csv_uuid
csv_blocked_uuid = data.blocked_project.epics_csv_uuid
users = [
None,
data.registered_user,
data.project_member_without_perms,
data.project_member_with_perms,
data.project_owner
]
results = helper_test_http_method(client, 'get', "{}?uuid={}".format(url, csv_public_uuid), None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', "{}?uuid={}".format(url, csv_private1_uuid), None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', "{}?uuid={}".format(url, csv_private2_uuid), None, users)
assert results == [200, 200, 200, 200, 200]
results = helper_test_http_method(client, 'get', "{}?uuid={}".format(url, csv_blocked_uuid), None, users)
assert results == [200, 200, 200, 200, 200]
| 42.120482
| 122
| 0.661145
| 4,851
| 38,456
| 4.987631
| 0.054422
| 0.029014
| 0.044555
| 0.06365
| 0.865716
| 0.834387
| 0.8143
| 0.795991
| 0.788427
| 0.773466
| 0
| 0.048151
| 0.218561
| 38,456
| 912
| 123
| 42.166667
| 0.75698
| 0.02993
| 0
| 0.685675
| 0
| 0
| 0.070973
| 0.004506
| 0
| 0
| 0
| 0
| 0.122392
| 1
| 0.031989
| false
| 0
| 0.023644
| 0
| 0.057024
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
bfe43a1f982ed9fd7da447c90684b4c6aa5f68e2
| 48
|
py
|
Python
|
src/deepke/name_entity_re/__init__.py
|
johncolezhang/DeepKE
|
ea4552ec42cb003a835f00fc14fb454f9a9a7183
|
[
"MIT"
] | 710
|
2021-08-01T16:43:59.000Z
|
2022-03-31T08:39:17.000Z
|
src/deepke/name_entity_re/__init__.py
|
johncolezhang/DeepKE
|
ea4552ec42cb003a835f00fc14fb454f9a9a7183
|
[
"MIT"
] | 66
|
2019-06-09T12:14:31.000Z
|
2021-07-27T05:54:35.000Z
|
src/deepke/name_entity_re/__init__.py
|
johncolezhang/DeepKE
|
ea4552ec42cb003a835f00fc14fb454f9a9a7183
|
[
"MIT"
] | 183
|
2018-09-07T06:57:13.000Z
|
2021-08-01T08:50:15.000Z
|
from .standard import *
from .few_shot import *
| 16
| 23
| 0.75
| 7
| 48
| 5
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 48
| 2
| 24
| 24
| 0.875
| 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
| 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
| 6
|
8757b04fd4b2fb6a8af17658469898c40069ccbc
| 4,776
|
py
|
Python
|
tests/package/aeronpy/archive_test.py
|
welly87/aeron-python
|
300a4344dd7f1526aeafb3a23fe5c85fb3313ad1
|
[
"Apache-2.0"
] | 9
|
2018-11-16T03:06:22.000Z
|
2022-03-13T19:14:15.000Z
|
tests/package/aeronpy/archive_test.py
|
welly87/aeron-python
|
300a4344dd7f1526aeafb3a23fe5c85fb3313ad1
|
[
"Apache-2.0"
] | 1
|
2021-11-10T12:43:09.000Z
|
2021-11-10T12:43:09.000Z
|
tests/package/aeronpy/archive_test.py
|
welly87/aeron-python
|
300a4344dd7f1526aeafb3a23fe5c85fb3313ad1
|
[
"Apache-2.0"
] | 7
|
2019-01-21T13:52:03.000Z
|
2022-03-08T21:09:06.000Z
|
import os
from hamcrest import *
from pytest import fixture
from tempfile import _get_candidate_names as temp_dir_candidates, tempdir
from time import sleep
from aeronpy import Archive
from aeronpy.driver import archiving_media_driver
@fixture()
def aeron_directory():
temp_dirs = temp_dir_candidates()
where = os.path.join(tempdir, next(temp_dirs))
where_archive = os.path.join(tempdir, next(temp_dirs))
with archiving_media_driver.launch(aeron_directory_name=where, archive_directory_name=where_archive):
yield where
@fixture()
def config_file():
here, _ = os.path.split(__file__)
return os.path.join(here, 'archive.properties')
def test__archive_create(aeron_directory):
archive = Archive(aeron_dir=aeron_directory)
assert_that(archive, is_not(None))
def test__archive_create__with_config(aeron_directory, config_file):
archive = Archive(config_file=config_file, aeron_dir=aeron_directory)
assert_that(archive, is_not(None))
def test__archive_add_recorded_publication(aeron_directory):
archive = Archive(aeron_dir=aeron_directory, aeron_archive_dir=aeron_directory)
recording = archive.find_last('aeron:ipc', 5000)
assert_that(recording, is_(None))
publication = archive.add_recorded_publication('aeron:ipc', 5000)
sleep(0.5)
recording = archive.find_last('aeron:ipc', 5000)
assert_that(recording, is_not(None))
assert_that(recording.id, is_(equal_to(0)))
result = publication.offer(b'abc')
assert_that(result, is_(greater_than(0)))
sleep(0.5)
assert_that(recording.position, is_(equal_to(result)))
def test__archive_add_recorded_exclusive_publication(aeron_directory):
archive = Archive(aeron_dir=aeron_directory, aeron_archive_dir=aeron_directory)
recording = archive.find_last('aeron:ipc', 5000)
assert_that(recording, is_(None))
publication = archive.add_recorded_exclusive_publication('aeron:ipc', 5000)
sleep(0.5)
recording = archive.find_last('aeron:ipc', 5000)
assert_that(recording, is_not(None))
assert_that(recording.id, is_(equal_to(0)))
result = publication.offer(b'abc')
assert_that(result, is_(greater_than(0)))
sleep(0.5)
assert_that(recording.position, is_(equal_to(result)))
def test__recording_find(aeron_directory):
archive = Archive(aeron_dir=aeron_directory, aeron_archive_dir=aeron_directory)
publication = archive.add_recorded_publication('aeron:ipc', 5000)
sleep(0.5)
recording = archive.find(0)
assert_that(recording, is_not(None))
assert_that(recording.position, is_(equal_to(0)))
def test__recording_replay(aeron_directory):
archive = Archive(aeron_dir=aeron_directory, aeron_archive_dir=aeron_directory)
publication = archive.add_recorded_publication('aeron:ipc', 5000)
offer_result = publication.offer(b'abc')
assert_that(offer_result, is_(greater_than(0)))
offer_result = publication.offer(b'def')
assert_that(offer_result, is_(greater_than(0)))
sleep(0.5)
recording = archive.find_last('aeron:ipc', 5000)
subscription = recording.replay('aeron:ipc', 6000)
assert_that(archive.find_last('aeron:ipc', 6000), is_(None))
replayed = list()
subscription.poll(lambda data: replayed.append(bytes(data)))
assert_that(replayed, has_length(2))
assert_that(replayed, has_items(equal_to(b'abc'), equal_to(b'def')))
def test__recording_replay__from_position(aeron_directory):
archive = Archive(aeron_dir=aeron_directory, aeron_archive_dir=aeron_directory)
publication = archive.add_recorded_publication('aeron:ipc', 5000)
offer_result = publication.offer(b'abc')
assert_that(offer_result, is_(greater_than(0)))
offer_result = publication.offer(b'def')
assert_that(offer_result, is_(greater_than(0)))
sleep(0.5)
recording = archive.find_last('aeron:ipc', 5000)
subscription = recording.replay('aeron:ipc', 6000, 64)
assert_that(archive.find_last('aeron:ipc', 6000), is_(None))
replayed = list()
subscription.poll(lambda data: replayed.append(bytes(data)))
assert_that(replayed, has_length(1))
assert_that(replayed, has_items(equal_to(b'def')))
def test__recording_replay__from_position__not_aligned(aeron_directory):
archive = Archive(aeron_dir=aeron_directory, aeron_archive_dir=aeron_directory)
publication = archive.add_recorded_publication('aeron:ipc', 5000)
offer_result = publication.offer(b'abc')
assert_that(offer_result, is_(greater_than(0)))
offer_result = publication.offer(b'def')
assert_that(offer_result, is_(greater_than(0)))
sleep(0.5)
recording = archive.find_last('aeron:ipc', 5000)
assert_that(calling(recording.replay).with_args('aeron:ipc', 6000, 50), raises(RuntimeError))
| 33.398601
| 105
| 0.751884
| 652
| 4,776
| 5.174847
| 0.138037
| 0.080024
| 0.070539
| 0.053349
| 0.809425
| 0.806165
| 0.795495
| 0.773266
| 0.747184
| 0.733254
| 0
| 0.025592
| 0.132747
| 4,776
| 142
| 106
| 33.633803
| 0.788991
| 0
| 0
| 0.628866
| 0
| 0
| 0.044598
| 0
| 0
| 0
| 0
| 0
| 0.278351
| 1
| 0.103093
| false
| 0
| 0.072165
| 0
| 0.185567
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
876886b10c5d7283b41479e686ebe38301aec6fb
| 477
|
py
|
Python
|
examples/src/python/example/tensorflow_custom_op/zero_out_custom_op.py
|
anthonyjpratti/pants
|
d98e53af6ddd877861231bce8343f8204da0a9d1
|
[
"Apache-2.0"
] | 1
|
2020-08-26T03:30:31.000Z
|
2020-08-26T03:30:31.000Z
|
examples/src/python/example/tensorflow_custom_op/zero_out_custom_op.py
|
wisechengyi/SCL-16273
|
18ed1fb4212879150ae5b292137d058894051fc6
|
[
"Apache-2.0"
] | 1
|
2020-01-21T16:34:02.000Z
|
2020-01-21T16:34:02.000Z
|
examples/src/python/example/tensorflow_custom_op/zero_out_custom_op.py
|
wisechengyi/SCL-16273
|
18ed1fb4212879150ae5b292137d058894051fc6
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import tensorflow as tf
# TODO: It would be great if we could maintain the example.tensorflow_custom_op package prefix for
# this python_dist()!
from wrap_lib.wrap_zero_out_op import zero_out_op_lib_path
# We make this a function in order to lazily load the op library.
def zero_out_module():
return tf.load_op_library(zero_out_op_lib_path)
| 36.692308
| 98
| 0.802935
| 82
| 477
| 4.439024
| 0.670732
| 0.076923
| 0.074176
| 0.065934
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014634
| 0.140461
| 477
| 12
| 99
| 39.75
| 0.873171
| 0.643606
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 6
|
876d3c5c12899518f4cf30525e0379bbda345c36
| 35,248
|
py
|
Python
|
src/import_dbf/migrations/0001_initial.py
|
iplweb/django-bpp
|
85f183a99d8d5027ae4772efac1e4a9f21675849
|
[
"BSD-3-Clause"
] | 1
|
2017-04-27T19:50:02.000Z
|
2017-04-27T19:50:02.000Z
|
src/import_dbf/migrations/0001_initial.py
|
mpasternak/django-bpp
|
434338821d5ad1aaee598f6327151aba0af66f5e
|
[
"BSD-3-Clause"
] | 41
|
2019-11-07T00:07:02.000Z
|
2022-02-27T22:09:39.000Z
|
src/import_dbf/migrations/0001_initial.py
|
iplweb/bpp
|
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
|
[
"BSD-3-Clause"
] | null | null | null |
# Generated by Django 2.1.13 on 2019-11-03 14:05
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateModel(
name='Aut',
fields=[
('idt_aut', models.TextField(primary_key=True, serialize=False)),
('imiona', models.TextField(blank=True, null=True)),
('nazwisko', models.TextField(blank=True, null=True)),
('ref', models.TextField(blank=True, null=True)),
('kad_nr', models.TextField(blank=True, null=True)),
('tel', models.TextField(blank=True, null=True)),
('email', models.TextField(blank=True, null=True)),
('www', models.TextField(blank=True, null=True)),
('imiona_bz', models.TextField(blank=True, null=True)),
('nazwisk_bz', models.TextField(blank=True, null=True)),
('tytul', models.TextField(blank=True, null=True)),
('stanowisko', models.TextField(blank=True, null=True)),
('prac_od', models.TextField(blank=True, null=True)),
('dat_zwol', models.TextField(blank=True, null=True)),
('fg', models.TextField(blank=True, null=True)),
('dop', models.TextField(blank=True, null=True)),
('nr_ewid', models.TextField(blank=True, null=True)),
('kad_s_jed', models.TextField(blank=True, null=True)),
('pbn_id', models.TextField(blank=True, null=True)),
('res_id', models.TextField(blank=True, null=True)),
('scop_id', models.TextField(blank=True, null=True)),
('orcid_id', models.TextField(blank=True, null=True)),
('exp_id', models.TextField(blank=True, null=True)),
('polon_id', models.TextField(blank=True, null=True)),
('usos_id', models.TextField(blank=True, null=True)),
('udf_id', models.TextField(blank=True, null=True)),
('control', models.TextField(blank=True, null=True)),
('uwagi', models.TextField(blank=True, null=True)),
('graf', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany autor',
'verbose_name_plural': 'zaimportowani autorzy',
'db_table': 'import_dbf_aut',
'ordering': ('nazwisko', 'imiona'),
'managed': False,
},
),
migrations.CreateModel(
name='B_A',
fields=[
('id', models.IntegerField(primary_key=True, serialize=False)),
('lp', models.TextField(blank=True, null=True)),
('wspz', models.TextField(blank=True, null=True)),
('pkt_dod', models.TextField(blank=True, null=True)),
('wspz2', models.TextField(blank=True, null=True)),
('pkt2_dod', models.TextField(blank=True, null=True)),
('afiliacja', models.TextField(blank=True, null=True)),
('odp', models.TextField(blank=True, null=True)),
('study_ga', models.TextField(blank=True, null=True)),
('tytul', models.TextField(blank=True, null=True)),
('stanowisko', models.TextField(blank=True, null=True)),
('uwagi', models.TextField(blank=True, null=True)),
('object_id', models.PositiveIntegerField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_b_a',
'ordering': ('idt__tytul_or_s', 'lp'),
'managed': False,
},
),
migrations.CreateModel(
name='B_B',
fields=[
('idt', models.TextField(primary_key=True, serialize=False)),
('lp', models.TextField(blank=True, null=True)),
('idt_bazy', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_b_b',
'managed': False,
},
),
migrations.CreateModel(
name='B_E',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('idt', models.IntegerField()),
('lp', models.TextField(blank=True, null=True)),
('idt_eng', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_b_e',
'managed': False,
},
),
migrations.CreateModel(
name='B_L',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('idt', models.IntegerField()),
('idt_l', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_b_l',
'managed': False,
},
),
migrations.CreateModel(
name='B_N',
fields=[
('idt', models.TextField(primary_key=True, serialize=False)),
('lp', models.TextField(blank=True, null=True)),
('idt_pbn', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_b_n',
'managed': False,
},
),
migrations.CreateModel(
name='B_P',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('idt', models.IntegerField()),
('lp', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_b_p',
'managed': False,
},
),
migrations.CreateModel(
name='B_U',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('comm', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowane dane OA rekordu',
'verbose_name_plural': 'zaimportowane dane OA rekordow',
'db_table': 'import_dbf_b_u',
'ordering': ('idt', 'comm'),
'managed': False,
},
),
migrations.CreateModel(
name='Dys',
fields=[
('orcid_id', models.TextField(primary_key=True, serialize=False)),
('a_n', models.TextField(blank=True, null=True)),
('a_w_etatu', models.TextField(blank=True, null=True)),
('a_dysc_1', models.TextField(blank=True, null=True)),
('a_dysc_2', models.TextField(blank=True, null=True)),
('a_dysc_1_e', models.TextField(blank=True, null=True)),
('a_dysc_2_e', models.TextField(blank=True, null=True)),
('b_n', models.TextField(blank=True, null=True)),
('b_w_etatu', models.TextField(blank=True, null=True)),
('b_dysc_1', models.TextField(blank=True, null=True)),
('b_dysc_2', models.TextField(blank=True, null=True)),
('b_dysc_1_e', models.TextField(blank=True, null=True)),
('b_dysc_2_e', models.TextField(blank=True, null=True)),
('c_n', models.TextField(blank=True, null=True)),
('c_w_etatu', models.TextField(blank=True, null=True)),
('c_dysc_1', models.TextField(blank=True, null=True)),
('c_dysc_2', models.TextField(blank=True, null=True)),
('c_dysc_1_e', models.TextField(blank=True, null=True)),
('c_dysc_2_e', models.TextField(blank=True, null=True)),
('d_n', models.TextField(blank=True, null=True)),
('d_w_etatu', models.TextField(blank=True, null=True)),
('d_dysc_1', models.TextField(blank=True, null=True)),
('d_dysc_2', models.TextField(blank=True, null=True)),
('d_dysc_1_e', models.TextField(blank=True, null=True)),
('d_dysc_2_e', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowana dyscyplina pracownika',
'verbose_name_plural': 'zaimportowane dyscypliny pracowników',
'db_table': 'import_dbf_dys',
'managed': False,
},
),
migrations.CreateModel(
name='Ext',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cont', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_ext',
'managed': False,
},
),
migrations.CreateModel(
name='Ixb',
fields=[
('idt_bazy', models.TextField(primary_key=True, serialize=False)),
('baza', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowana baza',
'verbose_name_plural': 'zaimportowane bazy',
'db_table': 'import_dbf_ixb',
'managed': False,
},
),
migrations.CreateModel(
name='Ixe',
fields=[
('idt_eng', models.TextField(primary_key=True, serialize=False)),
('haslo', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowane hasło naukowe',
'verbose_name_plural': 'zaimportowane hasła naukowe',
'db_table': 'import_dbf_ixe',
'managed': False,
},
),
migrations.CreateModel(
name='Ixn',
fields=[
('idt_pbn', models.TextField(blank=True, primary_key=True, serialize=False)),
('pbn', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany identyfikator PBN',
'verbose_name_plural': 'zaimportowane identyfikatory PBN',
'db_table': 'import_dbf_ixn',
'managed': False,
},
),
migrations.CreateModel(
name='Ixp',
fields=[
('idt_pol', models.TextField(primary_key=True, serialize=False)),
('haslo', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_ixp',
'managed': False,
},
),
migrations.CreateModel(
name='J_H',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('rok', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany rekord historii jednostek',
'verbose_name_plural': 'zaimportowane rekordy historii jednostek',
'db_table': 'import_dbf_j_h',
'managed': False,
},
),
migrations.CreateModel(
name='Jed',
fields=[
('idt_jed', models.TextField(primary_key=True, serialize=False)),
('nr', models.TextField(blank=True, null=True)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('wyd_skrot', models.TextField(blank=True, null=True)),
('sort', models.TextField(blank=True, null=True)),
('to_print', models.TextField(blank=True, null=True)),
('to_print2', models.TextField(blank=True, null=True)),
('to_print3', models.TextField(blank=True, null=True)),
('to_print4', models.TextField(blank=True, null=True)),
('to_print5', models.TextField(blank=True, null=True)),
('email', models.TextField(blank=True, null=True)),
('www', models.TextField(blank=True, null=True)),
('id_u', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_jed',
'managed': False,
},
),
migrations.CreateModel(
name='Jer',
fields=[
('nr', models.TextField(primary_key=True, serialize=False)),
('od_roku', models.TextField(blank=True, null=True)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('wyd_skrot', models.TextField(blank=True, null=True)),
('id_u', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_jer',
'managed': False,
},
),
migrations.CreateModel(
name='Jez',
fields=[
('skrot', models.TextField(primary_key=True, serialize=False)),
('nazwa', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany język',
'verbose_name_plural': 'zaimportowane języki',
'db_table': 'import_dbf_jez',
'managed': False,
},
),
migrations.CreateModel(
name='Kad',
fields=[
('nr', models.TextField(primary_key=True, serialize=False)),
('na', models.TextField(blank=True, null=True)),
('im1', models.TextField(blank=True, null=True)),
('im2', models.TextField(blank=True, null=True)),
('s_jed', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_kad',
'managed': False,
},
),
migrations.CreateModel(
name='Kbn',
fields=[
('idt_kbn', models.TextField(primary_key=True, serialize=False)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('to_print', models.TextField(blank=True, null=True)),
('to_print2', models.TextField(blank=True, null=True)),
('to_print3', models.TextField(blank=True, null=True)),
('to_print4', models.TextField(blank=True, null=True)),
('to_print5', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany typ KBN',
'verbose_name_plural': 'zaimportowane typy KBN',
'db_table': 'import_dbf_kbn',
'managed': False,
},
),
migrations.CreateModel(
name='Kbr',
fields=[
('idt_kbr', models.TextField(primary_key=True, serialize=False)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('to_print', models.TextField(blank=True, null=True)),
('to_print2', models.TextField(blank=True, null=True)),
('to_print3', models.TextField(blank=True, null=True)),
('to_print4', models.TextField(blank=True, null=True)),
('to_print5', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany rekord KBR',
'verbose_name_plural': 'zaimportowane rekordy KBR',
'db_table': 'import_dbf_kbr',
'managed': False,
},
),
migrations.CreateModel(
name='Ldy',
fields=[
('id', models.TextField(primary_key=True, serialize=False)),
('dziedzina', models.TextField(blank=True, null=True)),
('dyscyplina', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowana dziedzina',
'verbose_name_plural': 'zaimportowane dziedziny',
'db_table': 'import_dbf_ldy',
'managed': False,
},
),
migrations.CreateModel(
name='Lis',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('rok', models.TextField(blank=True, null=True)),
('kategoria', models.TextField(blank=True, null=True)),
('numer', models.TextField(blank=True, null=True)),
('tytul', models.TextField(blank=True, null=True)),
('issn', models.TextField(blank=True, null=True)),
('eissn', models.TextField(blank=True, null=True)),
('punkty', models.TextField(blank=True, null=True)),
('sobowtor', models.TextField(blank=True, null=True)),
('errissn', models.TextField(blank=True, null=True)),
('dblissn', models.TextField(blank=True, null=True)),
('dbltitul', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowana lista wydawców',
'verbose_name_plural': 'zaimportowane listy wydawców',
'db_table': 'import_dbf_lis',
'managed': False,
},
),
migrations.CreateModel(
name='Loc',
fields=[
('ident', models.TextField(primary_key=True, serialize=False)),
('ext', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_loc',
'managed': False,
},
),
migrations.CreateModel(
name='Pba',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('idt', models.TextField(blank=True, null=True)),
('idt_pbn', models.TextField(blank=True, null=True)),
('wyd_skrot', models.TextField(blank=True, null=True)),
('date', models.TextField(blank=True, null=True)),
('category', models.TextField(blank=True, null=True)),
('details', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_pba',
'managed': False,
},
),
migrations.CreateModel(
name='Pbb',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('rep_f_name', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_pbb',
'managed': False,
},
),
migrations.CreateModel(
name='Pbc',
fields=[
('idt', models.TextField(primary_key=True, serialize=False)),
('wyd_skrot', models.TextField(blank=True, null=True)),
('date', models.TextField(blank=True, null=True)),
('category', models.TextField(blank=True, null=True)),
('details', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_pbc',
'managed': False,
},
),
migrations.CreateModel(
name='Pbd',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('rep_f_name', models.TextField(blank=True, null=True)),
('field_ignore_me', models.TextField(blank=True, db_column='_ignore_me', null=True)),
],
options={
'db_table': 'import_dbf_pbd',
'managed': False,
},
),
migrations.CreateModel(
name='Poz',
fields=[
('id', models.IntegerField(primary_key=True, serialize=False)),
('kod_opisu', models.TextField(blank=True, null=True)),
('lp', models.PositiveSmallIntegerField()),
('tresc', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany opis rekordu',
'verbose_name_plural': 'zaimportowane opisy rekordow',
'db_table': 'import_dbf_poz',
'ordering': ('idt', 'kod_opisu', 'lp'),
'managed': False,
},
),
migrations.CreateModel(
name='Pub',
fields=[
('idt_pub', models.TextField(primary_key=True, serialize=False)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('to_print', models.TextField(blank=True, null=True)),
('to_print2', models.TextField(blank=True, null=True)),
('to_print3', models.TextField(blank=True, null=True)),
('to_print4', models.TextField(blank=True, null=True)),
('to_print5', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany charakter publikacji',
'verbose_name_plural': 'zaimportowane charaktery publikacji',
'db_table': 'import_dbf_pub',
'managed': False,
},
),
migrations.CreateModel(
name='Rtf',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('idt', models.TextField(blank=True, null=True)),
('lp', models.TextField(blank=True, null=True)),
('len', models.TextField(blank=True, null=True)),
('rtf', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_rtf',
'managed': False,
},
),
migrations.CreateModel(
name='S_B',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('idt_sci', models.TextField(blank=True, null=True)),
('cit', models.TextField(blank=True, null=True)),
('doi', models.TextField(blank=True, null=True)),
('del_field', models.TextField(blank=True, db_column='del', null=True)),
('redaktor', models.TextField(blank=True, null=True)),
('dat_akt', models.TextField(blank=True, null=True)),
('autocyt', models.TextField(blank=True, null=True)),
('ut', models.TextField(blank=True, null=True)),
('ut0', models.TextField(blank=True, null=True)),
('uwagi', models.TextField(blank=True, null=True)),
('field_ignore_me', models.TextField(blank=True, db_column='_ignore_me', null=True)),
],
options={
'db_table': 'import_dbf_s_b',
'managed': False,
},
),
migrations.CreateModel(
name='Sci',
fields=[
('idt_sci', models.TextField(primary_key=True, serialize=False)),
('au', models.TextField(blank=True, null=True)),
('ti', models.TextField(blank=True, null=True)),
('src', models.TextField(blank=True, null=True)),
('ye', models.TextField(blank=True, null=True)),
('cont', models.TextField(blank=True, null=True)),
('ut', models.TextField(blank=True, null=True)),
('field_ignore_me', models.TextField(blank=True, db_column='_ignore_me', null=True)),
],
options={
'db_table': 'import_dbf_sci',
'managed': False,
},
),
migrations.CreateModel(
name='Ses',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('redaktor', models.TextField(blank=True, null=True)),
('file', models.TextField(blank=True, null=True)),
('login_t', models.TextField(blank=True, null=True)),
('logout_t', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_ses',
'managed': False,
},
),
migrations.CreateModel(
name='Sys',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ver', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowana wersja bazy',
'verbose_name_plural': 'zaimportowane wersje bazy',
'db_table': 'import_dbf_sys',
'managed': False,
},
),
migrations.CreateModel(
name='Usi',
fields=[
('idt_usi', models.IntegerField(primary_key=True, serialize=False)),
('usm_f', models.TextField(blank=True, null=True)),
('usm_sf', models.TextField(blank=True, null=True)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowane źródło',
'verbose_name_plural': 'zaimportowane źródła',
'db_table': 'import_dbf_usi',
'managed': False,
},
),
migrations.CreateModel(
name='Wsx',
fields=[
('idt_wsx', models.TextField(primary_key=True, serialize=False)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('wsp', models.TextField(blank=True, null=True)),
('field_ignore_me', models.TextField(blank=True, db_column='_ignore_me', null=True)),
],
options={
'db_table': 'import_dbf_wsx',
'managed': False,
},
),
migrations.CreateModel(
name='Wsy',
fields=[
('idt_wsy', models.TextField(primary_key=True, serialize=False)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('wsp', models.TextField(blank=True, null=True)),
('field_ignore_me', models.TextField(blank=True, db_column='_ignore_me', null=True)),
],
options={
'db_table': 'import_dbf_wsy',
'managed': False,
},
),
migrations.CreateModel(
name='Wx2',
fields=[
('idt_wsx', models.TextField(primary_key=True, serialize=False)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
('wsp', models.TextField(blank=True, null=True)),
],
options={
'db_table': 'import_dbf_wx2',
'managed': False,
},
),
migrations.CreateModel(
name='Wyd',
fields=[
('idt_wyd', models.TextField(primary_key=True, serialize=False)),
('skrot', models.TextField(blank=True, null=True)),
('nazwa', models.TextField(blank=True, null=True)),
],
options={
'verbose_name': 'zaimportowany wydział',
'verbose_name_plural': 'zaimportowane wydzialy',
'db_table': 'import_dbf_wyd',
'managed': False,
},
),
migrations.CreateModel(
name='Bib',
fields=[
('idt', models.IntegerField(primary_key=True, serialize=False)),
('tytul_or', models.TextField(blank=True, null=True)),
('title', models.TextField(blank=True, null=True)),
('zrodlo', models.TextField(blank=True, null=True)),
('szczegoly', models.TextField(blank=True, null=True)),
('uwagi', models.TextField(blank=True, null=True)),
('charakter', models.TextField(blank=True, null=True)),
('impact', models.TextField(blank=True, null=True)),
('redakcja', models.TextField(blank=True, null=True)),
('status', models.TextField(blank=True, null=True)),
('rok', models.TextField(blank=True, null=True)),
('sort', models.TextField(blank=True, null=True)),
('sort2', models.TextField(blank=True, null=True)),
('export', models.TextField(blank=True, null=True)),
('import_field', models.TextField(blank=True, db_column='import', null=True)),
('naz_imie', models.TextField(blank=True, null=True)),
('redaktor', models.TextField(blank=True, null=True)),
('redaktor0', models.TextField(blank=True, null=True)),
('tytul_or_s', models.TextField(blank=True, null=True)),
('title_s', models.TextField(blank=True, null=True)),
('zrodlo_s', models.TextField(blank=True, null=True)),
('szczegol_s', models.TextField(blank=True, null=True)),
('mem_fi_ext', models.TextField(blank=True, null=True)),
('dat_akt', models.TextField(blank=True, null=True)),
('kbn', models.TextField(blank=True, null=True)),
('kbr', models.TextField(blank=True, null=True)),
('afiliowana', models.TextField(blank=True, null=True)),
('recenzowan', models.TextField(blank=True, null=True)),
('jezyk', models.TextField(blank=True, null=True)),
('jezyk2', models.TextField(blank=True, null=True)),
('punkty_kbn', models.TextField(blank=True, db_column='pk', null=True)),
('x_skrot', models.TextField(blank=True, null=True)),
('wspx', models.TextField(blank=True, null=True)),
('x2_skrot', models.TextField(blank=True, null=True)),
('wspx2', models.TextField(blank=True, null=True)),
('y_skrot', models.TextField(blank=True, null=True)),
('wspy', models.TextField(blank=True, null=True)),
('wspq', models.TextField(blank=True, null=True)),
('ic', models.TextField(blank=True, null=True)),
('rok_inv', models.TextField(blank=True, null=True)),
('link', models.TextField(blank=True, null=True)),
('lf', models.TextField(blank=True, null=True)),
('rok_punkt', models.TextField(blank=True, null=True)),
('form', models.TextField(blank=True, null=True)),
('k_z', models.TextField(blank=True, null=True)),
('uwagi2', models.TextField(blank=True, null=True)),
('dat_utw', models.TextField(blank=True, null=True)),
('pun_wl', models.TextField(blank=True, null=True)),
('study_gr', models.TextField(blank=True, null=True)),
('sort_fixed', models.TextField(blank=True, null=True)),
('zaznacz_field', models.TextField(blank=True, db_column='zaznacz_', null=True)),
('idt2', models.TextField(blank=True, null=True)),
('pun_max', models.TextField(blank=True, null=True)),
('pun_erih', models.TextField(blank=True, null=True)),
('kwartyl', models.TextField(blank=True, null=True)),
('issn', models.TextField(blank=True, null=True)),
('eissn', models.TextField(blank=True, null=True)),
('wok_id', models.TextField(blank=True, null=True)),
('sco_id', models.TextField(blank=True, null=True)),
('mnsw_fixed', models.TextField(blank=True, null=True)),
('liczba_aut', models.TextField(blank=True, null=True)),
('pro_p_wydz', models.TextField(blank=True, null=True)),
('snip', models.TextField(blank=True, null=True)),
('sjr', models.TextField(blank=True, null=True)),
('cites', models.TextField(blank=True, null=True)),
('if5', models.TextField(blank=True, null=True)),
('lis_numer', models.TextField(blank=True, null=True)),
('object_id', models.PositiveIntegerField(blank=True, null=True)),
('analyzed', models.BooleanField(default=False)),
('content_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='contenttypes.ContentType')),
],
options={
'verbose_name': 'zaimportowany rekord bibliografi',
'verbose_name_plural': 'zaimportowane rekordy bibliografi',
'db_table': 'import_dbf_bib',
},
),
migrations.CreateModel(
name='Bib_Desc',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('elem_id', models.PositiveSmallIntegerField(db_index=True)),
('value', django.contrib.postgres.fields.jsonb.JSONField()),
('source', models.CharField(max_length=10)),
('idt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='import_dbf.Bib')),
],
options={
'ordering': ('idt', 'source'),
},
),
]
| 47.06008
| 154
| 0.513958
| 3,356
| 35,248
| 5.254768
| 0.097139
| 0.241565
| 0.297136
| 0.356564
| 0.852679
| 0.766033
| 0.63856
| 0.516813
| 0.504848
| 0.447576
| 0
| 0.002947
| 0.33582
| 35,248
| 748
| 155
| 47.122995
| 0.750331
| 0.001305
| 0
| 0.519568
| 1
| 0
| 0.142585
| 0.001506
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.110661
| 0
| 0.116059
| 0.026991
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
5e5ffe2a9f4736427871c3d92473b21c233a6146
| 2,273
|
py
|
Python
|
tests/contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/test_michelson_coding_KT1Ki9.py
|
juztin/pytezos-1
|
7e608ff599d934bdcf129e47db43dbdb8fef9027
|
[
"MIT"
] | 1
|
2021-05-20T16:52:08.000Z
|
2021-05-20T16:52:08.000Z
|
tests/contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/test_michelson_coding_KT1Ki9.py
|
juztin/pytezos-1
|
7e608ff599d934bdcf129e47db43dbdb8fef9027
|
[
"MIT"
] | 1
|
2020-12-30T16:44:56.000Z
|
2020-12-30T16:44:56.000Z
|
tests/contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/test_michelson_coding_KT1Ki9.py
|
tqtezos/pytezos
|
a4ac0b022d35d4c9f3062609d8ce09d584b5faa8
|
[
"MIT"
] | 1
|
2022-03-20T19:01:00.000Z
|
2022-03-20T19:01:00.000Z
|
from unittest import TestCase
from tests import get_data
from pytezos.michelson.micheline import michelson_to_micheline
from pytezos.michelson.formatter import micheline_to_michelson
class MichelsonCodingTestKT1Ki9(TestCase):
def setUp(self):
self.maxDiff = None
def test_michelson_parse_code_KT1Ki9(self):
expected = get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/code_KT1Ki9.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/code_KT1Ki9.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_code_KT1Ki9(self):
expected = get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/code_KT1Ki9.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/code_KT1Ki9.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_code_KT1Ki9(self):
expected = get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/code_KT1Ki9.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
def test_michelson_parse_storage_KT1Ki9(self):
expected = get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/storage_KT1Ki9.json')
actual = michelson_to_micheline(get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/storage_KT1Ki9.tz'))
self.assertEqual(expected, actual)
def test_michelson_format_storage_KT1Ki9(self):
expected = get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/storage_KT1Ki9.tz')
actual = micheline_to_michelson(get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/storage_KT1Ki9.json'),
inline=True)
self.assertEqual(expected, actual)
def test_michelson_inverse_storage_KT1Ki9(self):
expected = get_data(
path='contracts/KT1Ki9hCRhWERgvVvXvVnFR3ruwM9sR5eLAN/storage_KT1Ki9.json')
actual = michelson_to_micheline(micheline_to_michelson(expected))
self.assertEqual(expected, actual)
| 42.092593
| 87
| 0.736472
| 222
| 2,273
| 7.247748
| 0.162162
| 0.047856
| 0.068365
| 0.124301
| 0.845245
| 0.845245
| 0.845245
| 0.835301
| 0.821628
| 0.821628
| 0
| 0.045652
| 0.190497
| 2,273
| 53
| 88
| 42.886792
| 0.828804
| 0
| 0
| 0.55814
| 0
| 0
| 0.280246
| 0.280246
| 0
| 0
| 0
| 0
| 0.139535
| 1
| 0.162791
| false
| 0
| 0.093023
| 0
| 0.27907
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
5e8667c8bd08530e3798b28c3658e7a0a6e72243
| 258,420
|
py
|
Python
|
instances/passenger_demand/pas-20210422-1717-int1/69.py
|
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
|
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
|
[
"BSD-3-Clause"
] | null | null | null |
instances/passenger_demand/pas-20210422-1717-int1/69.py
|
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
|
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
|
[
"BSD-3-Clause"
] | null | null | null |
instances/passenger_demand/pas-20210422-1717-int1/69.py
|
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
|
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
|
[
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 19216
passenger_arriving = (
(7, 4, 4, 3, 2, 1, 4, 2, 4, 2, 0, 0, 0, 7, 5, 8, 3, 7, 1, 3, 0, 1, 2, 1, 1, 0), # 0
(4, 7, 2, 3, 3, 1, 2, 5, 2, 1, 1, 0, 0, 6, 4, 4, 3, 2, 1, 5, 1, 1, 1, 0, 1, 0), # 1
(6, 4, 5, 6, 2, 1, 2, 4, 1, 1, 0, 0, 0, 11, 3, 6, 7, 7, 0, 3, 2, 1, 2, 0, 0, 0), # 2
(6, 3, 6, 7, 6, 1, 3, 3, 1, 2, 1, 0, 0, 7, 11, 8, 2, 4, 3, 0, 0, 2, 2, 0, 0, 0), # 3
(11, 5, 8, 3, 6, 1, 2, 2, 2, 0, 0, 0, 0, 6, 9, 5, 1, 5, 1, 2, 1, 1, 1, 0, 0, 0), # 4
(3, 5, 7, 7, 5, 2, 5, 3, 3, 2, 3, 0, 0, 9, 10, 3, 2, 7, 2, 1, 0, 3, 1, 1, 2, 0), # 5
(6, 4, 5, 5, 6, 2, 1, 3, 4, 1, 0, 2, 0, 7, 6, 2, 4, 4, 1, 3, 1, 3, 5, 0, 2, 0), # 6
(5, 8, 6, 4, 6, 0, 6, 4, 2, 1, 2, 0, 0, 9, 6, 2, 5, 3, 0, 1, 1, 3, 2, 2, 0, 0), # 7
(6, 3, 2, 11, 4, 2, 7, 4, 2, 1, 1, 0, 0, 4, 4, 4, 1, 4, 5, 1, 2, 2, 2, 4, 0, 0), # 8
(7, 5, 8, 5, 10, 0, 7, 2, 4, 2, 1, 1, 0, 8, 3, 4, 3, 8, 4, 1, 4, 4, 3, 2, 1, 0), # 9
(3, 4, 12, 6, 6, 4, 4, 0, 2, 1, 0, 0, 0, 15, 3, 9, 3, 0, 4, 2, 2, 4, 3, 2, 1, 0), # 10
(9, 11, 8, 8, 4, 3, 2, 0, 3, 2, 0, 1, 0, 6, 12, 7, 4, 7, 2, 5, 4, 3, 3, 2, 1, 0), # 11
(8, 3, 6, 9, 10, 2, 9, 2, 4, 1, 1, 1, 0, 6, 5, 7, 1, 5, 4, 3, 2, 4, 1, 0, 2, 0), # 12
(5, 11, 12, 7, 6, 3, 5, 4, 3, 2, 1, 3, 0, 16, 6, 8, 8, 8, 1, 2, 4, 2, 2, 2, 1, 0), # 13
(17, 12, 8, 14, 4, 2, 2, 5, 4, 0, 2, 1, 0, 11, 4, 9, 6, 10, 1, 2, 2, 4, 1, 1, 0, 0), # 14
(12, 11, 13, 8, 13, 2, 5, 3, 4, 0, 0, 0, 0, 16, 7, 2, 8, 6, 4, 4, 4, 3, 2, 1, 1, 0), # 15
(7, 5, 4, 7, 9, 1, 5, 4, 4, 4, 1, 1, 0, 11, 10, 4, 7, 8, 7, 5, 1, 3, 4, 0, 0, 0), # 16
(11, 7, 5, 6, 6, 6, 4, 1, 6, 0, 1, 1, 0, 9, 9, 6, 6, 7, 5, 2, 1, 1, 3, 0, 0, 0), # 17
(9, 12, 9, 3, 7, 4, 3, 2, 3, 2, 1, 2, 0, 12, 9, 6, 3, 7, 8, 4, 4, 5, 2, 2, 2, 0), # 18
(11, 15, 6, 8, 7, 6, 5, 6, 2, 1, 0, 1, 0, 11, 11, 3, 4, 9, 4, 6, 4, 4, 2, 3, 1, 0), # 19
(7, 11, 6, 10, 5, 4, 3, 2, 3, 2, 1, 0, 0, 7, 8, 8, 1, 11, 8, 6, 3, 4, 4, 3, 0, 0), # 20
(10, 9, 10, 11, 7, 3, 4, 3, 3, 1, 3, 2, 0, 10, 17, 12, 11, 6, 3, 2, 2, 5, 4, 2, 1, 0), # 21
(14, 8, 8, 11, 4, 6, 3, 3, 4, 1, 1, 0, 0, 11, 5, 6, 6, 15, 3, 1, 4, 5, 2, 1, 0, 0), # 22
(12, 17, 8, 14, 10, 2, 4, 2, 4, 3, 0, 1, 0, 11, 12, 7, 5, 9, 5, 2, 2, 1, 5, 2, 3, 0), # 23
(7, 12, 17, 16, 5, 3, 6, 4, 6, 1, 2, 0, 0, 13, 4, 5, 4, 14, 2, 3, 6, 5, 1, 1, 0, 0), # 24
(10, 11, 9, 7, 4, 6, 2, 1, 5, 3, 0, 3, 0, 5, 9, 8, 6, 8, 3, 4, 4, 3, 1, 4, 1, 0), # 25
(11, 7, 8, 8, 9, 5, 2, 5, 7, 3, 1, 1, 0, 10, 5, 11, 3, 11, 3, 7, 2, 3, 3, 3, 2, 0), # 26
(11, 8, 6, 7, 6, 5, 8, 0, 7, 0, 0, 0, 0, 11, 15, 8, 3, 9, 8, 5, 1, 4, 1, 1, 2, 0), # 27
(6, 15, 10, 15, 9, 2, 4, 5, 4, 4, 0, 0, 0, 16, 9, 7, 6, 7, 1, 6, 0, 7, 3, 0, 4, 0), # 28
(15, 3, 13, 9, 9, 6, 3, 3, 3, 1, 1, 0, 0, 6, 6, 8, 7, 13, 6, 5, 5, 5, 4, 0, 1, 0), # 29
(17, 12, 13, 7, 8, 3, 4, 3, 3, 1, 2, 1, 0, 14, 13, 3, 7, 11, 6, 6, 3, 6, 1, 2, 2, 0), # 30
(17, 10, 3, 9, 4, 3, 5, 2, 5, 3, 1, 1, 0, 12, 10, 4, 7, 12, 7, 5, 1, 3, 4, 1, 2, 0), # 31
(8, 10, 7, 8, 12, 1, 5, 4, 3, 0, 0, 3, 0, 8, 18, 7, 1, 13, 7, 6, 1, 3, 1, 1, 1, 0), # 32
(7, 5, 10, 8, 7, 4, 4, 8, 8, 5, 1, 0, 0, 8, 8, 5, 2, 4, 3, 6, 2, 4, 1, 3, 1, 0), # 33
(5, 10, 12, 11, 9, 7, 4, 4, 2, 1, 0, 1, 0, 9, 11, 6, 6, 11, 6, 5, 0, 1, 2, 2, 2, 0), # 34
(13, 11, 5, 8, 7, 4, 4, 4, 7, 2, 1, 0, 0, 13, 10, 5, 5, 11, 7, 3, 0, 1, 3, 0, 0, 0), # 35
(10, 12, 5, 7, 5, 5, 2, 6, 4, 2, 1, 3, 0, 10, 12, 15, 7, 11, 5, 6, 2, 2, 2, 0, 0, 0), # 36
(11, 11, 13, 9, 9, 4, 1, 1, 4, 2, 1, 1, 0, 13, 12, 6, 3, 7, 6, 5, 1, 4, 2, 2, 0, 0), # 37
(4, 7, 9, 5, 6, 3, 6, 1, 3, 2, 1, 1, 0, 13, 7, 4, 5, 14, 1, 4, 2, 1, 1, 1, 0, 0), # 38
(12, 8, 9, 11, 11, 4, 6, 8, 5, 5, 2, 1, 0, 6, 10, 6, 4, 11, 8, 6, 0, 8, 4, 4, 2, 0), # 39
(12, 14, 10, 9, 6, 2, 5, 0, 4, 2, 0, 2, 0, 10, 8, 5, 4, 7, 6, 3, 1, 3, 6, 1, 2, 0), # 40
(10, 13, 11, 10, 9, 5, 1, 5, 6, 4, 1, 0, 0, 11, 5, 7, 6, 8, 4, 4, 1, 4, 1, 1, 1, 0), # 41
(12, 9, 17, 9, 6, 6, 1, 3, 3, 3, 2, 0, 0, 13, 4, 7, 4, 4, 6, 3, 4, 2, 1, 2, 2, 0), # 42
(3, 14, 13, 6, 11, 5, 4, 3, 3, 2, 0, 3, 0, 13, 6, 8, 4, 6, 7, 9, 3, 2, 2, 3, 0, 0), # 43
(10, 12, 12, 8, 10, 3, 3, 10, 4, 2, 1, 1, 0, 8, 12, 10, 5, 9, 5, 6, 2, 5, 4, 2, 1, 0), # 44
(11, 11, 16, 8, 8, 2, 11, 5, 6, 1, 2, 2, 0, 10, 12, 7, 10, 8, 1, 6, 4, 4, 2, 2, 1, 0), # 45
(9, 10, 12, 14, 12, 5, 3, 2, 2, 1, 4, 0, 0, 12, 9, 8, 6, 13, 6, 3, 1, 4, 3, 3, 0, 0), # 46
(7, 8, 8, 4, 5, 2, 2, 2, 4, 4, 2, 0, 0, 17, 10, 9, 7, 9, 6, 3, 5, 4, 7, 5, 0, 0), # 47
(12, 8, 6, 14, 6, 1, 4, 2, 3, 0, 2, 0, 0, 19, 9, 7, 3, 7, 3, 4, 3, 3, 4, 1, 0, 0), # 48
(11, 8, 7, 8, 12, 5, 3, 2, 9, 1, 2, 0, 0, 14, 11, 8, 2, 4, 7, 3, 3, 7, 2, 1, 0, 0), # 49
(10, 10, 4, 7, 5, 3, 2, 1, 4, 2, 1, 0, 0, 14, 11, 3, 8, 5, 3, 7, 5, 3, 1, 1, 1, 0), # 50
(14, 11, 8, 14, 10, 3, 1, 2, 6, 1, 2, 0, 0, 12, 6, 2, 4, 7, 1, 5, 3, 5, 3, 1, 2, 0), # 51
(5, 16, 8, 10, 9, 6, 5, 7, 1, 3, 1, 2, 0, 14, 12, 4, 6, 8, 3, 3, 3, 5, 8, 2, 0, 0), # 52
(6, 9, 4, 13, 8, 2, 6, 4, 2, 1, 3, 2, 0, 13, 6, 6, 5, 15, 6, 4, 2, 5, 4, 0, 3, 0), # 53
(15, 15, 15, 12, 12, 2, 0, 3, 6, 0, 4, 1, 0, 10, 12, 8, 6, 5, 5, 4, 2, 6, 2, 2, 0, 0), # 54
(11, 8, 8, 6, 9, 4, 4, 1, 2, 4, 1, 1, 0, 3, 14, 5, 3, 7, 4, 4, 1, 1, 3, 3, 1, 0), # 55
(5, 10, 5, 12, 10, 3, 5, 5, 2, 1, 0, 0, 0, 10, 7, 11, 6, 8, 2, 6, 3, 1, 4, 6, 0, 0), # 56
(9, 11, 10, 13, 7, 4, 4, 2, 6, 3, 0, 1, 0, 11, 7, 9, 5, 7, 1, 6, 3, 1, 8, 1, 0, 0), # 57
(13, 12, 11, 6, 9, 1, 1, 5, 3, 4, 4, 0, 0, 14, 10, 9, 10, 10, 2, 6, 3, 3, 3, 1, 1, 0), # 58
(11, 11, 15, 9, 9, 5, 1, 3, 7, 3, 0, 2, 0, 11, 5, 7, 3, 6, 4, 3, 3, 2, 1, 1, 2, 0), # 59
(7, 12, 10, 11, 11, 4, 2, 5, 5, 0, 2, 0, 0, 5, 13, 13, 3, 11, 7, 6, 3, 2, 3, 2, 0, 0), # 60
(11, 5, 10, 12, 8, 1, 2, 0, 2, 1, 1, 0, 0, 4, 7, 4, 5, 13, 5, 3, 7, 3, 4, 2, 2, 0), # 61
(6, 4, 5, 10, 13, 1, 6, 3, 7, 1, 2, 2, 0, 9, 10, 3, 3, 8, 3, 6, 4, 8, 0, 0, 0, 0), # 62
(11, 11, 9, 5, 8, 3, 4, 2, 8, 4, 0, 1, 0, 12, 12, 11, 5, 8, 1, 5, 6, 7, 4, 1, 0, 0), # 63
(8, 11, 12, 7, 16, 3, 6, 4, 3, 1, 1, 2, 0, 14, 4, 6, 6, 7, 3, 4, 3, 2, 4, 1, 1, 0), # 64
(7, 11, 10, 10, 6, 5, 8, 1, 3, 2, 1, 2, 0, 12, 7, 8, 3, 11, 6, 4, 1, 5, 2, 1, 0, 0), # 65
(15, 6, 5, 11, 10, 2, 4, 7, 2, 1, 2, 1, 0, 14, 11, 7, 4, 9, 6, 4, 2, 2, 5, 4, 0, 0), # 66
(4, 7, 4, 10, 5, 4, 0, 4, 4, 3, 2, 0, 0, 14, 5, 11, 4, 6, 4, 5, 4, 3, 3, 2, 2, 0), # 67
(12, 10, 5, 8, 4, 1, 1, 5, 9, 2, 1, 1, 0, 13, 12, 4, 7, 8, 4, 4, 2, 3, 3, 2, 1, 0), # 68
(8, 9, 11, 8, 10, 4, 3, 5, 3, 1, 3, 1, 0, 11, 8, 8, 7, 8, 3, 1, 1, 1, 3, 3, 0, 0), # 69
(9, 6, 3, 11, 9, 3, 5, 2, 2, 3, 4, 1, 0, 11, 5, 7, 5, 9, 5, 4, 4, 5, 2, 0, 0, 0), # 70
(4, 7, 5, 5, 6, 5, 1, 3, 0, 4, 1, 0, 0, 9, 9, 9, 3, 10, 5, 5, 2, 5, 1, 3, 1, 0), # 71
(11, 6, 8, 11, 12, 3, 5, 1, 6, 4, 1, 2, 0, 16, 9, 4, 7, 8, 4, 9, 2, 5, 1, 2, 2, 0), # 72
(10, 10, 10, 5, 11, 5, 3, 3, 4, 0, 2, 1, 0, 15, 3, 8, 6, 8, 2, 6, 1, 4, 1, 0, 2, 0), # 73
(14, 8, 9, 8, 7, 6, 1, 1, 2, 1, 2, 0, 0, 13, 4, 4, 7, 5, 3, 9, 8, 5, 4, 1, 0, 0), # 74
(10, 11, 11, 9, 10, 1, 3, 2, 5, 1, 1, 0, 0, 14, 13, 7, 4, 8, 4, 4, 2, 7, 2, 3, 0, 0), # 75
(13, 10, 10, 12, 7, 6, 3, 3, 4, 3, 0, 1, 0, 12, 12, 9, 8, 4, 3, 3, 6, 2, 3, 2, 1, 0), # 76
(9, 7, 10, 7, 10, 5, 2, 4, 5, 2, 0, 2, 0, 11, 5, 6, 8, 12, 5, 6, 1, 3, 4, 1, 1, 0), # 77
(5, 7, 8, 5, 12, 2, 5, 1, 4, 1, 0, 1, 0, 8, 13, 6, 3, 6, 2, 4, 3, 3, 10, 3, 0, 0), # 78
(13, 11, 10, 3, 9, 4, 5, 3, 3, 0, 0, 0, 0, 10, 12, 8, 7, 5, 1, 4, 7, 5, 4, 0, 3, 0), # 79
(9, 9, 11, 11, 8, 1, 2, 1, 4, 4, 2, 1, 0, 10, 7, 2, 7, 8, 4, 3, 1, 3, 2, 2, 0, 0), # 80
(13, 4, 5, 11, 3, 3, 6, 4, 5, 0, 3, 0, 0, 8, 10, 3, 9, 4, 7, 3, 3, 4, 5, 0, 1, 0), # 81
(13, 9, 8, 4, 5, 3, 5, 3, 4, 1, 2, 1, 0, 12, 5, 7, 2, 7, 5, 0, 0, 2, 0, 2, 1, 0), # 82
(7, 9, 4, 5, 5, 2, 1, 2, 3, 1, 1, 0, 0, 10, 7, 5, 2, 9, 3, 1, 2, 3, 5, 1, 1, 0), # 83
(12, 6, 9, 7, 7, 6, 4, 2, 4, 1, 1, 0, 0, 10, 8, 3, 3, 6, 5, 4, 3, 1, 4, 2, 0, 0), # 84
(10, 10, 3, 7, 10, 4, 5, 3, 1, 1, 1, 2, 0, 9, 13, 3, 5, 5, 5, 3, 4, 5, 3, 1, 0, 0), # 85
(7, 10, 13, 11, 8, 3, 2, 2, 1, 3, 1, 0, 0, 5, 11, 7, 2, 6, 4, 5, 1, 3, 3, 1, 1, 0), # 86
(13, 10, 13, 12, 15, 4, 8, 2, 6, 0, 0, 1, 0, 9, 7, 6, 2, 9, 7, 8, 1, 6, 6, 2, 1, 0), # 87
(6, 10, 7, 12, 4, 4, 2, 2, 3, 4, 3, 1, 0, 11, 7, 9, 0, 2, 7, 4, 2, 4, 3, 0, 1, 0), # 88
(14, 10, 7, 11, 7, 2, 1, 1, 2, 1, 2, 1, 0, 6, 8, 5, 3, 9, 4, 5, 0, 4, 1, 3, 2, 0), # 89
(10, 6, 6, 13, 7, 2, 3, 2, 5, 1, 2, 1, 0, 11, 12, 7, 6, 9, 4, 5, 2, 1, 4, 0, 0, 0), # 90
(14, 8, 8, 7, 5, 3, 6, 1, 4, 3, 1, 0, 0, 12, 5, 4, 4, 9, 1, 5, 4, 0, 5, 3, 0, 0), # 91
(14, 7, 7, 7, 10, 6, 5, 1, 2, 1, 4, 0, 0, 10, 6, 5, 5, 11, 5, 2, 0, 5, 4, 0, 0, 0), # 92
(13, 10, 12, 7, 8, 3, 3, 3, 5, 1, 0, 1, 0, 14, 9, 8, 2, 12, 5, 3, 2, 3, 3, 5, 0, 0), # 93
(4, 4, 9, 7, 9, 3, 1, 3, 1, 1, 2, 0, 0, 12, 9, 3, 5, 10, 4, 3, 3, 2, 2, 2, 0, 0), # 94
(5, 9, 12, 10, 15, 4, 4, 6, 2, 2, 2, 0, 0, 13, 11, 0, 7, 7, 3, 1, 5, 3, 2, 0, 1, 0), # 95
(2, 6, 13, 9, 5, 2, 4, 5, 2, 0, 3, 0, 0, 12, 8, 3, 6, 7, 2, 3, 4, 3, 5, 3, 0, 0), # 96
(8, 6, 5, 6, 8, 4, 1, 2, 2, 0, 1, 1, 0, 9, 7, 4, 4, 7, 1, 4, 1, 2, 3, 1, 0, 0), # 97
(12, 12, 8, 7, 5, 2, 4, 5, 8, 0, 2, 1, 0, 10, 9, 5, 5, 9, 0, 4, 2, 6, 3, 1, 1, 0), # 98
(8, 9, 10, 6, 13, 7, 5, 4, 5, 2, 1, 3, 0, 12, 7, 7, 6, 6, 2, 3, 2, 8, 3, 4, 0, 0), # 99
(10, 12, 11, 4, 12, 3, 3, 4, 3, 2, 1, 0, 0, 8, 8, 4, 3, 5, 7, 2, 5, 5, 1, 1, 0, 0), # 100
(9, 8, 6, 4, 6, 1, 4, 3, 3, 3, 1, 1, 0, 11, 9, 4, 10, 11, 2, 1, 2, 3, 4, 2, 0, 0), # 101
(11, 8, 10, 10, 4, 5, 3, 0, 5, 2, 0, 0, 0, 13, 8, 3, 7, 10, 3, 1, 2, 6, 3, 2, 1, 0), # 102
(6, 9, 9, 7, 5, 5, 2, 2, 5, 0, 2, 2, 0, 14, 11, 5, 3, 8, 0, 2, 3, 5, 1, 0, 2, 0), # 103
(12, 8, 7, 5, 8, 4, 2, 2, 3, 3, 0, 0, 0, 9, 6, 5, 3, 7, 4, 0, 3, 3, 3, 2, 1, 0), # 104
(9, 6, 8, 14, 6, 4, 2, 2, 1, 1, 0, 1, 0, 6, 3, 6, 2, 5, 4, 6, 2, 1, 4, 2, 3, 0), # 105
(8, 13, 9, 7, 12, 6, 5, 4, 5, 1, 3, 0, 0, 13, 9, 7, 5, 6, 3, 1, 3, 3, 1, 1, 0, 0), # 106
(8, 8, 13, 8, 11, 0, 1, 4, 6, 1, 0, 0, 0, 9, 10, 4, 6, 5, 2, 3, 1, 1, 1, 0, 0, 0), # 107
(10, 8, 10, 13, 9, 5, 4, 1, 5, 1, 1, 0, 0, 9, 8, 4, 7, 10, 4, 0, 2, 3, 4, 0, 1, 0), # 108
(7, 8, 5, 7, 11, 7, 5, 4, 7, 1, 0, 1, 0, 14, 8, 8, 6, 10, 3, 1, 1, 3, 4, 1, 1, 0), # 109
(14, 8, 8, 7, 8, 2, 4, 1, 4, 2, 0, 0, 0, 10, 7, 2, 2, 4, 6, 2, 2, 2, 2, 3, 0, 0), # 110
(7, 13, 11, 4, 10, 2, 0, 0, 2, 1, 0, 0, 0, 13, 5, 6, 3, 3, 0, 4, 1, 0, 4, 2, 1, 0), # 111
(13, 5, 11, 8, 5, 4, 1, 2, 2, 2, 2, 0, 0, 7, 6, 10, 5, 7, 2, 3, 2, 2, 2, 0, 1, 0), # 112
(11, 8, 6, 6, 4, 6, 3, 2, 6, 0, 1, 1, 0, 2, 13, 5, 1, 13, 4, 5, 2, 2, 1, 1, 1, 0), # 113
(9, 9, 9, 8, 8, 6, 2, 3, 4, 2, 1, 2, 0, 7, 4, 9, 8, 7, 2, 2, 1, 3, 0, 3, 0, 0), # 114
(12, 10, 9, 8, 9, 4, 0, 0, 4, 0, 0, 0, 0, 6, 8, 1, 3, 7, 4, 1, 2, 3, 2, 2, 1, 0), # 115
(8, 10, 7, 10, 5, 7, 0, 3, 1, 1, 2, 1, 0, 14, 7, 2, 5, 3, 4, 6, 1, 3, 3, 1, 1, 0), # 116
(8, 13, 5, 10, 9, 0, 3, 0, 5, 1, 0, 1, 0, 10, 5, 6, 3, 5, 1, 0, 1, 4, 3, 2, 0, 0), # 117
(9, 6, 6, 13, 15, 3, 0, 7, 3, 1, 2, 0, 0, 7, 10, 5, 5, 6, 0, 2, 0, 2, 2, 1, 2, 0), # 118
(12, 8, 9, 9, 9, 5, 3, 3, 2, 1, 0, 3, 0, 10, 6, 3, 1, 8, 1, 4, 6, 2, 0, 1, 0, 0), # 119
(8, 7, 9, 7, 11, 3, 6, 1, 6, 2, 0, 1, 0, 6, 4, 4, 8, 3, 1, 3, 1, 1, 2, 0, 1, 0), # 120
(8, 6, 11, 6, 10, 6, 4, 1, 4, 3, 0, 2, 0, 5, 9, 6, 7, 8, 2, 3, 3, 5, 4, 0, 1, 0), # 121
(10, 4, 8, 11, 8, 5, 6, 7, 2, 0, 1, 0, 0, 5, 7, 7, 3, 8, 5, 3, 5, 2, 3, 1, 0, 0), # 122
(4, 11, 8, 2, 10, 2, 2, 2, 6, 1, 2, 0, 0, 7, 10, 8, 4, 6, 6, 4, 3, 3, 6, 1, 0, 0), # 123
(9, 4, 10, 11, 6, 4, 2, 0, 2, 2, 0, 0, 0, 10, 10, 6, 2, 10, 7, 2, 1, 3, 2, 1, 0, 0), # 124
(12, 10, 10, 3, 8, 5, 3, 2, 3, 2, 0, 3, 0, 8, 8, 3, 2, 9, 3, 3, 1, 4, 5, 0, 0, 0), # 125
(5, 4, 16, 6, 11, 3, 1, 2, 4, 1, 0, 1, 0, 11, 8, 7, 3, 10, 2, 9, 1, 3, 1, 0, 0, 0), # 126
(15, 8, 5, 8, 7, 2, 1, 4, 3, 1, 2, 0, 0, 9, 7, 2, 7, 7, 3, 2, 2, 3, 1, 1, 1, 0), # 127
(6, 9, 11, 7, 9, 8, 1, 2, 5, 2, 1, 0, 0, 13, 6, 8, 6, 5, 1, 1, 3, 5, 4, 1, 0, 0), # 128
(6, 6, 4, 10, 8, 7, 0, 2, 3, 0, 2, 0, 0, 9, 10, 3, 3, 4, 2, 3, 1, 2, 3, 3, 2, 0), # 129
(18, 5, 8, 10, 7, 3, 3, 5, 1, 2, 1, 0, 0, 12, 7, 6, 5, 4, 2, 4, 2, 4, 2, 1, 0, 0), # 130
(6, 10, 8, 12, 9, 3, 2, 2, 4, 2, 3, 1, 0, 9, 10, 5, 1, 4, 2, 4, 3, 5, 1, 4, 2, 0), # 131
(10, 6, 6, 5, 8, 3, 6, 1, 5, 3, 1, 0, 0, 12, 10, 3, 2, 11, 1, 4, 1, 5, 3, 0, 0, 0), # 132
(11, 7, 8, 3, 10, 4, 2, 2, 4, 1, 1, 1, 0, 11, 9, 4, 1, 5, 4, 3, 2, 3, 4, 2, 2, 0), # 133
(6, 10, 5, 7, 8, 2, 2, 3, 1, 3, 2, 1, 0, 9, 9, 3, 5, 6, 5, 3, 2, 4, 1, 2, 0, 0), # 134
(8, 6, 7, 7, 9, 2, 2, 4, 4, 0, 0, 0, 0, 12, 4, 8, 7, 8, 3, 3, 3, 4, 1, 2, 0, 0), # 135
(7, 8, 2, 11, 5, 1, 5, 2, 8, 0, 1, 2, 0, 5, 5, 9, 2, 5, 0, 4, 4, 7, 2, 2, 3, 0), # 136
(10, 9, 6, 6, 7, 5, 2, 5, 1, 2, 1, 1, 0, 7, 5, 3, 3, 15, 0, 3, 0, 3, 3, 1, 1, 0), # 137
(7, 7, 7, 5, 9, 4, 4, 1, 2, 0, 2, 0, 0, 4, 4, 8, 3, 6, 5, 8, 3, 4, 4, 3, 1, 0), # 138
(11, 5, 6, 6, 5, 3, 4, 3, 1, 0, 1, 0, 0, 11, 7, 5, 4, 4, 1, 3, 1, 4, 2, 1, 3, 0), # 139
(17, 9, 10, 8, 3, 3, 3, 1, 3, 1, 1, 0, 0, 10, 4, 3, 4, 8, 7, 4, 1, 4, 1, 1, 2, 0), # 140
(9, 6, 8, 1, 6, 1, 1, 0, 3, 2, 3, 0, 0, 7, 6, 4, 4, 6, 2, 2, 0, 0, 2, 3, 0, 0), # 141
(7, 6, 9, 8, 13, 4, 2, 6, 5, 2, 1, 0, 0, 7, 9, 6, 3, 11, 5, 5, 2, 6, 2, 0, 0, 0), # 142
(4, 6, 9, 10, 7, 3, 2, 0, 1, 0, 2, 0, 0, 6, 4, 6, 3, 3, 2, 2, 4, 1, 2, 0, 2, 0), # 143
(4, 6, 15, 8, 8, 5, 3, 2, 4, 0, 2, 2, 0, 6, 10, 3, 2, 7, 2, 1, 1, 2, 3, 3, 0, 0), # 144
(6, 5, 6, 6, 11, 3, 3, 0, 2, 1, 1, 1, 0, 9, 4, 3, 3, 6, 2, 1, 1, 0, 3, 1, 0, 0), # 145
(10, 5, 5, 10, 6, 2, 1, 1, 2, 1, 1, 0, 0, 11, 4, 7, 4, 9, 2, 1, 0, 8, 3, 3, 0, 0), # 146
(6, 5, 6, 5, 6, 2, 3, 2, 2, 1, 2, 1, 0, 10, 7, 9, 3, 8, 2, 2, 3, 3, 2, 1, 0, 0), # 147
(7, 4, 11, 10, 5, 1, 2, 2, 2, 0, 0, 0, 0, 11, 10, 2, 6, 6, 2, 1, 3, 6, 2, 0, 0, 0), # 148
(3, 6, 6, 8, 6, 3, 3, 5, 1, 0, 1, 0, 0, 8, 9, 8, 8, 6, 7, 2, 1, 2, 0, 3, 2, 0), # 149
(10, 8, 13, 10, 2, 3, 3, 2, 5, 1, 3, 0, 0, 5, 3, 5, 5, 6, 1, 1, 3, 4, 0, 2, 0, 0), # 150
(7, 2, 8, 12, 7, 5, 5, 4, 2, 4, 1, 1, 0, 8, 6, 7, 1, 8, 4, 0, 3, 2, 0, 0, 0, 0), # 151
(10, 7, 6, 6, 7, 1, 0, 5, 1, 2, 0, 2, 0, 10, 4, 5, 3, 8, 4, 2, 4, 1, 2, 3, 0, 0), # 152
(4, 9, 7, 1, 10, 4, 2, 3, 4, 1, 0, 1, 0, 12, 3, 6, 2, 5, 3, 5, 1, 3, 7, 0, 0, 0), # 153
(7, 8, 10, 6, 4, 1, 3, 2, 6, 3, 1, 1, 0, 7, 7, 1, 3, 10, 5, 1, 2, 3, 4, 3, 0, 0), # 154
(7, 6, 6, 7, 3, 6, 3, 3, 3, 2, 1, 1, 0, 7, 8, 5, 4, 5, 3, 0, 1, 3, 1, 1, 0, 0), # 155
(6, 5, 7, 3, 5, 4, 1, 5, 4, 3, 0, 0, 0, 9, 11, 1, 6, 11, 5, 4, 3, 3, 2, 3, 1, 0), # 156
(11, 5, 6, 15, 9, 4, 1, 1, 3, 0, 1, 0, 0, 6, 4, 7, 4, 14, 7, 4, 1, 3, 2, 2, 0, 0), # 157
(11, 4, 5, 4, 2, 5, 2, 1, 6, 0, 0, 0, 0, 11, 5, 6, 6, 4, 2, 2, 4, 2, 2, 1, 0, 0), # 158
(9, 2, 11, 7, 3, 0, 3, 1, 0, 0, 1, 0, 0, 4, 4, 6, 1, 6, 1, 4, 2, 1, 4, 0, 0, 0), # 159
(10, 9, 7, 5, 7, 4, 4, 0, 4, 3, 0, 0, 0, 4, 4, 6, 0, 5, 5, 2, 1, 5, 4, 0, 2, 0), # 160
(8, 12, 11, 12, 4, 3, 2, 5, 1, 2, 0, 0, 0, 7, 1, 3, 5, 9, 3, 1, 2, 3, 1, 2, 0, 0), # 161
(3, 4, 6, 7, 3, 3, 2, 0, 1, 1, 0, 0, 0, 9, 5, 2, 2, 4, 1, 2, 2, 2, 2, 0, 0, 0), # 162
(13, 7, 7, 10, 8, 3, 1, 6, 4, 0, 0, 0, 0, 9, 3, 4, 1, 6, 1, 2, 1, 7, 1, 2, 0, 0), # 163
(12, 5, 2, 5, 7, 4, 1, 1, 3, 1, 2, 1, 0, 8, 3, 7, 3, 8, 1, 2, 2, 2, 4, 0, 0, 0), # 164
(4, 6, 6, 8, 4, 1, 4, 3, 2, 1, 1, 1, 0, 9, 3, 2, 2, 9, 4, 1, 0, 4, 4, 1, 1, 0), # 165
(9, 4, 3, 5, 6, 1, 2, 4, 1, 1, 0, 0, 0, 10, 3, 4, 3, 8, 0, 0, 1, 4, 3, 2, 2, 0), # 166
(4, 3, 8, 2, 9, 1, 2, 1, 3, 0, 1, 0, 0, 5, 3, 4, 3, 7, 3, 3, 1, 2, 1, 4, 0, 0), # 167
(7, 3, 9, 9, 2, 5, 5, 1, 2, 1, 0, 0, 0, 6, 6, 2, 2, 6, 3, 1, 2, 2, 1, 1, 0, 0), # 168
(3, 4, 6, 4, 4, 5, 1, 2, 4, 0, 1, 0, 0, 8, 8, 3, 4, 5, 2, 2, 1, 4, 1, 2, 0, 0), # 169
(5, 5, 3, 5, 2, 5, 2, 0, 1, 2, 1, 1, 0, 4, 3, 5, 2, 1, 0, 2, 3, 2, 1, 0, 1, 0), # 170
(8, 4, 2, 8, 4, 3, 3, 2, 4, 1, 1, 0, 0, 7, 6, 3, 3, 6, 0, 0, 2, 3, 1, 0, 0, 0), # 171
(5, 4, 8, 4, 5, 0, 3, 0, 6, 0, 0, 1, 0, 4, 8, 2, 2, 2, 1, 1, 1, 3, 1, 1, 1, 0), # 172
(6, 2, 2, 5, 3, 0, 1, 1, 3, 1, 0, 0, 0, 7, 6, 2, 6, 3, 4, 1, 2, 1, 0, 0, 0, 0), # 173
(2, 9, 2, 5, 3, 2, 1, 1, 2, 2, 0, 0, 0, 5, 4, 2, 0, 3, 2, 1, 0, 3, 1, 1, 0, 0), # 174
(7, 6, 3, 2, 5, 3, 0, 3, 1, 1, 0, 0, 0, 2, 3, 3, 4, 5, 3, 3, 0, 4, 3, 0, 0, 0), # 175
(6, 4, 7, 1, 4, 3, 1, 1, 0, 0, 1, 0, 0, 5, 4, 3, 2, 4, 1, 1, 0, 0, 3, 0, 0, 0), # 176
(4, 1, 4, 6, 2, 1, 0, 0, 3, 1, 0, 1, 0, 5, 2, 3, 2, 8, 1, 1, 1, 3, 1, 1, 2, 0), # 177
(6, 2, 5, 1, 1, 1, 1, 0, 2, 1, 1, 0, 0, 4, 0, 4, 1, 4, 0, 1, 1, 4, 3, 0, 0, 0), # 178
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 179
)
station_arriving_intensity = (
(5.020865578371768, 5.525288559693166, 5.211283229612507, 6.214667773863432, 5.554685607609612, 3.1386549320373387, 4.146035615373915, 4.653176172979423, 6.090099062168007, 3.9580150155223697, 4.205265163885603, 4.897915078306173, 5.083880212578363), # 0
(5.354327152019974, 5.890060694144759, 5.555346591330152, 6.625144253276616, 5.922490337474237, 3.3459835840425556, 4.419468941263694, 4.959513722905708, 6.492245326332909, 4.21898069227715, 4.483096135956131, 5.221216660814354, 5.419791647439855), # 1
(5.686723008979731, 6.253385170890979, 5.8980422855474135, 7.033987704664794, 6.288962973749744, 3.5524851145124448, 4.691818507960704, 5.264625247904419, 6.892786806877549, 4.478913775020546, 4.759823148776313, 5.543232652053055, 5.75436482820969), # 2
(6.016757793146562, 6.613820501936447, 6.238010869319854, 7.439576407532074, 6.652661676001902, 3.757340622585113, 4.962003641647955, 5.567301157494507, 7.290135160921093, 4.736782698426181, 5.0343484118273825, 5.862685684930461, 6.086272806254225), # 3
(6.343136148415981, 6.9699251992857745, 6.573892899703036, 7.840288641382569, 7.012144603796492, 3.9597312073986677, 5.2289436685084585, 5.866331861194915, 7.682702045582707, 4.991555897167679, 5.305574134590575, 6.178298392354764, 6.414188632939817), # 4
(6.66456271868351, 7.320257774943588, 6.9043289337525175, 8.234502685720393, 7.36596991669928, 4.158837968091214, 5.491557914725224, 6.160507768524592, 8.068899117981559, 5.242201805918663, 5.572402526547132, 6.488793407234148, 6.736785359632827), # 5
(6.979742147844666, 7.663376740914501, 7.227959528523866, 8.620596820049652, 7.712695774276043, 4.353842003800864, 5.7487657064812625, 6.4486192890024885, 8.447138035236815, 5.487688859352758, 5.833735797178282, 6.792893362476808, 7.052736037699606), # 6
(7.2873790797949685, 7.997840609203132, 7.543425241072635, 8.996949323874462, 8.050880336092554, 4.543924413665721, 5.999486369959585, 6.729456832147552, 8.815830454467644, 5.726985492143586, 6.088476155965268, 7.089320890990929, 7.360713718506519), # 7
(7.586178158429934, 8.322207891814099, 7.849366628454396, 9.361938476698928, 8.379081761714586, 4.7282662968238895, 6.2426392313431975, 7.001810807478725, 9.173388032793206, 5.959060138964774, 6.335525812389321, 7.376798625684702, 7.659391453419917), # 8
(7.874844027645085, 8.635037100752022, 8.144424247724704, 9.713942558027169, 8.69585821070791, 4.906048752413484, 6.47714361681512, 7.264471624514963, 9.518222427332674, 6.182881234489941, 6.573786975931678, 7.654049199466313, 7.947442293806162), # 9
(8.152081331335932, 8.934886748021516, 8.427238655939124, 10.051339847363288, 8.9997678426383, 5.076452879572607, 6.701918852558355, 7.516229692775211, 9.848745295205214, 6.397417213392714, 6.802161856073574, 7.919795245243952, 8.22353929103161), # 10
(8.416594713398005, 9.220315345627206, 8.696450410153215, 10.372508624211397, 9.289368817071534, 5.238659777439368, 6.915884264755916, 7.7558754217784145, 10.163368293529993, 6.601636510346719, 7.019552662296249, 8.17275939592581, 8.486355496462611), # 11
(8.667088817726812, 9.489881405573698, 8.95070006742254, 10.675827168075612, 9.563219293573377, 5.391850545151869, 7.1179591795908115, 7.982199221043521, 10.460503079426179, 6.794507560025572, 7.224861604080934, 8.411664284420068, 8.734563961465534), # 12
(8.902268288217876, 9.74214343986562, 9.188628184802662, 10.959673758460044, 9.819877431709601, 5.5352062818482235, 7.307062923246056, 8.193991500089481, 10.738561310012932, 6.974998797102904, 7.416990890908869, 8.63523254363492, 8.966837737406735), # 13
(9.120837768766716, 9.975659960507588, 9.408875319349146, 11.222426674868792, 10.05790139104599, 5.667908086666534, 7.482114821904661, 8.390042668435246, 10.995954642409421, 7.142078656252334, 7.594842732261284, 8.84218680647856, 9.181849875652563), # 14
(9.321501903268855, 10.188989479504217, 9.610082028117542, 11.462464196805985, 10.275849331148308, 5.789137058744912, 7.642034201749626, 8.569143135599756, 11.23109473373482, 7.29471557214749, 7.757319337619419, 9.031249705859171, 9.37827342756938), # 15
(9.5029653356198, 10.380690508860132, 9.790888868163425, 11.678164603775716, 10.472279411582333, 5.898074297221459, 7.785740388963976, 8.73008331110196, 11.442393241108286, 7.431877979461996, 7.9033229164645125, 9.20114387468494, 9.554781444523545), # 16
(9.663932709715075, 10.549321560579946, 9.949936396542352, 11.867906175282112, 10.645749791913838, 5.993900901234285, 7.9121527097307105, 8.871653604460818, 11.628261821648984, 7.552534312869467, 8.031755678277799, 9.350591945864055, 9.710046977881415), # 17
(9.803108669450204, 10.693441146668274, 10.08586517030988, 12.030067190829278, 10.794818631708589, 6.075797969921503, 8.020190490232851, 8.99264442519526, 11.787112132476096, 7.6556530070435365, 8.141519832540508, 9.478316552304715, 9.842743079009345), # 18
(9.919197858720699, 10.811607779129744, 10.197315746521578, 12.163025929921314, 10.918044090532366, 6.142946602421208, 8.108773056653394, 9.091846182824245, 11.917355830708779, 7.740202496657828, 8.231517588733878, 9.583040326915096, 9.951542799273696), # 19
(10.010904921422082, 10.902379969968962, 10.282928682233003, 12.265160672062354, 11.013984327950944, 6.194527897871518, 8.176819735175362, 9.168049286866717, 12.017404573466198, 7.805151216385958, 8.30065115633915, 9.66348590260339, 10.035119190040824), # 20
(10.076934501449866, 10.964316231190558, 10.341344534499719, 12.334849696756486, 11.081197503530088, 6.229722955410535, 8.223249851981759, 9.220044146841623, 12.085670017867521, 7.849467600901555, 8.34782274483756, 9.718375912277793, 10.092145302677078), # 21
(10.115991242699579, 10.995975074799144, 10.371203860377285, 12.370471283507836, 11.118241776835575, 6.247712874176367, 8.2469827332556, 9.246621172267915, 12.120563821031915, 7.872120084878242, 8.37193456371034, 9.74643298884649, 10.121294188548827), # 22
(10.13039336334264, 10.999723593964335, 10.374923182441702, 12.374930812757203, 11.127732056032597, 6.25, 8.249804002259339, 9.249493827160494, 12.124926234567901, 7.874792272519433, 8.37495803716174, 9.749897576588934, 10.125), # 23
(10.141012413034153, 10.997537037037038, 10.374314814814815, 12.374381944444446, 11.133107613614852, 6.25, 8.248253812636166, 9.2455, 12.124341666666666, 7.87315061728395, 8.37462457912458, 9.749086419753086, 10.125), # 24
(10.15140723021158, 10.993227023319616, 10.373113854595337, 12.373296039094651, 11.138364945594503, 6.25, 8.24519890260631, 9.237654320987655, 12.123186728395062, 7.869918838591678, 8.373963399426362, 9.747485139460448, 10.125), # 25
(10.161577019048034, 10.986859396433472, 10.371336762688616, 12.37168544238683, 11.143503868421105, 6.25, 8.240686718308721, 9.226104938271606, 12.1214762345679, 7.865150708733425, 8.372980483850855, 9.745115683584821, 10.125), # 26
(10.171520983716636, 10.978499999999999, 10.369, 12.369562499999999, 11.148524198544214, 6.25, 8.234764705882354, 9.211, 12.119225, 7.858899999999999, 8.371681818181818, 9.742, 10.125), # 27
(10.181238328390501, 10.968214677640603, 10.366120027434842, 12.366939557613168, 11.153425752413401, 6.25, 8.22748031146615, 9.192487654320988, 12.116447839506172, 7.851220484682213, 8.370073388203018, 9.73816003657979, 10.125), # 28
(10.19072825724275, 10.95606927297668, 10.362713305898492, 12.36382896090535, 11.15820834647822, 6.25, 8.218880981199066, 9.170716049382715, 12.113159567901235, 7.842165935070874, 8.368161179698216, 9.733617741197987, 10.125), # 29
(10.199989974446497, 10.94212962962963, 10.358796296296296, 12.360243055555555, 11.162871797188236, 6.25, 8.209014161220043, 9.145833333333332, 12.109375, 7.83179012345679, 8.365951178451178, 9.728395061728394, 10.125), # 30
(10.209022684174858, 10.926461591220852, 10.354385459533608, 12.356194187242798, 11.167415920993008, 6.25, 8.19792729766804, 9.117987654320988, 12.105108950617284, 7.820146822130773, 8.363449370245666, 9.722513946044812, 10.125), # 31
(10.217825590600954, 10.909131001371742, 10.349497256515773, 12.35169470164609, 11.171840534342095, 6.25, 8.185667836681999, 9.087327160493828, 12.100376234567902, 7.807289803383631, 8.360661740865444, 9.715996342021034, 10.125), # 32
(10.226397897897897, 10.890203703703703, 10.344148148148149, 12.346756944444444, 11.176145453685063, 6.25, 8.172283224400871, 9.054, 12.095191666666667, 7.793272839506173, 8.357594276094275, 9.708864197530863, 10.125), # 33
(10.23473881023881, 10.869745541838133, 10.338354595336076, 12.341393261316872, 11.180330495471466, 6.25, 8.15782090696361, 9.018154320987653, 12.089570061728397, 7.778149702789209, 8.354252961715924, 9.701139460448102, 10.125), # 34
(10.242847531796807, 10.847822359396433, 10.332133058984912, 12.335615997942385, 11.18439547615087, 6.25, 8.142328330509159, 8.979938271604938, 12.083526234567902, 7.761974165523548, 8.350643783514153, 9.692844078646548, 10.125), # 35
(10.250723266745005, 10.824499999999999, 10.3255, 12.3294375, 11.188340212172836, 6.25, 8.12585294117647, 8.9395, 12.077074999999999, 7.7448, 8.346772727272727, 9.684000000000001, 10.125), # 36
(10.258365219256524, 10.799844307270233, 10.318471879286694, 12.322870113168724, 11.192164519986921, 6.25, 8.108442185104494, 8.896987654320988, 12.070231172839506, 7.726680978509374, 8.34264577877541, 9.674629172382259, 10.125), # 37
(10.265772593504476, 10.773921124828533, 10.311065157750342, 12.315926183127573, 11.19586821604269, 6.25, 8.09014350843218, 8.85254938271605, 12.063009567901235, 7.707670873342479, 8.33826892380596, 9.664753543667125, 10.125), # 38
(10.272944593661986, 10.746796296296296, 10.303296296296297, 12.308618055555556, 11.199451116789703, 6.25, 8.071004357298476, 8.806333333333333, 12.055425000000001, 7.687823456790124, 8.333648148148148, 9.654395061728394, 10.125), # 39
(10.279880423902163, 10.718535665294924, 10.295181755829903, 12.300958076131687, 11.202913038677519, 6.25, 8.05107217784233, 8.758487654320989, 12.047492283950618, 7.667192501143119, 8.328789437585733, 9.643575674439873, 10.125), # 40
(10.286579288398128, 10.689205075445816, 10.286737997256516, 12.29295859053498, 11.206253798155702, 6.25, 8.030394416202695, 8.709160493827161, 12.0392262345679, 7.645831778692272, 8.323698777902482, 9.632317329675354, 10.125), # 41
(10.293040391323, 10.658870370370371, 10.277981481481483, 12.284631944444445, 11.209473211673808, 6.25, 8.009018518518518, 8.6585, 12.030641666666668, 7.623795061728395, 8.318382154882155, 9.620641975308642, 10.125), # 42
(10.299262936849892, 10.627597393689987, 10.268928669410151, 12.275990483539095, 11.212571095681403, 6.25, 7.98699193092875, 8.606654320987655, 12.021753395061728, 7.601136122542296, 8.312845554308517, 9.608571559213535, 10.125), # 43
(10.305246129151927, 10.595451989026063, 10.259596021947875, 12.267046553497943, 11.215547266628045, 6.25, 7.964362099572339, 8.553771604938273, 12.0125762345679, 7.577908733424783, 8.307094961965332, 9.596128029263832, 10.125), # 44
(10.310989172402216, 10.5625, 10.25, 12.2578125, 11.218401540963296, 6.25, 7.9411764705882355, 8.5, 12.003124999999999, 7.554166666666667, 8.301136363636363, 9.583333333333332, 10.125), # 45
(10.31649127077388, 10.528807270233196, 10.240157064471878, 12.24830066872428, 11.221133735136716, 6.25, 7.917482490115388, 8.445487654320988, 11.993414506172838, 7.529963694558756, 8.294975745105374, 9.57020941929584, 10.125), # 46
(10.321751628440035, 10.49443964334705, 10.230083676268862, 12.238523405349794, 11.223743665597867, 6.25, 7.893327604292747, 8.390382716049382, 11.983459567901235, 7.505353589391861, 8.288619092156129, 9.55677823502515, 10.125), # 47
(10.326769449573796, 10.459462962962963, 10.219796296296296, 12.228493055555557, 11.22623114879631, 6.25, 7.868759259259259, 8.334833333333334, 11.973275000000001, 7.4803901234567896, 8.28207239057239, 9.543061728395061, 10.125), # 48
(10.331543938348286, 10.42394307270233, 10.209311385459534, 12.218221965020577, 11.228596001181607, 6.25, 7.8438249011538765, 8.278987654320987, 11.96287561728395, 7.455127069044353, 8.275341626137923, 9.529081847279379, 10.125), # 49
(10.336074298936616, 10.387945816186559, 10.198645404663925, 12.207722479423868, 11.230838039203315, 6.25, 7.81857197611555, 8.222993827160494, 11.9522762345679, 7.429618198445358, 8.268432784636488, 9.514860539551899, 10.125), # 50
(10.34035973551191, 10.351537037037037, 10.187814814814814, 12.197006944444444, 11.232957079310998, 6.25, 7.793047930283224, 8.167, 11.941491666666668, 7.403917283950617, 8.261351851851853, 9.50041975308642, 10.125), # 51
(10.344399452247279, 10.314782578875173, 10.176836076817558, 12.186087705761317, 11.234952937954214, 6.25, 7.767300209795852, 8.111154320987653, 11.930536728395062, 7.3780780978509375, 8.254104813567777, 9.485781435756746, 10.125), # 52
(10.348192653315843, 10.27774828532236, 10.165725651577505, 12.174977109053497, 11.23682543158253, 6.25, 7.741376260792383, 8.055604938271605, 11.919426234567903, 7.3521544124371285, 8.246697655568026, 9.470967535436671, 10.125), # 53
(10.351738542890716, 10.2405, 10.154499999999999, 12.1636875, 11.238574376645502, 6.25, 7.715323529411765, 8.000499999999999, 11.908175, 7.3262, 8.239136363636362, 9.456, 10.125), # 54
(10.355036325145022, 10.203103566529492, 10.143175582990398, 12.152231224279834, 11.24019958959269, 6.25, 7.689189461792948, 7.945987654320987, 11.896797839506172, 7.300268632830361, 8.231426923556553, 9.44090077732053, 10.125), # 55
(10.358085204251871, 10.165624828532236, 10.131768861454047, 12.140620627572016, 11.241700886873659, 6.25, 7.663021504074881, 7.892216049382716, 11.885309567901235, 7.274414083219022, 8.223575321112358, 9.425691815272062, 10.125), # 56
(10.360884384384383, 10.12812962962963, 10.120296296296297, 12.128868055555555, 11.243078084937967, 6.25, 7.636867102396514, 7.839333333333334, 11.873725, 7.24869012345679, 8.215587542087542, 9.410395061728394, 10.125), # 57
(10.36343306971568, 10.090683813443073, 10.108774348422497, 12.116985853909464, 11.244331000235174, 6.25, 7.610773702896797, 7.787487654320987, 11.862058950617284, 7.223150525834477, 8.20746957226587, 9.395032464563329, 10.125), # 58
(10.36573046441887, 10.053353223593964, 10.097219478737998, 12.104986368312757, 11.245459449214845, 6.25, 7.584788751714678, 7.736827160493827, 11.850326234567902, 7.197849062642891, 8.1992273974311, 9.379625971650663, 10.125), # 59
(10.367775772667077, 10.016203703703704, 10.085648148148147, 12.092881944444445, 11.246463248326537, 6.25, 7.558959694989106, 7.6875, 11.838541666666668, 7.172839506172839, 8.190867003367003, 9.364197530864198, 10.125), # 60
(10.369568198633415, 9.97930109739369, 10.0740768175583, 12.080684927983539, 11.247342214019811, 6.25, 7.533333978859033, 7.639654320987654, 11.826720061728395, 7.148175628715135, 8.182394375857339, 9.348769090077733, 10.125), # 61
(10.371106946491004, 9.942711248285322, 10.062521947873801, 12.068407664609055, 11.248096162744234, 6.25, 7.507959049463406, 7.5934382716049384, 11.814876234567901, 7.123911202560586, 8.17381550068587, 9.333362597165067, 10.125), # 62
(10.37239122041296, 9.9065, 10.051, 12.056062500000001, 11.248724910949356, 6.25, 7.482882352941176, 7.549, 11.803025, 7.100099999999999, 8.165136363636364, 9.318, 10.125), # 63
(10.373420224572397, 9.870733196159122, 10.039527434842249, 12.043661779835391, 11.249228275084748, 6.25, 7.458151335431292, 7.506487654320988, 11.791181172839506, 7.076795793324188, 8.156362950492579, 9.302703246456334, 10.125), # 64
(10.374193163142438, 9.835476680384087, 10.0281207133059, 12.031217849794238, 11.249606071599967, 6.25, 7.433813443072703, 7.466049382716049, 11.779359567901235, 7.054052354823959, 8.147501247038285, 9.287494284407863, 10.125), # 65
(10.374709240296196, 9.800796296296298, 10.016796296296297, 12.018743055555555, 11.249858116944573, 6.25, 7.409916122004357, 7.427833333333334, 11.767575, 7.031923456790123, 8.138557239057238, 9.272395061728396, 10.125), # 66
(10.374967660206792, 9.766757887517146, 10.005570644718793, 12.006249742798353, 11.24998422756813, 6.25, 7.386506818365206, 7.391987654320989, 11.755842283950617, 7.010462871513489, 8.12953691233321, 9.257427526291723, 10.125), # 67
(10.374791614480825, 9.733248639320323, 9.994405949931412, 11.993641740472357, 11.249877955297345, 6.2498840115836, 7.363515194829646, 7.358343850022862, 11.744087848651121, 6.989620441647166, 8.120285988540376, 9.242530021899743, 10.124875150034294), # 68
(10.373141706924315, 9.699245519713262, 9.982988425925925, 11.980283514492752, 11.248910675381262, 6.248967078189301, 7.340268181346613, 7.325098765432099, 11.731797839506173, 6.968806390704429, 8.10986283891547, 9.227218973359324, 10.12388599537037), # 69
(10.369885787558895, 9.664592459843355, 9.971268432784635, 11.966087124261943, 11.246999314128942, 6.247161255906112, 7.31666013456137, 7.291952446273434, 11.718902892089622, 6.947919524462734, 8.09814888652608, 9.211422761292809, 10.121932334533609), # 70
(10.365069660642929, 9.62931016859153, 9.959250085733881, 11.951073503757382, 11.244168078754136, 6.244495808565767, 7.292701659538988, 7.258915866483768, 11.705422210791038, 6.926960359342639, 8.085187370783862, 9.195152937212715, 10.119039887688615), # 71
(10.358739130434783, 9.593419354838709, 9.946937499999999, 11.935263586956522, 11.240441176470588, 6.2410000000000005, 7.268403361344538, 7.226, 11.691375, 6.905929411764705, 8.07102153110048, 9.17842105263158, 10.115234375), # 72
(10.35094000119282, 9.556940727465816, 9.934334790809327, 11.918678307836823, 11.23584281449205, 6.236703094040542, 7.243775845043092, 7.193215820759031, 11.676780464106082, 6.884827198149493, 8.055694606887588, 9.161238659061919, 10.110541516632374), # 73
(10.341718077175404, 9.519894995353777, 9.921446073388202, 11.901338600375738, 11.230397200032275, 6.231634354519128, 7.218829715699722, 7.160574302697759, 11.661657807498857, 6.863654234917561, 8.039249837556856, 9.143617308016267, 10.104987032750344), # 74
(10.331119162640901, 9.482302867383511, 9.908275462962962, 11.883265398550725, 11.224128540305012, 6.22582304526749, 7.1935755783795, 7.128086419753086, 11.6460262345679, 6.84241103848947, 8.021730462519935, 9.125568551007147, 10.098596643518519), # 75
(10.319189061847677, 9.44418505243595, 9.894827074759945, 11.864479636339238, 11.217061042524005, 6.219298430117361, 7.168024038147495, 7.095763145861912, 11.629904949702789, 6.821098125285779, 8.003179721188491, 9.107103939547082, 10.091396069101508), # 76
(10.305973579054093, 9.40556225939201, 9.881105024005485, 11.845002247718732, 11.209218913903008, 6.212089772900472, 7.142185700068779, 7.063615454961135, 11.613313157293096, 6.7997160117270505, 7.983640852974187, 9.088235025148606, 10.083411029663925), # 77
(10.291518518518519, 9.366455197132618, 9.867113425925925, 11.824854166666666, 11.200626361655774, 6.204226337448559, 7.116071169208425, 7.031654320987655, 11.596270061728394, 6.7782652142338415, 7.9631570972886765, 9.068973359324238, 10.074667245370371), # 78
(10.275869684499314, 9.326884574538697, 9.8528563957476, 11.804056327160493, 11.191307592996047, 6.195737387593354, 7.089691050631501, 6.9998907178783725, 11.578794867398262, 6.756746249226714, 7.941771693543622, 9.049330493586504, 10.065190436385459), # 79
(10.259072881254847, 9.286871100491172, 9.838338048696844, 11.782629663177671, 11.181286815137579, 6.18665218716659, 7.063055949403081, 6.968335619570188, 11.560906778692273, 6.7351596331262265, 7.919527881150688, 9.029317979447935, 10.0550063228738), # 80
(10.241173913043479, 9.246435483870968, 9.8235625, 11.760595108695654, 11.170588235294117, 6.177, 7.036176470588235, 6.937, 11.542625, 6.713505882352941, 7.8964688995215315, 9.008947368421053, 10.044140624999999), # 81
(10.222218584123576, 9.205598433559008, 9.808533864883403, 11.737973597691894, 11.159236060679415, 6.166810089925317, 7.009063219252036, 6.90589483310471, 11.52396873571102, 6.691785513327416, 7.872637988067813, 8.988230212018387, 10.03261906292867), # 82
(10.202252698753504, 9.164380658436214, 9.793256258573388, 11.714786064143853, 11.147254498507221, 6.156111720774272, 6.981726800459553, 6.875031092821216, 11.504957190214906, 6.669999042470211, 7.848078386201194, 8.967178061752461, 10.020467356824417), # 83
(10.181322061191626, 9.122802867383513, 9.777733796296296, 11.691053442028986, 11.134667755991286, 6.144934156378601, 6.954177819275858, 6.844419753086419, 11.485609567901234, 6.648146986201889, 7.822833333333333, 8.945802469135803, 10.007711226851852), # 84
(10.159472475696308, 9.080885769281826, 9.761970593278463, 11.666796665324746, 11.121500040345357, 6.133306660570035, 6.926426880766024, 6.814071787837221, 11.465945073159578, 6.626229860943005, 7.796946068875894, 8.924114985680937, 9.994376393175584), # 85
(10.136749746525913, 9.03865007301208, 9.745970764746229, 11.64203666800859, 11.107775558783183, 6.121258497180309, 6.89848458999512, 6.783998171010516, 11.445982910379517, 6.604248183114124, 7.770459832240534, 8.902127162900394, 9.98048857596022), # 86
(10.113199677938807, 8.996116487455197, 9.729738425925925, 11.61679438405797, 11.09351851851852, 6.108818930041152, 6.870361552028219, 6.75420987654321, 11.425742283950619, 6.582202469135802, 7.743417862838915, 8.879850552306692, 9.96607349537037), # 87
(10.088868074193357, 8.9533057214921, 9.713277692043896, 11.59109074745035, 11.07875312676511, 6.096017222984301, 6.842068371930391, 6.724717878372199, 11.40524239826246, 6.560093235428601, 7.715863400082698, 8.857296705412365, 9.951156871570646), # 88
(10.063800739547922, 8.910238484003717, 9.696592678326475, 11.564946692163177, 11.063503590736707, 6.082882639841488, 6.813615654766708, 6.695533150434385, 11.384502457704619, 6.537920998413083, 7.687839683383544, 8.834477173729935, 9.935764424725651), # 89
(10.03804347826087, 8.866935483870968, 9.6796875, 11.538383152173914, 11.04779411764706, 6.069444444444445, 6.785014005602241, 6.666666666666666, 11.363541666666668, 6.515686274509804, 7.65938995215311, 8.81140350877193, 9.919921875), # 90
(10.011642094590563, 8.823417429974777, 9.662566272290809, 11.511421061460013, 11.031648914709915, 6.055731900624904, 6.756274029502062, 6.638129401005944, 11.342379229538182, 6.4933895801393255, 7.63055744580306, 8.788087262050874, 9.903654942558298), # 91
(9.984642392795372, 8.779705031196071, 9.64523311042524, 11.484081353998926, 11.015092189139029, 6.041774272214601, 6.727406331531242, 6.609932327389118, 11.321034350708734, 6.471031431722209, 7.601385403745053, 8.764539985079297, 9.886989347565157), # 92
(9.957090177133654, 8.735818996415771, 9.62769212962963, 11.456384963768118, 10.998148148148148, 6.027600823045267, 6.69842151675485, 6.582086419753087, 11.299526234567901, 6.448612345679011, 7.57191706539075, 8.74077322936972, 9.869950810185184), # 93
(9.92903125186378, 8.691780034514801, 9.609947445130317, 11.428352824745035, 10.98084099895102, 6.0132408169486355, 6.669330190237961, 6.554602652034752, 11.277874085505259, 6.426132838430297, 7.54219567015181, 8.716798546434674, 9.85256505058299), # 94
(9.90051142124411, 8.647608854374088, 9.592003172153635, 11.400005870907139, 10.963194948761398, 5.9987235177564395, 6.640142957045644, 6.527491998171011, 11.25609710791038, 6.403593426396621, 7.512264457439896, 8.69262748778668, 9.834857788923182), # 95
(9.871576489533012, 8.603326164874554, 9.573863425925927, 11.371365036231884, 10.945234204793028, 5.984078189300411, 6.610870422242971, 6.500765432098766, 11.234214506172838, 6.3809946259985475, 7.482166666666667, 8.668271604938273, 9.816854745370371), # 96
(9.842272260988848, 8.558952674897121, 9.555532321673525, 11.342451254696725, 10.926982974259664, 5.969334095412284, 6.581523190895013, 6.474433927754916, 11.212245484682214, 6.358336953656634, 7.451945537243782, 8.64374244940197, 9.798581640089164), # 97
(9.812644539869984, 8.514509093322713, 9.53701397462277, 11.31328546027912, 10.908465464375052, 5.954520499923793, 6.552111868066842, 6.44850845907636, 11.190209247828074, 6.335620925791441, 7.421644308582906, 8.619051572690298, 9.78006419324417), # 98
(9.782739130434782, 8.470016129032258, 9.5183125, 11.283888586956522, 10.889705882352942, 5.939666666666667, 6.52264705882353, 6.423, 11.168125, 6.312847058823529, 7.391306220095694, 8.59421052631579, 9.761328125), # 99
(9.752601836941611, 8.425494490906676, 9.49943201303155, 11.254281568706388, 10.870728435407084, 5.924801859472641, 6.493139368230145, 6.3979195244627345, 11.146011945587563, 6.290015869173458, 7.36097451119381, 8.569230861790967, 9.742399155521262), # 100
(9.722278463648834, 8.380964887826895, 9.480376628943759, 11.224485339506174, 10.85155733075123, 5.909955342173449, 6.463599401351762, 6.3732780064014625, 11.123889288980338, 6.267127873261788, 7.330692421288912, 8.544124130628353, 9.723303004972564), # 101
(9.691814814814816, 8.336448028673836, 9.461150462962962, 11.194520833333334, 10.832216775599129, 5.895156378600824, 6.43403776325345, 6.349086419753086, 11.1017762345679, 6.244183587509078, 7.300503189792663, 8.518901884340481, 9.704065393518519), # 102
(9.661256694697919, 8.291964622328422, 9.4417576303155, 11.164408984165325, 10.812730977164529, 5.880434232586496, 6.40446505900028, 6.325355738454504, 11.079691986739826, 6.221183528335889, 7.270450056116723, 8.493575674439873, 9.68471204132373), # 103
(9.63064990755651, 8.247535377671579, 9.422202246227709, 11.134170725979603, 10.79312414266118, 5.865818167962201, 6.374891893657326, 6.302096936442616, 11.057655749885688, 6.19812821216278, 7.24057625967275, 8.468157052439054, 9.665268668552812), # 104
(9.600040257648953, 8.203181003584229, 9.402488425925926, 11.103826992753623, 10.773420479302832, 5.851337448559671, 6.345328872289658, 6.279320987654321, 11.035686728395062, 6.175018155410313, 7.210925039872408, 8.442657569850553, 9.64576099537037), # 105
(9.569473549233614, 8.158922208947299, 9.382620284636488, 11.073398718464842, 10.753644194303236, 5.837021338210638, 6.315786599962345, 6.25703886602652, 11.01380412665752, 6.151853874499045, 7.181539636127355, 8.417088778186894, 9.626214741941014), # 106
(9.538995586568856, 8.11477970264171, 9.362601937585735, 11.042906837090714, 10.733819494876139, 5.822899100746838, 6.286275681740461, 6.235261545496114, 10.992027149062643, 6.128635885849539, 7.152463287849252, 8.391462228960604, 9.606655628429355), # 107
(9.508652173913044, 8.070774193548388, 9.3424375, 11.012372282608696, 10.713970588235293, 5.809, 6.256806722689075, 6.214, 10.970375, 6.105364705882353, 7.1237392344497605, 8.365789473684211, 9.587109375), # 108
(9.478489115524543, 8.026926390548255, 9.322131087105625, 10.98181598899624, 10.69412168159445, 5.795353299801859, 6.227390327873262, 6.193265203475081, 10.948866883859168, 6.082040851018047, 7.09541071534054, 8.340082063870238, 9.567601701817559), # 109
(9.448552215661715, 7.983257002522237, 9.301686814128946, 10.951258890230811, 10.674296982167354, 5.7819882639841484, 6.198037102358089, 6.173068129858253, 10.92752200502972, 6.058664837677183, 7.06752096993325, 8.314351551031214, 9.54815832904664), # 110
(9.41888727858293, 7.9397867383512555, 9.281108796296298, 10.920721920289855, 10.654520697167756, 5.768934156378601, 6.168757651208631, 6.153419753086419, 10.906359567901236, 6.035237182280319, 7.040113237639553, 8.288609486679663, 9.528804976851852), # 111
(9.38954010854655, 7.896536306916234, 9.26040114883402, 10.890226013150832, 10.634817033809409, 5.756220240816949, 6.139562579489958, 6.134331047096479, 10.885398776863282, 6.011758401248016, 7.013230757871109, 8.26286742232811, 9.509567365397805), # 112
(9.360504223703044, 7.853598618785952, 9.239617828252069, 10.85983388249204, 10.615175680173705, 5.7438697692145135, 6.1105259636567695, 6.115852568780606, 10.86471281125862, 5.988304736612729, 6.9869239061528665, 8.237192936504428, 9.490443900843221), # 113
(9.331480897900065, 7.811397183525536, 9.219045675021619, 10.829789421277336, 10.595393354566326, 5.731854608529901, 6.082018208410579, 6.09821125950512, 10.84461903571306, 5.965315167912783, 6.961244337113197, 8.211912172112974, 9.471275414160035), # 114
(9.302384903003995, 7.769947198683046, 9.198696932707318, 10.800084505181779, 10.5754076778886, 5.7201435124987645, 6.054059650191562, 6.081402654278709, 10.82512497866879, 5.942825327988077, 6.936154511427094, 8.187037582558851, 9.452006631660376), # 115
(9.273179873237634, 7.729188281291702, 9.178532189983873, 10.770666150266404, 10.555188526383779, 5.708708877287098, 6.026604817527893, 6.065380312898993, 10.80618133922783, 5.920793358449547, 6.911605931271481, 8.162523197487346, 9.43260725975589), # 116
(9.243829442823772, 7.689060048384721, 9.158512035525986, 10.741481372592244, 10.53470577629511, 5.6975230990608905, 5.9996082389477525, 6.050097795163585, 10.787738816492203, 5.899177400908129, 6.887550098823283, 8.13832304654375, 9.413047004858225), # 117
(9.214297245985211, 7.649502116995324, 9.138597058008367, 10.712477188220333, 10.513929303865842, 5.686558573986138, 5.973024442979315, 6.0355086608700965, 10.769748109563935, 5.877935596974759, 6.863938516259424, 8.11439115937335, 9.393295573379024), # 118
(9.184546916944742, 7.610454104156729, 9.118747846105723, 10.683600613211706, 10.492828985339221, 5.675787698228833, 5.946807958150756, 6.021566469816145, 10.752159917545043, 5.857026088260372, 6.840722685756828, 8.090681565621434, 9.373322671729932), # 119
(9.154542089925162, 7.571855626902158, 9.098924988492762, 10.654798663627394, 10.471374696958497, 5.665182867954965, 5.920913312990253, 6.008224781799343, 10.734924939537558, 5.836407016375905, 6.817854109492416, 8.067148294933297, 9.353098006322597), # 120
(9.124246399149268, 7.533646302264829, 9.079089073844187, 10.626018355528434, 10.449536314966918, 5.6547164793305305, 5.89529503602598, 5.995437156617307, 10.717993874643499, 5.816036522932296, 6.795284289643116, 8.043745376954222, 9.33259128356866), # 121
(9.093623478839854, 7.495765747277961, 9.059200690834711, 10.597206704975855, 10.427283715607734, 5.644360928521519, 5.869907655786117, 5.983157154067649, 10.70131742196489, 5.795872749540477, 6.772964728385851, 8.0204268413295, 9.31177220987977), # 122
(9.062636963219719, 7.458153578974774, 9.039220428139036, 10.568310728030694, 10.40458677512419, 5.634088611693925, 5.844705700798839, 5.971338333947983, 10.684846280603754, 5.775873837811387, 6.750846927897544, 7.997146717704421, 9.290610491667572), # 123
(9.031250486511654, 7.420749414388487, 9.01910887443187, 10.539277440753986, 10.381415369759537, 5.623871925013739, 5.819643699592319, 5.959934256055926, 10.668531149662115, 5.755997929355961, 6.728882390355119, 7.973859035724275, 9.269075835343711), # 124
(8.999427682938459, 7.38349287055232, 8.998826618387923, 10.51005385920676, 10.357739375757022, 5.613683264646956, 5.794676180694739, 5.948898480189091, 10.652322728241993, 5.736203165785134, 6.707022617935501, 7.950517825034348, 9.247137947319828), # 125
(8.967132186722928, 7.346323564499494, 8.978334248681898, 10.480586999450054, 10.333528669359893, 5.603495026759568, 5.76975767263427, 5.938184566145092, 10.636171715445418, 5.7164476887098425, 6.685219112815613, 7.927077115279934, 9.224766534007578), # 126
(8.93432763208786, 7.309181113263224, 8.957592353988504, 10.450823877544899, 10.308753126811398, 5.593279607517565, 5.744842703939094, 5.927746073721545, 10.620028810374407, 5.696689639741024, 6.6634233771723785, 7.903490936106316, 9.201931301818599), # 127
(8.900977653256046, 7.272005133876735, 8.93656152298245, 10.420711509552332, 10.28338262435479, 5.583009403086944, 5.719885803137382, 5.917536562716062, 10.603844712130984, 5.6768871604896125, 6.641586913182724, 7.879713317158788, 9.178601957164537), # 128
(8.867045884450281, 7.234735243373241, 8.91520234433844, 10.390196911533382, 10.257387038233311, 5.572656809633695, 5.694841498757313, 5.90750959292626, 10.587570119817174, 5.656998392566545, 6.619661223023571, 7.855698288082636, 9.154748206457038), # 129
(8.832495959893366, 7.197311058785966, 8.893475406731179, 10.359227099549086, 10.230736244690213, 5.562194223323808, 5.669664319327063, 5.89761872414975, 10.571155732535, 5.636981477582757, 6.5975978088718445, 7.831399878523152, 9.130339756107748), # 130
(8.797291513808094, 7.159672197148127, 8.87134129883538, 10.327749089660475, 10.203400119968745, 5.55159404032328, 5.644308793374809, 5.88781751618415, 10.554552249386486, 5.616794557149185, 6.575348172904468, 7.806772118125624, 9.105346312528312), # 131
(8.76139618041726, 7.121758275492944, 8.848760609325746, 10.295709897928587, 10.175348540312154, 5.540828656798102, 5.618729449428725, 5.878059528827073, 10.537710369473654, 5.596395772876765, 6.552863817298364, 7.781769036535342, 9.079737582130376), # 132
(8.724773593943663, 7.083508910853635, 8.825693926876983, 10.263056540414452, 10.146551381963686, 5.529870468914266, 5.592880816016989, 5.868298321876132, 10.520580791898526, 5.575743266376432, 6.53009624423046, 7.756344663397592, 9.053483271325586), # 133
(8.687387388610095, 7.044863720263423, 8.802101840163804, 10.229736033179103, 10.116978521166592, 5.518691872837765, 5.566717421667779, 5.858487455128944, 10.503114215763128, 5.5547951792591235, 6.506996955877678, 7.730453028357666, 9.026553086525583), # 134
(8.649201198639354, 7.005762320755524, 8.777944937860909, 10.195695392283579, 10.08659983416412, 5.507265264734592, 5.540193794909268, 5.84858048838312, 10.48526134016948, 5.533509653135776, 6.483517454416942, 7.704048161060852, 8.99891673414202), # 135
(8.610178658254235, 6.966144329363159, 8.753183808643008, 10.160881633788906, 10.055385197199517, 5.495563040770739, 5.513264464269635, 5.838530981436277, 10.466972864219606, 5.511844829617322, 6.459609242025177, 7.677084091152441, 8.970543920586536), # 136
(8.570283401677534, 6.925949363119547, 8.72777904118481, 10.125241773756125, 10.023304486516034, 5.483557597112198, 5.485883958277055, 5.828292494086029, 10.448199487015533, 5.4897588503147015, 6.435223820879306, 7.649514848277719, 8.941404352270776), # 137
(8.529479063132047, 6.885117039057908, 8.701691224161017, 10.088722828246263, 9.990327578356919, 5.471221329924964, 5.458006805459704, 5.81781858612999, 10.428891907659281, 5.4672098568388465, 6.410312693156252, 7.621294462081978, 8.91146773560639), # 138
(8.487729276840568, 6.843586974211461, 8.67488094624634, 10.051271813320358, 9.956424348965415, 5.458526635375026, 5.429587534345759, 5.807062817365774, 10.409000825252871, 5.444155990800697, 6.38482736103294, 7.592376962210506, 8.880703777005019), # 139
(8.444997677025897, 6.801298785613425, 8.647308796115487, 10.012835745039444, 9.92156467458478, 5.445445909628379, 5.400580673463397, 5.795978747590996, 10.388476938898332, 5.420555393811186, 6.358719326686294, 7.562716378308592, 8.849082182878314), # 140
(8.40124789791083, 6.758192090297021, 8.61893536244316, 9.973361639464553, 9.885718431458253, 5.431951548851015, 5.370940751340795, 5.78451993660327, 10.36727094769768, 5.396366207481251, 6.331940092293238, 7.532266740021525, 8.816572659637913), # 141
(8.356443573718156, 6.714206505295466, 8.58972123390407, 9.93279651265672, 9.848855495829087, 5.418015949208927, 5.340622296506126, 5.772639944200211, 10.345333550752942, 5.371546573421828, 6.304441160030697, 7.500982076994594, 8.783144913695466), # 142
(8.310548338670674, 6.669281647641981, 8.559626999172925, 9.891087380676975, 9.810945743940529, 5.403611506868106, 5.3095798374875685, 5.760292330179432, 10.322615447166147, 5.3460546332438525, 6.276174032075593, 7.4688164188730894, 8.748768651462617), # 143
(8.263525826991184, 6.623357134369786, 8.528613246924428, 9.848181259586356, 9.771959052035829, 5.388710617994547, 5.277767902813299, 5.747430654338549, 10.29906733603931, 5.31984852855826, 6.247090210604851, 7.435723795302299, 8.713413579351014), # 144
(8.215339672902477, 6.576372582512099, 8.496640565833289, 9.804025165445895, 9.731865296358233, 5.3732856787542405, 5.245141021011493, 5.734008476475176, 10.274639916474454, 5.292886400975988, 6.217141197795395, 7.401658235927513, 8.6770494037723), # 145
(8.16595351062735, 6.528267609102142, 8.463669544574216, 9.758566114316626, 9.690634353150992, 5.35730908531318, 5.21165372061033, 5.719979356386927, 10.249283887573606, 5.2651263921079705, 6.186278495824149, 7.3665737703940195, 8.639645831138118), # 146
(8.1153309743886, 6.47898183117313, 8.42966077182191, 9.71175112225958, 9.648236098657351, 5.340753233837358, 5.177260530137981, 5.705296853871415, 10.22294994843879, 5.236526643565146, 6.154453606868036, 7.3304244283471105, 8.601172567860118), # 147
(8.063435698409021, 6.428454865758288, 8.394574836251083, 9.663527205335797, 9.604640409120561, 5.323590520492767, 5.1419159781226265, 5.689914528726257, 10.195588798172029, 5.207045296958447, 6.1216180331039824, 7.29316423943207, 8.561599320349941), # 148
(8.010231316911412, 6.37662632989083, 8.358372326536443, 9.613841379606303, 9.55981716078387, 5.3057933414453995, 5.105574593092441, 5.673785940749067, 10.167151135875338, 5.176640493898813, 6.08772327670891, 7.254747233294191, 8.520895795019237), # 149
(7.955681464118564, 6.323435840603979, 8.321013831352694, 9.562640661132138, 9.513736229890526, 5.287334092861249, 5.0681909035756005, 5.656864649737456, 10.137587660650752, 5.1452703759971765, 6.0527208398597425, 7.215127439578763, 8.479031698279647), # 150
(7.899749774253275, 6.268823014930954, 8.282459939374542, 9.50987206597433, 9.466367492683776, 5.268185170906305, 5.029719438100283, 5.639104215489043, 10.106849071600289, 5.112893084864478, 6.016562224733405, 7.174258887931072, 8.435976736542818), # 151
(7.842399881538343, 6.212727469904973, 8.242671239276701, 9.455482610193918, 9.417680825406869, 5.2483189717465635, 4.9901147251946645, 5.620458197801441, 10.07488606782597, 5.079466762111649, 5.979198933506821, 7.132095607996409, 8.391700616220398), # 152
(7.78359542019656, 6.155088822559256, 8.201608319733868, 9.399419309851933, 9.367646104303056, 5.2277078915480155, 4.949331293386919, 5.600880156472262, 10.041649348429823, 5.044949549349629, 5.940582468356916, 7.088591629420064, 8.346173043724027), # 153
(7.723300024450729, 6.095846689927024, 8.159231769420758, 9.34162918100941, 9.31623320561558, 5.206324326476654, 4.907323671205228, 5.580323651299123, 10.007089612513866, 5.009299588189353, 5.900664331460612, 7.043700981847325, 8.299363725465357), # 154
(7.6614773285236355, 6.034940689041495, 8.115502177012075, 9.282059239727378, 9.263412005587696, 5.184140672698471, 4.864046387177761, 5.558742242079636, 9.971157559180128, 4.972475020241754, 5.859396024994833, 6.997377694923482, 8.251242367856026), # 155
(7.598090966638081, 5.972310436935888, 8.070380131182526, 9.220656502066875, 9.209152380462648, 5.161129326379461, 4.8194539698327, 5.5360894886114185, 9.933803887530626, 4.934433987117773, 5.816729051136504, 6.949575798293822, 8.201778677307685), # 156
(7.533104573016862, 5.907895550643423, 8.023826220606818, 9.157367984088937, 9.153424206483685, 5.137262683685614, 4.773500947698219, 5.512318950692082, 9.894979296667389, 4.895134630428341, 5.772614912062549, 6.900249321603637, 8.150942360231976), # 157
(7.464680946405239, 5.840453120772258, 7.973591953902355, 9.089769581651243, 9.093681105870997, 5.11102447631711, 4.725106720927857, 5.485796952349372, 9.851662091599097, 4.8533659162911436, 5.7255957525389425, 6.847599564194339, 8.096485859415345), # 158
(7.382286766978402, 5.763065319599478, 7.906737818402988, 9.003977158788453, 9.015191309781628, 5.073689648007103, 4.668212763385716, 5.4472135327643825, 9.786427261222144, 4.802280994098745, 5.667416935618994, 6.781362523683108, 8.025427646920194), # 159
(7.284872094904309, 5.675096728540714, 7.821920957955888, 8.89857751040886, 8.916420131346795, 5.024341296047684, 4.602243748383784, 5.3955991895273465, 9.697425227228651, 4.741205651862893, 5.59725950860954, 6.700501948887847, 7.93642060889358), # 160
(7.17322205458596, 5.577120868080469, 7.720046971910309, 8.774572503756728, 8.798393124282113, 4.963577241570314, 4.527681446006876, 5.33160053310978, 9.585829766999018, 4.6706581931709374, 5.515741654599707, 6.605767468907571, 7.830374044819097), # 161
(7.048121770426357, 5.469711258703239, 7.602021459615496, 8.632964006076326, 8.662135842303204, 4.891995305706455, 4.445007626339809, 5.255864173983202, 9.452814657913637, 4.5911569216102315, 5.42348155667862, 6.497908712841293, 7.708197254180333), # 162
(6.9103563668284975, 5.353441420893524, 7.468750020420702, 8.474753884611934, 8.508673839125688, 4.810193309587572, 4.354704059467401, 5.169036722619125, 9.299553677352906, 4.503220140768125, 5.321097397935408, 6.3776753097880325, 7.570799536460879), # 163
(6.760710968195384, 5.228884875135821, 7.321138253675176, 8.300944006607818, 8.339032668465189, 4.718769074345129, 4.257252515474466, 5.071764789489069, 9.127220602697223, 4.407366154231968, 5.209207361459196, 6.245816888846803, 7.419090191144328), # 164
(6.599970698930017, 5.096615141914632, 7.160091758728169, 8.112536239308252, 8.154237884037324, 4.618320421110586, 4.153134764445822, 4.964694985064546, 8.93698921132698, 4.3041132655891134, 5.088429630339111, 6.10308307911662, 7.25397851771427), # 165
(6.428920683435397, 4.957205741714454, 6.9865161349289275, 7.910532449957501, 7.955315039557714, 4.509445171015408, 4.042832576466286, 4.848473919817077, 8.730033280622573, 4.193979778426912, 4.959382387664279, 5.950223509696501, 7.0763738156542955), # 166
(6.248346046114523, 4.811230195019787, 6.801316981626704, 7.695934505799843, 7.74328968874198, 4.392741145191058, 3.9268277216206746, 4.723748204218176, 8.5075265879644, 4.077483996332714, 4.822683816523827, 5.7879878096854585, 6.887185384447996), # 167
(6.059031911370395, 4.659262022315128, 6.605399898170748, 7.469744274079546, 7.519187385305742, 4.268806164768999, 3.805601969993804, 4.5911644487393595, 8.270642910732855, 3.955144222893872, 4.678952100006881, 5.617125608182511, 6.6873225235789615), # 168
(5.861763403606015, 4.501874744084979, 6.399670483910309, 7.232963622040883, 7.28403368296462, 4.138238050880695, 3.6796370916704917, 4.451369263852145, 8.020556026308338, 3.8274787616977366, 4.528805421202568, 5.438386534286672, 6.477694532530785), # 169
(5.657325647224384, 4.339641880813837, 6.185034338194635, 6.98659441692812, 7.038854135434233, 4.001634624657607, 3.549414856735553, 4.305009260028047, 7.7584397120712385, 3.6950059163316578, 4.372861963200016, 5.252520217096959, 6.259210710787055), # 170
(5.4465037666285, 4.173136952986201, 5.962397060372978, 6.731638525985535, 6.784674296430206, 3.8595937072311983, 3.4154170352738054, 4.152731047738583, 7.485467745401956, 3.5582439903829886, 4.211739909088348, 5.060276285712386, 6.032780357831365), # 171
(5.230082886221365, 4.002933481086569, 5.7326642497945866, 6.4690978164573965, 6.5225197196681535, 3.7127131197329337, 3.2781253973700655, 3.9951812374552707, 7.202813903680886, 3.41771128743908, 4.046057441956694, 4.862404369231971, 5.799312773147303), # 172
(5.00884813040598, 3.8296049855994423, 5.4967415058087115, 6.1999741555879755, 6.253415958863702, 3.5615906832942748, 3.1380217131091497, 3.8330064396496235, 6.911651964288422, 3.2739261110872815, 3.8764327448941778, 4.659654096754725, 5.5597172562184625), # 173
(4.783584623585344, 3.653724987009318, 5.2555344277646014, 5.9252694106215404, 5.978388567732466, 3.406824219046685, 2.9955877525758754, 3.6668532647931604, 6.613155704604964, 3.1274067649149466, 3.7034840009899277, 4.452775097379668, 5.314903106528433), # 174
(4.555077490162455, 3.4758670058006946, 5.009948615011508, 5.645985448802367, 5.698463099990069, 3.2490115481216284, 2.851305285855058, 3.497368323357396, 6.308498902010905, 2.9786715525094243, 3.5278293933330693, 4.242517000205814, 5.0657796235608075), # 175
(4.324111854540319, 3.296604562458073, 4.760889666898678, 5.363124137374725, 5.41466510935213, 3.0887504916505666, 2.705656083031515, 3.325198225813849, 5.998855333886642, 2.828238777458067, 3.35008710501273, 4.029629434332179, 4.813256106799174), # 176
(4.0914728411219325, 3.1165111774659513, 4.5092631827753635, 5.077687343582883, 5.128020149534273, 2.9266388707649633, 2.5591219141900625, 3.1509895826340326, 5.68539877761257, 2.6766267433482245, 3.1708753191180357, 3.8148620288577786, 4.5582418557271245), # 177
(3.8579455743102966, 2.9361603713088282, 4.255974761990814, 4.790676934671116, 4.8395537742521135, 2.7632745065962827, 2.4121845494155174, 2.9753890042894655, 5.3693030105690855, 2.52435375376725, 2.9908122187381125, 3.598964412881627, 4.301646169828252), # 178
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 179
)
passenger_arriving_acc = (
(7, 4, 4, 3, 2, 1, 4, 2, 4, 2, 0, 0, 0, 7, 5, 8, 3, 7, 1, 3, 0, 1, 2, 1, 1, 0), # 0
(11, 11, 6, 6, 5, 2, 6, 7, 6, 3, 1, 0, 0, 13, 9, 12, 6, 9, 2, 8, 1, 2, 3, 1, 2, 0), # 1
(17, 15, 11, 12, 7, 3, 8, 11, 7, 4, 1, 0, 0, 24, 12, 18, 13, 16, 2, 11, 3, 3, 5, 1, 2, 0), # 2
(23, 18, 17, 19, 13, 4, 11, 14, 8, 6, 2, 0, 0, 31, 23, 26, 15, 20, 5, 11, 3, 5, 7, 1, 2, 0), # 3
(34, 23, 25, 22, 19, 5, 13, 16, 10, 6, 2, 0, 0, 37, 32, 31, 16, 25, 6, 13, 4, 6, 8, 1, 2, 0), # 4
(37, 28, 32, 29, 24, 7, 18, 19, 13, 8, 5, 0, 0, 46, 42, 34, 18, 32, 8, 14, 4, 9, 9, 2, 4, 0), # 5
(43, 32, 37, 34, 30, 9, 19, 22, 17, 9, 5, 2, 0, 53, 48, 36, 22, 36, 9, 17, 5, 12, 14, 2, 6, 0), # 6
(48, 40, 43, 38, 36, 9, 25, 26, 19, 10, 7, 2, 0, 62, 54, 38, 27, 39, 9, 18, 6, 15, 16, 4, 6, 0), # 7
(54, 43, 45, 49, 40, 11, 32, 30, 21, 11, 8, 2, 0, 66, 58, 42, 28, 43, 14, 19, 8, 17, 18, 8, 6, 0), # 8
(61, 48, 53, 54, 50, 11, 39, 32, 25, 13, 9, 3, 0, 74, 61, 46, 31, 51, 18, 20, 12, 21, 21, 10, 7, 0), # 9
(64, 52, 65, 60, 56, 15, 43, 32, 27, 14, 9, 3, 0, 89, 64, 55, 34, 51, 22, 22, 14, 25, 24, 12, 8, 0), # 10
(73, 63, 73, 68, 60, 18, 45, 32, 30, 16, 9, 4, 0, 95, 76, 62, 38, 58, 24, 27, 18, 28, 27, 14, 9, 0), # 11
(81, 66, 79, 77, 70, 20, 54, 34, 34, 17, 10, 5, 0, 101, 81, 69, 39, 63, 28, 30, 20, 32, 28, 14, 11, 0), # 12
(86, 77, 91, 84, 76, 23, 59, 38, 37, 19, 11, 8, 0, 117, 87, 77, 47, 71, 29, 32, 24, 34, 30, 16, 12, 0), # 13
(103, 89, 99, 98, 80, 25, 61, 43, 41, 19, 13, 9, 0, 128, 91, 86, 53, 81, 30, 34, 26, 38, 31, 17, 12, 0), # 14
(115, 100, 112, 106, 93, 27, 66, 46, 45, 19, 13, 9, 0, 144, 98, 88, 61, 87, 34, 38, 30, 41, 33, 18, 13, 0), # 15
(122, 105, 116, 113, 102, 28, 71, 50, 49, 23, 14, 10, 0, 155, 108, 92, 68, 95, 41, 43, 31, 44, 37, 18, 13, 0), # 16
(133, 112, 121, 119, 108, 34, 75, 51, 55, 23, 15, 11, 0, 164, 117, 98, 74, 102, 46, 45, 32, 45, 40, 18, 13, 0), # 17
(142, 124, 130, 122, 115, 38, 78, 53, 58, 25, 16, 13, 0, 176, 126, 104, 77, 109, 54, 49, 36, 50, 42, 20, 15, 0), # 18
(153, 139, 136, 130, 122, 44, 83, 59, 60, 26, 16, 14, 0, 187, 137, 107, 81, 118, 58, 55, 40, 54, 44, 23, 16, 0), # 19
(160, 150, 142, 140, 127, 48, 86, 61, 63, 28, 17, 14, 0, 194, 145, 115, 82, 129, 66, 61, 43, 58, 48, 26, 16, 0), # 20
(170, 159, 152, 151, 134, 51, 90, 64, 66, 29, 20, 16, 0, 204, 162, 127, 93, 135, 69, 63, 45, 63, 52, 28, 17, 0), # 21
(184, 167, 160, 162, 138, 57, 93, 67, 70, 30, 21, 16, 0, 215, 167, 133, 99, 150, 72, 64, 49, 68, 54, 29, 17, 0), # 22
(196, 184, 168, 176, 148, 59, 97, 69, 74, 33, 21, 17, 0, 226, 179, 140, 104, 159, 77, 66, 51, 69, 59, 31, 20, 0), # 23
(203, 196, 185, 192, 153, 62, 103, 73, 80, 34, 23, 17, 0, 239, 183, 145, 108, 173, 79, 69, 57, 74, 60, 32, 20, 0), # 24
(213, 207, 194, 199, 157, 68, 105, 74, 85, 37, 23, 20, 0, 244, 192, 153, 114, 181, 82, 73, 61, 77, 61, 36, 21, 0), # 25
(224, 214, 202, 207, 166, 73, 107, 79, 92, 40, 24, 21, 0, 254, 197, 164, 117, 192, 85, 80, 63, 80, 64, 39, 23, 0), # 26
(235, 222, 208, 214, 172, 78, 115, 79, 99, 40, 24, 21, 0, 265, 212, 172, 120, 201, 93, 85, 64, 84, 65, 40, 25, 0), # 27
(241, 237, 218, 229, 181, 80, 119, 84, 103, 44, 24, 21, 0, 281, 221, 179, 126, 208, 94, 91, 64, 91, 68, 40, 29, 0), # 28
(256, 240, 231, 238, 190, 86, 122, 87, 106, 45, 25, 21, 0, 287, 227, 187, 133, 221, 100, 96, 69, 96, 72, 40, 30, 0), # 29
(273, 252, 244, 245, 198, 89, 126, 90, 109, 46, 27, 22, 0, 301, 240, 190, 140, 232, 106, 102, 72, 102, 73, 42, 32, 0), # 30
(290, 262, 247, 254, 202, 92, 131, 92, 114, 49, 28, 23, 0, 313, 250, 194, 147, 244, 113, 107, 73, 105, 77, 43, 34, 0), # 31
(298, 272, 254, 262, 214, 93, 136, 96, 117, 49, 28, 26, 0, 321, 268, 201, 148, 257, 120, 113, 74, 108, 78, 44, 35, 0), # 32
(305, 277, 264, 270, 221, 97, 140, 104, 125, 54, 29, 26, 0, 329, 276, 206, 150, 261, 123, 119, 76, 112, 79, 47, 36, 0), # 33
(310, 287, 276, 281, 230, 104, 144, 108, 127, 55, 29, 27, 0, 338, 287, 212, 156, 272, 129, 124, 76, 113, 81, 49, 38, 0), # 34
(323, 298, 281, 289, 237, 108, 148, 112, 134, 57, 30, 27, 0, 351, 297, 217, 161, 283, 136, 127, 76, 114, 84, 49, 38, 0), # 35
(333, 310, 286, 296, 242, 113, 150, 118, 138, 59, 31, 30, 0, 361, 309, 232, 168, 294, 141, 133, 78, 116, 86, 49, 38, 0), # 36
(344, 321, 299, 305, 251, 117, 151, 119, 142, 61, 32, 31, 0, 374, 321, 238, 171, 301, 147, 138, 79, 120, 88, 51, 38, 0), # 37
(348, 328, 308, 310, 257, 120, 157, 120, 145, 63, 33, 32, 0, 387, 328, 242, 176, 315, 148, 142, 81, 121, 89, 52, 38, 0), # 38
(360, 336, 317, 321, 268, 124, 163, 128, 150, 68, 35, 33, 0, 393, 338, 248, 180, 326, 156, 148, 81, 129, 93, 56, 40, 0), # 39
(372, 350, 327, 330, 274, 126, 168, 128, 154, 70, 35, 35, 0, 403, 346, 253, 184, 333, 162, 151, 82, 132, 99, 57, 42, 0), # 40
(382, 363, 338, 340, 283, 131, 169, 133, 160, 74, 36, 35, 0, 414, 351, 260, 190, 341, 166, 155, 83, 136, 100, 58, 43, 0), # 41
(394, 372, 355, 349, 289, 137, 170, 136, 163, 77, 38, 35, 0, 427, 355, 267, 194, 345, 172, 158, 87, 138, 101, 60, 45, 0), # 42
(397, 386, 368, 355, 300, 142, 174, 139, 166, 79, 38, 38, 0, 440, 361, 275, 198, 351, 179, 167, 90, 140, 103, 63, 45, 0), # 43
(407, 398, 380, 363, 310, 145, 177, 149, 170, 81, 39, 39, 0, 448, 373, 285, 203, 360, 184, 173, 92, 145, 107, 65, 46, 0), # 44
(418, 409, 396, 371, 318, 147, 188, 154, 176, 82, 41, 41, 0, 458, 385, 292, 213, 368, 185, 179, 96, 149, 109, 67, 47, 0), # 45
(427, 419, 408, 385, 330, 152, 191, 156, 178, 83, 45, 41, 0, 470, 394, 300, 219, 381, 191, 182, 97, 153, 112, 70, 47, 0), # 46
(434, 427, 416, 389, 335, 154, 193, 158, 182, 87, 47, 41, 0, 487, 404, 309, 226, 390, 197, 185, 102, 157, 119, 75, 47, 0), # 47
(446, 435, 422, 403, 341, 155, 197, 160, 185, 87, 49, 41, 0, 506, 413, 316, 229, 397, 200, 189, 105, 160, 123, 76, 47, 0), # 48
(457, 443, 429, 411, 353, 160, 200, 162, 194, 88, 51, 41, 0, 520, 424, 324, 231, 401, 207, 192, 108, 167, 125, 77, 47, 0), # 49
(467, 453, 433, 418, 358, 163, 202, 163, 198, 90, 52, 41, 0, 534, 435, 327, 239, 406, 210, 199, 113, 170, 126, 78, 48, 0), # 50
(481, 464, 441, 432, 368, 166, 203, 165, 204, 91, 54, 41, 0, 546, 441, 329, 243, 413, 211, 204, 116, 175, 129, 79, 50, 0), # 51
(486, 480, 449, 442, 377, 172, 208, 172, 205, 94, 55, 43, 0, 560, 453, 333, 249, 421, 214, 207, 119, 180, 137, 81, 50, 0), # 52
(492, 489, 453, 455, 385, 174, 214, 176, 207, 95, 58, 45, 0, 573, 459, 339, 254, 436, 220, 211, 121, 185, 141, 81, 53, 0), # 53
(507, 504, 468, 467, 397, 176, 214, 179, 213, 95, 62, 46, 0, 583, 471, 347, 260, 441, 225, 215, 123, 191, 143, 83, 53, 0), # 54
(518, 512, 476, 473, 406, 180, 218, 180, 215, 99, 63, 47, 0, 586, 485, 352, 263, 448, 229, 219, 124, 192, 146, 86, 54, 0), # 55
(523, 522, 481, 485, 416, 183, 223, 185, 217, 100, 63, 47, 0, 596, 492, 363, 269, 456, 231, 225, 127, 193, 150, 92, 54, 0), # 56
(532, 533, 491, 498, 423, 187, 227, 187, 223, 103, 63, 48, 0, 607, 499, 372, 274, 463, 232, 231, 130, 194, 158, 93, 54, 0), # 57
(545, 545, 502, 504, 432, 188, 228, 192, 226, 107, 67, 48, 0, 621, 509, 381, 284, 473, 234, 237, 133, 197, 161, 94, 55, 0), # 58
(556, 556, 517, 513, 441, 193, 229, 195, 233, 110, 67, 50, 0, 632, 514, 388, 287, 479, 238, 240, 136, 199, 162, 95, 57, 0), # 59
(563, 568, 527, 524, 452, 197, 231, 200, 238, 110, 69, 50, 0, 637, 527, 401, 290, 490, 245, 246, 139, 201, 165, 97, 57, 0), # 60
(574, 573, 537, 536, 460, 198, 233, 200, 240, 111, 70, 50, 0, 641, 534, 405, 295, 503, 250, 249, 146, 204, 169, 99, 59, 0), # 61
(580, 577, 542, 546, 473, 199, 239, 203, 247, 112, 72, 52, 0, 650, 544, 408, 298, 511, 253, 255, 150, 212, 169, 99, 59, 0), # 62
(591, 588, 551, 551, 481, 202, 243, 205, 255, 116, 72, 53, 0, 662, 556, 419, 303, 519, 254, 260, 156, 219, 173, 100, 59, 0), # 63
(599, 599, 563, 558, 497, 205, 249, 209, 258, 117, 73, 55, 0, 676, 560, 425, 309, 526, 257, 264, 159, 221, 177, 101, 60, 0), # 64
(606, 610, 573, 568, 503, 210, 257, 210, 261, 119, 74, 57, 0, 688, 567, 433, 312, 537, 263, 268, 160, 226, 179, 102, 60, 0), # 65
(621, 616, 578, 579, 513, 212, 261, 217, 263, 120, 76, 58, 0, 702, 578, 440, 316, 546, 269, 272, 162, 228, 184, 106, 60, 0), # 66
(625, 623, 582, 589, 518, 216, 261, 221, 267, 123, 78, 58, 0, 716, 583, 451, 320, 552, 273, 277, 166, 231, 187, 108, 62, 0), # 67
(637, 633, 587, 597, 522, 217, 262, 226, 276, 125, 79, 59, 0, 729, 595, 455, 327, 560, 277, 281, 168, 234, 190, 110, 63, 0), # 68
(645, 642, 598, 605, 532, 221, 265, 231, 279, 126, 82, 60, 0, 740, 603, 463, 334, 568, 280, 282, 169, 235, 193, 113, 63, 0), # 69
(654, 648, 601, 616, 541, 224, 270, 233, 281, 129, 86, 61, 0, 751, 608, 470, 339, 577, 285, 286, 173, 240, 195, 113, 63, 0), # 70
(658, 655, 606, 621, 547, 229, 271, 236, 281, 133, 87, 61, 0, 760, 617, 479, 342, 587, 290, 291, 175, 245, 196, 116, 64, 0), # 71
(669, 661, 614, 632, 559, 232, 276, 237, 287, 137, 88, 63, 0, 776, 626, 483, 349, 595, 294, 300, 177, 250, 197, 118, 66, 0), # 72
(679, 671, 624, 637, 570, 237, 279, 240, 291, 137, 90, 64, 0, 791, 629, 491, 355, 603, 296, 306, 178, 254, 198, 118, 68, 0), # 73
(693, 679, 633, 645, 577, 243, 280, 241, 293, 138, 92, 64, 0, 804, 633, 495, 362, 608, 299, 315, 186, 259, 202, 119, 68, 0), # 74
(703, 690, 644, 654, 587, 244, 283, 243, 298, 139, 93, 64, 0, 818, 646, 502, 366, 616, 303, 319, 188, 266, 204, 122, 68, 0), # 75
(716, 700, 654, 666, 594, 250, 286, 246, 302, 142, 93, 65, 0, 830, 658, 511, 374, 620, 306, 322, 194, 268, 207, 124, 69, 0), # 76
(725, 707, 664, 673, 604, 255, 288, 250, 307, 144, 93, 67, 0, 841, 663, 517, 382, 632, 311, 328, 195, 271, 211, 125, 70, 0), # 77
(730, 714, 672, 678, 616, 257, 293, 251, 311, 145, 93, 68, 0, 849, 676, 523, 385, 638, 313, 332, 198, 274, 221, 128, 70, 0), # 78
(743, 725, 682, 681, 625, 261, 298, 254, 314, 145, 93, 68, 0, 859, 688, 531, 392, 643, 314, 336, 205, 279, 225, 128, 73, 0), # 79
(752, 734, 693, 692, 633, 262, 300, 255, 318, 149, 95, 69, 0, 869, 695, 533, 399, 651, 318, 339, 206, 282, 227, 130, 73, 0), # 80
(765, 738, 698, 703, 636, 265, 306, 259, 323, 149, 98, 69, 0, 877, 705, 536, 408, 655, 325, 342, 209, 286, 232, 130, 74, 0), # 81
(778, 747, 706, 707, 641, 268, 311, 262, 327, 150, 100, 70, 0, 889, 710, 543, 410, 662, 330, 342, 209, 288, 232, 132, 75, 0), # 82
(785, 756, 710, 712, 646, 270, 312, 264, 330, 151, 101, 70, 0, 899, 717, 548, 412, 671, 333, 343, 211, 291, 237, 133, 76, 0), # 83
(797, 762, 719, 719, 653, 276, 316, 266, 334, 152, 102, 70, 0, 909, 725, 551, 415, 677, 338, 347, 214, 292, 241, 135, 76, 0), # 84
(807, 772, 722, 726, 663, 280, 321, 269, 335, 153, 103, 72, 0, 918, 738, 554, 420, 682, 343, 350, 218, 297, 244, 136, 76, 0), # 85
(814, 782, 735, 737, 671, 283, 323, 271, 336, 156, 104, 72, 0, 923, 749, 561, 422, 688, 347, 355, 219, 300, 247, 137, 77, 0), # 86
(827, 792, 748, 749, 686, 287, 331, 273, 342, 156, 104, 73, 0, 932, 756, 567, 424, 697, 354, 363, 220, 306, 253, 139, 78, 0), # 87
(833, 802, 755, 761, 690, 291, 333, 275, 345, 160, 107, 74, 0, 943, 763, 576, 424, 699, 361, 367, 222, 310, 256, 139, 79, 0), # 88
(847, 812, 762, 772, 697, 293, 334, 276, 347, 161, 109, 75, 0, 949, 771, 581, 427, 708, 365, 372, 222, 314, 257, 142, 81, 0), # 89
(857, 818, 768, 785, 704, 295, 337, 278, 352, 162, 111, 76, 0, 960, 783, 588, 433, 717, 369, 377, 224, 315, 261, 142, 81, 0), # 90
(871, 826, 776, 792, 709, 298, 343, 279, 356, 165, 112, 76, 0, 972, 788, 592, 437, 726, 370, 382, 228, 315, 266, 145, 81, 0), # 91
(885, 833, 783, 799, 719, 304, 348, 280, 358, 166, 116, 76, 0, 982, 794, 597, 442, 737, 375, 384, 228, 320, 270, 145, 81, 0), # 92
(898, 843, 795, 806, 727, 307, 351, 283, 363, 167, 116, 77, 0, 996, 803, 605, 444, 749, 380, 387, 230, 323, 273, 150, 81, 0), # 93
(902, 847, 804, 813, 736, 310, 352, 286, 364, 168, 118, 77, 0, 1008, 812, 608, 449, 759, 384, 390, 233, 325, 275, 152, 81, 0), # 94
(907, 856, 816, 823, 751, 314, 356, 292, 366, 170, 120, 77, 0, 1021, 823, 608, 456, 766, 387, 391, 238, 328, 277, 152, 82, 0), # 95
(909, 862, 829, 832, 756, 316, 360, 297, 368, 170, 123, 77, 0, 1033, 831, 611, 462, 773, 389, 394, 242, 331, 282, 155, 82, 0), # 96
(917, 868, 834, 838, 764, 320, 361, 299, 370, 170, 124, 78, 0, 1042, 838, 615, 466, 780, 390, 398, 243, 333, 285, 156, 82, 0), # 97
(929, 880, 842, 845, 769, 322, 365, 304, 378, 170, 126, 79, 0, 1052, 847, 620, 471, 789, 390, 402, 245, 339, 288, 157, 83, 0), # 98
(937, 889, 852, 851, 782, 329, 370, 308, 383, 172, 127, 82, 0, 1064, 854, 627, 477, 795, 392, 405, 247, 347, 291, 161, 83, 0), # 99
(947, 901, 863, 855, 794, 332, 373, 312, 386, 174, 128, 82, 0, 1072, 862, 631, 480, 800, 399, 407, 252, 352, 292, 162, 83, 0), # 100
(956, 909, 869, 859, 800, 333, 377, 315, 389, 177, 129, 83, 0, 1083, 871, 635, 490, 811, 401, 408, 254, 355, 296, 164, 83, 0), # 101
(967, 917, 879, 869, 804, 338, 380, 315, 394, 179, 129, 83, 0, 1096, 879, 638, 497, 821, 404, 409, 256, 361, 299, 166, 84, 0), # 102
(973, 926, 888, 876, 809, 343, 382, 317, 399, 179, 131, 85, 0, 1110, 890, 643, 500, 829, 404, 411, 259, 366, 300, 166, 86, 0), # 103
(985, 934, 895, 881, 817, 347, 384, 319, 402, 182, 131, 85, 0, 1119, 896, 648, 503, 836, 408, 411, 262, 369, 303, 168, 87, 0), # 104
(994, 940, 903, 895, 823, 351, 386, 321, 403, 183, 131, 86, 0, 1125, 899, 654, 505, 841, 412, 417, 264, 370, 307, 170, 90, 0), # 105
(1002, 953, 912, 902, 835, 357, 391, 325, 408, 184, 134, 86, 0, 1138, 908, 661, 510, 847, 415, 418, 267, 373, 308, 171, 90, 0), # 106
(1010, 961, 925, 910, 846, 357, 392, 329, 414, 185, 134, 86, 0, 1147, 918, 665, 516, 852, 417, 421, 268, 374, 309, 171, 90, 0), # 107
(1020, 969, 935, 923, 855, 362, 396, 330, 419, 186, 135, 86, 0, 1156, 926, 669, 523, 862, 421, 421, 270, 377, 313, 171, 91, 0), # 108
(1027, 977, 940, 930, 866, 369, 401, 334, 426, 187, 135, 87, 0, 1170, 934, 677, 529, 872, 424, 422, 271, 380, 317, 172, 92, 0), # 109
(1041, 985, 948, 937, 874, 371, 405, 335, 430, 189, 135, 87, 0, 1180, 941, 679, 531, 876, 430, 424, 273, 382, 319, 175, 92, 0), # 110
(1048, 998, 959, 941, 884, 373, 405, 335, 432, 190, 135, 87, 0, 1193, 946, 685, 534, 879, 430, 428, 274, 382, 323, 177, 93, 0), # 111
(1061, 1003, 970, 949, 889, 377, 406, 337, 434, 192, 137, 87, 0, 1200, 952, 695, 539, 886, 432, 431, 276, 384, 325, 177, 94, 0), # 112
(1072, 1011, 976, 955, 893, 383, 409, 339, 440, 192, 138, 88, 0, 1202, 965, 700, 540, 899, 436, 436, 278, 386, 326, 178, 95, 0), # 113
(1081, 1020, 985, 963, 901, 389, 411, 342, 444, 194, 139, 90, 0, 1209, 969, 709, 548, 906, 438, 438, 279, 389, 326, 181, 95, 0), # 114
(1093, 1030, 994, 971, 910, 393, 411, 342, 448, 194, 139, 90, 0, 1215, 977, 710, 551, 913, 442, 439, 281, 392, 328, 183, 96, 0), # 115
(1101, 1040, 1001, 981, 915, 400, 411, 345, 449, 195, 141, 91, 0, 1229, 984, 712, 556, 916, 446, 445, 282, 395, 331, 184, 97, 0), # 116
(1109, 1053, 1006, 991, 924, 400, 414, 345, 454, 196, 141, 92, 0, 1239, 989, 718, 559, 921, 447, 445, 283, 399, 334, 186, 97, 0), # 117
(1118, 1059, 1012, 1004, 939, 403, 414, 352, 457, 197, 143, 92, 0, 1246, 999, 723, 564, 927, 447, 447, 283, 401, 336, 187, 99, 0), # 118
(1130, 1067, 1021, 1013, 948, 408, 417, 355, 459, 198, 143, 95, 0, 1256, 1005, 726, 565, 935, 448, 451, 289, 403, 336, 188, 99, 0), # 119
(1138, 1074, 1030, 1020, 959, 411, 423, 356, 465, 200, 143, 96, 0, 1262, 1009, 730, 573, 938, 449, 454, 290, 404, 338, 188, 100, 0), # 120
(1146, 1080, 1041, 1026, 969, 417, 427, 357, 469, 203, 143, 98, 0, 1267, 1018, 736, 580, 946, 451, 457, 293, 409, 342, 188, 101, 0), # 121
(1156, 1084, 1049, 1037, 977, 422, 433, 364, 471, 203, 144, 98, 0, 1272, 1025, 743, 583, 954, 456, 460, 298, 411, 345, 189, 101, 0), # 122
(1160, 1095, 1057, 1039, 987, 424, 435, 366, 477, 204, 146, 98, 0, 1279, 1035, 751, 587, 960, 462, 464, 301, 414, 351, 190, 101, 0), # 123
(1169, 1099, 1067, 1050, 993, 428, 437, 366, 479, 206, 146, 98, 0, 1289, 1045, 757, 589, 970, 469, 466, 302, 417, 353, 191, 101, 0), # 124
(1181, 1109, 1077, 1053, 1001, 433, 440, 368, 482, 208, 146, 101, 0, 1297, 1053, 760, 591, 979, 472, 469, 303, 421, 358, 191, 101, 0), # 125
(1186, 1113, 1093, 1059, 1012, 436, 441, 370, 486, 209, 146, 102, 0, 1308, 1061, 767, 594, 989, 474, 478, 304, 424, 359, 191, 101, 0), # 126
(1201, 1121, 1098, 1067, 1019, 438, 442, 374, 489, 210, 148, 102, 0, 1317, 1068, 769, 601, 996, 477, 480, 306, 427, 360, 192, 102, 0), # 127
(1207, 1130, 1109, 1074, 1028, 446, 443, 376, 494, 212, 149, 102, 0, 1330, 1074, 777, 607, 1001, 478, 481, 309, 432, 364, 193, 102, 0), # 128
(1213, 1136, 1113, 1084, 1036, 453, 443, 378, 497, 212, 151, 102, 0, 1339, 1084, 780, 610, 1005, 480, 484, 310, 434, 367, 196, 104, 0), # 129
(1231, 1141, 1121, 1094, 1043, 456, 446, 383, 498, 214, 152, 102, 0, 1351, 1091, 786, 615, 1009, 482, 488, 312, 438, 369, 197, 104, 0), # 130
(1237, 1151, 1129, 1106, 1052, 459, 448, 385, 502, 216, 155, 103, 0, 1360, 1101, 791, 616, 1013, 484, 492, 315, 443, 370, 201, 106, 0), # 131
(1247, 1157, 1135, 1111, 1060, 462, 454, 386, 507, 219, 156, 103, 0, 1372, 1111, 794, 618, 1024, 485, 496, 316, 448, 373, 201, 106, 0), # 132
(1258, 1164, 1143, 1114, 1070, 466, 456, 388, 511, 220, 157, 104, 0, 1383, 1120, 798, 619, 1029, 489, 499, 318, 451, 377, 203, 108, 0), # 133
(1264, 1174, 1148, 1121, 1078, 468, 458, 391, 512, 223, 159, 105, 0, 1392, 1129, 801, 624, 1035, 494, 502, 320, 455, 378, 205, 108, 0), # 134
(1272, 1180, 1155, 1128, 1087, 470, 460, 395, 516, 223, 159, 105, 0, 1404, 1133, 809, 631, 1043, 497, 505, 323, 459, 379, 207, 108, 0), # 135
(1279, 1188, 1157, 1139, 1092, 471, 465, 397, 524, 223, 160, 107, 0, 1409, 1138, 818, 633, 1048, 497, 509, 327, 466, 381, 209, 111, 0), # 136
(1289, 1197, 1163, 1145, 1099, 476, 467, 402, 525, 225, 161, 108, 0, 1416, 1143, 821, 636, 1063, 497, 512, 327, 469, 384, 210, 112, 0), # 137
(1296, 1204, 1170, 1150, 1108, 480, 471, 403, 527, 225, 163, 108, 0, 1420, 1147, 829, 639, 1069, 502, 520, 330, 473, 388, 213, 113, 0), # 138
(1307, 1209, 1176, 1156, 1113, 483, 475, 406, 528, 225, 164, 108, 0, 1431, 1154, 834, 643, 1073, 503, 523, 331, 477, 390, 214, 116, 0), # 139
(1324, 1218, 1186, 1164, 1116, 486, 478, 407, 531, 226, 165, 108, 0, 1441, 1158, 837, 647, 1081, 510, 527, 332, 481, 391, 215, 118, 0), # 140
(1333, 1224, 1194, 1165, 1122, 487, 479, 407, 534, 228, 168, 108, 0, 1448, 1164, 841, 651, 1087, 512, 529, 332, 481, 393, 218, 118, 0), # 141
(1340, 1230, 1203, 1173, 1135, 491, 481, 413, 539, 230, 169, 108, 0, 1455, 1173, 847, 654, 1098, 517, 534, 334, 487, 395, 218, 118, 0), # 142
(1344, 1236, 1212, 1183, 1142, 494, 483, 413, 540, 230, 171, 108, 0, 1461, 1177, 853, 657, 1101, 519, 536, 338, 488, 397, 218, 120, 0), # 143
(1348, 1242, 1227, 1191, 1150, 499, 486, 415, 544, 230, 173, 110, 0, 1467, 1187, 856, 659, 1108, 521, 537, 339, 490, 400, 221, 120, 0), # 144
(1354, 1247, 1233, 1197, 1161, 502, 489, 415, 546, 231, 174, 111, 0, 1476, 1191, 859, 662, 1114, 523, 538, 340, 490, 403, 222, 120, 0), # 145
(1364, 1252, 1238, 1207, 1167, 504, 490, 416, 548, 232, 175, 111, 0, 1487, 1195, 866, 666, 1123, 525, 539, 340, 498, 406, 225, 120, 0), # 146
(1370, 1257, 1244, 1212, 1173, 506, 493, 418, 550, 233, 177, 112, 0, 1497, 1202, 875, 669, 1131, 527, 541, 343, 501, 408, 226, 120, 0), # 147
(1377, 1261, 1255, 1222, 1178, 507, 495, 420, 552, 233, 177, 112, 0, 1508, 1212, 877, 675, 1137, 529, 542, 346, 507, 410, 226, 120, 0), # 148
(1380, 1267, 1261, 1230, 1184, 510, 498, 425, 553, 233, 178, 112, 0, 1516, 1221, 885, 683, 1143, 536, 544, 347, 509, 410, 229, 122, 0), # 149
(1390, 1275, 1274, 1240, 1186, 513, 501, 427, 558, 234, 181, 112, 0, 1521, 1224, 890, 688, 1149, 537, 545, 350, 513, 410, 231, 122, 0), # 150
(1397, 1277, 1282, 1252, 1193, 518, 506, 431, 560, 238, 182, 113, 0, 1529, 1230, 897, 689, 1157, 541, 545, 353, 515, 410, 231, 122, 0), # 151
(1407, 1284, 1288, 1258, 1200, 519, 506, 436, 561, 240, 182, 115, 0, 1539, 1234, 902, 692, 1165, 545, 547, 357, 516, 412, 234, 122, 0), # 152
(1411, 1293, 1295, 1259, 1210, 523, 508, 439, 565, 241, 182, 116, 0, 1551, 1237, 908, 694, 1170, 548, 552, 358, 519, 419, 234, 122, 0), # 153
(1418, 1301, 1305, 1265, 1214, 524, 511, 441, 571, 244, 183, 117, 0, 1558, 1244, 909, 697, 1180, 553, 553, 360, 522, 423, 237, 122, 0), # 154
(1425, 1307, 1311, 1272, 1217, 530, 514, 444, 574, 246, 184, 118, 0, 1565, 1252, 914, 701, 1185, 556, 553, 361, 525, 424, 238, 122, 0), # 155
(1431, 1312, 1318, 1275, 1222, 534, 515, 449, 578, 249, 184, 118, 0, 1574, 1263, 915, 707, 1196, 561, 557, 364, 528, 426, 241, 123, 0), # 156
(1442, 1317, 1324, 1290, 1231, 538, 516, 450, 581, 249, 185, 118, 0, 1580, 1267, 922, 711, 1210, 568, 561, 365, 531, 428, 243, 123, 0), # 157
(1453, 1321, 1329, 1294, 1233, 543, 518, 451, 587, 249, 185, 118, 0, 1591, 1272, 928, 717, 1214, 570, 563, 369, 533, 430, 244, 123, 0), # 158
(1462, 1323, 1340, 1301, 1236, 543, 521, 452, 587, 249, 186, 118, 0, 1595, 1276, 934, 718, 1220, 571, 567, 371, 534, 434, 244, 123, 0), # 159
(1472, 1332, 1347, 1306, 1243, 547, 525, 452, 591, 252, 186, 118, 0, 1599, 1280, 940, 718, 1225, 576, 569, 372, 539, 438, 244, 125, 0), # 160
(1480, 1344, 1358, 1318, 1247, 550, 527, 457, 592, 254, 186, 118, 0, 1606, 1281, 943, 723, 1234, 579, 570, 374, 542, 439, 246, 125, 0), # 161
(1483, 1348, 1364, 1325, 1250, 553, 529, 457, 593, 255, 186, 118, 0, 1615, 1286, 945, 725, 1238, 580, 572, 376, 544, 441, 246, 125, 0), # 162
(1496, 1355, 1371, 1335, 1258, 556, 530, 463, 597, 255, 186, 118, 0, 1624, 1289, 949, 726, 1244, 581, 574, 377, 551, 442, 248, 125, 0), # 163
(1508, 1360, 1373, 1340, 1265, 560, 531, 464, 600, 256, 188, 119, 0, 1632, 1292, 956, 729, 1252, 582, 576, 379, 553, 446, 248, 125, 0), # 164
(1512, 1366, 1379, 1348, 1269, 561, 535, 467, 602, 257, 189, 120, 0, 1641, 1295, 958, 731, 1261, 586, 577, 379, 557, 450, 249, 126, 0), # 165
(1521, 1370, 1382, 1353, 1275, 562, 537, 471, 603, 258, 189, 120, 0, 1651, 1298, 962, 734, 1269, 586, 577, 380, 561, 453, 251, 128, 0), # 166
(1525, 1373, 1390, 1355, 1284, 563, 539, 472, 606, 258, 190, 120, 0, 1656, 1301, 966, 737, 1276, 589, 580, 381, 563, 454, 255, 128, 0), # 167
(1532, 1376, 1399, 1364, 1286, 568, 544, 473, 608, 259, 190, 120, 0, 1662, 1307, 968, 739, 1282, 592, 581, 383, 565, 455, 256, 128, 0), # 168
(1535, 1380, 1405, 1368, 1290, 573, 545, 475, 612, 259, 191, 120, 0, 1670, 1315, 971, 743, 1287, 594, 583, 384, 569, 456, 258, 128, 0), # 169
(1540, 1385, 1408, 1373, 1292, 578, 547, 475, 613, 261, 192, 121, 0, 1674, 1318, 976, 745, 1288, 594, 585, 387, 571, 457, 258, 129, 0), # 170
(1548, 1389, 1410, 1381, 1296, 581, 550, 477, 617, 262, 193, 121, 0, 1681, 1324, 979, 748, 1294, 594, 585, 389, 574, 458, 258, 129, 0), # 171
(1553, 1393, 1418, 1385, 1301, 581, 553, 477, 623, 262, 193, 122, 0, 1685, 1332, 981, 750, 1296, 595, 586, 390, 577, 459, 259, 130, 0), # 172
(1559, 1395, 1420, 1390, 1304, 581, 554, 478, 626, 263, 193, 122, 0, 1692, 1338, 983, 756, 1299, 599, 587, 392, 578, 459, 259, 130, 0), # 173
(1561, 1404, 1422, 1395, 1307, 583, 555, 479, 628, 265, 193, 122, 0, 1697, 1342, 985, 756, 1302, 601, 588, 392, 581, 460, 260, 130, 0), # 174
(1568, 1410, 1425, 1397, 1312, 586, 555, 482, 629, 266, 193, 122, 0, 1699, 1345, 988, 760, 1307, 604, 591, 392, 585, 463, 260, 130, 0), # 175
(1574, 1414, 1432, 1398, 1316, 589, 556, 483, 629, 266, 194, 122, 0, 1704, 1349, 991, 762, 1311, 605, 592, 392, 585, 466, 260, 130, 0), # 176
(1578, 1415, 1436, 1404, 1318, 590, 556, 483, 632, 267, 194, 123, 0, 1709, 1351, 994, 764, 1319, 606, 593, 393, 588, 467, 261, 132, 0), # 177
(1584, 1417, 1441, 1405, 1319, 591, 557, 483, 634, 268, 195, 123, 0, 1713, 1351, 998, 765, 1323, 606, 594, 394, 592, 470, 261, 132, 0), # 178
(1584, 1417, 1441, 1405, 1319, 591, 557, 483, 634, 268, 195, 123, 0, 1713, 1351, 998, 765, 1323, 606, 594, 394, 592, 470, 261, 132, 0), # 179
)
passenger_arriving_rate = (
(5.020865578371768, 5.064847846385402, 4.342736024677089, 4.661000830397574, 3.7031237384064077, 1.8308820436884476, 2.0730178076869574, 1.938823405408093, 2.030033020722669, 0.9895037538805926, 0.7008775273142672, 0.4081595898588478, 0.0, 5.083880212578363, 4.489755488447325, 3.5043876365713356, 2.968511261641777, 4.060066041445338, 2.7143527675713304, 2.0730178076869574, 1.3077728883488913, 1.8515618692032039, 1.5536669434658585, 0.8685472049354179, 0.4604407133077639, 0.0), # 0
(5.354327152019974, 5.399222302966028, 4.629455492775127, 4.968858189957462, 3.948326891649491, 1.9518237573581576, 2.209734470631847, 2.066464051210712, 2.164081775444303, 1.0547451730692876, 0.7471826893260219, 0.4351013884011963, 0.0, 5.419791647439855, 4.786115272413158, 3.73591344663011, 3.164235519207862, 4.328163550888606, 2.8930496716949965, 2.209734470631847, 1.3941598266843982, 1.9741634458247455, 1.6562860633191545, 0.9258910985550255, 0.49083839117872996, 0.0), # 1
(5.686723008979731, 5.732269739983398, 4.915035237956178, 5.275490778498595, 4.192641982499829, 2.072282983465593, 2.345909253980352, 2.193593853293508, 2.297595602292516, 1.1197284437551367, 0.7933038581293855, 0.46193605433775464, 0.0, 5.75436482820969, 5.0812965977153, 3.9665192906469278, 3.3591853312654094, 4.595191204585032, 3.0710313946109116, 2.345909253980352, 1.480202131046852, 2.0963209912499146, 1.758496926166199, 0.9830070475912357, 0.5211154309075817, 0.0), # 2
(6.016757793146562, 6.062668793441743, 5.198342391099879, 5.579682305649055, 4.435107784001268, 2.191782029841316, 2.4810018208239777, 2.3197088156227115, 2.430045053640364, 1.1841956746065454, 0.8390580686378972, 0.4885571404108718, 0.0, 6.086272806254225, 5.374128544519589, 4.195290343189486, 3.5525870238196355, 4.860090107280728, 3.247592341871796, 2.4810018208239777, 1.5655585927437972, 2.217553892000634, 1.8598941018830188, 1.0396684782199759, 0.551151708494704, 0.0), # 3
(6.343136148415981, 6.389098099345293, 5.478244083085864, 5.880216481036927, 4.674763069197661, 2.3098432043158894, 2.6144718342542292, 2.444304942164548, 2.560900681860902, 1.24788897429192, 0.8842623557650959, 0.514858199362897, 0.0, 6.414188632939817, 5.6634401929918665, 4.42131177882548, 3.743666922875759, 5.121801363721804, 3.422026919030367, 2.6144718342542292, 1.6498880030827783, 2.3373815345988307, 1.9600721603456428, 1.095648816617173, 0.5808270999404813, 0.0), # 4
(6.66456271868351, 6.710236293698289, 5.753607444793765, 6.175877014290295, 4.910646611132853, 2.4259888147198754, 2.745778957362612, 2.566878236885247, 2.689633039327186, 1.310550451479666, 0.9287337544245222, 0.5407327839361791, 0.0, 6.736785359632827, 5.948060623297969, 4.64366877212261, 3.9316513544389973, 5.379266078654372, 3.593629531639346, 2.745778957362612, 1.7328491533713395, 2.4553233055664263, 2.058625671430099, 1.1507214889587531, 0.6100214812452991, 0.0), # 5
(6.979742147844666, 7.024762012504959, 6.023299607103222, 6.465447615037239, 5.141797182850695, 2.5397411688838374, 2.8743828532406313, 2.686924703751037, 2.8157126784122717, 1.3719222148381898, 0.9722892995297139, 0.5660744468730674, 0.0, 7.052736037699606, 6.22681891560374, 4.8614464976485685, 4.115766644514569, 5.631425356824543, 3.761694585251452, 2.8743828532406313, 1.8141008349170267, 2.5708985914253475, 2.1551492050124135, 1.2046599214206444, 0.6386147284095418, 0.0), # 6
(7.2873790797949685, 7.331353891769537, 6.286187700893863, 6.747711992905847, 5.367253557395036, 2.650622574638337, 2.9997431849797924, 2.8039403467281465, 2.9386101514892147, 1.4317463730358968, 1.0147460259942116, 0.5907767409159108, 0.0, 7.360713718506519, 6.498544150075018, 5.073730129971057, 4.2952391191076895, 5.877220302978429, 3.9255164854194056, 2.9997431849797924, 1.8933018390273837, 2.683626778697518, 2.249237330968616, 1.2572375401787725, 0.6664867174335943, 0.0), # 7
(7.586178158429934, 7.628690567496257, 6.54113885704533, 7.021453857524196, 5.586054507809724, 2.7581553398139356, 3.1213196156715988, 2.917421169782802, 3.0577960109310682, 1.4897650347411937, 1.0559209687315536, 0.6147332188070586, 0.0, 7.659391453419917, 6.762065406877643, 5.279604843657768, 4.469295104223581, 6.1155920218621365, 4.084389637695923, 3.1213196156715988, 1.970110957009954, 2.793027253904862, 2.3404846191747324, 1.3082277714090662, 0.6935173243178416, 0.0), # 8
(7.874844027645085, 7.915450675689353, 6.787020206437253, 7.285456918520376, 5.797238807138606, 2.861861772241199, 3.23857180840756, 3.0268631768812346, 3.1727408091108913, 1.5457203086224858, 1.0956311626552797, 0.6378374332888596, 0.0, 7.947442293806162, 7.016211766177453, 5.478155813276398, 4.637160925867456, 6.345481618221783, 4.237608447633728, 3.23857180840756, 2.044186980172285, 2.898619403569303, 2.4284856395067926, 1.3574040412874508, 0.7195864250626686, 0.0), # 9
(8.152081331335932, 8.190312852353056, 7.022698879949271, 7.538504885522466, 5.999845228425533, 2.961264179750688, 3.3509594262791773, 3.1317623719896712, 3.282915098401738, 1.599354303348179, 1.133693642678929, 0.6599829371036627, 0.0, 8.22353929103161, 7.259812308140289, 5.668468213394645, 4.798062910044536, 6.565830196803476, 4.384467320785539, 3.3509594262791773, 2.11518869982192, 2.9999226142127666, 2.5128349618408223, 1.4045397759898541, 0.7445738956684597, 0.0), # 10
(8.416594713398005, 8.451955733491605, 7.247042008461013, 7.779381468158547, 6.192912544714355, 3.055884870172965, 3.457942132377958, 3.2316147590743394, 3.3877894311766643, 1.6504091275866801, 1.1699254437160416, 0.6810632829938176, 0.0, 8.486355496462611, 7.491696112931993, 5.849627218580208, 4.951227382760039, 6.775578862353329, 4.524260662704076, 3.457942132377958, 2.1827749072664036, 3.0964562723571776, 2.5931271560528497, 1.4494084016922026, 0.7683596121356006, 0.0), # 11
(8.667088817726812, 8.699057955109222, 7.458916722852117, 8.006870376056709, 6.375479529048918, 3.1452461513385908, 3.5589795897954057, 3.325916342101467, 3.486834359808726, 1.6986268900063934, 1.2041436006801558, 0.7009720237016724, 0.0, 8.734563961465534, 7.710692260718395, 6.020718003400779, 5.095880670019179, 6.973668719617452, 4.656282878942054, 3.5589795897954057, 2.246604393813279, 3.187739764524459, 2.6689567920189035, 1.4917833445704234, 0.7908234504644749, 0.0), # 12
(8.902268288217876, 8.93029815321015, 7.657190154002218, 8.219755318845033, 6.546584954473067, 3.2288703310781304, 3.653531461623028, 3.414163125037284, 3.579520436670977, 1.7437496992757264, 1.2361651484848115, 0.7196027119695768, 0.0, 8.966837737406735, 7.915629831665344, 6.180825742424058, 5.2312490978271775, 7.159040873341954, 4.7798283750521975, 3.653531461623028, 2.306335950770093, 3.2732924772365335, 2.7399184396150114, 1.5314380308004438, 0.8118452866554684, 0.0), # 13
(9.120837768766716, 9.144354963798623, 7.840729432790956, 8.416820006151594, 6.705267594030659, 3.306279717222145, 3.7410574109523305, 3.4958511118480193, 3.6653182141364735, 1.785519664063084, 1.2658071220435476, 0.7368489005398801, 0.0, 9.181849875652563, 8.10533790593868, 6.329035610217737, 5.3565589921892505, 7.330636428272947, 4.894191556587227, 3.7410574109523305, 2.3616283694443894, 3.3526337970153297, 2.8056066687171985, 1.5681458865581912, 0.8313049967089657, 0.0), # 14
(9.321501903268855, 9.339907022878865, 8.008401690097953, 8.59684814760449, 6.850566220765538, 3.376996617601199, 3.821017100874813, 3.5704763064998986, 3.743698244578273, 1.823678893036873, 1.2928865562699035, 0.752604142154931, 0.0, 9.37827342756938, 8.27864556370424, 6.464432781349516, 5.471036679110618, 7.487396489156546, 4.998666829099858, 3.821017100874813, 2.4121404411437135, 3.425283110382769, 2.865616049201497, 1.6016803380195905, 0.8490824566253515, 0.0), # 15
(9.5029653356198, 9.51563296645512, 8.159074056802854, 8.758623452831788, 6.981519607721555, 3.4405433400458514, 3.892870194481988, 3.6375347129591504, 3.8141310803694286, 1.8579694948654994, 1.3172204860774188, 0.7667619895570784, 0.0, 9.554781444523545, 8.434381885127861, 6.586102430387094, 5.5739084845964975, 7.628262160738857, 5.092548598142811, 3.892870194481988, 2.4575309571756083, 3.4907598038607777, 2.9195411509439295, 1.6318148113605708, 0.8650575424050111, 0.0), # 16
(9.663932709715075, 9.670211430531618, 8.291613663785293, 8.900929631461583, 7.097166527942559, 3.4964421923866666, 3.9560763548653552, 3.6965223351920073, 3.8760872738829946, 1.8881335782173672, 1.3386259463796333, 0.7792159954886714, 0.0, 9.710046977881415, 8.571375950375383, 6.693129731898166, 5.6644007346521, 7.752174547765989, 5.17513126926881, 3.9560763548653552, 2.4974587088476192, 3.5485832639712793, 2.9669765438205284, 1.6583227327570589, 0.8791101300483289, 0.0), # 17
(9.803108669450204, 9.802321051112584, 8.404887641924901, 9.022550393121959, 7.1965457544723925, 3.5442154824542103, 4.010095245116426, 3.746935177164692, 3.929037377492032, 1.9139132517608846, 1.3569199720900849, 0.7898597126920597, 0.0, 9.842743079009345, 8.688456839612655, 6.784599860450424, 5.741739755282652, 7.858074754984064, 5.245709248030569, 4.010095245116426, 2.531582487467293, 3.5982728772361963, 3.0075167977073205, 1.6809775283849802, 0.8911200955556896, 0.0), # 18
(9.919197858720699, 9.910640464202265, 8.497763122101317, 9.122269447440985, 7.2786960603549105, 3.5833855180790386, 4.054386528326697, 3.7882692428434357, 3.9724519435695926, 1.9350506241644574, 1.3719195981223131, 0.7985866939095915, 0.0, 9.951542799273696, 8.784453633005505, 6.859597990611565, 5.80515187249337, 7.944903887139185, 5.30357693998081, 4.054386528326697, 2.55956108434217, 3.6393480301774552, 3.0407564824803295, 1.6995526244202632, 0.9009673149274788, 0.0), # 19
(10.010904921422082, 9.993848305804882, 8.569107235194169, 9.198870504046766, 7.342656218633962, 3.613474607091719, 4.088409867587681, 3.8200205361944657, 4.005801524488732, 1.95128780409649, 1.3834418593898585, 0.805290491883616, 0.0, 10.035119190040824, 8.858195410719775, 6.9172092969492915, 5.853863412289469, 8.011603048977465, 5.348028750672252, 4.088409867587681, 2.5810532907797996, 3.671328109316981, 3.0662901680155894, 1.713821447038834, 0.9085316641640803, 0.0), # 20
(10.076934501449866, 10.050623211924679, 8.6177871120831, 9.251137272567364, 7.387465002353392, 3.6340050573228124, 4.1116249259908795, 3.84168506118401, 4.028556672622507, 1.9623669002253892, 1.39130379080626, 0.8098646593564828, 0.0, 10.092145302677078, 8.90851125292131, 6.9565189540313, 5.887100700676166, 8.057113345245014, 5.378359085657614, 4.1116249259908795, 2.5957178980877234, 3.693732501176696, 3.0837124241891223, 1.72355742241662, 0.91369301926588, 0.0), # 21
(10.115991242699579, 10.079643818565883, 8.642669883647738, 9.277853462630876, 7.41216118455705, 3.644499176602881, 4.1234913666278, 3.852758821778298, 4.040187940343971, 1.968030021219561, 1.3953224272850568, 0.8122027490705409, 0.0, 10.121294188548827, 8.934230239775948, 6.976612136425284, 5.904090063658682, 8.080375880687942, 5.393862350489617, 4.1234913666278, 2.6032136975734863, 3.706080592278525, 3.09261782087696, 1.7285339767295478, 0.9163312562332622, 0.0), # 22
(10.13039336334264, 10.083079961133974, 8.645769318701419, 9.281198109567903, 7.418488037355065, 3.6458333333333335, 4.124902001129669, 3.8539557613168727, 4.0416420781893, 1.9686980681298587, 1.3958263395269568, 0.8124914647157445, 0.0, 10.125, 8.93740611187319, 6.9791316976347835, 5.906094204389575, 8.0832841563786, 5.395538065843622, 4.124902001129669, 2.604166666666667, 3.7092440186775324, 3.0937327031893016, 1.729153863740284, 0.9166436328303613, 0.0), # 23
(10.141012413034153, 10.08107561728395, 8.645262345679013, 9.280786458333335, 7.422071742409901, 3.6458333333333335, 4.124126906318083, 3.852291666666667, 4.041447222222222, 1.968287654320988, 1.39577076318743, 0.8124238683127573, 0.0, 10.125, 8.936662551440328, 6.978853815937151, 5.904862962962962, 8.082894444444443, 5.393208333333334, 4.124126906318083, 2.604166666666667, 3.7110358712049507, 3.0935954861111123, 1.7290524691358027, 0.9164614197530866, 0.0), # 24
(10.15140723021158, 10.077124771376313, 8.644261545496114, 9.279972029320987, 7.4255766303963355, 3.6458333333333335, 4.122599451303155, 3.8490226337448563, 4.041062242798354, 1.96747970964792, 1.3956605665710604, 0.8122904282883707, 0.0, 10.125, 8.935194711172077, 6.978302832855302, 5.902439128943758, 8.082124485596708, 5.388631687242799, 4.122599451303155, 2.604166666666667, 3.7127883151981678, 3.0933240097736636, 1.728852309099223, 0.9161022519433014, 0.0), # 25
(10.161577019048034, 10.071287780064015, 8.642780635573846, 9.278764081790122, 7.429002578947403, 3.6458333333333335, 4.120343359154361, 3.8442103909465026, 4.0404920781893, 1.9662876771833566, 1.3954967473084758, 0.8120929736320684, 0.0, 10.125, 8.933022709952752, 6.977483736542379, 5.898863031550069, 8.0809841563786, 5.381894547325103, 4.120343359154361, 2.604166666666667, 3.7145012894737013, 3.0929213605967085, 1.7285561271147696, 0.915571616369456, 0.0), # 26
(10.171520983716636, 10.063624999999998, 8.640833333333333, 9.277171874999999, 7.432349465696142, 3.6458333333333335, 4.117382352941177, 3.837916666666667, 4.039741666666666, 1.9647250000000003, 1.3952803030303031, 0.8118333333333335, 0.0, 10.125, 8.930166666666667, 6.976401515151515, 5.894175, 8.079483333333332, 5.373083333333334, 4.117382352941177, 2.604166666666667, 3.716174732848071, 3.0923906250000006, 1.7281666666666669, 0.914875, 0.0), # 27
(10.181238328390501, 10.054196787837219, 8.638433356195703, 9.275204668209877, 7.4356171682756, 3.6458333333333335, 4.113740155733075, 3.830203189300412, 4.038815946502057, 1.9628051211705537, 1.3950122313671698, 0.8115133363816492, 0.0, 10.125, 8.926646700198141, 6.9750611568358485, 5.88841536351166, 8.077631893004114, 5.3622844650205765, 4.113740155733075, 2.604166666666667, 3.7178085841378, 3.091734889403293, 1.7276866712391405, 0.9140178898033837, 0.0), # 28
(10.19072825724275, 10.043063500228623, 8.635594421582077, 9.272871720679012, 7.438805564318813, 3.6458333333333335, 4.109440490599533, 3.821131687242798, 4.037719855967078, 1.9605414837677189, 1.3946935299497027, 0.811134811766499, 0.0, 10.125, 8.922482929431489, 6.973467649748514, 5.881624451303155, 8.075439711934155, 5.349584362139917, 4.109440490599533, 2.604166666666667, 3.7194027821594067, 3.0909572402263383, 1.7271188843164156, 0.9130057727480568, 0.0), # 29
(10.199989974446497, 10.03028549382716, 8.63233024691358, 9.270182291666666, 7.441914531458824, 3.6458333333333335, 4.104507080610022, 3.8107638888888884, 4.036458333333333, 1.957947530864198, 1.39432519640853, 0.8106995884773662, 0.0, 10.125, 8.917695473251028, 6.9716259820426485, 5.873842592592593, 8.072916666666666, 5.335069444444444, 4.104507080610022, 2.604166666666667, 3.720957265729412, 3.0900607638888897, 1.7264660493827162, 0.9118441358024693, 0.0), # 30
(10.209022684174858, 10.01592312528578, 8.62865454961134, 9.267145640432098, 7.444943947328672, 3.6458333333333335, 4.09896364883402, 3.799161522633745, 4.035036316872428, 1.9550367055326936, 1.3939082283742779, 0.8102094955037343, 0.0, 10.125, 8.912304450541077, 6.969541141871389, 5.865110116598079, 8.070072633744855, 5.318826131687243, 4.09896364883402, 2.604166666666667, 3.722471973664336, 3.0890485468107003, 1.7257309099222682, 0.910538465935071, 0.0), # 31
(10.217825590600954, 10.00003675125743, 8.624581047096479, 9.263771026234568, 7.447893689561397, 3.6458333333333335, 4.092833918340999, 3.7863863168724285, 4.033458744855967, 1.951822450845908, 1.3934436234775742, 0.8096663618350862, 0.0, 10.125, 8.906329980185948, 6.96721811738787, 5.8554673525377225, 8.066917489711933, 5.3009408436214, 4.092833918340999, 2.604166666666667, 3.7239468447806985, 3.0879236754115236, 1.7249162094192958, 0.909094250114312, 0.0), # 32
(10.226397897897897, 9.98268672839506, 8.620123456790123, 9.260067708333333, 7.450763635790041, 3.6458333333333335, 4.086141612200436, 3.7725000000000004, 4.031730555555555, 1.9483182098765437, 1.392932379349046, 0.8090720164609053, 0.0, 10.125, 8.899792181069957, 6.96466189674523, 5.84495462962963, 8.06346111111111, 5.2815, 4.086141612200436, 2.604166666666667, 3.7253818178950207, 3.086689236111112, 1.724024691358025, 0.9075169753086421, 0.0), # 33
(10.23473881023881, 9.963933413351622, 8.615295496113397, 9.256044945987654, 7.453553663647644, 3.6458333333333335, 4.078910453481805, 3.7575643004115222, 4.029856687242798, 1.9445374256973027, 1.3923754936193207, 0.8084282883706753, 0.0, 10.125, 8.892711172077426, 6.961877468096604, 5.833612277091907, 8.059713374485597, 5.260590020576132, 4.078910453481805, 2.604166666666667, 3.726776831823822, 3.085348315329219, 1.7230590992226795, 0.9058121284865113, 0.0), # 34
(10.242847531796807, 9.943837162780063, 8.610110882487428, 9.25171199845679, 7.456263650767246, 3.6458333333333335, 4.071164165254579, 3.741640946502058, 4.0278420781893, 1.9404935413808875, 1.3917739639190256, 0.807737006553879, 0.0, 10.125, 8.88510707209267, 6.958869819595128, 5.821480624142661, 8.0556841563786, 5.238297325102881, 4.071164165254579, 2.604166666666667, 3.728131825383623, 3.0839039994855972, 1.7220221764974855, 0.9039851966163696, 0.0), # 35
(10.250723266745005, 9.922458333333331, 8.604583333333334, 9.247078125, 7.45889347478189, 3.6458333333333335, 4.062926470588235, 3.724791666666667, 4.025691666666666, 1.9362000000000004, 1.391128787878788, 0.8070000000000002, 0.0, 10.125, 8.877, 6.95564393939394, 5.8086, 8.051383333333332, 5.214708333333334, 4.062926470588235, 2.604166666666667, 3.729446737390945, 3.0823593750000007, 1.7209166666666669, 0.9020416666666666, 0.0), # 36
(10.258365219256524, 9.89985728166438, 8.598726566072246, 9.242152584876543, 7.4614430133246135, 3.6458333333333335, 4.054221092552247, 3.707078189300412, 4.023410390946502, 1.931670244627344, 1.3904409631292352, 0.8062190976985216, 0.0, 10.125, 8.868410074683737, 6.952204815646175, 5.79501073388203, 8.046820781893004, 5.189909465020577, 4.054221092552247, 2.604166666666667, 3.7307215066623067, 3.080717528292182, 1.7197453132144491, 0.8999870256058529, 0.0), # 37
(10.265772593504476, 9.876094364426155, 8.592554298125286, 9.23694463734568, 7.46391214402846, 3.6458333333333335, 4.04507175421609, 3.6885622427983544, 4.021003189300411, 1.92691771833562, 1.3897114873009937, 0.8053961286389272, 0.0, 10.125, 8.859357415028198, 6.948557436504967, 5.780753155006859, 8.042006378600822, 5.163987139917697, 4.04507175421609, 2.604166666666667, 3.73195607201423, 3.078981545781894, 1.7185108596250571, 0.8978267604023779, 0.0), # 38
(10.272944593661986, 9.851229938271604, 8.586080246913582, 9.231463541666667, 7.466300744526468, 3.6458333333333335, 4.035502178649238, 3.6693055555555554, 4.0184750000000005, 1.9219558641975314, 1.3889413580246914, 0.8045329218106996, 0.0, 10.125, 8.849862139917693, 6.944706790123457, 5.765867592592593, 8.036950000000001, 5.137027777777778, 4.035502178649238, 2.604166666666667, 3.733150372263234, 3.07715451388889, 1.7172160493827164, 0.8955663580246914, 0.0), # 39
(10.279880423902163, 9.82532435985368, 8.579318129858253, 9.225718557098766, 7.468608692451679, 3.6458333333333335, 4.025536088921165, 3.649369855967079, 4.015830761316872, 1.9167981252857802, 1.3881315729309558, 0.8036313062033228, 0.0, 10.125, 8.83994436823655, 6.940657864654778, 5.750394375857339, 8.031661522633744, 5.1091177983539104, 4.025536088921165, 2.604166666666667, 3.7343043462258394, 3.0752395190329227, 1.7158636259716507, 0.8932113054412438, 0.0), # 40
(10.286579288398128, 9.79843798582533, 8.57228166438043, 9.219718942901235, 7.4708358654371345, 3.6458333333333335, 4.015197208101347, 3.628816872427984, 4.0130754115226335, 1.9114579446730684, 1.3872831296504138, 0.8026931108062796, 0.0, 10.125, 8.829624218869075, 6.936415648252069, 5.734373834019204, 8.026150823045267, 5.0803436213991775, 4.015197208101347, 2.604166666666667, 3.7354179327185673, 3.073239647633746, 1.7144563328760862, 0.8907670896204848, 0.0), # 41
(10.293040391323, 9.770631172839506, 8.564984567901236, 9.213473958333335, 7.472982141115872, 3.6458333333333335, 4.004509259259259, 3.6077083333333335, 4.010213888888889, 1.9059487654320992, 1.3863970258136926, 0.8017201646090536, 0.0, 10.125, 8.818921810699589, 6.931985129068463, 5.717846296296297, 8.020427777777778, 5.050791666666667, 4.004509259259259, 2.604166666666667, 3.736491070557936, 3.0711579861111122, 1.7129969135802474, 0.8882391975308643, 0.0), # 42
(10.299262936849892, 9.741964277549155, 8.557440557841794, 9.206992862654321, 7.475047397120935, 3.6458333333333335, 3.993495965464375, 3.58610596707819, 4.007251131687243, 1.9002840306355744, 1.3854742590514195, 0.800714296601128, 0.0, 10.125, 8.807857262612407, 6.927371295257098, 5.700852091906722, 8.014502263374485, 5.020548353909466, 3.993495965464375, 2.604166666666667, 3.7375236985604676, 3.0689976208847747, 1.7114881115683587, 0.8856331161408324, 0.0), # 43
(10.305246129151927, 9.712497656607225, 8.549663351623229, 9.200284915123458, 7.477031511085363, 3.6458333333333335, 3.9821810497861696, 3.564071502057614, 4.0041920781893, 1.8944771833561962, 1.3845158269942222, 0.7996773357719861, 0.0, 10.125, 8.796450693491845, 6.92257913497111, 5.683431550068587, 8.0083841563786, 4.98970010288066, 3.9821810497861696, 2.604166666666667, 3.7385157555426813, 3.0667616383744867, 1.709932670324646, 0.8829543324188387, 0.0), # 44
(10.310989172402216, 9.682291666666666, 8.541666666666668, 9.193359375, 7.478934360642197, 3.6458333333333335, 3.9705882352941178, 3.541666666666667, 4.001041666666666, 1.8885416666666672, 1.3835227272727273, 0.798611111111111, 0.0, 10.125, 8.784722222222221, 6.917613636363637, 5.665625, 8.002083333333331, 4.958333333333334, 3.9705882352941178, 2.604166666666667, 3.7394671803210984, 3.064453125000001, 1.7083333333333335, 0.8802083333333335, 0.0), # 45
(10.31649127077388, 9.65140666438043, 8.533464220393233, 9.186225501543209, 7.480755823424477, 3.6458333333333335, 3.958741245057694, 3.518953189300412, 3.997804835390946, 1.8824909236396894, 1.3824959575175624, 0.7975174516079867, 0.0, 10.125, 8.772691967687852, 6.912479787587812, 5.647472770919067, 7.995609670781892, 4.926534465020577, 3.958741245057694, 2.604166666666667, 3.7403779117122387, 3.062075167181071, 1.7066928440786466, 0.8774006058527665, 0.0), # 46
(10.321751628440035, 9.619903006401461, 8.525069730224052, 9.178892554012345, 7.482495777065244, 3.6458333333333335, 3.9466638021463734, 3.4959927983539094, 3.994486522633745, 1.8763383973479657, 1.3814365153593549, 0.7963981862520958, 0.0, 10.125, 8.760380048773053, 6.9071825767967745, 5.629015192043896, 7.98897304526749, 4.894389917695474, 3.9466638021463734, 2.604166666666667, 3.741247888532622, 3.0596308513374493, 1.7050139460448106, 0.8745366369455876, 0.0), # 47
(10.326769449573796, 9.587841049382716, 8.516496913580248, 9.171369791666667, 7.48415409919754, 3.6458333333333335, 3.9343796296296296, 3.4728472222222226, 3.9910916666666667, 1.8700975308641978, 1.3803453984287317, 0.7952551440329219, 0.0, 10.125, 8.74780658436214, 6.901726992143659, 5.610292592592592, 7.982183333333333, 4.861986111111112, 3.9343796296296296, 2.604166666666667, 3.74207704959877, 3.05712326388889, 1.7032993827160496, 0.871621913580247, 0.0), # 48
(10.331543938348286, 9.555281149977136, 8.507759487882945, 9.163666473765433, 7.485730667454405, 3.6458333333333335, 3.9219124505769383, 3.4495781893004116, 3.987625205761317, 1.8637817672610888, 1.3792236043563206, 0.7940901539399483, 0.0, 10.125, 8.73499169333943, 6.896118021781603, 5.5913453017832655, 7.975250411522634, 4.829409465020577, 3.9219124505769383, 2.604166666666667, 3.7428653337272024, 3.054555491255145, 1.7015518975765893, 0.8686619227251944, 0.0), # 49
(10.336074298936616, 9.522283664837678, 8.49887117055327, 9.155791859567902, 7.4872253594688765, 3.6458333333333335, 3.909285988057775, 3.4262474279835393, 3.9840920781893, 1.85740454961134, 1.3780721307727481, 0.7929050449626583, 0.0, 10.125, 8.72195549458924, 6.89036065386374, 5.572213648834019, 7.9681841563786, 4.796746399176955, 3.909285988057775, 2.604166666666667, 3.7436126797344382, 3.051930619855968, 1.6997742341106543, 0.86566215134888, 0.0), # 50
(10.34035973551191, 9.488908950617283, 8.489845679012346, 9.147755208333333, 7.488638052873998, 3.6458333333333335, 3.896523965141612, 3.4029166666666666, 3.9804972222222226, 1.8509793209876546, 1.3768919753086422, 0.7917016460905352, 0.0, 10.125, 8.708718106995885, 6.884459876543211, 5.552937962962963, 7.960994444444445, 4.764083333333334, 3.896523965141612, 2.604166666666667, 3.744319026436999, 3.049251736111112, 1.6979691358024693, 0.8626280864197532, 0.0), # 51
(10.344399452247279, 9.455217363968908, 8.480696730681299, 9.139565779320987, 7.489968625302809, 3.6458333333333335, 3.883650104897926, 3.3796476337448556, 3.976845576131687, 1.8445195244627348, 1.3756841355946297, 0.7904817863130622, 0.0, 10.125, 8.695299649443683, 6.878420677973147, 5.533558573388203, 7.953691152263374, 4.731506687242798, 3.883650104897926, 2.604166666666667, 3.7449843126514044, 3.04652192644033, 1.69613934613626, 0.8595652149062645, 0.0), # 52
(10.348192653315843, 9.421269261545497, 8.471438042981255, 9.131232831790122, 7.491216954388353, 3.6458333333333335, 3.8706881303961915, 3.3565020576131688, 3.9731420781893005, 1.8380386031092826, 1.3744496092613379, 0.7892472946197227, 0.0, 10.125, 8.681720240816947, 6.872248046306688, 5.514115809327846, 7.946284156378601, 4.699102880658437, 3.8706881303961915, 2.604166666666667, 3.7456084771941764, 3.043744277263375, 1.694287608596251, 0.8564790237768635, 0.0), # 53
(10.351738542890716, 9.387125000000001, 8.462083333333332, 9.122765625, 7.492382917763668, 3.6458333333333335, 3.8576617647058824, 3.333541666666666, 3.9693916666666667, 1.8315500000000005, 1.3731893939393938, 0.788, 0.0, 10.125, 8.668, 6.865946969696969, 5.49465, 7.938783333333333, 4.666958333333333, 3.8576617647058824, 2.604166666666667, 3.746191458881834, 3.040921875000001, 1.6924166666666667, 0.8533750000000002, 0.0), # 54
(10.355036325145022, 9.352844935985367, 8.452646319158665, 9.114173418209877, 7.493466393061793, 3.6458333333333335, 3.844594730896474, 3.3108281893004117, 3.9655992798353905, 1.8250671582075908, 1.3719044872594257, 0.7867417314433777, 0.0, 10.125, 8.654159045877153, 6.859522436297127, 5.4752014746227715, 7.931198559670781, 4.6351594650205765, 3.844594730896474, 2.604166666666667, 3.7467331965308963, 3.0380578060699595, 1.6905292638317333, 0.8502586305441244, 0.0), # 55
(10.358085204251871, 9.31848942615455, 8.443140717878373, 9.105465470679011, 7.4944672579157725, 3.6458333333333335, 3.8315107520374405, 3.288423353909465, 3.961769855967078, 1.818603520804756, 1.3705958868520598, 0.7854743179393385, 0.0, 10.125, 8.640217497332722, 6.852979434260299, 5.455810562414267, 7.923539711934156, 4.603792695473251, 3.8315107520374405, 2.604166666666667, 3.7472336289578863, 3.035155156893005, 1.6886281435756747, 0.8471354023776865, 0.0), # 56
(10.360884384384383, 9.284118827160494, 8.433580246913582, 9.096651041666666, 7.495385389958644, 3.6458333333333335, 3.818433551198257, 3.2663888888888892, 3.957908333333333, 1.812172530864198, 1.369264590347924, 0.7841995884773663, 0.0, 10.125, 8.626195473251027, 6.8463229517396185, 5.436517592592593, 7.915816666666666, 4.572944444444445, 3.818433551198257, 2.604166666666667, 3.747692694979322, 3.0322170138888898, 1.6867160493827165, 0.844010802469136, 0.0), # 57
(10.36343306971568, 9.24979349565615, 8.423978623685414, 9.087739390432098, 7.496220666823449, 3.6458333333333335, 3.8053868514483984, 3.2447865226337447, 3.954019650205761, 1.8057876314586196, 1.367911595377645, 0.7829193720469442, 0.0, 10.125, 8.612113092516385, 6.8395579768882255, 5.417362894375858, 7.908039300411522, 4.5427011316872425, 3.8053868514483984, 2.604166666666667, 3.7481103334117245, 3.029246463477367, 1.684795724737083, 0.8408903177869229, 0.0), # 58
(10.36573046441887, 9.215573788294467, 8.414349565614998, 9.078739776234567, 7.49697296614323, 3.6458333333333335, 3.792394375857339, 3.2236779835390945, 3.9501087448559673, 1.799462265660723, 1.3665378995718502, 0.7816354976375554, 0.0, 10.125, 8.597990474013107, 6.83268949785925, 5.398386796982168, 7.900217489711935, 4.513149176954733, 3.792394375857339, 2.604166666666667, 3.748486483071615, 3.02624659207819, 1.6828699131229998, 0.8377794352994972, 0.0), # 59
(10.367775772667077, 9.181520061728396, 8.404706790123456, 9.069661458333334, 7.497642165551024, 3.6458333333333335, 3.779479847494553, 3.203125, 3.946180555555556, 1.7932098765432103, 1.3651445005611673, 0.7803497942386832, 0.0, 10.125, 8.583847736625515, 6.825722502805837, 5.37962962962963, 7.892361111111112, 4.484375, 3.779479847494553, 2.604166666666667, 3.748821082775512, 3.023220486111112, 1.6809413580246915, 0.8346836419753088, 0.0), # 60
(10.369568198633415, 9.147692672610884, 8.395064014631917, 9.060513695987654, 7.498228142679874, 3.6458333333333335, 3.7666669894295164, 3.183189300411523, 3.9422400205761314, 1.7870439071787843, 1.3637323959762233, 0.7790640908398111, 0.0, 10.125, 8.56970499923792, 6.818661979881115, 5.361131721536351, 7.884480041152263, 4.456465020576132, 3.7666669894295164, 2.604166666666667, 3.749114071339937, 3.0201712319958856, 1.6790128029263836, 0.8316084247828076, 0.0), # 61
(10.371106946491004, 9.114151977594878, 8.385434956561502, 9.051305748456791, 7.498730775162823, 3.6458333333333335, 3.753979524731703, 3.1639326131687247, 3.9382920781893, 1.7809778006401469, 1.3623025834476452, 0.7777802164304223, 0.0, 10.125, 8.555582380734645, 6.811512917238226, 5.3429334019204395, 7.8765841563786, 4.429505658436215, 3.753979524731703, 2.604166666666667, 3.7493653875814115, 3.0171019161522645, 1.6770869913123003, 0.8285592706904436, 0.0), # 62
(10.37239122041296, 9.080958333333333, 8.375833333333334, 9.042046875, 7.499149940632904, 3.6458333333333335, 3.741441176470588, 3.1454166666666667, 3.9343416666666666, 1.7750250000000003, 1.360856060606061, 0.7765000000000001, 0.0, 10.125, 8.5415, 6.804280303030303, 5.325075, 7.868683333333333, 4.403583333333334, 3.741441176470588, 2.604166666666667, 3.749574970316452, 3.014015625000001, 1.675166666666667, 0.8255416666666667, 0.0), # 63
(10.373420224572397, 9.048172096479195, 8.366272862368541, 9.032746334876544, 7.4994855167231655, 3.6458333333333335, 3.729075667715646, 3.127703189300412, 3.9303937242798352, 1.7691989483310475, 1.3593938250820965, 0.7752252705380279, 0.0, 10.125, 8.527477975918305, 6.796969125410483, 5.307596844993141, 7.8607874485596705, 4.378784465020577, 3.729075667715646, 2.604166666666667, 3.7497427583615828, 3.0109154449588487, 1.6732545724737085, 0.822561099679927, 0.0), # 64
(10.374193163142438, 9.015853623685413, 8.35676726108825, 9.023413387345679, 7.499737381066645, 3.6458333333333335, 3.7169067215363514, 3.1108539094650207, 3.9264531893004113, 1.7635130887059902, 1.357916874506381, 0.7739578570339887, 0.0, 10.125, 8.513536427373873, 6.7895843725319045, 5.290539266117969, 7.852906378600823, 4.355195473251029, 3.7169067215363514, 2.604166666666667, 3.7498686905333223, 3.0078044624485605, 1.67135345221765, 0.819623056698674, 0.0), # 65
(10.374709240296196, 8.984063271604938, 8.34733024691358, 9.014057291666667, 7.499905411296382, 3.6458333333333335, 3.7049580610021784, 3.094930555555556, 3.9225250000000003, 1.7579808641975312, 1.3564262065095398, 0.7726995884773664, 0.0, 10.125, 8.499695473251029, 6.782131032547699, 5.273942592592592, 7.8450500000000005, 4.332902777777778, 3.7049580610021784, 2.604166666666667, 3.749952705648191, 3.0046857638888897, 1.6694660493827165, 0.8167330246913582, 0.0), # 66
(10.374967660206792, 8.952861396890716, 8.337975537265661, 9.004687307098765, 7.499989485045419, 3.6458333333333335, 3.693253409182603, 3.0799948559670787, 3.9186140946502057, 1.7526157178783728, 1.3549228187222018, 0.7714522938576437, 0.0, 10.125, 8.485975232434079, 6.774614093611008, 5.257847153635117, 7.837228189300411, 4.31199279835391, 3.693253409182603, 2.604166666666667, 3.7499947425227096, 3.001562435699589, 1.6675951074531323, 0.8138964906264289, 0.0), # 67
(10.374791614480825, 8.922144586043629, 8.328671624942844, 8.995231305354269, 7.499918636864896, 3.645765673423767, 3.681757597414823, 3.0659766041761927, 3.9146959495503735, 1.747405110411792, 1.3533809980900628, 0.770210835158312, 0.0, 10.124875150034294, 8.47231918674143, 6.766904990450313, 5.242215331235375, 7.829391899100747, 4.29236724584667, 3.681757597414823, 2.604118338159833, 3.749959318432448, 2.99841043511809, 1.6657343249885688, 0.8111040532766937, 0.0), # 68
(10.373141706924315, 8.890975059737157, 8.319157021604937, 8.985212635869564, 7.499273783587508, 3.6452307956104257, 3.6701340906733066, 3.052124485596708, 3.910599279835391, 1.7422015976761076, 1.3516438064859118, 0.7689349144466104, 0.0, 10.12388599537037, 8.458284058912714, 6.758219032429559, 5.226604793028321, 7.821198559670782, 4.272974279835391, 3.6701340906733066, 2.6037362825788755, 3.749636891793754, 2.9950708786231885, 1.6638314043209876, 0.8082704599761052, 0.0), # 69
(10.369885787558895, 8.859209754856408, 8.309390360653863, 8.974565343196456, 7.497999542752628, 3.6441773992785653, 3.658330067280685, 3.0383135192805977, 3.9063009640298736, 1.736979881115684, 1.3496914810876801, 0.7676185634410675, 0.0, 10.121932334533609, 8.44380419785174, 6.7484574054383994, 5.210939643347051, 7.812601928059747, 4.253638926992837, 3.658330067280685, 2.6029838566275467, 3.748999771376314, 2.991521781065486, 1.6618780721307727, 0.8053827049869463, 0.0), # 70
(10.365069660642929, 8.826867654542236, 8.299375071444901, 8.963305127818035, 7.496112052502757, 3.6426225549966977, 3.646350829769494, 3.0245482777015704, 3.9018074035970125, 1.7317400898356603, 1.347531228463977, 0.7662627447677263, 0.0, 10.119039887688615, 8.428890192444989, 6.737656142319885, 5.195220269506979, 7.803614807194025, 4.234367588782199, 3.646350829769494, 2.6018732535690696, 3.7480560262513785, 2.987768375939346, 1.6598750142889804, 0.8024425140492942, 0.0), # 71
(10.358739130434783, 8.793967741935482, 8.289114583333333, 8.95144769021739, 7.493627450980392, 3.6405833333333337, 3.634201680672269, 3.0108333333333333, 3.897125, 1.7264823529411768, 1.3451702551834133, 0.7648684210526316, 0.0, 10.115234375, 8.413552631578947, 6.7258512759170666, 5.179447058823529, 7.79425, 4.215166666666667, 3.634201680672269, 2.600416666666667, 3.746813725490196, 2.983815896739131, 1.6578229166666667, 0.7994516129032258, 0.0), # 72
(10.35094000119282, 8.760529000176998, 8.27861232567444, 8.939008730877617, 7.490561876328034, 3.638076804856983, 3.621887922521546, 2.9971732586495965, 3.8922601547020275, 1.7212067995373737, 1.3426157678145982, 0.7634365549218266, 0.0, 10.110541516632374, 8.397802104140093, 6.71307883907299, 5.163620398612119, 7.784520309404055, 4.196042562109435, 3.621887922521546, 2.598626289183559, 3.745280938164017, 2.979669576959206, 1.655722465134888, 0.7964117272888181, 0.0), # 73
(10.341718077175404, 8.726570412407629, 8.267871727823502, 8.926003950281803, 7.486931466688183, 3.6351200401361585, 3.609414857849861, 2.9835726261240665, 3.8872192691662857, 1.7159135587293908, 1.3398749729261428, 0.7619681090013557, 0.0, 10.104987032750344, 8.38164919901491, 6.699374864630713, 5.147740676188171, 7.774438538332571, 4.177001676573693, 3.609414857849861, 2.5965143143829703, 3.7434657333440917, 2.975334650093935, 1.6535743455647005, 0.7933245829461482, 0.0), # 74
(10.331119162640901, 8.692110961768218, 8.256896219135802, 8.912449048913043, 7.482752360203341, 3.6317301097393697, 3.59678778918975, 2.9700360082304527, 3.8820087448559666, 1.7106027596223679, 1.336955077086656, 0.7604640459172624, 0.0, 10.098596643518519, 8.365104505089885, 6.684775385433279, 5.131808278867102, 7.764017489711933, 4.158050411522634, 3.59678778918975, 2.594092935528121, 3.7413761801016703, 2.9708163496376816, 1.6513792438271604, 0.7901919056152927, 0.0), # 75
(10.319189061847677, 8.65716963139962, 8.245689228966622, 8.898359727254428, 7.478040695016003, 3.6279240842351275, 3.5840120190737474, 2.956567977442463, 3.876634983234263, 1.7052745313214452, 1.3338632868647486, 0.7589253282955902, 0.0, 10.091396069101508, 8.348178611251491, 6.669316434323743, 5.115823593964334, 7.753269966468526, 4.139195168419449, 3.5840120190737474, 2.5913743458822336, 3.7390203475080015, 2.96611990908481, 1.6491378457933243, 0.7870154210363293, 0.0), # 76
(10.305973579054093, 8.621765404442675, 8.234254186671238, 8.883751685789049, 7.472812609268672, 3.6237190341919425, 3.5710928500343897, 2.9431731062338065, 3.871104385764365, 1.699929002931763, 1.3306068088290313, 0.7573529187623839, 0.0, 10.083411029663925, 8.330882106386222, 6.653034044145156, 5.099787008795288, 7.74220877152873, 4.120442348727329, 3.5710928500343897, 2.58837073870853, 3.736406304634336, 2.9612505619296834, 1.6468508373342476, 0.7837968549493343, 0.0), # 77
(10.291518518518519, 8.585917264038233, 8.222594521604938, 8.868640625, 7.467084241103849, 3.6191320301783265, 3.5580355846042124, 2.9298559670781894, 3.8654233539094642, 1.6945663035584608, 1.327192849548113, 0.7557477799436866, 0.0, 10.074667245370371, 8.313225579380552, 6.635964247740564, 5.083698910675381, 7.7308467078189285, 4.101798353909466, 3.5580355846042124, 2.585094307270233, 3.7335421205519244, 2.956213541666667, 1.6445189043209878, 0.7805379330943849, 0.0), # 78
(10.275869684499314, 8.549644193327138, 8.210713663123, 8.85304224537037, 7.460871728664031, 3.61418014276279, 3.5448455253157505, 2.916621132449322, 3.859598289132754, 1.6891865623066789, 1.3236286155906039, 0.7541108744655421, 0.0, 10.065190436385459, 8.295219619120962, 6.618143077953018, 5.067559686920035, 7.719196578265508, 4.083269585429051, 3.5448455253157505, 2.5815572448305644, 3.7304358643320157, 2.951014081790124, 1.6421427326246, 0.7772403812115581, 0.0), # 79
(10.259072881254847, 8.51296517545024, 8.198615040580703, 8.836972247383253, 7.454191210091719, 3.6088804425138448, 3.5315279747015405, 2.9034731748209115, 3.853635592897424, 1.683789908281557, 1.3199213135251149, 0.7524431649539947, 0.0, 10.0550063228738, 8.27687481449394, 6.599606567625574, 5.05136972484467, 7.707271185794848, 4.064862444749276, 3.5315279747015405, 2.577771744652746, 3.7270956050458595, 2.945657415794418, 1.639723008116141, 0.7739059250409311, 0.0), # 80
(10.241173913043479, 8.475899193548386, 8.186302083333333, 8.82044633152174, 7.447058823529411, 3.60325, 3.5180882352941176, 2.890416666666667, 3.8475416666666664, 1.6783764705882358, 1.3160781499202554, 0.7507456140350878, 0.0, 10.044140624999999, 8.258201754385965, 6.580390749601277, 5.035129411764706, 7.695083333333333, 4.046583333333333, 3.5180882352941176, 2.57375, 3.7235294117647055, 2.940148777173914, 1.6372604166666667, 0.7705362903225808, 0.0), # 81
(10.222218584123576, 8.438465230762423, 8.17377822073617, 8.803480198268922, 7.43949070711961, 3.5973058857897686, 3.504531609626018, 2.8774561804602956, 3.841322911903673, 1.6729463783318543, 1.3121063313446355, 0.7490191843348656, 0.0, 10.03261906292867, 8.23921102768352, 6.560531656723177, 5.018839134995561, 7.682645823807346, 4.0284386526444145, 3.504531609626018, 2.5695042041355487, 3.719745353559805, 2.934493399422974, 1.634755644147234, 0.767133202796584, 0.0), # 82
(10.202252698753504, 8.400682270233196, 8.16104688214449, 8.78608954810789, 7.431502999004814, 3.591065170451659, 3.4908634002297765, 2.8645962886755068, 3.8349857300716352, 1.6674997606175532, 1.3080130643668657, 0.7472648384793719, 0.0, 10.020467356824417, 8.219913223273089, 6.540065321834328, 5.002499281852659, 7.6699714601432705, 4.01043480414571, 3.4908634002297765, 2.5650465503226134, 3.715751499502407, 2.9286965160359637, 1.632209376428898, 0.7636983882030178, 0.0), # 83
(10.181322061191626, 8.362569295101553, 8.14811149691358, 8.768290081521739, 7.423111837327523, 3.584544924554184, 3.477088909637929, 2.851841563786008, 3.8285365226337444, 1.6620367465504726, 1.3038055555555557, 0.7454835390946503, 0.0, 10.007711226851852, 8.200318930041153, 6.519027777777778, 4.986110239651417, 7.657073045267489, 3.9925781893004113, 3.477088909637929, 2.5603892318244172, 3.7115559186637617, 2.922763360507247, 1.629622299382716, 0.7602335722819594, 0.0), # 84
(10.159472475696308, 8.32414528850834, 8.13497549439872, 8.75009749899356, 7.414333360230238, 3.577762218665854, 3.463213440383012, 2.8391965782655086, 3.8219816910531925, 1.6565574652357518, 1.2994910114793157, 0.7436762488067449, 0.0, 9.994376393175584, 8.180438736874192, 6.497455057396579, 4.969672395707254, 7.643963382106385, 3.9748752095717124, 3.463213440383012, 2.5555444419041815, 3.707166680115119, 2.916699166331187, 1.626995098879744, 0.7567404807734855, 0.0), # 85
(10.136749746525913, 8.285429233594407, 8.121642303955191, 8.731527501006443, 7.405183705855455, 3.57073412335518, 3.44924229499756, 2.826665904587715, 3.815327636793172, 1.6510620457785314, 1.2950766387067558, 0.7418439302416996, 0.0, 9.98048857596022, 8.160283232658694, 6.475383193533778, 4.953186137335593, 7.630655273586344, 3.9573322664228017, 3.44924229499756, 2.550524373825129, 3.7025918529277275, 2.910509167002148, 1.6243284607910382, 0.7532208394176735, 0.0), # 86
(10.113199677938807, 8.246440113500597, 8.10811535493827, 8.712595788043478, 7.3956790123456795, 3.563477709190672, 3.4351807760141093, 2.8142541152263374, 3.8085807613168727, 1.645550617283951, 1.290569643806486, 0.7399875460255577, 0.0, 9.96607349537037, 8.139863006281134, 6.452848219032429, 4.936651851851852, 7.6171615226337455, 3.9399557613168725, 3.4351807760141093, 2.54534122085048, 3.6978395061728397, 2.904198596014493, 1.6216230709876542, 0.7496763739545999, 0.0), # 87
(10.088868074193357, 8.207196911367758, 8.094398076703246, 8.693318060587762, 7.385835417843406, 3.5560100467408424, 3.4210341859651954, 2.801965782655083, 3.8017474660874866, 1.6400233088571508, 1.2859772333471164, 0.7381080587843638, 0.0, 9.951156871570646, 8.119188646628, 6.429886166735582, 4.9200699265714505, 7.603494932174973, 3.9227520957171165, 3.4210341859651954, 2.540007176243459, 3.692917708921703, 2.897772686862588, 1.6188796153406495, 0.7461088101243417, 0.0), # 88
(10.063800739547922, 8.16771861033674, 8.080493898605397, 8.673710019122383, 7.375669060491138, 3.5483482065742016, 3.406807827383354, 2.7898054793476605, 3.794834152568206, 1.634480249603271, 1.2813066138972575, 0.7362064311441613, 0.0, 9.935764424725651, 8.098270742585774, 6.4065330694862865, 4.903440748809812, 7.589668305136412, 3.905727671086725, 3.406807827383354, 2.534534433267287, 3.687834530245569, 2.891236673040795, 1.6160987797210793, 0.7425198736669765, 0.0), # 89
(10.03804347826087, 8.128024193548386, 8.06640625, 8.653787364130435, 7.365196078431373, 3.5405092592592595, 3.3925070028011204, 2.7777777777777777, 3.7878472222222226, 1.6289215686274514, 1.2765649920255184, 0.7342836257309943, 0.0, 9.919921875, 8.077119883040936, 6.382824960127592, 4.886764705882353, 7.575694444444445, 3.888888888888889, 3.3925070028011204, 2.5289351851851856, 3.6825980392156863, 2.884595788043479, 1.6132812500000002, 0.7389112903225807, 0.0), # 90
(10.011642094590563, 8.088132644143545, 8.05213856024234, 8.63356579609501, 7.35443260980661, 3.532510275364528, 3.378137014751031, 2.7658872504191434, 3.780793076512727, 1.6233473950348318, 1.2717595743005101, 0.7323406051709063, 0.0, 9.903654942558298, 8.055746656879968, 6.35879787150255, 4.870042185104494, 7.561586153025454, 3.872242150586801, 3.378137014751031, 2.5232216252603767, 3.677216304903305, 2.8778552653650036, 1.6104277120484682, 0.7352847858312315, 0.0), # 91
(9.984642392795372, 8.048062945263066, 8.0376942586877, 8.613061015499195, 7.343394792759352, 3.524368325458518, 3.363703165765621, 2.754138469745466, 3.773678116902911, 1.6177578579305527, 1.2668975672908422, 0.7303783320899415, 0.0, 9.886989347565157, 8.034161652989356, 6.334487836454211, 4.853273573791657, 7.547356233805822, 3.8557938576436523, 3.363703165765621, 2.517405946756084, 3.671697396379676, 2.871020338499732, 1.6075388517375402, 0.7316420859330061, 0.0), # 92
(9.957090177133654, 8.00783408004779, 8.023076774691358, 8.592288722826089, 7.332098765432098, 3.5161004801097393, 3.349210758377425, 2.742536008230453, 3.766508744855967, 1.6121530864197533, 1.261986177565125, 0.7283977691141434, 0.0, 9.869950810185184, 8.012375460255576, 6.309930887825625, 4.836459259259259, 7.533017489711934, 3.839550411522634, 3.349210758377425, 2.5115003429355283, 3.666049382716049, 2.86409624094203, 1.6046153549382718, 0.727984916367981, 0.0), # 93
(9.92903125186378, 7.967465031638567, 8.008289537608597, 8.571264618558777, 7.320560665967347, 3.5077238098867043, 3.3346650951189805, 2.7310844383478132, 3.759291361835086, 1.6065332096075746, 1.2570326116919686, 0.7263998788695563, 0.0, 9.85256505058299, 7.990398667565118, 6.285163058459842, 4.819599628822722, 7.518582723670172, 3.823518213686939, 3.3346650951189805, 2.5055170070619317, 3.6602803329836733, 2.8570882061862592, 1.6016579075217197, 0.7243150028762335, 0.0), # 94
(9.90051142124411, 7.926974783176247, 7.993335976794697, 8.550004403180354, 7.308796632507598, 3.499255385357923, 3.320071478522822, 2.719788332571255, 3.7520323693034596, 1.6008983565991557, 1.2520440762399827, 0.7243856239822234, 0.0, 9.834857788923182, 7.968241863804456, 6.260220381199914, 4.8026950697974655, 7.504064738606919, 3.8077036655997567, 3.320071478522822, 2.4994681323985164, 3.654398316253799, 2.850001467726785, 1.5986671953589393, 0.7206340711978407, 0.0), # 95
(9.871576489533012, 7.886382317801674, 7.978219521604939, 8.528523777173913, 7.296822803195352, 3.4907122770919066, 3.3054352111214853, 2.708652263374486, 3.7447381687242793, 1.5952486564996373, 1.247027777777778, 0.7223559670781895, 0.0, 9.816854745370371, 7.945915637860083, 6.23513888888889, 4.785745969498911, 7.489476337448559, 3.7921131687242804, 3.3054352111214853, 2.4933659122085046, 3.648411401597676, 2.8428412590579715, 1.595643904320988, 0.7169438470728796, 0.0), # 96
(9.842272260988848, 7.845706618655694, 7.962943601394604, 8.506838441022543, 7.284655316173109, 3.482111555657166, 3.2907615954475067, 2.697680803231215, 3.7374151615607376, 1.589584238414159, 1.2419909228739638, 0.7203118707834976, 0.0, 9.798581640089164, 7.923430578618472, 6.209954614369819, 4.768752715242476, 7.474830323121475, 3.7767531245237014, 3.2907615954475067, 2.4872225397551184, 3.6423276580865545, 2.8356128136741816, 1.5925887202789208, 0.7132460562414268, 0.0), # 97
(9.812644539869984, 7.804966668879153, 7.947511645518976, 8.48496409520934, 7.272310309583368, 3.4734702916222124, 3.276055934033421, 2.68687852461515, 3.7300697492760246, 1.5839052314478608, 1.236940718097151, 0.7182542977241916, 0.0, 9.78006419324417, 7.900797274966106, 6.184703590485755, 4.751715694343581, 7.460139498552049, 3.7616299344612103, 3.276055934033421, 2.48105020830158, 3.636155154791684, 2.8283213650697805, 1.589502329103795, 0.7095424244435595, 0.0), # 98
(9.782739130434782, 7.764181451612902, 7.931927083333334, 8.462916440217391, 7.259803921568627, 3.464805555555556, 3.261323529411765, 2.67625, 3.7227083333333333, 1.5782117647058826, 1.2318843700159492, 0.7161842105263159, 0.0, 9.761328125, 7.878026315789473, 6.159421850079745, 4.734635294117647, 7.445416666666667, 3.7467500000000005, 3.261323529411765, 2.474861111111111, 3.6299019607843137, 2.820972146739131, 1.5863854166666669, 0.7058346774193549, 0.0), # 99
(9.752601836941611, 7.723369949997786, 7.916193344192958, 8.44071117652979, 7.247152290271389, 3.4561344180257074, 3.2465696841150726, 2.665799801859473, 3.715337315195854, 1.572503967293365, 1.2268290851989685, 0.714102571815914, 0.0, 9.742399155521262, 7.8551282899750525, 6.134145425994841, 4.717511901880093, 7.430674630391708, 3.732119722603262, 3.2465696841150726, 2.468667441446934, 3.6235761451356945, 2.8135703921765973, 1.5832386688385918, 0.7021245409088898, 0.0), # 100
(9.722278463648834, 7.682551147174654, 7.900313857453133, 8.41836400462963, 7.234371553834153, 3.4474739496011786, 3.231799700675881, 2.6555325026672763, 3.7079630963267793, 1.5667819683154474, 1.2217820702148188, 0.7120103442190294, 0.0, 9.723303004972564, 7.832113786409323, 6.108910351074094, 4.7003459049463405, 7.415926192653559, 3.7177455037341867, 3.231799700675881, 2.4624813925722706, 3.6171857769170765, 2.806121334876544, 1.5800627714906266, 0.6984137406522414, 0.0), # 101
(9.691814814814816, 7.641744026284349, 7.884292052469135, 8.395890625, 7.221477850399419, 3.4388412208504806, 3.217018881626725, 2.645452674897119, 3.7005920781893, 1.56104589687727, 1.2167505316321108, 0.7099084903617069, 0.0, 9.704065393518519, 7.808993393978774, 6.083752658160553, 4.683137690631809, 7.4011841563786, 3.703633744855967, 3.217018881626725, 2.4563151577503435, 3.6107389251997093, 2.798630208333334, 1.5768584104938272, 0.6947040023894864, 0.0), # 102
(9.661256694697919, 7.60096757046772, 7.8681313585962505, 8.373306738123993, 7.208487318109686, 3.430253302342123, 3.20223252950014, 2.63556489102271, 3.6932306622466085, 1.5552958820839726, 1.211741676019454, 0.7077979728699895, 0.0, 9.68471204132373, 7.785777701569883, 6.058708380097269, 4.6658876462519165, 7.386461324493217, 3.689790847431794, 3.20223252950014, 2.4501809302443736, 3.604243659054843, 2.7911022460413317, 1.5736262717192502, 0.6909970518607019, 0.0), # 103
(9.63064990755651, 7.560240762865614, 7.851835205189758, 8.350628044484703, 7.195416095107452, 3.421727264644617, 3.187445946828663, 2.6258737235177567, 3.685885249961896, 1.5495320530406955, 1.2067627099454585, 0.7056797543699213, 0.0, 9.665268668552812, 7.762477298069133, 6.033813549727292, 4.648596159122086, 7.371770499923792, 3.6762232129248593, 3.187445946828663, 2.4440909033175835, 3.597708047553726, 2.783542681494901, 1.5703670410379515, 0.687294614805965, 0.0), # 104
(9.600040257648953, 7.519582586618876, 7.835407021604938, 8.327870244565217, 7.182280319535221, 3.4132801783264752, 3.172664436144829, 2.6163837448559675, 3.6785622427983538, 1.5437545388525786, 1.201820839978735, 0.7035547974875461, 0.0, 9.64576099537037, 7.739102772363006, 6.009104199893674, 4.631263616557734, 7.3571244855967075, 3.662937242798354, 3.172664436144829, 2.4380572702331964, 3.5911401597676105, 2.775956748188406, 1.5670814043209877, 0.6835984169653525, 0.0), # 105
(9.569473549233614, 7.479012024868357, 7.818850237197074, 8.305049038848631, 7.1690961295354905, 3.404929113956206, 3.1578932999811724, 2.6070995275110502, 3.6712680422191735, 1.5379634686247616, 1.1969232726878927, 0.701424064848908, 0.0, 9.626214741941014, 7.715664713337986, 5.9846163634394625, 4.613890405874283, 7.342536084438347, 3.6499393385154706, 3.1578932999811724, 2.4320922242544327, 3.5845480647677452, 2.768349679616211, 1.5637700474394147, 0.6799101840789417, 0.0), # 106
(9.538995586568856, 7.438548060754901, 7.802168281321446, 8.282180127818036, 7.155879663250759, 3.3966911421023225, 3.1431378408702306, 2.5980256439567144, 3.6640090496875475, 1.532158971462385, 1.1920772146415421, 0.6992885190800504, 0.0, 9.606655628429355, 7.692173709880553, 5.96038607320771, 4.596476914387154, 7.328018099375095, 3.6372359015394005, 3.1431378408702306, 2.426207958644516, 3.5779398316253794, 2.760726709272679, 1.5604336562642893, 0.6762316418868093, 0.0), # 107
(9.508652173913044, 7.398209677419356, 7.785364583333334, 8.259279211956523, 7.1426470588235285, 3.3885833333333335, 3.1284033613445374, 2.589166666666667, 3.656791666666667, 1.5263411764705888, 1.1872898724082936, 0.6971491228070177, 0.0, 9.587109375, 7.668640350877193, 5.936449362041468, 4.579023529411765, 7.313583333333334, 3.624833333333334, 3.1284033613445374, 2.4204166666666667, 3.5713235294117642, 2.7530930706521746, 1.557072916666667, 0.6725645161290325, 0.0), # 108
(9.478489115524543, 7.358015858002567, 7.768442572588021, 8.23636199174718, 7.129414454396299, 3.3806227582177515, 3.113695163936631, 2.580527168114617, 3.6496222946197223, 1.5205102127545123, 1.1825684525567568, 0.6950068386558532, 0.0, 9.567601701817559, 7.645075225214384, 5.9128422627837836, 4.561530638263536, 7.299244589239445, 3.612738035360464, 3.113695163936631, 2.4147305415841083, 3.5647072271981495, 2.7454539972490606, 1.5536885145176043, 0.668910532545688, 0.0), # 109
(9.448552215661715, 7.317985585645383, 7.751405678440788, 8.213444167673108, 7.116197988111569, 3.3728264873240867, 3.0990185511790447, 2.5721117207742723, 3.6425073350099066, 1.5146662094192962, 1.177920161655542, 0.6928626292526012, 0.0, 9.54815832904664, 7.621488921778612, 5.8896008082777085, 4.543998628257887, 7.285014670019813, 3.600956409083981, 3.0990185511790447, 2.409161776660062, 3.5580989940557846, 2.737814722557703, 1.5502811356881578, 0.6652714168768531, 0.0), # 110
(9.41888727858293, 7.278137843488651, 7.7342573302469155, 8.190541440217391, 7.103013798111837, 3.365211591220851, 3.0843788256043156, 2.5639248971193416, 3.635453189300412, 1.5088092955700803, 1.173352206273259, 0.6907174572233054, 0.0, 9.528804976851852, 7.597892029456357, 5.866761031366295, 4.526427886710239, 7.270906378600824, 3.5894948559670783, 3.0843788256043156, 2.4037225651577505, 3.5515068990559184, 2.7301804800724643, 1.546851466049383, 0.6616488948626047, 0.0), # 111
(9.38954010854655, 7.238491614673214, 7.717000957361684, 8.167669509863124, 7.089878022539605, 3.357795140476554, 3.069781289744979, 2.5559712696235333, 3.628466258954427, 1.5029396003120044, 1.1688717929785184, 0.6885722851940093, 0.0, 9.509567365397805, 7.574295137134101, 5.844358964892591, 4.5088188009360115, 7.256932517908854, 3.5783597774729463, 3.069781289744979, 2.3984251003403956, 3.5449390112698027, 2.7225565032877084, 1.543400191472337, 0.6580446922430195, 0.0), # 112
(9.360504223703044, 7.1991320672204555, 7.699681523543391, 8.14487541186903, 7.076783786782469, 3.3505906987084666, 3.0552629818283847, 2.548271903658586, 3.6215709370862066, 1.4970761841531826, 1.1644873176921446, 0.6864327447087024, 0.0, 9.490443900843221, 7.550760191795725, 5.8224365884607225, 4.491228552459547, 7.243141874172413, 3.5675806651220205, 3.0552629818283847, 2.3932790705060474, 3.5383918933912346, 2.7149584706230105, 1.5399363047086783, 0.654466551565496, 0.0), # 113
(9.331480897900065, 7.16044741823174, 7.682538062518016, 8.122342065958001, 7.063595569710884, 3.343581854975776, 3.0410091042052896, 2.5409213581271333, 3.6148730119043533, 1.491328791978196, 1.1602073895188663, 0.684326014342748, 0.0, 9.471275414160035, 7.5275861577702265, 5.801036947594331, 4.473986375934587, 7.229746023808707, 3.557289901377987, 3.0410091042052896, 2.3882727535541255, 3.531797784855442, 2.7074473553193346, 1.5365076125036032, 0.6509497652937947, 0.0), # 114
(9.302384903003995, 7.122451598792792, 7.665580777256098, 8.100063378886334, 7.050271785259067, 3.3367503822909463, 3.027029825095781, 2.533917772616129, 3.6083749928895963, 1.4857063319970194, 1.1560257519045158, 0.6822531318799043, 0.0, 9.452006631660376, 7.5047844506789465, 5.7801287595225785, 4.457118995991058, 7.216749985779193, 3.5474848816625806, 3.027029825095781, 2.3833931302078186, 3.5251358926295335, 2.700021126295445, 1.5331161554512198, 0.647495599890254, 0.0), # 115
(9.273179873237634, 7.0850892578507265, 7.648776824986561, 8.077999612699802, 7.036792350922519, 3.330080178417474, 3.0133024087639466, 2.5272417970412473, 3.6020604464092765, 1.480198339612387, 1.1519343218785802, 0.6802102664572789, 0.0, 9.43260725975589, 7.482312931030067, 5.7596716093929015, 4.44059501883716, 7.204120892818553, 3.5381385158577463, 3.0133024087639466, 2.3786286988696244, 3.5183961754612594, 2.6926665375666015, 1.5297553649973124, 0.6440990234409752, 0.0), # 116
(9.243829442823772, 7.04830504435266, 7.632093362938321, 8.056111029444182, 7.02313718419674, 3.323555141118853, 2.9998041194738763, 2.5208740813181603, 3.5959129388307343, 1.4747943502270324, 1.1479250164705472, 0.6781935872119792, 0.0, 9.413047004858225, 7.46012945933177, 5.739625082352736, 4.424383050681096, 7.1918258776614685, 3.5292237138454245, 2.9998041194738763, 2.3739679579420376, 3.51156859209837, 2.6853703431480613, 1.5264186725876645, 0.6407550040320601, 0.0), # 117
(9.214297245985211, 7.0120436072457135, 7.615497548340306, 8.03435789116525, 7.009286202577227, 3.317159168158581, 2.9865122214896576, 2.51479527536254, 3.5899160365213114, 1.46948389924369, 1.143989752709904, 0.6761992632811126, 0.0, 9.393295573379024, 7.438191896092237, 5.71994876354952, 4.40845169773107, 7.179832073042623, 3.5207133855075567, 2.9865122214896576, 2.369399405827558, 3.5046431012886137, 2.678119297055084, 1.5230995096680613, 0.6374585097496104, 0.0), # 118
(9.184546916944742, 6.976249595477001, 7.598956538421437, 8.012700459908778, 6.99521932355948, 3.3108761573001524, 2.973403979075378, 2.5089860290900607, 3.5840533058483475, 1.4642565220650932, 1.1401204476261382, 0.6742234638017862, 0.0, 9.373322671729932, 7.416458101819647, 5.70060223813069, 4.392769566195279, 7.168106611696695, 3.5125804407260848, 2.973403979075378, 2.3649115409286803, 3.49760966177974, 2.670900153302927, 1.5197913076842873, 0.6342045086797276, 0.0), # 119
(9.154542089925162, 6.940867657993644, 7.582437490410635, 7.991098997720545, 6.980916464638998, 3.304690006307063, 2.9604566564951265, 2.5034269924163928, 3.578308313179186, 1.4591017540939766, 1.136309018248736, 0.6722623579111081, 0.0, 9.353098006322597, 7.394885937022188, 5.68154509124368, 4.377305262281929, 7.156616626358372, 3.50479778938295, 2.9604566564951265, 2.360492861647902, 3.490458232319499, 2.663699665906849, 1.516487498082127, 0.6309879689085133, 0.0), # 120
(9.124246399149268, 6.90584244374276, 7.565907561536823, 7.969513766646325, 6.966357543311279, 3.29858461294281, 2.94764751801299, 2.4980988152572112, 3.572664624881166, 1.4540091307330743, 1.1325473816071863, 0.6703121147461852, 0.0, 9.33259128356866, 7.373433262208036, 5.662736908035931, 4.362027392199222, 7.145329249762332, 3.497338341360096, 2.94764751801299, 2.356131866387721, 3.4831787716556395, 2.656504588882109, 1.5131815123073646, 0.6278038585220692, 0.0), # 121
(9.093623478839854, 6.871118601671464, 7.549333909028926, 7.947905028731892, 6.951522477071823, 3.292543874970886, 2.9349538278930587, 2.492982147528187, 3.5671058073216297, 1.4489681873851195, 1.1288274547309753, 0.6683689034441251, 0.0, 9.31177220987977, 7.352057937885375, 5.644137273654876, 4.346904562155357, 7.1342116146432595, 3.490175006539462, 2.9349538278930587, 2.351817053550633, 3.4757612385359113, 2.6493016762439643, 1.5098667818057854, 0.6246471456064968, 0.0), # 122
(9.062636963219719, 6.836640780726876, 7.532683690115864, 7.92623304602302, 6.936391183416127, 3.28655169015479, 2.9223528503994194, 2.4880576391449933, 3.5616154268679177, 1.443968459452847, 1.1251411546495909, 0.6664288931420351, 0.0, 9.290610491667572, 7.330717824562385, 5.625705773247954, 4.33190537835854, 7.123230853735835, 3.4832806948029904, 2.9223528503994194, 2.3475369215391355, 3.4681955917080636, 2.642077682007674, 1.5065367380231727, 0.621512798247898, 0.0), # 123
(9.031250486511654, 6.802353629856113, 7.515924062026559, 7.90445808056549, 6.920943579839691, 3.2805919562580144, 2.9098218497961597, 2.483305940023303, 3.5561770498873715, 1.4389994823389904, 1.1214803983925201, 0.664488252977023, 0.0, 9.269075835343711, 7.309370782747252, 5.6074019919625995, 4.316998447016971, 7.112354099774743, 3.476628316032624, 2.9098218497961597, 2.3432799687557244, 3.4604717899198456, 2.634819360188497, 1.5031848124053118, 0.618395784532374, 0.0), # 124
(8.999427682938459, 6.768201798006293, 7.499022181989936, 7.88254039440507, 6.905159583838015, 3.274648571044058, 2.8973380903473696, 2.478707700078788, 3.5507742427473308, 1.4340507914462837, 1.1178371029892504, 0.6625431520861957, 0.0, 9.247137947319828, 7.2879746729481525, 5.5891855149462515, 4.30215237433885, 7.1015484854946616, 3.470190780110303, 2.8973380903473696, 2.3390346936028985, 3.4525797919190073, 2.6275134648016905, 1.4998044363979874, 0.6152910725460268, 0.0), # 125
(8.967132186722928, 6.734129934124536, 7.481945207234916, 7.8604402495875405, 6.889019112906595, 3.2687054322764144, 2.884878836317135, 2.474243569227122, 3.545390571815139, 1.4291119221774609, 1.1142031854692689, 0.6605897596066612, 0.0, 9.224766534007578, 7.266487355673273, 5.571015927346345, 4.287335766532382, 7.090781143630278, 3.463940996917971, 2.884878836317135, 2.334789594483153, 3.4445095564532977, 2.620146749862514, 1.4963890414469831, 0.6121936303749579, 0.0), # 126
(8.93432763208786, 6.7000826871579555, 7.464660294990421, 7.838117908158674, 6.8725020845409315, 3.26274643771858, 2.872421351969547, 2.469894197383977, 3.5400096034581354, 1.4241724099352562, 1.1105705628620632, 0.6586242446755264, 0.0, 9.201931301818599, 7.244866691430789, 5.552852814310316, 4.272517229805768, 7.080019206916271, 3.457851876337568, 2.872421351969547, 2.3305331697989855, 3.4362510422704657, 2.612705969386225, 1.4929320589980841, 0.6090984261052688, 0.0), # 127
(8.900977653256046, 6.666004706053673, 7.447134602485375, 7.815533632164248, 6.855588416236526, 3.2567554851340508, 2.859942901568691, 2.465640234465026, 3.534614904043661, 1.4192217901224033, 1.1069311521971208, 0.6566427764298991, 0.0, 9.178601957164537, 7.223070540728888, 5.534655760985604, 4.257665370367209, 7.069229808087322, 3.4518963282510366, 2.859942901568691, 2.3262539179528936, 3.427794208118263, 2.6051778773880834, 1.4894269204970751, 0.6060004278230613, 0.0), # 128
(8.867045884450281, 6.631840639758805, 7.4293352869486995, 7.792647683650037, 6.838258025488874, 3.250716472286322, 2.8474207493786565, 2.4614623303859418, 3.529190039939058, 1.4142495981416365, 1.1032768705039286, 0.6546415240068865, 0.0, 9.154748206457038, 7.20105676407575, 5.516384352519642, 4.242748794424909, 7.058380079878116, 3.4460472625403185, 2.8474207493786565, 2.321940337347373, 3.419129012744437, 2.597549227883346, 1.4858670573897401, 0.6028946036144368, 0.0), # 129
(8.832495959893366, 6.5975351372204685, 7.411229505609316, 7.769420324661814, 6.820490829793475, 3.2446132969388883, 2.8348321596635313, 2.457341135062396, 3.5237185775116666, 1.4092453693956895, 1.0995996348119743, 0.6526166565435961, 0.0, 9.130339756107748, 7.178783221979556, 5.4979981740598705, 4.2277361081870675, 7.047437155023333, 3.4402775890873545, 2.8348321596635313, 2.3175809263849203, 3.4102454148967376, 2.589806774887272, 1.4822459011218634, 0.5997759215654973, 0.0), # 130
(8.797291513808094, 6.563032847385783, 7.392784415696151, 7.7458118172453565, 6.802266746645829, 3.238429856855247, 2.8221543966874045, 2.4532572984100627, 3.5181840831288285, 1.4041986392872965, 1.0958913621507447, 0.6505643431771354, 0.0, 9.105346312528312, 7.156207774948489, 5.479456810753724, 4.212595917861889, 7.036368166257657, 3.4345602177740875, 2.8221543966874045, 2.3131641834680337, 3.4011333733229145, 2.5819372724151193, 1.4785568831392302, 0.596639349762344, 0.0), # 131
(8.76139618041726, 6.528278419201865, 7.373967174438122, 7.72178242344644, 6.783565693541435, 3.2321500497988933, 2.8093647247143627, 2.449191470344614, 3.5125701231578845, 1.3990989432191914, 1.0921439695497275, 0.6484807530446118, 0.0, 9.079737582130376, 7.13328828349073, 5.460719847748638, 4.1972968296575734, 7.025140246315769, 3.4288680584824593, 2.8093647247143627, 2.3086786069992096, 3.3917828467707176, 2.573927474482147, 1.4747934348876244, 0.5934798562910787, 0.0), # 132
(8.724773593943663, 6.493216501615832, 7.354744939064153, 7.697292405310838, 6.764367587975791, 3.225757773533322, 2.7964404080084946, 2.445124300781722, 3.5068602639661752, 1.3939358165941083, 1.0883493740384103, 0.6463620552831327, 0.0, 9.053483271325586, 7.10998260811446, 5.44174687019205, 4.181807449782324, 7.0137205279323505, 3.4231740210944106, 2.7964404080084946, 2.3041126953809443, 3.3821837939878954, 2.5657641351036133, 1.4709489878128308, 0.590292409237803, 0.0), # 133
(8.687387388610095, 6.457791743574804, 7.33508486680317, 7.672302024884328, 6.7446523474443945, 3.2192369258220297, 2.7833587108338893, 2.44103643963706, 3.5010380719210428, 1.388698794814781, 1.0844994926462799, 0.6442044190298056, 0.0, 9.026553086525583, 7.0862486093278605, 5.422497463231399, 4.166096384444343, 7.0020761438420855, 3.417451015491884, 2.7833587108338893, 2.2994549470157355, 3.3723261737221972, 2.557434008294776, 1.4670169733606342, 0.5870719766886187, 0.0), # 134
(8.649201198639354, 6.421948794025897, 7.314954114884091, 7.646771544212684, 6.724399889442747, 3.212571404428512, 2.770096897454634, 2.4369085368263, 3.4950871133898262, 1.3833774132839443, 1.0805862424028239, 0.6420040134217377, 0.0, 8.99891673414202, 7.0620441476391145, 5.402931212014119, 4.150132239851832, 6.9901742267796525, 3.41167195155682, 2.770096897454634, 2.2946938603060802, 3.3621999447213735, 2.548923848070895, 1.4629908229768183, 0.583813526729627, 0.0), # 135
(8.610178658254235, 6.385632301916229, 7.294319840535841, 7.62066122534168, 6.703590131466344, 3.205745107116265, 2.7566322321348173, 2.4327212422651154, 3.4889909547398688, 1.3779612074043308, 1.0766015403375297, 0.6397570075960368, 0.0, 8.970543920586536, 7.037327083556404, 5.383007701687648, 4.133883622212991, 6.9779819094797375, 3.4058097391711617, 2.7566322321348173, 2.289817933654475, 3.351795065733172, 2.540220408447227, 1.4588639681071682, 0.58051202744693, 0.0), # 136
(8.570283401677534, 6.348786916192918, 7.273149200987342, 7.593931330317094, 6.682202991010689, 3.1987419316487826, 2.7429419791385277, 2.428455205869179, 3.4827331623385107, 1.3724397125786756, 1.0725373034798844, 0.63745957068981, 0.0, 8.941404352270776, 7.012055277587909, 5.362686517399421, 4.117319137736026, 6.965466324677021, 3.3998372882168506, 2.7429419791385277, 2.284815665463416, 3.3411014955053444, 2.5313104434390317, 1.4546298401974684, 0.577162446926629, 0.0), # 137
(8.529479063132047, 6.311357285803083, 7.251409353467515, 7.566542121184698, 6.660218385571278, 3.1915457757895624, 2.729003402729852, 2.4240910775541624, 3.4762973025530934, 1.3668024642097119, 1.0683854488593754, 0.6351078718401649, 0.0, 8.91146773560639, 6.986186590241813, 5.341927244296877, 4.100407392629135, 6.952594605106187, 3.3937275085758274, 2.729003402729852, 2.2796755541354017, 3.330109192785639, 2.5221807070615663, 1.450281870693503, 0.5737597532548258, 0.0), # 138
(8.487729276840568, 6.273288059693839, 7.229067455205284, 7.538453859990269, 6.63761623264361, 3.184140537302099, 2.7147937671728797, 2.4196095072357395, 3.469666941750957, 1.3610389977001744, 1.0641378935054902, 0.6326980801842089, 0.0, 8.880703777005019, 6.959678882026297, 5.32068946752745, 4.083116993100523, 6.939333883501914, 3.3874533101300353, 2.7147937671728797, 2.274386098072928, 3.318808116321805, 2.51281795333009, 1.4458134910410567, 0.5702989145176218, 0.0), # 139
(8.444997677025897, 6.234523886812306, 7.206090663429573, 7.509626808779583, 6.614376449723186, 3.176510113949888, 2.7002903367316984, 2.4149911448295818, 3.462825646299444, 1.3551388484527966, 1.0597865544477159, 0.6302263648590494, 0.0, 8.849082182878314, 6.932490013449542, 5.298932772238579, 4.0654165453583895, 6.925651292598888, 3.3809876027614147, 2.7002903367316984, 2.2689357956784915, 3.307188224861593, 2.5032089362598615, 1.4412181326859146, 0.5667748988011189, 0.0), # 140
(8.40124789791083, 6.195009416105602, 7.1824461353693, 7.480021229598415, 6.590478954305501, 3.1686384034964257, 2.6854703756703975, 2.4102166402513627, 3.455756982565893, 1.349091551870313, 1.0553233487155398, 0.6276888950017938, 0.0, 8.816572659637913, 6.904577845019731, 5.276616743577699, 4.047274655610939, 6.911513965131786, 3.3743032963519077, 2.6854703756703975, 2.26331314535459, 3.2952394771527507, 2.4933404098661387, 1.4364892270738603, 0.5631826741914184, 0.0), # 141
(8.356443573718156, 6.154689296520844, 7.158101028253392, 7.44959738449254, 6.565903663886058, 3.1605093037052074, 2.670311148253063, 2.4052666434167547, 3.448444516917647, 1.3428866433554572, 1.0507401933384497, 0.6250818397495496, 0.0, 8.783144913695466, 6.875900237245045, 5.253700966692247, 4.028659930066371, 6.896889033835294, 3.3673733007834565, 2.670311148253063, 2.2575066455037196, 3.282951831943029, 2.4831991281641805, 1.4316202056506786, 0.5595172087746222, 0.0), # 142
(8.310548338670674, 6.113508177005149, 7.133022499310772, 7.418315535507731, 6.540630495960352, 3.152106712339729, 2.6547899187437842, 2.4001218042414303, 3.4408718157220486, 1.3365136583109634, 1.0460290053459322, 0.6224013682394242, 0.0, 8.748768651462617, 6.846415050633665, 5.230145026729661, 4.009540974932889, 6.881743631444097, 3.360170525938002, 2.6547899187437842, 2.251504794528378, 3.270315247980176, 2.472771845169244, 1.4266044998621543, 0.5557734706368318, 0.0), # 143
(8.263525826991184, 6.071410706505636, 7.107177705770357, 7.386135944689768, 6.514639368023886, 3.1434145271634857, 2.6388839514066493, 2.3947627726410623, 3.4330224453464364, 1.3299621321395652, 1.0411817017674754, 0.619643649608525, 0.0, 8.713413579351014, 6.816080145693774, 5.205908508837376, 3.9898863964186946, 6.866044890692873, 3.3526678816974873, 2.6388839514066493, 2.245296090831061, 3.257319684011943, 2.4620453148965895, 1.4214355411540713, 0.5519464278641489, 0.0), # 144
(8.215339672902477, 6.0283415339694235, 7.080533804861075, 7.353018874084421, 6.487910197572155, 3.134416645939974, 2.6225705105057466, 2.3891701985313234, 3.424879972158151, 1.3232216002439972, 1.036190199632566, 0.6168048529939595, 0.0, 8.6770494037723, 6.784853382933553, 5.180950998162829, 3.969664800731991, 6.849759944316302, 3.344838277943853, 2.6225705105057466, 2.238869032814267, 3.2439550987860777, 2.451006291361474, 1.4161067609722149, 0.548031048542675, 0.0), # 145
(8.16595351062735, 5.984245308343629, 7.053057953811847, 7.318924585737469, 6.460422902100661, 3.1250969664326886, 2.605826860305165, 2.3833247318278863, 3.4164279625245353, 1.3162815980269928, 1.0310464159706916, 0.6138811475328351, 0.0, 8.639645831138118, 6.7526926228611845, 5.155232079853457, 3.948844794080978, 6.832855925049071, 3.3366546245590407, 2.605826860305165, 2.2322121188804918, 3.2302114510503306, 2.439641528579157, 1.4106115907623695, 0.5440223007585119, 0.0), # 146
(8.1153309743886, 5.93906667857537, 7.024717309851591, 7.283813341694685, 6.4321573991049, 3.1154393864051255, 2.5886302650689905, 2.3772070224464232, 3.40764998281293, 1.3091316608912866, 1.0257422678113395, 0.6108687023622593, 0.0, 8.601172567860118, 6.719555725984851, 5.1287113390566965, 3.9273949826738592, 6.81529996562586, 3.3280898314249923, 2.5886302650689905, 2.2253138474322327, 3.21607869955245, 2.4279377805648954, 1.4049434619703185, 0.5399151525977609, 0.0), # 147
(8.063435698409021, 5.892750293611764, 6.9954790302092364, 7.247645404001847, 6.403093606080374, 3.105427803620781, 2.5709579890613132, 2.3707977203026074, 3.398529599390676, 1.301761324239612, 1.0202696721839972, 0.6077636866193392, 0.0, 8.561599320349941, 6.68540055281273, 5.101348360919985, 3.905283972718835, 6.797059198781352, 3.3191168084236504, 2.5709579890613132, 2.2181627168719866, 3.201546803040187, 2.4158818013339496, 1.3990958060418472, 0.535704572146524, 0.0), # 148
(8.010231316911412, 5.845240802399927, 6.965310272113703, 7.210381034704727, 6.37321144052258, 3.0950461158431497, 2.5527872965462204, 2.3640774753121114, 3.3890503786251127, 1.2941601234747035, 1.0146205461181517, 0.6045622694411826, 0.0, 8.520895795019237, 6.650184963853008, 5.073102730590758, 3.88248037042411, 6.778100757250225, 3.3097084654369557, 2.5527872965462204, 2.21074722560225, 3.18660572026129, 2.403460344901576, 1.3930620544227408, 0.5313855274909026, 0.0), # 149
(7.955681464118564, 5.796482853886981, 6.934178192793912, 7.171980495849104, 6.342490819927017, 3.0842782208357287, 2.5340954517878003, 2.3570269373906068, 3.3791958868835836, 1.2863175939992944, 1.0087868066432906, 0.601260619964897, 0.0, 8.479031698279647, 6.6138668196138655, 5.043934033216452, 3.8589527819978824, 6.758391773767167, 3.2998377123468496, 2.5340954517878003, 2.2030558720255207, 3.1712454099635083, 2.390660165283035, 1.3868356385587826, 0.5269529867169983, 0.0), # 150
(7.899749774253275, 5.746421097020041, 6.902049949478785, 7.132404049480748, 6.310911661789184, 3.0731080163620113, 2.5148597190501416, 2.3496267564537683, 3.3689496905334293, 1.2782232712161197, 1.002760370788901, 0.5978549073275894, 0.0, 8.435976736542818, 6.576403980603482, 5.013801853944504, 3.8346698136483583, 6.737899381066859, 3.2894774590352753, 2.5148597190501416, 2.1950771545442938, 3.155455830894592, 2.377468016493583, 1.3804099898957571, 0.5224019179109128, 0.0), # 151
(7.842399881538343, 5.6950001807462245, 6.868892699397251, 7.091611957645439, 6.278453883604579, 3.0615194001854955, 2.4950573625973322, 2.3418575824172674, 3.3582953559419897, 1.2698666905279126, 0.9965331555844703, 0.5943413006663675, 0.0, 8.391700616220398, 6.537754307330042, 4.982665777922351, 3.809600071583737, 6.716590711883979, 3.2786006153841742, 2.4950573625973322, 2.1867995715610684, 3.1392269418022893, 2.36387065254848, 1.3737785398794504, 0.5177272891587478, 0.0), # 152
(7.78359542019656, 5.642164754012652, 6.834673599778224, 7.049564482388949, 6.245097402868703, 3.049496270069676, 2.4746656466934596, 2.333700065196776, 3.3472164494766075, 1.2612373873374074, 0.9900970780594861, 0.5907159691183387, 0.0, 8.346173043724027, 6.497875660301725, 4.95048539029743, 3.783712162012222, 6.694432898953215, 3.2671800912754865, 2.4746656466934596, 2.17821162147834, 3.1225487014343516, 2.3498548274629836, 1.3669347199556448, 0.5129240685466048, 0.0), # 153
(7.723300024450729, 5.587859465766439, 6.7993598078506325, 7.006221885757057, 6.210822137077053, 3.0370225237780484, 2.453661835602614, 2.325134854707968, 3.3356965375046217, 1.2523248970473384, 0.9834440552434354, 0.5869750818206104, 0.0, 8.299363725465357, 6.456725900026714, 4.917220276217177, 3.7569746911420143, 6.671393075009243, 3.2551887965911552, 2.453661835602614, 2.169301802698606, 3.1054110685385266, 2.335407295252353, 1.3598719615701265, 0.5079872241605854, 0.0), # 154
(7.6614773285236355, 5.532028964954703, 6.762918480843396, 6.961544429795533, 6.175608003725131, 3.0240820590741087, 2.4320231935888805, 2.316142600866515, 3.323719186393376, 1.2431187550604388, 0.9765660041658056, 0.5831148079102902, 0.0, 8.251242367856026, 6.414262887013191, 4.882830020829028, 3.7293562651813157, 6.647438372786752, 3.242599641213121, 2.4320231935888805, 2.160058613624363, 3.0878040018625654, 2.320514809931845, 1.3525836961686795, 0.5029117240867913, 0.0), # 155
(7.598090966638081, 5.474617900524564, 6.725316775985439, 6.915492376550157, 6.139434920308432, 3.0106587737213526, 2.40972698491635, 2.3067039535880913, 3.3112679625102084, 1.2336084967794434, 0.9694548418560842, 0.5791313165244852, 0.0, 8.201778677307685, 6.370444481769337, 4.84727420928042, 3.7008254903383295, 6.622535925020417, 3.2293855350233276, 2.40972698491635, 2.150470552658109, 3.069717460154216, 2.3051641255167192, 1.3450633551970879, 0.49769253641132405, 0.0), # 156
(7.533104573016862, 5.415570921423138, 6.686521850505682, 6.868025988066703, 6.102282804322456, 2.9967365654832747, 2.3867504738491094, 2.2967995627883675, 3.2983264322224626, 1.2237836576070855, 0.9621024853437583, 0.5750207768003032, 0.0, 8.150942360231976, 6.325228544803333, 4.810512426718791, 3.671350972821256, 6.596652864444925, 3.2155193879037145, 2.3867504738491094, 2.140526118202339, 3.051141402161228, 2.2893419960222348, 1.3373043701011365, 0.4923246292202853, 0.0), # 157
(7.464680946405239, 5.353748694041236, 6.644659961585297, 6.817327186238432, 6.062454070580665, 2.9814309445183143, 2.3625533604639286, 2.285748730145572, 3.2838873638663655, 1.213341479072786, 0.9542659587564906, 0.570633297016195, 0.0, 8.096485859415345, 6.276966267178143, 4.771329793782452, 3.640024437218358, 6.567774727732731, 3.200048222203801, 2.3625533604639286, 2.129593531798796, 3.0312270352903323, 2.2724423954128112, 1.3289319923170593, 0.48670442673102154, 0.0), # 158
(7.382286766978402, 5.282809876299521, 6.58894818200249, 6.7529828690913405, 6.010127539854418, 2.95965229467081, 2.334106381692858, 2.2696723053184926, 3.2621424204073812, 1.2005702485246865, 0.9445694892698324, 0.5651135436402591, 0.0, 8.025427646920194, 6.216248980042849, 4.722847446349162, 3.601710745574059, 6.5242848408147625, 3.17754122744589, 2.334106381692858, 2.114037353336293, 3.005063769927209, 2.250994289697114, 1.3177896364004982, 0.4802554432999565, 0.0), # 159
(7.284872094904309, 5.202172001162321, 6.51826746496324, 6.673933132806645, 5.94428008756453, 2.9308657560278157, 2.301121874191892, 2.248166328969728, 3.2324750757428835, 1.1853014129657236, 0.9328765847682567, 0.5583751624073207, 0.0, 7.93642060889358, 6.142126786480525, 4.664382923841283, 3.55590423889717, 6.464950151485767, 3.147432860557619, 2.301121874191892, 2.0934755400198686, 2.972140043782265, 2.2246443776022153, 1.3036534929926482, 0.47292472737839286, 0.0), # 160
(7.17322205458596, 5.11236079574043, 6.4333724765919245, 6.5809293778175455, 5.865595416188075, 2.895420057582683, 2.263840723003438, 2.2215002221290754, 3.1952765889996724, 1.1676645482927346, 0.9192902757666179, 0.5504806224089643, 0.0, 7.830374044819097, 6.055286846498606, 4.596451378833089, 3.5029936448782033, 6.390553177999345, 3.1101003109807053, 2.263840723003438, 2.0681571839876307, 2.9327977080940375, 2.1936431259391824, 1.2866744953183848, 0.46476007234003913, 0.0), # 161
(7.048121770426357, 5.013901987144635, 6.335017883012913, 6.474723004557244, 5.7747572282021356, 2.853663928328766, 2.2225038131699044, 2.1899434058263343, 3.150938219304545, 1.147789230402558, 0.9039135927797701, 0.5414923927367745, 0.0, 7.708197254180333, 5.956416320104519, 4.519567963898851, 3.4433676912076736, 6.30187643860909, 3.065920768156868, 2.2225038131699044, 2.03833137737769, 2.8873786141010678, 2.158241001519082, 1.2670035766025827, 0.4558092715586033, 0.0), # 162
(6.9103563668284975, 4.90732130248573, 6.223958350350585, 6.35606541345895, 5.672449226083792, 2.8059460972594175, 2.1773520297337003, 2.153765301091302, 3.0998512257843016, 1.1258050351920315, 0.8868495663225682, 0.5314729424823361, 0.0, 7.570799536460879, 5.846202367305696, 4.43424783161284, 3.3774151055760937, 6.199702451568603, 3.015271421527823, 2.1773520297337003, 2.0042472123281554, 2.836224613041896, 2.118688471152984, 1.2447916700701172, 0.4461201184077937, 0.0), # 163
(6.760710968195384, 4.793144468874502, 6.100948544729314, 6.225708004955863, 5.559355112310126, 2.752615293367992, 2.128626257737233, 2.113235328953779, 3.0424068675657407, 1.1018415385579923, 0.8682012269098661, 0.5204847407372336, 0.0, 7.419090191144328, 5.725332148109569, 4.34100613454933, 3.305524615673976, 6.0848137351314815, 2.9585294605352903, 2.128626257737233, 1.9661537809771372, 2.779677556155063, 2.075236001651955, 1.2201897089458629, 0.43574040626131844, 0.0), # 164
(6.599970698930017, 4.671897213421746, 5.966743132273474, 6.084402179481189, 5.436158589358215, 2.694020245647842, 2.076567382222911, 2.068622910443561, 2.9789964037756596, 1.0760283163972786, 0.8480716050565187, 0.5085902565930517, 0.0, 7.25397851771427, 5.594492822523568, 4.2403580252825925, 3.2280849491918353, 5.957992807551319, 2.8960720746209856, 2.076567382222911, 1.9243001754627442, 2.7180792946791077, 2.0281340598270634, 1.1933486264546949, 0.42471792849288603, 0.0), # 165
(6.428920683435397, 4.54410526323825, 5.82209677910744, 5.932899337468126, 5.3035433597051425, 2.630509683092322, 2.021416288233143, 2.020197466590449, 2.9100110935408576, 1.0484949446067282, 0.8265637312773799, 0.49585195914137514, 0.0, 7.0763738156542955, 5.454371550555126, 4.1328186563869, 3.145484833820184, 5.820022187081715, 2.8282764532266285, 2.021416288233143, 1.8789354879230868, 2.6517716798525712, 1.9776331124893758, 1.1644193558214881, 0.41310047847620457, 0.0), # 166
(6.248346046114523, 4.410294345434805, 5.667764151355587, 5.771950879349882, 5.1621931258279865, 2.562432334694784, 1.9634138608103373, 1.9682284184242402, 2.835842195988133, 1.0193709990831787, 0.8037806360873045, 0.48233231747378824, 0.0, 6.887185384447996, 5.30565549221167, 4.0189031804365225, 3.058112997249536, 5.671684391976266, 2.755519785793936, 1.9634138608103373, 1.8303088104962744, 2.5810965629139933, 1.9239836264499612, 1.1335528302711175, 0.4009358495849823, 0.0), # 167
(6.059031911370395, 4.270990187122201, 5.50449991514229, 5.60230820555966, 5.012791590203827, 2.490136929448583, 1.902800984996902, 1.9129851869747332, 2.7568809702442847, 0.9887860557234682, 0.7798253500011468, 0.468093800681876, 0.0, 6.6873225235789615, 5.149031807500635, 3.8991267500057343, 2.9663581671704042, 5.513761940488569, 2.6781792617646265, 1.902800984996902, 1.7786692353204163, 2.5063957951019136, 1.867436068519887, 1.100899983028458, 0.3882718351929274, 0.0), # 168
(5.861763403606015, 4.1267185154112305, 5.333058736591924, 5.4247227165306615, 4.856022455309747, 2.413972196347072, 1.8398185458352458, 1.8547371932717271, 2.6735186754361124, 0.9568696904244344, 0.7548009035337614, 0.45319887785722274, 0.0, 6.477694532530785, 4.985187656429449, 3.774004517668807, 2.8706090712733023, 5.347037350872225, 2.596632070580418, 1.8398185458352458, 1.724265854533623, 2.4280112276548733, 1.808240905510221, 1.066611747318385, 0.3751562286737483, 0.0), # 169
(5.657325647224384, 3.978005057412684, 5.154195281828863, 5.23994581269609, 4.692569423622822, 2.334286864383604, 1.7747074283677764, 1.7937538583450197, 2.5861465706904125, 0.9237514790829147, 0.7288103272000027, 0.4377100180914133, 0.0, 6.259210710787055, 4.814810199005545, 3.6440516360000137, 2.7712544372487433, 5.172293141380825, 2.5112554016830275, 1.7747074283677764, 1.6673477602740028, 2.346284711811411, 1.7466486042320304, 1.0308390563657726, 0.36163682340115316, 0.0), # 170
(5.4465037666285, 3.82537554023735, 4.968664216977482, 5.048728894489152, 4.523116197620137, 2.2514296625515327, 1.7077085176369027, 1.7303046032244096, 2.495155915133985, 0.8895609975957474, 0.7019566515147247, 0.4216896904760322, 0.0, 6.032780357831365, 4.638586595236354, 3.509783257573624, 2.6686829927872413, 4.99031183026797, 2.4224264445141737, 1.7077085176369027, 1.6081640446796661, 2.2615580988100685, 1.6829096314963843, 0.9937328433954964, 0.3477614127488501, 0.0), # 171
(5.230082886221365, 3.6693556909960217, 4.777220208162156, 4.851823362343048, 4.348346479778769, 2.1657493198442115, 1.6390626986850327, 1.664658848939696, 2.4009379678936282, 0.8544278218597702, 0.6743429069927823, 0.4052003641026643, 0.0, 5.799312773147303, 4.457204005129307, 3.3717145349639117, 2.56328346557931, 4.8018759357872565, 2.3305223885155746, 1.6390626986850327, 1.5469637998887225, 2.1741732398893845, 1.6172744541143496, 0.9554440416324312, 0.3335777900905475, 0.0), # 172
(5.00884813040598, 3.510471236799489, 4.58061792150726, 4.649980616690982, 4.168943972575801, 2.077594565254994, 1.5690108565545748, 1.5970860165206766, 2.303883988096141, 0.8184815277718206, 0.6460721241490297, 0.3883045080628938, 0.0, 5.5597172562184625, 4.271349588691831, 3.2303606207451483, 2.4554445833154612, 4.607767976192282, 2.235920423128947, 1.5690108565545748, 1.483996118039281, 2.0844719862879004, 1.5499935388969943, 0.916123584301452, 0.31913374879995354, 0.0), # 173
(4.783584623585344, 3.349247904758541, 4.3796120231371685, 4.443952057966156, 3.9855923784883105, 1.987314127777233, 1.4977938762879377, 1.5278555269971503, 2.204385234868321, 0.7818516912287369, 0.6172473334983214, 0.37106459144830567, 0.0, 5.314903106528433, 4.081710505931362, 3.0862366674916064, 2.34555507368621, 4.408770469736642, 2.1389977377960103, 1.4977938762879377, 1.4195100912694523, 1.9927961892441552, 1.4813173526553853, 0.8759224046274336, 0.3044770822507765, 0.0), # 174
(4.555077490162455, 3.18621142198397, 4.174957179176257, 4.2344890866017755, 3.7989753999933793, 1.8952567364042834, 1.425652642927529, 1.457236801398915, 2.102832967336968, 0.7446678881273562, 0.5879715655555117, 0.35354308335048457, 0.0, 5.0657796235608075, 3.8889739168553294, 2.939857827777558, 2.234003664382068, 4.205665934673936, 2.040131521958481, 1.425652642927529, 1.3537548117173452, 1.8994876999966896, 1.411496362200592, 0.8349914358352515, 0.28965558381672457, 0.0), # 175
(4.324111854540319, 3.0218875155865668, 3.9674080557488987, 4.0223431030310435, 3.609776739568087, 1.8017711201294973, 1.3528280415157574, 1.3854992607557703, 1.9996184446288805, 0.7070596943645169, 0.558347850835455, 0.33580245286101496, 0.0, 4.813256106799174, 3.693826981471164, 2.791739254177275, 2.1211790830935504, 3.999236889257761, 1.9396989650580787, 1.3528280415157574, 1.2869793715210696, 1.8048883697840434, 1.3407810343436815, 0.7934816111497798, 0.2747170468715061, 0.0), # 176
(4.0914728411219325, 2.856801912677122, 3.7577193189794698, 3.808265507687162, 3.4186800996895155, 1.7072060079462288, 1.2795609570950313, 1.3129123260975137, 1.8951329258708567, 0.6691566858370562, 0.528479219853006, 0.3179051690714816, 0.0, 4.5582418557271245, 3.496956859786297, 2.6423960992650297, 2.0074700575111684, 3.7902658517417134, 1.838077256536519, 1.2795609570950313, 1.2194328628187348, 1.7093400498447577, 1.269421835895721, 0.751543863795894, 0.25970926478882933, 0.0), # 177
(3.8579455743102966, 2.6914803403664256, 3.5466456349923448, 3.593007701003337, 3.226369182834742, 1.6119101288478317, 1.2060922747077587, 1.239745418453944, 1.7897676701896952, 0.6310884384418126, 0.49846870312301883, 0.299913701073469, 0.0, 4.301646169828252, 3.299050711808158, 2.4923435156150937, 1.8932653153254375, 3.5795353403793904, 1.7356435858355217, 1.2060922747077587, 1.1513643777484512, 1.613184591417371, 1.1976692336677792, 0.7093291269984691, 0.24468003094240237, 0.0), # 178
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 179
)
passenger_allighting_rate = (
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 0
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 1
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 2
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 3
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 4
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 5
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 6
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 7
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 8
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 9
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 10
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 11
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 12
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 13
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 14
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 15
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 16
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 17
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 18
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 19
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 20
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 21
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 22
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 23
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 24
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 25
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 26
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 27
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 28
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 29
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 30
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 31
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 32
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 33
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 34
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 35
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 36
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 37
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 38
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 39
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 40
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 41
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 42
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 43
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 44
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 45
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 46
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 47
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 48
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 49
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 50
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 51
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 52
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 53
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 54
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 55
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 56
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 57
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 58
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 59
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 60
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 61
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 62
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 63
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 64
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 65
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 66
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 67
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 68
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 69
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 70
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 71
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 72
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 73
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 74
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 75
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 76
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 77
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 78
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 79
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 80
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 81
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 82
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 83
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 84
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 85
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 86
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 87
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 88
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 89
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 90
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 91
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 92
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 93
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 94
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 95
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 96
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 97
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 98
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 99
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 100
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 101
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 102
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 103
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 104
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 105
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 106
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 107
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 108
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 109
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 110
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 111
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 112
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 113
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 114
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 115
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 116
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 117
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 118
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 119
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 120
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 121
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 122
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 123
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 124
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 125
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 126
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 127
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 128
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 129
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 130
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 131
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 132
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 133
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 134
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 135
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 136
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 137
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 138
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 139
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 140
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 141
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 142
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 143
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 144
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 145
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 146
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 147
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 148
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 149
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 150
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 151
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 152
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 153
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 154
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 155
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 156
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 157
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 158
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 159
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 160
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 161
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 162
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 163
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 164
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 165
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 166
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 167
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 168
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 169
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 170
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 171
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 172
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 173
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 174
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 175
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 176
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 177
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 178
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 179
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 8991598675325360468762009371570610170
#index for seed sequence child
child_seed_index = (
1, # 0
68, # 1
)
| 276.385027
| 494
| 0.769662
| 32,987
| 258,420
| 6.029193
| 0.217267
| 0.358398
| 0.343917
| 0.651633
| 0.376368
| 0.368057
| 0.364839
| 0.36409
| 0.363848
| 0.363848
| 0
| 0.849884
| 0.095712
| 258,420
| 934
| 495
| 276.680942
| 0.001194
| 0.015521
| 0
| 0.200873
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.005459
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 6
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.