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
f0f62bb1cc45984e00d64be2941ca2a6197cbee8
11,895
py
Python
11.py
ZerocksX/AOC2020
930a4d1da9e5a9efe0f1f94cb93d6b39039f774f
[ "MIT" ]
null
null
null
11.py
ZerocksX/AOC2020
930a4d1da9e5a9efe0f1f94cb93d6b39039f774f
[ "MIT" ]
null
null
null
11.py
ZerocksX/AOC2020
930a4d1da9e5a9efe0f1f94cb93d6b39039f774f
[ "MIT" ]
null
null
null
inp = """L.LL.LL.LL LLLLLLL.LL L.L.L..L.. LLLL.LL.LL L.LL.LL.LL L.LLLLL.LL ..L.L..... LLLLLLLLLL L.LLLLLL.L L.LLLLL.LL""" inp = """LLLLLLLLLL.LLLLLL.LLLLLLLLLLLL.LL.LLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLL.L.LLLLLLLLLL.LLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLL..LLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLL.LL.LL.LLLLL.L.LLLLL.LLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLL.LLLLLLL.LLL.LL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLL.L.LLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLL.LL LLLLLLLLLLLLLLLLL.LLLLLLLLLL.LLLLLLLLL.LLLLL.LLLLLLL.LLLL.L.LLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLL .L.LL...LLLL.......L....L.LLLLLL.......LL....LL...L..L.LLL...LLL..L.L.L.L..L...............L LLLLLLLLLL.LL.LLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLLL.LLLL.LLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLL..LLLLLLLLLLLLLLLLLL LLLLLLL.LL.LLL.LLLLLLLLLLLLL.L.LLLLLLL.LLLLL.LLLLLLL.LLLLLL..LLLLLL.LLLLL.LLLLLL.LLLLLLLLLLL .......L.LLL........LL.L....L.LL...L.....L..LL......L.....L....L.LLLL...L....L..L.L........L LLLLLLLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLL.L.LLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLLLLLLLL.LL.LLLL.LLLLL.LLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLL.LLLLLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLL ..L...L.........LL.LLLL...L...LL.L.L..L...L.L...LL..LL...L....L....LL.L...LLL........LLL.... LLLLLLLL.L.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLL.LLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLL.LL.LLLLLLLLLLL.LLLLLL.LLLLLL.LL.LLLLLLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LL.LLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLL L..L...........L....L.LLLL........L..LL....L.L.......L.L.L.....LL......L.....LLL.LL.L.L.LL.L LLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLL.LLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLL.LLLLL..LLLLLL.LLLLLLLLLLL.LLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLL.LLL LLLLLLLLLLLLLLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLL.LLL.LLLLL.LLLLLL..LLLLL.LLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL ..L.....LLL.L..L...L......LL......L.......LL..L.L.L.L....LLLL....L....L...LL...LLL.L....LLL. LLLLLLLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLL.LLL LLLLLLLLLLLLLLLLL.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLL.LL.LL.L.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLLLLLL.LL.LLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLL.L.LLLLLLLLLL..LLLL LLLLL.LLLLLLLL.LLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.L.LLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLL..LLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LL.LLL.LLLLLLLLLLL .....LL.L...LL....L...L.L.....L...L.L.L.L.L.L.......LL.....L.LL.LL...LLL.L.....L...L......L. LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.LL..LLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.L.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLL.LL.LLLLLLLLLLLLL.LLLLLLLLLL. LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLL.L.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.L.LLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLL.L .L....LL....L....L.L....L......LL.....L..L.L....LL.......L......L.L..L.......L....L.LLL....L LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLL..LLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL .L......L....L.L..L....LL.......L.LL..LL.L.....L..L.L...............LL....L...L....L....L.LL LLLLLLLLL..LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLL..LLLLLLLLL.LLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLL.LLLLL LLLLLLLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL..LLLLLL.LLLLL.LLLLLLLLLLLL.L.LLLLLL..LLLLLLLLLLLL.LLLLLLLLLLL .L..L..L.L.L.L.L.L.....L.L...L....LL.L.L....L..L.L.L........L....LL.......LL....L...L.L..LL. LLLLLLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLL..LLLLL.LLLLLL.LLLLL..LLLLLL.LLLLLLLLLLL L.LLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL.LL.LLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLL.L.LLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLL..LLLLL.LLLLLLLLLLLLL.LLLLL.L.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLL..LLLLLLLLLL LLLLLLLLLLL.LLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL..LLLLL.LLLLLLLLLL.LLLLLLL LLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLL.L.L.LLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLL.LLLLLLLLLLLLL LLLLL....L.LL..LLL.L...LL.....L............L...............L..L.LLLLL.L.L.......L..LL.L...L. LLLLLLLLLL.LLLLLL.LLLLL..LLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLL.LLLLL.LLLLLLL.LLL.LL.LLLLLL..LLLLL.LLLLLL.L.LLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLLLLLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLL.LLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.L.LLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLL .....L...L......L...LL.L.......LL.L...LL..LL.....L.......LL.LL......LL.L...L..L..L...L.LLL.. LLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL..LLLLLLLLLL LLLLLL.LLL.LLLLLL.LLLLLL.LL.LL.LLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLL.LLLLLLLLLL.LLLLLLLLL.LLLLLLLLLLL LLL.LLL.LL..LLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL. LLLLLLLLL.LLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLL.LLLLL LLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLL.LLLLLL.L.LLLLLLLLLL.LLLL.LL.LLLLL.LLLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLL.L.L.LLLLLLLLL LLLLLLLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL .LL.LLL.L.L.L..L....L..L...L......L......L.L.L...L.L..L.L.LLLLL..L.LL.LLL.L...LL.LL...L.L.L. LLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLL.LLLLLLL LLLLLLLLLLLLLLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLLL..LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLL LLLL.LLLLL.LLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLL.LLLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LL.LLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL ..L.LLLL.L...LL.L....L..LL..L.....L....L.L...LL.......L.L..LL..LL............L...LL.....L... LLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLL.LLLL.LLLLLLLLLLL LLLLLLLLLLLLL.LLL.LLLLLL..LLLL.LLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLL..LLLLL. LLLLLLLLLL.LLLLLL..LLLLL.LLLLL.LLLLLLL..LLLL.LLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL.L.LLLLL.LLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLL.LLLLLL.LLLLLL.LLLLL.LLLLL.L.LLLLLLLLLLLLL.LL.LLLLL.LLLL.LLLLLL.LLLLLLLLLL.LLLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLL..LLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLL LLLLLLLLLL.LLL.LLLLLLLLL.LLLLL.LLLLLLLLLLLL..LLLLLLL.LLLLL..LLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLL.LL.LLLLLLLLLL.LLLLLLLLLLL""" lines = inp.split("\n") state = [] n = 0 for line in lines: n = len(line) state.append(['.'] + [c for c in line] + ['.']) state = [['.' for i in range(n+2)]] + state + [['.' for i in range(n+2)]] changed = True should_change = [[False for c in l] for l in state] def occupied(st, c = '#'): cnt = 0 for i in st: for j in i: #print(j) if j == c: cnt += 1 return cnt def cnt_rays(st, i, j, c = '#'): n = len(st) m = len(st[0]) cnt = 0 #print(i, j, st[i][j]) for x in range(-1, 2): for y in range(-1, 2): if x == 0 and y == 0: continue dir = [] step = 1 #print(x, y) while(True): ii = i + step*x jj = j + step*y if ii >= n - 1 or ii < 1: break if jj >= m - 1 or jj < 1: break #print(ii, jj, st[ii][jj]) dir.append(st[ii][jj]) #print(dir) step += 1 if ray(dir): cnt += 1 return cnt def ray(dir): for d in dir: if d == '#': return True if d == 'L': return False return False steps = 0 while(changed): changed = False new_state = [[state[jj][ii] for ii in range(n+2)] for jj in range(len(state))] for i in range(1, len(state) - 1): for j in range(1, n + 1): obs = [[state[ii][jj] for jj in range(j-1, j+2)] for ii in range(i-1, i+2)] if state[i][j] == 'L': occ = cnt_rays(state, i, j) if occ == 0: new_state[i][j] = '#' changed = True if state[i][j] == '#': occ = cnt_rays(state, i, j) if occ >= 5: new_state[i][j] = 'L' changed = True # print(obs) # print(state[i][j]) # print(new_state[i][j]) # try: # if not steps == 0: # a = input() # except SyntaxError: # pass state = new_state # for line in state: # print(line) # steps += 1 print(changed) print(steps) print(occupied(state, '#'))
58.02439
102
0.71652
1,430
11,895
5.953846
0.060839
0.029598
0.029246
0.02631
0.40592
0.294104
0.2214
0.161499
0.087855
0.071647
0
0.003241
0.118033
11,895
205
103
58.02439
0.808312
0.021101
0
0.085714
0
0.188571
0.81663
0.797199
0
0
0
0
0
1
0.017143
false
0
0
0
0.045714
0.017143
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
f0ff85980bb77a712975d0c59fba9ef7838a0f7b
638
py
Python
projects/tests.py
engineer237/Project-Track-Api
505f95d886144bbafd00797b25bd1c8940529e3f
[ "MIT" ]
null
null
null
projects/tests.py
engineer237/Project-Track-Api
505f95d886144bbafd00797b25bd1c8940529e3f
[ "MIT" ]
null
null
null
projects/tests.py
engineer237/Project-Track-Api
505f95d886144bbafd00797b25bd1c8940529e3f
[ "MIT" ]
null
null
null
# from django.test import TestCase # from .models import Project # from django.contrib.auth.models import User # # Create your tests here. # class ProjectTestClass(TestCase): # def setUp(self): # self.user=User(username='chichi') # self.user.save() # self.project=Project() # def tearDown(self): # Project.objects.all().delete() # def test_instance(self): # self.assertTrue(isinstance(self.project, Project)) # def test_saveProject(self): # self.project.save_project() # project_saved = Project.objects.all() # self.assertTrue(len(project_saved) > 0)
30.380952
60
0.644201
73
638
5.561644
0.452055
0.108374
0.08867
0.103448
0
0
0
0
0
0
0
0.002024
0.225705
638
21
61
30.380952
0.819838
0.938871
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
0b1a2e3ffecf84164ff30a044e2e079d1213e703
1,078
py
Python
169.py
sinasiruosnejad/leetcode
8fe5a400bc03a5e129835e380ff9fe72af681d8a
[ "MIT" ]
null
null
null
169.py
sinasiruosnejad/leetcode
8fe5a400bc03a5e129835e380ff9fe72af681d8a
[ "MIT" ]
null
null
null
169.py
sinasiruosnejad/leetcode
8fe5a400bc03a5e129835e380ff9fe72af681d8a
[ "MIT" ]
null
null
null
nin=input() x=[] for i in range(len(nin)): x.append(int(nin[i])) list_of_numbers=[] status='qualified' majority=0 for i in range(len(x)): status='qualified' if i==0: list_of_numbers.append([]) list_of_numbers[i].append(x[i]) else: for j in range(len(list_of_numbers)): if list_of_numbers[j][0]==x[i]: list_of_numbers[j].append(x[i]) break for j in range(len(list_of_numbers)): for k in range(len(list_of_numbers)): if list_of_numbers[k][0]==x[i]: status='not qualified' if status=='qualified': list_of_numbers.append([]) list_of_numbers[len(list_of_numbers)-1].append(x[i]) break for i in range(len(list_of_numbers)): if len(list_of_numbers[i])>majority: majority=len(list_of_numbers[i]) for i in range(len(list_of_numbers)): if len(list_of_numbers[i])==majority: print(f'majority: {list_of_numbers[i][0]} times repeated: {majority}')
25.666667
79
0.573284
161
1,078
3.614907
0.173913
0.185567
0.402062
0.247423
0.601375
0.479381
0.479381
0.369416
0.316151
0.316151
0
0.007772
0.283859
1,078
41
80
26.292683
0.746114
0
0
0.322581
0
0
0.093953
0.021395
0
0
0
0
0
1
0
false
0
0
0
0
0.032258
0
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
0
0
0
0
0
0
0
0
2
9bcc45b2e099f75f82b4ceb96e22f06cd01d8a61
1,475
py
Python
mssql_sanitise.py
rubrikinc/use-case-jenkins-live-mount
2617db28ed8e07f044b47d0da0f25c2d7c519ca4
[ "MIT" ]
1
2021-07-10T00:38:25.000Z
2021-07-10T00:38:25.000Z
mssql_sanitise.py
rubrikinc/use-case-jenkins-live-mount
2617db28ed8e07f044b47d0da0f25c2d7c519ca4
[ "MIT" ]
null
null
null
mssql_sanitise.py
rubrikinc/use-case-jenkins-live-mount
2617db28ed8e07f044b47d0da0f25c2d7c519ca4
[ "MIT" ]
null
null
null
#!/usr/bin/python import pyodbc import argparse parser = argparse.ArgumentParser() parser.add_argument("-s", "--sql_host",help="Provide the name of the SQL Host protected by Rubrik",required=True) parser.add_argument("-i", "--sql_instance",help="Provide the name of the SQL Instance protected by Rubrik",required=True) parser.add_argument("-d", "--sql_db",help="Provide the name of the SQL Database protected by Rubrik",required=True) parser.add_argument("-x", "--suffix",help="Provide an identifiable suffix for the SQL live mount",required=True) parser.add_argument("-u", "--username",help="Provide the SQL Username",required=True) parser.add_argument("-p", "--password",help="Provide the SQL Password",required=True) args = parser.parse_args() sql_host = args.sql_host sql_instance = args.sql_instance sql_db_name = args.sql_db sql_mount_suffix = args.suffix sql_user = args.username sql_pass = args.password print "Connecting to "+sql_host+"\\"+sql_instance+" and DB: "+sql_db_name+"-"+sql_mount_suffix cnxn = pyodbc.connect("Driver={ODBC Driver 13 for SQL Server};Server="+sql_host+"\\"+sql_instance+",1433;Database="+sql_db_name+"-"+sql_mount_suffix+";UID="+sql_user+";PWD="+sql_pass) cursor = cnxn.cursor() cursor.execute('UPDATE A SET A.EmailAddress=\'xxxxxx@xxxxxx.com\' FROM Person.EmailAddress A') cursor.execute('SELECT TOP 10 [EmailAddress] FROM Person.EmailAddress') for row in cursor: print('row = %r' % (row,)) cnxn.commit() # commit all the records
49.166667
183
0.751864
225
1,475
4.773333
0.333333
0.050279
0.094972
0.097765
0.297952
0.243948
0.201117
0.128492
0
0
0
0.005979
0.092881
1,475
30
184
49.166667
0.796712
0.026441
0
0
0
0
0.386063
0
0
0
0
0
0
0
null
null
0.125
0.083333
null
null
0.083333
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
0
0
1
0
0
1
0
0
0
0
0
2
9bce3e8efd739d17b9b5d38a27d8f90a64b1b436
708
py
Python
witness/conv.py
robdelacruz/boneyard
8b8d8a509a1ded458902af459bbef17c83516d8a
[ "MIT" ]
null
null
null
witness/conv.py
robdelacruz/boneyard
8b8d8a509a1ded458902af459bbef17c83516d8a
[ "MIT" ]
null
null
null
witness/conv.py
robdelacruz/boneyard
8b8d8a509a1ded458902af459bbef17c83516d8a
[ "MIT" ]
null
null
null
import datetime def isodt_to_date(isodt): try: date = datetime.datetime.strptime(isodt, "%Y-%m-%d") except: date = None return date def date_to_isodt(date): return date.strftime("%Y-%m-%d") def dateparts_to_isodt(year, month, day): date = datetime.date(year, month, day) return date_to_isodt(date) def today_isodt(): return datetime.datetime.now().strftime("%Y-%m-%d") def isodt_to_longfmt(isodt): """ Return long format: Ex. Mon 01 Apr 2019 """ date = isodt_to_date(isodt) return f"{date:%a %d %b %Y}" def isodt_to_shortfmt(isodt): """ Return long format: Ex. Mon 01 Apr """ date = isodt_to_date(isodt) return f"{date:%a %d %b}"
21.454545
60
0.637006
109
708
3.981651
0.302752
0.080645
0.069124
0.110599
0.364055
0.299539
0.299539
0.299539
0.156682
0.156682
0
0.014337
0.211864
708
32
61
22.125
0.763441
0.105932
0
0.1
0
0
0.092084
0
0
0
0
0
0
1
0.3
false
0
0.05
0.1
0.65
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
0
0
0
1
0
0
0
0
1
0
0
2
9bd1bff82f0fb5f5fd3a09b620e89c5744a12c94
868
py
Python
drawer/draw.py
YOYOPIG/master-thesis
9458d76e2513511342e2b2e288789c46bec21052
[ "MIT" ]
null
null
null
drawer/draw.py
YOYOPIG/master-thesis
9458d76e2513511342e2b2e288789c46bec21052
[ "MIT" ]
null
null
null
drawer/draw.py
YOYOPIG/master-thesis
9458d76e2513511342e2b2e288789c46bec21052
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import matplotlib name_dict = {'1': 1, '32': 2, '64': 3, '128': 4, '256': 5} threads = [1, 2, 3, 4, 5] # threads = [1, 32, 64, 128, 256] a = [0.363213,0.351147,0.350840,0.349051,0.346477] b = [0.364184, 0.342212, 0.345006, 0.344206, 0.344719] c=[0.353136, 0.353382, 0.347007, 0.349023, 0.345956] d=[0.354095 & 0.353936, 0.352839, 0.349773, 0.349343] e=[0.351260, 0.355450, 0.359848, 0.361534, 0.357256] plt.plot(threads, a, label='1 block') plt.plot(threads, b, label='32 blocks') plt.plot(threads, c, label='64 blocks') plt.plot(threads, d, label='128 blocks') plt.plot(threads, e, label='256 blocks') ax = plt.gca() print(name_dict.values()) print(name_dict.keys()) ax.set_xticks([1,2,3,4,5]) ax.set_xticklabels(name_dict.keys()) plt.legend() plt.ylabel('Execution time (hr)') plt.xlabel('Thread count in each block') plt.show()
28.933333
58
0.670507
162
868
3.555556
0.438272
0.060764
0.121528
0.104167
0.017361
0
0
0
0
0
0
0.290743
0.116359
868
30
59
28.933333
0.460235
0.035714
0
0
0
0
0.120813
0
0
0
0
0
0
1
0
false
0
0.086957
0
0.086957
0.086957
0
0
0
null
0
0
0
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
0
0
0
0
0
0
0
2
9be6fb310c07fcd88eaec8696898000d5997cbdc
1,510
py
Python
linear_models/perceptron.py
lkk7/ml-library
bf338eb0d0f566ccb0fc51f27e04fafa1215ef93
[ "MIT" ]
null
null
null
linear_models/perceptron.py
lkk7/ml-library
bf338eb0d0f566ccb0fc51f27e04fafa1215ef93
[ "MIT" ]
null
null
null
linear_models/perceptron.py
lkk7/ml-library
bf338eb0d0f566ccb0fc51f27e04fafa1215ef93
[ "MIT" ]
null
null
null
import numpy as np from linear_models.logistic_regression import LogisticRegression class Perceptron(LogisticRegression): """A simple (binary classification) perceptron. Uses binary cross-entropy loss for updating weights. >>NOTE: it inherits most of the code from logistic regression for simplicity.<< Parameters ---------- learning_rate : float, default = 0.2 The learning rate for gradient descent or SGD. method : str, default = 'gradient' Method of fitting the model. 'gradient' for gradient descent, 'sgd' for stochastic gradient descent. reg : str, default = None Regularization method. For L1 or L2, use 'l1' or 'l2' respectively. For elastic net method, use 'elastic'. None for no regularization. alpha : float, default = 0 Alpha parameter controlling the 'strength' of regularization. l1_ratio : float, default = 0 Defines the ratio of L1 regularization. Only for elastic regularization option. The penalty added to cost is l1_ratio * L1 + 0.5 * (1 - l1_ratio) * L2. """ def __init__(self, learning_rate=0.2, method='gradient', reg=None, alpha=0, l1_ratio=0): super().__init__(learning_rate, method, reg, alpha, l1_ratio) def predict(self, x): """Predict the class for given input. Parameters ---------- x : array-like Input array. """ return np.heaviside(np.dot(x, self.coef) + self.intercept, 1)
37.75
104
0.652318
191
1,510
5.062827
0.455497
0.036194
0.040331
0
0
0
0
0
0
0
0
0.021277
0.25298
1,510
39
105
38.717949
0.835993
0.650331
0
0
0
0
0.02005
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0
0.857143
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
0
0
0
1
0
0
0
0
1
0
0
2
9be9235f1334c405be5f626e2ff25a9ffc23716e
2,917
py
Python
extract_image_features/old_code/VGG16_features2.py
schen496/auditory-hallucinations
31b89df838a9f3c4558c7c3b69dbcd43c7f9de19
[ "Apache-2.0" ]
4
2018-05-05T10:10:35.000Z
2021-01-20T22:27:05.000Z
extract_image_features/old_code/VGG16_features2.py
schen496/auditory-hallucinations
31b89df838a9f3c4558c7c3b69dbcd43c7f9de19
[ "Apache-2.0" ]
null
null
null
extract_image_features/old_code/VGG16_features2.py
schen496/auditory-hallucinations
31b89df838a9f3c4558c7c3b69dbcd43c7f9de19
[ "Apache-2.0" ]
2
2018-08-10T02:45:28.000Z
2018-12-10T05:38:41.000Z
### NOTE NOTE NOTE!!! # to use this example, you need to change keras backend to theano AND also revert back to an older environment shimon_herokeras, change model from keras.models import Sequential from keras.layers.core import Flatten, Dense, Dropout from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D from keras.optimizers import SGD from skimage.transform import resize from skimage.io import imread from skimage import img_as_ubyte import numpy as np def VGG_16(): model = Sequential() model.add(ZeroPadding2D((1,1),input_shape=(3,224,224))) model.add(Convolution2D(64, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(64, 3, 3, activation='relu')) model.add(MaxPooling2D((2,2), strides=(2,2))) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(128, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(128, 3, 3, activation='relu')) model.add(MaxPooling2D((2,2), strides=(2,2))) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(256, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(256, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(256, 3, 3, activation='relu')) model.add(MaxPooling2D((2,2), strides=(2,2))) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(512, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(512, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(512, 3, 3, activation='relu')) model.add(MaxPooling2D((2,2), strides=(2,2))) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(512, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(512, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Convolution2D(512, 3, 3, activation='relu')) model.add(MaxPooling2D((2,2), strides=(2,2))) model.add(Flatten()) model.add(Dense(4096, activation='relu')) model.add(Dropout(0.5)) model.add(Dense(4096, activation='relu')) model.add(Dropout(0.5)) model.add(Dense(1000, activation='softmax')) model.load_weights('vgg16_weights.h5') return model if __name__ == "__main__": im = np.random.rand(224,224,3) #im[:,:,0] -= 103.939 #im[:,:,1] -= 116.779 #im[:,:,2] -= 123.68 im = im.transpose((2,0,1)) print (im.shape) im = np.expand_dims(im, axis=0) # Test pretrained model model = VGG_16() sgd = SGD(lr=0.1, decay=1e-6, momentum=0.9, nesterov=True) model.compile(optimizer=sgd, loss='categorical_crossentropy') model_weights = model.get_weights() for layer in model_weights: print (layer.shape) print model_weights[1] #out = model.predict(im) #print (np.argmax(out))
35.573171
141
0.672266
420
2,917
4.616667
0.266667
0.152656
0.146983
0.170191
0.56163
0.549768
0.549768
0.549768
0.549768
0.549768
0
0.085738
0.156325
2,917
82
142
35.573171
0.702154
0.097017
0
0.557377
0
0
0.043826
0.009146
0
0
0
0
0
0
null
null
0
0.131148
null
null
0.04918
0
0
0
null
0
0
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
1
0
0
0
0
0
0
0
0
2
9be9ba5ff65fb99e1ea4962aeebd8139dbc1cc81
109
py
Python
python/uri_1003.py
tainahemmanuele/uri_iniciante
afacf6682d77465efcada7f3e2c3126143497ed9
[ "MIT" ]
null
null
null
python/uri_1003.py
tainahemmanuele/uri_iniciante
afacf6682d77465efcada7f3e2c3126143497ed9
[ "MIT" ]
null
null
null
python/uri_1003.py
tainahemmanuele/uri_iniciante
afacf6682d77465efcada7f3e2c3126143497ed9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- value1 = input() value2 = input() prod = value1+value2 print("SOMA = " + str(prod))
15.571429
28
0.587156
14
109
4.571429
0.714286
0
0
0
0
0
0
0
0
0
0
0.05618
0.183486
109
6
29
18.166667
0.662921
0.192661
0
0
0
0
0.081395
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
0
0
0
0
0
0
0
2
9bf74230dad95ec6dac27bb8acb752fb30a49372
1,410
py
Python
discO/setup_package.py
GalOrrery/discO
3b17b6ead65908c053b09a1a967e8a1819a06209
[ "BSD-3-Clause" ]
1
2020-11-17T14:40:51.000Z
2020-11-17T14:40:51.000Z
discO/setup_package.py
nstarman/discO
3b17b6ead65908c053b09a1a967e8a1819a06209
[ "BSD-3-Clause" ]
45
2020-11-17T14:30:13.000Z
2021-02-26T18:47:37.000Z
discO/setup_package.py
nstarman/discO
3b17b6ead65908c053b09a1a967e8a1819a06209
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """Set up module.""" ############################################################################## # IMPORTS from __future__ import absolute_import __all__ = ["HAS_AGAMA", "HAS_GALA", "HAS_GALPY", "HAS_TQDM"] ############################################################################## # PARAMETERS try: # THIRD PARTY import agama # noqa: F401 except ImportError: HAS_AGAMA = False else: HAS_AGAMA = True agama.setUnits(mass=1, length=1, velocity=1) # FIXME! bad # /try # ------------------------------------- try: # THIRD PARTY import gala # noqa: F401 except ImportError: HAS_GALA = False else: HAS_GALA = True # /try # ------------------------------------- try: # THIRD PARTY import galpy # noqa: F401 except ImportError: HAS_GALPY = False else: HAS_GALPY = True # TODO better way of ensuring unit! # THIRD PARTY from galpy.util.config import __config__ __config__.set("astropy", "astropy-units", "True") __config__.set("astropy", "astropy-coords", "True") # /try # ------------------------------------- try: # THIRD PARTY from tqdm import tqdm # noqa: F401 except ImportError: HAS_TQDM = False else: HAS_TQDM = True ############################################################################## # END
19.315068
78
0.485106
139
1,410
4.683453
0.410072
0.076805
0.079877
0.15361
0.276498
0
0
0
0
0
0
0.014834
0.187234
1,410
72
79
19.583333
0.553229
0.283688
0
0.4
0
0
0.110814
0
0
0
0
0.013889
0
1
0
false
0
0.333333
0
0.333333
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
0
0
0
1
0
0
0
0
2
9bff9bcf8028de8449751c829a398973b611da51
199
py
Python
bin/symlinkCreator.py
odingsy/NGStoolkit
68d73810351550b9ba75f9184f26bc8e55708fcc
[ "MIT" ]
2
2018-05-05T06:24:51.000Z
2021-07-04T22:24:13.000Z
bin/symlinkCreator.py
odingsy/NGStoolkit
68d73810351550b9ba75f9184f26bc8e55708fcc
[ "MIT" ]
null
null
null
bin/symlinkCreator.py
odingsy/NGStoolkit
68d73810351550b9ba75f9184f26bc8e55708fcc
[ "MIT" ]
2
2020-12-27T22:02:29.000Z
2021-05-28T20:28:26.000Z
#!/usr/bin/env python import os import sys from glob import glob pathString = sys.argv[1] fileList = glob(pathString) for file in fileList: os.system('ln -s ' + file + './' + file.split('/')[-1])
18.090909
56
0.663317
31
199
4.258065
0.645161
0.212121
0
0
0
0
0
0
0
0
0
0.011976
0.160804
199
10
57
19.9
0.778443
0.100503
0
0
0
0
0.050562
0
0
0
0
0
0
1
0
false
0
0.428571
0
0.428571
0
0
0
0
null
1
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
0
0
0
0
0
0
1
0
0
0
0
2
500a579772f52e395f04efa4c5b3d759915175a6
1,860
py
Python
djangoapps/management/commands/updateapps.py
jezdez-archive/djangoapps
30ced0301d03c6f8a2439a3002b26c179e252cc0
[ "BSD-3-Clause" ]
null
null
null
djangoapps/management/commands/updateapps.py
jezdez-archive/djangoapps
30ced0301d03c6f8a2439a3002b26c179e252cc0
[ "BSD-3-Clause" ]
null
null
null
djangoapps/management/commands/updateapps.py
jezdez-archive/djangoapps
30ced0301d03c6f8a2439a3002b26c179e252cc0
[ "BSD-3-Clause" ]
null
null
null
import xmlrpclib from django.conf import settings from django.core.management.base import NoArgsCommand PYPI_URL = "http://cheeseshop.python.org/pypi" PYPI_KEYWORD = "django" PYPI_METADATA = ( "name", "description", "long_description", "homepage", "license", ) from djangoapps.models import DjangoApp class Command(NoArgsCommand): help = 'Used to update the feeds of the aggregator app.' def handle_noargs(self, **options): """ queries PyPI for package with the default keyword and updates the app database accordingly """ specs = {'keywords': PYPI_KEYWORD} pypi = xmlrpclib.Server(PYPI_URL) query = pypi.search(specs) results = sorted(query, key=lambda s: s['name'].lower()) for package in results: name = package['name'] version = pypi.package_releases(name)[-1] # Load release information try: info = pypi.release_data(name, version) except IndexError: print "Skipping %r: no versions" % name continue print "Updating: %r (%s)" % (name, version) # Load app or create if not existing # try: # app = DjangoApp.objects.get(name=name) # except DjangoApp.DoesNotExist: # app = DjangoApp(name=name) # print "Created app %r" % name print info.keys() # TODO # Fill app with data from PyPI # the model fields should have the same variable name for data in PYPI_METADATA: value = info.get(data, '') if value is None or value.strip().lower() == "unknown": value = "" #setattr(app, data, value.strip()) #app.save()
31
77
0.55914
200
1,860
5.15
0.53
0.032039
0
0
0
0
0
0
0
0
0
0.000819
0.343548
1,860
59
78
31.525424
0.842752
0.179032
0
0
0
0
0.140805
0
0
0
0
0.016949
0
0
null
null
0
0.117647
null
null
0.088235
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
1
0
0
0
0
0
0
0
0
2
500ac91f64fb2cf8f954ccbe1992a841a216a2b4
2,272
py
Python
tensorflow/python/autograph/pyct/static_analysis/reaching_fndefs_test.py
yage99/tensorflow
c7fa71b32a3635eb25596ae80d007b41007769c4
[ "Apache-2.0" ]
78
2020-08-04T12:36:25.000Z
2022-03-25T04:23:40.000Z
tensorflow/python/autograph/pyct/static_analysis/reaching_fndefs_test.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
1,056
2019-12-15T01:20:31.000Z
2022-02-10T02:06:28.000Z
tensorflow/python/autograph/pyct/static_analysis/reaching_fndefs_test.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
28
2020-02-10T07:03:06.000Z
2022-01-12T11:19:20.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tests for reaching_fndefs module.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.autograph.pyct import anno from tensorflow.python.autograph.pyct import cfg from tensorflow.python.autograph.pyct import naming from tensorflow.python.autograph.pyct import parser from tensorflow.python.autograph.pyct import qual_names from tensorflow.python.autograph.pyct import transformer from tensorflow.python.autograph.pyct.static_analysis import activity from tensorflow.python.autograph.pyct.static_analysis import reaching_definitions from tensorflow.python.autograph.pyct.static_analysis import reaching_fndefs from tensorflow.python.platform import test class ReachingFndefsAnalyzerTest(test.TestCase): def _parse_and_analyze(self, test_fn): # TODO(mdan): Use a custom FunctionTransformer here. node, source = parser.parse_entity(test_fn, future_features=()) entity_info = transformer.EntityInfo( name=test_fn.__name__, source_code=source, source_file=None, future_features=(), namespace={}) node = qual_names.resolve(node) namer = naming.Namer({}) ctx = transformer.Context(entity_info, namer, None) node = activity.resolve(node, ctx) graphs = cfg.build(node) node = reaching_definitions.resolve(node, ctx, graphs) node = reaching_fndefs.resolve(node, ctx, graphs) return node def assertHasFnDefs(self, node): anno.getanno(node, anno.Static.DEFINED_FNS_IN) if __name__ == '__main__': test.main()
38.508475
81
0.744718
292
2,272
5.619863
0.441781
0.085314
0.121877
0.159049
0.249238
0.249238
0.106642
0.106642
0.074345
0
0
0.004115
0.144366
2,272
58
82
39.172414
0.840021
0.328345
0
0
0
0
0.005312
0
0
0
0
0.017241
0.029412
1
0.058824
false
0
0.382353
0
0.5
0.029412
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
0
0
0
1
0
0
0
0
2
50151aab60102f9048db24db309111fcc4bcae27
479
py
Python
usgs_topo_tiler/cli.py
flynneva/usgs-topo-tiler
ee6bce4ce8ec62bd70eaffe90e10db3c35b0fd74
[ "MIT" ]
63
2020-05-05T15:20:55.000Z
2022-02-02T18:19:09.000Z
usgs_topo_tiler/cli.py
flynneva/usgs-topo-tiler
ee6bce4ce8ec62bd70eaffe90e10db3c35b0fd74
[ "MIT" ]
19
2020-05-05T05:49:48.000Z
2021-11-28T18:33:11.000Z
usgs_topo_tiler/cli.py
flynneva/usgs-topo-tiler
ee6bce4ce8ec62bd70eaffe90e10db3c35b0fd74
[ "MIT" ]
3
2020-12-19T23:12:45.000Z
2021-10-02T23:05:58.000Z
""" Entry point for CLI. CLI code is in the scripts/ folder. See https://stackoverflow.com/a/39228156 https://github.com/drorata/mwe-subcommands-click for how to separate a click CLI into subfiles """ import click from usgs_topo_tiler.scripts import list_s3, metadata, mosaic, mosaic_bulk @click.group() def main(): pass main.add_command(list_s3) main.add_command(metadata) main.add_command(mosaic) main.add_command(mosaic_bulk) if __name__ == '__main__': main()
17.740741
74
0.757829
74
479
4.662162
0.594595
0.081159
0.162319
0.115942
0
0
0
0
0
0
0
0.024038
0.131524
479
26
75
18.423077
0.805288
0.407098
0
0
0
0
0.028986
0
0
0
0
0
0
1
0.090909
true
0.090909
0.181818
0
0.272727
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
0
0
0
0
1
1
0
0
0
0
0
2
5024004edd48638919b5d1e86b906375de468b28
2,637
py
Python
bayesmark/builtin_opt/random_optimizer.py
goncaloperes/bayesmark
8c420e935718f0d6867153b781e58943ecaf2338
[ "Apache-2.0" ]
102
2019-09-27T02:38:52.000Z
2022-03-12T13:31:11.000Z
bayesmark/builtin_opt/random_optimizer.py
goncaloperes/bayesmark
8c420e935718f0d6867153b781e58943ecaf2338
[ "Apache-2.0" ]
17
2019-10-07T18:20:21.000Z
2022-01-03T08:19:16.000Z
bayesmark/builtin_opt/random_optimizer.py
goncaloperes/bayesmark
8c420e935718f0d6867153b781e58943ecaf2338
[ "Apache-2.0" ]
34
2019-09-27T02:38:31.000Z
2022-02-09T21:32:25.000Z
# Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import bayesmark.random_search as rs from bayesmark import np_util from bayesmark.abstract_optimizer import AbstractOptimizer class RandomOptimizer(AbstractOptimizer): # Unclear what is best package to list for primary_import here. primary_import = "bayesmark" def __init__(self, api_config, random=np_util.random): """Build wrapper class to use random search function in benchmark. Settings for `suggest_dict` can be passed using kwargs. Parameters ---------- api_config : dict-like of dict-like Configuration of the optimization variables. See API description. """ AbstractOptimizer.__init__(self, api_config) self.random = random def suggest(self, n_suggestions=1): """Get suggestion. Parameters ---------- n_suggestions : int Desired number of parallel suggestions in the output Returns ------- next_guess : list of dict List of `n_suggestions` suggestions to evaluate the objective function. Each suggestion is a dictionary where each key corresponds to a parameter being optimized. """ x_guess = rs.suggest_dict([], [], self.api_config, n_suggestions=n_suggestions, random=self.random) return x_guess def observe(self, X, y): """Feed an observation back. Parameters ---------- X : list of dict-like Places where the objective function has already been evaluated. Each suggestion is a dictionary where each key corresponds to a parameter being optimized. y : array-like, shape (n,) Corresponding values where objective has been evaluated """ # Random search so don't do anything pass # All optimizer wrappers need to assign their wrapper to the name opt_wrapper because experiment always tries to import # opt_wrapper regardless of the optimizer it is importing. opt_wrapper = RandomOptimizer
36.123288
119
0.679181
335
2,637
5.253731
0.498507
0.034091
0.022159
0.018182
0.086364
0.086364
0.086364
0.086364
0.086364
0.086364
0
0.004571
0.253318
2,637
72
120
36.625
0.889284
0.662116
0
0
0
0
0.013889
0
0
0
0
0
0
1
0.214286
false
0.071429
0.285714
0
0.714286
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
0
0
0
1
0
1
0
0
0
0
0
2
50307f335ef6c5dedd3afbdb2e354a57e7e89a70
1,962
py
Python
generate_parameters.py
seanballais/letter-recognition-nn
a9fda81e84a9ecf3ad787bab73da0d198ac1b95b
[ "MIT" ]
null
null
null
generate_parameters.py
seanballais/letter-recognition-nn
a9fda81e84a9ecf3ad787bab73da0d198ac1b95b
[ "MIT" ]
null
null
null
generate_parameters.py
seanballais/letter-recognition-nn
a9fda81e84a9ecf3ad787bab73da0d198ac1b95b
[ "MIT" ]
null
null
null
import sys def generate_parameters(use_ga=0): input_layer_size = 16 hidden_layer_size = 20 num_labels = 26 lambda_values = [ 0.0001, 0.001, 0.01, 0.1, 1.0, 10 ] population_sizes = [ 10 ] if use_ga else [ 100 ] num_random_parents = [ 0, 1, 2, 4 ] if use_ga else [ 0 ] num_generations = [ 500 ] if use_ga else [ 3 ] mutation_probabilities = [ 0 ] training_items = 16000 testing_items = 4000 filename = 'ga' if use_ga else 'bp' print('Generating parameters...') print('File: `parameters/{}.csv`'.format(filename)) with open('parameters/{}.csv'.format(filename), 'w') as f: for lambda_value in lambda_values: for population_size in population_sizes: for num_random_parent in num_random_parents: for num_generation in num_generations: for mutation_probability in mutation_probabilities: line = '{},{},{},{},{},{},{},{},{},{},{}\n'.format(input_layer_size, hidden_layer_size, num_labels, lambda_value, use_ga, population_size, num_random_parent, num_generation, mutation_probability, training_items, testing_items) f.write(line) if __name__ == '__main__': use_ga = int(sys.argv[1]) generate_parameters(use_ga)
43.6
90
0.41896
170
1,962
4.505882
0.4
0.052219
0.036554
0.057441
0
0
0
0
0
0
0
0.05123
0.502548
1,962
44
91
44.590909
0.733607
0
0
0
1
0
0.057594
0.017329
0
0
0
0
0
1
0.027778
false
0
0.027778
0
0.055556
0.055556
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
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
2
503848a3b33b013f01bcb26a9e1e4f32373af139
4,870
py
Python
paccmann_omics/generators/vae.py
PaccMann/paccmann_omics
dbb2d2d67afd5a6ff58ba316f53c699406f5c655
[ "MIT" ]
5
2019-11-06T10:39:21.000Z
2022-01-09T11:11:34.000Z
paccmann_omics/generators/vae.py
PaccMann/paccmann_omics
dbb2d2d67afd5a6ff58ba316f53c699406f5c655
[ "MIT" ]
1
2020-11-11T07:32:47.000Z
2020-11-11T09:10:18.000Z
paccmann_omics/generators/vae.py
PaccMann/paccmann_omics
dbb2d2d67afd5a6ff58ba316f53c699406f5c655
[ "MIT" ]
1
2020-11-17T15:13:22.000Z
2020-11-17T15:13:22.000Z
import torch import torch.nn as nn from ..utils.hyperparams import LOSS_FN_FACTORY from ..utils.utils import get_device class VAE(nn.Module): """Variational Auto-Encoder (VAE)""" def __init__(self, params, encoder, decoder): """ This class specifies a Variational Auto-Encoder (VAE) which can be instantiated with different encoder or decoder objects. Args: params (dict): A dict with the model parameters (<dict>). encoder (Encoder): An encoder object. decoder (Decoder): A decoder object. NOTE: This VAE class assumes that: 1) The latent space should follow a multivariate unit Gaussian. 2) The encoder strives to learn mean and log-variance of the latent space. """ super(VAE, self).__init__() self.encoder = encoder self.decoder = decoder self._assertion_tests() self.reconstruction_loss = LOSS_FN_FACTORY[ params.get('reconstruction_loss', 'mse')] self.kld_loss = LOSS_FN_FACTORY[params.get('kld_loss', 'kld')] def encode(self, data): """ VAE encoding Args: data (torch.Tensor): The input of shape `[batch_size, input_size]`. Returns: (torch.Tensor, torch.Tensor): mu, logvar The latent means mu of shape `[bs, latent_size]`. Latent log variances logvar of shape `[bs, latent_size]`. """ return self.encoder(data) def reparameterize(self, mu, logvar): """Applies reparametrization trick to obtain sample from latent space. Args: mu (torch.Tensor): The latent means of shape `[bs, latent_size]`. logvar (torch.Tensor) : Latent log variances ofshape `[bs, latent_size]`. Returns: torch.Tensor: Sampled Z from the latent distribution. """ return torch.randn_like(mu).mul_(torch.exp(0.5 * logvar)).add_(mu) def decode(self, latent_z): """ VAE Decoding Args: latent_z (torch.Tensor): Sampled Z from the latent distribution. Returns: torch.Tensor: A (realistic) sample decoded from the latent representation of length input_size. """ return self.decoder(latent_z) def forward(self, data): """ The Forward Function passing data through the entire VAE. Args: data (torch.Tensor): Input data of shape `[batch_size, input_size]`. Returns: (torch.Tensor): A (realistic) sample decoded from the latent representation of length input_size]`. Ideally data == sample. """ self.mu, self.logvar = self.encoder(data) latent_z = self.reparameterize(self.mu, self.logvar) sample = self.decoder(latent_z) return sample def joint_loss(self, outputs, targets, alpha=0.5, beta=1.): """Loss Function from VAE paper. Reference: Kingma and Welling. Auto-Encoding Variational Bayes. ICLR, 2014 Args: outputs (torch.Tensor): The decoder output of shape `[batch_size, input_size]`. targets (torch.Tensor): The encoder input of shape `[batch_size, input_size]`. alpha (float): Weighting of the 2 losses. Alpha in range [0, 1]. Defaults to 0.5. beta (float): Scaling of the KLD in range [1., 100.] according to beta-VAE paper. Defaults to 1.0. Returns: (torch.Tensor, torch.Tensor, torch.Tensor): joint_loss, rec_loss, kld_loss # noqa The VAE joint loss is a weighted combination of the reconstruction loss (e.g. L1, MSE) and the KL divergence of a multivariate unit Gaussian and the latent space representation. Reconstruciton loss is summed across input size and KL-Div is averaged across latent space. This comes from the fact that L2 norm is feature normalized and KL is z-dim normalized, s.t. alpha can be tuned for varying X, Z dimensions. """ rec_loss = self.reconstruction_loss(outputs, targets) rec_loss = rec_loss.double().to(get_device()) kld_loss = self.kld_loss(self.mu, self.logvar) joint_loss = alpha * rec_loss + (1 - alpha) * beta * kld_loss return joint_loss, rec_loss, kld_loss def _assertion_tests(self): pass def load(self, path, *args, **kwargs): """Load model from path.""" weights = torch.load(path, *args, **kwargs) self.load_state_dict(weights) def save(self, path, *args, **kwargs): """Save model to path.""" torch.save(self.state_dict(), path, *args, **kwargs)
36.616541
94
0.600205
603
4,870
4.739635
0.281924
0.057733
0.031491
0.022393
0.203289
0.169349
0.126312
0.114066
0.083275
0.059482
0
0.007407
0.306982
4,870
132
95
36.893939
0.839407
0.545175
0
0
0
0
0.019749
0
0
0
0
0
0.054054
1
0.243243
false
0.027027
0.108108
0
0.513514
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
0
0
0
1
0
0
0
0
1
0
0
2
504884bf84a001dcd15811e68d8d2dae20ed7eb3
43,397
py
Python
msgraph-cli-extensions/beta/sites_beta/azext_sites_beta/vendored_sdks/sites/aio/_sites.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/beta/sites_beta/azext_sites_beta/vendored_sdks/sites/aio/_sites.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/beta/sites_beta/azext_sites_beta/vendored_sdks/sites/aio/_sites.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Optional, TYPE_CHECKING from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential from ._configuration import SitesConfiguration from .operations import GroupsOperations from .operations import SitesSiteOperations from .operations import SitesOperations from .operations import SitesContentTypesOperations from .operations import SitesListsOperations from .operations import SitesListsActivitiesOperations from .operations import SitesListsActivitiesListItemOperations from .operations import SitesListsActivitiesListItemVersionsOperations from .operations import SitesListsContentTypesOperations from .operations import SitesListsItemsOperations from .operations import SitesListsItemsActivitiesOperations from .operations import SitesListsItemsActivitiesListItemOperations from .operations import SitesListsItemsVersionsOperations from .operations import SitesOnenoteNotebooksOperations from .operations import SitesOnenoteNotebooksSectionGroupsParentNotebookOperations from .operations import SitesOnenoteNotebooksSectionGroupsSectionsOperations from .operations import SitesOnenoteNotebooksSectionGroupsSectionsPagesOperations from .operations import SitesOnenoteNotebooksSectionGroupsSectionsPagesParentNotebookOperations from .operations import SitesOnenoteNotebooksSectionGroupsSectionsPagesParentSectionOperations from .operations import SitesOnenoteNotebooksSectionGroupsSectionsParentNotebookOperations from .operations import SitesOnenoteNotebooksSectionsOperations from .operations import SitesOnenoteNotebooksSectionsPagesOperations from .operations import SitesOnenoteNotebooksSectionsPagesParentNotebookOperations from .operations import SitesOnenoteNotebooksSectionsPagesParentSectionOperations from .operations import SitesOnenoteNotebooksSectionsParentNotebookOperations from .operations import SitesOnenoteNotebooksSectionsParentSectionGroupParentNotebookOperations from .operations import SitesOnenoteNotebooksSectionsParentSectionGroupSectionsOperations from .operations import SitesOnenotePagesOperations from .operations import SitesOnenotePagesParentNotebookOperations from .operations import SitesOnenotePagesParentNotebookSectionGroupsParentNotebookOperations from .operations import SitesOnenotePagesParentNotebookSectionGroupsSectionsOperations from .operations import SitesOnenotePagesParentNotebookSectionGroupsSectionsPagesOperations from .operations import SitesOnenotePagesParentNotebookSectionGroupsSectionsParentNotebookOperations from .operations import SitesOnenotePagesParentNotebookSectionsOperations from .operations import SitesOnenotePagesParentNotebookSectionsPagesOperations from .operations import SitesOnenotePagesParentNotebookSectionsParentNotebookOperations from .operations import SitesOnenotePagesParentNotebookSectionsParentSectionGroupParentNotebookOperations from .operations import SitesOnenotePagesParentNotebookSectionsParentSectionGroupSectionsOperations from .operations import SitesOnenotePagesParentSectionOperations from .operations import SitesOnenotePagesParentSectionPagesOperations from .operations import SitesOnenotePagesParentSectionParentNotebookOperations from .operations import SitesOnenotePagesParentSectionParentNotebookSectionGroupsParentNotebookOperations from .operations import SitesOnenotePagesParentSectionParentNotebookSectionGroupsSectionsOperations from .operations import SitesOnenotePagesParentSectionParentNotebookSectionsOperations from .operations import SitesOnenotePagesParentSectionParentSectionGroupParentNotebookOperations from .operations import SitesOnenotePagesParentSectionParentSectionGroupParentNotebookSectionsOperations from .operations import SitesOnenotePagesParentSectionParentSectionGroupSectionsOperations from .operations import SitesOnenoteSectionGroupsParentNotebookOperations from .operations import SitesOnenoteSectionGroupsParentNotebookSectionsOperations from .operations import SitesOnenoteSectionGroupsParentNotebookSectionsPagesOperations from .operations import SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentNotebookOperations from .operations import SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentSectionOperations from .operations import SitesOnenoteSectionGroupsParentNotebookSectionsParentNotebookOperations from .operations import SitesOnenoteSectionGroupsSectionsOperations from .operations import SitesOnenoteSectionGroupsSectionsPagesOperations from .operations import SitesOnenoteSectionGroupsSectionsPagesParentNotebookOperations from .operations import SitesOnenoteSectionGroupsSectionsPagesParentNotebookSectionsOperations from .operations import SitesOnenoteSectionGroupsSectionsPagesParentSectionOperations from .operations import SitesOnenoteSectionGroupsSectionsParentNotebookOperations from .operations import SitesOnenoteSectionGroupsSectionsParentNotebookSectionsOperations from .operations import SitesOnenoteSectionsOperations from .operations import SitesOnenoteSectionsPagesOperations from .operations import SitesOnenoteSectionsPagesParentNotebookOperations from .operations import SitesOnenoteSectionsPagesParentNotebookSectionGroupsParentNotebookOperations from .operations import SitesOnenoteSectionsPagesParentNotebookSectionGroupsSectionsOperations from .operations import SitesOnenoteSectionsPagesParentNotebookSectionsOperations from .operations import SitesOnenoteSectionsPagesParentSectionOperations from .operations import SitesOnenoteSectionsParentNotebookOperations from .operations import SitesOnenoteSectionsParentNotebookSectionGroupsParentNotebookOperations from .operations import SitesOnenoteSectionsParentNotebookSectionGroupsSectionsOperations from .operations import SitesOnenoteSectionsParentNotebookSectionsOperations from .operations import SitesOnenoteSectionsParentSectionGroupParentNotebookOperations from .operations import SitesOnenoteSectionsParentSectionGroupParentNotebookSectionsOperations from .operations import SitesOnenoteSectionsParentSectionGroupSectionsOperations from .operations import SitesPagesOperations from .operations import UsersOperations from .. import models class Sites(object): """Sites. :ivar groups: GroupsOperations operations :vartype groups: sites.aio.operations.GroupsOperations :ivar sites_site: SitesSiteOperations operations :vartype sites_site: sites.aio.operations.SitesSiteOperations :ivar sites: SitesOperations operations :vartype sites: sites.aio.operations.SitesOperations :ivar sites_content_types: SitesContentTypesOperations operations :vartype sites_content_types: sites.aio.operations.SitesContentTypesOperations :ivar sites_lists: SitesListsOperations operations :vartype sites_lists: sites.aio.operations.SitesListsOperations :ivar sites_lists_activities: SitesListsActivitiesOperations operations :vartype sites_lists_activities: sites.aio.operations.SitesListsActivitiesOperations :ivar sites_lists_activities_list_item: SitesListsActivitiesListItemOperations operations :vartype sites_lists_activities_list_item: sites.aio.operations.SitesListsActivitiesListItemOperations :ivar sites_lists_activities_list_item_versions: SitesListsActivitiesListItemVersionsOperations operations :vartype sites_lists_activities_list_item_versions: sites.aio.operations.SitesListsActivitiesListItemVersionsOperations :ivar sites_lists_content_types: SitesListsContentTypesOperations operations :vartype sites_lists_content_types: sites.aio.operations.SitesListsContentTypesOperations :ivar sites_lists_items: SitesListsItemsOperations operations :vartype sites_lists_items: sites.aio.operations.SitesListsItemsOperations :ivar sites_lists_items_activities: SitesListsItemsActivitiesOperations operations :vartype sites_lists_items_activities: sites.aio.operations.SitesListsItemsActivitiesOperations :ivar sites_lists_items_activities_list_item: SitesListsItemsActivitiesListItemOperations operations :vartype sites_lists_items_activities_list_item: sites.aio.operations.SitesListsItemsActivitiesListItemOperations :ivar sites_lists_items_versions: SitesListsItemsVersionsOperations operations :vartype sites_lists_items_versions: sites.aio.operations.SitesListsItemsVersionsOperations :ivar sites_onenote_notebooks: SitesOnenoteNotebooksOperations operations :vartype sites_onenote_notebooks: sites.aio.operations.SitesOnenoteNotebooksOperations :ivar sites_onenote_notebooks_section_groups_parent_notebook: SitesOnenoteNotebooksSectionGroupsParentNotebookOperations operations :vartype sites_onenote_notebooks_section_groups_parent_notebook: sites.aio.operations.SitesOnenoteNotebooksSectionGroupsParentNotebookOperations :ivar sites_onenote_notebooks_section_groups_sections: SitesOnenoteNotebooksSectionGroupsSectionsOperations operations :vartype sites_onenote_notebooks_section_groups_sections: sites.aio.operations.SitesOnenoteNotebooksSectionGroupsSectionsOperations :ivar sites_onenote_notebooks_section_groups_sections_pages: SitesOnenoteNotebooksSectionGroupsSectionsPagesOperations operations :vartype sites_onenote_notebooks_section_groups_sections_pages: sites.aio.operations.SitesOnenoteNotebooksSectionGroupsSectionsPagesOperations :ivar sites_onenote_notebooks_section_groups_sections_pages_parent_notebook: SitesOnenoteNotebooksSectionGroupsSectionsPagesParentNotebookOperations operations :vartype sites_onenote_notebooks_section_groups_sections_pages_parent_notebook: sites.aio.operations.SitesOnenoteNotebooksSectionGroupsSectionsPagesParentNotebookOperations :ivar sites_onenote_notebooks_section_groups_sections_pages_parent_section: SitesOnenoteNotebooksSectionGroupsSectionsPagesParentSectionOperations operations :vartype sites_onenote_notebooks_section_groups_sections_pages_parent_section: sites.aio.operations.SitesOnenoteNotebooksSectionGroupsSectionsPagesParentSectionOperations :ivar sites_onenote_notebooks_section_groups_sections_parent_notebook: SitesOnenoteNotebooksSectionGroupsSectionsParentNotebookOperations operations :vartype sites_onenote_notebooks_section_groups_sections_parent_notebook: sites.aio.operations.SitesOnenoteNotebooksSectionGroupsSectionsParentNotebookOperations :ivar sites_onenote_notebooks_sections: SitesOnenoteNotebooksSectionsOperations operations :vartype sites_onenote_notebooks_sections: sites.aio.operations.SitesOnenoteNotebooksSectionsOperations :ivar sites_onenote_notebooks_sections_pages: SitesOnenoteNotebooksSectionsPagesOperations operations :vartype sites_onenote_notebooks_sections_pages: sites.aio.operations.SitesOnenoteNotebooksSectionsPagesOperations :ivar sites_onenote_notebooks_sections_pages_parent_notebook: SitesOnenoteNotebooksSectionsPagesParentNotebookOperations operations :vartype sites_onenote_notebooks_sections_pages_parent_notebook: sites.aio.operations.SitesOnenoteNotebooksSectionsPagesParentNotebookOperations :ivar sites_onenote_notebooks_sections_pages_parent_section: SitesOnenoteNotebooksSectionsPagesParentSectionOperations operations :vartype sites_onenote_notebooks_sections_pages_parent_section: sites.aio.operations.SitesOnenoteNotebooksSectionsPagesParentSectionOperations :ivar sites_onenote_notebooks_sections_parent_notebook: SitesOnenoteNotebooksSectionsParentNotebookOperations operations :vartype sites_onenote_notebooks_sections_parent_notebook: sites.aio.operations.SitesOnenoteNotebooksSectionsParentNotebookOperations :ivar sites_onenote_notebooks_sections_parent_section_group_parent_notebook: SitesOnenoteNotebooksSectionsParentSectionGroupParentNotebookOperations operations :vartype sites_onenote_notebooks_sections_parent_section_group_parent_notebook: sites.aio.operations.SitesOnenoteNotebooksSectionsParentSectionGroupParentNotebookOperations :ivar sites_onenote_notebooks_sections_parent_section_group_sections: SitesOnenoteNotebooksSectionsParentSectionGroupSectionsOperations operations :vartype sites_onenote_notebooks_sections_parent_section_group_sections: sites.aio.operations.SitesOnenoteNotebooksSectionsParentSectionGroupSectionsOperations :ivar sites_onenote_pages: SitesOnenotePagesOperations operations :vartype sites_onenote_pages: sites.aio.operations.SitesOnenotePagesOperations :ivar sites_onenote_pages_parent_notebook: SitesOnenotePagesParentNotebookOperations operations :vartype sites_onenote_pages_parent_notebook: sites.aio.operations.SitesOnenotePagesParentNotebookOperations :ivar sites_onenote_pages_parent_notebook_section_groups_parent_notebook: SitesOnenotePagesParentNotebookSectionGroupsParentNotebookOperations operations :vartype sites_onenote_pages_parent_notebook_section_groups_parent_notebook: sites.aio.operations.SitesOnenotePagesParentNotebookSectionGroupsParentNotebookOperations :ivar sites_onenote_pages_parent_notebook_section_groups_sections: SitesOnenotePagesParentNotebookSectionGroupsSectionsOperations operations :vartype sites_onenote_pages_parent_notebook_section_groups_sections: sites.aio.operations.SitesOnenotePagesParentNotebookSectionGroupsSectionsOperations :ivar sites_onenote_pages_parent_notebook_section_groups_sections_pages: SitesOnenotePagesParentNotebookSectionGroupsSectionsPagesOperations operations :vartype sites_onenote_pages_parent_notebook_section_groups_sections_pages: sites.aio.operations.SitesOnenotePagesParentNotebookSectionGroupsSectionsPagesOperations :ivar sites_onenote_pages_parent_notebook_section_groups_sections_parent_notebook: SitesOnenotePagesParentNotebookSectionGroupsSectionsParentNotebookOperations operations :vartype sites_onenote_pages_parent_notebook_section_groups_sections_parent_notebook: sites.aio.operations.SitesOnenotePagesParentNotebookSectionGroupsSectionsParentNotebookOperations :ivar sites_onenote_pages_parent_notebook_sections: SitesOnenotePagesParentNotebookSectionsOperations operations :vartype sites_onenote_pages_parent_notebook_sections: sites.aio.operations.SitesOnenotePagesParentNotebookSectionsOperations :ivar sites_onenote_pages_parent_notebook_sections_pages: SitesOnenotePagesParentNotebookSectionsPagesOperations operations :vartype sites_onenote_pages_parent_notebook_sections_pages: sites.aio.operations.SitesOnenotePagesParentNotebookSectionsPagesOperations :ivar sites_onenote_pages_parent_notebook_sections_parent_notebook: SitesOnenotePagesParentNotebookSectionsParentNotebookOperations operations :vartype sites_onenote_pages_parent_notebook_sections_parent_notebook: sites.aio.operations.SitesOnenotePagesParentNotebookSectionsParentNotebookOperations :ivar sites_onenote_pages_parent_notebook_sections_parent_section_group_parent_notebook: SitesOnenotePagesParentNotebookSectionsParentSectionGroupParentNotebookOperations operations :vartype sites_onenote_pages_parent_notebook_sections_parent_section_group_parent_notebook: sites.aio.operations.SitesOnenotePagesParentNotebookSectionsParentSectionGroupParentNotebookOperations :ivar sites_onenote_pages_parent_notebook_sections_parent_section_group_sections: SitesOnenotePagesParentNotebookSectionsParentSectionGroupSectionsOperations operations :vartype sites_onenote_pages_parent_notebook_sections_parent_section_group_sections: sites.aio.operations.SitesOnenotePagesParentNotebookSectionsParentSectionGroupSectionsOperations :ivar sites_onenote_pages_parent_section: SitesOnenotePagesParentSectionOperations operations :vartype sites_onenote_pages_parent_section: sites.aio.operations.SitesOnenotePagesParentSectionOperations :ivar sites_onenote_pages_parent_section_pages: SitesOnenotePagesParentSectionPagesOperations operations :vartype sites_onenote_pages_parent_section_pages: sites.aio.operations.SitesOnenotePagesParentSectionPagesOperations :ivar sites_onenote_pages_parent_section_parent_notebook: SitesOnenotePagesParentSectionParentNotebookOperations operations :vartype sites_onenote_pages_parent_section_parent_notebook: sites.aio.operations.SitesOnenotePagesParentSectionParentNotebookOperations :ivar sites_onenote_pages_parent_section_parent_notebook_section_groups_parent_notebook: SitesOnenotePagesParentSectionParentNotebookSectionGroupsParentNotebookOperations operations :vartype sites_onenote_pages_parent_section_parent_notebook_section_groups_parent_notebook: sites.aio.operations.SitesOnenotePagesParentSectionParentNotebookSectionGroupsParentNotebookOperations :ivar sites_onenote_pages_parent_section_parent_notebook_section_groups_sections: SitesOnenotePagesParentSectionParentNotebookSectionGroupsSectionsOperations operations :vartype sites_onenote_pages_parent_section_parent_notebook_section_groups_sections: sites.aio.operations.SitesOnenotePagesParentSectionParentNotebookSectionGroupsSectionsOperations :ivar sites_onenote_pages_parent_section_parent_notebook_sections: SitesOnenotePagesParentSectionParentNotebookSectionsOperations operations :vartype sites_onenote_pages_parent_section_parent_notebook_sections: sites.aio.operations.SitesOnenotePagesParentSectionParentNotebookSectionsOperations :ivar sites_onenote_pages_parent_section_parent_section_group_parent_notebook: SitesOnenotePagesParentSectionParentSectionGroupParentNotebookOperations operations :vartype sites_onenote_pages_parent_section_parent_section_group_parent_notebook: sites.aio.operations.SitesOnenotePagesParentSectionParentSectionGroupParentNotebookOperations :ivar sites_onenote_pages_parent_section_parent_section_group_parent_notebook_sections: SitesOnenotePagesParentSectionParentSectionGroupParentNotebookSectionsOperations operations :vartype sites_onenote_pages_parent_section_parent_section_group_parent_notebook_sections: sites.aio.operations.SitesOnenotePagesParentSectionParentSectionGroupParentNotebookSectionsOperations :ivar sites_onenote_pages_parent_section_parent_section_group_sections: SitesOnenotePagesParentSectionParentSectionGroupSectionsOperations operations :vartype sites_onenote_pages_parent_section_parent_section_group_sections: sites.aio.operations.SitesOnenotePagesParentSectionParentSectionGroupSectionsOperations :ivar sites_onenote_section_groups_parent_notebook: SitesOnenoteSectionGroupsParentNotebookOperations operations :vartype sites_onenote_section_groups_parent_notebook: sites.aio.operations.SitesOnenoteSectionGroupsParentNotebookOperations :ivar sites_onenote_section_groups_parent_notebook_sections: SitesOnenoteSectionGroupsParentNotebookSectionsOperations operations :vartype sites_onenote_section_groups_parent_notebook_sections: sites.aio.operations.SitesOnenoteSectionGroupsParentNotebookSectionsOperations :ivar sites_onenote_section_groups_parent_notebook_sections_pages: SitesOnenoteSectionGroupsParentNotebookSectionsPagesOperations operations :vartype sites_onenote_section_groups_parent_notebook_sections_pages: sites.aio.operations.SitesOnenoteSectionGroupsParentNotebookSectionsPagesOperations :ivar sites_onenote_section_groups_parent_notebook_sections_pages_parent_notebook: SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentNotebookOperations operations :vartype sites_onenote_section_groups_parent_notebook_sections_pages_parent_notebook: sites.aio.operations.SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentNotebookOperations :ivar sites_onenote_section_groups_parent_notebook_sections_pages_parent_section: SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentSectionOperations operations :vartype sites_onenote_section_groups_parent_notebook_sections_pages_parent_section: sites.aio.operations.SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentSectionOperations :ivar sites_onenote_section_groups_parent_notebook_sections_parent_notebook: SitesOnenoteSectionGroupsParentNotebookSectionsParentNotebookOperations operations :vartype sites_onenote_section_groups_parent_notebook_sections_parent_notebook: sites.aio.operations.SitesOnenoteSectionGroupsParentNotebookSectionsParentNotebookOperations :ivar sites_onenote_section_groups_sections: SitesOnenoteSectionGroupsSectionsOperations operations :vartype sites_onenote_section_groups_sections: sites.aio.operations.SitesOnenoteSectionGroupsSectionsOperations :ivar sites_onenote_section_groups_sections_pages: SitesOnenoteSectionGroupsSectionsPagesOperations operations :vartype sites_onenote_section_groups_sections_pages: sites.aio.operations.SitesOnenoteSectionGroupsSectionsPagesOperations :ivar sites_onenote_section_groups_sections_pages_parent_notebook: SitesOnenoteSectionGroupsSectionsPagesParentNotebookOperations operations :vartype sites_onenote_section_groups_sections_pages_parent_notebook: sites.aio.operations.SitesOnenoteSectionGroupsSectionsPagesParentNotebookOperations :ivar sites_onenote_section_groups_sections_pages_parent_notebook_sections: SitesOnenoteSectionGroupsSectionsPagesParentNotebookSectionsOperations operations :vartype sites_onenote_section_groups_sections_pages_parent_notebook_sections: sites.aio.operations.SitesOnenoteSectionGroupsSectionsPagesParentNotebookSectionsOperations :ivar sites_onenote_section_groups_sections_pages_parent_section: SitesOnenoteSectionGroupsSectionsPagesParentSectionOperations operations :vartype sites_onenote_section_groups_sections_pages_parent_section: sites.aio.operations.SitesOnenoteSectionGroupsSectionsPagesParentSectionOperations :ivar sites_onenote_section_groups_sections_parent_notebook: SitesOnenoteSectionGroupsSectionsParentNotebookOperations operations :vartype sites_onenote_section_groups_sections_parent_notebook: sites.aio.operations.SitesOnenoteSectionGroupsSectionsParentNotebookOperations :ivar sites_onenote_section_groups_sections_parent_notebook_sections: SitesOnenoteSectionGroupsSectionsParentNotebookSectionsOperations operations :vartype sites_onenote_section_groups_sections_parent_notebook_sections: sites.aio.operations.SitesOnenoteSectionGroupsSectionsParentNotebookSectionsOperations :ivar sites_onenote_sections: SitesOnenoteSectionsOperations operations :vartype sites_onenote_sections: sites.aio.operations.SitesOnenoteSectionsOperations :ivar sites_onenote_sections_pages: SitesOnenoteSectionsPagesOperations operations :vartype sites_onenote_sections_pages: sites.aio.operations.SitesOnenoteSectionsPagesOperations :ivar sites_onenote_sections_pages_parent_notebook: SitesOnenoteSectionsPagesParentNotebookOperations operations :vartype sites_onenote_sections_pages_parent_notebook: sites.aio.operations.SitesOnenoteSectionsPagesParentNotebookOperations :ivar sites_onenote_sections_pages_parent_notebook_section_groups_parent_notebook: SitesOnenoteSectionsPagesParentNotebookSectionGroupsParentNotebookOperations operations :vartype sites_onenote_sections_pages_parent_notebook_section_groups_parent_notebook: sites.aio.operations.SitesOnenoteSectionsPagesParentNotebookSectionGroupsParentNotebookOperations :ivar sites_onenote_sections_pages_parent_notebook_section_groups_sections: SitesOnenoteSectionsPagesParentNotebookSectionGroupsSectionsOperations operations :vartype sites_onenote_sections_pages_parent_notebook_section_groups_sections: sites.aio.operations.SitesOnenoteSectionsPagesParentNotebookSectionGroupsSectionsOperations :ivar sites_onenote_sections_pages_parent_notebook_sections: SitesOnenoteSectionsPagesParentNotebookSectionsOperations operations :vartype sites_onenote_sections_pages_parent_notebook_sections: sites.aio.operations.SitesOnenoteSectionsPagesParentNotebookSectionsOperations :ivar sites_onenote_sections_pages_parent_section: SitesOnenoteSectionsPagesParentSectionOperations operations :vartype sites_onenote_sections_pages_parent_section: sites.aio.operations.SitesOnenoteSectionsPagesParentSectionOperations :ivar sites_onenote_sections_parent_notebook: SitesOnenoteSectionsParentNotebookOperations operations :vartype sites_onenote_sections_parent_notebook: sites.aio.operations.SitesOnenoteSectionsParentNotebookOperations :ivar sites_onenote_sections_parent_notebook_section_groups_parent_notebook: SitesOnenoteSectionsParentNotebookSectionGroupsParentNotebookOperations operations :vartype sites_onenote_sections_parent_notebook_section_groups_parent_notebook: sites.aio.operations.SitesOnenoteSectionsParentNotebookSectionGroupsParentNotebookOperations :ivar sites_onenote_sections_parent_notebook_section_groups_sections: SitesOnenoteSectionsParentNotebookSectionGroupsSectionsOperations operations :vartype sites_onenote_sections_parent_notebook_section_groups_sections: sites.aio.operations.SitesOnenoteSectionsParentNotebookSectionGroupsSectionsOperations :ivar sites_onenote_sections_parent_notebook_sections: SitesOnenoteSectionsParentNotebookSectionsOperations operations :vartype sites_onenote_sections_parent_notebook_sections: sites.aio.operations.SitesOnenoteSectionsParentNotebookSectionsOperations :ivar sites_onenote_sections_parent_section_group_parent_notebook: SitesOnenoteSectionsParentSectionGroupParentNotebookOperations operations :vartype sites_onenote_sections_parent_section_group_parent_notebook: sites.aio.operations.SitesOnenoteSectionsParentSectionGroupParentNotebookOperations :ivar sites_onenote_sections_parent_section_group_parent_notebook_sections: SitesOnenoteSectionsParentSectionGroupParentNotebookSectionsOperations operations :vartype sites_onenote_sections_parent_section_group_parent_notebook_sections: sites.aio.operations.SitesOnenoteSectionsParentSectionGroupParentNotebookSectionsOperations :ivar sites_onenote_sections_parent_section_group_sections: SitesOnenoteSectionsParentSectionGroupSectionsOperations operations :vartype sites_onenote_sections_parent_section_group_sections: sites.aio.operations.SitesOnenoteSectionsParentSectionGroupSectionsOperations :ivar sites_pages: SitesPagesOperations operations :vartype sites_pages: sites.aio.operations.SitesPagesOperations :ivar users: UsersOperations operations :vartype users: sites.aio.operations.UsersOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param top: Show only the first n items. :type top: int :param skip: Skip the first n items. :type skip: int :param search: Search items by search phrases. :type search: str :param filter: Filter items by property values. :type filter: str :param count: Include count of items. :type count: bool :param str base_url: Service URL """ def __init__( self, credential: "AsyncTokenCredential", top: Optional[int] = None, skip: Optional[int] = None, search: Optional[str] = None, filter: Optional[str] = None, count: Optional[bool] = None, base_url: Optional[str] = None, **kwargs: Any ) -> None: if not base_url: base_url = 'https://graph.microsoft.com/beta' self._config = SitesConfiguration(credential, top, skip, search, filter, count, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.groups = GroupsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_site = SitesSiteOperations( self._client, self._config, self._serialize, self._deserialize) self.sites = SitesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_content_types = SitesContentTypesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists = SitesListsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_activities = SitesListsActivitiesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_activities_list_item = SitesListsActivitiesListItemOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_activities_list_item_versions = SitesListsActivitiesListItemVersionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_content_types = SitesListsContentTypesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_items = SitesListsItemsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_items_activities = SitesListsItemsActivitiesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_items_activities_list_item = SitesListsItemsActivitiesListItemOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_lists_items_versions = SitesListsItemsVersionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks = SitesOnenoteNotebooksOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_section_groups_parent_notebook = SitesOnenoteNotebooksSectionGroupsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_section_groups_sections = SitesOnenoteNotebooksSectionGroupsSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_section_groups_sections_pages = SitesOnenoteNotebooksSectionGroupsSectionsPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_section_groups_sections_pages_parent_notebook = SitesOnenoteNotebooksSectionGroupsSectionsPagesParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_section_groups_sections_pages_parent_section = SitesOnenoteNotebooksSectionGroupsSectionsPagesParentSectionOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_section_groups_sections_parent_notebook = SitesOnenoteNotebooksSectionGroupsSectionsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_sections = SitesOnenoteNotebooksSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_sections_pages = SitesOnenoteNotebooksSectionsPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_sections_pages_parent_notebook = SitesOnenoteNotebooksSectionsPagesParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_sections_pages_parent_section = SitesOnenoteNotebooksSectionsPagesParentSectionOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_sections_parent_notebook = SitesOnenoteNotebooksSectionsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_sections_parent_section_group_parent_notebook = SitesOnenoteNotebooksSectionsParentSectionGroupParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_notebooks_sections_parent_section_group_sections = SitesOnenoteNotebooksSectionsParentSectionGroupSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages = SitesOnenotePagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook = SitesOnenotePagesParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_section_groups_parent_notebook = SitesOnenotePagesParentNotebookSectionGroupsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_section_groups_sections = SitesOnenotePagesParentNotebookSectionGroupsSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_section_groups_sections_pages = SitesOnenotePagesParentNotebookSectionGroupsSectionsPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_section_groups_sections_parent_notebook = SitesOnenotePagesParentNotebookSectionGroupsSectionsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_sections = SitesOnenotePagesParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_sections_pages = SitesOnenotePagesParentNotebookSectionsPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_sections_parent_notebook = SitesOnenotePagesParentNotebookSectionsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_sections_parent_section_group_parent_notebook = SitesOnenotePagesParentNotebookSectionsParentSectionGroupParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_notebook_sections_parent_section_group_sections = SitesOnenotePagesParentNotebookSectionsParentSectionGroupSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section = SitesOnenotePagesParentSectionOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_pages = SitesOnenotePagesParentSectionPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_parent_notebook = SitesOnenotePagesParentSectionParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_parent_notebook_section_groups_parent_notebook = SitesOnenotePagesParentSectionParentNotebookSectionGroupsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_parent_notebook_section_groups_sections = SitesOnenotePagesParentSectionParentNotebookSectionGroupsSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_parent_notebook_sections = SitesOnenotePagesParentSectionParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_parent_section_group_parent_notebook = SitesOnenotePagesParentSectionParentSectionGroupParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_parent_section_group_parent_notebook_sections = SitesOnenotePagesParentSectionParentSectionGroupParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_pages_parent_section_parent_section_group_sections = SitesOnenotePagesParentSectionParentSectionGroupSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_parent_notebook = SitesOnenoteSectionGroupsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_parent_notebook_sections = SitesOnenoteSectionGroupsParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_parent_notebook_sections_pages = SitesOnenoteSectionGroupsParentNotebookSectionsPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_parent_notebook_sections_pages_parent_notebook = SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_parent_notebook_sections_pages_parent_section = SitesOnenoteSectionGroupsParentNotebookSectionsPagesParentSectionOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_parent_notebook_sections_parent_notebook = SitesOnenoteSectionGroupsParentNotebookSectionsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_sections = SitesOnenoteSectionGroupsSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_sections_pages = SitesOnenoteSectionGroupsSectionsPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_sections_pages_parent_notebook = SitesOnenoteSectionGroupsSectionsPagesParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_sections_pages_parent_notebook_sections = SitesOnenoteSectionGroupsSectionsPagesParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_sections_pages_parent_section = SitesOnenoteSectionGroupsSectionsPagesParentSectionOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_sections_parent_notebook = SitesOnenoteSectionGroupsSectionsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_section_groups_sections_parent_notebook_sections = SitesOnenoteSectionGroupsSectionsParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections = SitesOnenoteSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_pages = SitesOnenoteSectionsPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_pages_parent_notebook = SitesOnenoteSectionsPagesParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_pages_parent_notebook_section_groups_parent_notebook = SitesOnenoteSectionsPagesParentNotebookSectionGroupsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_pages_parent_notebook_section_groups_sections = SitesOnenoteSectionsPagesParentNotebookSectionGroupsSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_pages_parent_notebook_sections = SitesOnenoteSectionsPagesParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_pages_parent_section = SitesOnenoteSectionsPagesParentSectionOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_parent_notebook = SitesOnenoteSectionsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_parent_notebook_section_groups_parent_notebook = SitesOnenoteSectionsParentNotebookSectionGroupsParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_parent_notebook_section_groups_sections = SitesOnenoteSectionsParentNotebookSectionGroupsSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_parent_notebook_sections = SitesOnenoteSectionsParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_parent_section_group_parent_notebook = SitesOnenoteSectionsParentSectionGroupParentNotebookOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_parent_section_group_parent_notebook_sections = SitesOnenoteSectionsParentSectionGroupParentNotebookSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_onenote_sections_parent_section_group_sections = SitesOnenoteSectionsParentSectionGroupSectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.sites_pages = SitesPagesOperations( self._client, self._config, self._serialize, self._deserialize) self.users = UsersOperations( self._client, self._config, self._serialize, self._deserialize) async def close(self) -> None: await self._client.close() async def __aenter__(self) -> "Sites": await self._client.__aenter__() return self async def __aexit__(self, *exc_details) -> None: await self._client.__aexit__(*exc_details)
96.223947
198
0.865613
3,476
43,397
10.336306
0.063291
0.061121
0.042306
0.042306
0.65429
0.630132
0.598987
0.528821
0.454368
0.361825
0
0.000025
0.092771
43,397
450
199
96.437778
0.91255
0.471046
0
0.290076
0
0
0.002559
0
0
0
0
0
0
1
0.003817
false
0
0.312977
0
0.324427
0
0
0
1
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
0
0
0
0
0
0
1
0
0
0
0
2
505d8bfd8f4ba2fad99f1993c42102e5d2761c80
898
py
Python
test_src/test_proj/migrations/0026_somethingwithimage.py
vstconsulting/vstutils
0e7c50ba1e46dd705fe1239da783830422cb7aee
[ "Apache-2.0" ]
36
2018-05-29T22:55:45.000Z
2021-11-18T22:59:29.000Z
test_src/test_proj/migrations/0026_somethingwithimage.py
vstconsulting/vstutils
0e7c50ba1e46dd705fe1239da783830422cb7aee
[ "Apache-2.0" ]
19
2020-03-05T01:31:52.000Z
2022-01-21T08:22:19.000Z
test_src/test_proj/migrations/0026_somethingwithimage.py
vstconsulting/vstutils
0e7c50ba1e46dd705fe1239da783830422cb7aee
[ "Apache-2.0" ]
10
2018-07-30T10:14:30.000Z
2022-01-08T12:07:20.000Z
# Generated by Django 3.2.8 on 2021-10-27 06:07 from django.db import migrations, models import vstutils.models.fields class Migration(migrations.Migration): dependencies = [ ('test_proj', '0025_author_decimal'), ] operations = [ migrations.CreateModel( name='SomethingWithImage', fields=[ ('id', models.AutoField(max_length=20, primary_key=True, serialize=False)), ('hidden', models.BooleanField(default=False)), ('name', models.CharField(max_length=100)), ('validimage', vstutils.models.fields.NamedBinaryImageInJSONField(default='')), ('invalidimage', vstutils.models.fields.NamedBinaryImageInJSONField(default='')), ('imagewithmarginapplying', vstutils.models.fields.NamedBinaryImageInJSONField(default='')), ], ), ]
34.538462
108
0.622494
78
898
7.089744
0.641026
0.101266
0.144665
0.254973
0.292948
0
0
0
0
0
0
0.035556
0.24833
898
25
109
35.92
0.783704
0.050111
0
0
1
0
0.121034
0.027027
0
0
0
0
0
1
0
false
0
0.105263
0
0.263158
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
ac90d3a2f516579956fca5f08f1e1e950832c465
1,784
py
Python
plugins/logstash/komand_logstash/actions/node/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/logstash/komand_logstash/actions/node/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/logstash/komand_logstash/actions/node/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Retrieves information about the node" class Input: TYPES = "types" class Output: RESPONSE = "response" class NodeInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "types": { "type": "string", "title": "Types", "description": "Comma-separated list of types of node info to return: pipeline, os, jvm", "order": 1 } } } """) def __init__(self): super(self.__class__, self).__init__(self.schema) class NodeOutput(komand.Output): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "response": { "$ref": "#/definitions/response", "title": "Response", "description": "Response", "order": 1 } }, "definitions": { "response": { "type": "object", "title": "response", "properties": { "host": { "type": "string", "title": "Host", "order": 1 }, "http_address": { "type": "string", "title": "Http Address", "order": 3 }, "id": { "type": "string", "title": "Id", "order": 4 }, "name": { "type": "string", "title": "Name", "order": 5 }, "result": { "type": "object", "title": "Result", "order": 6 }, "version": { "type": "string", "title": "Version", "order": 2 } } } } } """) def __init__(self): super(self.__class__, self).__init__(self.schema)
18.978723
95
0.464126
153
1,784
5.248366
0.398693
0.07472
0.11208
0.047323
0.229141
0.229141
0.229141
0.229141
0.107098
0.107098
0
0.006999
0.359305
1,784
93
96
19.182796
0.695538
0.02074
0
0.35
1
0.0125
0.74957
0.014327
0
0
0
0
0
1
0.025
false
0
0.025
0
0.175
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
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
aca3ffe4ad3eb5ca10d96f1d4bfcaa9233492cb1
388
py
Python
tech_project/lib/python2.7/site-packages/cms/tests/test_static_analysis.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
5
2015-03-08T08:46:58.000Z
2021-11-16T12:34:15.000Z
cms/tests/test_static_analysis.py
thisisalamin/django-cms
eeb1e4712b3866e243daf800c142e2199e4be9df
[ "BSD-3-Clause" ]
102
2020-08-11T23:57:18.000Z
2022-03-12T00:46:00.000Z
cms/tests/test_static_analysis.py
thisisalamin/django-cms
eeb1e4712b3866e243daf800c142e2199e4be9df
[ "BSD-3-Clause" ]
4
2019-01-26T09:58:37.000Z
2019-06-24T08:12:43.000Z
from unittest import TestCase from cms.test_utils.util.static_analysis import pyflakes class AboveStaticAnalysisCodeTest(TestCase): """ Name is pretty lame, but ensure it's executed before every other test """ def test_pyflakes(self): import cms import menus errors, message = pyflakes((cms, menus)) self.assertEqual(errors, 0, message)
25.866667
73
0.695876
47
388
5.680851
0.680851
0
0
0
0
0
0
0
0
0
0
0.003344
0.229381
388
14
74
27.714286
0.889632
0.177835
0
0
0
0
0
0
0
0
0
0
0.125
1
0.125
false
0
0.5
0
0.75
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
0
0
0
0
0
0
1
0
1
0
0
2
acaf2eb60fa17742eac8e5d729fe7d386de3d781
1,060
py
Python
faro/test/test_utils.py
cgiraldo/FARO
aa599fe8eebb489fe032549ec52771574a6d04bd
[ "MIT" ]
null
null
null
faro/test/test_utils.py
cgiraldo/FARO
aa599fe8eebb489fe032549ec52771574a6d04bd
[ "MIT" ]
null
null
null
faro/test/test_utils.py
cgiraldo/FARO
aa599fe8eebb489fe032549ec52771574a6d04bd
[ "MIT" ]
null
null
null
# Copyright (c) 2019 by Gradiant. All rights reserved. # This code cannot be used, copied, modified and/or distributed without # the express permission of the authors. ''' Created on 1st of October (2019) @author: Hector Cerezo ''' import unittest from .. import utils class UtilsTest(unittest.TestCase): def setUp(self): """ Setting up for the test """ pass def tearDown(self): """ Cleaning up after the test """ pass def test_normalize_text_proximity_v0(self): """ Test the normalization to find words in the proximity """ message = "este es mi N.I.F.: 4576889J" norm_text = utils.normalize_text_proximity(message) self.assertEqual(norm_text, "este es mi nif.: 4576889j", "{} Normalized text is not the expected result {}".format( self.shortDescription(), norm_text))
23.555556
112
0.54434
113
1,060
5.026549
0.672566
0.042254
0.038732
0.049296
0
0
0
0
0
0
0
0.036145
0.373585
1,060
44
113
24.090909
0.819277
0.308491
0
0.142857
0
0
0.168634
0
0
0
0
0
0.071429
1
0.214286
false
0.142857
0.142857
0
0.428571
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
0
0
0
1
0
1
0
0
0
0
0
2
acb186a4882c0dbd19aa05f3a4a948206d8b6fda
142
py
Python
days/day13/part2.py
jaredbancroft/aoc2021
4eaf339cc0c8566da2af13f7cb9cf6fe87355aac
[ "MIT" ]
null
null
null
days/day13/part2.py
jaredbancroft/aoc2021
4eaf339cc0c8566da2af13f7cb9cf6fe87355aac
[ "MIT" ]
null
null
null
days/day13/part2.py
jaredbancroft/aoc2021
4eaf339cc0c8566da2af13f7cb9cf6fe87355aac
[ "MIT" ]
null
null
null
from submarine.systems.fold import Origami def solution(day): o = Origami(f"inputs/{day}.txt") o.run(only_once=False) o.print()
17.75
42
0.676056
22
142
4.318182
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.176056
142
7
43
20.285714
0.811966
0
0
0
0
0
0.112676
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.4
0.2
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
0
0
0
0
0
0
0
2
acbbd442ab4847e204766213946f92fde3f948e5
3,132
py
Python
services/core-api/tests/constants.py
parc-jason/mds
8f181a429442208a061ed72065b71e6c2bd0f76f
[ "Apache-2.0" ]
null
null
null
services/core-api/tests/constants.py
parc-jason/mds
8f181a429442208a061ed72065b71e6c2bd0f76f
[ "Apache-2.0" ]
null
null
null
services/core-api/tests/constants.py
parc-jason/mds
8f181a429442208a061ed72065b71e6c2bd0f76f
[ "Apache-2.0" ]
null
null
null
# Auth Constants TOKEN_HEADER = {"alg": "RS256", "typ": "JWT", "kid": "flask-jwt-oidc-test-client"} BASE_AUTH_CLAIMS = { "iss": "test_issuer", "sub": "43e6a245-0bf7-4ccf-9bd0-e7fb85fd18cc", "aud": "test_audience", "exp": 21531718745, "iat": 1531718745, "jti": "flask-jwt-oidc-test-support", "typ": "Bearer", "username": "test-user", "realm_access": { "roles": ["idir"] } } FULL_AUTH_CLAIMS = { "iss": "test_issuer", "sub": "43e6a245-0bf7-4ccf-9bd0-e7fb85fd18cc", "aud": "test_audience", "exp": 21531718745, "iat": 1531718745, "jti": "flask-jwt-oidc-test-support", "typ": "Bearer", "username": "test-user", "preferred_username": "test-user", "email": "test-email", "given_name": "test-given-name", "realm_access": { "roles": [ "core_view_all", "core_edit_mines", "core_admin", "core_abandoned_mines", "core_close_permits", "core_edit_all", "core_edit_do", "core_edit_investigations", "core_edit_parties", "core_edit_permits", "core_edit_reports", "core_edit_securities", "core_edit_variances", "core_environmental_reports", "core_geospatial", "idir", "core_edit_submissions", "core_edit_bonds" ] } } VIEW_ONLY_AUTH_CLAIMS = { "iss": "test_issuer", "sub": "43e6a245-0bf7-4ccf-9bd0-e7fb85fd18cc", "aud": "test_audience", "exp": 21531718745, "iat": 1531718745, "jti": "flask-jwt-oidc-test-support", "typ": "Bearer", "username": "test-user", "email": "test-email", "realm_access": { "roles": ["core_view_all", "idir"] } } CREATE_ONLY_AUTH_CLAIMS = { "iss": "test_issuer", "sub": "43e6a245-0bf7-4ccf-9bd0-e7fb85fd18cc", "aud": "test_audience", "exp": 21531718745, "iat": 1531718745, "jti": "flask-jwt-oidc-test-support", "typ": "Bearer", "username": "test-user", "realm_access": { "roles": ["core_edit_mines", "idir"] } } ADMIN_ONLY_AUTH_CLAIMS = { "iss": "test_issuer", "sub": "43e6a245-0bf7-4ccf-9bd0-e7fb85fd18cc", "aud": "test_audience", "exp": 21531718745, "iat": 1531718745, "jti": "flask-jwt-oidc-test-support", "typ": "Bearer", "username": "test-user", "realm_access": { "roles": ["core_admin", "idir"] } } PROPONENT_ONLY_AUTH_CLAIMS = { "iss": "test_issuer", "sub": "43e6a245-0bf7-4ccf-9bd0-e7fb85fd18cc", "aud": "test_audience", "exp": 21531718745, "iat": 1531718745, "jti": "flask-jwt-oidc-test-support", "typ": "Bearer", "username": "test-proponent", "email": "test-proponent-email@minespace.ca", "realm_access": { "roles": ["mds_minespace_proponents"] } } NROS_VFCBC_AUTH_CLAIMS = { "iss": "test_issuer", "sub": "43e6a245-0bf7-4ccf-9bd0-e7fb85fd18cc", "aud": "test_audience", "exp": 21531718745, "iat": 1531718745, "jti": "flask-jwt-oidc-test-support", "typ": "Bearer", "username": "test-proponent", "email": "test-proponent-email@minespace.ca", "realm_access": { "roles": ["core_edit_submissions"] } }
28.216216
134
0.600255
345
3,132
5.205797
0.205797
0.057906
0.053452
0.071269
0.751114
0.744432
0.689866
0.689866
0.689866
0.689866
0
0.105221
0.204981
3,132
111
135
28.216216
0.616064
0.00447
0
0.650485
0
0
0.526789
0.208213
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
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
2
acc4a9c8ec66f6243f89eb1711d5ccaf697a3e36
112,736
py
Python
pysnmp/MBG-SNMP-LT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/MBG-SNMP-LT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/MBG-SNMP-LT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module MBG-SNMP-LT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MBG-SNMP-LT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:00:25 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint") mbgSnmpRoot, = mibBuilder.importSymbols("MBG-SNMP-ROOT-MIB", "mbgSnmpRoot") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") NotificationType, Counter64, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, ObjectIdentity, Unsigned32, MibIdentifier, Counter32, iso, TimeTicks, Bits, Gauge32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Counter64", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "ObjectIdentity", "Unsigned32", "MibIdentifier", "Counter32", "iso", "TimeTicks", "Bits", "Gauge32", "IpAddress") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") mbgLantime = ModuleIdentity((1, 3, 6, 1, 4, 1, 5597, 3)) mbgLantime.setRevisions(('2012-01-25 07:45', '2011-03-30 00:00', '2011-03-29 00:00', '2010-01-19 00:00', '2009-12-03 00:00', '2008-09-10 00:00', '2008-07-15 00:00', '2008-06-15 00:00', '2006-08-23 00:00', '2006-03-20 00:00', '2005-07-08 00:00',)) if mibBuilder.loadTexts: mbgLantime.setLastUpdated('201201250745Z') if mibBuilder.loadTexts: mbgLantime.setOrganization('www.meinberg.de') mbgLtInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 0)) mbgLtFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 0, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtFirmwareVersion.setStatus('current') mbgLtFirmwareVersionVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 0, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtFirmwareVersionVal.setStatus('current') mbgLtNtp = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 1)) mbgLtNtpCurrentState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpCurrentState.setStatus('current') mbgLtNtpCurrentStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 99))).clone(namedValues=NamedValues(("notSynchronized", 0), ("noGoodRefclock", 1), ("syncToExtRefclock", 2), ("syncToSerialRefclock", 3), ("normalOperationPPS", 4), ("normalOperationRefclock", 5), ("unknown", 99))).clone(99)).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpCurrentStateVal.setStatus('current') mbgLtNtpStratum = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647)).clone(99)).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpStratum.setStatus('current') mbgLtNtpActiveRefclockId = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 99))).clone(namedValues=NamedValues(("localClock", 0), ("serialRefclock", 1), ("pps", 2), ("externalRefclock", 3), ("notSync", 99))).clone(99)).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpActiveRefclockId.setStatus('current') mbgLtNtpActiveRefclockName = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpActiveRefclockName.setStatus('current') mbgLtNtpActiveRefclockOffset = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpActiveRefclockOffset.setStatus('current') mbgLtNtpActiveRefclockOffsetVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647)).clone(1024000000)).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpActiveRefclockOffsetVal.setStatus('current') mbgLtNtpNumberOfRefclocks = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpNumberOfRefclocks.setStatus('current') mbgLtNtpAuthKeyId = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpAuthKeyId.setStatus('current') mbgLtNtpVersion = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 1, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtNtpVersion.setStatus('current') mbgLtRefclock = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2)) mbgLtRefClockType = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefClockType.setStatus('current') mbgLtRefClockTypeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22))).clone(namedValues=NamedValues(("notavailable", 0), ("mbgGPS167", 1), ("mbgGPS167BGTTGP", 2), ("mbgPZF509", 3), ("mbgPZF509BGTTGP", 4), ("mbgSHS", 5), ("mbgSHSBGT", 6), ("mbgSHSFRC", 7), ("mbgSHSFRCBGT", 8), ("mbgTCR509", 9), ("mbgTCR509BGTTGP", 10), ("mbgRDT", 11), ("mbgRDTBGTTGP", 12), ("mbgEDT", 13), ("mbgEDTBGTTGP", 14), ("mbgAHS", 15), ("mbgDHS", 16), ("mbgNDT167", 17), ("mbgNDT167BGT", 18), ("mbgDCT", 19), ("mbgDCTBGT", 20), ("mbgSHSTCR", 21), ("mbgSHSTCRBGT", 22)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefClockTypeVal.setStatus('current') mbgLtRefClockMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefClockMode.setStatus('current') mbgLtRefClockModeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("notavailable", 0), ("normalOperation", 1), ("trackingSearching", 2), ("antennaFaulty", 3), ("warmBoot", 4), ("coldBoot", 5), ("antennaShortcircuit", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefClockModeVal.setStatus('current') mbgLtRefGpsState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsState.setStatus('current') mbgLtRefGpsStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("notavailable", 0), ("synchronized", 1), ("notsynchronized", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsStateVal.setStatus('current') mbgLtRefGpsPosition = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsPosition.setStatus('current') mbgLtRefGpsSatellites = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsSatellites.setStatus('current') mbgLtRefGpsSatellitesGood = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsSatellitesGood.setStatus('current') mbgLtRefGpsSatellitesInView = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsSatellitesInView.setStatus('current') mbgLtRefPzfState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 11), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefPzfState.setStatus('current') mbgLtRefPzfStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("notavailable", 0), ("sync", 1), ("notsyncnow", 2), ("neversynced", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefPzfStateVal.setStatus('current') mbgLtRefPzfKorrelation = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefPzfKorrelation.setStatus('current') mbgLtRefPzfField = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefPzfField.setStatus('current') mbgLtRefGpsMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 15), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsMode.setStatus('current') mbgLtRefGpsModeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("notavailable", 0), ("normalOperation", 1), ("trackingSearching", 2), ("antennaFaulty", 3), ("warmBoot", 4), ("coldBoot", 5), ("antennaShortcircuit", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsModeVal.setStatus('current') mbgLtRefIrigMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 17), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefIrigMode.setStatus('current') mbgLtRefIrigModeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("notavailable", 0), ("locked", 1), ("notlocked", 2), ("telegramError", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefIrigModeVal.setStatus('current') mbgLtRefPzfMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 19), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefPzfMode.setStatus('current') mbgLtRefPzfModeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("notavailable", 0), ("normalOperation", 1), ("antennaFaulty", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefPzfModeVal.setStatus('current') mbgLtRefIrigState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 21), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefIrigState.setStatus('current') mbgLtRefIrigStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefIrigStateVal.setStatus('current') mbgLtRefSHSMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 23), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefSHSMode.setStatus('current') mbgLtRefSHSModeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("notavailable", 0), ("normalOperation", 1), ("stoppedTimeLimitError", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefSHSModeVal.setStatus('current') mbgLtRefSHSTimeDiff = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefSHSTimeDiff.setStatus('current') mbgLtRefDctState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 26), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefDctState.setStatus('current') mbgLtRefDctStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("notavailable", 0), ("sync", 1), ("notsyncnow", 2), ("neversynced", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefDctStateVal.setStatus('current') mbgLtRefDctField = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 28), DisplayString().clone('0')).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefDctField.setStatus('current') mbgLtRefDctMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 29), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefDctMode.setStatus('current') mbgLtRefDctModeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("notavailable", 0), ("normalOperation", 1), ("antennaFaulty", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefDctModeVal.setStatus('current') mbgLtRefGpsLeapSecond = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 31), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsLeapSecond.setStatus('current') mbgLtRefGpsLeapCorrection = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 32), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefGpsLeapCorrection.setStatus('current') mbgLtMrs = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50)) mbgLtRefMrsRef = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefMrsRef.setStatus('current') mbgLtRefMrsRefVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 99))).clone(namedValues=NamedValues(("notavailable", 0), ("refGps", 1), ("refIrig", 2), ("refPps", 3), ("refFreq", 4), ("refPtp", 5), ("refNtp", 6), ("refFreeRun", 99)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefMrsRefVal.setStatus('current') mbgLtRefMrsRefList = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefMrsRefList.setStatus('current') mbgLtRefMrsPrioList = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtRefMrsPrioList.setStatus('current') mbgLtMrsRef = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10)) mbgLtMrsRefGps = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1)) mbgLtMrsGpsOffs = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsGpsOffs.setStatus('current') mbgLtMrsGpsOffsVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsGpsOffsVal.setStatus('current') mbgLtMrsGpsOffsBase = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 3, 6, 9))).clone(namedValues=NamedValues(("baseSeconds", 0), ("baseMiliseconds", 3), ("baseMicroseconds", 6), ("baseNanoseconds", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsGpsOffsBase.setStatus('current') mbgLtMrsGpsPrio = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsGpsPrio.setStatus('current') mbgLtMrsGpsState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsGpsState.setStatus('current') mbgLtMrsGpsStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("notAvailable", 0), ("notSupported", 1), ("notConnected", 2), ("noSignal", 3), ("hasLocked", 4), ("isAvailable", 5), ("isAccurate", 6), ("isMaster", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsGpsStateVal.setStatus('current') mbgLtMrsGpsPrecision = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsGpsPrecision.setStatus('current') mbgLtMrsRefIrig = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2)) mbgLtMrsIrigOffs = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsIrigOffs.setStatus('current') mbgLtMrsIrigOffsVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsIrigOffsVal.setStatus('current') mbgLtMrsIrigOffsBase = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 3, 6, 9))).clone(namedValues=NamedValues(("baseSeconds", 0), ("baseMiliseconds", 3), ("baseMicroseconds", 6), ("baseNanoseconds", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsIrigOffsBase.setStatus('current') mbgLtMrsIrigPrio = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsIrigPrio.setStatus('current') mbgLtMrsIrigState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsIrigState.setStatus('current') mbgLtMrsIrigStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("notAvailable", 0), ("notSupported", 1), ("notConnected", 2), ("noSignal", 3), ("hasLocked", 4), ("isAvailable", 5), ("isAccurate", 6), ("isMaster", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsIrigStateVal.setStatus('current') mbgLtMrsIrigCorr = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsIrigCorr.setStatus('current') mbgLtMrsIrigOffsLimit = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsIrigOffsLimit.setStatus('current') mbgLtMrsIrigPrecision = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 2, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsIrigPrecision.setStatus('current') mbgLtMrsRefPps = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3)) mbgLtMrsPpsOffs = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPpsOffs.setStatus('current') mbgLtMrsPpsOffsVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPpsOffsVal.setStatus('current') mbgLtMrsPpsOffsBase = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 3, 6, 9))).clone(namedValues=NamedValues(("baseSeconds", 0), ("baseMiliseconds", 3), ("baseMicroseconds", 6), ("baseNanoseconds", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPpsOffsBase.setStatus('current') mbgLtMrsPpsPrio = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPpsPrio.setStatus('current') mbgLtMrsPpsState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPpsState.setStatus('current') mbgLtMrsPpsStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("notAvailable", 0), ("notSupported", 1), ("notConnected", 2), ("noSignal", 3), ("hasLocked", 4), ("isAvailable", 5), ("isAccurate", 6), ("isMaster", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPpsStateVal.setStatus('current') mbgLtMrsPpsCorr = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsPpsCorr.setStatus('current') mbgLtMrsPpsOffsLimit = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsPpsOffsLimit.setStatus('current') mbgLtMrsPpsPrecision = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 3, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsPpsPrecision.setStatus('current') mbgLtMrsRefFreq = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4)) mbgLtMrsFreqOffs = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsFreqOffs.setStatus('current') mbgLtMrsFreqOffsVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsFreqOffsVal.setStatus('current') mbgLtMrsFreqOffsBase = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 3, 6, 9))).clone(namedValues=NamedValues(("baseSeconds", 0), ("baseMiliseconds", 3), ("baseMicroseconds", 6), ("baseNanoseconds", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsFreqOffsBase.setStatus('current') mbgLtMrsFreqPrio = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsFreqPrio.setStatus('current') mbgLtMrsFreqState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsFreqState.setStatus('current') mbgLtMrsFreqStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("notAvailable", 0), ("notSupported", 1), ("notConnected", 2), ("noSignal", 3), ("hasLocked", 4), ("isAvailable", 5), ("isAccurate", 6), ("isMaster", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsFreqStateVal.setStatus('current') mbgLtMrsFreqCorr = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsFreqCorr.setStatus('current') mbgLtMrsFreqOffsLimit = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsFreqOffsLimit.setStatus('current') mbgLtMrsFreqPrecision = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 4, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsFreqPrecision.setStatus('current') mbgLtMrsRefPtp = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5)) mbgLtMrsPtpOffs = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPtpOffs.setStatus('current') mbgLtMrsPtpOffsVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPtpOffsVal.setStatus('current') mbgLtMrsPtpOffsBase = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 3, 6, 9))).clone(namedValues=NamedValues(("baseSeconds", 0), ("baseMiliseconds", 3), ("baseMicroseconds", 6), ("baseNanoseconds", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPtpOffsBase.setStatus('current') mbgLtMrsPtpPrio = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPtpPrio.setStatus('current') mbgLtMrsPtpState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPtpState.setStatus('current') mbgLtMrsPtpStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("notAvailable", 0), ("notSupported", 1), ("notConnected", 2), ("noSignal", 3), ("hasLocked", 4), ("isAvailable", 5), ("isAccurate", 6), ("isMaster", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsPtpStateVal.setStatus('current') mbgLtMrsPtpCorr = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsPtpCorr.setStatus('current') mbgLtMrsPtpOffsLimit = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsPtpOffsLimit.setStatus('current') mbgLtMrsPtpPrecision = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 5, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsPtpPrecision.setStatus('current') mbgLtMrsRefNtp = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6)) mbgLtMrsNtpOffs = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsNtpOffs.setStatus('current') mbgLtMrsNtpOffsVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsNtpOffsVal.setStatus('current') mbgLtMrsNtpOffsBase = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 3, 6, 9))).clone(namedValues=NamedValues(("baseSeconds", 0), ("baseMiliseconds", 3), ("baseMicroseconds", 6), ("baseNanoseconds", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsNtpOffsBase.setStatus('current') mbgLtMrsNtpPrio = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsNtpPrio.setStatus('current') mbgLtMrsNtpState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsNtpState.setStatus('current') mbgLtMrsNtpStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("notAvailable", 0), ("notSupported", 1), ("notConnected", 2), ("noSignal", 3), ("hasLocked", 4), ("isAvailable", 5), ("isAccurate", 6), ("isMaster", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtMrsNtpStateVal.setStatus('current') mbgLtMrsNtpCorr = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsNtpCorr.setStatus('current') mbgLtMrsNtpOffsLimit = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsNtpOffsLimit.setStatus('current') mbgLtMrsNtpPrecision = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 2, 50, 10, 6, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtMrsNtpPrecision.setStatus('current') mbgLtNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 3)) mbgLtTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0)) mbgLtTrapNTPNotSync = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 1)) if mibBuilder.loadTexts: mbgLtTrapNTPNotSync.setStatus('current') mbgLtTrapNTPStopped = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 2)) if mibBuilder.loadTexts: mbgLtTrapNTPStopped.setStatus('current') mbgLtTrapServerBoot = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 3)) if mibBuilder.loadTexts: mbgLtTrapServerBoot.setStatus('current') mbgLtTrapReceiverNotResponding = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 4)) if mibBuilder.loadTexts: mbgLtTrapReceiverNotResponding.setStatus('current') mbgLtTrapReceiverNotSync = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 5)) if mibBuilder.loadTexts: mbgLtTrapReceiverNotSync.setStatus('current') mbgLtTrapAntennaFaulty = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 6)) if mibBuilder.loadTexts: mbgLtTrapAntennaFaulty.setStatus('current') mbgLtTrapAntennaReconnect = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 7)) if mibBuilder.loadTexts: mbgLtTrapAntennaReconnect.setStatus('current') mbgLtTrapConfigChanged = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 8)) if mibBuilder.loadTexts: mbgLtTrapConfigChanged.setStatus('current') mbgLtTrapLeapSecondAnnounced = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 9)) if mibBuilder.loadTexts: mbgLtTrapLeapSecondAnnounced.setStatus('current') mbgLtTrapSHSTimeLimitError = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 10)) if mibBuilder.loadTexts: mbgLtTrapSHSTimeLimitError.setStatus('current') mbgLtTrapSecondaryRecNotSync = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 11)) if mibBuilder.loadTexts: mbgLtTrapSecondaryRecNotSync.setStatus('current') mbgLtTrapPowerSupplyFailure = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 12)) if mibBuilder.loadTexts: mbgLtTrapPowerSupplyFailure.setStatus('current') mbgLtTrapAntennaShortCircuit = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 13)) if mibBuilder.loadTexts: mbgLtTrapAntennaShortCircuit.setStatus('current') mbgLtTrapReceiverSync = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 14)) if mibBuilder.loadTexts: mbgLtTrapReceiverSync.setStatus('current') mbgLtTrapNTPClientAlarm = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 15)) if mibBuilder.loadTexts: mbgLtTrapNTPClientAlarm.setStatus('current') mbgLtTrapPowerSupplyUp = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 16)) if mibBuilder.loadTexts: mbgLtTrapPowerSupplyUp.setStatus('current') mbgLtTrapNetworkDown = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 17)) if mibBuilder.loadTexts: mbgLtTrapNetworkDown.setStatus('current') mbgLtTrapNetworkUp = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 18)) if mibBuilder.loadTexts: mbgLtTrapNetworkUp.setStatus('current') mbgLtTrapSecondaryRecNotResp = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 19)) if mibBuilder.loadTexts: mbgLtTrapSecondaryRecNotResp.setStatus('current') mbgLtTrapXmrLimitExceeded = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 30)) if mibBuilder.loadTexts: mbgLtTrapXmrLimitExceeded.setStatus('current') mbgLtTrapXmrRefDisconnect = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 31)) if mibBuilder.loadTexts: mbgLtTrapXmrRefDisconnect.setStatus('current') mbgLtTrapXmrRefReconnect = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 32)) if mibBuilder.loadTexts: mbgLtTrapXmrRefReconnect.setStatus('current') mbgLtTrapFdmError = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 33)) if mibBuilder.loadTexts: mbgLtTrapFdmError.setStatus('current') mbgLtTrapSHSTimeLimitWarning = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 34)) if mibBuilder.loadTexts: mbgLtTrapSHSTimeLimitWarning.setStatus('current') mbgLtTrapSecondaryRecSync = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 35)) if mibBuilder.loadTexts: mbgLtTrapSecondaryRecSync.setStatus('current') mbgLtTrapNTPSync = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 36)) if mibBuilder.loadTexts: mbgLtTrapNTPSync.setStatus('current') mbgLtTrapPtpPortDisconnected = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 37)) if mibBuilder.loadTexts: mbgLtTrapPtpPortDisconnected.setStatus('current') mbgLtTrapPtpPortConnected = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 38)) if mibBuilder.loadTexts: mbgLtTrapPtpPortConnected.setStatus('current') mbgLtTrapPtpStateChanged = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 39)) if mibBuilder.loadTexts: mbgLtTrapPtpStateChanged.setStatus('current') mbgLtTrapPtpError = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 40)) if mibBuilder.loadTexts: mbgLtTrapPtpError.setStatus('current') mbgLtTrapNormalOperation = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 77)) if mibBuilder.loadTexts: mbgLtTrapNormalOperation.setStatus('current') mbgLtTrapHeartbeat = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 88)) if mibBuilder.loadTexts: mbgLtTrapHeartbeat.setStatus('current') mbgLtTrapTestNotification = NotificationType((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 99)) if mibBuilder.loadTexts: mbgLtTrapTestNotification.setStatus('current') mbgLtTrapMessage = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 3, 0, 100), DisplayString().clone('no event')).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtTrapMessage.setStatus('current') mbgLtCfg = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4)) mbgLtCfgNetwork = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1)) mbgLtCfgHostname = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgHostname.setStatus('current') mbgLtCfgDomainname = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgDomainname.setStatus('current') mbgLtCfgNameserver1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNameserver1.setStatus('current') mbgLtCfgNameserver2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNameserver2.setStatus('current') mbgLtCfgSyslogserver1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSyslogserver1.setStatus('current') mbgLtCfgSyslogserver2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSyslogserver2.setStatus('current') mbgLtCfgTelnetAccess = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgTelnetAccess.setStatus('current') mbgLtCfgFTPAccess = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgFTPAccess.setStatus('current') mbgLtCfgHTTPAccess = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgHTTPAccess.setStatus('current') mbgLtCfgHTTPSAccess = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgHTTPSAccess.setStatus('current') mbgLtCfgSNMPAccess = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPAccess.setStatus('current') mbgLtCfgSambaAccess = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSambaAccess.setStatus('current') mbgLtCfgIPv6Access = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgIPv6Access.setStatus('current') mbgLtCfgSSHAccess = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSSHAccess.setStatus('current') mbgLtCfgNTP = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2)) mbgLtCfgNTPServer1 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 1)) mbgLtCfgNTPServer2 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 2)) mbgLtCfgNTPServer3 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 3)) mbgLtCfgNTPServer4 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 4)) mbgLtCfgNTPServer5 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 5)) mbgLtCfgNTPServer6 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 6)) mbgLtCfgNTPServer7 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 7)) mbgLtCfgNTPServer1IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 1, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer1IP.setStatus('current') mbgLtCfgNTPServer1Key = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer1Key.setStatus('current') mbgLtCfgNTPServer1Autokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer1Autokey.setStatus('current') mbgLtCfgNTPServer1Prefer = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer1Prefer.setStatus('current') mbgLtCfgNTPServer2IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 2, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer2IP.setStatus('current') mbgLtCfgNTPServer2Key = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer2Key.setStatus('current') mbgLtCfgNTPServer2Autokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer2Autokey.setStatus('current') mbgLtCfgNTPServer2Prefer = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer2Prefer.setStatus('current') mbgLtCfgNTPServer3IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 3, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer3IP.setStatus('current') mbgLtCfgNTPServer3Key = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 3, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer3Key.setStatus('current') mbgLtCfgNTPServer3Autokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer3Autokey.setStatus('current') mbgLtCfgNTPServer3Prefer = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer3Prefer.setStatus('current') mbgLtCfgNTPServer4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 4, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer4IP.setStatus('current') mbgLtCfgNTPServer4Key = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 4, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer4Key.setStatus('current') mbgLtCfgNTPServer4Autokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 4, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer4Autokey.setStatus('current') mbgLtCfgNTPServer4Prefer = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 4, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer4Prefer.setStatus('current') mbgLtCfgNTPServer5IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 5, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer5IP.setStatus('current') mbgLtCfgNTPServer5Key = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 5, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer5Key.setStatus('current') mbgLtCfgNTPServer5Autokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 5, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer5Autokey.setStatus('current') mbgLtCfgNTPServer5Prefer = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 5, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer5Prefer.setStatus('current') mbgLtCfgNTPServer6IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 6, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer6IP.setStatus('current') mbgLtCfgNTPServer6Key = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 6, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer6Key.setStatus('current') mbgLtCfgNTPServer6Autokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 6, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer6Autokey.setStatus('current') mbgLtCfgNTPServer6Prefer = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 6, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer6Prefer.setStatus('current') mbgLtCfgNTPServer7IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 7, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer7IP.setStatus('current') mbgLtCfgNTPServer7Key = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 7, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer7Key.setStatus('current') mbgLtCfgNTPServer7Autokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 7, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer7Autokey.setStatus('current') mbgLtCfgNTPServer7Prefer = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 7, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPServer7Prefer.setStatus('current') mbgLtCfgNTPStratumLocalClock = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPStratumLocalClock.setStatus('current') mbgLtCfgNTPTrustedKey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPTrustedKey.setStatus('current') mbgLtCfgNTPBroadcastIP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 10), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPBroadcastIP.setStatus('current') mbgLtCfgNTPBroadcastKey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPBroadcastKey.setStatus('current') mbgLtCfgNTPBroadcastAutokey = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPBroadcastAutokey.setStatus('current') mbgLtCfgNTPAutokeyFeature = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPAutokeyFeature.setStatus('current') mbgLtCfgNTPAtomPPS = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 2, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNTPAtomPPS.setStatus('current') mbgLtCfgEMail = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 3)) mbgLtCfgEMailTo = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 3, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEMailTo.setStatus('current') mbgLtCfgEMailFrom = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 3, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEMailFrom.setStatus('current') mbgLtCfgEMailSmarthost = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 3, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEMailSmarthost.setStatus('current') mbgLtCfgSNMP = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4)) mbgLtCfgSNMPTrapReceiver1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPTrapReceiver1.setStatus('current') mbgLtCfgSNMPTrapReceiver2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPTrapReceiver2.setStatus('current') mbgLtCfgSNMPTrapRec1Community = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPTrapRec1Community.setStatus('current') mbgLtCfgSNMPTrapRec2Community = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPTrapRec2Community.setStatus('current') mbgLtCfgSNMPReadOnlyCommunity = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPReadOnlyCommunity.setStatus('current') mbgLtCfgSNMPReadWriteCommunity = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPReadWriteCommunity.setStatus('current') mbgLtCfgSNMPContact = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPContact.setStatus('current') mbgLtCfgSNMPLocation = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 4, 8), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSNMPLocation.setStatus('current') mbgLtCfgWinpopup = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 5)) mbgLtCfgWMailAddress1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 5, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgWMailAddress1.setStatus('current') mbgLtCfgWMailAddress2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 5, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgWMailAddress2.setStatus('current') mbgLtCfgWalldisplay = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 6)) mbgLtCfgVP100Display1IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 6, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgVP100Display1IP.setStatus('current') mbgLtCfgVP100Display1SN = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 6, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgVP100Display1SN.setStatus('current') mbgLtCfgVP100Display2IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 6, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgVP100Display2IP.setStatus('current') mbgLtCfgVP100Display2SN = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 6, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgVP100Display2SN.setStatus('current') mbgLtCfgNotify = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7)) mbgLtCfgNotifyNTPNotSync = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyNTPNotSync.setStatus('current') mbgLtCfgNotifyNTPStopped = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyNTPStopped.setStatus('current') mbgLtCfgNotifyServerBoot = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyServerBoot.setStatus('current') mbgLtCfgNotifyRefclkNoResponse = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyRefclkNoResponse.setStatus('current') mbgLtCfgNotifyRefclockNotSync = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyRefclockNotSync.setStatus('current') mbgLtCfgNotifyAntennaFaulty = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyAntennaFaulty.setStatus('current') mbgLtCfgNotifyAntennaReconnect = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyAntennaReconnect.setStatus('current') mbgLtCfgNotifyConfigChanged = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 8), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyConfigChanged.setStatus('current') mbgLtCfgNotifySHSTimeLimitError = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 9), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifySHSTimeLimitError.setStatus('current') mbgLtCfgNotifyLeapSecond = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 7, 10), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgNotifyLeapSecond.setStatus('current') mbgLtCfgEthernet = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8)) mbgLtCfgEthernetIf0 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0)) mbgLtCfgEthernetIf1 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1)) mbgLtCfgEthernetIf2 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2)) mbgLtCfgEthernetIf3 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3)) mbgLtCfgEthernetIf4 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4)) mbgLtCfgEthernetIf5 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5)) mbgLtCfgEthernetIf6 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6)) mbgLtCfgEthernetIf7 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7)) mbgLtCfgEthernetIf8 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8)) mbgLtCfgEthernetIf9 = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9)) mbgLtCfgEthernetIf0IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0IPv4IP.setStatus('current') mbgLtCfgEthernetIf0IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf0IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf0DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0DHCPClient.setStatus('current') mbgLtCfgEthernetIf0IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0IPv6IP1.setStatus('current') mbgLtCfgEthernetIf0IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0IPv6IP2.setStatus('current') mbgLtCfgEthernetIf0IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0IPv6IP3.setStatus('current') mbgLtCfgEthernetIf0IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf0NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 0, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf0NetLinkMode.setStatus('current') mbgLtCfgEthernetIf1IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1IPv4IP.setStatus('current') mbgLtCfgEthernetIf1IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf1IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf1DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1DHCPClient.setStatus('current') mbgLtCfgEthernetIf1IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1IPv6IP1.setStatus('current') mbgLtCfgEthernetIf1IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1IPv6IP2.setStatus('current') mbgLtCfgEthernetIf1IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1IPv6IP3.setStatus('current') mbgLtCfgEthernetIf1IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf1NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf1NetLinkMode.setStatus('current') mbgLtCfgEthernetIf2IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2IPv4IP.setStatus('current') mbgLtCfgEthernetIf2IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf2IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf2DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2DHCPClient.setStatus('current') mbgLtCfgEthernetIf2IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2IPv6IP1.setStatus('current') mbgLtCfgEthernetIf2IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2IPv6IP2.setStatus('current') mbgLtCfgEthernetIf2IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2IPv6IP3.setStatus('current') mbgLtCfgEthernetIf2IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf2NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 2, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf2NetLinkMode.setStatus('current') mbgLtCfgEthernetIf3IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3IPv4IP.setStatus('current') mbgLtCfgEthernetIf3IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf3IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf3DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3DHCPClient.setStatus('current') mbgLtCfgEthernetIf3IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3IPv6IP1.setStatus('current') mbgLtCfgEthernetIf3IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3IPv6IP2.setStatus('current') mbgLtCfgEthernetIf3IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3IPv6IP3.setStatus('current') mbgLtCfgEthernetIf3IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf3NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 3, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf3NetLinkMode.setStatus('current') mbgLtCfgEthernetIf4IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4IPv4IP.setStatus('current') mbgLtCfgEthernetIf4IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf4IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf4DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4DHCPClient.setStatus('current') mbgLtCfgEthernetIf4IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4IPv6IP1.setStatus('current') mbgLtCfgEthernetIf4IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4IPv6IP2.setStatus('current') mbgLtCfgEthernetIf4IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4IPv6IP3.setStatus('current') mbgLtCfgEthernetIf4IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf4NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 4, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf4NetLinkMode.setStatus('current') mbgLtCfgEthernetIf5IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5IPv4IP.setStatus('current') mbgLtCfgEthernetIf5IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf5IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf5DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5DHCPClient.setStatus('current') mbgLtCfgEthernetIf5IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5IPv6IP1.setStatus('current') mbgLtCfgEthernetIf5IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5IPv6IP2.setStatus('current') mbgLtCfgEthernetIf5IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5IPv6IP3.setStatus('current') mbgLtCfgEthernetIf5IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf5NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 5, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf5NetLinkMode.setStatus('current') mbgLtCfgEthernetIf6IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6IPv4IP.setStatus('current') mbgLtCfgEthernetIf6IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf6IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf6DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6DHCPClient.setStatus('current') mbgLtCfgEthernetIf6IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6IPv6IP1.setStatus('current') mbgLtCfgEthernetIf6IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6IPv6IP2.setStatus('current') mbgLtCfgEthernetIf6IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6IPv6IP3.setStatus('current') mbgLtCfgEthernetIf6IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf6NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 6, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf6NetLinkMode.setStatus('current') mbgLtCfgEthernetIf7IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7IPv4IP.setStatus('current') mbgLtCfgEthernetIf7IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf7IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf7DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7DHCPClient.setStatus('current') mbgLtCfgEthernetIf7IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7IPv6IP1.setStatus('current') mbgLtCfgEthernetIf7IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7IPv6IP2.setStatus('current') mbgLtCfgEthernetIf7IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7IPv6IP3.setStatus('current') mbgLtCfgEthernetIf7IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf7NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 7, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf7NetLinkMode.setStatus('current') mbgLtCfgEthernetIf8IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8IPv4IP.setStatus('current') mbgLtCfgEthernetIf8IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf8IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf8DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8DHCPClient.setStatus('current') mbgLtCfgEthernetIf8IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8IPv6IP1.setStatus('current') mbgLtCfgEthernetIf8IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8IPv6IP2.setStatus('current') mbgLtCfgEthernetIf8IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8IPv6IP3.setStatus('current') mbgLtCfgEthernetIf8IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf8NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 8, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf8NetLinkMode.setStatus('current') mbgLtCfgEthernetIf9IPv4IP = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9IPv4IP.setStatus('current') mbgLtCfgEthernetIf9IPv4Netmask = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9IPv4Netmask.setStatus('current') mbgLtCfgEthernetIf9IPv4Gateway = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9IPv4Gateway.setStatus('current') mbgLtCfgEthernetIf9DHCPClient = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9DHCPClient.setStatus('current') mbgLtCfgEthernetIf9IPv6IP1 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9IPv6IP1.setStatus('current') mbgLtCfgEthernetIf9IPv6IP2 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9IPv6IP2.setStatus('current') mbgLtCfgEthernetIf9IPv6IP3 = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9IPv6IP3.setStatus('current') mbgLtCfgEthernetIf9IPv6Autoconf = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9IPv6Autoconf.setStatus('current') mbgLtCfgEthernetIf9NetLinkMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 8, 9, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("autosensing", 0), ("link10half", 1), ("link10full", 2), ("link100half", 3), ("link100full", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgEthernetIf9NetLinkMode.setStatus('current') mbgLtCfgSHS = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 9)) mbgLtCfgSHSCritLimit = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 9, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSHSCritLimit.setStatus('current') mbgLtCfgSHSWarnLimit = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 9, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgSHSWarnLimit.setStatus('current') mbgLtCfgMRS = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 4, 10)) mbgLtCfgMRSRefPriority = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 4, 10, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCfgMRSRefPriority.setStatus('current') mbgLtCmd = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 5)) mbgLtCmdExecute = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 5, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("ready", 0), ("doReboot", 1), ("doFirmwareUpdate", 2), ("doReloadConfig", 3), ("doGenerateSSHKey", 4), ("doGenerateHTTPSKey", 5), ("doResetFactoryDefaults", 6), ("doGenerateNewNTPAutokeyCert", 7), ("doSendTestNotification", 8), ("doResetSHSTimeLimitError", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCmdExecute.setStatus('current') mbgLtCmdSetRefTime = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 5, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mbgLtCmdSetRefTime.setStatus('current') mbgLtPtp = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 10)) mbgLtPtpMode = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpMode.setStatus('current') mbgLtPtpModeVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("stopped", 0), ("master", 1), ("slave", 2), ("ordinary", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpModeVal.setStatus('current') mbgLtPtpPortState = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpPortState.setStatus('current') mbgLtPtpPortStateVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("uncalibrated", 0), ("initializing", 1), ("listening", 2), ("master", 3), ("slave", 4), ("unicastmaster", 5), ("unicastslave", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpPortStateVal.setStatus('current') mbgLtPtpOffsetFromGM = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpOffsetFromGM.setStatus('current') mbgLtPtpOffsetFromGMVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setUnits('ns').setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpOffsetFromGMVal.setStatus('current') mbgLtPtpDelay = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 7), DisplayString()).setUnits('ns').setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpDelay.setStatus('current') mbgLtPtpDelayVal = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 10, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setUnits('ns').setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtPtpDelayVal.setStatus('current') mbgLtFdm = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 11)) mbgLtFdmPlFreq = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 11, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtFdmPlFreq.setStatus('current') mbgLtFdmFreqDev = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 11, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtFdmFreqDev.setStatus('current') mbgLtFdmNomFreq = MibScalar((1, 3, 6, 1, 4, 1, 5597, 3, 11, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: mbgLtFdmNomFreq.setStatus('current') mbgLtConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 90)) mbgLtCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 90, 1)) mbgLtGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 5597, 3, 90, 2)) mbgLtCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 5597, 3, 90, 1, 1)).setObjects(("MBG-SNMP-LT-MIB", "mbgLtObjectsGroup"), ("MBG-SNMP-LT-MIB", "mbgLtTrapsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): mbgLtCompliance = mbgLtCompliance.setStatus('current') mbgLtObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5597, 3, 90, 2, 1)) for _mbgLtObjectsGroup_obj in [[("MBG-SNMP-LT-MIB", "mbgLtFirmwareVersion"), ("MBG-SNMP-LT-MIB", "mbgLtFirmwareVersionVal"), ("MBG-SNMP-LT-MIB", "mbgLtNtpCurrentState"), ("MBG-SNMP-LT-MIB", "mbgLtNtpCurrentStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtNtpStratum"), ("MBG-SNMP-LT-MIB", "mbgLtNtpActiveRefclockId"), ("MBG-SNMP-LT-MIB", "mbgLtNtpActiveRefclockName"), ("MBG-SNMP-LT-MIB", "mbgLtNtpActiveRefclockOffset"), ("MBG-SNMP-LT-MIB", "mbgLtNtpActiveRefclockOffsetVal"), ("MBG-SNMP-LT-MIB", "mbgLtNtpNumberOfRefclocks"), ("MBG-SNMP-LT-MIB", "mbgLtNtpAuthKeyId"), ("MBG-SNMP-LT-MIB", "mbgLtNtpVersion"), ("MBG-SNMP-LT-MIB", "mbgLtRefClockType"), ("MBG-SNMP-LT-MIB", "mbgLtRefClockTypeVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefClockMode"), ("MBG-SNMP-LT-MIB", "mbgLtRefClockModeVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsState"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsPosition"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsSatellites"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsSatellitesGood"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsSatellitesInView"), ("MBG-SNMP-LT-MIB", "mbgLtRefPzfState"), ("MBG-SNMP-LT-MIB", "mbgLtRefPzfStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefPzfKorrelation"), ("MBG-SNMP-LT-MIB", "mbgLtRefPzfField"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsMode"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsModeVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefIrigMode"), ("MBG-SNMP-LT-MIB", "mbgLtRefIrigModeVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefPzfMode"), ("MBG-SNMP-LT-MIB", "mbgLtRefPzfModeVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefIrigState"), ("MBG-SNMP-LT-MIB", "mbgLtRefIrigStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefSHSMode"), ("MBG-SNMP-LT-MIB", "mbgLtRefSHSModeVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefSHSTimeDiff"), ("MBG-SNMP-LT-MIB", "mbgLtRefDctState"), ("MBG-SNMP-LT-MIB", "mbgLtRefDctStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefDctField"), ("MBG-SNMP-LT-MIB", "mbgLtRefDctMode"), ("MBG-SNMP-LT-MIB", "mbgLtRefDctModeVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsLeapSecond"), ("MBG-SNMP-LT-MIB", "mbgLtRefGpsLeapCorrection"), ("MBG-SNMP-LT-MIB", "mbgLtRefMrsRef"), ("MBG-SNMP-LT-MIB", "mbgLtRefMrsRefVal"), ("MBG-SNMP-LT-MIB", "mbgLtRefMrsRefList"), ("MBG-SNMP-LT-MIB", "mbgLtRefMrsPrioList"), ("MBG-SNMP-LT-MIB", "mbgLtMrsGpsOffs"), ("MBG-SNMP-LT-MIB", "mbgLtMrsGpsOffsVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsGpsOffsBase"), ("MBG-SNMP-LT-MIB", "mbgLtMrsGpsPrio"), ("MBG-SNMP-LT-MIB", "mbgLtMrsGpsState"), ("MBG-SNMP-LT-MIB", "mbgLtMrsGpsStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsGpsPrecision"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigOffs"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigOffsVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigOffsBase"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigPrio"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigState"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigCorr"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigOffsLimit"), ("MBG-SNMP-LT-MIB", "mbgLtMrsIrigPrecision"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsOffs"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsOffsVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsOffsBase"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsPrio"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsState"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsCorr"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsOffsLimit"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPpsPrecision"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqOffs"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqOffsVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqOffsBase"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqPrio"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqState"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqCorr"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqOffsLimit"), ("MBG-SNMP-LT-MIB", "mbgLtMrsFreqPrecision"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpOffs"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpOffsVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpOffsBase"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpPrio"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpState"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpCorr"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpOffsLimit"), ("MBG-SNMP-LT-MIB", "mbgLtMrsPtpPrecision"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpOffs"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpOffsVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpOffsBase"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpPrio"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpState"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpCorr"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpOffsLimit"), ("MBG-SNMP-LT-MIB", "mbgLtMrsNtpPrecision"), ("MBG-SNMP-LT-MIB", "mbgLtTrapMessage"), ("MBG-SNMP-LT-MIB", "mbgLtCfgHostname"), ("MBG-SNMP-LT-MIB", "mbgLtCfgDomainname"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNameserver1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNameserver2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSyslogserver1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSyslogserver2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgTelnetAccess"), ("MBG-SNMP-LT-MIB", "mbgLtCfgFTPAccess"), ("MBG-SNMP-LT-MIB", "mbgLtCfgHTTPAccess"), ("MBG-SNMP-LT-MIB", "mbgLtCfgHTTPSAccess"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPAccess"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSambaAccess"), ("MBG-SNMP-LT-MIB", "mbgLtCfgIPv6Access"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSSHAccess"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer1IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer1Key"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer1Autokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer1Prefer"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer2IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer2Key"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer2Autokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer2Prefer"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer3IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer3Key"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer3Autokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer3Prefer"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer4Key"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer4Autokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer4Prefer"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer5IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer5Key"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer5Autokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer5Prefer"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer6IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer6Key"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer6Autokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer6Prefer"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer7IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer7Key"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer7Autokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPServer7Prefer"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPStratumLocalClock"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPTrustedKey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPBroadcastIP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPBroadcastKey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPBroadcastAutokey"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPAutokeyFeature"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNTPAtomPPS"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEMailTo"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEMailFrom"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEMailSmarthost"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPTrapReceiver1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPTrapReceiver2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPTrapRec1Community"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPTrapRec2Community"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPReadOnlyCommunity"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPReadWriteCommunity"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPContact"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSNMPLocation"), ("MBG-SNMP-LT-MIB", "mbgLtCfgWMailAddress1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgWMailAddress2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgVP100Display1IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgVP100Display1SN"), ("MBG-SNMP-LT-MIB", "mbgLtCfgVP100Display2IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgVP100Display2SN"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyNTPNotSync"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyNTPStopped"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyServerBoot"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyRefclkNoResponse"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyRefclockNotSync"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyAntennaFaulty"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyAntennaReconnect"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyConfigChanged"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifySHSTimeLimitError"), ("MBG-SNMP-LT-MIB", "mbgLtCfgNotifyLeapSecond"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf0NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf1NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf2NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf3NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf4NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf5NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf6NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf7NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8IPv6IP2")], [("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf8NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9IPv4IP"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9IPv4Netmask"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9IPv4Gateway"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9DHCPClient"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9IPv6IP1"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9IPv6IP2"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9IPv6IP3"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9IPv6Autoconf"), ("MBG-SNMP-LT-MIB", "mbgLtCfgEthernetIf9NetLinkMode"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSHSCritLimit"), ("MBG-SNMP-LT-MIB", "mbgLtCfgSHSWarnLimit"), ("MBG-SNMP-LT-MIB", "mbgLtCfgMRSRefPriority"), ("MBG-SNMP-LT-MIB", "mbgLtCmdExecute"), ("MBG-SNMP-LT-MIB", "mbgLtCmdSetRefTime"), ("MBG-SNMP-LT-MIB", "mbgLtFdmPlFreq"), ("MBG-SNMP-LT-MIB", "mbgLtFdmFreqDev"), ("MBG-SNMP-LT-MIB", "mbgLtFdmNomFreq"), ("MBG-SNMP-LT-MIB", "mbgLtPtpMode"), ("MBG-SNMP-LT-MIB", "mbgLtPtpModeVal"), ("MBG-SNMP-LT-MIB", "mbgLtPtpPortState"), ("MBG-SNMP-LT-MIB", "mbgLtPtpPortStateVal"), ("MBG-SNMP-LT-MIB", "mbgLtPtpOffsetFromGM"), ("MBG-SNMP-LT-MIB", "mbgLtPtpOffsetFromGMVal"), ("MBG-SNMP-LT-MIB", "mbgLtPtpDelay"), ("MBG-SNMP-LT-MIB", "mbgLtPtpDelayVal")]]: if getattr(mibBuilder, 'version', 0) < (4, 4, 2): # WARNING: leading objects get lost here! mbgLtObjectsGroup = mbgLtObjectsGroup.setObjects(*_mbgLtObjectsGroup_obj) else: mbgLtObjectsGroup = mbgLtObjectsGroup.setObjects(*_mbgLtObjectsGroup_obj, **dict(append=True)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): mbgLtObjectsGroup = mbgLtObjectsGroup.setStatus('current') mbgLtTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 5597, 3, 90, 2, 2)).setObjects(("MBG-SNMP-LT-MIB", "mbgLtTrapNTPNotSync"), ("MBG-SNMP-LT-MIB", "mbgLtTrapNTPStopped"), ("MBG-SNMP-LT-MIB", "mbgLtTrapServerBoot"), ("MBG-SNMP-LT-MIB", "mbgLtTrapReceiverNotResponding"), ("MBG-SNMP-LT-MIB", "mbgLtTrapReceiverNotSync"), ("MBG-SNMP-LT-MIB", "mbgLtTrapAntennaFaulty"), ("MBG-SNMP-LT-MIB", "mbgLtTrapAntennaReconnect"), ("MBG-SNMP-LT-MIB", "mbgLtTrapConfigChanged"), ("MBG-SNMP-LT-MIB", "mbgLtTrapLeapSecondAnnounced"), ("MBG-SNMP-LT-MIB", "mbgLtTrapSHSTimeLimitError"), ("MBG-SNMP-LT-MIB", "mbgLtTrapSecondaryRecNotSync"), ("MBG-SNMP-LT-MIB", "mbgLtTrapPowerSupplyFailure"), ("MBG-SNMP-LT-MIB", "mbgLtTrapAntennaShortCircuit"), ("MBG-SNMP-LT-MIB", "mbgLtTrapReceiverSync"), ("MBG-SNMP-LT-MIB", "mbgLtTrapNTPClientAlarm"), ("MBG-SNMP-LT-MIB", "mbgLtTrapPowerSupplyUp"), ("MBG-SNMP-LT-MIB", "mbgLtTrapNetworkDown"), ("MBG-SNMP-LT-MIB", "mbgLtTrapNetworkUp"), ("MBG-SNMP-LT-MIB", "mbgLtTrapSecondaryRecNotResp"), ("MBG-SNMP-LT-MIB", "mbgLtTrapXmrLimitExceeded"), ("MBG-SNMP-LT-MIB", "mbgLtTrapXmrRefDisconnect"), ("MBG-SNMP-LT-MIB", "mbgLtTrapXmrRefReconnect"), ("MBG-SNMP-LT-MIB", "mbgLtTrapFdmError"), ("MBG-SNMP-LT-MIB", "mbgLtTrapSHSTimeLimitWarning"), ("MBG-SNMP-LT-MIB", "mbgLtTrapSecondaryRecSync"), ("MBG-SNMP-LT-MIB", "mbgLtTrapNTPSync"), ("MBG-SNMP-LT-MIB", "mbgLtTrapNormalOperation"), ("MBG-SNMP-LT-MIB", "mbgLtTrapHeartbeat"), ("MBG-SNMP-LT-MIB", "mbgLtTrapTestNotification"), ("MBG-SNMP-LT-MIB", "mbgLtTrapPtpPortDisconnected"), ("MBG-SNMP-LT-MIB", "mbgLtTrapPtpPortConnected"), ("MBG-SNMP-LT-MIB", "mbgLtTrapPtpStateChanged"), ("MBG-SNMP-LT-MIB", "mbgLtTrapPtpError")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): mbgLtTrapsGroup = mbgLtTrapsGroup.setStatus('current') mibBuilder.exportSymbols("MBG-SNMP-LT-MIB", mbgLtNtpActiveRefclockOffset=mbgLtNtpActiveRefclockOffset, mbgLtRefGpsSatellitesGood=mbgLtRefGpsSatellitesGood, mbgLtMrsPtpStateVal=mbgLtMrsPtpStateVal, mbgLtCfgEthernetIf4=mbgLtCfgEthernetIf4, mbgLtCfgEthernetIf1=mbgLtCfgEthernetIf1, mbgLtPtpModeVal=mbgLtPtpModeVal, mbgLtCfgNTPServer7IP=mbgLtCfgNTPServer7IP, mbgLtCfgEthernetIf9IPv6IP3=mbgLtCfgEthernetIf9IPv6IP3, mbgLtTrapLeapSecondAnnounced=mbgLtTrapLeapSecondAnnounced, mbgLtRefSHSTimeDiff=mbgLtRefSHSTimeDiff, mbgLtTrapPowerSupplyUp=mbgLtTrapPowerSupplyUp, mbgLtCfgEthernetIf6IPv4Netmask=mbgLtCfgEthernetIf6IPv4Netmask, mbgLtCmdExecute=mbgLtCmdExecute, mbgLtMrsIrigOffsBase=mbgLtMrsIrigOffsBase, mbgLtMrsPpsPrio=mbgLtMrsPpsPrio, mbgLtCfgNotifyAntennaFaulty=mbgLtCfgNotifyAntennaFaulty, mbgLtMrs=mbgLtMrs, mbgLtCfgSNMPContact=mbgLtCfgSNMPContact, mbgLtCfgEthernetIf8DHCPClient=mbgLtCfgEthernetIf8DHCPClient, mbgLtCfgEthernetIf4NetLinkMode=mbgLtCfgEthernetIf4NetLinkMode, mbgLtTrapPtpPortConnected=mbgLtTrapPtpPortConnected, mbgLtTraps=mbgLtTraps, mbgLtCfgNTPServer6Key=mbgLtCfgNTPServer6Key, mbgLtRefIrigMode=mbgLtRefIrigMode, mbgLtCfgEthernetIf4IPv6IP1=mbgLtCfgEthernetIf4IPv6IP1, PYSNMP_MODULE_ID=mbgLantime, mbgLtMrsGpsOffsBase=mbgLtMrsGpsOffsBase, mbgLtCfgNTPServer4Prefer=mbgLtCfgNTPServer4Prefer, mbgLtRefPzfStateVal=mbgLtRefPzfStateVal, mbgLtCfgEthernetIf4IPv6Autoconf=mbgLtCfgEthernetIf4IPv6Autoconf, mbgLtTrapAntennaFaulty=mbgLtTrapAntennaFaulty, mbgLtCfgEthernetIf2IPv4Netmask=mbgLtCfgEthernetIf2IPv4Netmask, mbgLtMrsFreqPrecision=mbgLtMrsFreqPrecision, mbgLtCfgNTPServer5Key=mbgLtCfgNTPServer5Key, mbgLtCfgNotifyAntennaReconnect=mbgLtCfgNotifyAntennaReconnect, mbgLtCfgIPv6Access=mbgLtCfgIPv6Access, mbgLtCfgHTTPSAccess=mbgLtCfgHTTPSAccess, mbgLtCfgEthernetIf9IPv4Gateway=mbgLtCfgEthernetIf9IPv4Gateway, mbgLtCfgNTPServer1IP=mbgLtCfgNTPServer1IP, mbgLtRefclock=mbgLtRefclock, mbgLtCfgEthernetIf7=mbgLtCfgEthernetIf7, mbgLtCfgEthernetIf3IPv4IP=mbgLtCfgEthernetIf3IPv4IP, mbgLtTrapNormalOperation=mbgLtTrapNormalOperation, mbgLtCfgVP100Display1SN=mbgLtCfgVP100Display1SN, mbgLtCfgEthernetIf4IPv4Gateway=mbgLtCfgEthernetIf4IPv4Gateway, mbgLtCfgEthernetIf8=mbgLtCfgEthernetIf8, mbgLtCfgEthernetIf9NetLinkMode=mbgLtCfgEthernetIf9NetLinkMode, mbgLtMrsRefFreq=mbgLtMrsRefFreq, mbgLtMrsIrigOffs=mbgLtMrsIrigOffs, mbgLtTrapSecondaryRecNotResp=mbgLtTrapSecondaryRecNotResp, mbgLtCfgHTTPAccess=mbgLtCfgHTTPAccess, mbgLtMrsNtpCorr=mbgLtMrsNtpCorr, mbgLtCfgEthernetIf7IPv6IP3=mbgLtCfgEthernetIf7IPv6IP3, mbgLtCfgSNMPTrapReceiver2=mbgLtCfgSNMPTrapReceiver2, mbgLtCfgEthernetIf8NetLinkMode=mbgLtCfgEthernetIf8NetLinkMode, mbgLtRefGpsLeapCorrection=mbgLtRefGpsLeapCorrection, mbgLtMrsGpsPrecision=mbgLtMrsGpsPrecision, mbgLtCfgEthernetIf8IPv6IP1=mbgLtCfgEthernetIf8IPv6IP1, mbgLtRefGpsPosition=mbgLtRefGpsPosition, mbgLtMrsRefPtp=mbgLtMrsRefPtp, mbgLtCfgSSHAccess=mbgLtCfgSSHAccess, mbgLtCfgSNMP=mbgLtCfgSNMP, mbgLtRefSHSModeVal=mbgLtRefSHSModeVal, mbgLtCfgEthernetIf9IPv6Autoconf=mbgLtCfgEthernetIf9IPv6Autoconf, mbgLtCfgMRSRefPriority=mbgLtCfgMRSRefPriority, mbgLtCfgNTPServer2Prefer=mbgLtCfgNTPServer2Prefer, mbgLtCfgEthernetIf0=mbgLtCfgEthernetIf0, mbgLtMrsFreqStateVal=mbgLtMrsFreqStateVal, mbgLtTrapNTPClientAlarm=mbgLtTrapNTPClientAlarm, mbgLtTrapXmrRefDisconnect=mbgLtTrapXmrRefDisconnect, mbgLtCfgMRS=mbgLtCfgMRS, mbgLtCfgEthernetIf8IPv4Netmask=mbgLtCfgEthernetIf8IPv4Netmask, mbgLtRefDctStateVal=mbgLtRefDctStateVal, mbgLtCfgEthernetIf2NetLinkMode=mbgLtCfgEthernetIf2NetLinkMode, mbgLtRefDctModeVal=mbgLtRefDctModeVal, mbgLtTrapPowerSupplyFailure=mbgLtTrapPowerSupplyFailure, mbgLtTrapNetworkDown=mbgLtTrapNetworkDown, mbgLtTrapReceiverNotSync=mbgLtTrapReceiverNotSync, mbgLtCfgEthernetIf0NetLinkMode=mbgLtCfgEthernetIf0NetLinkMode, mbgLtTrapXmrLimitExceeded=mbgLtTrapXmrLimitExceeded, mbgLtRefMrsRef=mbgLtRefMrsRef, mbgLtNtpActiveRefclockId=mbgLtNtpActiveRefclockId, mbgLtCfgEthernetIf3IPv4Gateway=mbgLtCfgEthernetIf3IPv4Gateway, mbgLtCfgNotifyServerBoot=mbgLtCfgNotifyServerBoot, mbgLtCfgSNMPLocation=mbgLtCfgSNMPLocation, mbgLtRefGpsSatellitesInView=mbgLtRefGpsSatellitesInView, mbgLtCfgEthernetIf6IPv4Gateway=mbgLtCfgEthernetIf6IPv4Gateway, mbgLtCfgNTPServer4Key=mbgLtCfgNTPServer4Key, mbgLtCfgEthernetIf6NetLinkMode=mbgLtCfgEthernetIf6NetLinkMode, mbgLtCfgEMailSmarthost=mbgLtCfgEMailSmarthost, mbgLtPtp=mbgLtPtp, mbgLtCfgEthernetIf0IPv4Gateway=mbgLtCfgEthernetIf0IPv4Gateway, mbgLtCfgNTPServer7Autokey=mbgLtCfgNTPServer7Autokey, mbgLtCfgEthernetIf5IPv6Autoconf=mbgLtCfgEthernetIf5IPv6Autoconf, mbgLtCfgEMailTo=mbgLtCfgEMailTo, mbgLtMrsPtpOffs=mbgLtMrsPtpOffs, mbgLtCfgEthernetIf6IPv6IP3=mbgLtCfgEthernetIf6IPv6IP3, mbgLtRefGpsMode=mbgLtRefGpsMode, mbgLtCfgNTPBroadcastAutokey=mbgLtCfgNTPBroadcastAutokey, mbgLtRefIrigState=mbgLtRefIrigState, mbgLtCfgNTPServer4=mbgLtCfgNTPServer4, mbgLtCfgEthernetIf8IPv6Autoconf=mbgLtCfgEthernetIf8IPv6Autoconf, mbgLtCfgSHSWarnLimit=mbgLtCfgSHSWarnLimit, mbgLtRefSHSMode=mbgLtRefSHSMode, mbgLtNtp=mbgLtNtp, mbgLtCfgEthernetIf7IPv6Autoconf=mbgLtCfgEthernetIf7IPv6Autoconf, mbgLtCfgSambaAccess=mbgLtCfgSambaAccess, mbgLtMrsPpsOffs=mbgLtMrsPpsOffs, mbgLtMrsNtpStateVal=mbgLtMrsNtpStateVal, mbgLtCfgSHS=mbgLtCfgSHS, mbgLtCfgEthernet=mbgLtCfgEthernet, mbgLtCfgEthernetIf9DHCPClient=mbgLtCfgEthernetIf9DHCPClient, mbgLtRefIrigStateVal=mbgLtRefIrigStateVal, mbgLtFdm=mbgLtFdm, mbgLtMrsIrigOffsLimit=mbgLtMrsIrigOffsLimit, mbgLtCfgNTPAutokeyFeature=mbgLtCfgNTPAutokeyFeature, mbgLtMrsFreqOffsBase=mbgLtMrsFreqOffsBase, mbgLtCfgEthernetIf2IPv4Gateway=mbgLtCfgEthernetIf2IPv4Gateway, mbgLtMrsGpsPrio=mbgLtMrsGpsPrio, mbgLtCfgEthernetIf3IPv6IP3=mbgLtCfgEthernetIf3IPv6IP3, mbgLtCfgNetwork=mbgLtCfgNetwork, mbgLtTrapsGroup=mbgLtTrapsGroup, mbgLtRefClockTypeVal=mbgLtRefClockTypeVal, mbgLtFirmwareVersion=mbgLtFirmwareVersion, mbgLtRefGpsState=mbgLtRefGpsState, mbgLtCfgEMailFrom=mbgLtCfgEMailFrom, mbgLtRefMrsRefVal=mbgLtRefMrsRefVal, mbgLtCfgNTPServer6Autokey=mbgLtCfgNTPServer6Autokey, mbgLtMrsRef=mbgLtMrsRef, mbgLtNtpCurrentState=mbgLtNtpCurrentState, mbgLtFirmwareVersionVal=mbgLtFirmwareVersionVal, mbgLtCfgEthernetIf2IPv6IP3=mbgLtCfgEthernetIf2IPv6IP3, mbgLtCfgNotifyRefclkNoResponse=mbgLtCfgNotifyRefclkNoResponse, mbgLtCfgNameserver2=mbgLtCfgNameserver2, mbgLtCfgNotifySHSTimeLimitError=mbgLtCfgNotifySHSTimeLimitError, mbgLtCfgEthernetIf9IPv6IP1=mbgLtCfgEthernetIf9IPv6IP1, mbgLtCfgHostname=mbgLtCfgHostname, mbgLtTrapFdmError=mbgLtTrapFdmError, mbgLtCfgNTPStratumLocalClock=mbgLtCfgNTPStratumLocalClock, mbgLtCfgNTPServer1Prefer=mbgLtCfgNTPServer1Prefer, mbgLtCfgSNMPTrapRec2Community=mbgLtCfgSNMPTrapRec2Community, mbgLtCfgNTPServer3Key=mbgLtCfgNTPServer3Key, mbgLtCompliance=mbgLtCompliance, mbgLtCfgEthernetIf1IPv4Netmask=mbgLtCfgEthernetIf1IPv4Netmask, mbgLtCfgEthernetIf2IPv4IP=mbgLtCfgEthernetIf2IPv4IP, mbgLtMrsPtpOffsVal=mbgLtMrsPtpOffsVal, mbgLtCfgSNMPTrapReceiver1=mbgLtCfgSNMPTrapReceiver1, mbgLtCompliances=mbgLtCompliances, mbgLtCfgEthernetIf7IPv6IP1=mbgLtCfgEthernetIf7IPv6IP1, mbgLtCfgNTPBroadcastKey=mbgLtCfgNTPBroadcastKey, mbgLtTrapSHSTimeLimitWarning=mbgLtTrapSHSTimeLimitWarning, mbgLtCfgEthernetIf8IPv4IP=mbgLtCfgEthernetIf8IPv4IP, mbgLtCfgNotifyLeapSecond=mbgLtCfgNotifyLeapSecond, mbgLtCfg=mbgLtCfg, mbgLtMrsPpsCorr=mbgLtMrsPpsCorr, mbgLtCfgNTP=mbgLtCfgNTP, mbgLtCfgEthernetIf1IPv4Gateway=mbgLtCfgEthernetIf1IPv4Gateway, mbgLtRefIrigModeVal=mbgLtRefIrigModeVal, mbgLtCfgSNMPAccess=mbgLtCfgSNMPAccess, mbgLtTrapPtpError=mbgLtTrapPtpError, mbgLtCfgNTPServer3Prefer=mbgLtCfgNTPServer3Prefer, mbgLtTrapNTPNotSync=mbgLtTrapNTPNotSync, mbgLtCfgEthernetIf5IPv6IP3=mbgLtCfgEthernetIf5IPv6IP3, mbgLtPtpOffsetFromGMVal=mbgLtPtpOffsetFromGMVal, mbgLtCfgEthernetIf5IPv6IP2=mbgLtCfgEthernetIf5IPv6IP2, mbgLtCfgEthernetIf7IPv4Netmask=mbgLtCfgEthernetIf7IPv4Netmask, mbgLtMrsPtpOffsBase=mbgLtMrsPtpOffsBase, mbgLtRefGpsLeapSecond=mbgLtRefGpsLeapSecond, mbgLtMrsPtpCorr=mbgLtMrsPtpCorr, mbgLtTrapTestNotification=mbgLtTrapTestNotification, mbgLtCfgDomainname=mbgLtCfgDomainname, mbgLtCfgEthernetIf7NetLinkMode=mbgLtCfgEthernetIf7NetLinkMode, mbgLtCfgNTPServer1Autokey=mbgLtCfgNTPServer1Autokey, mbgLtCfgEthernetIf5NetLinkMode=mbgLtCfgEthernetIf5NetLinkMode, mbgLtMrsRefNtp=mbgLtMrsRefNtp, mbgLtCfgNTPServer2IP=mbgLtCfgNTPServer2IP, mbgLtRefPzfModeVal=mbgLtRefPzfModeVal, mbgLtFdmPlFreq=mbgLtFdmPlFreq, mbgLtRefClockType=mbgLtRefClockType, mbgLtCfgNTPServer3Autokey=mbgLtCfgNTPServer3Autokey, mbgLtCfgEthernetIf4IPv4Netmask=mbgLtCfgEthernetIf4IPv4Netmask, mbgLtCfgEthernetIf2=mbgLtCfgEthernetIf2, mbgLtMrsNtpPrecision=mbgLtMrsNtpPrecision, mbgLtMrsGpsState=mbgLtMrsGpsState, mbgLtRefPzfKorrelation=mbgLtRefPzfKorrelation, mbgLtCfgEthernetIf8IPv4Gateway=mbgLtCfgEthernetIf8IPv4Gateway, mbgLtTrapSecondaryRecNotSync=mbgLtTrapSecondaryRecNotSync, mbgLtCfgEthernetIf1IPv6IP2=mbgLtCfgEthernetIf1IPv6IP2, mbgLtCfgSNMPReadWriteCommunity=mbgLtCfgSNMPReadWriteCommunity, mbgLtCfgEthernetIf9=mbgLtCfgEthernetIf9, mbgLtTrapAntennaReconnect=mbgLtTrapAntennaReconnect, mbgLantime=mbgLantime, mbgLtCfgEthernetIf7IPv6IP2=mbgLtCfgEthernetIf7IPv6IP2, mbgLtCfgNotify=mbgLtCfgNotify, mbgLtNtpVersion=mbgLtNtpVersion, mbgLtCfgNTPServer6IP=mbgLtCfgNTPServer6IP, mbgLtCfgEthernetIf2IPv6IP2=mbgLtCfgEthernetIf2IPv6IP2, mbgLtRefDctField=mbgLtRefDctField, mbgLtCfgNTPServer7Prefer=mbgLtCfgNTPServer7Prefer, mbgLtTrapReceiverSync=mbgLtTrapReceiverSync, mbgLtCfgNTPTrustedKey=mbgLtCfgNTPTrustedKey, mbgLtCfgEthernetIf7IPv4IP=mbgLtCfgEthernetIf7IPv4IP, mbgLtTrapMessage=mbgLtTrapMessage, mbgLtMrsPpsPrecision=mbgLtMrsPpsPrecision, mbgLtCfgNTPServer5=mbgLtCfgNTPServer5, mbgLtMrsRefPps=mbgLtMrsRefPps, mbgLtFdmFreqDev=mbgLtFdmFreqDev, mbgLtCfgNTPServer7Key=mbgLtCfgNTPServer7Key, mbgLtCfgNTPServer2=mbgLtCfgNTPServer2, mbgLtMrsNtpOffsBase=mbgLtMrsNtpOffsBase, mbgLtCfgEthernetIf0IPv6IP1=mbgLtCfgEthernetIf0IPv6IP1, mbgLtCfgSyslogserver2=mbgLtCfgSyslogserver2, mbgLtTrapNetworkUp=mbgLtTrapNetworkUp, mbgLtCfgWMailAddress2=mbgLtCfgWMailAddress2, mbgLtCfgWinpopup=mbgLtCfgWinpopup, mbgLtMrsFreqOffsLimit=mbgLtMrsFreqOffsLimit, mbgLtCfgNTPServer6Prefer=mbgLtCfgNTPServer6Prefer, mbgLtCfgEthernetIf5IPv4IP=mbgLtCfgEthernetIf5IPv4IP, mbgLtMrsIrigOffsVal=mbgLtMrsIrigOffsVal, mbgLtCfgNTPServer2Autokey=mbgLtCfgNTPServer2Autokey, mbgLtMrsNtpPrio=mbgLtMrsNtpPrio, mbgLtRefGpsModeVal=mbgLtRefGpsModeVal, mbgLtNtpCurrentStateVal=mbgLtNtpCurrentStateVal, mbgLtRefMrsPrioList=mbgLtRefMrsPrioList, mbgLtMrsFreqState=mbgLtMrsFreqState, mbgLtTrapXmrRefReconnect=mbgLtTrapXmrRefReconnect, mbgLtCfgNTPServer4IP=mbgLtCfgNTPServer4IP, mbgLtTrapNTPStopped=mbgLtTrapNTPStopped, mbgLtMrsPpsOffsVal=mbgLtMrsPpsOffsVal, mbgLtCfgVP100Display1IP=mbgLtCfgVP100Display1IP, mbgLtCfgEthernetIf3IPv4Netmask=mbgLtCfgEthernetIf3IPv4Netmask, mbgLtCfgSHSCritLimit=mbgLtCfgSHSCritLimit, mbgLtRefPzfState=mbgLtRefPzfState, mbgLtCfgEthernetIf6IPv6Autoconf=mbgLtCfgEthernetIf6IPv6Autoconf, mbgLtTrapHeartbeat=mbgLtTrapHeartbeat, mbgLtPtpDelayVal=mbgLtPtpDelayVal, mbgLtCfgEthernetIf6IPv6IP1=mbgLtCfgEthernetIf6IPv6IP1, mbgLtCfgEthernetIf3IPv6IP1=mbgLtCfgEthernetIf3IPv6IP1, mbgLtCfgEthernetIf5IPv4Gateway=mbgLtCfgEthernetIf5IPv4Gateway, mbgLtNtpStratum=mbgLtNtpStratum, mbgLtCfgSNMPTrapRec1Community=mbgLtCfgSNMPTrapRec1Community, mbgLtMrsPpsOffsBase=mbgLtMrsPpsOffsBase, mbgLtCfgNTPServer5IP=mbgLtCfgNTPServer5IP, mbgLtTrapSecondaryRecSync=mbgLtTrapSecondaryRecSync, mbgLtCfgEthernetIf6IPv4IP=mbgLtCfgEthernetIf6IPv4IP, mbgLtMrsRefGps=mbgLtMrsRefGps, mbgLtCfgVP100Display2IP=mbgLtCfgVP100Display2IP, mbgLtCfgSNMPReadOnlyCommunity=mbgLtCfgSNMPReadOnlyCommunity, mbgLtRefDctState=mbgLtRefDctState, mbgLtCfgEthernetIf5IPv6IP1=mbgLtCfgEthernetIf5IPv6IP1, mbgLtPtpOffsetFromGM=mbgLtPtpOffsetFromGM, mbgLtCfgNotifyRefclockNotSync=mbgLtCfgNotifyRefclockNotSync, mbgLtPtpMode=mbgLtPtpMode, mbgLtRefGpsStateVal=mbgLtRefGpsStateVal) mibBuilder.exportSymbols("MBG-SNMP-LT-MIB", mbgLtCfgNTPServer5Autokey=mbgLtCfgNTPServer5Autokey, mbgLtTrapServerBoot=mbgLtTrapServerBoot, mbgLtCfgFTPAccess=mbgLtCfgFTPAccess, mbgLtTrapSHSTimeLimitError=mbgLtTrapSHSTimeLimitError, mbgLtNtpAuthKeyId=mbgLtNtpAuthKeyId, mbgLtRefClockModeVal=mbgLtRefClockModeVal, mbgLtMrsIrigPrecision=mbgLtMrsIrigPrecision, mbgLtCfgNameserver1=mbgLtCfgNameserver1, mbgLtConformance=mbgLtConformance, mbgLtMrsPtpPrecision=mbgLtMrsPtpPrecision, mbgLtCfgEthernetIf8IPv6IP3=mbgLtCfgEthernetIf8IPv6IP3, mbgLtMrsGpsStateVal=mbgLtMrsGpsStateVal, mbgLtCfgEthernetIf2IPv6IP1=mbgLtCfgEthernetIf2IPv6IP1, mbgLtPtpDelay=mbgLtPtpDelay, mbgLtCfgEthernetIf3=mbgLtCfgEthernetIf3, mbgLtCfgEthernetIf2DHCPClient=mbgLtCfgEthernetIf2DHCPClient, mbgLtMrsPpsState=mbgLtMrsPpsState, mbgLtFdmNomFreq=mbgLtFdmNomFreq, mbgLtCfgEthernetIf0IPv4IP=mbgLtCfgEthernetIf0IPv4IP, mbgLtCmdSetRefTime=mbgLtCmdSetRefTime, mbgLtObjectsGroup=mbgLtObjectsGroup, mbgLtCfgNTPServer1Key=mbgLtCfgNTPServer1Key, mbgLtCfgEthernetIf5DHCPClient=mbgLtCfgEthernetIf5DHCPClient, mbgLtCfgEthernetIf9IPv6IP2=mbgLtCfgEthernetIf9IPv6IP2, mbgLtMrsPtpPrio=mbgLtMrsPtpPrio, mbgLtCfgEthernetIf8IPv6IP2=mbgLtCfgEthernetIf8IPv6IP2, mbgLtInfo=mbgLtInfo, mbgLtCfgNotifyNTPNotSync=mbgLtCfgNotifyNTPNotSync, mbgLtCfgEthernetIf3IPv6IP2=mbgLtCfgEthernetIf3IPv6IP2, mbgLtNtpActiveRefclockOffsetVal=mbgLtNtpActiveRefclockOffsetVal, mbgLtCfgNotifyNTPStopped=mbgLtCfgNotifyNTPStopped, mbgLtCfgEthernetIf1DHCPClient=mbgLtCfgEthernetIf1DHCPClient, mbgLtCfgNTPServer7=mbgLtCfgNTPServer7, mbgLtCfgEthernetIf0IPv6IP2=mbgLtCfgEthernetIf0IPv6IP2, mbgLtCfgEthernetIf6=mbgLtCfgEthernetIf6, mbgLtCfgEthernetIf7DHCPClient=mbgLtCfgEthernetIf7DHCPClient, mbgLtMrsPtpOffsLimit=mbgLtMrsPtpOffsLimit, mbgLtMrsNtpOffsVal=mbgLtMrsNtpOffsVal, mbgLtMrsIrigState=mbgLtMrsIrigState, mbgLtMrsIrigCorr=mbgLtMrsIrigCorr, mbgLtMrsFreqCorr=mbgLtMrsFreqCorr, mbgLtMrsPtpState=mbgLtMrsPtpState, mbgLtTrapPtpPortDisconnected=mbgLtTrapPtpPortDisconnected, mbgLtCfgEthernetIf4DHCPClient=mbgLtCfgEthernetIf4DHCPClient, mbgLtCfgNotifyConfigChanged=mbgLtCfgNotifyConfigChanged, mbgLtMrsPpsStateVal=mbgLtMrsPpsStateVal, mbgLtCfgTelnetAccess=mbgLtCfgTelnetAccess, mbgLtCfgEthernetIf0IPv4Netmask=mbgLtCfgEthernetIf0IPv4Netmask, mbgLtCfgEthernetIf7IPv4Gateway=mbgLtCfgEthernetIf7IPv4Gateway, mbgLtMrsNtpOffs=mbgLtMrsNtpOffs, mbgLtCfgEthernetIf0DHCPClient=mbgLtCfgEthernetIf0DHCPClient, mbgLtRefClockMode=mbgLtRefClockMode, mbgLtTrapConfigChanged=mbgLtTrapConfigChanged, mbgLtMrsRefIrig=mbgLtMrsRefIrig, mbgLtCfgEthernetIf6IPv6IP2=mbgLtCfgEthernetIf6IPv6IP2, mbgLtCfgEthernetIf4IPv6IP2=mbgLtCfgEthernetIf4IPv6IP2, mbgLtCmd=mbgLtCmd, mbgLtCfgEMail=mbgLtCfgEMail, mbgLtMrsIrigStateVal=mbgLtMrsIrigStateVal, mbgLtCfgNTPBroadcastIP=mbgLtCfgNTPBroadcastIP, mbgLtMrsFreqOffsVal=mbgLtMrsFreqOffsVal, mbgLtNtpActiveRefclockName=mbgLtNtpActiveRefclockName, mbgLtGroups=mbgLtGroups, mbgLtMrsIrigPrio=mbgLtMrsIrigPrio, mbgLtCfgEthernetIf1IPv4IP=mbgLtCfgEthernetIf1IPv4IP, mbgLtRefDctMode=mbgLtRefDctMode, mbgLtCfgEthernetIf3NetLinkMode=mbgLtCfgEthernetIf3NetLinkMode, mbgLtCfgEthernetIf1IPv6IP3=mbgLtCfgEthernetIf1IPv6IP3, mbgLtTrapNTPSync=mbgLtTrapNTPSync, mbgLtPtpPortStateVal=mbgLtPtpPortStateVal, mbgLtMrsGpsOffsVal=mbgLtMrsGpsOffsVal, mbgLtCfgEthernetIf3DHCPClient=mbgLtCfgEthernetIf3DHCPClient, mbgLtCfgNTPServer3IP=mbgLtCfgNTPServer3IP, mbgLtTrapAntennaShortCircuit=mbgLtTrapAntennaShortCircuit, mbgLtCfgNTPAtomPPS=mbgLtCfgNTPAtomPPS, mbgLtCfgEthernetIf5=mbgLtCfgEthernetIf5, mbgLtMrsFreqOffs=mbgLtMrsFreqOffs, mbgLtMrsGpsOffs=mbgLtMrsGpsOffs, mbgLtPtpPortState=mbgLtPtpPortState, mbgLtCfgNTPServer4Autokey=mbgLtCfgNTPServer4Autokey, mbgLtCfgVP100Display2SN=mbgLtCfgVP100Display2SN, mbgLtCfgNTPServer5Prefer=mbgLtCfgNTPServer5Prefer, mbgLtCfgEthernetIf9IPv4Netmask=mbgLtCfgEthernetIf9IPv4Netmask, mbgLtCfgEthernetIf0IPv6Autoconf=mbgLtCfgEthernetIf0IPv6Autoconf, mbgLtCfgEthernetIf9IPv4IP=mbgLtCfgEthernetIf9IPv4IP, mbgLtCfgNTPServer6=mbgLtCfgNTPServer6, mbgLtCfgEthernetIf5IPv4Netmask=mbgLtCfgEthernetIf5IPv4Netmask, mbgLtCfgNTPServer3=mbgLtCfgNTPServer3, mbgLtNotifications=mbgLtNotifications, mbgLtCfgEthernetIf6DHCPClient=mbgLtCfgEthernetIf6DHCPClient, mbgLtCfgEthernetIf4IPv4IP=mbgLtCfgEthernetIf4IPv4IP, mbgLtCfgEthernetIf1IPv6IP1=mbgLtCfgEthernetIf1IPv6IP1, mbgLtCfgNTPServer1=mbgLtCfgNTPServer1, mbgLtRefPzfMode=mbgLtRefPzfMode, mbgLtRefGpsSatellites=mbgLtRefGpsSatellites, mbgLtCfgWMailAddress1=mbgLtCfgWMailAddress1, mbgLtTrapPtpStateChanged=mbgLtTrapPtpStateChanged, mbgLtCfgEthernetIf2IPv6Autoconf=mbgLtCfgEthernetIf2IPv6Autoconf, mbgLtCfgEthernetIf4IPv6IP3=mbgLtCfgEthernetIf4IPv6IP3, mbgLtCfgEthernetIf3IPv6Autoconf=mbgLtCfgEthernetIf3IPv6Autoconf, mbgLtCfgNTPServer2Key=mbgLtCfgNTPServer2Key, mbgLtRefPzfField=mbgLtRefPzfField, mbgLtMrsNtpOffsLimit=mbgLtMrsNtpOffsLimit, mbgLtCfgWalldisplay=mbgLtCfgWalldisplay, mbgLtMrsPpsOffsLimit=mbgLtMrsPpsOffsLimit, mbgLtNtpNumberOfRefclocks=mbgLtNtpNumberOfRefclocks, mbgLtCfgEthernetIf1NetLinkMode=mbgLtCfgEthernetIf1NetLinkMode, mbgLtMrsNtpState=mbgLtMrsNtpState, mbgLtCfgEthernetIf1IPv6Autoconf=mbgLtCfgEthernetIf1IPv6Autoconf, mbgLtTrapReceiverNotResponding=mbgLtTrapReceiverNotResponding, mbgLtCfgSyslogserver1=mbgLtCfgSyslogserver1, mbgLtCfgEthernetIf0IPv6IP3=mbgLtCfgEthernetIf0IPv6IP3, mbgLtMrsFreqPrio=mbgLtMrsFreqPrio, mbgLtRefMrsRefList=mbgLtRefMrsRefList)
157.452514
13,503
0.765434
11,981
112,736
7.201736
0.053585
0.008947
0.01276
0.017014
0.420924
0.409346
0.395624
0.338591
0.29389
0.292267
0
0.082255
0.072798
112,736
715
13,504
157.672727
0.7432
0.003238
0
0.004249
0
0
0.183559
0.044864
0
0
0
0
0
1
0
false
0
0.009915
0
0.009915
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
accd611cadfeb47644ace0134dc36c76c850e6e2
1,249
py
Python
relevanceai/operations/preprocessing/utils/functools_extend.py
RelevanceAI/RelevanceAI
a0542f35153d9c842f3d2cd0955d6b07f6dfc07b
[ "Apache-2.0" ]
21
2021-11-23T13:01:36.000Z
2022-03-23T03:45:30.000Z
relevanceai/operations/preprocessing/utils/functools_extend.py
RelevanceAI/RelevanceAI
a0542f35153d9c842f3d2cd0955d6b07f6dfc07b
[ "Apache-2.0" ]
217
2021-11-23T00:11:01.000Z
2022-03-30T08:11:49.000Z
relevanceai/operations/preprocessing/utils/functools_extend.py
RelevanceAI/RelevanceAI
a0542f35153d9c842f3d2cd0955d6b07f6dfc07b
[ "Apache-2.0" ]
4
2022-01-04T01:48:30.000Z
2022-02-11T03:19:32.000Z
from functools import singledispatch from functools import update_wrapper class singledispatchmethod: """Single-dispatch generic method descriptor. Supports wrapping existing descriptors and handles non-descriptor callables as instance methods. """ def __init__(self, func): if not callable(func) and not hasattr(func, "__get__"): raise TypeError(f"{func!r} is not callable or a descriptor") self.dispatcher = singledispatch(func) self.func = func def register(self, cls, method=None): """generic_method.register(cls, func) -> func Registers a new implementation for the given *cls* on a *generic_method*. """ return self.dispatcher.register(cls, func=method) def __get__(self, obj, cls=None): def _method(*args, **kwargs): method = self.dispatcher.dispatch(args[0].__class__) return method.__get__(obj, cls)(*args, **kwargs) _method.__isabstractmethod__ = self.__isabstractmethod__ _method.register = self.register update_wrapper(_method, self.func) return _method @property def __isabstractmethod__(self): return getattr(self.func, "__isabstractmethod__", False)
33.756757
81
0.675741
139
1,249
5.748201
0.431655
0.04005
0.047559
0
0
0
0
0
0
0
0
0.001041
0.230584
1,249
36
82
34.694444
0.830385
0.204964
0
0
0
0
0.070378
0
0
0
0
0
0
1
0.238095
false
0
0.095238
0.047619
0.571429
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
0
0
0
1
0
0
0
0
1
0
0
2
acd2a8e56d19935003267b249ccf38dd5ec7de90
804
py
Python
_assignments/basics/oop/oop_method_a.py
sages-pl/2022-01-pythonsqlalchemy-aptiv
1d6d856608e9dbe25b139e8968c48b7f46753b84
[ "MIT" ]
null
null
null
_assignments/basics/oop/oop_method_a.py
sages-pl/2022-01-pythonsqlalchemy-aptiv
1d6d856608e9dbe25b139e8968c48b7f46753b84
[ "MIT" ]
null
null
null
_assignments/basics/oop/oop_method_a.py
sages-pl/2022-01-pythonsqlalchemy-aptiv
1d6d856608e9dbe25b139e8968c48b7f46753b84
[ "MIT" ]
null
null
null
""" * Assignment: OOP Method Syntax * Required: yes * Complexity: easy * Lines of code: 3 lines * Time: 3 min English: 1. Define class `Calculator` 2. Define method `add` in class `Calculator` 3. Method `add` take `a` and `b` as arguments 4. Method returns sum of `a` and `b` 5. Run doctests - all must succeed Polish: 1. Zdefiniuj klasę `Calculator` 2. Zdefiniuj metodę `add` w klasie `Calculator` 3. Metoda `add` przyjmuje `a` i `b` jako argumenty 4. Metoda zwraca sumę `a` i `b` 5. Uruchom doctesty - wszystkie muszą się powieść Tests: >>> import sys; sys.tracebacklimit = 0 >>> from inspect import isclass, ismethod >>> assert isclass(Calculator) >>> calc = Calculator() >>> assert ismethod(calc.add) >>> calc.add(1, 2) 3 """
23.647059
54
0.635572
111
804
4.603604
0.603604
0.058708
0.019569
0
0
0
0
0
0
0
0
0.026316
0.243781
804
33
55
24.363636
0.814145
0.986318
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
acdfc16cc7fdb2a278df751614c80755caa00938
1,144
py
Python
intro_types.py
ericauuu/data_types
6efd000e3239b7b3a17d5c90ee5e67f4740c3f82
[ "MIT" ]
null
null
null
intro_types.py
ericauuu/data_types
6efd000e3239b7b3a17d5c90ee5e67f4740c3f82
[ "MIT" ]
null
null
null
intro_types.py
ericauuu/data_types
6efd000e3239b7b3a17d5c90ee5e67f4740c3f82
[ "MIT" ]
null
null
null
""" Let's learn about Python types! """ import json #library with open("raw_data/data.json", "r") as json_file: text = json_file.read() data = json.loads(text) main_keys = data.keys() print(f"he main keys are: {main_keys}") language_code = data['LanguageCode'] print(language_code) searh_parameters = data['SearchParameters'] print(searh_parameters) search_result = data['SearchResult'] #print(search_result) search_result_keys = search_result.keys() print(f"The search_result keys are: {search_result_keys}") search_result_count = search_result['SearchResultCount'] print(search_result_count) search_result_count_all = search_result['SearchResultCountAll'] print(search_result_count_all) search_result_items = search_result['SearchResultItems'] print(search_result_items) test_item = search_result_items[0] print(f"""test_item contains {test_item} and is of type {type(test_item)}""") print(len(search_result_items)) list_of_types = [type(item) for item in search_result_items] print(list_of_types) unique_types = set(list_of_types) print(f"The unique types in list_of_types is: {unique_types}")
23.346939
77
0.765734
166
1,144
4.951807
0.331325
0.262774
0.103406
0.053528
0.187348
0.077859
0
0
0
0
0
0.000994
0.120629
1,144
48
78
23.833333
0.816103
0.051573
0
0
0
0
0.283721
0
0
0
0
0
0
1
0
false
0
0.037037
0
0.037037
0.407407
0
0
0
null
1
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
0
0
0
0
0
0
0
0
0
1
0
2
ace33fa6d7a980ed6b21736b8187a09c5cbd8f00
1,696
py
Python
dashboard/migrations/0061_update_user_feedback.py
eric-scott-owens/loopla
1fd5e6e7e9907198ff904111010b362a129d5e39
[ "MIT" ]
null
null
null
dashboard/migrations/0061_update_user_feedback.py
eric-scott-owens/loopla
1fd5e6e7e9907198ff904111010b362a129d5e39
[ "MIT" ]
6
2020-06-05T22:27:20.000Z
2022-03-24T10:25:50.000Z
dashboard/migrations/0061_update_user_feedback.py
eric-scott-owens/loopla
1fd5e6e7e9907198ff904111010b362a129d5e39
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2019-03-05 17:50 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import imagekit.models.fields class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('dashboard', '0060_add_post_indexes_for_newest_update'), ] operations = [ migrations.RemoveField( model_name='userfeedback', name='internal_copy', ), migrations.RemoveField( model_name='userfeedback', name='is_visible_to_group', ), migrations.RemoveField( model_name='userfeedback', name='original', ), migrations.RemoveField( model_name='userfeedback', name='original_group', ), migrations.RemoveField( model_name='userfeedback', name='original_owner', ), migrations.AddField( model_name='userfeedback', name='owner', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='userfeedback', name='photo', field=imagekit.models.fields.ProcessedImageField(blank=True, null=True, upload_to='profile_photos'), ), migrations.AddField( model_name='userfeedback', name='text', field=models.TextField(default=''), preserve_default=False, ), ]
30.285714
122
0.605542
161
1,696
6.161491
0.453416
0.072581
0.169355
0.201613
0.396169
0.396169
0.173387
0.118952
0
0
0
0.017384
0.287736
1,696
55
123
30.836364
0.803808
0.040094
0
0.5
1
0
0.147692
0.024
0
0
0
0
0
1
0
false
0
0.104167
0
0.166667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
acf319784f31c1758ee12a490b4717fb78f5ce34
963
py
Python
core/models/customers.py
mthooyavan/layman-erp
87925567ae1bd6fab1fba46a2ef4751de9ab4478
[ "Unlicense" ]
null
null
null
core/models/customers.py
mthooyavan/layman-erp
87925567ae1bd6fab1fba46a2ef4751de9ab4478
[ "Unlicense" ]
null
null
null
core/models/customers.py
mthooyavan/layman-erp
87925567ae1bd6fab1fba46a2ef4751de9ab4478
[ "Unlicense" ]
null
null
null
from django.db import models from localflavor.in_.models import INStateField class Customer(models.Model): def __str__(self): return f"{self.name} | {self.email}" name = models.CharField(max_length=128, blank=True, null=True) email = models.EmailField(max_length=128, db_index=True, blank=True, null=True, default=None) phone = models.CharField(max_length=10, db_index=True, blank=True, null=True, default=None) address_1 = models.CharField(max_length=128) address_2 = models.CharField(max_length=128, blank=True) city = models.CharField(max_length=64, ) state = INStateField() zip_code = models.CharField(max_length=6, ) latitude = models.DecimalField(max_digits=9, decimal_places=6, null=True, blank=True) longitude = models.DecimalField(max_digits=9, decimal_places=6, null=True, blank=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)
40.125
97
0.740395
136
963
5.051471
0.397059
0.091703
0.157205
0.209607
0.510917
0.390102
0.390102
0.285298
0.285298
0.171761
0
0.027845
0.142264
963
23
98
41.869565
0.803874
0
0
0
0
0
0.026999
0
0
0
0
0
0
1
0.058824
false
0
0.117647
0.058824
1
0
0
0
0
null
0
0
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
0
0
0
0
0
1
0
0
2
4a09c001ece36ee46492be68949dc635aa05d858
192
py
Python
iniciante/python/2160-nome-no-formulario.py
tfn10/beecrowd
1ebf19ca9a253eb326160f03145d20be33064969
[ "MIT" ]
null
null
null
iniciante/python/2160-nome-no-formulario.py
tfn10/beecrowd
1ebf19ca9a253eb326160f03145d20be33064969
[ "MIT" ]
null
null
null
iniciante/python/2160-nome-no-formulario.py
tfn10/beecrowd
1ebf19ca9a253eb326160f03145d20be33064969
[ "MIT" ]
null
null
null
def nome_no_formulario(): nome = input() tamanho_de_caracteres = len(nome) if tamanho_de_caracteres > 80: print('NO') else: print('YES') nome_no_formulario()
17.454545
37
0.625
24
192
4.666667
0.583333
0.107143
0.285714
0
0
0
0
0
0
0
0
0.014085
0.260417
192
10
38
19.2
0.774648
0
0
0
0
0
0.026042
0
0
0
0
0
0
1
0.125
false
0
0
0
0.125
0.25
1
0
0
null
0
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
0
0
0
0
0
0
0
2
4a116ecfd8681b240766859ac4029218d363d6d9
5,573
py
Python
handlers/users/new_list.py
Ilya-koala/VSL_Bot
03399a49a2bc8baa97cc5d6f84a7406dbaafd262
[ "MIT" ]
null
null
null
handlers/users/new_list.py
Ilya-koala/VSL_Bot
03399a49a2bc8baa97cc5d6f84a7406dbaafd262
[ "MIT" ]
1
2021-06-25T18:53:54.000Z
2021-06-30T16:15:54.000Z
handlers/users/new_list.py
Ilya-koala/VSL_Bot
03399a49a2bc8baa97cc5d6f84a7406dbaafd262
[ "MIT" ]
3
2021-04-18T09:39:59.000Z
2021-05-18T16:47:19.000Z
from os import path from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery from aiogram.types import CallbackQuery, Message from aiogram.dispatcher import FSMContext from loader import dp, db from states.new_list import NewList from keyboards.inline.lists_markups import start_page_keyboard from utils.voice_recognition import voice_to_text @dp.callback_query_handler(text="new_list") async def new_list(call: CallbackQuery, state: FSMContext): back = InlineKeyboardMarkup( inline_keyboard=[ [InlineKeyboardButton(text="◀️Назад", callback_data="back_to_start_page")] ] ) print(back) last_message = await call.message.edit_text( "Пожалуйста, введи название твоего списка\nP.S. Ты также можешь просто отправить голосовое сообщение с названием твоего списка", reply_markup=back, ) await state.update_data(last_message=last_message) await NewList.list_name.set() @dp.message_handler(state=NewList.list_name) async def new_values(message: Message, state: FSMContext): back = InlineKeyboardMarkup( inline_keyboard=[ [InlineKeyboardButton(text="◀️Назад", callback_data="back_to_list_name")] ] ) list_name = message.text await state.update_data(list_name=list_name) await message.delete() data = await state.get_data() last_message = data.get("last_message") await last_message.edit_text( f"Название списка: <strong>{list_name}</strong>\n\nОтлично! Пожалуйста, введи продукты, которые ты хочешь добавить в свой список.\nПример:\n<code>Кефир, молоко, стейки, вино</code>\nИли можешь отправить голосовое сообщение, в которым ты назовешь продукты, которые ты хотел бы добавить в список", reply_markup=back, ) await NewList.new_values.set() @dp.message_handler(content_types=["voice"], state=NewList.list_name) async def voice_list_name(message: Message, state: FSMContext): back = InlineKeyboardMarkup( inline_keyboard=[ [InlineKeyboardButton(text="◀️Назад", callback_data="back_to_list_name")] ] ) dir_name = path.join(path.dirname(path.realpath(__file__)), "../../data/") # dir_name = "/".join(__file__.split("\\")[:-3]) + "/data/" voice_name = (await message.voice.download(destination=dir_name)).name list_name = voice_to_text(voice_name) data = await state.get_data() last_message = data.get("last_message") try: msg = data.get("msg") user_msg = data.get("user_msg") await msg.delete() await user_msg.delete() except Exception as e: print(e) if not list_name: msg = await message.answer( "Ничего не понятно =(\nПожалуйста попробуй отправить свое голосовое сообщение еще раз" ) await state.update_data(msg=msg, user_msg=message) return await state.update_data(list_name=list_name) await message.delete() await last_message.edit_text( f"Название списка: <strong>{list_name}</strong>\n\nОтлично! Пожалуйста, введи продукты, которые ты хочешь добавить в свой список.\nПример:\n<code>Кефир, молоко, стейки, вино</code>\nИли можешь отправить голосовое сообщение, в которым ты назовешь продукты, которые ты хотел бы добавить в список", reply_markup=back, ) await NewList.new_values.set() @dp.message_handler(state=NewList.new_values) async def get_list_name(message: Message, state: FSMContext): data = await state.get_data() user_id = str(message.from_user.id) new_values = list(set([x.strip() for x in message.text.lower().split(",")])) list_name = data.get("list_name").replace(":", " ") last_message = data.get("last_message") db.new_list(user_id, list_name, new_values) await message.delete() text = ( f"{message.from_user.full_name}, я сохранил твой список и готов дальше к работе" ) await last_message.edit_text(text, reply_markup=start_page_keyboard) await state.finish() @dp.message_handler(content_types=["voice"], state=NewList.new_values) async def new_list_values_voice(message: Message, state: FSMContext): dir_name = path.join( path.dirname(path.realpath(__file__)), "../../data/" ) # for linux # dir_name = "/".join(__file__.split("\\")[:-3]) + "/data/" # for win10 data = await state.get_data() user_id = str(message.from_user.id) list_name = data.get("list_name").replace(":", " ") voice_name = (await message.voice.download(destination=dir_name)).name new_values = voice_to_text(voice_name) last_message = data.get("last_message") try: msg = data.get("msg2") user_msg = data.get("user_msg2") await msg.delete() await user_msg.delete() except Exception as e: print(e) if not new_values: msg = await message.answer( "Ничего не понятно =(\nПожалуйста попробуй отправить свое голосовое сообщение еще раз" ) await state.update_data(msg2=msg, user_msg2=message) return new_values = list(set(new_values.split())) db.new_list(user_id, list_name, new_values) await message.delete() text = ( f"{message.from_user.full_name}, я сохранил твой список и готов дальше к работе" ) await last_message.edit_text(text, reply_markup=start_page_keyboard) await state.finish() @dp.callback_query_handler(text="back_to_list_name", state="*") async def back_to_list_name(call: CallbackQuery, state: FSMContext): await new_list(call, state)
33.981707
303
0.695317
739
5,573
5.027064
0.192152
0.051682
0.020188
0.026918
0.740242
0.706326
0.657066
0.627456
0.608075
0.608075
0
0.001775
0.191279
5,573
163
304
34.190184
0.821167
0.024403
0
0.525
0
0.025
0.231038
0.036819
0
0
0
0
0
1
0
false
0
0.066667
0
0.083333
0.025
0
0
0
null
0
0
0
0
1
0
0
0
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
2
c588b2bb09cbac33b1dab00b243cdeaf5434defc
470
py
Python
flask_webpackext/version.py
invenio-toaster/flask-webpackext
ce6940aa84a7fd8de1ce45efb922efbc3cb77b9d
[ "BSD-3-Clause" ]
13
2018-08-03T14:28:37.000Z
2021-06-22T17:08:53.000Z
flask_webpackext/version.py
invenio-toaster/flask-webpackext
ce6940aa84a7fd8de1ce45efb922efbc3cb77b9d
[ "BSD-3-Clause" ]
15
2017-05-12T06:57:14.000Z
2021-08-07T13:59:29.000Z
flask_webpackext/version.py
invenio-toaster/flask-webpackext
ce6940aa84a7fd8de1ce45efb922efbc3cb77b9d
[ "BSD-3-Clause" ]
12
2017-05-05T10:01:50.000Z
2021-08-06T15:03:56.000Z
# -*- coding: utf-8 -*- # # This file is part of Flask-WebpackExt # Copyright (C) 2017 CERN. # # Flask-WebpackExt is free software; you can redistribute it and/or modify # it under the terms of the Revised BSD License; see LICENSE file for # more details. """Version information for Flask-WebpackExt. This file is imported by ``flask_webpackext.__init__``, and parsed by ``setup.py``. """ from __future__ import absolute_import, print_function __version__ = '1.0.2'
24.736842
74
0.734043
70
470
4.714286
0.714286
0.181818
0.060606
0
0
0
0
0
0
0
0
0.020202
0.157447
470
18
75
26.111111
0.813131
0.780851
0
0
0
0
0.05618
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0.5
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
0
0
0
0
0
0
1
0
0
1
0
2
c593c588d80beae54530eb1435949abb09ae10ad
1,071
py
Python
30-Day-Challange/Day-9/partition_ll.py
EashanKaushik/LeetCode
8ee2a61cefa42b332b6252fafff4a2772d25aa31
[ "Apache-2.0" ]
null
null
null
30-Day-Challange/Day-9/partition_ll.py
EashanKaushik/LeetCode
8ee2a61cefa42b332b6252fafff4a2772d25aa31
[ "Apache-2.0" ]
null
null
null
30-Day-Challange/Day-9/partition_ll.py
EashanKaushik/LeetCode
8ee2a61cefa42b332b6252fafff4a2772d25aa31
[ "Apache-2.0" ]
null
null
null
# Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def partition(self, head: ListNode, x: int) -> ListNode: curr_node = head curr_new = new_head = ListNode(0) prev = None while curr_node: if curr_node.val >= x: if prev: prev.next = curr_node.next curr_new.next = curr_node curr_node = curr_node.next curr_new = curr_new.next curr_new.next = None else: curr_new.next = temp = curr_node head = curr_node = curr_node.next temp.next = None curr_new = curr_new.next elif curr_node.val < x: prev = curr_node curr_node = curr_node.next if prev: prev.next = new_head.next else: return new_head.next return head
26.775
60
0.487395
123
1,071
4.00813
0.235772
0.227181
0.111562
0.162272
0.26572
0.11359
0.11359
0
0
0
0
0.003373
0.446312
1,071
39
61
27.461538
0.827993
0.031746
0
0.266667
0
0
0
0
0
0
0
0
0
1
0.066667
false
0
0
0
0.2
0
0
0
0
null
1
0
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
0
0
0
0
0
0
0
0
2
c593e210ca93fb8405b23c255dc8f54901191cee
633
py
Python
continuous_delivery/models/create_options.py
Microsoft/vsts-cd-manager
c8b5d6d51b8f385771a801d05d0089d3cd802ee0
[ "MIT" ]
5
2017-05-25T20:12:01.000Z
2018-07-31T05:40:53.000Z
continuous_delivery/models/create_options.py
Microsoft/vsts-cd-manager
c8b5d6d51b8f385771a801d05d0089d3cd802ee0
[ "MIT" ]
8
2017-05-12T15:21:47.000Z
2018-06-08T22:09:29.000Z
continuous_delivery/models/create_options.py
microsoft/vsts-cd-manager
c8b5d6d51b8f385771a801d05d0089d3cd802ee0
[ "MIT" ]
6
2019-06-14T11:01:00.000Z
2020-08-05T15:12:34.000Z
from msrest.serialization import Model class CreateOptions(Model): _attribute_map = { 'app_service_plan_name': {'key': 'appServicePlanName', 'type': 'str'}, 'app_service_pricing_tier': {'key': 'appServicePricingTier', 'type': 'str'}, 'base_app_service_name': {'key': 'baseAppServiceName', 'type': 'str'} } def __init__(self, app_service_plan_name=None, app_service_pricing_tier=None, base_app_service_name=None): self.app_service_plan_name = app_service_plan_name self.app_service_pricing_tier = app_service_pricing_tier self.base_app_service_name = base_app_service_name
48.692308
110
0.728278
79
633
5.303797
0.329114
0.286396
0.133652
0.171838
0.105012
0
0
0
0
0
0
0
0.157978
633
13
111
48.692308
0.786116
0
0
0
0
0
0.241325
0.137224
0
0
0
0
0
1
0.090909
false
0
0.090909
0
0.363636
0
0
0
0
null
1
0
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
0
0
0
0
0
0
0
0
2
c5b12dea4654c443ce098dd4e44ee7f3caf605a4
327
py
Python
server/geoportal.py
AlexBobkov/hyexplorer
b415804e5f0eef70891e6f74ed8128e634b9f2e1
[ "MIT" ]
null
null
null
server/geoportal.py
AlexBobkov/hyexplorer
b415804e5f0eef70891e6f74ed8128e634b9f2e1
[ "MIT" ]
null
null
null
server/geoportal.py
AlexBobkov/hyexplorer
b415804e5f0eef70891e6f74ed8128e634b9f2e1
[ "MIT" ]
null
null
null
import os dir = os.path.dirname(os.path.abspath(__file__)) import sys sys.path.insert(0, dir) os.environ['GEOPORTAL_UPLOAD_FOLDER']='/opt/hyexplorer/temp' os.environ['GEOPORTAL_PUBLIC_FOLDER']='/opt/www/geoportal' os.environ['GEOPORTAL_SCENES_FOLDER']='/opt/hyexplorer/Hyperion/scenes' from server import app as application
27.25
71
0.788991
48
327
5.166667
0.541667
0.108871
0.217742
0
0
0
0
0
0
0
0
0.003268
0.06422
327
11
72
29.727273
0.80719
0
0
0
0
0
0.422018
0.30581
0
0
0
0
0
1
0
false
0
0.375
0
0.375
0
0
0
0
null
0
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
0
0
1
0
0
0
0
2
c5b7dbe952efbe183e67da59a5a303730a9c659d
760
py
Python
examples/camera/_display_frame.py
adam-urbanczyk/pymba
5ced680c56ac0f6a9ff697017187e6acfe06653e
[ "BSD-3-Clause" ]
107
2015-01-28T18:16:18.000Z
2022-02-15T10:47:10.000Z
examples/camera/_display_frame.py
adam-urbanczyk/pymba
5ced680c56ac0f6a9ff697017187e6acfe06653e
[ "BSD-3-Clause" ]
117
2015-01-02T08:04:15.000Z
2021-08-25T11:45:05.000Z
examples/camera/_display_frame.py
adam-urbanczyk/pymba
5ced680c56ac0f6a9ff697017187e6acfe06653e
[ "BSD-3-Clause" ]
85
2015-01-07T08:44:18.000Z
2022-02-15T10:47:11.000Z
from typing import Optional import cv2 from pymba import Frame # todo add more colours PIXEL_FORMATS_CONVERSIONS = { 'BayerRG8': cv2.COLOR_BAYER_RG2RGB, } def display_frame(frame: Frame, delay: Optional[int] = 1) -> None: """ Displays the acquired frame. :param frame: The frame object to display. :param delay: Display delay in milliseconds, use 0 for indefinite. """ print('frame {}'.format(frame.data.frameID)) # get a copy of the frame data image = frame.buffer_data_numpy() # convert colour space if desired try: image = cv2.cvtColor(image, PIXEL_FORMATS_CONVERSIONS[frame.pixel_format]) except KeyError: pass # display image cv2.imshow('Image', image) cv2.waitKey(delay)
23.75
82
0.684211
99
760
5.151515
0.59596
0.047059
0.090196
0
0
0
0
0
0
0
0
0.015228
0.222368
760
31
83
24.516129
0.847716
0.310526
0
0
0
0
0.042254
0
0
0
0
0.032258
0
1
0.066667
false
0.066667
0.2
0
0.266667
0.066667
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
0
0
1
0
0
0
0
0
2
c5ba9d9e912d1ac4dae46bc26857331a2cf65f6b
228
py
Python
v7.0/os_tools.py
bakapear/osumapper
cab9d1b9509841cb9a40e5e06e47fd7e7124fb76
[ "Apache-2.0" ]
2
2019-09-24T19:59:04.000Z
2020-04-30T09:18:00.000Z
v7.0/os_tools.py
bakapear/osumapper
cab9d1b9509841cb9a40e5e06e47fd7e7124fb76
[ "Apache-2.0" ]
null
null
null
v7.0/os_tools.py
bakapear/osumapper
cab9d1b9509841cb9a40e5e06e47fd7e7124fb76
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # OS related library functions # import re import os import subprocess import json def run_command(str_array): x = subprocess.Popen(str_array, stdout=subprocess.PIPE) return x.stdout.read()
14.25
59
0.710526
32
228
4.96875
0.6875
0.100629
0
0
0
0
0
0
0
0
0
0.005319
0.175439
228
15
60
15.2
0.840426
0.219298
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.571429
0
0.857143
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
0
0
0
0
0
0
1
0
1
0
0
2
c5e2383a33736e97cabae7f5d8ed6150518462ce
506
py
Python
source/pkgsrc/devel/gyp/patches/patch-gyptest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/gyp/patches/patch-gyptest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/gyp/patches/patch-gyptest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-gyptest.py,v 1.4 2014/08/21 14:49:43 he Exp $ * Add NetBSD 5, 6 and 7 target --- gyptest.py.orig 2014-07-14 14:19:50.000000000 +0000 +++ gyptest.py @@ -219,6 +219,10 @@ def main(argv=None): 'aix5': ['make'], 'freebsd7': ['make'], 'freebsd8': ['make'], + 'freebsd9': ['make'], + 'netbsd5': ['make'], + 'netbsd6': ['make'], + 'netbsd7': ['make'], 'openbsd5': ['make'], 'cygwin': ['msvs'], 'win32': ['msvs', 'ninja'],
28.111111
60
0.492095
64
506
3.890625
0.71875
0.108434
0
0
0
0
0
0
0
0
0
0.172872
0.256917
506
17
61
29.764706
0.489362
0
0
0
0
0
0.22332
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
c5f157c612918c6922fb99350ed2609dfdc97f31
20,976
py
Python
dfx_apiv2_protos/general_pb2.py
nuralogix/dfx-apiv2-protos-python
6402563e4dc8adcb823e521b11b5ac47408466c7
[ "MIT" ]
1
2022-02-15T01:13:47.000Z
2022-02-15T01:13:47.000Z
dfx_apiv2_protos/general_pb2.py
nuralogix/dfx-apiv2-protos-python
6402563e4dc8adcb823e521b11b5ac47408466c7
[ "MIT" ]
null
null
null
dfx_apiv2_protos/general_pb2.py
nuralogix/dfx-apiv2-protos-python
6402563e4dc8adcb823e521b11b5ac47408466c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: general.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='general.proto', package='dfx.proto.general', syntax='proto3', serialized_options=b'\n\020ai.nuralogix.dfxB\007General\370\001\001', create_key=_descriptor._internal_create_key, serialized_pb=b'\n\rgeneral.proto\x12\x11\x64\x66x.proto.general\x1a\x1cgoogle/protobuf/struct.proto\"\x0f\n\rStatusRequest\"\xed\x01\n\x0eStatusResponse\x12\x10\n\x08StatusID\x18\x01 \x01(\t\x12\x0f\n\x07Version\x18\x02 \x01(\t\x12;\n\x05Notes\x18\x03 \x03(\x0b\x32,.dfx.proto.general.StatusResponse.NotesEntry\x1a%\n\x04Note\x12\x0c\n\x04\x44\x61te\x18\x01 \x01(\r\x12\x0f\n\x07Message\x18\x02 \x01(\t\x1aT\n\nNotesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.dfx.proto.general.StatusResponse.Note:\x02\x38\x01\"\x12\n\x10MimeTypesRequest\"\x86\x01\n\x11MimeTypesResponse\x12=\n\x06Values\x18\x01 \x03(\x0b\x32-.dfx.proto.general.MimeTypesResponse.MimeType\x1a\x32\n\x08MimeType\x12\n\n\x02ID\x18\x01 \x01(\t\x12\x0c\n\x04Name\x18\x02 \x01(\t\x12\x0c\n\x04Mime\x18\x03 \x01(\t\"$\n\x14HeartbeatReadRequest\x12\x0c\n\x04UUID\x18\x01 \x01(\t\";\n\x15HeartbeatReadResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x11\n\ttimestamp\x18\x02 \x01(\t\"3\n\x15HeartbeatWriteRequest\x12\x0c\n\x04UUID\x18\x01 \x01(\t\x12\x0c\n\x04Mode\x18\x02 \x01(\t\"Q\n\x16HeartbeatWriteResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12&\n\x05stats\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct2\xb5\x01\n\x08Services\x12O\n\x06Status\x12 .dfx.proto.general.StatusRequest\x1a!.dfx.proto.general.StatusResponse\"\x00\x12X\n\tMimeTypes\x12#.dfx.proto.general.MimeTypesRequest\x1a$.dfx.proto.general.MimeTypesResponse\"\x00\x42\x1e\n\x10\x61i.nuralogix.dfxB\x07General\xf8\x01\x01\x62\x06proto3' , dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) _STATUSREQUEST = _descriptor.Descriptor( name='StatusRequest', full_name='dfx.proto.general.StatusRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=66, serialized_end=81, ) _STATUSRESPONSE_NOTE = _descriptor.Descriptor( name='Note', full_name='dfx.proto.general.StatusResponse.Note', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='Date', full_name='dfx.proto.general.StatusResponse.Note.Date', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='Message', full_name='dfx.proto.general.StatusResponse.Note.Message', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=198, serialized_end=235, ) _STATUSRESPONSE_NOTESENTRY = _descriptor.Descriptor( name='NotesEntry', full_name='dfx.proto.general.StatusResponse.NotesEntry', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='key', full_name='dfx.proto.general.StatusResponse.NotesEntry.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='value', full_name='dfx.proto.general.StatusResponse.NotesEntry.value', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=b'8\001', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=237, serialized_end=321, ) _STATUSRESPONSE = _descriptor.Descriptor( name='StatusResponse', full_name='dfx.proto.general.StatusResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='StatusID', full_name='dfx.proto.general.StatusResponse.StatusID', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='Version', full_name='dfx.proto.general.StatusResponse.Version', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='Notes', full_name='dfx.proto.general.StatusResponse.Notes', index=2, number=3, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_STATUSRESPONSE_NOTE, _STATUSRESPONSE_NOTESENTRY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=84, serialized_end=321, ) _MIMETYPESREQUEST = _descriptor.Descriptor( name='MimeTypesRequest', full_name='dfx.proto.general.MimeTypesRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=323, serialized_end=341, ) _MIMETYPESRESPONSE_MIMETYPE = _descriptor.Descriptor( name='MimeType', full_name='dfx.proto.general.MimeTypesResponse.MimeType', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='ID', full_name='dfx.proto.general.MimeTypesResponse.MimeType.ID', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='Name', full_name='dfx.proto.general.MimeTypesResponse.MimeType.Name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='Mime', full_name='dfx.proto.general.MimeTypesResponse.MimeType.Mime', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=428, serialized_end=478, ) _MIMETYPESRESPONSE = _descriptor.Descriptor( name='MimeTypesResponse', full_name='dfx.proto.general.MimeTypesResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='Values', full_name='dfx.proto.general.MimeTypesResponse.Values', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_MIMETYPESRESPONSE_MIMETYPE, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=344, serialized_end=478, ) _HEARTBEATREADREQUEST = _descriptor.Descriptor( name='HeartbeatReadRequest', full_name='dfx.proto.general.HeartbeatReadRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='UUID', full_name='dfx.proto.general.HeartbeatReadRequest.UUID', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=480, serialized_end=516, ) _HEARTBEATREADRESPONSE = _descriptor.Descriptor( name='HeartbeatReadResponse', full_name='dfx.proto.general.HeartbeatReadResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='success', full_name='dfx.proto.general.HeartbeatReadResponse.success', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='timestamp', full_name='dfx.proto.general.HeartbeatReadResponse.timestamp', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=518, serialized_end=577, ) _HEARTBEATWRITEREQUEST = _descriptor.Descriptor( name='HeartbeatWriteRequest', full_name='dfx.proto.general.HeartbeatWriteRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='UUID', full_name='dfx.proto.general.HeartbeatWriteRequest.UUID', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='Mode', full_name='dfx.proto.general.HeartbeatWriteRequest.Mode', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=579, serialized_end=630, ) _HEARTBEATWRITERESPONSE = _descriptor.Descriptor( name='HeartbeatWriteResponse', full_name='dfx.proto.general.HeartbeatWriteResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='success', full_name='dfx.proto.general.HeartbeatWriteResponse.success', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='stats', full_name='dfx.proto.general.HeartbeatWriteResponse.stats', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=632, serialized_end=713, ) _STATUSRESPONSE_NOTE.containing_type = _STATUSRESPONSE _STATUSRESPONSE_NOTESENTRY.fields_by_name['value'].message_type = _STATUSRESPONSE_NOTE _STATUSRESPONSE_NOTESENTRY.containing_type = _STATUSRESPONSE _STATUSRESPONSE.fields_by_name['Notes'].message_type = _STATUSRESPONSE_NOTESENTRY _MIMETYPESRESPONSE_MIMETYPE.containing_type = _MIMETYPESRESPONSE _MIMETYPESRESPONSE.fields_by_name['Values'].message_type = _MIMETYPESRESPONSE_MIMETYPE _HEARTBEATWRITERESPONSE.fields_by_name['stats'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT DESCRIPTOR.message_types_by_name['StatusRequest'] = _STATUSREQUEST DESCRIPTOR.message_types_by_name['StatusResponse'] = _STATUSRESPONSE DESCRIPTOR.message_types_by_name['MimeTypesRequest'] = _MIMETYPESREQUEST DESCRIPTOR.message_types_by_name['MimeTypesResponse'] = _MIMETYPESRESPONSE DESCRIPTOR.message_types_by_name['HeartbeatReadRequest'] = _HEARTBEATREADREQUEST DESCRIPTOR.message_types_by_name['HeartbeatReadResponse'] = _HEARTBEATREADRESPONSE DESCRIPTOR.message_types_by_name['HeartbeatWriteRequest'] = _HEARTBEATWRITEREQUEST DESCRIPTOR.message_types_by_name['HeartbeatWriteResponse'] = _HEARTBEATWRITERESPONSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) StatusRequest = _reflection.GeneratedProtocolMessageType('StatusRequest', (_message.Message,), { 'DESCRIPTOR' : _STATUSREQUEST, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.StatusRequest) }) _sym_db.RegisterMessage(StatusRequest) StatusResponse = _reflection.GeneratedProtocolMessageType('StatusResponse', (_message.Message,), { 'Note' : _reflection.GeneratedProtocolMessageType('Note', (_message.Message,), { 'DESCRIPTOR' : _STATUSRESPONSE_NOTE, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.StatusResponse.Note) }) , 'NotesEntry' : _reflection.GeneratedProtocolMessageType('NotesEntry', (_message.Message,), { 'DESCRIPTOR' : _STATUSRESPONSE_NOTESENTRY, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.StatusResponse.NotesEntry) }) , 'DESCRIPTOR' : _STATUSRESPONSE, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.StatusResponse) }) _sym_db.RegisterMessage(StatusResponse) _sym_db.RegisterMessage(StatusResponse.Note) _sym_db.RegisterMessage(StatusResponse.NotesEntry) MimeTypesRequest = _reflection.GeneratedProtocolMessageType('MimeTypesRequest', (_message.Message,), { 'DESCRIPTOR' : _MIMETYPESREQUEST, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.MimeTypesRequest) }) _sym_db.RegisterMessage(MimeTypesRequest) MimeTypesResponse = _reflection.GeneratedProtocolMessageType('MimeTypesResponse', (_message.Message,), { 'MimeType' : _reflection.GeneratedProtocolMessageType('MimeType', (_message.Message,), { 'DESCRIPTOR' : _MIMETYPESRESPONSE_MIMETYPE, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.MimeTypesResponse.MimeType) }) , 'DESCRIPTOR' : _MIMETYPESRESPONSE, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.MimeTypesResponse) }) _sym_db.RegisterMessage(MimeTypesResponse) _sym_db.RegisterMessage(MimeTypesResponse.MimeType) HeartbeatReadRequest = _reflection.GeneratedProtocolMessageType('HeartbeatReadRequest', (_message.Message,), { 'DESCRIPTOR' : _HEARTBEATREADREQUEST, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.HeartbeatReadRequest) }) _sym_db.RegisterMessage(HeartbeatReadRequest) HeartbeatReadResponse = _reflection.GeneratedProtocolMessageType('HeartbeatReadResponse', (_message.Message,), { 'DESCRIPTOR' : _HEARTBEATREADRESPONSE, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.HeartbeatReadResponse) }) _sym_db.RegisterMessage(HeartbeatReadResponse) HeartbeatWriteRequest = _reflection.GeneratedProtocolMessageType('HeartbeatWriteRequest', (_message.Message,), { 'DESCRIPTOR' : _HEARTBEATWRITEREQUEST, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.HeartbeatWriteRequest) }) _sym_db.RegisterMessage(HeartbeatWriteRequest) HeartbeatWriteResponse = _reflection.GeneratedProtocolMessageType('HeartbeatWriteResponse', (_message.Message,), { 'DESCRIPTOR' : _HEARTBEATWRITERESPONSE, '__module__' : 'general_pb2' # @@protoc_insertion_point(class_scope:dfx.proto.general.HeartbeatWriteResponse) }) _sym_db.RegisterMessage(HeartbeatWriteResponse) DESCRIPTOR._options = None _STATUSRESPONSE_NOTESENTRY._options = None _SERVICES = _descriptor.ServiceDescriptor( name='Services', full_name='dfx.proto.general.Services', file=DESCRIPTOR, index=0, serialized_options=None, create_key=_descriptor._internal_create_key, serialized_start=716, serialized_end=897, methods=[ _descriptor.MethodDescriptor( name='Status', full_name='dfx.proto.general.Services.Status', index=0, containing_service=None, input_type=_STATUSREQUEST, output_type=_STATUSRESPONSE, serialized_options=None, create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name='MimeTypes', full_name='dfx.proto.general.Services.MimeTypes', index=1, containing_service=None, input_type=_MIMETYPESREQUEST, output_type=_MIMETYPESRESPONSE, serialized_options=None, create_key=_descriptor._internal_create_key, ), ]) _sym_db.RegisterServiceDescriptor(_SERVICES) DESCRIPTOR.services_by_name['Services'] = _SERVICES # @@protoc_insertion_point(module_scope)
37.191489
1,516
0.762061
2,433
20,976
6.24291
0.091656
0.039107
0.050365
0.058661
0.656594
0.612549
0.557245
0.516163
0.510501
0.495029
0
0.028884
0.115322
20,976
563
1,517
37.257549
0.789621
0.048341
0
0.656064
1
0.001988
0.200953
0.152068
0
0
0
0
0
1
0
false
0
0.00994
0
0.00994
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
680f832a8e51ffccdaaacbc8cda753682381de8b
1,459
py
Python
coreapp/migrations/0014_auto_20200129_1801.py
Quanscendence/braynai
ab828ca95571c6dffef2b2392522e6a4160a2304
[ "MIT" ]
null
null
null
coreapp/migrations/0014_auto_20200129_1801.py
Quanscendence/braynai
ab828ca95571c6dffef2b2392522e6a4160a2304
[ "MIT" ]
null
null
null
coreapp/migrations/0014_auto_20200129_1801.py
Quanscendence/braynai
ab828ca95571c6dffef2b2392522e6a4160a2304
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-01-29 12:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coreapp', '0013_auto_20200128_0922'), ] operations = [ migrations.AddField( model_name='projectquery', name='color', field=models.CharField(blank=True, max_length=200, null=True), ), migrations.AddField( model_name='projectquery', name='legend', field=models.BooleanField(default=False), ), migrations.AddField( model_name='projectquery', name='plot_type', field=models.CharField(blank=True, choices=[('scatter_2d', 'scatter_2d'), ('scatter_3d', 'scatter_3d'), ('bar', 'bar'), ('line_2d', 'line_2d'), ('line_3d', 'line_3d'), ('histogram', 'histogram')], max_length=20, null=True), ), migrations.AddField( model_name='projectquery', name='x_axis', field=models.CharField(blank=True, max_length=200, null=True), ), migrations.AddField( model_name='projectquery', name='y_axis', field=models.CharField(blank=True, max_length=200, null=True), ), migrations.AddField( model_name='projectquery', name='z_axis', field=models.CharField(blank=True, max_length=200, null=True), ), ]
33.159091
235
0.573681
150
1,459
5.406667
0.366667
0.133169
0.17016
0.199753
0.620222
0.584464
0.478422
0.478422
0.415536
0.415536
0
0.049952
0.286498
1,459
43
236
33.930233
0.729107
0.029472
0
0.594595
1
0
0.164074
0.016266
0
0
0
0
0
1
0
false
0
0.027027
0
0.108108
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
6813b3192cee93eb1565d7f9b9337b25efbfcf47
247
py
Python
If-else.py
Arnaav-Singh/Beginner-code
84063cdc0bafadd86e853fdfeb3eaa0230fa5570
[ "MIT" ]
null
null
null
If-else.py
Arnaav-Singh/Beginner-code
84063cdc0bafadd86e853fdfeb3eaa0230fa5570
[ "MIT" ]
null
null
null
If-else.py
Arnaav-Singh/Beginner-code
84063cdc0bafadd86e853fdfeb3eaa0230fa5570
[ "MIT" ]
null
null
null
a = int(input("Enter the First Number: "))# Inputing the first number b = int(input("Enter the seconf Number: "))#inputing the second number if(a>=b):#cheking if the first print(a, "is greater") else: print(b, "is greater")
27.444444
72
0.635628
38
247
4.131579
0.447368
0.152866
0.165605
0.203822
0
0
0
0
0
0
0
0
0.222672
247
8
73
30.875
0.817708
0.287449
0
0
0
0
0.426829
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
0
0
0
null
0
0
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
0
0
0
2
6813ce7054edc2757f28fd3dfeb3251078251c3e
11,976
py
Python
GeneralApp/views.py
MedicalAppInfibeam/med4u
4c3796704da5e302dafac9feb8c16e668d30b105
[ "MIT" ]
2
2017-06-12T09:15:28.000Z
2017-06-26T05:28:14.000Z
GeneralApp/views.py
MedicalAppInfibeam/med4u
4c3796704da5e302dafac9feb8c16e668d30b105
[ "MIT" ]
50
2017-06-07T07:18:56.000Z
2017-07-13T06:23:10.000Z
GeneralApp/views.py
MedicalAppInfibeam/DoctorsWebApp
4c3796704da5e302dafac9feb8c16e668d30b105
[ "MIT" ]
2
2017-09-10T06:59:26.000Z
2018-04-29T13:41:28.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.forms import ( AuthenticationForm, PasswordChangeForm, PasswordResetForm, SetPasswordForm, ) from django.urls import reverse from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth import authenticate, login, logout from django.views.generic import View from .forms import * from django.views import generic from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from django.contrib.auth.decorators import login_required from .models import * from ProfileApp.models import Profile from MyHealthApp.models import * from MyHealthApp.models import Symptom, Procedure, Bodypart, Medicine, Doctor import os from rest_framework.views import APIView from GeneralApp.serializers import LoginSerializer from rest_framework.response import Response from rest_framework import generics # Create your views here. def page_not_found_view(request): # return render(request,'GeneralApp/404.html') response = render(request, 'GeneralApp/404.html') response.status_code = 404 return response class LoginFormView(View): form_class = LoginForm context = "" def get(self, request): form = self.form_class(None) context = "" return render(request, 'GeneralApp/login.html', {'form': form, 'context': context}) def post(self, request): form = self.form_class(None) # cleaned (normalized) data context = "" username = request.POST['username'] password = request.POST['password'] # returns User objects if credentials are correct user = authenticate(username=username, password=password) if user is not None: if user.is_active: login(request, user) return HttpResponseRedirect('/dashboard') else: context = "User is banned" else: context = "Incorrect username or password" return render(request, 'GeneralApp/login.html', {'form': form, 'context': context}) class UserFormView(View): form_class = UserForm context = "" def get(self, request): form = self.form_class(None) context = "" return render(request, 'GeneralApp/registration.html', {'form': form, 'context': context}) def post(self, request): form = self.form_class(request.POST) context = "" if form.is_valid(): user = form.save(commit=False) # cleaned (normalized) data username1 = form.cleaned_data['username1'] password1 = form.cleaned_data['password1'] password2 = form.cleaned_data['password2'] if password1 != password2: context = "Passwords do not match." return render(request, 'GeneralApp/registration.html', {'form': form, 'context': context}) user.set_password(password1) user.save() # returns User objects if credentials are correct user = authenticate(username=username1, password=password1) if user is not None: if user.is_active: login(request, user) return HttpResponseRedirect('/dashboard') else: context = "Existing user is banned." else: context = "Please select a unique username." return render(request, 'GeneralApp/registration.html', {'form': form, 'context': context}) def redirect_to_dashboard(request): return HttpResponseRedirect('/dashboard/') class Tnc(generic.TemplateView): template_name = 'GeneralApp/tnc.html' class AboutUs(generic.TemplateView): template_name = 'GeneralApp/about.html' def SymptomsView(request): return render(request,'GeneralApp/symptoms.html', {'current_user': request.user}) def BodypartSymptomList(request,symptom_part): if request.method == 'GET': part_symptoms = Symptom.objects.filter(bodypart__bodypart=symptom_part) bodypart = Bodypart.objects.filter(bodypart=symptom_part).first() return render(request, 'GeneralApp/symptomlist.html', {'symptoms' : part_symptoms, 'part' : symptom_part, 'part_id' : bodypart.id, 'current_user':request.user}) def SymptomDetails(request, symptom_part, symp_id): symptoms_list = Symptom.objects.filter(bodypart__bodypart=symptom_part) current_part = Bodypart.objects.get(bodypart=symptom_part) current_symptom = Symptom.objects.get(id=symp_id) bodyparts = Bodypart.objects.filter(BPsymptom__id=symp_id) s = Symptom.objects.get(id=symp_id) videos = s.symptom_videos_set.all() diseases = Disease.objects.filter(symptom=symp_id) if request.method == 'GET': return render(request, 'GeneralApp/symptom_details.html', {'symptoms': symptoms_list, 'current_user': request.user, 'part':symptom_part, 'current_symptom': current_symptom, 'bodyparts': bodyparts, 'videos': videos, 'diseases': diseases ,'current_user':request.user}) def procedures(request): procedures_list = Procedure.objects.all() if request.method == 'GET': return render(request, 'GeneralApp/procedures.html', {'procedures': procedures_list, 'current_user': request.user}) def procedure_details(request, proc_id): procedures_list = Procedure.objects.all() current_procedure = Procedure.objects.get(id=proc_id) bodyparts = Bodypart.objects.filter(procedure__id=proc_id) symptoms = Symptom.objects.filter(procedure__id=proc_id) medicines = Medicine.objects.filter(procedure__id=proc_id) doctors = Doctor.objects.filter(procedure__id=proc_id) p = Procedure.objects.get(pk=proc_id) images = p.procedure_images_set.all() videos = p.procedure_videos_set.all() helplines = p.procedure_helpline_set.all() if request.method == 'GET': return render(request, 'GeneralApp/procedures-test.html', {'procedures': procedures_list, 'current_user': request.user, 'current_procedure': current_procedure, 'bodyparts': bodyparts, 'symptoms': symptoms, 'medicines': medicines, 'doctors': doctors, 'images': images, 'videos': videos, 'helplines': helplines}) def doctors(request): doctors_list = Doctor.objects.all() if request.method == 'GET': return render(request, 'GeneralApp/find-doctors.html', {'doctors': doctors_list, 'current_user': request.user}) def doctor_details(request, doc_id): doctors_list = Doctor.objects.all() current_doctor = Doctor.objects.get(id=doc_id) current_user = request.user user_flag = True already_exist = True if not (current_user.is_anonymous): if current_user.doctor_set.filter(pk=doc_id).count() > 0: already_exist = True else: already_exist = False else: user_flag = False if request.method == 'GET': return render(request, 'GeneralApp/doctors-list.html', {'user_flag': user_flag, 'already_exist': already_exist, 'doctors': doctors_list, 'current_user': request.user, 'current_doctor': current_doctor}) def doctors_map(request): if request.method == 'GET': return render(request, 'GeneralApp/find-doctors-map.html', {'current_user': request.user}) def medicines(request): medicines_list = Medicine.objects.all() if request.method == 'GET': return render(request, 'GeneralApp/medicines.html', {'medicines': medicines_list, 'current_user': request.user}) def medicine_details(request, med_id): medicines_list = Medicine.objects.all() current_medicine = Medicine.objects.get(id=med_id) current_user = request.user user_flag = True already_exist = True if not (current_user.is_anonymous): if current_user.medicine_set.filter(pk=med_id).count() > 0: already_exist = True else: already_exist = False else: user_flag = False if request.method == 'GET': return render(request, 'GeneralApp/medicine_details.html', {'user_flag': user_flag, 'already_exist': already_exist, 'medicines': medicines_list, 'current_user': request.user, 'current_medicine': current_medicine}) def diseases(request): disease_list = Disease.objects.all() if request.method == 'GET': return render(request, 'GeneralApp/diseases.html', {'diseases': disease_list, 'current_user': request.user}) def disease_details(request, dis_id): disease_list = Disease.objects.all() current_disease = Disease.objects.get(id=dis_id) symptoms = Symptom.objects.filter(id=dis_id) medicines = Medicine.objects.filter(disease__id=dis_id) procedures = Procedure.objects.filter(disease__id=dis_id) current_user = request.user user_flag = True already_exist = True if not (current_user.is_anonymous): if current_user.disease_set.filter(pk=dis_id).count() > 0: already_exist = True else: already_exist = False else: user_flag = False if request.method == 'GET': return render(request, 'GeneralApp/disease_details.html', {'user_flag': user_flag, 'already_exist': already_exist, 'symptoms': symptoms, 'medicines': medicines, 'procedures': procedures ,'diseases': disease_list, 'current_user': request.user, 'current_disease': current_disease}) def contacts(request): country_list = Country.objects.all() if request.method == 'GET': return render(request, 'GeneralApp/contacts.html', {'countries': country_list, 'current_user': request.user}) def contact_details(request, con_id): country_list = Country.objects.all() current_country = Country.objects.get(id=con_id) contacts_list = current_country.emergencycontact_set.all() print contacts_list[0].contact if request.method == 'GET': return render(request, 'GeneralApp/contact_details.html', {'countries': country_list, 'contacts_list': contacts_list,'current_user': request.user}) @login_required def AddGeneralMedicine(request): current_user = request.user if request.method == 'POST': temp_id = request.POST['med_id'] current_user.medicine_set.add(Medicine.objects.get(pk=temp_id)) return HttpResponseRedirect('/my_medicines/' + str(temp_id)) @login_required def AddGeneralDoctor(request): current_user = request.user if request.method == 'POST': temp_id = request.POST['doc_id'] current_user.doctor_set.add(Doctor.objects.get(pk=temp_id)) return HttpResponseRedirect('/my_doctors/' + str(temp_id)) @login_required def AddGeneralDisease(request): current_user = request.user if request.method == 'POST': temp_id = request.POST['dis_id'] current_user.disease_set.add(Disease.objects.get(pk=temp_id)) return HttpResponseRedirect('/my_diseases/' + str(temp_id)) class Login_api(APIView): # def get(request): # profile = Profile.objects.all() # serializer = ProfileSerializer(profile) # return Response(serializer.data) def post(self, request): data = request.POST serializer = LoginSerializer(data) username = serializer.data['username'] password = serializer.data['password'] user=authenticate(username=username, password=password) if user == None: return HttpResponse("Wrong Username or Password") if user.is_active: login(request, user) return HttpResponse( user.id ) @login_required def Logout_api(request): logout(request) return HttpResponse("User Logged out")
33.082873
251
0.674098
1,356
11,976
5.779499
0.134956
0.042108
0.061631
0.058951
0.523415
0.439837
0.379227
0.334822
0.277912
0.272298
0
0.002664
0.216349
11,976
362
252
33.082873
0.832392
0.031146
0
0.394191
0
0
0.133983
0.046674
0
0
0
0
0
0
null
null
0.053942
0.087137
null
null
0.004149
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
0
0
1
0
0
1
0
0
0
0
0
2
68173036c2ae1a375f0f596a909a6f9e112a4707
6,610
py
Python
mailpy/contrib/pelican/content.py
dn0/mailpy
db382d9d67a34444b8492bb0766b7320e46a0ac0
[ "BSD-3-Clause" ]
1
2015-10-05T12:01:19.000Z
2015-10-05T12:01:19.000Z
mailpy/contrib/pelican/content.py
dn0/mailpy
db382d9d67a34444b8492bb0766b7320e46a0ac0
[ "BSD-3-Clause" ]
3
2015-08-20T08:47:08.000Z
2015-10-17T13:52:57.000Z
mailpy/contrib/pelican/content.py
dn0/mailpy
db382d9d67a34444b8492bb0766b7320e46a0ac0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import re import os import codecs from pelican.readers import parse_path_metadata from .exceptions import FileNotFound, FileAlreadyExists, UnknownFileFormat __all__ = ('PelicanContentFile', 'PelicanArticle', 'RstArticle', 'MarkdownArticle') class PelicanContentFile(object): """ Base container for any pelican content file. This is basically a filename with some advanced attributes. The content attribute should always be stored as byte str. """ encoding = None def __init__(self, content_path, filename, content=None, encoding=None): self.content_path = content_path self.filename = filename self.extension = os.path.splitext(filename)[1] self._content = content self.encoding = encoding or self.encoding def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self.filename.encode('ascii', errors='backslashreplace')) def __str__(self): return '%s' % self.filename def __unicode__(self): return '%s' % self.filename def __eq__(self, other): return self.filename == other def __ne__(self, other): return self.filename != other def __hash__(self): return self.filename.__hash__() def __nonzero__(self): return bool(self.filename) __bool__ = __nonzero__ @property def content(self): if self._content is None: raise ValueError('file content is not loaded') return self._content @content.setter def content(self, value): self._content = value @property def full_path(self): """Get file full path""" return os.path.abspath(os.path.join(self.content_path, self.filename)) def exists(self): """Return True if file exists on FS""" return os.path.isfile(self.full_path) # noinspection PyMethodMayBeStatic def _delete(self, file_path): """Actual file delete operation""" os.remove(file_path) def delete(self): """Remove file from disk""" if not self.exists(): raise FileNotFound(self) self._delete(self.full_path) def _load(self, file_path): """Actual file read operation""" with codecs.open(file_path, mode='rb', encoding=self.encoding) as fp: return fp.read() def load(self): """Load and return file content from disk""" if not self.exists(): raise FileNotFound(self) self.content = self._load(self.full_path) return self.content def _save(self, file_path, content): """Actual file write operation""" with codecs.open(file_path, mode='wb', encoding=self.encoding) as fp: fp.write(content) def save(self): """Write file content to disk""" if self.exists(): raise FileAlreadyExists(self) self._save(self.full_path, self.content) class PelicanArticle(PelicanContentFile): """ Base class for article formats. The content should always be a unicode str. """ encoding = 'utf-8' extension = NotImplemented re_metadata = NotImplemented def _load(self, file_path): """Read text file content from disk (pelican style)""" content = super(PelicanArticle, self)._load(file_path) if content[0] == codecs.BOM_UTF8.decode(self.encoding): content = content[1:] return content def get_path_metadata(self, settings): """Parse file metadata from file's path""" return parse_path_metadata(self.filename, settings=settings) def _parse_metadata(self, metadata, line): """Parse metadata from one line of text and update the metadata dict""" found = self.re_metadata.match(line) if found: metadata[found.group(1).lower()] = found.group(2) return True else: return False def get_text_metadata(self, text): """Separate metadata from text and return (new text, metadata) tuple""" metadata = {} new_text = '\n'.join(line for line in text.splitlines() if not self._parse_metadata(metadata, line)) return new_text, metadata def _compose(self, title, text, metadata): """Return new content from supplied parameters""" raise NotImplementedError def compose(self, title, text, metadata): """Create and set new content""" self.content = self._compose(title, text, metadata) return self.content def internal_link(self, text, uri): raise NotImplementedError def image(self, alt, uri): raise NotImplementedError class RstArticle(PelicanArticle): """ Article stored in reStructuredText format. """ extension = '.rst' file_extensions = ('rst',) re_metadata = re.compile(r'^:(\w+):\s+(.+)$') def _compose(self, title, text, metadata): return '%(title)s\n%(title_underscore)s\n\n%(metadata)s\n\n%(text)s\n' % { 'title': title, 'title_underscore': '#' * len(title), 'metadata': '\n'.join(':%s: %s' % i for i in metadata.items()), 'text': text, } def internal_link(self, text, uri): return '`%s <%s>`_' % (text, uri) def image(self, alt, uri): return '.. image:: %s\n :alt: %s' % (uri, alt) class MarkdownArticle(PelicanArticle): """ Article stored in markdown format. """ extension = '.md' file_extensions = ('md', 'markdown', 'mkd', 'mdown') re_metadata = re.compile(r'^ ([A-Z]\w*):\s+(.+)$') def _compose(self, title, text, metadata): metadata['title'] = title return '%(metadata)s\n\n# %(title)s\n\n%(text)s\n' % { 'metadata': '\n'.join(' %s: %s' % (k.title(), v) for k, v in metadata.items()), 'title': title, 'text': text, } def internal_link(self, text, uri): return '[%s](%s)' % (text, uri) def image(self, alt, uri): return '![%s](%s)' % (alt, uri) ARTICLE_CLASSES = (RstArticle, MarkdownArticle) def pelican_article(content_path, filename, **kwargs): """Return PelicanArticle object according to file extensions""" supported_classes = kwargs.pop('supported_classes', ARTICLE_CLASSES) ext = os.path.splitext(filename)[1].lstrip('.') for cls in supported_classes: if ext in cls.file_extensions: return cls(content_path, filename, **kwargs) raise UnknownFileFormat('Unsupported article format: %s' % ext)
29.247788
109
0.620424
788
6,610
5.03934
0.224619
0.033241
0.021405
0.019139
0.219088
0.155628
0.123646
0.077562
0.060942
0.060942
0
0.001825
0.254009
6,610
225
110
29.377778
0.803488
0.142814
0
0.210526
0
0.015038
0.085191
0.015226
0
0
0
0
0
1
0.24812
false
0
0.045113
0.090226
0.593985
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
0
0
0
1
0
0
0
0
1
0
0
2
a83cc897b313e3c6c79590a379beffa30d52a3d7
139
py
Python
pairwisedist/__init__.py
GuyTeichman/pairwisedist
3ad7d3dd4de45299dcc816e9ac7ed2a772dc8374
[ "Apache-2.0" ]
1
2022-02-02T17:10:44.000Z
2022-02-02T17:10:44.000Z
pairwisedist/__init__.py
GuyTeichman/pairwisedist
3ad7d3dd4de45299dcc816e9ac7ed2a772dc8374
[ "Apache-2.0" ]
2
2021-06-09T17:59:59.000Z
2021-11-15T17:53:30.000Z
pairwisedist/__init__.py
GuyTeichman/pairwisedist
3ad7d3dd4de45299dcc816e9ac7ed2a772dc8374
[ "Apache-2.0" ]
null
null
null
__name__ = "pairwisedist" __author__ = """Guy Teichman""" __email__ = "guyteichman@gmail.com" __version__ = "1.1.0" __license__ = "Apache"
23.166667
35
0.719424
15
139
5.333333
0.933333
0
0
0
0
0
0
0
0
0
0
0.02439
0.115108
139
5
36
27.8
0.626016
0
0
0
0
0
0.402878
0.151079
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
0
0
0
2
a84690c2572457bfc38edeb0234960e38c812962
1,678
py
Python
vipy/version.py
williford/vipy
d7ce90cfa3c11363ca9e9fcb1fcea9371aa1b74d
[ "MIT" ]
null
null
null
vipy/version.py
williford/vipy
d7ce90cfa3c11363ca9e9fcb1fcea9371aa1b74d
[ "MIT" ]
null
null
null
vipy/version.py
williford/vipy
d7ce90cfa3c11363ca9e9fcb1fcea9371aa1b74d
[ "MIT" ]
null
null
null
MAJOR = 1 MINOR = 11 RELEASE = 10 VERSION = '%d.%d.%d' % (MAJOR, MINOR, RELEASE) def num(versionstring=VERSION): """Convert the version string of the form 'X.Y.Z' to an integer 100000*X + 100*Y + Z for version comparison""" (major, minor, release) = versionstring.split('.') return 100*100*int(major) + 100*int(minor) + int(release) def split(versionstring): """Split the version string 'X.Y.Z' and return tuple (int(X), int(Y), int(Z))""" assert versionstring.count('.') == 2, "Version string must be of the form str('X.Y.Z')" return tuple([int(x) for x in versionstring.split('.')]) def major(versionstring=VERSION): """Return the major version number int(X) for versionstring 'X.Y.Z'""" return split(versionstring)[0] def minor(versionstring=VERSION): """Return the minor version number int(Y) for versionstring 'X.Y.Z'""" return split(versionstring)[1] def release(versionstring=VERSION): """Return the release version number int(Z) for versionstring 'X.Y.Z'""" return split(versionstring)[2] def at_least_version(versionstring): """Is versionstring='X.Y.Z' at least the current version?""" return num(VERSION) >= num(versionstring) def is_at_least(versionstring): """Synonym for at_least_version""" return num(VERSION) >= num(versionstring) def is_exactly(versionstring): """Is the versionstring = 'X,Y.Z' exactly equal to vipy.__version__""" return versionstring == VERSION def at_least_major_version(major): """is the major version (e.g. X, for version X.Y.Z) greater than or equal to the major version integer supplied?""" return MAJOR >= int(major)
31.074074
119
0.676996
241
1,678
4.655602
0.224066
0.017825
0.024064
0.071301
0.193405
0.193405
0.193405
0.193405
0
0
0
0.019594
0.178784
1,678
53
120
31.660377
0.79463
0.378427
0
0.083333
0
0
0.058291
0
0
0
0
0
0.041667
1
0.375
false
0
0
0
0.75
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
0
0
0
1
0
0
0
0
1
0
0
2
a8768bad7d3ab5c9bad9a402c50794b34ef4eedd
910
py
Python
Python Programs/reverse-string-rank-among-substrings.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
2
2021-06-26T21:50:59.000Z
2021-09-18T04:55:51.000Z
Python Programs/reverse-string-rank-among-substrings.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
null
null
null
Python Programs/reverse-string-rank-among-substrings.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
null
null
null
Reverse String Rank among SubStrings A string S is passed as the input. The program must generate the set (all unique) of all the substrings of S in the reverse order and then sort that set lexicographically. Now the program must print the rank of the reverse of the string S in the new set formed. Note: - String S contains only lowercase English letters. - Time complexity matters, optimize your algorithm Boundary Condition(s): 1 <= Length of S <= 100 Input Format: The first line contains S. Output Format: The first line contains the integer value denoting the rank. Example Input/Output 1: Input: eren Output: 7 Explanation: Reverse of eren is nere Lexicograhically sorted set of unique substrings of nere is e er ere n ne ner nere r re In this nere appears in the 7th position. n=input().strip()[::-1] r=[n[i:j] for i in range(len(n)) for j in range(i+1,len(n)+1)] k=sorted(set(r)) print(k.index(n)+1)
26.764706
261
0.76044
170
910
4.076471
0.482353
0.030303
0.040404
0.051948
0.075036
0
0
0
0
0
0
0.014493
0.165934
910
33
262
27.575758
0.897233
0
0
0
1
0
0
0
0
0
0
0
0
0
null
null
0.030303
0
null
null
0.060606
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
a87b049e11656b5ee4d679726945b32ede6dd963
365
py
Python
tasks/ops.py
makidai/makino_blog
a0a05eaea76a2208c5c34ee6e60cebafaa737b5b
[ "MIT" ]
null
null
null
tasks/ops.py
makidai/makino_blog
a0a05eaea76a2208c5c34ee6e60cebafaa737b5b
[ "MIT" ]
null
null
null
tasks/ops.py
makidai/makino_blog
a0a05eaea76a2208c5c34ee6e60cebafaa737b5b
[ "MIT" ]
null
null
null
# coding: utf-8 import logging from django.db.models.query import F from blog.models import Blog from tasks import app logger = logging.getLogger(__name__) @app.task(name="ops.update_art_like") def update_art_like(pk): """ 記事の「いいね!」数の更新 """ Blog.objects.filter(pk=pk).update(like=F("like") + 1) logger.info("記事の「いいね!」を更新する: {}".format(pk))
19.210526
57
0.684932
57
365
4.245614
0.578947
0.07438
0.107438
0
0
0
0
0
0
0
0
0.006472
0.153425
365
18
58
20.277778
0.776699
0.076712
0
0
0
0
0.127726
0
0
0
0
0
0
1
0.111111
false
0
0.444444
0
0.555556
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
0
0
0
0
0
0
1
0
1
0
0
2
a87f1d28a46a04f7520345a2e7cb0ef7f81c2635
670
py
Python
newsletter_automation/newsletter/__init__.py
indiranell/newsletter_automation
be5a78a47a95c29363fd427373afa5c5d5b64335
[ "MIT" ]
null
null
null
newsletter_automation/newsletter/__init__.py
indiranell/newsletter_automation
be5a78a47a95c29363fd427373afa5c5d5b64335
[ "MIT" ]
13
2021-06-17T14:30:47.000Z
2022-02-14T14:56:45.000Z
newsletter_automation/newsletter/__init__.py
indiranell/newsletter_automation
be5a78a47a95c29363fd427373afa5c5d5b64335
[ "MIT" ]
8
2021-06-09T05:55:52.000Z
2022-02-02T05:53:40.000Z
#!/bin/env python import os from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__name__) db_user = os.environ.get("MYSQL_USERNAME","root") db_password = os.environ.get("MYSQL_PASSWORD","root") app.config['SQLALCHEMY_DATABASE_URI'] = f'mysql+pymysql://{db_user}:{db_password}@127.0.0.1/newsletter_automation' app.config['SECRET_KEY'] = "random string" app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config.from_object(__name__) db = SQLAlchemy(app) migrate = Migrate() migrate.init_app(app, db) from newsletter import models from newsletter import routes from newsletter import schedule_form_routes
30.454545
114
0.797015
97
670
5.237113
0.43299
0.070866
0.11811
0.066929
0
0
0
0
0
0
0
0.00982
0.08806
670
21
115
31.904762
0.821604
0.023881
0
0
0
0
0.280245
0.189893
0
0
0
0
0
1
0
false
0.117647
0.411765
0
0.411765
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
0
0
0
0
0
1
1
0
0
0
0
2
a884e21011d3f490f0a6edf8924eb5801718a3ee
599
py
Python
dfs.py
hellokayas/Some-Programming-Samples
2d928845693d04e5783b4dbaa78fa6637b0739fd
[ "MIT" ]
null
null
null
dfs.py
hellokayas/Some-Programming-Samples
2d928845693d04e5783b4dbaa78fa6637b0739fd
[ "MIT" ]
null
null
null
dfs.py
hellokayas/Some-Programming-Samples
2d928845693d04e5783b4dbaa78fa6637b0739fd
[ "MIT" ]
1
2021-08-30T23:14:29.000Z
2021-08-30T23:14:29.000Z
#returns the set of reachable vertices assuming G is represented via adjacency lists. # Assumes that the graph is a dictionary and each adjacency list is a set. def reachable(G,v): rset = set() def dfs(w): rset.add(w) for ngh in G[w]: if not (ngh in rset): dfs(ngh) return dfs(v) return(rset) G = {} G[0] = {1,2,3} G[1] = {0,3} G[2] = {} G[3] = {1,4,2} G[4] = {5,6} G[5] = {4} G[7] = {5,6} G[6] = {5,7} print(reachable(G,0)) print(reachable(G,1)) print(reachable(G,2)) print(reachable(G,3)) print(reachable(G,4)) print(reachable(G,5)) print(reachable(G,6)) print(reachable(G,7))
18.151515
85
0.626043
120
599
3.125
0.35
0.24
0.32
0
0
0
0
0
0
0
0
0.062626
0.173623
599
32
86
18.71875
0.694949
0.262104
0
0
0
0
0
0
0
0
0
0
0
1
0.074074
false
0
0
0
0.111111
0.296296
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
0
0
0
0
0
0
0
2
a88cc005ddb30da556d5bd7bc0c8aabc68397dca
2,018
py
Python
cats/v3/scheme.py
AdamBrianBright/cats-python
163cbde06c0d56520c217c0d66ddca34c7e0f63b
[ "MIT" ]
2
2021-10-04T05:39:03.000Z
2021-10-07T06:44:19.000Z
cats/v3/scheme.py
AdamBrianBright/cats-python
163cbde06c0d56520c217c0d66ddca34c7e0f63b
[ "MIT" ]
7
2021-08-17T17:50:23.000Z
2021-08-31T08:44:13.000Z
cats/v3/scheme.py
AdamBrianBright/cats-python
163cbde06c0d56520c217c0d66ddca34c7e0f63b
[ "MIT" ]
2
2021-10-01T20:58:25.000Z
2021-10-04T05:40:35.000Z
from enum import IntEnum from typing import TypeAlias import msgpack import toml import ujson import yaml __all__ = [ 'Data', 'SchemeType', 'Scheme', 'JSON', 'YAML', 'TOML', 'MsgPack', ] Data: TypeAlias = int | float | bool | str | None Data: TypeAlias = Data | list[Data] | dict[str, Data] class SchemeType(IntEnum): json = 1 yaml = 2 toml = 3 msgpack = 4 class Scheme: id: SchemeType @classmethod def loads(cls, buff: bytes | str) -> Data: """ Parse byte/str buffer to data (primitives or list/dict of primitives) :param buff: Encoded buffer :type buff: bytes | str :return: Decoded buffer """ raise NotImplementedError @classmethod def dumps(cls, data: Data) -> bytes: """ Encode data into byte buffer :param data: primitives or list/dict of primitives :type data: Data :return: Encoded buffer """ raise NotImplementedError class JSON(Scheme): id = SchemeType.json @classmethod def loads(cls, data: bytes | str) -> Data: return ujson.loads(data) @classmethod def dumps(cls, data: Data) -> bytes: return ujson.dumps(data).encode('utf-8') class YAML(Scheme): id = SchemeType.yaml @classmethod def loads(cls, buff: bytes | str) -> Data: return yaml.safe_load(buff) @classmethod def dumps(cls, data: Data) -> bytes: return yaml.safe_dump(data, encoding='utf-8') class TOML(Scheme): id = SchemeType.toml @classmethod def loads(cls, buff: bytes | str) -> Data: return toml.loads(buff) @classmethod def dumps(cls, data: Data) -> bytes: return toml.dumps(data).encode('utf-8') class MsgPack(Scheme): id = SchemeType.msgpack @classmethod def loads(cls, buff: bytes) -> Data: return msgpack.loads(buff) @classmethod def dumps(cls, data: Data) -> bytes: return msgpack.dumps(data)
20.18
77
0.605055
241
2,018
5.041494
0.236515
0.115226
0.074074
0.090535
0.409877
0.409877
0.344856
0.25679
0.19177
0.082305
0
0.004848
0.28444
2,018
99
78
20.383838
0.836565
0.131814
0
0.322581
0
0
0.032589
0
0
0
0
0
0
1
0.16129
false
0
0.096774
0.129032
0.629032
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
0
0
0
0
0
0
0
1
1
0
0
2
a88ed15aa487636d72d72297f6bd8f342bcebb5b
4,485
py
Python
interface.py
devillegna/pqm4
bc2ecc901388fa57af98cc1b5e1218d0c30a9429
[ "CC0-1.0", "MIT" ]
null
null
null
interface.py
devillegna/pqm4
bc2ecc901388fa57af98cc1b5e1218d0c30a9429
[ "CC0-1.0", "MIT" ]
null
null
null
interface.py
devillegna/pqm4
bc2ecc901388fa57af98cc1b5e1218d0c30a9429
[ "CC0-1.0", "MIT" ]
null
null
null
import subprocess import serial from mupq import mupq class M4Settings(mupq.PlatformSettings): #: Specify folders to include scheme_folders = [ # mupq.PlatformSettings.scheme_folders + [ ('pqm4', 'crypto_kem', ''), ('pqm4', 'crypto_sign', ''), ('mupq', 'mupq/crypto_kem', ''), ('mupq', 'mupq/crypto_sign', ''), ('pqclean', 'mupq/pqclean/crypto_kem', "PQCLEAN"), ('pqclean', 'mupq/pqclean/crypto_sign', "PQCLEAN"), ] #: List of dicts, in each dict specify (Scheme class) attributes of the #: scheme with values, if all attributes match the scheme is skipped. skip_list = ( {'scheme': 'bikel3', 'implementation': 'ref'}, {'scheme': 'bikel3', 'implementation': 'm4f'}, {'scheme': 'dilithium5', 'implementation': 'clean'}, {'scheme': 'falcon-1024-tree', 'implementation': 'opt-leaktime'}, {'scheme': 'falcon-1024-tree', 'implementation': 'opt-ct'}, {'scheme': 'frodokem640aes', 'implementation': 'clean'}, {'scheme': 'frodokem640aes', 'implementation': 'opt'}, {'scheme': 'frodokem976aes', 'implementation': 'clean'}, {'scheme': 'frodokem976aes', 'implementation': 'opt'}, {'scheme': 'frodokem1344aes', 'implementation': 'clean'}, {'scheme': 'frodokem1344aes', 'implementation': 'opt'}, {'scheme': 'frodokem640shake', 'implementation': 'clean'}, {'scheme': 'frodokem976shake', 'implementation': 'clean'}, {'scheme': 'frodokem976shake', 'implementation': 'opt'}, {'scheme': 'frodokem1344shake', 'implementation': 'clean'}, {'scheme': 'frodokem1344shake', 'implementation': 'opt'}, {'scheme': 'rainbowI-classic', 'implementation': 'clean'}, {'scheme': 'rainbowI-circumzenithal', 'implementation': 'clean'}, {'scheme': 'rainbowI-compressed', 'implementation': 'clean'}, {'scheme': 'rainbowIII-classic', 'implementation': 'clean'}, {'scheme': 'rainbowIII-circumzenithal', 'implementation': 'clean'}, {'scheme': 'rainbowIII-compressed', 'implementation': 'clean'}, {'scheme': 'rainbowV-classic', 'implementation': 'clean'}, {'scheme': 'rainbowV-circumzenithal', 'implementation': 'clean'}, {'scheme': 'rainbowV-compressed', 'implementation': 'clean'}, {'scheme': 'mceliece348864', 'implementation': 'clean'}, {'scheme': 'mceliece348864f', 'implementation': 'clean'}, {'scheme': 'mceliece460896', 'implementation': 'clean'}, {'scheme': 'mceliece460896f', 'implementation': 'clean'}, {'scheme': 'mceliece6688128', 'implementation': 'clean'}, {'scheme': 'mceliece6688128f', 'implementation': 'clean'}, {'scheme': 'mceliece6960119', 'implementation': 'clean'}, {'scheme': 'mceliece6960119f', 'implementation': 'clean'}, {'scheme': 'mceliece8192128', 'implementation': 'clean'}, {'scheme': 'mceliece8192128f', 'implementation': 'clean'}, {'scheme': 'mceliece348864', 'implementation': 'vec'}, {'scheme': 'mceliece348864f', 'implementation': 'vec'}, {'scheme': 'mceliece460896', 'implementation': 'vec'}, {'scheme': 'mceliece460896f', 'implementation': 'vec'}, {'scheme': 'mceliece6688128', 'implementation': 'vec'}, {'scheme': 'mceliece6688128f', 'implementation': 'vec'}, {'scheme': 'mceliece6960119', 'implementation': 'vec'}, {'scheme': 'mceliece6960119f', 'implementation': 'vec'}, {'scheme': 'mceliece8192128', 'implementation': 'vec'}, {'scheme': 'mceliece8192128f', 'implementation': 'vec'}, {'scheme': 'hqc-rmrs-192', 'implementation': 'clean'}, {'scheme': 'hqc-rmrs-256', 'implementation': 'clean'}, ) import platform class M4(mupq.Platform): def __enter__(self): if platform.system() == "Darwin": device = "/dev/tty.usbserial-0001" else: device = "/dev/ttyUSB0" self._dev = serial.Serial(device, 115200, timeout=10) return super().__enter__() def __exit__(self,*args, **kwargs): self._dev.close() return super().__exit__(*args, **kwargs) def device(self): return self._dev def flash(self, binary_path): super().flash(binary_path) subprocess.check_call( ["st-flash", "--reset", "write", binary_path, "0x8000000"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL )
45.765306
75
0.597993
357
4,485
7.422969
0.302521
0.200755
0.254717
0.036226
0.104151
0.027925
0
0
0
0
0
0.059584
0.206689
4,485
97
76
46.237113
0.685216
0.046154
0
0
0
0
0.489003
0.037904
0
0
0.002106
0
0
1
0.04878
false
0
0.04878
0.012195
0.182927
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
0
0
0
0
0
0
0
2
a88f4045dca0d077954b4250f37287e693c2bb4e
26,065
py
Python
pysnmp/ADSL-LINE-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/ADSL-LINE-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/ADSL-LINE-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ADSL-LINE-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADSL-LINE-EXT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:58:27 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # adslAtucPerfDataEntry, adslAturIntervalEntry, adslAtucIntervalEntry, adslLineAlarmConfProfileEntry, adslLineEntry, adslLineConfProfileEntry, adslAturPerfDataEntry, adslMIB = mibBuilder.importSymbols("ADSL-LINE-MIB", "adslAtucPerfDataEntry", "adslAturIntervalEntry", "adslAtucIntervalEntry", "adslLineAlarmConfProfileEntry", "adslLineEntry", "adslLineConfProfileEntry", "adslAturPerfDataEntry", "adslMIB") AdslPerfPrevDayCount, AdslPerfCurrDayCount = mibBuilder.importSymbols("ADSL-TC-MIB", "AdslPerfPrevDayCount", "AdslPerfCurrDayCount") OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint") PerfCurrentCount, PerfIntervalCount = mibBuilder.importSymbols("PerfHist-TC-MIB", "PerfCurrentCount", "PerfIntervalCount") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") Gauge32, Integer32, IpAddress, Bits, Counter32, ObjectIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, TimeTicks, ModuleIdentity, MibIdentifier, Counter64, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Integer32", "IpAddress", "Bits", "Counter32", "ObjectIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "TimeTicks", "ModuleIdentity", "MibIdentifier", "Counter64", "iso") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") adslExtMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 10, 94, 3)) adslExtMIB.setRevisions(('2002-12-10 00:00',)) if mibBuilder.loadTexts: adslExtMIB.setLastUpdated('200212100000Z') if mibBuilder.loadTexts: adslExtMIB.setOrganization('IETF ADSL MIB Working Group') adslExtMibObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1)) class AdslTransmissionModeType(TextualConvention, Bits): status = 'current' namedValues = NamedValues(("ansit1413", 0), ("etsi", 1), ("q9921PotsNonOverlapped", 2), ("q9921PotsOverlapped", 3), ("q9921IsdnNonOverlapped", 4), ("q9921isdnOverlapped", 5), ("q9921tcmIsdnNonOverlapped", 6), ("q9921tcmIsdnOverlapped", 7), ("q9922potsNonOverlapeed", 8), ("q9922potsOverlapped", 9), ("q9922tcmIsdnNonOverlapped", 10), ("q9922tcmIsdnOverlapped", 11), ("q9921tcmIsdnSymmetric", 12)) adslLineExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17), ) if mibBuilder.loadTexts: adslLineExtTable.setStatus('current') adslLineExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1), ) adslLineEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslLineExtEntry")) adslLineExtEntry.setIndexNames(*adslLineEntry.getIndexNames()) if mibBuilder.loadTexts: adslLineExtEntry.setStatus('current') adslLineTransAtucCap = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 1), AdslTransmissionModeType()).setMaxAccess("readonly") if mibBuilder.loadTexts: adslLineTransAtucCap.setStatus('current') adslLineTransAtucConfig = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 2), AdslTransmissionModeType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: adslLineTransAtucConfig.setStatus('current') adslLineTransAtucActual = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 3), AdslTransmissionModeType()).setMaxAccess("readonly") if mibBuilder.loadTexts: adslLineTransAtucActual.setStatus('current') adslLineGlitePowerState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("l0", 2), ("l1", 3), ("l3", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: adslLineGlitePowerState.setStatus('current') adslLineConfProfileDualLite = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 17, 1, 5), SnmpAdminString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: adslLineConfProfileDualLite.setStatus('current') adslAtucPerfDataExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18), ) if mibBuilder.loadTexts: adslAtucPerfDataExtTable.setStatus('current') adslAtucPerfDataExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1), ) adslAtucPerfDataEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAtucPerfDataExtEntry")) adslAtucPerfDataExtEntry.setIndexNames(*adslAtucPerfDataEntry.getIndexNames()) if mibBuilder.loadTexts: adslAtucPerfDataExtEntry.setStatus('current') adslAtucPerfStatFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 1), Counter32()).setUnits('line retrains').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatFastR.setStatus('current') adslAtucPerfStatFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 2), Counter32()).setUnits('line retrains').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatFailedFastR.setStatus('current') adslAtucPerfStatSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 3), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatSesL.setStatus('current') adslAtucPerfStatUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 4), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfStatUasL.setStatus('current') adslAtucPerfCurr15MinFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 5), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinFastR.setStatus('current') adslAtucPerfCurr15MinFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 6), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinFailedFastR.setStatus('current') adslAtucPerfCurr15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 7), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinSesL.setStatus('current') adslAtucPerfCurr15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 8), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr15MinUasL.setStatus('current') adslAtucPerfCurr1DayFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 9), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DayFastR.setStatus('current') adslAtucPerfCurr1DayFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 10), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DayFailedFastR.setStatus('current') adslAtucPerfCurr1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 11), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DaySesL.setStatus('current') adslAtucPerfCurr1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 12), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfCurr1DayUasL.setStatus('current') adslAtucPerfPrev1DayFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 13), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DayFastR.setStatus('current') adslAtucPerfPrev1DayFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 14), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DayFailedFastR.setStatus('current') adslAtucPerfPrev1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 15), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DaySesL.setStatus('current') adslAtucPerfPrev1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 18, 1, 16), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucPerfPrev1DayUasL.setStatus('current') adslAtucIntervalExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19), ) if mibBuilder.loadTexts: adslAtucIntervalExtTable.setStatus('current') adslAtucIntervalExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1), ) adslAtucIntervalEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAtucIntervalExtEntry")) adslAtucIntervalExtEntry.setIndexNames(*adslAtucIntervalEntry.getIndexNames()) if mibBuilder.loadTexts: adslAtucIntervalExtEntry.setStatus('current') adslAtucIntervalFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 1), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalFastR.setStatus('current') adslAtucIntervalFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 2), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalFailedFastR.setStatus('current') adslAtucIntervalSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 3), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalSesL.setStatus('current') adslAtucIntervalUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 19, 1, 4), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAtucIntervalUasL.setStatus('current') adslAturPerfDataExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20), ) if mibBuilder.loadTexts: adslAturPerfDataExtTable.setStatus('current') adslAturPerfDataExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1), ) adslAturPerfDataEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAturPerfDataExtEntry")) adslAturPerfDataExtEntry.setIndexNames(*adslAturPerfDataEntry.getIndexNames()) if mibBuilder.loadTexts: adslAturPerfDataExtEntry.setStatus('current') adslAturPerfStatSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 1), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfStatSesL.setStatus('current') adslAturPerfStatUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 2), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfStatUasL.setStatus('current') adslAturPerfCurr15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 3), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr15MinSesL.setStatus('current') adslAturPerfCurr15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 4), PerfCurrentCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr15MinUasL.setStatus('current') adslAturPerfCurr1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 5), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr1DaySesL.setStatus('current') adslAturPerfCurr1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 6), AdslPerfCurrDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfCurr1DayUasL.setStatus('current') adslAturPerfPrev1DaySesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 7), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfPrev1DaySesL.setStatus('current') adslAturPerfPrev1DayUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 20, 1, 8), AdslPerfPrevDayCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturPerfPrev1DayUasL.setStatus('current') adslAturIntervalExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21), ) if mibBuilder.loadTexts: adslAturIntervalExtTable.setStatus('current') adslAturIntervalExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1), ) adslAturIntervalEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAturIntervalExtEntry")) adslAturIntervalExtEntry.setIndexNames(*adslAturIntervalEntry.getIndexNames()) if mibBuilder.loadTexts: adslAturIntervalExtEntry.setStatus('current') adslAturIntervalSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1, 1), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturIntervalSesL.setStatus('current') adslAturIntervalUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 21, 1, 2), PerfIntervalCount()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: adslAturIntervalUasL.setStatus('current') adslConfProfileExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22), ) if mibBuilder.loadTexts: adslConfProfileExtTable.setStatus('current') adslConfProfileExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22, 1), ) adslLineConfProfileEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslConfProfileExtEntry")) adslConfProfileExtEntry.setIndexNames(*adslLineConfProfileEntry.getIndexNames()) if mibBuilder.loadTexts: adslConfProfileExtEntry.setStatus('current') adslConfProfileLineType = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 22, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("noChannel", 1), ("fastOnly", 2), ("interleavedOnly", 3), ("fastOrInterleaved", 4), ("fastAndInterleaved", 5))).clone('fastOnly')).setMaxAccess("readcreate") if mibBuilder.loadTexts: adslConfProfileLineType.setStatus('current') adslAlarmConfProfileExtTable = MibTable((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23), ) if mibBuilder.loadTexts: adslAlarmConfProfileExtTable.setStatus('current') adslAlarmConfProfileExtEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1), ) adslLineAlarmConfProfileEntry.registerAugmentions(("ADSL-LINE-EXT-MIB", "adslAlarmConfProfileExtEntry")) adslAlarmConfProfileExtEntry.setIndexNames(*adslLineAlarmConfProfileEntry.getIndexNames()) if mibBuilder.loadTexts: adslAlarmConfProfileExtEntry.setStatus('current') adslAtucThreshold15MinFailedFastR = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAtucThreshold15MinFailedFastR.setStatus('current') adslAtucThreshold15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAtucThreshold15MinSesL.setStatus('current') adslAtucThreshold15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAtucThreshold15MinUasL.setStatus('current') adslAturThreshold15MinSesL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAturThreshold15MinSesL.setStatus('current') adslAturThreshold15MinUasL = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 23, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 900))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: adslAturThreshold15MinUasL.setStatus('current') adslExtTraps = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24)) adslExtAtucTraps = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1)) adslExtAtucTrapsPrefix = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0)) adslAtucFailedFastRThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinFailedFastR")) if mibBuilder.loadTexts: adslAtucFailedFastRThreshTrap.setStatus('current') adslAtucSesLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 2)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinSesL")) if mibBuilder.loadTexts: adslAtucSesLThreshTrap.setStatus('current') adslAtucUasLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 1, 0, 3)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinUasL")) if mibBuilder.loadTexts: adslAtucUasLThreshTrap.setStatus('current') adslExtAturTraps = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2)) adslExtAturTrapsPrefix = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0)) adslAturSesLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinSesL")) if mibBuilder.loadTexts: adslAturSesLThreshTrap.setStatus('current') adslAturUasLThreshTrap = NotificationType((1, 3, 6, 1, 2, 1, 10, 94, 3, 1, 24, 2, 0, 2)).setObjects(("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinUasL")) if mibBuilder.loadTexts: adslAturUasLThreshTrap.setStatus('current') adslExtConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2)) adslExtGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1)) adslExtCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 2)) adslExtLineMibAtucCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 2, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslExtLineGroup"), ("ADSL-LINE-EXT-MIB", "adslExtLineConfProfileControlGroup"), ("ADSL-LINE-EXT-MIB", "adslExtLineAlarmConfProfileGroup"), ("ADSL-LINE-EXT-MIB", "adslExtAtucPhysPerfCounterGroup"), ("ADSL-LINE-EXT-MIB", "adslExtAturPhysPerfCounterGroup"), ("ADSL-LINE-EXT-MIB", "adslExtNotificationsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineMibAtucCompliance = adslExtLineMibAtucCompliance.setStatus('current') adslExtLineGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 1)).setObjects(("ADSL-LINE-EXT-MIB", "adslLineConfProfileDualLite"), ("ADSL-LINE-EXT-MIB", "adslLineTransAtucCap"), ("ADSL-LINE-EXT-MIB", "adslLineTransAtucConfig"), ("ADSL-LINE-EXT-MIB", "adslLineTransAtucActual"), ("ADSL-LINE-EXT-MIB", "adslLineGlitePowerState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineGroup = adslExtLineGroup.setStatus('current') adslExtAtucPhysPerfCounterGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 2)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucPerfStatFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfStatFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DayFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DayFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DayFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DayFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfStatSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfStatUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr15MinUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfCurr1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAtucPerfPrev1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucIntervalUasL")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtAtucPhysPerfCounterGroup = adslExtAtucPhysPerfCounterGroup.setStatus('current') adslExtAturPhysPerfCounterGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 3)).setObjects(("ADSL-LINE-EXT-MIB", "adslAturPerfStatSesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfStatUasL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr15MinUasL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfCurr1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfPrev1DaySesL"), ("ADSL-LINE-EXT-MIB", "adslAturPerfPrev1DayUasL"), ("ADSL-LINE-EXT-MIB", "adslAturIntervalSesL"), ("ADSL-LINE-EXT-MIB", "adslAturIntervalUasL")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtAturPhysPerfCounterGroup = adslExtAturPhysPerfCounterGroup.setStatus('current') adslExtLineConfProfileControlGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 4)).setObjects(("ADSL-LINE-EXT-MIB", "adslConfProfileLineType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineConfProfileControlGroup = adslExtLineConfProfileControlGroup.setStatus('current') adslExtLineAlarmConfProfileGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 5)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucThreshold15MinFailedFastR"), ("ADSL-LINE-EXT-MIB", "adslAtucThreshold15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAtucThreshold15MinUasL"), ("ADSL-LINE-EXT-MIB", "adslAturThreshold15MinSesL"), ("ADSL-LINE-EXT-MIB", "adslAturThreshold15MinUasL")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtLineAlarmConfProfileGroup = adslExtLineAlarmConfProfileGroup.setStatus('current') adslExtNotificationsGroup = NotificationGroup((1, 3, 6, 1, 2, 1, 10, 94, 3, 2, 1, 6)).setObjects(("ADSL-LINE-EXT-MIB", "adslAtucFailedFastRThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAtucSesLThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAtucUasLThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAturSesLThreshTrap"), ("ADSL-LINE-EXT-MIB", "adslAturUasLThreshTrap")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): adslExtNotificationsGroup = adslExtNotificationsGroup.setStatus('current') mibBuilder.exportSymbols("ADSL-LINE-EXT-MIB", adslAtucPerfPrev1DayFastR=adslAtucPerfPrev1DayFastR, adslAturPerfDataExtEntry=adslAturPerfDataExtEntry, adslConfProfileExtTable=adslConfProfileExtTable, adslExtAturTrapsPrefix=adslExtAturTrapsPrefix, adslAturPerfDataExtTable=adslAturPerfDataExtTable, adslAlarmConfProfileExtTable=adslAlarmConfProfileExtTable, adslExtAtucTraps=adslExtAtucTraps, adslAturIntervalUasL=adslAturIntervalUasL, adslExtAturTraps=adslExtAturTraps, adslAtucPerfCurr15MinFastR=adslAtucPerfCurr15MinFastR, adslAtucIntervalFastR=adslAtucIntervalFastR, adslAturPerfStatUasL=adslAturPerfStatUasL, adslAturPerfPrev1DaySesL=adslAturPerfPrev1DaySesL, adslExtLineConfProfileControlGroup=adslExtLineConfProfileControlGroup, adslAturIntervalSesL=adslAturIntervalSesL, adslAtucPerfCurr15MinFailedFastR=adslAtucPerfCurr15MinFailedFastR, adslAturUasLThreshTrap=adslAturUasLThreshTrap, adslAtucIntervalExtTable=adslAtucIntervalExtTable, adslAtucSesLThreshTrap=adslAtucSesLThreshTrap, adslExtAturPhysPerfCounterGroup=adslExtAturPhysPerfCounterGroup, PYSNMP_MODULE_ID=adslExtMIB, AdslTransmissionModeType=AdslTransmissionModeType, adslExtGroups=adslExtGroups, adslAtucPerfCurr1DayFastR=adslAtucPerfCurr1DayFastR, adslAtucIntervalFailedFastR=adslAtucIntervalFailedFastR, adslAtucPerfDataExtEntry=adslAtucPerfDataExtEntry, adslAtucIntervalSesL=adslAtucIntervalSesL, adslAtucThreshold15MinFailedFastR=adslAtucThreshold15MinFailedFastR, adslAtucPerfCurr15MinUasL=adslAtucPerfCurr15MinUasL, adslLineTransAtucConfig=adslLineTransAtucConfig, adslAtucPerfCurr1DaySesL=adslAtucPerfCurr1DaySesL, adslAturIntervalExtEntry=adslAturIntervalExtEntry, adslAturPerfCurr1DayUasL=adslAturPerfCurr1DayUasL, adslAtucPerfStatFastR=adslAtucPerfStatFastR, adslAtucPerfPrev1DayUasL=adslAtucPerfPrev1DayUasL, adslAtucUasLThreshTrap=adslAtucUasLThreshTrap, adslConfProfileExtEntry=adslConfProfileExtEntry, adslAtucPerfCurr15MinSesL=adslAtucPerfCurr15MinSesL, adslAturPerfStatSesL=adslAturPerfStatSesL, adslExtMIB=adslExtMIB, adslAlarmConfProfileExtEntry=adslAlarmConfProfileExtEntry, adslAturPerfCurr15MinSesL=adslAturPerfCurr15MinSesL, adslLineGlitePowerState=adslLineGlitePowerState, adslAtucPerfPrev1DaySesL=adslAtucPerfPrev1DaySesL, adslAtucIntervalExtEntry=adslAtucIntervalExtEntry, adslAtucPerfDataExtTable=adslAtucPerfDataExtTable, adslAtucPerfCurr1DayUasL=adslAtucPerfCurr1DayUasL, adslAturThreshold15MinUasL=adslAturThreshold15MinUasL, adslAturPerfCurr1DaySesL=adslAturPerfCurr1DaySesL, adslExtAtucPhysPerfCounterGroup=adslExtAtucPhysPerfCounterGroup, adslAturThreshold15MinSesL=adslAturThreshold15MinSesL, adslExtConformance=adslExtConformance, adslExtAtucTrapsPrefix=adslExtAtucTrapsPrefix, adslAtucIntervalUasL=adslAtucIntervalUasL, adslAtucFailedFastRThreshTrap=adslAtucFailedFastRThreshTrap, adslAtucThreshold15MinUasL=adslAtucThreshold15MinUasL, adslAtucPerfPrev1DayFailedFastR=adslAtucPerfPrev1DayFailedFastR, adslExtTraps=adslExtTraps, adslConfProfileLineType=adslConfProfileLineType, adslExtMibObjects=adslExtMibObjects, adslAtucThreshold15MinSesL=adslAtucThreshold15MinSesL, adslLineConfProfileDualLite=adslLineConfProfileDualLite, adslExtCompliances=adslExtCompliances, adslExtLineAlarmConfProfileGroup=adslExtLineAlarmConfProfileGroup, adslLineTransAtucActual=adslLineTransAtucActual, adslLineExtEntry=adslLineExtEntry, adslExtNotificationsGroup=adslExtNotificationsGroup, adslAtucPerfStatUasL=adslAtucPerfStatUasL, adslAtucPerfCurr1DayFailedFastR=adslAtucPerfCurr1DayFailedFastR, adslAturPerfPrev1DayUasL=adslAturPerfPrev1DayUasL, adslLineTransAtucCap=adslLineTransAtucCap, adslAtucPerfStatFailedFastR=adslAtucPerfStatFailedFastR, adslAturIntervalExtTable=adslAturIntervalExtTable, adslAturSesLThreshTrap=adslAturSesLThreshTrap, adslAturPerfCurr15MinUasL=adslAturPerfCurr15MinUasL, adslExtLineGroup=adslExtLineGroup, adslLineExtTable=adslLineExtTable, adslAtucPerfStatSesL=adslAtucPerfStatSesL, adslExtLineMibAtucCompliance=adslExtLineMibAtucCompliance)
135.755208
3,952
0.779244
2,630
26,065
7.722053
0.096578
0.008469
0.011374
0.015166
0.357772
0.304348
0.291792
0.286868
0.185238
0.171106
0
0.067561
0.07324
26,065
191
3,953
136.465969
0.773183
0.012584
0
0.038462
0
0
0.192359
0.067048
0
0
0
0
0
1
0
false
0
0.054945
0
0.071429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a891507c618c07d220e747570f97f67d619f09fd
4,709
py
Python
torchmore/flex.py
OCRoArchive/torchmore
bab7a37add8e993962acb7d93601be99c335516a
[ "BSD-3-Clause" ]
null
null
null
torchmore/flex.py
OCRoArchive/torchmore
bab7a37add8e993962acb7d93601be99c335516a
[ "BSD-3-Clause" ]
null
null
null
torchmore/flex.py
OCRoArchive/torchmore
bab7a37add8e993962acb7d93601be99c335516a
[ "BSD-3-Clause" ]
null
null
null
# # Copyright (c) 2017-2019 TBD. All rights reserved. # This file is part of TBD (see TBD). # See the LICENSE file for licensing terms (TBD). # # TODO transfer the documentation strings to flex creators/instances import torch from torch import autograd, nn from . import layers verbose = False class Flex(nn.Module): def __init__(self, creator): super(Flex, self).__init__() self.creator = creator self.layer = None def forward(self, *args): if self.layer is None: self.layer = self.creator(*args) if verbose: print("# created", self.layer) return self.layer.forward(*args) def __repr__(self): return "Flex:" + repr(self.layer) def __str__(self): return "Flex:" + str(self.layer) def Linear(*args, **kw): def creator(x): assert x.ndimension() == 2 return nn.Linear(x.size(1), *args, **kw) return Flex(creator) def Conv1d(*args, **kw): def creator(x): assert x.ndimension() == 3 return nn.Conv1d(x.size(1), *args, **kw) return Flex(creator) def Conv2d(*args, **kw): def creator(x): assert x.ndimension() == 4 return nn.Conv2d(x.size(1), *args, **kw) return Flex(creator) def Conv3d(*args, **kw): def creator(x): assert x.ndimension() == 5 return nn.Conv3d(x.size(1), *args, **kw) return Flex(creator) def ConvTranspose1d(*args, **kw): def creator(x): assert x.ndimension() == 3 return nn.ConvTranspose1d(x.size(1), *args, **kw) return Flex(creator) def ConvTranspose2d(*args, **kw): def creator(x): assert x.ndimension() == 4 return nn.ConvTranspose2d(x.size(1), *args, **kw) return Flex(creator) def ConvTranspose3d(*args, **kw): def creator(x): assert x.ndimension() == 5 return nn.ConvTranspose3d(x.size(1), *args, **kw) return Flex(creator) def LSTM(*args, **kw): def creator(x): assert x.ndimension() == 3 return layers.LSTM(x.size(2), *args, **kw) return Flex(creator) def BDL_LSTM(*args, **kw): def creator(x): assert x.ndimension() == 3 return layers.BDL_LSTM(x.size(1), *args, **kw) return Flex(creator) Lstm1 = BDL_LSTM Lstm1d = BDL_LSTM def BDHW_LSTM(*args, **kw): def creator(x): assert x.ndimension() == 4 return layers.BDHW_LSTM(x.size(1), *args, **kw) return Flex(creator) Lstm2 = BDHW_LSTM Lstm2d = BDHW_LSTM def BatchNorm(*args, **kw): def creator(x): assert x.ndimension() == 2 assert x.size(0) > 1, f"batch norm requires batch size > 1, got {x.shape}" return nn.BatchNorm1d(x.size(1), *args, **kw) return Flex(creator) def BatchNorm1d(*args, **kw): def creator(x): assert x.ndimension() == 3 return nn.BatchNorm1d(x.size(1), *args, **kw) return Flex(creator) def BatchNorm2d(*args, **kw): def creator(x): assert x.ndimension() == 4 return nn.BatchNorm2d(x.size(1), *args, **kw) return Flex(creator) def BatchNorm3d(*args, **kw): def creator(x): assert x.ndimension() == 5 return nn.BatchNorm3d(x.size(1), *args, **kw) return Flex(creator) def InstanceNorm1d(*args, **kw): def creator(x): assert x.ndimension() == 3 return nn.InstanceNorm1d(x.size(1), *args, **kw) return Flex(creator) def InstanceNorm2d(*args, **kw): def creator(x): assert x.ndimension() == 4 return nn.InstanceNorm2d(x.size(1), *args, **kw) return Flex(creator) def InstanceNorm3d(*args, **kw): def creator(x): assert x.ndimension() == 5 return nn.InstanceNorm3d(x.size(1), *args, **kw) return Flex(creator) def replace_modules(model, f): for key in list(model._modules.keys()): sub = model._modules[key] replacement = f(sub) if replacement is not None: model._modules[key] = replacement else: replace_modules(sub, f) def flex_replacer(module): if isinstance(module, Flex): return module.layer else: return None def flex_freeze(model): replace_modules(model, flex_replacer) def freeze(model): replace_modules(model, flex_replacer) def shape_inference(model, tensor, dtype=None): if isinstance(tensor, (tuple, list)): tensor = torch.zeros(tensor, dtype=dtype) model.eval() with autograd.no_grad(): model(tensor) replace_modules(model, flex_replacer) def delete_modules(model, f): for key in list(model._modules.keys()): if f(model._modules[key]): del model._modules[key]
21.404545
82
0.602463
625
4,709
4.4704
0.184
0.073014
0.05476
0.097351
0.540086
0.540086
0.518611
0.518611
0.486399
0.298855
0
0.021065
0.253982
4,709
219
83
21.502283
0.774267
0.042472
0
0.437956
0
0
0.015104
0
0
0
0
0.004566
0.131387
1
0.321168
false
0
0.021898
0.014599
0.635037
0.007299
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
0
0
0
1
0
0
0
0
1
0
0
2
a89d21cf756cb0ede87786ae25f6e6bd419a9171
4,629
py
Python
poc/tests/_syntax_types/test_syntax_type_var_declarations_in_signature.py
bookofproofs/fpl
527b43b0f8bb3d459ee906e5ed8524a676ce3a2c
[ "MIT" ]
4
2021-11-08T10:09:46.000Z
2021-11-13T22:25:46.000Z
poc/tests/_syntax_types/test_syntax_type_var_declarations_in_signature.py
bookofproofs/fpl
527b43b0f8bb3d459ee906e5ed8524a676ce3a2c
[ "MIT" ]
1
2020-09-04T13:02:09.000Z
2021-06-16T07:07:44.000Z
poc/tests/_syntax_types/test_syntax_type_var_declarations_in_signature.py
bookofproofs/fpl
527b43b0f8bb3d459ee906e5ed8524a676ce3a2c
[ "MIT" ]
1
2021-11-08T10:10:12.000Z
2021-11-08T10:10:12.000Z
import unittest from parameterized import parameterized from poc.util.fplutil import Utils from poc.fplsourcetransformer import FPLSourceTransformer from tatsu.exceptions import FailedToken from tatsu.exceptions import FailedParse from tatsu.exceptions import FailedPattern import os """ Tests of FPL related (parser) errors. Note: FPL parser is autogenerated through the TatSu package. Therefore, we do not test any FPL syntax errors. However, we make a positive test to ensure that all that is allowed by the FPL syntax definition can be parsed without errors. """ class FplSyntaxTests(unittest.TestCase): path = None path_to_grammar = None util = None @classmethod def setUpClass(cls): cls.path = os.path.normpath(os.path.abspath(__file__)) if os.path.isfile(cls.path): cls.path = os.path.dirname(cls.path) cls.path_to_grammar = os.path.join(cls.path, "../../../grammar") cls.path_to_usecases = os.path.join(cls.path) cls.util = Utils() cls.fpl_parser = cls.util.get_parser(cls.path_to_grammar + "/fpl_tatsu_format.ebnf") cls.transformer = FPLSourceTransformer(cls.fpl_parser) @parameterized.expand([ "test_syntax_type_var_declarations_in_signature", ]) def test_parser(self, use_case): self.transformer.clear() self.transformer.syntax_transform(self.path_to_usecases + "/" + use_case + ".fpl") @parameterized.expand([ "test_syntax_type_var_declarations_in_signature_fail_001", "test_syntax_type_var_declarations_in_signature_fail_002", "test_syntax_type_var_declarations_in_signature_fail_003", "test_syntax_type_var_declarations_in_signature_fail_004", "test_syntax_type_var_declarations_in_signature_fail_005", "test_syntax_type_var_declarations_in_signature_fail_006", "test_syntax_type_var_declarations_in_signature_fail_007", "test_syntax_type_var_declarations_in_signature_fail_008", "test_syntax_type_var_declarations_in_signature_fail_009", "test_syntax_type_var_declarations_in_signature_fail_010", "test_syntax_type_var_declarations_in_signature_fail_011", "test_syntax_type_var_declarations_in_signature_fail_012", "test_syntax_type_var_declarations_in_signature_fail_013", "test_syntax_type_var_declarations_in_signature_fail_014", "test_syntax_type_var_declarations_in_signature_fail_015", "test_syntax_type_var_declarations_in_signature_fail_016", "test_syntax_type_var_declarations_in_signature_fail_017", "test_syntax_type_var_declarations_in_signature_fail_018", "test_syntax_type_var_declarations_in_signature_fail_019", "test_syntax_type_var_declarations_in_signature_fail_020", "test_syntax_type_var_declarations_in_signature_fail_021", "test_syntax_type_var_declarations_in_signature_fail_022", "test_syntax_type_var_declarations_in_signature_fail_023", "test_syntax_type_var_declarations_in_signature_fail_024", "test_syntax_type_var_declarations_in_signature_fail_025", "test_syntax_type_var_declarations_in_signature_fail_026", "test_syntax_type_var_declarations_in_signature_fail_027", "test_syntax_type_var_declarations_in_signature_fail_028", "test_syntax_type_var_declarations_in_signature_fail_029", "test_syntax_type_var_declarations_in_signature_fail_030", "test_syntax_type_var_declarations_in_signature_fail_031", "test_syntax_type_var_declarations_in_signature_fail_032", "test_syntax_type_var_declarations_in_signature_fail_033", "test_syntax_type_var_declarations_in_signature_fail_034", "test_syntax_type_var_declarations_in_signature_fail_035", "test_syntax_type_var_declarations_in_signature_fail_036", "test_syntax_type_var_declarations_in_signature_fail_037", "test_syntax_type_var_declarations_in_signature_fail_038", "test_syntax_type_var_declarations_in_signature_fail_039", ]) def test_fail_parser_signature(self, use_case): # the above tests should fail syntactically, # because the they contain a signature containing some anonymous types instead of declared variables try: self.transformer.clear() self.transformer.syntax_transform(self.path_to_usecases + "/" + use_case + ".fpl") except FailedToken as ex: return except FailedParse as ex: return except FailedPattern as ex: return self.assertFalse(True)
48.21875
118
0.766256
605
4,629
5.28595
0.234711
0.125078
0.175109
0.212633
0.620388
0.609756
0.609756
0.609756
0.085679
0.04878
0
0.030508
0.171527
4,629
95
119
48.726316
0.80339
0.03046
0
0.1375
0
0
0.532968
0.526779
0
0
0
0
0.0125
1
0.0375
false
0
0.1
0
0.225
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a8a22b1c09e5f8744184cb10cb5f0d1f09a43c50
1,350
py
Python
NoteBooks/Curso de Python/Dojo/Class vs Inheritance.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Python/Dojo/Class vs Inheritance.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Python/Dojo/Class vs Inheritance.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
''' https://www.hackerrank.com/challenges/30-class-vs-instance/problem Crear una clase persona con una variable de instancia de age. El constructor debe asignar initialAge a la age despues de corfimar el argumento pasado como initailAge no es negativo, Sies negativo initialAge el constructor deberá mostrar age=0 e imprimir "Age is not valid, setting age to 0." Escribir los método de instancia: 1. yearPasses() Incrementa la edad de la instancia en 1. 2. amIOLD() hace los siguientes condicionales. * if age<13 imprimir --- "You are young" * if age>=13 and age <18 "You are teenager" else: "You are old" ''' class Person(): def __init__(self, initialAge): if initialAge < 0: print ("Age is not valid, setting age to 0.") self.initialAge = 0 else: self.initialAge = int(initialAge) def yearPasses(self): self.initialAge +=1 def amIOLD(self): if self.initialAge <13: print("You are young") elif self.initialAge >=13 and self.initialAge <18: print("You are a teenager") else: print("You are old") persona = Person(10) print(persona.initialAge) print(persona.amIOLD()) print(persona.yearPasses()) print(persona.initialAge)
25
120
0.628889
176
1,350
4.801136
0.4375
0.115976
0.039053
0.030769
0.061538
0.061538
0.061538
0.061538
0
0
0
0.025773
0.281481
1,350
54
121
25
0.845361
0.454815
0
0.190476
0
0
0.114243
0
0
0
0
0.018519
0
1
0.142857
false
0.095238
0
0
0.190476
0.380952
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
0
0
1
0
0
0
0
0
2
a8a6ede8b2b50f35f55ae4c1192f6961fd3c0a42
406
py
Python
corehq/form_processor/tests/test_doc_types.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/form_processor/tests/test_doc_types.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/form_processor/tests/test_doc_types.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
from django.test import SimpleTestCase from corehq.form_processor.models import XFormInstanceSQL class FormDocTypesTest(SimpleTestCase): def test_doc_types(self): for doc_type in XFormInstanceSQL.DOC_TYPE_TO_STATE: self.assertIn(doc_type, XFormInstanceSQL.ALL_DOC_TYPES) def test_deleted(self): self.assertIn('XFormInstance-Deleted', XFormInstanceSQL.ALL_DOC_TYPES)
31.230769
78
0.780788
49
406
6.204082
0.510204
0.078947
0.144737
0.177632
0
0
0
0
0
0
0
0
0.152709
406
12
79
33.833333
0.883721
0
0
0
0
0
0.051724
0.051724
0
0
0
0
0.25
1
0.25
false
0
0.25
0
0.625
0
0
0
0
null
0
0
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
0
0
0
0
0
0
2
a8ade7ebcdccec692356a2e4c1c971fbd346ae8b
396
py
Python
src/spiegelib/synth/__init__.py
spiegel-lib/spiegel
2a0b606a2f9eba22e25ade96ece249b790ca3b23
[ "MIT" ]
10
2020-11-12T16:11:03.000Z
2022-02-02T12:18:07.000Z
src/spiegelib/synth/__init__.py
spiegel-lib/spiegel
2a0b606a2f9eba22e25ade96ece249b790ca3b23
[ "MIT" ]
3
2020-12-04T01:43:40.000Z
2021-02-19T17:08:57.000Z
src/spiegelib/synth/__init__.py
spiegel-lib/spiegel
2a0b606a2f9eba22e25ade96ece249b790ca3b23
[ "MIT" ]
3
2020-07-04T02:24:15.000Z
2021-09-08T14:01:36.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Init for synth components """ from .synth_base import SynthBase try: import librenderman from .synth_vst import SynthVST except: print("librenderman package not installed, SynthVST class is unavailable. To use VSTs please install librenderman.") print("https://spiegelib.github.io/spiegelib/getting_started/installation.html")
24.75
120
0.739899
50
396
5.8
0.8
0.062069
0
0
0
0
0
0
0
0
0
0.002967
0.14899
396
15
121
26.4
0.857567
0.171717
0
0
0
0
0.557994
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
0.285714
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
0
0
0
0
1
0
1
0
0
0
0
2
a8bf0b5d1d872411669e236d53bc178309d57663
270
py
Python
WelcomeToPython.py
maumg1196/PythonRandomExercices
753c9998344a77a4b7e30d89dbe5d6a42d67d2a8
[ "MIT" ]
null
null
null
WelcomeToPython.py
maumg1196/PythonRandomExercices
753c9998344a77a4b7e30d89dbe5d6a42d67d2a8
[ "MIT" ]
null
null
null
WelcomeToPython.py
maumg1196/PythonRandomExercices
753c9998344a77a4b7e30d89dbe5d6a42d67d2a8
[ "MIT" ]
null
null
null
"""Our first program in Python""" #print is the function to show to the user all we want print('Welcome to Python') #input is the functions that we use to recive data from the user name = input('Give me your name') #We can print the data we recive print('Hello ', name)
33.75
64
0.733333
50
270
3.96
0.58
0.050505
0
0
0
0
0
0
0
0
0
0
0.181481
270
7
65
38.571429
0.895928
0.648148
0
0
0
0
0.45977
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
0
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
0
0
0
0
0
1
0
2
a8c6bf9392653d3fe4551678d8e4f8b164909266
1,495
py
Python
fileReader.py
koonyook/repetitive-mocap
882bb652171e6717a3c4e5f70105b9847af6cce3
[ "MIT" ]
null
null
null
fileReader.py
koonyook/repetitive-mocap
882bb652171e6717a3c4e5f70105b9847af6cce3
[ "MIT" ]
null
null
null
fileReader.py
koonyook/repetitive-mocap
882bb652171e6717a3c4e5f70105b9847af6cce3
[ "MIT" ]
null
null
null
#objective #read ExportSessionProto and dump as numpy data #copy the whole structure inside d0ExportSessionProto import FeatureExport_pb2 as pb import numpy as np import math import glob import os import pickle f=open(r'02Kinect+IMU\comb\mixAbnormal\AL_COMB_ab1_2018-09-27_10-03-34.ExportSessionProto','rb') reader=pb.ExportSessionProto() reader.ParseFromString(f.read()) f.close() targetFrame=123 frame=reader.frames[targetFrame] print('record length:',len(reader.frames),'frames') print('extracted data from frame',targetFrame) #unit vector print(frame.rightSide.upperArmPointingDirectionX) print(frame.rightSide.upperArmPointingDirectionY) print(frame.rightSide.upperArmPointingDirectionZ) #unit vector print(frame.rightSide.forearmPointingDirectionX) print(frame.rightSide.forearmPointingDirectionY) print(frame.rightSide.forearmPointingDirectionZ) print(frame.trunkFrontalTilt) #[-90,90] degree print(frame.trunkLateralTilt) #[-90,90] degree print(frame.trunkOrientationX) #[-90,90] degree print(frame.trunkOrientationY) #[-90,90] degree print(frame.trunkOrientationZ) #[-90,90] degree print(frame.rightSide.preShoulderFront) #[-90,90] degree print(frame.rightSide.preShoulderUp) #[-90,90] degree print(frame.rightSide.forearmPronation) #[-100,100] degree print(frame.rightSide.shoulderInternalRotation) #degree print(frame.rightSide.elbowAngle) #degree #3D wrist position (meter) print(frame.rightSide.wristX) print(frame.rightSide.wristY) print(frame.rightSide.wristZ)
29.313725
96
0.813378
182
1,495
6.653846
0.445055
0.156895
0.219653
0.086705
0.185797
0.071841
0
0
0
0
0
0.041037
0.070903
1,495
50
97
29.9
0.830814
0.192642
0
0
0
0
0.106633
0.06717
0
0
0
0
0
1
0
false
0
0.181818
0
0.181818
0.636364
0
0
0
null
0
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
0
0
0
0
0
1
0
2
a8d1eeeb8fccad5986c5691bdb66c47f5a1fa059
13,142
py
Python
src/amuse/community/kepler_orbiters/test_kepler.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
1
2019-12-28T22:47:51.000Z
2019-12-28T22:47:51.000Z
src/amuse/community/kepler_orbiters/test_kepler.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
null
null
null
src/amuse/community/kepler_orbiters/test_kepler.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
import numpy import struct from interface import Kepler from amuse.units import nbody_system from amuse.units import units,constants from amuse.ic.plummer import new_plummer_model from amuse.datamodel import Particle #from matplotlib import pyplot import time from amuse.ext.orbital_elements import orbital_elements_from_binary,new_binary_from_orbital_elements def elements(starmass,x,y,z,vx,vy,vz,G=constants.G): mu=G*starmass r=(x**2+y**2+z**2)**0.5 v2=(vx**2+vy**2+vz**2) e=v2/2-mu/r a=-mu/2/e hx=y*vz-z*vy hy=z*vx-x*vz hz=x*vy-y*vx rdotv=x*vx+y*vy+z*vz ex=v2*x/mu-rdotv*vx/mu-x/r ey=v2*y/mu-rdotv*vy/mu-y/r ez=v2*z/mu-rdotv*vz/mu-z/r h2=(hx**2+hy**2+hz**2) eps=(1-h2/mu/a)**0.5 return a,eps def test_kepler(N=10000, tend=1.| units.yr,method=0): numpy.random.seed(12345) conv=nbody_system.nbody_to_si(2.| units.MSun, 5.|units.AU) comets=new_plummer_model(N,conv) sun=Particle(mass=1.|units.MSun) sun.position=[0,0,0]|units.AU sun.velocity=[0,0,0]|units.kms comets.mass*=0. code=Kepler(conv,redirection="none") code.set_method(method) code.central_particle.add_particle(sun) code.orbiters.add_particles(comets) a0,eps0=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz) # print code.orbiters.x[0] print orbital_elements_from_binary(code.particles[0:2],constants.G) t1=time.time() code.evolve_model(tend) t2=time.time() print orbital_elements_from_binary(code.particles[0:2],constants.G) # print code.orbiters.x[0] a,eps=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz) da=abs((a-a0)/a0) deps=abs(eps-eps0)/eps0 dev=numpy.where(da > 0.00001)[0] print len(dev) print a0[dev].value_in(units.AU) print eps0[dev] # pyplot.plot(a0[dev].value_in(units.AU),eps0[dev],"ro") # pyplot.plot(a[dev].value_in(units.AU),eps[dev],"g+") print "max da,deps:",da.max(), deps.max() print "time:",t2-t1 # pyplot.show() return t2-t1,da.max(),deps.max() def test_kepler_almost_parabolic( tend=1,method=0): code=Kepler(redirection="none") code.set_method(method) mass1=1.| nbody_system.mass mass2=0| nbody_system.mass semimajor_axis=1.|nbody_system.length eccentricity=0.9999999 p=2*numpy.pi*(semimajor_axis**3/nbody_system.G/mass1)**0.5 tend=tend*p print tend parts=new_binary_from_orbital_elements( mass1, mass2, semimajor_axis, eccentricity = eccentricity, true_anomaly = 0.0102121 ) code.central_particle.add_particle(parts[0]) code.orbiters.add_particle(parts[1]) a0,eps0=elements(mass1,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) print orbital_elements_from_binary(code.particles[0:2]) t1=time.time() code.evolve_model(tend) t2=time.time() print orbital_elements_from_binary(code.particles[0:2]) print code.orbiters.position a,eps=elements(mass1,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) da=abs((a-a0)/a0) deps=abs(eps-eps0)/eps0 print da,deps print "time:",t2-t1 def test_kepler_parabolic( tend=1,method=0, sign=+1): code=Kepler(redirection="none") code.set_method(method) sun=Particle() sun.mass=1. | nbody_system.mass sun.x=0. | nbody_system.length sun.y=0. | nbody_system.length sun.z=0. | nbody_system.length sun.vx=0. | nbody_system.speed sun.vy=0. | nbody_system.speed sun.vz=0. | nbody_system.speed comet=Particle() comet.mass= 0 | nbody_system.mass comet.x=1. | nbody_system.length comet.y=0. | nbody_system.length comet.z=0. | nbody_system.length comet.vx=0. | nbody_system.speed comet.vy=(1.0 + sign * 1.0e-10)*(2*nbody_system.G*sun.mass/comet.x)**0.5 comet.vz=0. | nbody_system.speed tend=tend | nbody_system.time print tend code.central_particle.add_particle(sun) code.orbiters.add_particle(comet) a0,eps0=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) print orbital_elements_from_binary(code.particles[0:2]) t1=time.time() code.evolve_model(tend) t2=time.time() print orbital_elements_from_binary(code.particles[0:2]) print code.orbiters.position a,eps=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) da=abs((a-a0)/a0) deps=abs(eps-eps0)/eps0 print da,deps print "time:",t2-t1 def crash_test(method=1): code=Kepler(redirection="none") code.set_method(method) smu=1.224744871391589 mu=smu**2 r0=2.787802728537455 rv0=-0.9899959571994231 alpha=0.01380749549277993 smudt=2.809925892593303 v02=(mu*(2/r0-alpha)) vx=rv0 vy=(v02-vx**2)**0.5 sun=Particle() sun.mass=mu | nbody_system.mass sun.x=0. | nbody_system.length sun.y=0. | nbody_system.length sun.z=0. | nbody_system.length sun.vx=0. | nbody_system.speed sun.vy=0. | nbody_system.speed sun.vz=0. | nbody_system.speed comet=Particle() comet.mass= 0 | nbody_system.mass comet.x=r0| nbody_system.length comet.y=0. | nbody_system.length comet.z=0. | nbody_system.length comet.vx=vx | nbody_system.speed comet.vy=vy | nbody_system.speed comet.vz=0. | nbody_system.speed tend=(smudt/smu) | nbody_system.time print tend code.central_particle.add_particle(sun) code.orbiters.add_particle(comet) a0,eps0=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) print orbital_elements_from_binary(code.particles[0:2]) t1=time.time() code.evolve_model(tend) t2=time.time() print orbital_elements_from_binary(code.particles[0:2]) print code.orbiters.position a,eps=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) da=abs((a-a0)/a0) deps=abs(eps-eps0)/eps0 print da,deps print "time:",t2-t1 def crash_test2(method=1): code=Kepler(redirection="none") code.set_method(method) """ mu=struct.unpack('!d','3ff7ffffffffffff'.decode('hex'))[0] dt=struct.unpack('!d','40025ab746b00001'.decode('hex'))[0] pos1=struct.unpack('!d','bfed36dc82998ed4'.decode('hex'))[0] pos2=struct.unpack('!d','40051297fc6e5256'.decode('hex'))[0] pos3=struct.unpack('!d','0000000000000000'.decode('hex'))[0] vel1=struct.unpack('!d','3fb09d8008ba33b9'.decode('hex'))[0] vel2=struct.unpack('!d','bff06788b551b81d'.decode('hex'))[0] vel3=struct.unpack('!d','0000000000000000'.decode('hex'))[0] """ mu=float.fromhex("0x1.8p+0") dt=float.fromhex("0x1.25ab746bp+1") pos1=float.fromhex("-0x1.d36dc82998ed4p-1") pos2=float.fromhex("0x1.51297fc6e5256p+1") pos3=float.fromhex("0x0p+0") vel1=float.fromhex("0x1.09d8008ba33b9p-4") vel2=float.fromhex("-0x1.06788b551b81ep+0") vel3=float.fromhex("0x0p+0") sun=Particle() sun.mass=mu | nbody_system.mass sun.x=0. | nbody_system.length sun.y=0. | nbody_system.length sun.z=0. | nbody_system.length sun.vx=0. | nbody_system.speed sun.vy=0. | nbody_system.speed sun.vz=0. | nbody_system.speed comet=Particle() comet.mass= 0 | nbody_system.mass comet.x=pos1 | nbody_system.length comet.y=pos2 | nbody_system.length comet.z=pos3 | nbody_system.length comet.vx=vel1 | nbody_system.speed comet.vy=vel2 | nbody_system.speed comet.vz=vel3 | nbody_system.speed tend=dt | nbody_system.time print tend,mu code.central_particle.add_particle(sun) code.orbiters.add_particle(comet) a0,eps0=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) print orbital_elements_from_binary(code.particles[0:2]) t1=time.time() code.evolve_model(tend) t2=time.time() print orbital_elements_from_binary(code.particles[0:2]) print code.orbiters.position a,eps=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) da=abs((a-a0)/a0) deps=abs(eps-eps0)/eps0 print da,deps print "time:",t2-t1 def test_softening(method=1): code=Kepler(redirection="none") code.set_method(method) dt=float.fromhex("0x1.67b39e372f04dp+4") mu=float.fromhex("0x1.fffffffffffdfp-3") e2=float.fromhex("0x1.0000000000003p+0") pos1=float.fromhex("0x1.1b76542265052p-1") pos2=float.fromhex("0x1.0c4dbda42097cp-6") pos3=float.fromhex("0x1.54fd66cd1e212p-3") vel1=float.fromhex("0x1.d6ef43d58ca7ep-2") vel2=float.fromhex("0x1.7a85379e59794p-2") vel3=float.fromhex("-0x1.5421044d1acffp-1") sun=Particle() sun.mass=mu | nbody_system.mass sun.x=0. | nbody_system.length sun.y=0. | nbody_system.length sun.z=0. | nbody_system.length sun.vx=0. | nbody_system.speed sun.vy=0. | nbody_system.speed sun.vz=0. | nbody_system.speed comet=Particle() comet.mass= 0 | nbody_system.mass comet.x=pos1 | nbody_system.length comet.y=pos2 | nbody_system.length comet.z=pos3 | nbody_system.length comet.vx=vel1 | nbody_system.speed comet.vy=vel2 | nbody_system.speed comet.vz=vel3 | nbody_system.speed tend=dt | nbody_system.time print tend,mu code.central_particle.add_particle(sun) code.orbiters.add_particle(comet) code.parameters.epsilon_squared = e2 | nbody_system.length**2 a0,eps0=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) print orbital_elements_from_binary(code.particles[0:2]) t1=time.time() code.evolve_model(tend) t2=time.time() print orbital_elements_from_binary(code.particles[0:2]) print code.orbiters.position a,eps=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) da=abs((a-a0)/a0) deps=abs(eps-eps0)/eps0 print da,deps print "time:",t2-t1 def t_linear(tend=1,N=100,method=0): code=Kepler(redirection="none") code.set_method(method) mass=1. | nbody_system.mass x=1. | nbody_system.length vx=0 | nbody_system.speed e=0.5*vx**2-nbody_system.G*mass/x semimajor_axis=-nbody_system.G*mass/2/e p=2*numpy.pi*(semimajor_axis**3/nbody_system.G/mass)**0.5 print semimajor_axis print p tend=tend*p dt=p/N sun=Particle() sun.mass=mass sun.x=0. | nbody_system.length sun.y=0. | nbody_system.length sun.z=0. | nbody_system.length sun.vx=0. | nbody_system.speed sun.vy=0. | nbody_system.speed sun.vz=0. | nbody_system.speed comet=Particle() comet.mass= 0 | nbody_system.mass comet.x=x comet.y=0. | nbody_system.length comet.z=0. | nbody_system.length comet.vx=vx comet.vy=0. | nbody_system.speed comet.vz=0. | nbody_system.speed code.central_particle.add_particle(sun) code.orbiters.add_particle(comet) a0,eps0=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) print orbital_elements_from_binary(code.particles[0:2]) #pyplot.ion() #f=pyplot.figure(figsize=(8,6)) #pyplot.show() tnow=0*tend time=[] xs=[] while tnow<tend: tnow+=dt print tnow,int(tnow/dt) code.evolve_model(tnow) #f.clf() time.append(tnow/tend) xs.append(code.orbiters.x[0].number) #pyplot.plot(time,xs,"r+") #pyplot.xlim(-0.1,1.1) #pyplot.ylim(-1.1,3.1) #pyplot.draw() print orbital_elements_from_binary(code.particles[0:2]) print code.orbiters.position a,eps=elements(sun.mass,code.orbiters.x,code.orbiters.y,code.orbiters.z, code.orbiters.vx,code.orbiters.vy,code.orbiters.vz,G=nbody_system.G) da=abs((a-a0)/a0) deps=abs(eps-eps0)/eps0 print da,deps raw_input() if __name__=="__main__": for method in [1,0]: t_linear(N=100,method=method) print print "-"*10 print tend = 1.0 for method in [1,0]: crash_test(method=method) print print "-"*10 print for method in [1,0]: crash_test2(method=method) print print "-"*10 print for method in [1,0]: test_kepler_parabolic(tend=tend,method=method, sign=+1) print print "-"*10 print for method in [1,0]: test_kepler_parabolic(tend=tend,method=method, sign=-1) print print "-"*10 print for method in [1,0]: test_kepler_almost_parabolic(tend=tend,method=method) print print "-"*10 print for method in [1,0]: test_kepler(N=10000,tend=tend | units.yr,method=method) print print "-"*10 print for method in [0,]: test_softening(method=method) print
24.610487
100
0.696774
2,137
13,142
4.175948
0.094057
0.134469
0.064545
0.042358
0.713581
0.667414
0.653519
0.641192
0.641192
0.617324
0
0.063946
0.147999
13,142
533
101
24.65666
0.733054
0.02648
0
0.624294
0
0
0.031214
0.005134
0
0
0.003667
0
0
0
null
null
0
0.025424
null
null
0.186441
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
a8d3590887fd4baf5d299b16d89718cbfd513f03
4,972
py
Python
Computer science/Programming languages/Python/Basics/Modules and packages/Pip/topic.py
chanchanchong/PYTHON-TRACK-IN-HYPERSKILL
462fe08ff4a2b183fd45a0235ab1ec7a788bd54c
[ "MIT" ]
null
null
null
Computer science/Programming languages/Python/Basics/Modules and packages/Pip/topic.py
chanchanchong/PYTHON-TRACK-IN-HYPERSKILL
462fe08ff4a2b183fd45a0235ab1ec7a788bd54c
[ "MIT" ]
null
null
null
Computer science/Programming languages/Python/Basics/Modules and packages/Pip/topic.py
chanchanchong/PYTHON-TRACK-IN-HYPERSKILL
462fe08ff4a2b183fd45a0235ab1ec7a788bd54c
[ "MIT" ]
null
null
null
# One astonishing fact about Python is that is it has a huge and # diverse community of contributors. Essentially, that means that # there are plenty of solutions to a significantly vast range of # problems in open access. This fact comes in handy, especially # when you are working on your own projects. It's highly likely that # you'll be able to find a proper task-specific package and use it # effectively to meet your needs. Now we are going to learn about # standard tools for package management in Python. # 1. What is pip? # By this time you've probably familiarized yourself with the # Python standard library. It contains a lot of useful built-in # modules and should be preinstalled with your Python # distribution. In fact, one more thing is that is preinstalled (starting # with Python 3.4) is the standard package manager called pip # (the acronym is commonly expanded as "Pip Installs # Packages"). # Pip is designed both to extend the functionality of the standard # library by installing the additional packages on your computer # and to help you share your own projects and thereby contribute # to the development of Python. # Now let's make sure that you have pip installed. All you need to # do is open a command prompt/terminal and run this line: # pip --version # The output should report your current pip version. For example, # the latest version is: # pip 20.0.2 # In case, it's not installed (or you want to upgrade it), please # follow these installation instructions specifically for your # operating system. # If your terminal cannot find the pip command, try to use # pip3 instead. # 2. Pip capabilities # Since pip is the recommended installer for Python, the most # obvios and crucial command to begin with is install. Have a # look at the following line: # pip install some_package # The installation is really that simple. However, if you are # interested in a certain version of the package, you need to # specify it after the package name like this: # pip install some_package==1.1.2 # Or, at least, define a minimal suitable version: # pip install "some_package>=1.1.2" # Note that the last expression should be enclosed within double # quotes for the comparison operator to be interpreted without # any problem. # Another useful thing is the show command. It shows # information about installed packages, for instance, their # version, author, license, location or requirements. Here is a # general example: # pip show some_package # Also, the list command might be of use. It lists all the # packages you've installed on your computer in alphabetical # order: # pip list # If you print the list command with the option --outdated, or # just -o, you'll get the list of outdated packages coupled with # both the current and latest versions available. # pip list --outdated # or with a bit shorter variant: # pip list -o # After executing one of the mentioned lines, you will see a # similar output: # first_package (Current: 2.1.1 Latest: 3.0.1) # second_package (Current: 4.2.1 Latest 4.2.2) # Having discovered outdated packages, you might want to # update them to the newest available version: # pip install --upgrade some_package # To remove a package from your computer run the uninstall # command: # pip uninstall some_package # When developing your project, it may be advantageous to keep # a list of packages to be installed, i.e. dependencies, in a special # file (see Requirements File Format). It is convenient because # you can install the packages directly from it: # pip install -r requirements.txt # Of course, you are not supposed to write this file yourself listing # all the necessary packages. It will be enough to run the code # below in order to obtain it: # pip freeze > requirements.txt # Let's examine the line above in detail. freeze is a command # used to get all installed packages in the format of requirements. # So all the packages you had installed before the execution of # the command and presumably had used in some projects would # be listed in the file named "requirements.txt". Furthermore, # their exact versions would be specified (see Requirement # Specifiers). # What's important is that freeze actually lists in all the installed # libraries, which is rarely necessary and might be considered a # bad practice. For this reason, we recommend that you take a # more conscious approach and revise the obtained requirements # file by yourself. # 3. Summary # Overall, we've learned the basics for package installation # through pip? # - how to install packages (either a specific version or non- # specific one), # - how to create a requirements file and use it for # installation, # - how to obtain information about installed packages, # and, finally, how to uninstall packages. # For further details, try consulting the documentation or running # the command help. # Now let's get to practice so that you can use all this information # in the future!
35.014085
73
0.763274
801
4,972
4.72784
0.385768
0.017428
0.011091
0.016636
0.012675
0.012675
0.012675
0
0
0
0
0.006891
0.182824
4,972
142
74
35.014085
0.925178
0.950523
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
a8d817633e18adb27b42abc75d2f9ee996477ad6
450
py
Python
cost_funcs/types.py
soufyakoub/digit-recognizer
e8f606f0b22507bbf5f39c6ba989cec552201bcd
[ "MIT" ]
null
null
null
cost_funcs/types.py
soufyakoub/digit-recognizer
e8f606f0b22507bbf5f39c6ba989cec552201bcd
[ "MIT" ]
null
null
null
cost_funcs/types.py
soufyakoub/digit-recognizer
e8f606f0b22507bbf5f39c6ba989cec552201bcd
[ "MIT" ]
1
2021-11-13T15:02:43.000Z
2021-11-13T15:02:43.000Z
import numpy as np class CostFunction: """A class that represents a cost function""" def __call__(self, a: np.ndarray, y: np.ndarray) -> float: """Return the cost associated with an output ``a`` and desired output ``y``""" raise NotImplementedError def delta(self, a: np.ndarray, y: np.ndarray, z: np.ndarray) -> np.ndarray: """Return the error delta from the output layer""" raise NotImplementedError
32.142857
86
0.653333
61
450
4.754098
0.52459
0.186207
0.048276
0.096552
0.165517
0.165517
0.165517
0
0
0
0
0
0.228889
450
13
87
34.615385
0.835735
0.348889
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
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
0
0
0
1
0
0
0
0
1
0
0
2
a8da6c27168c030127b89099f0e61debcd9543af
3,829
py
Python
src/automations/cms_automations/migrations/0001_initial.py
sebastianmanger/django-automations
070e700d29ef68f1b27c7f016ee6a08c41be56fe
[ "MIT" ]
20
2021-04-25T16:19:09.000Z
2022-02-17T13:55:57.000Z
src/automations/cms_automations/migrations/0001_initial.py
sebastianmanger/django-automations
070e700d29ef68f1b27c7f016ee6a08c41be56fe
[ "MIT" ]
25
2021-11-21T14:39:59.000Z
2022-02-01T11:32:17.000Z
src/automations/cms_automations/migrations/0001_initial.py
sebastianmanger/django-automations
070e700d29ef68f1b27c7f016ee6a08c41be56fe
[ "MIT" ]
4
2021-11-21T04:27:55.000Z
2022-03-04T01:37:06.000Z
# Generated by Django 3.1.8 on 2021-05-02 11:09 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("cms", "0022_auto_20180620_1551"), ] operations = [ migrations.CreateModel( name="AutomationHookPlugin", fields=[ ( "cmsplugin_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name="cms_automations_automationhookplugin", serialize=False, to="cms.cmsplugin", ), ), ( "automation", models.CharField(max_length=128, verbose_name="Automation"), ), ( "token", models.CharField( blank=True, max_length=128, verbose_name="Optional token" ), ), ], options={ "abstract": False, }, bases=("cms.cmsplugin",), ), migrations.CreateModel( name="AutomationStatusPlugin", fields=[ ( "cmsplugin_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name="cms_automations_automationstatusplugin", serialize=False, to="cms.cmsplugin", ), ), ( "template", models.CharField(max_length=128, verbose_name="Task data"), ), ("name", models.CharField(blank=True, max_length=128)), ], options={ "abstract": False, }, bases=("cms.cmsplugin",), ), migrations.CreateModel( name="AutomationTasksPlugin", fields=[ ( "cmsplugin_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name="cms_automations_automationtasksplugin", serialize=False, to="cms.cmsplugin", ), ), ( "template", models.CharField( choices=[ ("automations/includes/task_list.html", "Default template") ], default="automations/includes/task_list.html", max_length=128, verbose_name="Template", ), ), ( "always_inform", models.BooleanField( default=True, help_text="If deactivated plugin will out output anything if no task is available.", verbose_name="Always inform", ), ), ], options={ "abstract": False, }, bases=("cms.cmsplugin",), ), ]
33.587719
108
0.402455
245
3,829
6.122449
0.346939
0.048
0.04
0.058667
0.630667
0.548
0.523333
0.434667
0.366667
0.284
0
0.024586
0.511361
3,829
113
109
33.884956
0.777125
0.011752
0
0.603774
1
0
0.158646
0.065309
0
0
0
0
0
1
0
false
0
0.018868
0
0.056604
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
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
2
7645d8f6bae4e69a5ec5b7e7fd6d60683ef3d76d
1,403
py
Python
scripts/tests/test_spi.py
mfkiwl/pifive-cpu
81ca4088242eeb29c56ddd31d2c53a61a047db53
[ "Apache-2.0" ]
6
2020-12-03T00:55:55.000Z
2021-12-31T18:56:58.000Z
scripts/tests/test_spi.py
mfkiwl/pifive-cpu
81ca4088242eeb29c56ddd31d2c53a61a047db53
[ "Apache-2.0" ]
null
null
null
scripts/tests/test_spi.py
mfkiwl/pifive-cpu
81ca4088242eeb29c56ddd31d2c53a61a047db53
[ "Apache-2.0" ]
3
2021-01-13T23:30:13.000Z
2021-02-28T07:47:52.000Z
from wbdbgbus import DebugBus import time from tqdm import tqdm DBG_PORT = "/dev/tty.usbserial-120001" DBG_BAUD = 115200 MOSI = 0x00 CLK = 0x08 DC = 0x0C RST = 0x10 CS = 0x14 GPIO_BASE = 0x8100_0000 SPI_CFG_REG = 0x8000_3000 SPI_REG = 0x8000_3004 DRAW = True with DebugBus(DBG_PORT, DBG_BAUD, fifo_size=1, timeout=0) as fpga: fpga.reset() # Set up SPI (assuming SPI is mode 1 for GPIO) fpga.write(GPIO_BASE+MOSI, 0b0_1_0001_00_00000_000) fpga.write(GPIO_BASE+CLK, 0b0_1_0001_00_00000_000) # Set DC to 0 fpga.write(GPIO_BASE+DC, 0b0_1_0000_00_00000_100) # Set CS to 0 fpga.write(GPIO_BASE+CS, 0b0_1_0000_00_00000_100) # Set RST to 0 fpga.write(GPIO_BASE+RST, 0b0_1_0000_00_00000_100) time.sleep(0.1) # Set RST to 1 fpga.write(GPIO_BASE+RST, 0b0_1_0000_00_00000_110) # Start device fpga.write(SPI_REG, 0xAE) while fpga.read(SPI_CFG_REG)[0] & 0x40000 != 0x40000: pass fpga.write(SPI_REG, 0xAF) while fpga.read(SPI_CFG_REG)[0] & 0x40000 != 0x40000: pass # Set DC to 1 fpga.write(GPIO_BASE+DC, 0b0_1_0000_00_00000_110) # Write data if DRAW: for i in tqdm(range(64)): for j in tqdm(range(96)): pix = (((i >> 1) & 0b11111) << 11) | (((j >> 1) & 0b111111) << 5); fpga.write(SPI_REG, pix >> 8) fpga.write(SPI_REG, pix & 0xFF)
24.189655
82
0.645759
239
1,403
3.531381
0.351464
0.117299
0.10782
0.140995
0.42654
0.383886
0.292654
0.260664
0.260664
0.260664
0
0.221591
0.247327
1,403
57
83
24.614035
0.577652
0.092659
0
0.058824
0
0
0.019778
0.019778
0
0
0.047468
0
0
1
0
false
0.058824
0.088235
0
0.088235
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
765cf79b93716aa308297b01990876edcd313318
116
py
Python
Prob&Stats_hackerrank/day4_bionomial.py
manishaverma1012/Hackerank_Solution
9b13e8805fd244fbc7df2955f57e2a880772460d
[ "MIT" ]
null
null
null
Prob&Stats_hackerrank/day4_bionomial.py
manishaverma1012/Hackerank_Solution
9b13e8805fd244fbc7df2955f57e2a880772460d
[ "MIT" ]
null
null
null
Prob&Stats_hackerrank/day4_bionomial.py
manishaverma1012/Hackerank_Solution
9b13e8805fd244fbc7df2955f57e2a880772460d
[ "MIT" ]
null
null
null
from scipy.stats import binom b=1.09 g=1 s=2.09 p=(b/s) result=binom.rvs(size=3,n=6,p=(b/s)) print("%.3f"%result)
11.6
36
0.646552
29
116
2.586207
0.689655
0.053333
0.08
0
0
0
0
0
0
0
0
0.096154
0.103448
116
9
37
12.888889
0.625
0
0
0
0
0
0.034783
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.142857
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
0
0
0
0
0
0
0
2
76953a4988d7ef369960b36eff989e559577cde3
8,950
py
Python
syntax_presets.py
mohller/NucClade
c233e71238f5d4e8c347709d80b461dad116faa6
[ "MIT" ]
1
2020-01-15T21:29:24.000Z
2020-01-15T21:29:24.000Z
syntax_presets.py
mohller/NucClade
c233e71238f5d4e8c347709d80b461dad116faa6
[ "MIT" ]
1
2019-10-23T23:15:07.000Z
2019-10-24T23:50:53.000Z
syntax_presets.py
mohller/NucClade
c233e71238f5d4e8c347709d80b461dad116faa6
[ "MIT" ]
null
null
null
"""Syntax and settings defined in ENSDF manual """ from field_converters import * # According to Chapter III in ENSDF manual these # are the standard one card record formats RECORD_MEMBERS = { 'IDENTIFICATION' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'DSID' : [10, 39], 'DSREF' : [40, 65], 'PUB' : [66, 74], 'DATE' : [75, 80], }, 'HISTORY' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'History' : [10, 80], }, 'Q-VALUE' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'Q_' : [10, 19], 'DQ_' : [20, 21], 'SN' : [22, 29], 'DSN' : [30, 31], 'SP' : [32, 39], 'DSP' : [40, 41], 'QA' : [42, 49], 'DQA' : [50, 55], 'QREF' : [56, 80], }, 'CROSS-REFERENCE' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'DSSYM' : [ 9, 9], 'DSID' : [10, 39], }, 'COMMENT' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'RTYPE' : [ 8, 8], 'PSYM' : [ 9, 9], 'CTEXT' : [10, 80], }, 'PARENT' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'E' : [10, 19], 'DE' : [20, 21], 'J' : [22, 39], 'T' : [40, 49], 'DT' : [50, 55], 'QP' : [65, 74], 'DQP' : [75, 76], 'ION' : [77, 80], }, 'NORMALIZATION' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'NR' : [10, 19], 'DNR' : [20, 21], 'NT' : [22, 29], 'DNT' : [30, 31], 'BR' : [32, 39], 'DBR' : [40, 41], 'NB' : [42, 49], 'DNB' : [50, 55], 'NP' : [56, 62], 'DNP' : [63, 64], }, 'PRODUCTION NORMALIZATION' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'NRxBR' : [10, 19], 'UNC1' : [20, 21], 'NTxBR' : [22, 29], 'UNC2' : [30, 31], 'NBxBR' : [42, 49], 'UNC3' : [50, 55], 'NP' : [56, 62], 'UNC4' : [63, 64], 'COM' : [77, 77], }, 'LEVEL' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'E' : [10, 19], 'DE' : [20, 21], 'J' : [22, 39], 'T' : [40, 49], 'DT' : [50, 55], 'L' : [56, 64], 'S' : [65, 74], 'DS' : [75, 76], 'C' : [77, 77], 'MS' : [78, 79], }, 'BETA MINUS' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'E' : [10, 19], 'DE' : [20, 21], 'IB' : [22, 29], 'DIB' : [30, 31], 'LOGFT' : [42, 49], 'DFT' : [50, 55], 'C' : [77, 77], 'UN' : [78, 79], 'Q' : [80, 80], }, 'EC / BETA PLUS' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'E' : [10, 19], 'DE' : [20, 21], 'IB' : [22, 29], 'DIB' : [30, 31], 'IE' : [32, 39], 'DIE' : [40, 41], 'LOGFT' : [42, 49], 'DFT' : [50, 55], 'TI' : [65, 74], 'DTI' : [75, 76], 'C' : [77, 77], 'UN' : [78, 79], 'Q' : [80, 80], }, 'ALPHA' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'E' : [10, 19], 'DE' : [20, 21], 'IA' : [22, 29], 'DIA' : [30, 31], 'HF' : [32, 39], 'DHF' : [40, 41], 'C' : [77, 77], 'Q' : [80, 80], }, 'DELAYED PARTICLE' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'E' : [10, 19], 'DE' : [20, 21], 'IP' : [22, 29], 'DIP' : [30, 31], 'EI' : [32, 39], 'T' : [40, 49], 'DT' : [50, 55], 'L' : [56, 64], 'C' : [77, 77], 'COIN' : [78, 78], 'Q' : [80, 80], }, 'GAMMA' : { 'NUCID' : [ 1, 5], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], 'E' : [10, 19], 'DE' : [20, 21], 'RI' : [22, 29], 'DRI' : [30, 31], 'M' : [32, 41], 'MR' : [42, 49], 'DMR' : [50, 55], 'CC' : [56, 62], 'DCC' : [63, 64], 'TI' : [65, 74], 'DTI' : [75, 76], 'C' : [77, 77], 'COIN' : [78, 78], 'Q' : [80, 80], }, 'REFERENCE' : { 'MASS_NUMBER' : [ 1, 3], 'Additional' : [ 6, 6], 'RID' : [ 7, 8], }, 'END' : { 'BLANK' : [ 1, 80] } } # According to Chapter V in ENSDF manual these below # are the field formats. Here they are defined as # regular expressions since a field can have # multiple formats which differ in character # positioning (unlike records!). NUM = r'\d+[\d,\.,E,+,-]*' # defined as unsigned number e.g. 345, 345.34, 23.E+9, etc # TODO: Check RTYPE field and similarity to RID FIELDS = { 'RID' : { 'HISTORY' : r' H', 'Q-VALUE' : r' Q', 'CROSS-REFERENCE' : r' X', 'PARENT' : r' P', 'NORMALIZATION' : r' N', 'PRODUCTION NORMALIZATION' : r' PN', 'LEVEL' : r' L', 'BETA MINUS' : r' B', 'EC / BETA PLUS' : r' E', 'ALPHA' : r' A', 'DELAYED PARTICLE' : r' D', 'GAMMA' : r' G', 'REFERENCE' : r' R', }, 'NUCID' : { 'MASS_NUMBER' : [1, 3], 'Z' : [4, 5] }, 'DSID' : { 'REFERENCES' : r'REFERENCES', 'COMMENTS' : r'COMMENTS', 'ADOPTED LEVELS' : [ r'ADOPTED LEVELS', r'ADOPTED LEVELS, GAMMAS' ], 'DECAYS' : [ r'(?P<A>\d{1,3})(?P<Sym>\w{1,2})(\[\+\d{1,}\]){0,1} (?P<mode>[\w,+,-]*) DECAY( \()?(?P<T>[\d,\.,E,+,-]*){0,1}\s?(?P<U>[Y,D,H,M,U,N,K,P,A,F,S,E,V]{0,3})\)?', r'MUONIC ATOM' ], 'REACTIONS' : [ '(HI,XNG)', 'COULOMB EXCITATION' ] }, 'T' : [ r'\s*(STABLE)\s*', r'\s*(?P<T>{}) (?P<U>[Y,D,H,M,U,N,K,P,A,F,S,E,V]{{0,3}})\s*'.format(NUM), ], 'E' : [ r'\s*([\+-]?SN|[\+-]?SP|[\+-]?[A-Z]|[\+-]?[\d.]+(?:E\+|E-|E)?\d*)([\+-]?SN|[\+-]?SP|[\+-]?[A-Z]|[\+-]?[\d.]+(?:E\+|E-|E)?\d*)?\s*', ], } # Adding other field formats by groups... for key in ['BR','CC','HF','LOGFT','NB','NP','NR','NT','QP']: FIELDS[key] = [NUM,] for key in ['DBR','DCC','DE','DHF','DIA','DIB','DIE','DIP','DNB','DNR','DNP','DNT','DQP','DQ_','DS','DSP','DTI']: # these are two-character fields FIELDS[key] = [r'([\h*,\d*]{2})', 'LT', 'GT', 'LE', 'GE', 'AP', 'CA', 'SY'] for key in ['MR','Q_','QA','SN','SP']: FIELDS[key] = [r'(-?{})'.format(NUM),] for key in ['DFT','DMR','DT','DNB','DQA']: # uncertainties, either asymmetric or symmetric FIELDS[key] = [r'\+(\d+)\-(\d+)', r'([\h*,\d*]{2})', 'LT', 'GT', 'LE', 'GE', 'AP', 'CA', 'SY'] for key in ['IA','IB','IE','IP','RI','TI']: FIELDS[key] = [r'\(?({})\)?'.format(NUM),] # Defining field converters
33.271375
168
0.275084
876
8,950
2.80137
0.275114
0.067237
0.07335
0.091687
0.358191
0.314181
0.294214
0.294214
0.294214
0.198044
0
0.127857
0.506257
8,950
269
169
33.271375
0.427472
0.066704
0
0.425101
0
0.012146
0.193641
0.035393
0
0
0
0.003717
0
1
0
false
0
0.004049
0
0.004049
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
769cb3033ffcbd5a3080018695c5f3dc68f419d6
2,954
py
Python
vmtkScripts/vmtkscripts.py
haehn/vmtk
e8e2ee9f9bea6a1839a75b57caf82f6a86944db0
[ "Apache-2.0" ]
1
2017-02-23T09:31:53.000Z
2017-02-23T09:31:53.000Z
vmtkScripts/vmtkscripts.py
haehn/vmtk
e8e2ee9f9bea6a1839a75b57caf82f6a86944db0
[ "Apache-2.0" ]
null
null
null
vmtkScripts/vmtkscripts.py
haehn/vmtk
e8e2ee9f9bea6a1839a75b57caf82f6a86944db0
[ "Apache-2.0" ]
null
null
null
__all__ = [ 'vmtkactivetubes', 'vmtkbifurcationprofiles', 'vmtkbifurcationreferencesystems', 'vmtkbifurcationsections', 'vmtkbifurcationvectors', 'vmtkboundarylayer', 'vmtkboundaryreferencesystems', 'vmtkbranchclipper', 'vmtkbranchextractor', 'vmtkbranchgeometry', 'vmtkbranchmapping', 'vmtkbranchmetrics', 'vmtkbranchpatching', 'vmtkbranchsections', 'vmtkcenterlineattributes', 'vmtkcenterlinegeometry', 'vmtkcenterlinelabeler', 'vmtkcenterlinemerge', 'vmtkcenterlinemodeller', 'vmtkcenterlineoffsetattributes', 'vmtkcenterlineresampling', 'vmtkcenterlines', 'vmtkcenterlinesections', 'vmtkcenterlinesmoothing', 'vmtkcenterlineviewer', 'vmtkdelaunayvoronoi', 'vmtkdistancetocenterlines', 'vmtkendpointextractor', 'vmtkflowextensions', 'vmtkicpregistration', 'vmtkimagecast', 'vmtkimagecompose', 'vmtkimagecurvedmpr', 'vmtkimagefeaturecorrection', 'vmtkimagefeatures', 'vmtkimageinitialization', 'vmtkimagelinetracer', 'vmtkimagemipviewer', 'vmtkimageobjectenhancement', 'vmtkimagereader', 'vmtkimagereslice', 'vmtkimageseeder', 'vmtkimageshiftscale', 'vmtkimagesmoothing', 'vmtkimageviewer', 'vmtkimagevesselenhancement', 'vmtkimagevoipainter', 'vmtkimagevoiselector', 'vmtkimagewriter', 'vmtklevelsetsegmentation', 'vmtklineartoquadratic', 'vmtklineresampling', 'vmtklocalgeometry', 'vmtkmarchingcubes', 'vmtkmeshboundaryinspector', 'vmtkmeshbranchclipper', 'vmtkmeshclipper', 'vmtkmeshdatareader', 'vmtkmeshlambda2', 'vmtkmeshlinearize', 'vmtkmeshgenerator', 'vmtkmeshprojection', 'vmtkmeshreader', 'vmtkmeshscaling', 'vmtkmeshtetrahedralize', 'vmtkmeshtosurface', 'vmtkmeshtransform', 'vmtkmeshtransformtoras', 'vmtkmeshvectorfromcomponents', 'vmtkmeshviewer', 'vmtkmeshvorticityhelicity', 'vmtkmeshwallshearrate', 'vmtkmeshwriter', 'vmtknetworkeditor', 'vmtknetworkextraction', 'vmtknetworkwriter', 'vmtkpointsplitextractor', 'vmtkpointtransform', 'vmtkpolyballmodeller', 'vmtkpotentialfit', 'vmtkpythonscript', 'vmtkrenderer', 'vmtkrendertoimage', 'vmtkrbfinterpolation', 'vmtksurfaceappend', 'vmtksurfacecapper', 'vmtksurfacecelldatatopointdata', 'vmtksurfacecenterlineprojection', 'vmtksurfaceclipper', 'vmtksurfaceconnectivity', 'vmtksurfacedecimation', 'vmtksurfacedistance', 'vmtksurfacekiteremoval', 'vmtksurfacemodeller', 'vmtksurfacenormals', 'vmtksurfaceprojection', 'vmtksurfacereader', 'vmtksurfacereferencesystemtransform', 'vmtksurfaceremeshing', 'vmtksurfacescaling', 'vmtksurfacesmoothing', 'vmtksurfacesubdivision', 'vmtksurfacetransform', 'vmtksurfacetransforminteractive', 'vmtksurfacetransformtoras', 'vmtksurfacetriangle', 'vmtksurfacetomesh', 'vmtksurfaceviewer', 'vmtksurfacewriter', 'vmtksurfmesh', 'vmtktetgen', 'vmtktetringenerator' ] for item in __all__: exec('from '+item+' import *')
24.823529
40
0.760325
121
2,954
18.495868
0.983471
0
0
0
0
0
0
0
0
0
0
0.000386
0.121869
2,954
118
41
25.033898
0.862375
0
0
0
0
0
0.751439
0.330511
0
0
0
0
0
1
0
false
0
0.008621
0
0.008621
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
76a63be24e856031dfeed6d51195aeef37a16987
293
py
Python
tests/test_app.py
c137digital/unv_template
2c356478408a27eb68eaaf38a74b32a6633a11d0
[ "MIT" ]
null
null
null
tests/test_app.py
c137digital/unv_template
2c356478408a27eb68eaaf38a74b32a6633a11d0
[ "MIT" ]
null
null
null
tests/test_app.py
c137digital/unv_template
2c356478408a27eb68eaaf38a74b32a6633a11d0
[ "MIT" ]
null
null
null
import pytest from package.app import SomeExampleApp @pytest.fixture def instance(): return SomeExampleApp('test') def test_calls_count(instance): assert instance.ncalls == 0 assert instance.name == 'test' assert instance.power(2, 3) == 8 assert instance.ncalls == 1
17.235294
38
0.706485
37
293
5.540541
0.594595
0.273171
0.195122
0
0
0
0
0
0
0
0
0.021097
0.191126
293
16
39
18.3125
0.843882
0
0
0
0
0
0.027304
0
0
0
0
0
0.4
1
0.2
false
0
0.2
0.1
0.5
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
0
0
0
0
0
0
0
2
76b8feb93af4c9b710972c0a0ddcb6f2cefb0ace
1,011
py
Python
tests/cdi/test_cdi_provides.py
odss/py-odss
b35838bba89f4dffc0dadd0b3821d8b38c0ca497
[ "MIT" ]
null
null
null
tests/cdi/test_cdi_provides.py
odss/py-odss
b35838bba89f4dffc0dadd0b3821d8b38c0ca497
[ "MIT" ]
null
null
null
tests/cdi/test_cdi_provides.py
odss/py-odss
b35838bba89f4dffc0dadd0b3821d8b38c0ca497
[ "MIT" ]
null
null
null
import pytest from tests.cdi.interfaces import IListener, IManager, IService, IStorage @pytest.mark.asyncio @pytest.mark.usefixtures("cdi") async def test_priovides_services(framework): bundle = await framework.install_bundle("tests.cdi.components") await bundle.start() refs = framework.find_service_references(IManager) assert len(refs) == 1 refs = framework.find_service_references(IStorage) assert len(refs) == 1 refs = framework.find_service_references(IListener) assert len(refs) == 1 refs = framework.find_service_references(IManager) assert len(refs) == 1 await bundle.stop() refs = framework.find_service_references(IService) assert len(refs) == 0 refs = framework.find_service_references(IStorage) assert len(refs) == 0 refs = framework.find_service_references(IListener) assert len(refs) == 0 refs = framework.find_service_references(IManager) assert len(refs) == 0 await framework.uninstall_bundle(bundle)
25.923077
72
0.730959
123
1,011
5.845528
0.276423
0.144645
0.189152
0.267038
0.613352
0.566064
0.566064
0.566064
0.566064
0.155772
0
0.009547
0.171118
1,011
38
73
26.605263
0.848449
0
0
0.6
0
0
0.02275
0
0
0
0
0
0.32
1
0
false
0
0.08
0
0.08
0
0
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
0
0
0
0
0
0
0
0
2
4f11e1a2f639114d93d16ba55fd19037323fea9b
37,729
py
Python
pyjs/builtin/mkbuiltin.py
takipsizad/pyjs
54db0ba6747aca744f9f3c3e985a17e913dfb951
[ "ECL-2.0", "Apache-2.0" ]
739
2015-01-01T02:05:11.000Z
2022-03-30T15:26:16.000Z
pyjs/builtin/mkbuiltin.py
takipsizad/pyjs
54db0ba6747aca744f9f3c3e985a17e913dfb951
[ "ECL-2.0", "Apache-2.0" ]
33
2015-03-25T23:17:04.000Z
2021-08-19T08:25:22.000Z
pyjs/builtin/mkbuiltin.py
takipsizad/pyjs
54db0ba6747aca744f9f3c3e985a17e913dfb951
[ "ECL-2.0", "Apache-2.0" ]
167
2015-01-01T22:27:47.000Z
2022-03-17T13:29:19.000Z
#!/usr/bin/env python import re func_type = { 'jsmethod': 0, 'function': 1, 'staticmethod': 2, 'classmethod': 3, 'wrappermethod': 4, } short_names = { 'module': 'm$', 'globals': 'g$', 'locals': 'l$', 'funcbase': 'f$', 'builtin': 'B$', 'constants': 'C$', 'None': 'N$', 'True': 'T$', 'False': 'F$', 'bool': 'b$', 'booljs': '_b', 'fcall': '_f', 'fcallext': '_fe', 'mcall': '_m', 'mcallext': '_me', } class Replacement(object): re_p = re.compile('''[$]{\s*([0-9]+)(\s*,\s*([^,]+?))+\s*}[$]''') re_empty_line = re.compile('''^ +$''', re.M) def substitute(self, src, names): def subs(m): indent_level = int(m.group(1)) args = m.group(0)[:-1].split(',')[1:] args = [i.strip() for i in m.group(0)[:-2].split(',')[1:]] name, args = args[0], args[1:] if name in short_names: return short_names[name] try: repl = getattr(self, 'repl_%s' % name, None)(*args) except: print 'repl name:', name, args raise lines = ['%s%s' % ( ' ' * indent_level, line, ) for line in repl.split('\n')] return "\n".join(lines) dst = self.re_p.sub(subs, src) for name in names: if isinstance(names[name], basestring): dst = dst.replace('${%s}' % name, names[name]) dst = self.re_empty_line.sub('', dst) return dst def repl_g(self): # globals return short_names['globals'] def repl_l(self): # locals return short_names['locals'] return 'l$' def repl_new_bool(self, value, true, false): return self.substitute(""" var v = ${value}.valueOf(); switch (v) { case null: case false: case 0: case '': return ${false}; case true: case 1: return ${true}; } if (typeof v == 'number' || typeof v == 'string') { return ${true}; } if (${value}['$inst'] === true) { var mro$, attr, attrs = ['__nonzero__', '__len__']; for (var i = 0; i < attrs.length; i++) { attr = attrs[i]; ${2, getattribute, mro$, v, ${value}, attr}$ if (typeof v != "undefined") { ${3, bind_method, v, v, ${value}, _meth_src}$ v = @{{fcall}}(this, null, v, ${value}); switch (attr) { case '__nonzero__': return v.__v ? ${true} : ${false}; case '__len__': return v.__v != 0 ? ${true} : ${false}; } } } } return ${true};""", locals()) def repl_jsmethod(self): return str(func_type['jsmethod']) def repl_function(self): return str(func_type['function']) def repl_classmethod(self): return str(func_type['classmethod']) def repl_staticmethod(self): return str(func_type['staticmethod']) def repl_wrappermethod(self): return str(func_type['wrappermethod']) def repl_call_head(self, skip): return self.substitute("""\ var rval, f, star = null, dstar = null, named = null, o = obj, args = Array.prototype.slice.call(arguments, ${skip}), track_len = $pyjs.trackstack.length; for (var i = 0; i < args.length; i++) { if (typeof args[i] == "undefined") { return @{{raise}}($new(@{{TypeError}}, B$str("argument " + i + " is undefined"))); } } if (module !== null && lineno !== null) { if (module['__class__'] !== @{{module}}) { debugger; } $pyjs.track.lineno = lineno; $pyjs.track.module = module; $pyjs.trackstack[track_len] = {'lineno': $pyjs.track.lineno, 'module': $pyjs.track.module}; } if (typeof o == "undefined") { //debugger; //return ${0,None}$; throw "o == 'undefined'";""", locals()) def repl_call_method(self): return self.substitute("""\ } else if (method !== null) { if (method['$inst'] === true) { o = method; } else if (typeof o['$inst'] == 'boolean') { // as in getattr var mro$; ${2, getattributes, o, obj, method, null}$ } else { o = o[method]; }""", locals()) def repl_call_object(self): return self.substitute("""\ } for (;;) { switch (o['__class__']) { case @{{function}}: f = o; break; case @{{instancemethod}}: f = o['im_func']; if (o['im_self'] !== null){ args = [o['im_self']].concat(args); } else if (base !== null) { args = [base].concat(args); } else if (obj['$inst'] === true) { args = [obj].concat(args); } else { if (args.length > 0 && args[0]['$inst'] === true) { // check if args[0].__class__.__mro__ contains im_class var mro = args[0]['__class__']['__mro__']; for (var j = 0; j < mro.length; j++) { if (mro[j] === o['im_class']) { mro = true; break; } } if (mro !== true) { @{{_issubtype}}(o['im_class'], args[0]); return @{{raise}}($new(@{{TypeError}}, B$str( "unbound method " + f.__name__ + "() " + "must be called with " + _typeof(o['im_class']) + " instance as first argument (got " + _typeof(args[0]) + " instance instead)"))); } break; } return @{{raise}}($new(@{{TypeError}}, B$str( "unbound method " + f.__name__ + "()" + " must be called with " + _typeof(o['im_class']) + " instance as first argument (got nothing instead)"))); } break; default: if (typeof o != 'function') { return @{{raise}}($new(@{{TypeError}}, B$str("javascript '" + typeof obj + "' object is not callable"))); } if (typeof o['$inst'] === "boolean") { obj = o; method = '__call__'; //o = o['__call__']; o = @{{_getattr}}(obj, method); } else if (o['$inst'] === true) { o = @{{_getattr}}(obj, method); } else { f = o; break; } if (typeof o == "undefined") { return @{{raise}}($new(@{{TypeError}}, B$str("'" + _typeof(obj) + "' object is not callable"))); } continue } break; }""", locals()) def repl_call_star_dstar(self): return self.substitute("""\ named = args.pop(); dstar = args.pop(); star = args.pop(); if (star !== null) { if (star instanceof Array) { args = args.concat(star); } if (star.__array instanceof Array) { args = args.concat(star.__array); } else { var iter = @{{fcall}}(this, null, @{{iter}}, null, star), next = @{{getattr}}(iter, 'next'), stopiter = @{{stopiter}}, v; for (;;) { @{{stopiter}} = true; v = @{{fcall}}(this, null, next, iter); @{{stopiter}} = stopiter; if (v === @{{StopIter}}) { break; } args.push(v); } } star = null; } if (named !== null) { var k, d = {}; k = false; for (k in named) { d[k] = named[k]; } if (k !== false) { if (typeof f.func_args == "undefined") { @{{raise}}($new(@{{TypeError}}, B$str("Cannot apply named arguments on javascript function"))); } named = d; } } if (dstar !== null) { if (dstar._length == 0) { dstar = null; } else { if (typeof f.func_args == "undefined") { @{{raise}}($new(@{{TypeError}}, B$str("Cannot apply dstar args on javascript function"))); } var k, v, d = {}; if (dstar.__class__ === @{{dict}}) { for (var h in dstar.__object_hash) { k = dstar.__object_hash[h]['key']; if (typeof k != "string" && k.__class__ != @{{str}}) { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() keywords must be strings"))); } d[k.valueOf()] = dstar.__object[h]; } } else if (dstar['$inst'] == "undefined") { for (var k in dstar) { d[k] = dstar[k]; } } else { @{{raise}}($new(@{{TypeError}}, B$str("Invalid dstar_args"))); } dstar = d; } } if (dstar !== null || named !== null) { var ndefaults = f.func_defaults ? f.func_defaults.length : 0; if (dstar === null) { dstar = {}; } else if (named === null) { named = {}; } for (var i = 0; i < f.func_args.length; i++) { k = f.func_args[i]; v = named[k]; delete named[k]; if (typeof v == "undefined") { v = dstar[k]; delete dstar[k]; } else if (typeof dstar[k] != "undefined") { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() got multiple values for keyword argument '" + k + "'"))); } if (typeof v != "undefined") { if (i < args.length) { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() got multiple values for keyword argument '" + k + "'"))); } args[i] = v; } else if (i >= args.length) { if (i < f.func_minargs) { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes at least " + f.func_minargs + " non-keyword arguments (" + f.func_args.length + " given)"))); } args[i] = f.func_defaults[ndefaults - (f.func_args.length - i)]; } } if (f.func_dstarargs === null) { for (var k in dstar) { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() got an unexpected keyword argument '" + k + "'"))); } } for (k in named) { if (typeof dstar[k] != 'undefined') { return @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() got multiple values for keyword argument '" + k + "'"))); } dstar[k] = named[k]; } dstar = $new(@{{dict}}, dstar); }""", locals()) def repl_call_tail(self): return self.substitute("""\ if (typeof f.func_args != "undefined") { var n_args = args.length; if (dstar === null && args.length < f.func_args.length) { // Just add defaults var n = f.func_args.length - args.length; if (n > 0 && f.func_defaults !== null) { if (n > f.func_defaults.length) { args = args.concat(f.func_defaults.slice(0)); } else { n = f.func_defaults.length - n; args = args.concat(f.func_defaults.slice(n)); } } } if (f.func_args.length != args.length) { if (f.func_starargs !== null && f.func_args.length < args.length) { if (f.func_args.length == 0) { star = args; args = []; } else { star = args.slice(f.func_args.length); args.splice(f.func_args.length, args.length - f.func_args.length); } star = B$tuple(star); } else if (f.func_defaults === null || f.func_defaults.length == 0) { switch (f.func_args.length) { case 0: @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes no arguments (" + n_args + " given)"))); case 1: @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes exactly " + f.func_args.length + " argument (" + n_args + " given)"))); default: @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes exactly " + f.func_args.length + " arguments (" + n_args + " given)"))); } } else { if (f.func_args.length > args.length) { if (f.func_minargs == 1) { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes at least 1 argument (0 given)"))); } else { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes at least " + f.func_minargs + " arguments (" + n_args + " given)"))); } } if (f.func_minargs == 1) { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes at most 1 argument (" + n_args + " given)"))); } else { @{{raise}}($new(@{{TypeError}}, B$str(f.__name__ + "() takes at most " + f.func_minargs + " arguments (" + n_args + " given)"))); } } } if (f.func_starargs !== null) { if (star === null) { //star = B$tuple([]); star = empty_tuple; } args.push(star); } if (module !== null && lineno !== null) { if (typeof f._module != "undefined" && f._module !== null && typeof f._lineno != "undefined" && f._lineno !== null) { $pyjs.track.module = f._module; $pyjs.track.lineno = f._lineno; } } if (dstar !== null) { args.push(dstar); args.push(null); // no named args } else if (f.func_dstarargs !== null) { dstar = B$dict(); args.push(dstar); args.push(null); // no named args } } if (typeof obj['$inst'] != "undefined" || typeof obj['func_type'] != "undefined") { rval = f.apply(module, args); } else { // obj is an ordinary javascript object rval = f.apply(obj, args); } if (typeof rval == "undefined") { if (typeof f['__name__'] == 'undefined') { return ${0,None}$; } else { @{{raise}}($new(@{{ValueError}}, B$str("return value of call is undefined"))); } } if (module !== null && lineno !== null) { $pyjs.track = $pyjs.trackstack[track_len]; $pyjs.trackstack.splice(track_len, $pyjs.trackstack.length); if (typeof $pyjs.track == "undefined" || $pyjs.track.lineno != lineno || $pyjs.track.module !== module) { debugger; } } return rval;""", locals()) def repl___new__(self, instance, cls, add_dict=True): if add_dict is not True: if add_dict.lower().strip() == 'false': add_dict = False else: add_dict = True if add_dict: add_dict = """ if (typeof ${cls} == "undefined") { debugger; } if (typeof ${cls}['__slots__'] == "undefined" || ${cls}['__slots__'].length > 0) { ${instance}['__dict__'] = B$dict(); ${instance}['$dict'] = ${instance}['__dict__']['__object']; }""" else: add_dict = '' return self.substitute("""\ var ${instance} = function ( ) { var args = Array.prototype.slice.call(arguments); if (arguments.callee['__class__'] === @{{instancemethod}}) { if (arguments.callee['im_self'] !== null) { return @{{fcall}}.apply(this, [this, null, arguments.callee['im_func'], null, arguments.callee['im_self']].concat(args)); } } var a = @{{_getattr}}(arguments.callee, '__call__'); if (typeof a == "undefined") { @{{raise}}($new(@{{TypeError}}, B$str("'" + _typeof(arguments.callee) + "' object is not callable"))); } if (args.length >= 3) { var len = args.length; if ((args[len-3] === null || args[len-3]['__class__'] === @{{tuple}}) && (args[len-2] === null || args[len-3]['__class__'] === @{{dict}}) && (args[len-1] === null || typeof args[len-1]['__class__'] == "undefined")) { return @{{fcallext}}.apply(this, [this, null, a, arguments.callee].concat(args)); } } return @{{fcall}}.apply(this, [this, null, a, arguments.callee].concat(args)); } ${instance}['toString'] = function ( ) { try { return @{{mcall}}(this, null, this, '__str__').valueOf(); } catch (e) { } try { return "<" + this.__class__.__name__ + " instance>"; } catch (e) { } return "<instance>"; }; ${instance}['$inst'] = true;%(add_dict)s ${instance}['__class__'] = ${cls};""" % locals(), locals()) def repl_create_instance(self, args, cls, mcall, fcall): return self.substitute("""\ var method$, instance, mro$, module = this['__class__'] === @{{module}} ? this : null; ${0, getattribute, mro$, method$, ${cls}, '__new__'}$ if (method$ === B$__new__) { ${1, __new__, instance, ${cls}}$ } else { instance = ${fcall}.apply(module, [module, null, method$, ${cls}, ${cls}].concat(${args})); instance['__class__'] = cls; } if (instance['$inst'] === true) { ${1, getattribute, mro$, method$, ${cls}, '__init__'}$ if (method$ !== B$__init__) { ${2, bind_method, method$, method$, instance, _meth_src}$ var ret = ${fcall}.apply(module, [module, null, method$, null].concat(${args})); if (ret !== @{{None}} && ret !== null) { if (ret['__class__'] != "undefined") { return @{{raise}}($new(@{{TypeError}}, B$str("__init__() should return None, not '" + ret['__class__']['__name__'] + "'"))); } return @{{raise}}($new(@{{TypeError}}, B$str("__init__() should return None"))); } } } return instance;""", locals()) def repl_bind_method(self, dst, src, obj, meth_src): return self.substitute("""\ if (${meth_src}['$inst'] === false && ${obj}['__class__'] !== @{{module}} && typeof ${src} != "undefined" && typeof ${src}['$inst'] != "undefined") { switch (${dst}['__class__']) { case @{{function}}: ${3, __new__, _new_dst$, @{{instancemethod}}}$ _new_dst$['im_class'] = ${obj}['$inst'] === true ? ${obj}['__class__'] : ${obj}; _new_dst$['im_func'] = ${dst}; _new_dst$['im_self'] = ${obj}['$inst'] === true ? ${obj} : null; ${dst} = _new_dst$; break; case @{{staticmethod}}: ${dst} = ${dst}['im_func']; break; case @{{classmethod}}: ${3, __new__, _new_dst$, @{{instancemethod}}}$ _new_dst$['im_class'] = ${obj}['$inst'] === true ? ${obj}['__class__'] : ${obj}; _new_dst$['im_func'] = ${dst}['im_func']; _new_dst$['im_self'] = ${obj}['$inst'] === true ? ${obj}['__class__'] : ${obj}; ${dst} = _new_dst$; break; case @{{bool}}: // Some known to be non-descriptors case @{{int}}: case @{{long}}: case @{{str}}: break; default: // check for __get__ method in ${dst} if (${dst}['$inst'] === true) { var get$ = @{{_getattr}}(${dst}, '__get__'); if (typeof get$ != 'undefined') { ${dst} = @{{fcall}}(this, null, get$, ${dst}, ${obj}, ${obj}['__class__']); } } break; } }""", locals()) def repl_attr_args_validate(self, _self, name): return self.substitute("""\ if ($self['$inst'] !== true) { @{{raise}}($new(@{{TypeError}}, B$str("can't apply this __getattribute__ to type object"))); } if (${name}['__class__'] !== @{{str}} && typeof ${name} != 'string') { @{{raise}}($new(@{{TypeError}}, B$str("attribute name must be string"))); }""", locals()) def repl_getattribute(self, mro, dst, src, name, break_after_instance=False): if break_after_instance: break_after_instance = 'break;\n ' else: break_after_instance = '' return self.substitute("""\ ${dst} = [][1]; var ${mro} = ${src}['__mro__']; var _meth_src = ${src}; switch (${src}['$inst']) { case true: if (${src}['__class__'] === @{{module}}) { ${dst} = ${src}['$dict'][${name}]; break; } else if (${src}['__class__'] === @{{function}}) { switch (${name}.charAt(0)) { case 'i': case '_': ${dst} = ${src}[${name}]; } break; } var _noraise$ = @{{noraise}}; var ga; ${mro} = ${src}['__class__']['__mro__']; for (var mro_i$ = 0; mro_i$ < ${mro}.length - 1; mro_i$++) { var _mro$ = ${mro}[mro_i$]; var ga = _mro$['__getattribute__']; if (typeof ga == "undefined") { if (typeof _mro$ == "undefined" || typeof _mro$['$dict']['__getattribute__'] == "undefined") { continue; } ga = _mro$['$dict']['__getattribute__']; } ${3, bind_method, ga, ${src}, ${src}, ${src}['__class__']}$ @{{noraise}} = @{{AttributeError}}; ${dst} = @{{fcall}}(this, null, ga, _mro$, ${name}); @{{noraise}} = _noraise$; if (${dst} === @{{AttributeError}}) { ${dst} = [][1]; } _meth_src = ${src}['__class__']; ${src} = ${src}['__class__']; break; } if (typeof ${dst} == "undefined") { if (typeof ${src}['$dict'] != "undefined") { ${dst} = ${src}['$dict'][${name}]; if (typeof ${dst} != "undefined") { if (${dst} !== {}[${name}]) { break; } ${dst} = [][1]; } } switch (${name}.charAt(0)) { case 'i': case '_': ${dst} = ${src}[${name}]; } if (typeof ${dst} != "undefined") { break; } }${break_after_instance} case false: if (typeof ${dst} == "undefined") { var _mro$, ga; if (${src}['$inst'] === true) { _meth_src = ${src}['__class__']; } else { switch (${name}.charAt(0)) { case 'i': case '_': ${dst} = ${src}[${name}]; } if (typeof ${dst} != "undefined") { break; } } if (typeof ${dst} == "undefined") { for (var mro_i$ = 0; mro_i$ < ${mro}.length; mro_i$++) { _mro$ = ${mro}[mro_i$]; ${dst} = _mro$['$dict'][${name}]; if (typeof ${dst} != "undefined") { if (${dst} !== {}[${name}]) { break; } ${dst} = [][1]; } switch (${name}.charAt(0)) { case 'i': case '_': ${dst} = _mro$[${name}]; } if (typeof ${dst} != "undefined") { break; } } } if (typeof ${dst} == "undefined" && ${name} !== '__get__') { for (var mro_i$ = 0; mro_i$ < ${mro}.length - 1; mro_i$++) { _mro$ = ${mro}[mro_i$]; if (typeof _mro$['$dict'] == "undefined" || typeof _mro$['$dict']['__getattr__'] == "undefined") { continue; } ga = _mro$['$dict']['__getattr__']; ${5, bind_method, ga, ${src}, ${src}, ${src}['__class__']}$ @{{noraise}} = @{{AttributeError}}; ${dst} = @{{fcall}}(this, null, ga, _mro$, ${name}); @{{noraise}} = _noraise$; if (${dst} === @{{AttributeError}}) { ${dst} = [][1]; } // TODO : unbind ${dst} ? break; } } } break; default: ${dst} = ${src}[${name}]; if (typeof ${dst} == "undefined" && typeof ${src}['$dict'] != "undefined") { ${dst} = ${src}['$dict'][${name}]; } }""", locals()) def repl_getattributes(self, dst, src, name, value): return self.substitute("""\ var attrname, attrnames, ga, mro, _${src} = ${src}; if (${name} instanceof Array) { attrnames = ${name}; } else { attrnames = [${name}]; } find_attr: for (var attri = 0; attri < attrnames.length; attri++) { attrname = attrnames[attri]; if (typeof attrname != 'string') { if (typeof attrname['__s'] != "undefined") { attrname = attrname['__s']; } else { @{{raise}}($new(@{{TypeError}}, B$str("attribute name must be string, not '" + _typeof(attrname) + "'"))); } } ${1, getattribute, mro, ${dst}, _${src}, attrname}$ if (typeof ${dst} == "undefined") { if (_${src}['$inst'] === true && _${src}['__class__'] !== @{{module}} && _${src}['__class__'] !== @{{function}}) { if (typeof ${dst} == "undefined") { if (${value} === null || typeof ${value} == "undefined") { @{{raise}}($new(@{{AttributeError}}, B$str("'" + _${src}['__class__']['__name__'] + "' object has no attribute '" + attrname + "'"))); } else { ${dst} = ${value}; break find_attr; } } } if (${value} === null || typeof ${value} == "undefined") { if (_${src}['$inst'] === false) { @{{raise}}($new(@{{AttributeError}}, B$str("type object '" + _${src}['__name__'] + "' object has no attribute '" + attrname + "'"))); } @{{raise}}($new(@{{AttributeError}}, B$str(attrname))); } ${dst} = ${value}; break find_attr; } if (attri == attrnames.length - 1) { ${2, bind_method, ${dst}, _${src}, ${src}, _meth_src}$ } else { // check for __get__ method in ${dst} if (${dst}['$inst'] === true) { var get$ = @{{_getattr}}(${dst}, '__get__'); if (typeof get$ != 'undefined') { ${dst} = @{{fcall}}(this, null, get$, ${dst}, _${src}, _${src}['__class__']); } } } ${src} = _${src}; _${src} = ${dst}; }""", locals()) def repl_type_class(self, cls, module, clsname, bases, dict): return self.substitute("""\ var ${cls}, mro$ = new Array(), _bases = ${bases}; ${cls} = function () { var args = Array.prototype.slice.call(arguments); if (args.length >= 3) { var len = args.length; if ((args[len-3] === null || args[len-3]['__class__'] === @{{tuple}}) && (args[len-2] === null || args[len-3]['__class__'] === @{{dict}}) && (args[len-1] === null || typeof args[len-1]['__class__'] == "undefined")) { return $newext.apply(this, [arguments.callee].concat(args)); } } return $new.apply(this, [arguments.callee].concat(args)); }; ${cls}['$inst'] = false; ${cls}['__name__'] = typeof ${clsname} == "string" ? B$str(${clsname}) : ${clsname}; if (${bases} instanceof Array) { ${cls}['__bases__'] = B$tuple(${bases}); } else { ${cls}['__bases__'] = ${bases}; _bases = ${bases}['__array']; } if (typeof ${dict}['mro'] != "undefined") { // The mro method (?) exists. Use that. // TODO @{{raise}}(@{{NotImplemented}}); } else { for (var i = 0; i < _bases.length; i++) { mro$.push(new Array().concat(_bases[i].__mro__)); } ${cls}['__mro__'] = [${cls}].concat(mro_merge(mro$)); } ${cls}['$dict'] = {}; if (${module}['__class__'] !== @{{module}}) { debugger; } var __module__ = typeof ${module}['$dict'] != "undefined" ? ${module}['$dict']['__name__'] : ${module}['__name__']; if (typeof __module__ != "undefined") { cls['$dict']['__module__'] = __module__; } if (typeof ${dict} != "undefined" && ${dict}['__class__'] === @{{dict}}) { for (var k in ${dict}.__object) { cls['$dict'][k] = ${dict}.__object[k]; } } ${cls}['__dict__'] = @{{dictproxy}}; ${cls}['__dict__']['__object'] = ${cls}['$dict']; func(${0,module}$, null, ${cls}, '__call__', ${0, classmethod}$, null, 'args', 'kwargs', null, $newext, true); ${cls}['__class__'] = @{{type}};""", locals()) def repl_hash(self, obj, dst): return self.substitute("""\ if (typeof ${obj}['$inst'] != "undefined") { ${dst} = ${obj}[$hash_id_name$]; if (typeof ${dst} == "undefined") { if (${obj}['__class__'] === @{{str}}) { ${dst} = ${obj}['__s'].charAt(0) == '#' ? '#string#' + ${obj}['__s'] : ${obj}['__s']; } else { ${dst} = @{{mcall}}(this, null, ${obj}, '__hash__'); } } } else if (typeof ${obj} == "string") { ${dst} = ${obj}.charAt(0) == '#' ? '#string#' + ${obj} : ${obj}; } else { ${dst} = '#' + typeof ${obj} + '#' + ${obj}; }""" % locals(), locals()) def repl_op_compare(self, op, a, b, val1, val2): if op in ['is', 'is_not']: return self.substitute("""\ if (${a} === ${b}) { return ${val1}; } if (${a} !== null && ${b} !== null) { switch ((${a}.__number__ << 8) | ${b}.__number__) { case 0x0101: return ${a} == ${b} ? ${val1} : ${val2}; case 0x0202: return $a.__v == $b.__v ? ${val1} : ${val2}; case 0x0404: return @{{long}}['$dict'].__cmp__(${a}, ${b}) == 0 ? ${val1} : ${val2}; } } return ${val2};""" % locals(), locals()) if op in ['in', 'not_in']: return self.substitute("""\ var i, mro$; ${0, getattribute, mro$, i, ${b}, '__contains__'}$ if (typeof i != "undefined") { ${1, bind_method, i, i, ${b}, _meth_src}$ return @{{fcall}}(this, null, i, ${b}, ${a}).valueOf() ? ${val1} : ${val2}; } var __iter__ = @{{iter}}(${b}); var $stopiter = @{{stopiter}} for (;;) { @{{stopiter}} = true; i = @{{mcall}}(this, null, __iter__, 'next'); @{{stopiter}} = $stopiter; if (i === @{{StopIter}}) { return ${val2}; } if (@{{op_eq}}(i, ${a})) { return ${val1}; } }""" % locals(), locals()) valnull = '${val2}' if not '=' in op: opis = '' elif op == '!=': opis = 'if (${a} === ${b}) return ${val2};\n' valnull = '${val1}' else: opis = 'if (${a} === ${b}) return ${val1};\n' opis = '' return self.substitute("""\ %(opis)sif (${a} !== null && ${b} !== null) { switch ((${a}.__number__ << 8) | ${b}.__number__) { case 0x0101: case 0x0401: return ${a}.valueOf() ${op} ${b}.valueOf() ? ${val1} : ${val2}; case 0x0102: return ${a}.valueOf() ${op} ${b}.__v ? ${val1} : ${val2}; case 0x0201: return ${a}.__v ${op} ${b}.valueOf() ? ${val1} : ${val2}; case 0x0202: return ${a}.__v ${op} ${b}.__v ? ${val1} : ${val2}; case 0x0104: case 0x0204: ${a} = $new(@{{long}}, ${a}.valueOf()); case 0x0404: if (${a}['__class__'] !== @{{long}}) break; return @{{long}}['$dict']['__cmp__'](${a}, ${b}).valueOf() ${op} 0 ? ${val1} : ${val2}; case 0x0402: if (${a}['__class__'] !== @{{long}}) break; return @{{long}}['$dict']['__cmp__'](${a}, $new(@{{long}}, ${b}.valueOf())).valueOf() ${op} 0 ? ${val1} : ${val2}; } var v = @{{fcall}}(this, null, @{{cmp}}, null, ${a}, ${b}).valueOf(); return v === null ? %(valnull)s : (v ${op} 0 ? ${val1} : ${val2}); } return ${val2};""" % locals(), locals()) def repl_op_arithmetic(self, op, opname, x, y, i, opfunc=None): jsop = op if opfunc is None: opnumber = "x_v %s y_v" % op elif opfunc == 'Math.floor': jsop = '/' opnumber = "%s(x_v %s y_v)" % (opfunc, jsop) elif opfunc == 'mod': opnumber = "x_v %s y_v" % op opnumber = "(x_v=x_v %s y_v) < 0 && y_v > 0 ? x_v + y_v : x_v" % op else: opnumber = "%s(x_v, y_v)" % opfunc if op in ['/', '//', '%']: zerodiv = "if (${y}.valueOf() == 0) return @{{raise}}($new(@{{ZeroDivisionError}}, B$str('float divmod()')));\n"; else: zerodiv = '' return self.substitute("""\ %(zerodiv)sif (${x} !== null && ${y} !== null) { var m = ${i} === true ? '__i%(opname)s__' : '__%(opname)s__'; switch ((${x}.__number__ << 8) | ${y}.__number__) { case 0x0101: case 0x0102: case 0x0201: case 0x0104: case 0x0401: var x_v = ${x}.valueOf(), y_v = ${y}.valueOf(); return $new(@{{float}}, %(opnumber)s); case 0x0202: return @{{int}}['$dict'].__%(opname)s__(${x}, ${y}); case 0x0204: return @{{long}}['$dict'].__%(opname)s($new(@{{long}}, ${x}.__v), ${y}); case 0x0402: return @{{long}}['$dict'].__%(opname)s(${x}, $new(@{{long}}, ${y}.__v)); case 0x0404: return @{{long}}['$dict'].__%(opname)s(${x}, ${y}); } if (${x}['$inst'] === true && ${y}['$inst'] === true) { var op, v; op = @{{_getattr}}(${x}, m); if (typeof op != "undefined") { v = @{{fcall}}(this, null, op, ${x}, ${y}); if (v !== @{{NotImplemented}}) { return v; } } if (${i} !== true) { op = @{{_getattr}}(${y}, '__r%(opname)s__'); if (typeof op != "undefined") { v = @{{mcall}}(this, null, ${y}, '__r%(opname)s__', ${x}); if (v !== @{{NotImplemented}}) { return v; } } } else { op = @{{_getattr}}(${x}, '__%(opname)s__'); if (typeof op != "undefined") { v = @{{fcall}}(this, null, op, ${x}, ${y}); if (v !== @{{NotImplemented}}) { return v; } } } } var x_v = ${x}.valueOf(), y_v = ${y}.valueOf(); if (typeof x_v == 'number' && typeof y_v == 'number') { return $new(@{{float}}, %(opnumber)s); } } @{{raise}}($new(@{{TypeError}}, B$str("unsupported operand type(s) for %(op)s: '" + @{{repr}}(${x}) + "', '" + @{{repr}}(${y}) + "'")));\ """ % locals(), locals()) def repl_op_bitexpr2(self, op, opname, x, y): return self.substitute("""\ if (${x} !== null && ${y} !== null) { switch ((${x}.__number__ << 8) | ${y}.__number__) { case 0x0202: if (${x}['__class__'] === @{{int}}) { return ${x}['__class__']['$dict']['__%(opname)s__'](${x}, ${y}); } break case 0x0204: if (${y}['__class__'] === @{{long}}) { return ${y}['__class__']['$dict']['__r%(opname)s__'](${y}, $new(@{{long}}, ${x})); } break case 0x0402: if (${x}['__class__'] === @{{long}}) { return ${x}['__class__']['$dict']['__%(opname)s'](${x}, $new(@{{long}}, ${y}.__v)); } break case 0x0404: if (${x}['__class__'] === @{{long}}) { return ${x}['__class__']['$dict']['__%(opname)s'](${x}, ${y}); } break } var v = @{{_getattr}}(${x}, '__%(opname)s__'); if (typeof v != "undefined") { v = @{{fcall}}(this, null, v, ${x}, ${y}); if (v !== @{{NotImplemented}}) { return v; } } v = @{{_getattr}}(${y}, '__r%(opname)s__'); if (typeof v != "undefined") { v = @{{fcall}}(this, null, v, ${y}, ${x}); if (v !== @{{NotImplemented}}) { return v; } } } @{{raise}}($new(@{{TypeError}}, @{{sprintf}}("unsupported operand type(s) for %(op)s: '%%r', '%%r'", [${x}, ${y}])));\ """ % locals(), locals()) def repl_op_bitexpr(self, op, opname, args): return self.substitute("""\ var a; if (args[0] !== null && args[1] !== null && args.length > 1) { var v, r, arg; v = args[0]; for (var i = 1; i < args.length; i++) { arg = args[i] r = @{{_getattr}}(v, '__%(opname)s__'); if (typeof r != "undefined") { r = @{{fcall}}(this, null, r, v, arg); if (r !== @{{NotImplemented}}) { v = r; continue; } } r = @{{_getattr}}(arg, '__r%(opname)s__'); if (typeof r != "undefined") { r = @{{fcall}}(this, null, r, arg, v); if (r !== @{{NotImplemented}}) { v = r; continue; } } v = null; break; } if (v !== null) { return v; } } var msg = "unsupported operand type(s) for %(op)s: " for (var i = 0; i < args.length; i++) { msg += @{{repr}}(args[i]); } @{{raise}}($new(@{{TypeError}}, B$str(msg)));\ """ % locals(), locals()) def repl_op_iexpr(self, op, opname, x, y): return self.substitute("""\ @{{raise}}($new(@{{TypeError}}, B$str(msg)));\ """ % locals(), locals()) if __name__ == '__main__': import sys if not sys.argv[1:]: src = open("__builtin__.py.in", 'r').read() dst = Replacement().substitute(src, {}) open("__builtin__.py", 'w').write(dst) else: src = open(sys.argv[1], 'r').read() dst = Replacement().substitute(src, {}) print dst #open("pyjslib.py", 'w').write(dst)
35.898192
170
0.442312
3,872
37,729
4.054494
0.078512
0.030066
0.033569
0.034397
0.446716
0.357093
0.283266
0.240716
0.210778
0.185744
0
0.010882
0.335047
37,729
1,050
171
35.932381
0.614876
0.001829
0
0.315109
0
0.075547
0.861855
0.110022
0
0
0.003983
0
0
0
null
null
0
0.001988
null
null
0.002982
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
1
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
4f16f9d40b6b2bbd0d934c03c6a79b97b5d1999e
783
py
Python
pygpseq/anim/__init__.py
ggirelli/gpseq-img-py
a429a26d0661ed4c38474fba80e9fcb81a4b0bbd
[ "MIT" ]
2
2020-06-11T01:59:01.000Z
2020-10-09T14:40:06.000Z
pygpseq/anim/__init__.py
ggirelli/pygpseq
a429a26d0661ed4c38474fba80e9fcb81a4b0bbd
[ "MIT" ]
3
2019-03-20T14:40:33.000Z
2021-10-14T10:09:22.000Z
pygpseq/anim/__init__.py
ggirelli/pygpseq
a429a26d0661ed4c38474fba80e9fcb81a4b0bbd
[ "MIT" ]
3
2017-03-10T15:55:58.000Z
2020-07-16T11:09:55.000Z
# -*- coding: utf-8 -*- """ @author: Gabriele Girelli @email: gigi.ga90@gmail.com @module: pygpseq.anim @description: wrappers for GPSeq image dataset standard analysis. """ # DEPENDENCIES ================================================================= __all__ = [ "joblib", "logging", "matplotlib", "multiprocessing", "numpy", "pandas", "scipy", "skimage", "weasyprint", ] from pygpseq.anim.main import Main from pygpseq.anim.analysis import Analyzer from pygpseq.anim.nucleus import Nucleus from pygpseq.anim.series import Series from pygpseq.anim.condition import Condition # END ========================================================================== ################################################################################
23.727273
80
0.498084
64
783
6.03125
0.640625
0.170984
0.194301
0
0
0
0
0
0
0
0
0.004418
0.132822
783
32
81
24.46875
0.564065
0.411239
0
0
0
0
0.191375
0
0
0
0
0
0
1
0
false
0
0.3125
0
0.3125
0.0625
0
0
0
null
0
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
0
0
1
0
0
0
0
2
4f3c8cd3d6ca2faa77622ecd6fc988662a91ad85
4,753
py
Python
flask_blog/test/__init__.py
paciFIST-Studios/web
993503b86dd81de0fb5b854cd4d95f9cd7a80160
[ "MIT" ]
null
null
null
flask_blog/test/__init__.py
paciFIST-Studios/web
993503b86dd81de0fb5b854cd4d95f9cd7a80160
[ "MIT" ]
1
2022-03-12T01:02:31.000Z
2022-03-12T01:02:31.000Z
flask_blog/test/__init__.py
paciFIST-Studios/web
993503b86dd81de0fb5b854cd4d95f9cd7a80160
[ "MIT" ]
null
null
null
import unittest import os from flask_blog import create_application, db, bcrypt from flask_blog.models import User from ..configuration import TestConfig USING_CONFIG_CLASS = TestConfig class UnitTestBase(unittest.TestCase): TEST_EMAIL = 'tester@testtest.com' TEST_USER = 'tester' TEST_PASS = 'test123' # these tags exist in the html of different pages, and are used to simplify the # testing of different site routes ACCOUNT_HTML = '<!-- testing tag: account edit page -->' ACCOUNT_HTML__UPDATE_SUCCESS = 'Your account has been updated' ERROR_403_HTML = '<!-- testing tag: forbidden 403 -->' ERROR_404_HTML = '<!-- testing tag: error 404 -->' ERROR_500_HTML = '<!-- testing tag: error 500 -->' HOME_HTML = '<!-- testing tag: home page -->' LAYOUT_HTML__USER_AUTHENTICATED = '<!-- testing tag: layout.html; user is authenticated -->' LAYOUT_HTML__USER_NOT_AUTHENTICATED = '<!-- testing tag: layout.html; user is not authenticated -->' LOGIN_HTML = '<!-- testing tag: login page -->' LOGIN_FAIL_MESSAGE = 'Login Failed!. Check email and password' PASSWORD_RESET_HTML = '<!-- testing tag: do password reset -->' REGISTER_HTML = '<!-- testing tag: register account page -->' REGISTRATION_ERROR_EMAIL_INVALID = '<!-- testing tag: email invalid -->' REGISTRATION_ERROR_USERNAME_INVALID = '<!-- testing tag: username invalid -->' # REGISTRATION_ERROR_PASSWORD_INVALID = '<!-- testing tag: password invalid -->' # REGISTRATION_ERROR_CONFIRM_PASSWORD_INVALID = '<!-- testing tag: confirm password invalid -->' REQUEST_PASSWORD_RESET_HTML = '<!-- testing tag: request password reset -->' RESUME_HTML = '<!-- testing tag: resume page -->' CODE_200 = '200 OK' CODE_302 = '302 FOUND' # redirect CODE_404 = '404 NOT FOUND' @classmethod def setUpClass(cls): cls.app = create_application(config_class=USING_CONFIG_CLASS) # we'll use the test client to send requests to the application cls.client = cls.app.test_client() # get db path cls.app_root_path = cls.app.config.root_path cls.test_db_uri = cls.app.config['SQLALCHEMY_DATABASE_URI'] cls.test_db_path = os.path.join(cls.app_root_path, cls.test_db_uri.split('///')[-1]) # it's possible that cleanup of the test db failed on a previous run if os.path.isfile(cls.test_db_path): os.remove(cls.test_db_path) # create test db with cls.app.app_context(): db.create_all() # Add test user to test db, so different test suites can access db w/o having to register hash_word = bcrypt.generate_password_hash(cls.TEST_PASS).decode('utf-8') user = User(username=cls.TEST_USER, email=cls.TEST_EMAIL, password=hash_word) db.session.add(user) db.session.commit() @classmethod def tearDownClass(cls): with cls.app.app_context(): db.session.remove() db.drop_all() # here, we remove the test db. Note: if the program is interrupted--that's particularly # common if you're using breakpoints in an IDE--this code might not run, and therefore # we also make a point to remove it just before creation of the test db in setUpClass fn if os.path.isfile(cls.test_db_path): os.remove(cls.test_db_path) @staticmethod def response_has_tag(response, tag, decode_as='utf-8'): return tag in response.data.decode(decode_as) @classmethod def user_is_authenticated(cls, response, decode_as='utf-8'): return cls.response_has_tag(response, cls.LAYOUT_HTML__USER_AUTHENTICATED, decode_as) @classmethod def user_is_not_authenticated(cls, response, decode_as='utf-8'): return cls.response_has_tag(response, cls.LAYOUT_HTML__USER_NOT_AUTHENTICATED, decode_as) def test__base_configuration__has_correct_defaults(self): # app has been created self.assertTrue(self.app) # testing client has been exposed to test harness self.assertTrue(self.client) # testing db should now exist self.assertTrue(os.path.isfile(self.test_db_path)) # we want to run in testing mode, b/c it gives better error messages self.assertTrue(self.app.config['TESTING']) # we are not testing in debug mode self.assertFalse(self.app.config['DEBUG']) # our application assumes this is the correct starting point self.assertEqual(self.app.config['APPLICATION_ROOT'], '/') # security options self.assertTrue(self.app.config['SESSION_COOKIE_SECURE']) self.assertTrue(self.app.config['REMEMBER_COOKIE_SECURE'])
39.941176
104
0.677467
636
4,753
4.855346
0.300314
0.051813
0.045337
0.021049
0.228627
0.156088
0.110751
0.085492
0.085492
0.085492
0
0.01186
0.21944
4,753
118
105
40.279661
0.820485
0.225331
0
0.144928
0
0
0.217486
0.018033
0
0
0
0
0.115942
1
0.086957
false
0.086957
0.072464
0.043478
0.536232
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
0
0
0
0
0
1
0
0
1
0
0
2
4f5601eccdd5e1af3c29403768fffb8008a1ac91
20,294
py
Python
research/astronet/third_party/robust_mean/test_data/random_normal.py
xychu/models
0344c5503ee55e24f0de7f37336a6e08f10976fd
[ "Apache-2.0" ]
286
2018-12-05T00:04:50.000Z
2022-03-23T03:35:54.000Z
research/astronet/third_party/robust_mean/test_data/random_normal.py
xychu/models
0344c5503ee55e24f0de7f37336a6e08f10976fd
[ "Apache-2.0" ]
14
2019-02-26T01:44:16.000Z
2022-01-24T21:59:51.000Z
research/astronet/third_party/robust_mean/test_data/random_normal.py
xychu/models
0344c5503ee55e24f0de7f37336a6e08f10976fd
[ "Apache-2.0" ]
115
2018-12-04T19:44:26.000Z
2022-02-20T17:57:16.000Z
"""This file contains 1,000 points of a random normal distribution. The mean of the distribution is 2, and the standard deviation is 1. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function RANDOM_NORMAL = [ 0.692741320869, 1.948556207658, -0.140158117639, 2.680322906859, 1.876671492867, 2.885286232509, 1.482222151802, 2.234349266246, 2.437427989583, 1.573053624952, 2.169198249367, 2.791023059619, -1.053798286951, 1.796497126664, 3.806070621390, 1.744055208958, 3.474399140181, 1.564447665560, 1.143107137921, 1.618376255615, 2.615632139609, 1.413239777404, 1.047237320108, 3.190489536636, 2.918428435434, 1.268789896280, 0.931181066003, 3.797790627792, 0.493025834330, 1.866146169585, 0.949927834893, 1.439666857958, 2.705521702500, 1.815406073907, 1.570503841718, 1.834429337005, 2.903916580263, -0.110549195467, 2.065338922749, 1.119498053048, 0.427627428035, 3.025052175045, 2.645448868784, 1.442644951218, 0.774681298962, 2.247561418494, 1.743438974941, 1.184440017832, 1.643691193885, 1.947748675186, 2.178309991836, 2.815355272672, 2.207620544168, 2.077889048169, 2.915504366132, 2.440862146850, 2.804729838623, 0.534712595625, 1.956491042766, 2.230542009671, 2.186536281651, 3.694129968231, 3.313526598170, 2.170240599444, 2.793531289796, 1.454464312809, 1.197463589804, 0.713332299712, 1.180965411999, 2.180022174106, 2.861107927091, 1.795223865106, 1.730056153040, 1.431404424890, 1.839372935334, 1.271871740741, 3.773103777671, 1.026069424885, 2.006070770486, 1.276836142291, 1.414098998873, 1.749117068374, 2.040006827147, 1.815581326626, 2.892666735522, 3.093934769003, 2.129166907135, 1.260521633663, 3.259431640120, 1.879415647487, 1.368769201985, 2.236653714367, 2.293120875655, 2.361086097355, 2.140675892497, 2.860288793716, 3.109921655205, 2.142509743586, 0.661829413359, 0.620852115030, 2.279817287885, 2.077609300700, 1.917031492891, 2.549328729021, 1.402961147881, 2.989802645752, 2.126646549508, 0.581285045065, 3.226987223858, 1.790860716921, 0.998661497130, 2.125771640271, 2.186096892741, 2.160189267804, 2.206460323846, 3.366179111195, -0.125206283025, 0.645228886619, 0.505553980622, 4.494406059555, 1.291690417806, 2.977896904657, 2.869240282824, 3.344192278881, 2.487041683297, 4.236730343795, 3.007206122800, 1.210065291965, -0.053847768077, 1.108953782402, 1.843857008095, 2.374767801329, 1.472199059501, 3.332198116275, 2.027084082885, 2.305065331530, 3.387400013580, 1.493365795517, 2.344295515065, 2.898632740793, 3.307836869328, 1.892766317783, 2.348033912288, 1.288522200888, 2.178559140529, 2.366037265891, 3.468023805733, 1.910134543982, 1.750500687923, 1.506717073807, 1.345976221745, 1.898226480175, 2.362688287820, 2.176558673313, 1.716475335783, 1.109563102324, 1.824697060483, 2.290331853365, 3.660496355225, 3.695990930547, 0.995131810353, 2.083740307542, 2.515409175245, 1.734919119633, 0.186488629263, 3.470910728743, 3.503515673097, 2.225335667636, 4.925211524431, 3.176405299532, 2.938260408825, 2.336603901159, 2.218333712640, 3.269148549824, 1.921171637456, 3.876114839719, 1.492216718705, 2.792835112200, 3.563198188748, 2.728530961520, 3.231549893645, 2.209018339760, 1.081828242171, 0.754161622090, 1.948018149260, 2.413945024183, 1.425023717183, 2.005406706788, 0.964987890314, 1.603414847296, 0.132077263346, 1.789327371404, 1.423488299029, 2.590160851192, 3.131340836085, 2.325779171436, 2.129789552692, 1.876126153813, 2.667783873354, -0.220464828097, 2.285158851436, 1.188664672684, 1.968980968179, 2.510328726654, 1.690300427857, 2.041495293673, 2.471293710293, 1.660589811070, 1.801640276851, 2.200864460731, 1.489583958038, 1.545725376492, 4.208130184998, 2.428489533380, 3.539990060815, 1.317090333595, 0.785936916712, 0.809688718378, 1.265062896735, 2.749291333938, 6.075297866258, 2.165845459075, 2.055273600728, 2.584618009430, 2.782654850307, 0.967100649409, 2.267394795463, 2.783350629984, 0.238340558296, 1.566536380829, 1.165403279885, 3.409015124349, 1.047853632456, 2.100798231132, 1.824776518459, 1.517825551662, 2.148972385365, 1.818426298006, 1.954355115973, 2.428393037760, 2.225660788849, 1.287880002052, 3.083900598687, 2.561457835470, 2.547146477110, -0.060868513691, 1.917876348341, 1.194823858275, 1.237685798924, 2.500081029116, 0.605823016300, 1.341027488293, 1.357719149407, 3.959221361786, 1.457342301661, 1.450552596247, 3.152966485077, 1.755910034199, 2.252303064393, 2.315145292843, 2.092889154866, 2.044536701039, 3.078226379252, 1.940374989780, 0.981160719305, 1.801484599888, 4.599412580952, 3.029815652986, 2.234894233100, 1.884862677960, 2.703542617621, 2.188894869734, 1.031225637544, 4.487470294014, 1.916903861878, 2.178877764206, 2.001204233385, 1.668533128794, 0.118714387565, 1.236342841750, 0.697779517270, 4.061304247309, 1.873047854221, 0.529730720609, 0.772303413290, 1.734928501976, 0.830164961083, 3.674107591296, 3.027005867653, 2.798171180697, 2.754769626808, 2.287213251879, 0.224122591017, 1.996907607820, 2.272196861888, 1.423156951562, 2.649423732022, 2.410425004883, 2.348764499112, 4.188086272873, 2.592584804958, 1.360716155533, 1.089292416194, 0.877166635938, 2.923298927077, 1.699602289582, 1.764010718116, 0.851384613856, 1.362786130903, 4.014401248962, 2.004378924317, 2.680507997712, 4.162602009325, 2.080304752717, 0.758782969232, 0.896584126809, 1.907281638800, 2.753415491620, 1.571468221472, 1.510571435517, 3.133254430892, 1.314198176176, 2.871092309494, 0.505771497509, 0.608771053519, 0.099600620869, 2.202314023992, 1.561845986404, 1.935860544395, 4.227485606155, 2.507702606518, 1.966897273255, 3.462827375982, 2.297865682096, 2.018310409281, 2.231512822040, 2.912164920958, 0.391926284930, 3.233896921158, 2.270671144478, 2.151928087898, 1.169376547635, 1.410447269758, 1.104075308499, -1.542633116467, 1.153006815104, 1.825678952144, 3.170518866440, 4.259372395300, 2.991591841969, 2.936827860147, 1.621450416535, 2.022035327270, 3.512668911326, 2.840069655471, 0.445725474197, 0.462229554454, 0.318918997270, 2.764048560322, 1.707769041832, 0.354635293838, 1.422103811424, 1.567812002847, 1.024884046523, 3.417171077354, 1.638428319488, 3.241722761084, 1.903144274531, 2.386560261127, 1.089737760638, 0.709565288091, -0.055267123709, 2.220171017505, 2.676992914119, 1.795938808643, 0.857048483230, 2.341277450146, 0.597747299826, 2.172474110279, 1.658595631706, 1.984212673322, 3.348561751121, 1.548578130896, 1.072758349253, 0.032774558165, 1.706534108602, 0.755870027998, 3.896324551791, 1.893154948782, 1.610014175651, 1.689869260730, 0.837788921577, 2.072889043390, 1.849998133863, 2.312731199777, 3.080340939707, 3.091164029551, 0.393260795576, 2.003732199463, 1.850471999505, 1.674223365447, 0.950827266616, 0.893144704712, 4.088054520567, 2.494717669405, 2.940185915913, 2.362745036344, 4.420918853822, 1.196829910488, 0.751131585724, 2.572876053732, 4.783864101630, 1.371390533975, 2.265749507496, 0.980731387353, 1.194594017621, 1.167489912193, 1.964259577764, 2.911981147100, 3.425120291588, -0.257485591786, 2.472881717211, 3.053440640390, 0.762578570358, 1.132958189893, 2.182874371350, 3.052476057575, 1.277863138274, 1.639136886663, 3.068422388091, 4.082802262329, 3.817537635954, 0.097850368917, 1.833230262781, 1.868086753582, 1.887983463294, 1.651402760749, 1.139536636683, 1.506983113398, 2.136499510660, 1.554089544528, 1.817657472715, 1.881949483974, 1.694259012321, 2.466961181010, 0.934064795958, 1.780986169906, 2.370334192643, 1.384364501906, 2.661332270733, 0.505133486534, 3.377981661644, 4.528998885749, 1.374759695170, 4.722230929249, 2.457241846607, 1.089449047113, 2.069442203989, 2.922047383746, 2.418239643214, 2.102706555829, 3.402947114317, 0.796159207619, 2.632564349894, 4.200094165974, 1.193215106012, 3.096716644943, 2.876829603210, 1.921543697812, 1.061475001173, 1.539143201636, 1.962758648643, 2.295863280945, 1.165666782756, 2.795634751169, 1.964614100540, 2.881578005533, 2.637037175067, 2.892982065300, 1.370612909045, 2.259776562066, 2.613792094772, 1.906706647250, 1.557148053231, 1.133780390845, 1.143533122599, 4.117191444375, 0.188018096004, 0.214460776257, 1.603522547618, 1.983864405185, 2.699735877141, 3.298710632472, 1.487986613587, 1.991452281956, 4.766298265537, 2.586190101112, 1.065148174656, 2.145271421777, 1.522765549323, 4.396072859233, 1.606095900438, 1.031438092798, 2.960703649068, 3.605096318253, 0.738490507896, 3.432893690638, 1.851816325195, 1.776083706595, 2.626748456025, 3.271038565612, -0.070612895830, 1.287744477416, 1.695753443501, 2.436753770247, 2.202642339826, 1.408938299450, 2.016160912374, 0.898288687497, 1.289813203546, 2.817550580649, 1.633807646433, 0.729748534247, 3.731152016795, 4.390636356521, 0.960267728055, 2.664438938132, 3.353944579683, 3.269381121224, 1.172165464812, 2.400938318282, 0.807728448589, 1.354368440944, 0.710514838580, 3.856287086165, 1.844610913086, 0.998911164773, 2.675023215997, 2.434288374696, 3.159869294202, 2.216260317913, 1.045656776305, 2.009335242758, -0.709434674480, 1.331363427990, 1.413333913927, 0.929006400187, 1.733184360011, 1.592926769452, 2.244402061817, -0.685165133598, 1.588319181570, 2.023137693888, 2.371988587924, 3.467422121044, 1.853048214949, 2.619054775096, 2.800663994934, 3.602262658213, 2.739826236907, 1.657450448996, 2.635627781551, 3.426068129480, 1.151293859797, 2.126497682712, 1.381359388969, 2.247544386446, 1.174628386484, 0.958611426223, 3.704308164799, 1.239169433782, 1.113358149317, 2.955595260742, 4.724760227403, 1.980693866973, 1.178308425749, 1.764128983382, 3.075383932276, 1.825832517572, 0.832366525583, 1.141057225660, 1.525888435245, 2.385324115908, 1.358714765290, 0.551137984167, 3.731145479114, 2.129026962460, 2.573317010477, 1.976940325893, 2.420475072025, 0.684154421404, 2.802696725755, 2.541095686615, 2.058591811473, 1.640112285999, 1.856989192038, 2.614611193561, 3.469421336856, 1.053557146407, 3.032200283499, 2.573750297024, 3.083216685185, 2.404219296708, 0.346271398570, 2.589361666010, 2.774804416246, 0.445877540011, 0.905444077995, 0.063823875188, 2.931316420485, 1.682860197161, 2.972795382257, 2.597485175923, 1.554827252582, 0.938640710601, 1.554015447012, 0.698644188586, 2.957760202695, 2.706304471141, 2.642415006150, 1.464184232137, 2.765792229162, 2.039393447616, 1.582779254230, 1.722697961910, 0.354842490538, 0.839688308674, 3.250316830782, 3.993268587677, 1.831751003414, 3.737987669486, 3.837008408003, 3.656452995704, 1.378085850241, 3.992366605685, 3.063520565655, 1.829600671075, 2.853149829083, 1.948008763331, 2.489355654745, 2.039149456991, 1.723308108929, 1.530719515047, 1.390322318375, 1.015161747970, 1.902647551975, 0.587714373573, 2.419343238401, 2.037241109090, 1.989108845487, 2.555164211364, 2.145078634562, 2.453495232937, 1.572091583978, 3.017196269239, 1.359683738353, 1.905697793148, 1.745346338494, 2.410960789923, 1.688108090624, 2.041661869959, 2.261146892703, 0.108311227666, 2.261198590438, 1.205414457068, 0.815680644627, 2.373638547036, 0.314446220857, 2.407160216258, 1.767921824455, 1.812649838016, 1.981483340407, 2.294353826751, 1.219794724258, 4.384759314526, 3.362912919095, 0.358020839800, 2.416111296383, 0.772765268291, 3.036908153028, 3.499839475422, 2.504401672085, 1.000612753791, 1.031364523108, 2.905950640378, 3.816584440139, 0.846980443659, 2.806102343007, 1.662302388297, 2.146698147213, 2.247505312463, 1.485016638026, 3.139004503074, 0.525587710167, 1.271023854890, 1.255521130946, 1.814043296479, 1.216959307975, 0.978300004743, 1.793024541935, 2.436108214253, 1.805501508380, 2.289362542667, 3.103303146056, 3.070219780476, 1.928865588661, 0.671011951957, 1.892825933013, 2.777602823529, 0.491871575583, 2.240415846966, 2.375489703208, 2.709091612473, 1.454643174490, 0.932692202068, 1.330312119137, 2.127413235976, 1.317902934165, 1.580714395448, 1.008090918724, 0.713394722097, 0.414109615934, 1.497415539366, 2.768670845431, 2.432044584164, 3.549640318635, 1.342147007285, 1.490711835094, 2.215255822048, 2.953966963699, 1.397115922550, 1.378544056641, 0.295634610499, 0.310858641177, 1.767513113561, 3.434648852323, 1.491911596249, 4.374871362485, 1.373675010945, 0.738310910553, 1.234191541434, 2.155481175306, 2.958616497624, 1.540019317971, 1.890919744323, 0.015363864461, 0.611976171745, 2.048461203755, 0.905204536881, 1.952638485996, 2.425065685214, 2.237320237401, 1.261771567053, 2.589404719675, 2.475731886267, 1.327151422229, 1.535419742175, 1.208022763652, 3.436317329939, 1.228705365902, 1.566902016116, 2.085976618587, 3.604339608476, 1.070321479131, 2.085842592869, 2.524588738973, 0.844371573275, 0.666896658382, 3.021051396651, 1.304696763442, 2.885533651158, 1.076496681998, 2.291817051246, 1.297874264925, 2.181105432748, 2.017938562177, 1.688714920892, 2.778982555151, 2.464336632348, 2.351157814765, 0.328615108417, 2.045729524665, 1.097213832650, 1.821737535398, 1.493311782343, 2.664732414197, 2.409262056717, 3.113216373314, -0.736586322990, 2.622696405459, 2.182304470993, 0.270476186892, 2.628658716523, 1.938159535287, 3.336990992309, 1.843049113291, 4.411231162672, 2.385234723754, 2.814668480292, 0.835204823261, 1.486415794299, 4.428506992622, 2.010951035701, 2.386497902232, -0.054343008749, 1.897798394390, 2.128378005079, 2.003863798772, 1.414857649717, 3.058382706867, 0.734980076150, 0.128402966890, 0.075621261496, 2.062530850812, 2.257054591626, 3.098405063129, 1.184503294303, 1.927098840462, 3.590105219538, 2.324770104189, 2.920547827923, 3.774469427430, 0.643975980439, 2.972011913013, 1.545636773552, 1.284276446577, 2.116456504846, 2.334765924705, 1.476322485264, 0.333938454195, 1.740780860437, 0.809641636242, 2.114359904589, 3.495010537745, 1.394057058959, 2.099880999687, 1.723136191694, 1.824145520142, 2.206175560435, 2.217935160800, 3.184151380365, -0.165277107839, 2.066902569755, 4.109207223806, 2.639922346758, 2.869289441530, 2.992666432223, 2.628328010580, 1.318946413946, 3.437097382310, 2.043254488710, 0.244000873823, 1.857441713051, 1.302602111278, 2.850286225242, 1.988609208476, 0.406765856788, 1.691073499692, 0.918912799942, 1.943198487145, 3.174415802822, 1.916755816708, 2.196550794119, 0.930720476044, 2.032189015326, -0.777034945338, 1.406753268550, 0.870345844705, 1.793195283464, 2.066120080070, 2.916729217526, 0.642313449142, 2.617529572000, 2.396572272668, 1.942111542427, 2.435603256612, 3.898219347884, 1.979409214342, 1.235681010137, -0.802441600645, 1.927883866070, 0.852232772749, 2.626513188209, 1.994232584644, 2.677125120554, 2.945149227801, 0.344859114264, 2.988484765052, 2.221699681734, 1.157038942208, 2.703070759809, 1.410436365113, 3.056534135285, 0.975232183559, 1.032651705560, 1.787301763233, 1.587502529729, 1.425207628405, 2.443158189935, 3.786205343468, 0.240451061053, 2.993759767949, 2.527525916677, 2.990777291349, 1.458774147434, 4.293524428909, -0.116618748162, 1.674243883127, 2.434026351267, 3.129729749455, 1.532120640786, 3.584008627649, 2.126682783899, 0.784920593215, 1.954841166456, 2.659877218373, 2.639038968190, 3.009597452617, 3.820422929562, 2.950718556164, 2.942026969809, 2.899140330708, -0.003511099104, 0.780849789152, 2.375904463772, 1.034820493941, 2.010379907777, 2.273452795908, 2.508893511243, 0.495773521197, 3.010585297044, 3.029210010516, 3.973880821070, 2.416599047057, 1.320773195864, -0.296283555404, 3.112367101202, 0.568454165534, 3.950197901953, 3.040255296379, 2.892209686169, 1.355195417805, 2.139684432822, 2.920582903729, 1.588899963320, 2.235959314499, 1.768769790964, 2.854126298598, -0.132279995647, 1.984901818097, 0.667875459687, 1.338320000460, 1.394322304858, 0.299399873843, 1.062140558649, 1.283070416608, 2.043726915244, 1.426628725160, 1.763445352183, 2.517159283156, 1.334042379945, 1.120896888394, 1.890222921582, 0.565772476594, 1.106579774451, 1.419654511698, 2.809182593659, 2.500132279723, 2.818415931740, 2.302096389328, 2.700248827229, 2.649016952991, 3.051337084118, 1.040839832658, 1.068258609432, 3.917982023425, 0.893981534117, 1.258354231702, 0.154108914546, 1.578873281706, 1.438841948587, 0.854591114516, 3.199994919222, 0.946279793861, 1.911631903701, 3.821301368668, 1.417597738430, 2.979514439880, 1.202734703576, 1.724395921518, 3.069121580556, 1.024707141488, 3.309560047408, 2.147433150108, 2.173493008341, 3.875831804386, 2.160166379458, 2.017326408423, 3.941632320127, 2.583832116740, ]
20.05336
67
0.651227
2,040
20,294
6.471078
0.504412
0.002273
0.003636
0
0
0
0
0
0
0
0
0.852797
0.248497
20,294
1,011
68
20.073195
0.012786
0.006554
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.002985
0
0.002985
0.000995
0
0
0
null
0
0
0
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
0
0
0
0
0
0
0
2
4f5c12e1706c60d988fa8582a1cb74fc10e0befd
218
py
Python
core/providers/torrent_modules/__init__.py
0x20Man/Watcher3
4656b42bc5879a3741bb95f534b7c6612a25264d
[ "Apache-2.0" ]
320
2017-03-28T23:33:45.000Z
2022-02-17T08:45:01.000Z
core/providers/torrent_modules/__init__.py
0x20Man/Watcher3
4656b42bc5879a3741bb95f534b7c6612a25264d
[ "Apache-2.0" ]
300
2017-03-28T19:22:54.000Z
2021-12-01T01:11:55.000Z
core/providers/torrent_modules/__init__.py
0x20Man/Watcher3
4656b42bc5879a3741bb95f534b7c6612a25264d
[ "Apache-2.0" ]
90
2017-03-29T16:12:43.000Z
2022-03-01T06:23:48.000Z
import os for module in os.listdir(os.path.dirname(os.path.realpath(__file__))): if module[-3:] == '.py' and module[0] not in ('.', '_'): __import__('core.providers.torrent_modules.{}'.format(module[:-3]))
43.6
75
0.646789
31
218
4.225806
0.677419
0.091603
0
0
0
0
0
0
0
0
0
0.015873
0.133028
218
4
76
54.5
0.677249
0
0
0
0
0
0.174312
0.151376
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
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
0
0
1
0
0
0
0
2
4f608b31aaa6c1e98087ed4bf56f77fd3dc51525
262
py
Python
March19th-HeapPriorityQueue/run_me.py
EricCharnesky/CIS2001-Winter2020
e51d967e97399248dc8b69aaed2d5ca8aee0cd6e
[ "MIT" ]
3
2020-01-06T23:21:36.000Z
2021-03-01T08:36:57.000Z
March19th-HeapPriorityQueue/run_me.py
EricCharnesky/CIS2001-Winter2020
e51d967e97399248dc8b69aaed2d5ca8aee0cd6e
[ "MIT" ]
null
null
null
March19th-HeapPriorityQueue/run_me.py
EricCharnesky/CIS2001-Winter2020
e51d967e97399248dc8b69aaed2d5ca8aee0cd6e
[ "MIT" ]
2
2020-01-21T16:00:03.000Z
2020-05-05T14:57:34.000Z
import random from HeapPriorityQueue import HeapPriorityQueue heap_priority_queue = HeapPriorityQueue() for n in range(100): heap_priority_queue.add(random.randint(1, 1000)) while len(heap_priority_queue) != 0: print(heap_priority_queue.remove_min())
23.818182
52
0.793893
35
262
5.685714
0.628571
0.241206
0.341709
0
0
0
0
0
0
0
0
0.038961
0.118321
262
11
53
23.818182
0.822511
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0.142857
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
0
0
0
0
0
0
0
2
4f695c821fb7f12df7938bcd6520a0f5551258dc
466
py
Python
cmsplugin_poll/cms_plugins.py
datakortet/cmsplugin-poll
1bb131971ca47c18cfce54bee2d3c95323d2f421
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_poll/cms_plugins.py
datakortet/cmsplugin-poll
1bb131971ca47c18cfce54bee2d3c95323d2f421
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_poll/cms_plugins.py
datakortet/cmsplugin-poll
1bb131971ca47c18cfce54bee2d3c95323d2f421
[ "BSD-3-Clause" ]
null
null
null
from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from .models import PollPlugin from django.utils.translation import ugettext as _ class CMSPollPlugin(CMSPluginBase): model = PollPlugin name = _("Simple poll") render_template = "cmsplugin_poll/detail.html" def render(self, context, instance, placeholder): context['poll'] = instance.poll return context plugin_pool.register_plugin(CMSPollPlugin)
27.411765
53
0.761803
55
466
6.290909
0.581818
0.086705
0.075145
0
0
0
0
0
0
0
0
0
0.165236
466
16
54
29.125
0.88946
0
0
0
0
0
0.087983
0.055794
0
0
0
0
0
1
0.083333
false
0
0.333333
0
0.833333
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
0
0
0
0
0
0
1
0
1
0
0
2
4f715f6f8bc7a4be879dba6c281f279546d44f07
1,315
py
Python
test/profile_test.py
tamirzb/logcat-color
8319b07f6b69c4c33001feceb9adf528b394687d
[ "Apache-2.0" ]
373
2015-01-01T20:46:45.000Z
2022-03-15T17:39:43.000Z
test/profile_test.py
tamirzb/logcat-color
8319b07f6b69c4c33001feceb9adf528b394687d
[ "Apache-2.0" ]
10
2015-01-04T04:24:04.000Z
2020-07-19T16:34:13.000Z
test/profile_test.py
tamirzb/logcat-color
8319b07f6b69c4c33001feceb9adf528b394687d
[ "Apache-2.0" ]
38
2015-01-24T03:21:17.000Z
2022-01-14T09:17:13.000Z
from common import * from logcatcolor.column import * from logcatcolor.config import * from logcatcolor.layout import * from logcatcolor.profile import * from logcatcolor.reader import * import unittest class ProfileTest(unittest.TestCase): def setUp(self): pass def test_package_name_filter(self): profile = Profile(name = 'package_filt', packages = ['com.example.test']) self.assertFalse(profile.include({'message' : 'Start proc com.example.test for activity tw.com.xxxx.android.yyyy/.333Activity: pid=123456 uid=10105 gids={3003}'})) self.assertTrue(profile.include({'pid' : '123456', 'message' : 'foo bar'})) def test_package_name_filter_android_51(self): profile = Profile(name = 'package_filt', packages = ['com.example.test']) self.assertFalse(profile.include({'message' : 'Start proc 26360:com.example.test/u0a208 for activity tw.com.xxxx.android.yyyy/com.example.test.ui.MainActivity'})) self.assertTrue(profile.include({'pid' : '26360', 'message' : 'foo bar'})) def test_empty_package_will_still_work(self): profile = Profile(name = 'package_filt') self.assertTrue(profile.include({'message' : 'Start proc com.example.test for activity tw.com.xxxx.android.yyyy/.333Activity: pid=123456 uid=10105 gids={3003}'}))
48.703704
171
0.715589
168
1,315
5.505952
0.327381
0.064865
0.090811
0.071351
0.647568
0.492973
0.457297
0.423784
0.423784
0.423784
0
0.051786
0.148289
1,315
26
172
50.576923
0.774107
0
0
0.095238
0
0.142857
0.356654
0.123194
0
0
0
0
0.238095
1
0.190476
false
0.047619
0.333333
0
0.571429
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
0
0
0
0
0
0
1
0
1
0
0
2
4fa1ff68ac9d472c3af4ab31e3d22e6155396ad6
15,907
py
Python
UMLRT2Kiltera_MM/transformation_reduced/Himesis/HTransition2Inst.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
3
2017-06-02T19:26:27.000Z
2021-06-14T04:25:45.000Z
UMLRT2Kiltera_MM/transformation_reduced/Himesis/HTransition2Inst.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
8
2016-08-24T07:04:07.000Z
2017-05-26T16:22:47.000Z
UMLRT2Kiltera_MM/transformation_reduced/Himesis/HTransition2Inst.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
1
2019-10-31T06:00:23.000Z
2019-10-31T06:00:23.000Z
from core.himesis import Himesis import cPickle as pickle from uuid import UUID class HTransition2Inst(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HTransition2Inst. """ # Flag this instance as compiled now self.is_compiled = True super(HTransition2Inst, self).__init__(name='HTransition2Inst', num_nodes=85, edges=[]) # Add the edges self.add_edges([(2, 14), (14, 7), (7, 15), (15, 8), (7, 16), (16, 1), (8, 17), (17, 5), (6, 18), (18, 22), (6, 19), (19, 23), (6, 20), (20, 24), (6, 21), (21, 25), (54, 47), (47, 68), (55, 48), (48, 69), (56, 49), (49, 70), (57, 50), (50, 9), (58, 51), (51, 73), (59, 52), (52, 10), (60, 53), (53, 75), (22, 41), (41, 79), (23, 42), (42, 80), (24, 43), (43, 81), (25, 44), (44, 82), (6, 45), (45, 83), (6, 46), (46, 84), (3, 0), (0, 36), (0, 37), (0, 38), (0, 39), (0, 40), (9, 26), (26, 72), (9, 27), (27, 76), (9, 28), (28, 71), (10, 29), (29, 74), (10, 30), (30, 77), (4, 31), (31, 2), (4, 32), (32, 7), (4, 33), (33, 8), (4, 34), (34, 5), (4, 35), (35, 1), (5, 11), (11, 77), (8, 12), (12, 76), (2, 13), (13, 78), (4, 3), (54, 61), (55, 62), (56, 63), (57, 64), (58, 65), (59, 66), (60, 67), (36, 6), (37, 25), (38, 24), (39, 23), (40, 22), (61, 78), (62, 79), (63, 80), (64, 81), (65, 82), (66, 83), (67, 84)]) # Set the graph attributes self["mm__"] = pickle.loads("""(lp1 S'UMLRT2Kiltera_MM' p2 a.""") self["name"] = """Transition2Inst""" self["GUID__"] = UUID('6fffb6c1-f004-4c95-8ef3-fbe385299f74') # Set the node attributes self.vs[0]["mm__"] = """ApplyModel""" self.vs[0]["GUID__"] = UUID('0d616c9c-dc34-49b9-8948-8bc0f0568425') self.vs[1]["name"] = """in1_1""" self.vs[1]["classtype"] = """IN1""" self.vs[1]["mm__"] = """IN1""" self.vs[1]["cardinality"] = """1""" self.vs[1]["GUID__"] = UUID('d241f9e1-c968-49ac-9c4f-d996eaae0f3a') self.vs[2]["name"] = """state1""" self.vs[2]["classtype"] = """State""" self.vs[2]["mm__"] = """State""" self.vs[2]["cardinality"] = """+""" self.vs[2]["GUID__"] = UUID('67d12217-7607-40b1-95ed-101386a3937f') self.vs[3]["mm__"] = """paired_with""" self.vs[3]["GUID__"] = UUID('798ab548-7a0b-4df3-9873-1a2f8421323f') self.vs[4]["mm__"] = """MatchModel""" self.vs[4]["GUID__"] = UUID('bd15eb6e-5590-4ebd-abf0-2ecb6da988d5') self.vs[5]["name"] = """statemachine1""" self.vs[5]["classtype"] = """StateMachine""" self.vs[5]["mm__"] = """StateMachine""" self.vs[5]["cardinality"] = """1""" self.vs[5]["GUID__"] = UUID('f0eec1a3-7d6c-4b36-ae6d-53acf8a72d60') self.vs[6]["name"] = """inst1""" self.vs[6]["classtype"] = """Inst""" self.vs[6]["mm__"] = """Inst""" self.vs[6]["cardinality"] = """1""" self.vs[6]["GUID__"] = UUID('53474181-ae73-4798-b064-4c7d9be8e21c') self.vs[7]["name"] = """transition1""" self.vs[7]["classtype"] = """Transition""" self.vs[7]["mm__"] = """Transition""" self.vs[7]["cardinality"] = """+""" self.vs[7]["GUID__"] = UUID('dcd80943-bb07-4890-beec-44b7902a7e42') self.vs[8]["name"] = """entrypoint1""" self.vs[8]["classtype"] = """EntryPoint""" self.vs[8]["mm__"] = """EntryPoint""" self.vs[8]["cardinality"] = """1""" self.vs[8]["GUID__"] = UUID('f8a8cf2d-74e2-4c6a-b746-a92217eb208c') self.vs[9]["name"] = """concat1""" self.vs[9]["mm__"] = """Concat""" self.vs[9]["Type"] = """'String'""" self.vs[9]["GUID__"] = UUID('b220da7d-029f-438d-9403-a8bb3878a512') self.vs[10]["name"] = """concat2""" self.vs[10]["mm__"] = """Concat""" self.vs[10]["Type"] = """'String'""" self.vs[10]["GUID__"] = UUID('c599bc8c-6258-4f83-9274-5cc4d1c950d4') self.vs[11]["mm__"] = """hasAttribute_S""" self.vs[11]["GUID__"] = UUID('af579244-9bb2-4c08-8f92-ffd68d591f34') self.vs[12]["mm__"] = """hasAttribute_S""" self.vs[12]["GUID__"] = UUID('3bf0ef36-49e2-49f9-ae98-31ef1d968289') self.vs[13]["mm__"] = """hasAttribute_S""" self.vs[13]["GUID__"] = UUID('a5f36b5d-73d0-4a72-ba9b-4f44d1a9748e') self.vs[14]["associationType"] = """transitions""" self.vs[14]["mm__"] = """directLink_S""" self.vs[14]["GUID__"] = UUID('a2f410b6-bc26-4f01-b706-e2fecab5fcad') self.vs[15]["associationType"] = """dest""" self.vs[15]["mm__"] = """directLink_S""" self.vs[15]["GUID__"] = UUID('7b731cc1-e0c4-4355-8d4c-78b8def5cf0e') self.vs[16]["associationType"] = """type""" self.vs[16]["mm__"] = """directLink_S""" self.vs[16]["GUID__"] = UUID('8ab04552-2bac-4d2a-a285-4485a0759c21') self.vs[17]["associationType"] = """owningStateMachine""" self.vs[17]["mm__"] = """directLink_S""" self.vs[17]["GUID__"] = UUID('0b262705-4357-4216-af57-d4ab49047ae4') self.vs[18]["associationType"] = """channelNames""" self.vs[18]["mm__"] = """directLink_T""" self.vs[18]["GUID__"] = UUID('65459fab-3a42-4be9-83fd-ac0b0e267159') self.vs[19]["associationType"] = """channelNames""" self.vs[19]["mm__"] = """directLink_T""" self.vs[19]["GUID__"] = UUID('3d19ca7e-e1cb-4166-857c-8d5ee8b9e66e') self.vs[20]["associationType"] = """channelNames""" self.vs[20]["mm__"] = """directLink_T""" self.vs[20]["GUID__"] = UUID('780db466-be2e-462f-a520-025fa188d9b8') self.vs[21]["associationType"] = """channelNames""" self.vs[21]["mm__"] = """directLink_T""" self.vs[21]["GUID__"] = UUID('01528a14-6100-4f27-99ab-8726457d0b34') self.vs[22]["name"] = """name1""" self.vs[22]["classtype"] = """Name""" self.vs[22]["mm__"] = """Name""" self.vs[22]["cardinality"] = """1""" self.vs[22]["GUID__"] = UUID('2b1b2f1e-c486-4e89-a2da-3585c5450a3c') self.vs[23]["name"] = """name2""" self.vs[23]["classtype"] = """Name""" self.vs[23]["mm__"] = """Name""" self.vs[23]["cardinality"] = """1""" self.vs[23]["GUID__"] = UUID('82088083-4db7-4bb9-9766-4bb559955c9a') self.vs[24]["name"] = """name3""" self.vs[24]["classtype"] = """Name""" self.vs[24]["mm__"] = """Name""" self.vs[24]["cardinality"] = """1""" self.vs[24]["GUID__"] = UUID('025c43c3-9a3f-4bb1-8d9e-77672c4175e7') self.vs[25]["name"] = """name4""" self.vs[25]["classtype"] = """Name""" self.vs[25]["mm__"] = """Name""" self.vs[25]["cardinality"] = """1""" self.vs[25]["GUID__"] = UUID('6344fdc7-478d-46c3-880a-7570d72045a0') self.vs[26]["mm__"] = """hasArgs""" self.vs[26]["GUID__"] = UUID('3c7ce74b-870b-4672-8ce2-d0569f5bca7f') self.vs[27]["mm__"] = """hasArgs""" self.vs[27]["GUID__"] = UUID('fcbaf227-5923-4834-a26f-0beb154d61c8') self.vs[28]["mm__"] = """hasArgs""" self.vs[28]["GUID__"] = UUID('c7917c58-8f84-4b51-adca-83753b64c799') self.vs[29]["mm__"] = """hasArgs""" self.vs[29]["GUID__"] = UUID('d25297b9-ffe6-4626-bb5c-6320ed2108f9') self.vs[30]["mm__"] = """hasArgs""" self.vs[30]["GUID__"] = UUID('8a42fa07-1545-4457-93e4-724b0a874251') self.vs[31]["mm__"] = """match_contains""" self.vs[31]["GUID__"] = UUID('bbaacc65-b513-451e-bb23-807c79eb9796') self.vs[32]["mm__"] = """match_contains""" self.vs[32]["GUID__"] = UUID('e47d36f1-633e-4292-9a65-d3930c0fa572') self.vs[33]["mm__"] = """match_contains""" self.vs[33]["GUID__"] = UUID('734076b3-ba0c-40c4-9ba4-7201b00f57e9') self.vs[34]["mm__"] = """match_contains""" self.vs[34]["GUID__"] = UUID('5520daf0-b0dd-42c1-a2b1-889eb2e62b7d') self.vs[35]["mm__"] = """match_contains""" self.vs[35]["GUID__"] = UUID('b31497a6-d586-48bc-9baa-0916aa3f82ea') self.vs[36]["mm__"] = """apply_contains""" self.vs[36]["GUID__"] = UUID('2ad0919b-1973-4fbe-bc37-8e3bbfff1f34') self.vs[37]["mm__"] = """apply_contains""" self.vs[37]["GUID__"] = UUID('8d96807b-7eb8-43c2-819d-7fc3eab37daf') self.vs[38]["mm__"] = """apply_contains""" self.vs[38]["GUID__"] = UUID('f4027b2b-ca4b-4634-8836-dfed5da80d3f') self.vs[39]["mm__"] = """apply_contains""" self.vs[39]["GUID__"] = UUID('efcebd35-3595-43e6-b4e6-297d9e0a10ab') self.vs[40]["mm__"] = """apply_contains""" self.vs[40]["GUID__"] = UUID('b3d00171-8433-4a3b-af72-cf52cc822502') self.vs[41]["mm__"] = """hasAttribute_T""" self.vs[41]["GUID__"] = UUID('f6f46e95-89a2-417d-8549-6bff0c4b6357') self.vs[42]["mm__"] = """hasAttribute_T""" self.vs[42]["GUID__"] = UUID('261a9483-fc92-4f09-8714-9633a347c564') self.vs[43]["mm__"] = """hasAttribute_T""" self.vs[43]["GUID__"] = UUID('17139422-0236-4393-80e7-033616d9c603') self.vs[44]["mm__"] = """hasAttribute_T""" self.vs[44]["GUID__"] = UUID('6a25a378-9e33-4ce8-a15f-beaa1e71472a') self.vs[45]["mm__"] = """hasAttribute_T""" self.vs[45]["GUID__"] = UUID('379c1b78-0fc0-452c-b62d-48f15f1ae5b5') self.vs[46]["mm__"] = """hasAttribute_T""" self.vs[46]["GUID__"] = UUID('e394c437-c481-4718-aa5c-59f08499b0e6') self.vs[47]["mm__"] = """rightExpr""" self.vs[47]["GUID__"] = UUID('e32175e1-506f-4384-a349-5bfcd20374ff') self.vs[48]["mm__"] = """rightExpr""" self.vs[48]["GUID__"] = UUID('e7887ada-54d0-4839-8cbe-cea40e72e564') self.vs[49]["mm__"] = """rightExpr""" self.vs[49]["GUID__"] = UUID('279ab41f-3f30-4782-b416-f0df2fb68a5f') self.vs[50]["mm__"] = """rightExpr""" self.vs[50]["GUID__"] = UUID('238aae0f-ed3b-446a-890c-7245e162762f') self.vs[51]["mm__"] = """rightExpr""" self.vs[51]["GUID__"] = UUID('d0c4e276-f3d0-4db1-aa0e-8953fe42650b') self.vs[52]["mm__"] = """rightExpr""" self.vs[52]["GUID__"] = UUID('fcbfd29c-3842-4d99-a99b-938f324b0323') self.vs[53]["mm__"] = """rightExpr""" self.vs[53]["GUID__"] = UUID('0de10258-437d-4085-98d3-892c0e4986a9') self.vs[54]["name"] = """eq1""" self.vs[54]["mm__"] = """Equation""" self.vs[54]["GUID__"] = UUID('d2fe0764-d77b-4d2c-af47-15180feb5723') self.vs[55]["name"] = """eq2""" self.vs[55]["mm__"] = """Equation""" self.vs[55]["GUID__"] = UUID('0b9441cd-97b0-49cb-93fb-6f6b174128e8') self.vs[56]["name"] = """eq3""" self.vs[56]["mm__"] = """Equation""" self.vs[56]["GUID__"] = UUID('3c92a579-75a9-45ca-9614-4e9f7c9241b5') self.vs[57]["name"] = """eq4""" self.vs[57]["mm__"] = """Equation""" self.vs[57]["GUID__"] = UUID('9570895e-c2b3-4a44-b858-869fc9391185') self.vs[58]["name"] = """eq5""" self.vs[58]["mm__"] = """Equation""" self.vs[58]["GUID__"] = UUID('bd6210b4-7770-40da-ac3b-6046cfbd6ea4') self.vs[59]["name"] = """eq6""" self.vs[59]["mm__"] = """Equation""" self.vs[59]["GUID__"] = UUID('3e43fda0-e561-4044-9b83-f5cc139ee7e4') self.vs[60]["name"] = """eq7""" self.vs[60]["mm__"] = """Equation""" self.vs[60]["GUID__"] = UUID('ed91aac1-88a5-456e-b976-e4ed7257d99d') self.vs[61]["mm__"] = """leftExpr""" self.vs[61]["GUID__"] = UUID('a17ae7cc-d675-493d-88d1-0b4149262107') self.vs[62]["mm__"] = """leftExpr""" self.vs[62]["GUID__"] = UUID('124ca31a-9a79-4966-bd5b-7046530e55e8') self.vs[63]["mm__"] = """leftExpr""" self.vs[63]["GUID__"] = UUID('b1245e4e-f883-4b25-be09-f7766946962d') self.vs[64]["mm__"] = """leftExpr""" self.vs[64]["GUID__"] = UUID('3202b00f-5a2b-4afd-924b-e701e2ffb26f') self.vs[65]["mm__"] = """leftExpr""" self.vs[65]["GUID__"] = UUID('492612d4-12db-4b0b-86e6-45bd92fb4d43') self.vs[66]["mm__"] = """leftExpr""" self.vs[66]["GUID__"] = UUID('368278b3-e71d-4aab-86b6-6e6c9965ef13') self.vs[67]["mm__"] = """leftExpr""" self.vs[67]["GUID__"] = UUID('3aca9581-0e85-43f6-a04c-c9070d4b180f') self.vs[68]["name"] = """true""" self.vs[68]["mm__"] = """Constant""" self.vs[68]["Type"] = """'Bool'""" self.vs[68]["GUID__"] = UUID('1a36b94f-11ad-4a8a-828b-69f12ffe8eff') self.vs[69]["name"] = """exit_in""" self.vs[69]["mm__"] = """Constant""" self.vs[69]["Type"] = """'String'""" self.vs[69]["GUID__"] = UUID('ed8e8852-b0c5-4ab8-9b26-30c4d157878d') self.vs[70]["name"] = """exack_in""" self.vs[70]["mm__"] = """Constant""" self.vs[70]["Type"] = """'String'""" self.vs[70]["GUID__"] = UUID('29250347-a177-4e05-ab58-839f3920c97c') self.vs[71]["name"] = """2""" self.vs[71]["mm__"] = """Constant""" self.vs[71]["Type"] = """'String'""" self.vs[71]["GUID__"] = UUID('06d4a4c5-169d-4142-9e1b-9dbfcfd9aa71') self.vs[72]["name"] = """1""" self.vs[72]["mm__"] = """Constant""" self.vs[72]["Type"] = """'String'""" self.vs[72]["GUID__"] = UUID('3c297698-d366-4926-bf86-481b3de82092') self.vs[73]["name"] = """sh_in""" self.vs[73]["mm__"] = """Constant""" self.vs[73]["Type"] = """'String'""" self.vs[73]["GUID__"] = UUID('fa4be6f5-05bb-4784-88c5-067ac63bfaac') self.vs[74]["name"] = """S""" self.vs[74]["mm__"] = """Constant""" self.vs[74]["Type"] = """'String'""" self.vs[74]["GUID__"] = UUID('72305f7d-dd7b-4277-a194-9ac68b335ca1') self.vs[75]["name"] = """instForInTrans""" self.vs[75]["mm__"] = """Constant""" self.vs[75]["Type"] = """'String'""" self.vs[75]["GUID__"] = UUID('465b9e2c-d458-4430-badd-256f7a315995') self.vs[76]["name"] = """name""" self.vs[76]["mm__"] = """Attribute""" self.vs[76]["Type"] = """'String'""" self.vs[76]["GUID__"] = UUID('9cc96cbd-e876-4508-af01-81dac289fcfe') self.vs[77]["name"] = """name""" self.vs[77]["mm__"] = """Attribute""" self.vs[77]["Type"] = """'String'""" self.vs[77]["GUID__"] = UUID('c424b46a-eb9a-402c-943a-d85754b9da01') self.vs[78]["name"] = """isComposite""" self.vs[78]["mm__"] = """Attribute""" self.vs[78]["Type"] = """'Bool'""" self.vs[78]["GUID__"] = UUID('f4ca8f25-43af-4b02-8210-a16a28e7e4a9') self.vs[79]["name"] = """literal""" self.vs[79]["mm__"] = """Attribute""" self.vs[79]["Type"] = """'String'""" self.vs[79]["GUID__"] = UUID('7032fa86-0cb5-4456-94eb-f94b57cb2291') self.vs[80]["name"] = """literal""" self.vs[80]["mm__"] = """Attribute""" self.vs[80]["Type"] = """'String'""" self.vs[80]["GUID__"] = UUID('c005b803-b10a-427a-9687-cdabf515c74a') self.vs[81]["name"] = """literal""" self.vs[81]["mm__"] = """Attribute""" self.vs[81]["Type"] = """'String'""" self.vs[81]["GUID__"] = UUID('424cddb5-ea17-4f45-a655-ef979dd9d566') self.vs[82]["name"] = """literal""" self.vs[82]["mm__"] = """Attribute""" self.vs[82]["Type"] = """'String'""" self.vs[82]["GUID__"] = UUID('5a959669-4915-4994-8ce9-1712f7365d24') self.vs[83]["name"] = """name""" self.vs[83]["mm__"] = """Attribute""" self.vs[83]["Type"] = """'String'""" self.vs[83]["GUID__"] = UUID('84ba659f-2fdd-44f5-9d68-522821bda49e') self.vs[84]["name"] = """pivot""" self.vs[84]["mm__"] = """Attribute""" self.vs[84]["Type"] = """'String'""" self.vs[84]["GUID__"] = UUID('4b929c39-ad64-4dbc-b7f8-99e7858d5f95')
56.407801
923
0.535676
1,991
15,907
4.084882
0.311401
0.186647
0.029263
0.033444
0.067749
0
0
0
0
0
0
0.207306
0.199723
15,907
281
924
56.608541
0.431579
0.01075
0
0
0
0
0.374825
0.197122
0.007491
0
0
0
0
1
0.003745
false
0
0.011236
0
0.018727
0
0
0
0
null
0
0
0
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
0
0
0
0
0
0
0
2
96c5baac412b5625e462bda5d55cc1e8f8541f2a
350
py
Python
Dataset/Leetcode/valid/26/55.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/valid/26/55.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/valid/26/55.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, nums: List[int]) -> int: l=len(nums) ans=0 i=0 while 1: if (nums[ans]==nums[i+1]): i+=1 else: nums[ans+1]=nums[i+1] i+=1 ans+=1 if i>l-2: break return ans+1
19.444444
42
0.337143
45
350
2.622222
0.444444
0.067797
0.101695
0.118644
0.135593
0
0
0
0
0
0
0.067901
0.537143
350
17
43
20.588235
0.660494
0
0
0.133333
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
96e8444b87f7e14e6463b5c43f3305c3f1cf6d0c
212
py
Python
setup.py
jordibulbena/databricksHelper
3383288f7b65d703c76dcc050db932180fc6b8c5
[ "FTL" ]
null
null
null
setup.py
jordibulbena/databricksHelper
3383288f7b65d703c76dcc050db932180fc6b8c5
[ "FTL" ]
null
null
null
setup.py
jordibulbena/databricksHelper
3383288f7b65d703c76dcc050db932180fc6b8c5
[ "FTL" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Databricks helper functions', author='jordi bulbena', license='', )
19.272727
46
0.669811
24
212
5.833333
0.791667
0.171429
0
0
0
0
0
0
0
0
0
0.017544
0.193396
212
10
47
21.2
0.80117
0
0
0
0
0
0.226415
0
0
0
0
0
0
1
0
true
0
0.111111
0
0.111111
0
1
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
0
0
0
0
1
0
0
0
0
0
0
2
8c07defda21ed006b37305dee1a6e080e403742c
72
py
Python
pythonProject/q46.py
Babur171/python
a82a679fd8e9037fbc23ac347615cfea559f0281
[ "MIT" ]
null
null
null
pythonProject/q46.py
Babur171/python
a82a679fd8e9037fbc23ac347615cfea559f0281
[ "MIT" ]
null
null
null
pythonProject/q46.py
Babur171/python
a82a679fd8e9037fbc23ac347615cfea559f0281
[ "MIT" ]
null
null
null
string = "blackEyes" s = {string: (string[::2], string[1::2])} print(s)
18
41
0.597222
11
72
3.909091
0.545455
0
0
0
0
0
0
0
0
0
0
0.047619
0.125
72
3
42
24
0.634921
0
0
0
0
0
0.125
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
0
0
0
0
0
0
0
2
8c15e561e89468415b0bb310b88f2a083fe36413
314
py
Python
generic_confirmation/templatetags/generic_confirmation_tags.py
hungrydk/django-generic-confirmation
48c39a08061b17a1aa27cefc755c0a86ef4a1d04
[ "BSD-3-Clause" ]
null
null
null
generic_confirmation/templatetags/generic_confirmation_tags.py
hungrydk/django-generic-confirmation
48c39a08061b17a1aa27cefc755c0a86ef4a1d04
[ "BSD-3-Clause" ]
null
null
null
generic_confirmation/templatetags/generic_confirmation_tags.py
hungrydk/django-generic-confirmation
48c39a08061b17a1aa27cefc755c0a86ef4a1d04
[ "BSD-3-Clause" ]
1
2017-02-27T11:00:41.000Z
2017-02-27T11:00:41.000Z
from django.template import Library from ..models import DeferredAction register = Library() @register.simple_tag def pending_confirmations(instance): """ {% load generic_confirmation_tags %} Pending: {% pending_confirmations object %} """ return DeferredAction.objects.pending_for(instance)
24.153846
55
0.748408
32
314
7.15625
0.6875
0.174672
0
0
0
0
0
0
0
0
0
0
0.156051
314
12
56
26.166667
0.864151
0.254777
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
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
0
0
0
0
0
0
1
0
1
0
0
2
8c1df77791b696096cb32e3f78d17c34e599a6e7
862
py
Python
qcloudsdkra/CertDetailRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkra/CertDetailRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkra/CertDetailRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request class CertDetailRequest(Request): def __init__(self): super(CertDetailRequest, self).__init__( 'ra', 'qcloudcliV1', 'CertDetail', 'ra.api.qcloud.com') def get_certDn(self): return self.get_params().get('certDn') def set_certDn(self, certDn): self.add_param('certDn', certDn) def get_certSn(self): return self.get_params().get('certSn') def set_certSn(self, certSn): self.add_param('certSn', certSn) def get_module(self): return self.get_params().get('module') def set_module(self, module): self.add_param('module', module) def get_operation(self): return self.get_params().get('operation') def set_operation(self, operation): self.add_param('operation', operation)
25.352941
67
0.645012
105
862
5.066667
0.27619
0.045113
0.105263
0.12782
0.195489
0.195489
0
0
0
0
0
0.002959
0.215777
862
33
68
26.121212
0.784024
0.024362
0
0
0
0
0.112038
0
0
0
0
0
0
1
0.428571
false
0
0.047619
0.190476
0.714286
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
0
0
0
1
0
0
0
1
0
0
0
2
8c2408fc1a9897e33f8fb23cd1401682c36c0ce3
1,990
py
Python
interec/entities/pull_request.py
RAVEENSR/interec
e813ba5b67a1f14dd12b51460c98e239930dadb3
[ "Apache-2.0" ]
null
null
null
interec/entities/pull_request.py
RAVEENSR/interec
e813ba5b67a1f14dd12b51460c98e239930dadb3
[ "Apache-2.0" ]
null
null
null
interec/entities/pull_request.py
RAVEENSR/interec
e813ba5b67a1f14dd12b51460c98e239930dadb3
[ "Apache-2.0" ]
null
null
null
class PullRequest: """ This class models a pull-request. """ @staticmethod def __initialize_files(files_string): return files_string.split("|") def __init__(self, data): self.pr_id = data[0] self.pull_number = data[1] self.requester_login = data[2] self.title = data[3] self.description = data[4] self.created_date = data[5] self.merged_date = data[6] self.integrator_login = data[7] self.files = self.__initialize_files(data[8]) @property def pr_id(self): return self.__pr_id @property def pull_number(self): return self.__pull_number @property def requester_login(self): return self.__requester_login @property def title(self): return self.__title @property def description(self): return self.__description @property def created_date(self): return self.__created_date @property def merged_date(self): return self.__merged_date @property def integrator_login(self): return self.__integrator_login @property def files(self): return self.__files @pr_id.setter def pr_id(self, val): self.__pr_id = val @pull_number.setter def pull_number(self, val): self.__pull_number = val @requester_login.setter def requester_login(self, val): self.__requester_login = val @title.setter def title(self, val): self.__title = val @description.setter def description(self, val): self.__description = val @created_date.setter def created_date(self, val): self.__created_date = val @merged_date.setter def merged_date(self, val): self.__merged_date = val @integrator_login.setter def integrator_login(self, val): self.__integrator_login = val @files.setter def files(self, val): self.__files = val
21.630435
53
0.626633
241
1,990
4.825726
0.165975
0.085125
0.108341
0.018917
0
0
0
0
0
0
0
0.006311
0.283417
1,990
91
54
21.868132
0.809257
0.016583
0
0.132353
0
0
0.000515
0
0
0
0
0
0
1
0.294118
false
0
0
0.147059
0.455882
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
0
0
0
1
0
0
0
1
0
0
0
2
8c297b2bfc5a7b99e355a2c2076801e5932377fe
703
py
Python
app/forms.py
renxinhe/Web-Degen
6436b33b70d7d5467dccdb01ca08e63d407787db
[ "MIT" ]
null
null
null
app/forms.py
renxinhe/Web-Degen
6436b33b70d7d5467dccdb01ca08e63d407787db
[ "MIT" ]
null
null
null
app/forms.py
renxinhe/Web-Degen
6436b33b70d7d5467dccdb01ca08e63d407787db
[ "MIT" ]
null
null
null
from flask.ext.wtf import Form from wtforms import StringField, IntegerField, SelectField, PasswordField from flask_wtf.html5 import EmailField from wtforms.validators import DataRequired, Required from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileRequired, FileAllowed class LoginForm(Form): username = StringField("username", validators=[DataRequired()]) password = PasswordField("password", validators=[DataRequired()]) class SaveForm(Form): name = StringField("name", validators=[DataRequired()]) class ImageForm(FlaskForm): image = FileField('image', validators=[ FileRequired(), FileAllowed(['jpg', 'png'], 'Images only!') ])
35.15
74
0.739687
72
703
7.180556
0.458333
0.069633
0.069633
0
0
0
0
0
0
0
0
0.001672
0.14936
703
20
75
35.15
0.862876
0
0
0
0
0
0.062774
0
0
0
0
0
0
1
0
false
0.125
0.375
0
0.8125
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
0
0
0
0
0
1
1
0
0
0
0
2
8c2ed4faffe24f634f9aac03153105479e265dca
105
py
Python
_solved/solutions/04-spatial-joins24.py
lleondia/geopandas-tutorial
5128fd6865bbd979a7b4e5b8cb4d0de51bead029
[ "BSD-3-Clause" ]
341
2018-04-26T08:46:05.000Z
2022-03-01T08:13:39.000Z
_solved/solutions/04-spatial-joins24.py
lleondia/geopandas-tutorial
5128fd6865bbd979a7b4e5b8cb4d0de51bead029
[ "BSD-3-Clause" ]
24
2020-09-30T19:57:14.000Z
2021-10-05T07:21:09.000Z
_solved/solutions/04-spatial-joins24.py
lleondia/geopandas-tutorial
5128fd6865bbd979a7b4e5b8cb4d0de51bead029
[ "BSD-3-Clause" ]
128
2018-05-07T07:30:29.000Z
2022-02-19T17:53:39.000Z
# Take a subset for the Muette district land_use_muette = combined[combined['district_name'] == 'Muette']
52.5
65
0.771429
15
105
5.2
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.114286
105
2
65
52.5
0.83871
0.352381
0
0
0
0
0.283582
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
0
0
0
2
8c49cc719171ff8dd4a525d85c24b5e39a9ec156
857
py
Python
pyupdater/vendor/PyInstaller/hooks/hook-pydoc.py
rsumner31/PyUpdater1
d9658000472e57453267ee8fa174ae914dd8d33c
[ "BSD-2-Clause" ]
null
null
null
pyupdater/vendor/PyInstaller/hooks/hook-pydoc.py
rsumner31/PyUpdater1
d9658000472e57453267ee8fa174ae914dd8d33c
[ "BSD-2-Clause" ]
null
null
null
pyupdater/vendor/PyInstaller/hooks/hook-pydoc.py
rsumner31/PyUpdater1
d9658000472e57453267ee8fa174ae914dd8d33c
[ "BSD-2-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- """ Python module 'pydoc' causes the inclusion of Tcl/Tk library even in case of simple hello_world script. Most of the we do not want this behavior. This hook just removes this implicit dependency on Tcl/Tk. """ def hook(mod): # Ignore 'Tkinter' to prevent inclusion of Tcl/Tk library. for i, m in enumerate(mod.pyinstaller_imports): if m[0] == 'Tkinter': del mod.pyinstaller_imports[i] break return mod
32.961538
78
0.583431
103
857
4.825243
0.669903
0.030181
0.056338
0.064386
0.092555
0
0
0
0
0
0
0.007082
0.176196
857
25
79
34.28
0.696884
0.75846
0
0
0
0
0.036649
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
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
0
0
0
0
0
0
1
0
1
0
0
2
8c5581ee278c43420c8eee325e31981c84c3f59a
652
py
Python
providers/provider.py
lyuboraykov/columba
67a7456340164e6676e972e0ad1f2042341f0998
[ "MIT" ]
1
2015-07-07T14:16:23.000Z
2015-07-07T14:16:23.000Z
providers/provider.py
lyuboraykov/columba
67a7456340164e6676e972e0ad1f2042341f0998
[ "MIT" ]
null
null
null
providers/provider.py
lyuboraykov/columba
67a7456340164e6676e972e0ad1f2042341f0998
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from abc import ABCMeta, abstractmethod class Provider(metaclass=ABCMeta): """Abstract class for defining a mail-sender provider.""" def __init__(self, authentication, username=''): """ Default constructor, accepts the credentials for the service. The username is optional in case the provider uses only API key. authentication is either the password or the API token of the user. """ self.username = username self.authentication = authentication @abstractmethod def send(self, message): """Default method for sending emails.""" pass
32.6
75
0.667178
75
652
5.746667
0.653333
0.083527
0
0
0
0
0
0
0
0
0
0.002053
0.253067
652
20
76
32.6
0.882957
0.464724
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.125
0.125
0
0.5
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
0
0
0
1
0
1
0
0
0
0
0
2
8c5afa34804fc247a795e3f377e1ef643548f0ea
1,366
py
Python
Basic_Programming/Loan_Repayment_Caluclator.py
jaeheeLee17/Programming_Fundamentals
b1b72cbca313096e575f3ae6e00fff454a3df5bc
[ "MIT" ]
null
null
null
Basic_Programming/Loan_Repayment_Caluclator.py
jaeheeLee17/Programming_Fundamentals
b1b72cbca313096e575f3ae6e00fff454a3df5bc
[ "MIT" ]
null
null
null
Basic_Programming/Loan_Repayment_Caluclator.py
jaeheeLee17/Programming_Fundamentals
b1b72cbca313096e575f3ae6e00fff454a3df5bc
[ "MIT" ]
null
null
null
# Loan repayment calculation service # This is the program calculating the loan repayment amount for clients. # # Input parameters: # principal(p) : Only integers equal or greater than one million are allowed # years(y) : Only integers equal or greater than one are allowed # annual interest rate(r) : Only floating point numbers from 0.0 to 100.0 are allowed # Output parameters: # annual repayment amount(d), monthly repayment amount(d / 12), total repayment amount(d * y) # # Developers : Hacktree # Development date : 2021/06/16 (Version 1.0) # Input and check input value print("Welcome to loan repayment calculation service") p = int(input("How much is the principal? (We only count over one million won.) ")) y = int(input("How many years is the repayment period? ")) r = float(input("What percent is the interest rate? ")) # Calcualte repayment amount d = ((1 + (r / 100)) ** y * p * (r / 100)) // ((1 + (r / 100)) ** y - 1) d = int(d) # Print Output print("We will inform you about the loan repayment details.") print("If you repay once a year, you have to pay {} won for each year.".format(d)) print("If you repay once a month, you have to pay {} won for each month.".format(d // 12)) print("The total repayment amount until the repayment is completed is {} won.".format(d * y)) print("Thank you for using our service.") print("I hope you to see again.")
47.103448
93
0.708638
223
1,366
4.340807
0.426009
0.092975
0.066116
0.06405
0.154959
0.154959
0.113636
0
0
0
0
0.028394
0.174963
1,366
28
94
48.785714
0.830524
0.431918
0
0
0
0
0.646053
0
0
0
0
0
0
1
0
false
0
0
0
0
0.583333
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
2
8c64118863b9f9c25c5993319915cd2cacf5bc6c
789
py
Python
scico/optimize/admm.py
lanl/scico
976c9e5833f8f67eed2eaa43460d89fb09bb9f78
[ "BSD-3-Clause" ]
18
2021-09-21T18:55:11.000Z
2022-03-21T20:13:05.000Z
scico/optimize/admm.py
lanl/scico
976c9e5833f8f67eed2eaa43460d89fb09bb9f78
[ "BSD-3-Clause" ]
218
2021-09-21T21:45:08.000Z
2022-03-30T18:45:27.000Z
scico/optimize/admm.py
lanl/scico
976c9e5833f8f67eed2eaa43460d89fb09bb9f78
[ "BSD-3-Clause" ]
2
2021-09-23T22:44:47.000Z
2021-12-18T16:01:43.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2022 by SCICO Developers # All rights reserved. BSD 3-clause License. # This file is part of the SCICO package. Details of the copyright and # user license can be found in the 'LICENSE' file distributed with the # package. """ADMM solver and auxiliary classes.""" import sys # isort: off from ._admmaux import ( SubproblemSolver, GenericSubproblemSolver, LinearSubproblemSolver, CircularConvolveSolver, ) from ._admm import ADMM __all__ = [ "SubproblemSolver", "GenericSubproblemSolver", "LinearSubproblemSolver", "CircularConvolveSolver", "ADMM", ] # Imported items in __all__ appear to originate in top-level linop module for name in __all__: getattr(sys.modules[__name__], name).__module__ = __name__
24.65625
73
0.728771
91
789
6.032967
0.648352
0.018215
0.222222
0.302368
0
0
0
0
0
0
0
0.009317
0.183777
789
31
74
25.451613
0.843168
0.467681
0
0
0
0
0.213759
0.164619
0
0
0
0
0
1
0
false
0
0.176471
0
0.176471
0
0
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
0
0
0
0
0
0
0
0
2
4fc6cf8d4346e6a4700d50e2773419dc27b5703b
374
py
Python
tony-formatting.py
tonythott/tonnewcode
3dd595abf454aeb2f9abafe6c662ada5a6b0a966
[ "MIT" ]
null
null
null
tony-formatting.py
tonythott/tonnewcode
3dd595abf454aeb2f9abafe6c662ada5a6b0a966
[ "MIT" ]
null
null
null
tony-formatting.py
tonythott/tonnewcode
3dd595abf454aeb2f9abafe6c662ada5a6b0a966
[ "MIT" ]
null
null
null
a = int(input("Enter the first no : ")) b = int(input("Enter the second no : ")) c = a+b print("sum of",a,'+',b,'=',c) print("The first no is: %d and second number is: %d and the sum is: %d"%(a,b,c)) print("%d + %d = %d"%(a,b,c)) print("%-10d + %-10d = %-10d"%(a,b,c)) print("%-10f + %-10f = %-10f"%(a,b,c)) print("%s + %s = %s"%("tony","george","tonygeorge"))
31.166667
81
0.505348
70
374
2.7
0.328571
0.063492
0.079365
0.21164
0.095238
0
0
0
0
0
0
0.039344
0.184492
374
11
82
34
0.580328
0
0
0
0
0.111111
0.554017
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
0
0
0
null
0
0
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
0
0
0
0
0
0
1
0
2
4fce189bc2b4aee9e2041e997d6a95cdbfda4565
578
py
Python
inventory_print_label/urls.py
LuchaComics/comicscantina-django
78e630000fb1e1f6299f80655c8f57a496236ab1
[ "BSD-2-Clause" ]
null
null
null
inventory_print_label/urls.py
LuchaComics/comicscantina-django
78e630000fb1e1f6299f80655c8f57a496236ab1
[ "BSD-2-Clause" ]
5
2021-03-19T02:58:32.000Z
2022-03-11T23:57:30.000Z
inventory_print_label/urls.py
lendierickx/comics-django
3f5c6e85c89ff157dbf67179ea3b9007d7de446c
[ "BSD-2-Clause" ]
null
null
null
from django.conf.urls import patterns, include, url from inventory_print_label.views import comic, print_history, print_redo urlpatterns = ( url(r'^inventory/(\d+)/(\d+)/print_labels/comics$', comic.comics_print_labels_page), url(r'^inventory/(\d+)/(\d+)/print_labels/comics/series/(\d+)$', comic.series_qrcodes_page), url(r'^inventory/(\d+)/(\d+)/print_labels/comics/all$', comic.all_qrcodes_page), url(r'^inventory/(\d+)/(\d+)/print_history$', print_history.print_history_page), url(r'^inventory/(\d+)/(\d+)/print_redo$', print_redo.comics_redo_page), )
48.166667
96
0.709343
84
578
4.619048
0.285714
0.051546
0.167526
0.180412
0.427835
0.427835
0.427835
0.365979
0.185567
0
0
0
0.083045
578
11
97
52.545455
0.732075
0
0
0
0
0
0.375433
0.375433
0
0
0
0
0
1
0
false
0
0.222222
0
0.222222
0.666667
0
0
0
null
0
0
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
0
0
0
0
0
0
1
0
2
4fd2ba8829fdbd1099a8b3ebdc44be8ac49bf3f1
280
py
Python
generate.py
Somrlik/mazer
ca33021332ac7b904daa8935bf3910ac43a028d1
[ "MIT" ]
null
null
null
generate.py
Somrlik/mazer
ca33021332ac7b904daa8935bf3910ac43a028d1
[ "MIT" ]
5
2021-03-18T21:16:48.000Z
2022-03-11T23:31:41.000Z
generate.py
Somrlik/mazer
ca33021332ac7b904daa8935bf3910ac43a028d1
[ "MIT" ]
null
null
null
import subprocess for x in range(50, 51): fileName = 'generated/level' + str(x).zfill(2) + '.dat' result = subprocess.run(['python3', 'main.py', '1000', '3001'], stdout=subprocess.PIPE) with open(fileName, "wb") as f: f.write(result.stdout) f.close()
31.111111
91
0.610714
39
280
4.384615
0.794872
0
0
0
0
0
0
0
0
0
0
0.06278
0.203571
280
8
92
35
0.704036
0
0
0
1
0
0.153571
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
4fd322c58ca670250625a0f191c5963a52df61f5
625
py
Python
src/role/worker.py
grischard/OSMDeepOD
22d45ef35acbc3555fe9c3cd7605e1f6ad264d0a
[ "MIT" ]
156
2016-09-27T09:11:36.000Z
2022-03-28T21:58:36.000Z
src/role/worker.py
gaofei/OSMDeepOD
3f7246f94c40c76fcdabee9989fd89b40944478f
[ "MIT" ]
27
2016-10-08T07:51:21.000Z
2022-03-11T23:27:07.000Z
src/role/worker.py
gaofei/OSMDeepOD
3f7246f94c40c76fcdabee9989fd89b40944478f
[ "MIT" ]
45
2016-10-19T09:11:08.000Z
2022-02-20T17:22:36.000Z
import rq from rq import Queue from rq import Connection from redis import Redis class Worker(object): def __init__(self, job_queue_name_list): self.queues = job_queue_name_list def run(self, redis): redis_connection = Redis(redis[0], redis[1], password=redis[2]) with Connection(redis_connection): qs = map(Queue, self.queues) or [Queue()] w = rq.Worker(qs) w.work() print('Items in queue \'{0}\': {1}'.format(self.queues[0], len(qs))) @classmethod def from_worker(cls, job_queue_name_list): return cls(job_queue_name_list)
28.409091
80
0.6368
88
625
4.306818
0.397727
0.084433
0.126649
0.168865
0.100264
0
0
0
0
0
0
0.012739
0.2464
625
21
81
29.761905
0.791932
0
0
0
0
0
0.0336
0
0
0
0
0
0
1
0.176471
false
0.058824
0.235294
0.058824
0.529412
0.058824
0
0
0
null
0
0
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
0
0
1
0
0
0
0
0
2
4fe625871cf8037ed58f3296c0bfd1f55e2e23c6
984
py
Python
append-fail/appendfail.py
BartMassey/python-fail
718b5d7b0841db6d1f3d1aa7abd9fb889ffcfd37
[ "MIT" ]
1
2018-10-10T03:48:28.000Z
2018-10-10T03:48:28.000Z
append-fail/appendfail.py
BartMassey/python-fail
718b5d7b0841db6d1f3d1aa7abd9fb889ffcfd37
[ "MIT" ]
null
null
null
append-fail/appendfail.py
BartMassey/python-fail
718b5d7b0841db6d1f3d1aa7abd9fb889ffcfd37
[ "MIT" ]
null
null
null
# Copyright © 2014 Bart Massey # [This program is licensed under the "MIT License"] # Please see the file COPYING in the source # distribution of this software for license terms. # The += operator on lists appends the a copy of the # right-hand operand to the left-hand operand. This # makes z += y different from z = z + y. # First, note that the append operator makes a (shallow) # copy of both lists. x = [[1]] y = [[2]] z = x + y print(z) # Prints [[1], [2]] x[0][0] = 3 y[0][0] = 4 print(z) # Prints [[3], [4]] x[0] = 3 y[0] = 4 print(z) # Prints [[3], [4]] print() # Now, note that append assignment operator makes a copy of # just the right list. x = [1] z = x y = [2] z += y print(z) # Prints [1, 2] x[0] = 3 print(z) # Prints [3, 2] y[0] = 3 print(z) # Prints [3, 2] print() # The identity z = z + y === z += y does not hold. x = [1] z = x y = [2] z = z + y print(z) # Prints [1, 2] x[0] = 3 print(z) # Prints [1, 2] y[0] = 3 print(z) # Prints [1, 2]
20.081633
59
0.581301
189
984
3.031746
0.328042
0.094241
0.188482
0.113438
0.282723
0.282723
0.282723
0.137871
0.108202
0.108202
0
0.061995
0.245935
984
48
60
20.5
0.708895
0.661585
0
0.733333
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.366667
0
0
0
null
0
1
0
0
0
0
0
0
0
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
2
4feb84ccbb625c5a31a86108095d0917f6b184e6
219
py
Python
src/modules/misc/misc_model.py
MichaelVerdegaal/sataniaBot
bb1e1386c8c4e6c78af4ee02058857f14a4c437a
[ "MIT" ]
null
null
null
src/modules/misc/misc_model.py
MichaelVerdegaal/sataniaBot
bb1e1386c8c4e6c78af4ee02058857f14a4c437a
[ "MIT" ]
10
2019-01-29T14:24:48.000Z
2021-06-25T15:18:00.000Z
src/modules/misc/misc_model.py
MichaelVerdegaal/sataniaBot
bb1e1386c8c4e6c78af4ee02058857f14a4c437a
[ "MIT" ]
null
null
null
from sqlalchemy import Column, String, Integer from src import constants as const class Misc(const.BASE): __tablename__ = 'misc' index = Column(Integer, primary_key=True) status_playing = Column(String)
19.909091
46
0.739726
28
219
5.571429
0.714286
0.153846
0
0
0
0
0
0
0
0
0
0
0.182648
219
10
47
21.9
0.871508
0
0
0
0
0
0.018265
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
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
0
0
0
0
0
0
1
0
0
0
0
2
4ff500cf900e5155c5132db15344081ade707d36
490
py
Python
crispy_forms/helpers.py
javinp/django-crispy-forms
ccbbed534c384ef52b14f09e2e58f8556c8736d3
[ "MIT" ]
null
null
null
crispy_forms/helpers.py
javinp/django-crispy-forms
ccbbed534c384ef52b14f09e2e58f8556c8736d3
[ "MIT" ]
null
null
null
crispy_forms/helpers.py
javinp/django-crispy-forms
ccbbed534c384ef52b14f09e2e58f8556c8736d3
[ "MIT" ]
1
2022-01-12T07:07:38.000Z
2022-01-12T07:07:38.000Z
""" Backwards-compatible for django-crispy-forms versions previous to 0.9.0 Helpers.py was split into 3 different files in version 0.9.0: helper.py, layout.py and util.py In order to keep former imports working this file is kept. This usage will be deprecated and will be removed for django-crispy-forms 1.1.0 """ import warnings warnings.warn("Importing from helpers is deprecated; import from helper or layout instead.", DeprecationWarning) from helper import * from layout import *
32.666667
112
0.781633
81
490
4.728395
0.592593
0.046997
0.078329
0.104439
0
0
0
0
0
0
0
0.023981
0.14898
490
14
113
35
0.894484
0.626531
0
0
0
0
0.428571
0
0
0
0
0
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
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
2
8b046fdbf84435a75ca10e2eae70127094134671
1,820
py
Python
redis_i_action/flask-c1/forms.py
enixdark/im-r-e-d-i-s
5e91e3b2c7e4cbc9f14067a832b87c336c0811e7
[ "MIT" ]
null
null
null
redis_i_action/flask-c1/forms.py
enixdark/im-r-e-d-i-s
5e91e3b2c7e4cbc9f14067a832b87c336c0811e7
[ "MIT" ]
null
null
null
redis_i_action/flask-c1/forms.py
enixdark/im-r-e-d-i-s
5e91e3b2c7e4cbc9f14067a832b87c336c0811e7
[ "MIT" ]
null
null
null
from wtforms import TextField,BooleanField,PasswordField,IntegerField,FloatField,FileField from flask_wtf import Form from flask.ext.wtf.html5 import URLField from wtforms.validators import ValidationError,InputRequired,EqualTo from models import User import re EMAIL_VALIDATE = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$" def check_duplicate(case_sentisive=True): def _check_duplicate(form,field): if case_sentisive: res = User.query.filter( User.email.like('%' + field.data + '%') ).first() else: res = User.query.filter( User.email.ilike('%' + field.data + '%') ).first() if res: raise ValidationError('Email %s already exists' % field.data) return _check_duplicate class EmailField(TextField): def pre_validate(self,form): match = re.compile(EMAIL_VALIDATE).match(form.email.data) if not match: raise ValidationError('The email is not extract') return super(EmailField,self).pre_validate(form) class SignUpForm(Form): name = TextField('Name',validators=[InputRequired()]) email = EmailField('Email',validators=[ InputRequired(),check_duplicate() ]) password = PasswordField('Password',validators=[ InputRequired(),EqualTo('password_confirmation', message = 'Passwords must match') ]) password_confirmation = PasswordField('Confirmation Password',validators=[InputRequired()]) class LoginForm(Form): email = TextField("Email",[InputRequired()]) password = PasswordField('Password',[InputRequired()]) class ArticleForm(Form): title = TextField("Title",[InputRequired()]) link = URLField('Link') image = FileField('Image image') # poster = IntegerField("Poster") # time = FloatField('Time') # scores = FloatField('Scores') # votes = db.Column(db.Integer)
31.929825
151
0.711538
223
1,820
5.735426
0.363229
0.016419
0.027365
0.032838
0.07975
0.07975
0.037529
0.037529
0.037529
0.037529
0
0.01306
0.116484
1,820
56
152
32.5
0.782338
0.064286
0
0.142857
0
0.02381
0.173836
0.090159
0
0
0
0
0
1
0.071429
false
0.119048
0.142857
0
0.571429
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
0
0
0
0
0
1
0
0
1
0
0
2
8b076465fa20f42136d55798e777e8afef6861be
656
py
Python
tests/test_general.py
MichaelRazum/cachier
5210a0d12fe093ae841caf5f1d876de8cad285c6
[ "MIT" ]
null
null
null
tests/test_general.py
MichaelRazum/cachier
5210a0d12fe093ae841caf5f1d876de8cad285c6
[ "MIT" ]
null
null
null
tests/test_general.py
MichaelRazum/cachier
5210a0d12fe093ae841caf5f1d876de8cad285c6
[ "MIT" ]
null
null
null
"""Non-core-specific tests for cachier.""" import os from cachier.core import ( MAX_WORKERS_ENVAR_NAME, DEFAULT_MAX_WORKERS, _max_workers, _set_max_workers, _get_executor ) def test_max_workers(): """Just call this function for coverage.""" try: del os.environ[MAX_WORKERS_ENVAR_NAME] except KeyError: pass assert _max_workers() == DEFAULT_MAX_WORKERS def test_get_executor(): """Just call this function for coverage.""" _get_executor() _get_executor(False) _get_executor(True) def test_set_max_workers(): """Just call this function for coverage.""" _set_max_workers(9)
18.742857
48
0.690549
86
656
4.860465
0.395349
0.239234
0.093301
0.143541
0.270335
0.270335
0.196172
0.196172
0
0
0
0.001938
0.213415
656
34
49
19.294118
0.80814
0.228659
0
0
0
0
0
0
0
0
0
0
0.05
1
0.15
true
0.05
0.1
0
0.25
0
0
0
0
null
1
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
0
0
0
0
1
0
0
0
0
0
0
2