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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
85e21f0b841438846e315b39e59a21874e32e067
| 44
|
py
|
Python
|
client/api/main.py
|
Penlook/service
|
365f82d2a20075edea16bb4b935f1b9dcefa0228
|
[
"RSA-MD"
] | 1
|
2015-01-13T18:07:36.000Z
|
2015-01-13T18:07:36.000Z
|
client/api/main.py
|
Penlook/service
|
365f82d2a20075edea16bb4b935f1b9dcefa0228
|
[
"RSA-MD"
] | null | null | null |
client/api/main.py
|
Penlook/service
|
365f82d2a20075edea16bb4b935f1b9dcefa0228
|
[
"RSA-MD"
] | 1
|
2015-04-27T06:45:35.000Z
|
2015-04-27T06:45:35.000Z
|
#! /usr/bin/env python
print 'PYTHON CLIENT'
| 22
| 22
| 0.727273
| 7
| 44
| 4.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113636
| 44
| 2
| 23
| 22
| 0.820513
| 0.477273
| 0
| 0
| 0
| 0
| 0.565217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
c08d74721f416fe0588e490feea61c530e89c9da
| 45
|
py
|
Python
|
ajax_datatable/exceptions.py
|
ivi3/django-ajax-datatable
|
8a392e21378f59f36f7d4c47fb3d73a61cf36614
|
[
"MIT"
] | 101
|
2020-09-24T06:41:17.000Z
|
2022-03-30T08:26:52.000Z
|
ajax_datatable/exceptions.py
|
ivi3/django-ajax-datatable
|
8a392e21378f59f36f7d4c47fb3d73a61cf36614
|
[
"MIT"
] | 75
|
2020-09-24T03:46:14.000Z
|
2022-03-25T16:14:15.000Z
|
ajax_datatable/exceptions.py
|
ivi3/django-ajax-datatable
|
8a392e21378f59f36f7d4c47fb3d73a61cf36614
|
[
"MIT"
] | 39
|
2020-09-25T22:50:58.000Z
|
2022-03-06T10:13:10.000Z
|
class ColumnOrderError(Exception):
pass
| 11.25
| 34
| 0.755556
| 4
| 45
| 8.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177778
| 45
| 3
| 35
| 15
| 0.918919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
c0ad1aae91002238d6496f24a4f18d85b09f108d
| 84
|
py
|
Python
|
main.py
|
cgilbert-rep/wiki_extract
|
369a88439999f3087dda7178f5550cadbcd29754
|
[
"MIT"
] | null | null | null |
main.py
|
cgilbert-rep/wiki_extract
|
369a88439999f3087dda7178f5550cadbcd29754
|
[
"MIT"
] | null | null | null |
main.py
|
cgilbert-rep/wiki_extract
|
369a88439999f3087dda7178f5550cadbcd29754
|
[
"MIT"
] | null | null | null |
from modules import wiki_extract
if __name__ == '__main__':
wiki_extract.run()
| 16.8
| 32
| 0.738095
| 11
| 84
| 4.727273
| 0.818182
| 0.423077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 84
| 4
| 33
| 21
| 0.742857
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c0b721219a90b242bc4a3b357ac67c1032c2b4d5
| 167
|
py
|
Python
|
aula04questao-1.py
|
SusanMarques/python-cursoemvideo
|
f1493f6932f387489fd5b9f37cf4d206df5c402c
|
[
"MIT"
] | null | null | null |
aula04questao-1.py
|
SusanMarques/python-cursoemvideo
|
f1493f6932f387489fd5b9f37cf4d206df5c402c
|
[
"MIT"
] | null | null | null |
aula04questao-1.py
|
SusanMarques/python-cursoemvideo
|
f1493f6932f387489fd5b9f37cf4d206df5c402c
|
[
"MIT"
] | null | null | null |
# Online Python compiler (interpreter) to run Python online.
# Write Python 3 code in this online editor and run it.
#Primeiros comandos em python
print("Olá, mundo!")
| 41.75
| 60
| 0.766467
| 26
| 167
| 4.923077
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007092
| 0.155689
| 167
| 4
| 61
| 41.75
| 0.900709
| 0.838323
| 0
| 0
| 0
| 0
| 0.458333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
c0c92d24330d0dd7a40c94ed8ef09b197899cd26
| 79
|
py
|
Python
|
02-variables_and_data_types/variables_3.py
|
palmieric/Tecnologie_Web-Introduzione_a_Python
|
b10ce49a947b239ca2af1938248f7191937b2f89
|
[
"CC0-1.0"
] | 3
|
2021-05-17T14:48:42.000Z
|
2021-05-24T10:12:06.000Z
|
02-variables_and_data_types/variables_3.py
|
palmieric/Tecnologie_Web-Introduzione_a_Python
|
b10ce49a947b239ca2af1938248f7191937b2f89
|
[
"CC0-1.0"
] | null | null | null |
02-variables_and_data_types/variables_3.py
|
palmieric/Tecnologie_Web-Introduzione_a_Python
|
b10ce49a947b239ca2af1938248f7191937b2f89
|
[
"CC0-1.0"
] | 2
|
2021-05-17T13:52:15.000Z
|
2021-05-24T10:44:54.000Z
|
# variables 3
a = "abc"
print("a:", a, type(a))
a = 3
print("a:", a, type(a))
| 11.285714
| 23
| 0.506329
| 16
| 79
| 2.5
| 0.375
| 0.15
| 0.35
| 0.55
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031746
| 0.202532
| 79
| 6
| 24
| 13.166667
| 0.603175
| 0.139241
| 0
| 0.5
| 0
| 0
| 0.107692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
c0f921f65d06343760bf7d1017755d3a327167fb
| 38
|
py
|
Python
|
tests/components/econet/__init__.py
|
tbarbette/core
|
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
tests/components/econet/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
tests/components/econet/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""Tests for the Econet component."""
| 19
| 37
| 0.684211
| 5
| 38
| 5.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 38
| 1
| 38
| 38
| 0.787879
| 0.815789
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c0fca9d7286541c556e492c7e6e9ef4e222ce1a8
| 32
|
py
|
Python
|
fairseq/version.py
|
Praveen76/Wav2Keyword
|
40c3bdd92c2ed43e421a4756426dbfd6158e8b94
|
[
"MIT"
] | 33
|
2021-01-06T18:03:55.000Z
|
2022-03-28T12:07:44.000Z
|
fairseq/version.py
|
Praveen76/Wav2Keyword
|
40c3bdd92c2ed43e421a4756426dbfd6158e8b94
|
[
"MIT"
] | 8
|
2021-06-11T03:11:37.000Z
|
2022-03-08T19:15:42.000Z
|
fairseq/version.py
|
Praveen76/Wav2Keyword
|
40c3bdd92c2ed43e421a4756426dbfd6158e8b94
|
[
"MIT"
] | 14
|
2021-05-17T06:55:01.000Z
|
2022-03-28T12:07:42.000Z
|
__version__ = "1.0.0a0+ba4f542"
| 16
| 31
| 0.71875
| 5
| 32
| 3.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.275862
| 0.09375
| 32
| 1
| 32
| 32
| 0.37931
| 0
| 0
| 0
| 0
| 0
| 0.46875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8d0424e8974a51fddbe0680d9394fb36c30b12bc
| 79
|
py
|
Python
|
main.py
|
oallaire/assembly-pdf-generator
|
4f75ee190bb275e813efaaa6a3b514b1f37cfc57
|
[
"MIT"
] | null | null | null |
main.py
|
oallaire/assembly-pdf-generator
|
4f75ee190bb275e813efaaa6a3b514b1f37cfc57
|
[
"MIT"
] | null | null | null |
main.py
|
oallaire/assembly-pdf-generator
|
4f75ee190bb275e813efaaa6a3b514b1f37cfc57
|
[
"MIT"
] | 1
|
2021-04-29T08:49:04.000Z
|
2021-04-29T08:49:04.000Z
|
from app.app_main import start_app
if __name__ == '__main__':
start_app()
| 15.8
| 34
| 0.721519
| 12
| 79
| 3.833333
| 0.583333
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177215
| 79
| 4
| 35
| 19.75
| 0.707692
| 0
| 0
| 0
| 0
| 0
| 0.101266
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
238f22a11548e72ec930e58fe826c388bbdf5565
| 30
|
py
|
Python
|
piefuzz/__init__.py
|
timeyyy/piefuzz
|
c121ec8abb8a7666f07aeda315aa8d77f8933b1f
|
[
"MIT"
] | 7
|
2017-07-05T12:40:56.000Z
|
2020-08-01T17:05:47.000Z
|
piefuzz/__init__.py
|
timeyyy/piefuzz
|
c121ec8abb8a7666f07aeda315aa8d77f8933b1f
|
[
"MIT"
] | null | null | null |
piefuzz/__init__.py
|
timeyyy/piefuzz
|
c121ec8abb8a7666f07aeda315aa8d77f8933b1f
|
[
"MIT"
] | null | null | null |
from piefuzz.piefuzz import *
| 15
| 29
| 0.8
| 4
| 30
| 6
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 30
| 1
| 30
| 30
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
239626127ca379d10d2c06ed217bf75e11e23b6a
| 202
|
py
|
Python
|
dsets/__init__.py
|
kmeng01/rome
|
5ae38a91f384fbf2c526b2fb36406fb3c43262ac
|
[
"MIT"
] | 38
|
2022-02-11T01:49:00.000Z
|
2022-03-27T21:52:33.000Z
|
dsets/__init__.py
|
kmeng01/rome
|
5ae38a91f384fbf2c526b2fb36406fb3c43262ac
|
[
"MIT"
] | 3
|
2022-02-17T07:11:09.000Z
|
2022-03-28T19:39:04.000Z
|
dsets/__init__.py
|
kmeng01/rome
|
5ae38a91f384fbf2c526b2fb36406fb3c43262ac
|
[
"MIT"
] | 10
|
2022-02-11T09:30:09.000Z
|
2022-03-24T15:23:56.000Z
|
from .attr_snippets import AttributeSnippets
from .counterfact import CounterFactDataset
from .knowns import KnownsDataset
from .zsre import MENDQADataset
from .tfidf_stats import get_tfidf_vectorizer
| 28.857143
| 45
| 0.871287
| 24
| 202
| 7.166667
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10396
| 202
| 6
| 46
| 33.666667
| 0.950276
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
23a261a75bc38e6c0f1b49b1aab129e2ab8d81ce
| 129
|
py
|
Python
|
flasks3/__init__.py
|
MurphyMarkW/python-flask-s3
|
4cd1813e16e1efe8ada9679378c11834cee6d3a9
|
[
"MIT"
] | 1
|
2019-02-17T20:50:59.000Z
|
2019-02-17T20:50:59.000Z
|
flasks3/__init__.py
|
MurphyMarkW/python-flask-s3
|
4cd1813e16e1efe8ada9679378c11834cee6d3a9
|
[
"MIT"
] | null | null | null |
flasks3/__init__.py
|
MurphyMarkW/python-flask-s3
|
4cd1813e16e1efe8ada9679378c11834cee6d3a9
|
[
"MIT"
] | null | null | null |
"""Flask S3 Blueprints
"""
__version__ = '2016.1.0'
from . import auth
from . import drivers
from .blueprint import blueprint
| 12.9
| 32
| 0.72093
| 17
| 129
| 5.235294
| 0.705882
| 0.224719
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065421
| 0.170543
| 129
| 9
| 33
| 14.333333
| 0.766355
| 0.147287
| 0
| 0
| 0
| 0
| 0.07767
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0.25
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
23a496e2be8e614ef082772d4b8cb5695e184f2f
| 64
|
py
|
Python
|
tests/test_base.py
|
njnur/InTime-Python-SDK
|
1e60443812a3d3c53687127c49ce57bf14eb24ef
|
[
"MIT"
] | null | null | null |
tests/test_base.py
|
njnur/InTime-Python-SDK
|
1e60443812a3d3c53687127c49ce57bf14eb24ef
|
[
"MIT"
] | null | null | null |
tests/test_base.py
|
njnur/InTime-Python-SDK
|
1e60443812a3d3c53687127c49ce57bf14eb24ef
|
[
"MIT"
] | null | null | null |
class TestAPIConnector:
def test_header(self):
pass
| 16
| 26
| 0.671875
| 7
| 64
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.265625
| 64
| 3
| 27
| 21.333333
| 0.893617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
23cbb890ef1178480cc73e5103ac6858cde06915
| 252
|
py
|
Python
|
pystratis/api/federation/responsemodels/__init__.py
|
TjadenFroyda/pyStratis
|
9cc7620d7506637f8a2b84003d931eceb36ac5f2
|
[
"MIT"
] | 8
|
2021-06-30T20:44:22.000Z
|
2021-12-07T14:42:22.000Z
|
pystratis/api/federation/responsemodels/__init__.py
|
TjadenFroyda/pyStratis
|
9cc7620d7506637f8a2b84003d931eceb36ac5f2
|
[
"MIT"
] | 2
|
2021-07-01T11:50:18.000Z
|
2022-01-25T18:39:49.000Z
|
pystratis/api/federation/responsemodels/__init__.py
|
TjadenFroyda/pyStratis
|
9cc7620d7506637f8a2b84003d931eceb36ac5f2
|
[
"MIT"
] | 4
|
2021-07-01T04:36:42.000Z
|
2021-09-17T10:54:19.000Z
|
from .federationmembermodel import FederationMemberModel
from .federationmemberdetailedmodel import FederationMemberDetailedModel
from .miningstats import MiningStats
__all__ = ['FederationMemberModel', 'FederationMemberDetailedModel', 'MiningStats']
| 42
| 83
| 0.873016
| 16
| 252
| 13.5
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 252
| 5
| 84
| 50.4
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0.242063
| 0.198413
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7b013da962b8b0b487d28b6b75d3416f02396216
| 318
|
py
|
Python
|
1041.py
|
luizgallas/uri_iniciante
|
fd23f2fe1638b373b94b7b4ddb2d906cec8db87b
|
[
"Apache-2.0"
] | null | null | null |
1041.py
|
luizgallas/uri_iniciante
|
fd23f2fe1638b373b94b7b4ddb2d906cec8db87b
|
[
"Apache-2.0"
] | null | null | null |
1041.py
|
luizgallas/uri_iniciante
|
fd23f2fe1638b373b94b7b4ddb2d906cec8db87b
|
[
"Apache-2.0"
] | null | null | null |
x,y = map(float, input().split())
if (x == y == 0):
print("Origem")
elif (y == 0):
print("Eixo X")
elif (x == 0):
print("Eixo Y")
elif (x > 0) and (y > 0):
print("Q1")
elif (x < 0) and (y > 0):
print("Q2")
elif (x < 0) and (y < 0):
print("Q3")
elif (x > 0) and (y < 0):
print("Q4")
| 15.9
| 33
| 0.440252
| 56
| 318
| 2.5
| 0.303571
| 0.3
| 0.3
| 0.257143
| 0.457143
| 0.457143
| 0.457143
| 0
| 0
| 0
| 0
| 0.067265
| 0.298742
| 318
| 19
| 34
| 16.736842
| 0.560538
| 0
| 0
| 0
| 0
| 0
| 0.082278
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.466667
| 0
| 0
| 0
| null | 1
| 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
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7b1997fae2b6b4a49b939281492c4b1125237560
| 239
|
py
|
Python
|
backend/backend/apps/api/helpers/CreateAzureAppService.py
|
josegob/microsoft-sec-api
|
299043bed65cf1f49c7a4c8ee728c961066dc763
|
[
"MIT"
] | null | null | null |
backend/backend/apps/api/helpers/CreateAzureAppService.py
|
josegob/microsoft-sec-api
|
299043bed65cf1f49c7a4c8ee728c961066dc763
|
[
"MIT"
] | null | null | null |
backend/backend/apps/api/helpers/CreateAzureAppService.py
|
josegob/microsoft-sec-api
|
299043bed65cf1f49c7a4c8ee728c961066dc763
|
[
"MIT"
] | null | null | null |
from .AzureSDKRepository import AzureSDKRepository
class CreateAzureAppService:
def __init__(self, config):
self.repository = AzureSDKRepository(config)
def execute(self):
return self.repository.init_azure_app()
| 23.9
| 52
| 0.748954
| 23
| 239
| 7.521739
| 0.608696
| 0.16185
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179916
| 239
| 9
| 53
| 26.555556
| 0.882653
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
9e5b2118d7152e0ebdbd7ea6980fa626770350a6
| 70
|
py
|
Python
|
raven/contrib/transports/zeromq/__init__.py
|
alex/raven
|
28227282891d7eb7e3600a458d0d8c7164f63dcb
|
[
"BSD-3-Clause"
] | 1
|
2015-11-08T12:45:40.000Z
|
2015-11-08T12:45:40.000Z
|
raven/contrib/transports/zeromq/__init__.py
|
openlabs/raven
|
c065a96456c4e99a3726a599630dfe7fee9d29e6
|
[
"BSD-3-Clause"
] | null | null | null |
raven/contrib/transports/zeromq/__init__.py
|
openlabs/raven
|
c065a96456c4e99a3726a599630dfe7fee9d29e6
|
[
"BSD-3-Clause"
] | null | null | null |
from raven.contrib.transports.zeromq.raven_zmq import ZmqPubTransport
| 35
| 69
| 0.885714
| 9
| 70
| 6.777778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 70
| 1
| 70
| 70
| 0.924242
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9e5f0c508f8af339f67d156f140c6b3130b9db14
| 110
|
py
|
Python
|
utils/schedulers.py
|
timesler/pytorch-project-template
|
f8867d9b6b5c218b702d6675a16d208afe6f6402
|
[
"MIT"
] | 13
|
2019-07-06T22:05:23.000Z
|
2021-11-03T22:13:50.000Z
|
utils/schedulers.py
|
timesler/pytorch-project-template
|
f8867d9b6b5c218b702d6675a16d208afe6f6402
|
[
"MIT"
] | 1
|
2020-06-25T10:18:31.000Z
|
2021-01-27T05:28:20.000Z
|
utils/schedulers.py
|
timesler/pytorch-project-template
|
f8867d9b6b5c218b702d6675a16d208afe6f6402
|
[
"MIT"
] | 6
|
2019-07-06T22:05:50.000Z
|
2021-04-28T07:25:02.000Z
|
class DummyScheduler(object):
def __init__(self, optimizer):
pass
def step(self):
pass
| 22
| 34
| 0.618182
| 12
| 110
| 5.333333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.290909
| 110
| 5
| 35
| 22
| 0.820513
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.4
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
9e6c03920ff3a43e93bb9a4b263edc276da0762e
| 133
|
py
|
Python
|
digsby/src/msn/p12/__init__.py
|
ifwe/digsby
|
f5fe00244744aa131e07f09348d10563f3d8fa99
|
[
"Python-2.0"
] | 35
|
2015-08-15T14:32:38.000Z
|
2021-12-09T16:21:26.000Z
|
digsby/src/msn/p12/__init__.py
|
niterain/digsby
|
16a62c7df1018a49eaa8151c0f8b881c7e252949
|
[
"Python-2.0"
] | 4
|
2015-09-12T10:42:57.000Z
|
2017-02-27T04:05:51.000Z
|
digsby/src/msn/p12/__init__.py
|
niterain/digsby
|
16a62c7df1018a49eaa8151c0f8b881c7e252949
|
[
"Python-2.0"
] | 15
|
2015-07-10T23:58:07.000Z
|
2022-01-23T22:16:33.000Z
|
from MSNP12Switchboard import MSNP12Switchboard as Switchboard
from MSNP12Notification import MSNP12Notification as Notification
| 44.333333
| 66
| 0.879699
| 12
| 133
| 9.75
| 0.583333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068376
| 0.120301
| 133
| 2
| 67
| 66.5
| 0.931624
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9e94f30ebea5666d3540acaec8051784bc7270f7
| 144
|
py
|
Python
|
test_tor.py
|
Guiraud/Formation-Scraping-1
|
2194a06da9fc727abe160157295f7e984161c0a3
|
[
"MIT"
] | null | null | null |
test_tor.py
|
Guiraud/Formation-Scraping-1
|
2194a06da9fc727abe160157295f7e984161c0a3
|
[
"MIT"
] | 1
|
2021-06-02T00:17:52.000Z
|
2021-06-02T00:17:52.000Z
|
test_tor.py
|
Guiraud/Formation-Scraping-1
|
2194a06da9fc727abe160157295f7e984161c0a3
|
[
"MIT"
] | null | null | null |
import socks
import socket
import requests
socks.setdefaultproxy( addr="127.0.0.1", port=9050)
print(requests.get("http://icanhazip.com").text)
| 24
| 51
| 0.770833
| 22
| 144
| 5.045455
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074627
| 0.069444
| 144
| 6
| 52
| 24
| 0.753731
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9ea299eb72c3e7699860ccc7ba8fa9244a1edefe
| 195
|
py
|
Python
|
records_mover/db/__init__.py
|
cwegrzyn/records-mover
|
e3b71d6c09d99d0bcd6a956b9d09d20f8abe98d2
|
[
"Apache-2.0"
] | 36
|
2020-03-17T11:56:51.000Z
|
2022-01-19T16:03:32.000Z
|
records_mover/db/__init__.py
|
cwegrzyn/records-mover
|
e3b71d6c09d99d0bcd6a956b9d09d20f8abe98d2
|
[
"Apache-2.0"
] | 60
|
2020-03-02T23:13:29.000Z
|
2021-05-19T15:05:42.000Z
|
records_mover/db/__init__.py
|
cwegrzyn/records-mover
|
e3b71d6c09d99d0bcd6a956b9d09d20f8abe98d2
|
[
"Apache-2.0"
] | 4
|
2020-08-11T13:17:37.000Z
|
2021-11-05T21:11:52.000Z
|
__all__ = [
'DBDriver',
'LoadError',
'create_sqlalchemy_url',
]
from .driver import DBDriver # noqa
from .errors import LoadError # noqa
from .connect import create_sqlalchemy_url
| 19.5
| 42
| 0.717949
| 22
| 195
| 6
| 0.545455
| 0.242424
| 0.287879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.194872
| 195
| 9
| 43
| 21.666667
| 0.840764
| 0.046154
| 0
| 0
| 0
| 0
| 0.20765
| 0.114754
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7b435866c10336779ed47fe92ed89b7f16941e59
| 38
|
py
|
Python
|
Day 9/py_day_mod/another/__init__.py
|
loveyourpassion/comm
|
8295a72557d928ccb9a9d37fad73692ea82f3035
|
[
"MIT"
] | 149
|
2020-03-18T17:46:09.000Z
|
2022-03-17T09:30:18.000Z
|
Day 9/py_day_mod/another/__init__.py
|
loveyourpassion/comm
|
8295a72557d928ccb9a9d37fad73692ea82f3035
|
[
"MIT"
] | 2
|
2020-10-15T17:17:13.000Z
|
2021-04-30T10:34:52.000Z
|
Day 9/py_day_mod/another/__init__.py
|
loveyourpassion/comm
|
8295a72557d928ccb9a9d37fad73692ea82f3035
|
[
"MIT"
] | 90
|
2020-03-23T19:06:01.000Z
|
2022-03-10T11:08:04.000Z
|
#from make_messages import MessageUser
| 38
| 38
| 0.894737
| 5
| 38
| 6.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078947
| 38
| 1
| 38
| 38
| 0.942857
| 0.973684
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7bb8a39a552421d40dbcf742e7892c6bf2abbb03
| 45
|
py
|
Python
|
ABC/210/ex.py
|
buchi1002/AtCoder
|
e678a8a1f0edb3eab922ee5f65f6742791c231b3
|
[
"MIT"
] | null | null | null |
ABC/210/ex.py
|
buchi1002/AtCoder
|
e678a8a1f0edb3eab922ee5f65f6742791c231b3
|
[
"MIT"
] | null | null | null |
ABC/210/ex.py
|
buchi1002/AtCoder
|
e678a8a1f0edb3eab922ee5f65f6742791c231b3
|
[
"MIT"
] | null | null | null |
X = {}
print(5 in X)
print(X[4])
print(X[5])
| 9
| 13
| 0.533333
| 11
| 45
| 2.181818
| 0.454545
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 0.177778
| 45
| 4
| 14
| 11.25
| 0.567568
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.75
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
c87731edba0db9bae8d9603ba9ee7a4f4ffa226c
| 314
|
py
|
Python
|
web/website/routes/views.py
|
samiurprapon/Aether
|
2df254473885248f01cbc9e9f18935d91d9f1f08
|
[
"Apache-2.0"
] | 4
|
2021-07-09T12:51:18.000Z
|
2021-09-09T12:35:13.000Z
|
web/website/routes/views.py
|
SharifRafid/Aether
|
153821d96b2a931c58c570602f8b145c6ab5d5a9
|
[
"Apache-2.0"
] | 9
|
2021-08-03T23:56:27.000Z
|
2022-03-31T20:42:42.000Z
|
web/website/routes/views.py
|
SharifRafid/Aether
|
153821d96b2a931c58c570602f8b145c6ab5d5a9
|
[
"Apache-2.0"
] | 7
|
2021-05-29T18:53:41.000Z
|
2022-03-09T17:51:38.000Z
|
from flask import Blueprint, render_template
views = Blueprint('views', __name__)
@views.route('/')
def index():
return render_template("index.html")
@views.route('/login')
def login():
return render_template("login.html")
@views.route('/signup')
def signup():
return render_template("signup.html")
| 20.933333
| 44
| 0.710191
| 39
| 314
| 5.512821
| 0.384615
| 0.260465
| 0.27907
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124204
| 314
| 15
| 45
| 20.933333
| 0.781818
| 0
| 0
| 0
| 0
| 0
| 0.15873
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.090909
| 0.272727
| 0.636364
| 0.181818
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
c892a10e86055867435ceaed5e3fcb20c0df181c
| 63
|
py
|
Python
|
training/rootnav2/accuracy/__init__.py
|
robail-yasrab/6-RootNav-2.0
|
3e973c0f7fc34b3938a2294e858d1a0de76e9f0f
|
[
"BSD-3-Clause"
] | 23
|
2019-07-25T10:15:20.000Z
|
2022-01-26T03:28:56.000Z
|
training/rootnav2/accuracy/__init__.py
|
rootnav2/RootNav-2.0
|
3e973c0f7fc34b3938a2294e858d1a0de76e9f0f
|
[
"BSD-3-Clause"
] | 7
|
2019-08-07T15:56:26.000Z
|
2022-01-13T01:28:22.000Z
|
training/rootnav2/accuracy/__init__.py
|
rootnav2/RootNav-2.0
|
3e973c0f7fc34b3938a2294e858d1a0de76e9f0f
|
[
"BSD-3-Clause"
] | 11
|
2019-07-25T10:15:25.000Z
|
2022-02-15T09:14:49.000Z
|
from .nms import nonmaximalsuppression, rrtree, evaluate_points
| 63
| 63
| 0.873016
| 7
| 63
| 7.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 63
| 1
| 63
| 63
| 0.931034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c8bc6751add1f1e982e473954b0984df969543d4
| 241
|
py
|
Python
|
alsek/__init__.py
|
TariqAHassan/alsek
|
a0d0f44d2eea1538c9d04530ae917695f624d269
|
[
"MIT"
] | 1
|
2021-08-16T02:38:40.000Z
|
2021-08-16T02:38:40.000Z
|
alsek/__init__.py
|
TariqAHassan/alsek
|
a0d0f44d2eea1538c9d04530ae917695f624d269
|
[
"MIT"
] | null | null | null |
alsek/__init__.py
|
TariqAHassan/alsek
|
a0d0f44d2eea1538c9d04530ae917695f624d269
|
[
"MIT"
] | null | null | null |
"""
Alsek
"""
from alsek.core.broker import Broker
from alsek.core.concurrency import Lock
from alsek.core.message import Message
from alsek.core.status import StatusTracker
from alsek.core.task import task
__version__: str = "0.1.0"
| 18.538462
| 43
| 0.767635
| 36
| 241
| 5.027778
| 0.416667
| 0.248619
| 0.359116
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.141079
| 241
| 12
| 44
| 20.083333
| 0.859903
| 0.020747
| 0
| 0
| 0
| 0
| 0.022523
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c8db69d4a6a37f42a65c3d7e90c36633c8638762
| 227
|
py
|
Python
|
agencies/admin.py
|
401ode/fac
|
465b9a79e3897dd53379d71c4d89399d7dfde19d
|
[
"Apache-1.1"
] | null | null | null |
agencies/admin.py
|
401ode/fac
|
465b9a79e3897dd53379d71c4d89399d7dfde19d
|
[
"Apache-1.1"
] | null | null | null |
agencies/admin.py
|
401ode/fac
|
465b9a79e3897dd53379d71c4d89399d7dfde19d
|
[
"Apache-1.1"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from .models import FederalAgency, StateAgency, SubRecipient
admin.site.register(FederalAgency)
admin.site.register(StateAgency)
admin.site.register(SubRecipient)
| 25.222222
| 60
| 0.832599
| 27
| 227
| 7
| 0.481481
| 0.142857
| 0.269841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088106
| 227
| 8
| 61
| 28.375
| 0.913043
| 0.114537
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
cdbbec038d72c26d399a041f19c9521f1f4d4726
| 29
|
py
|
Python
|
pyresolver/_exception_helper.py
|
zaryanezrya/pyresolver
|
e6d92f524497c8ec944ac2ae929affde384b386a
|
[
"MIT"
] | 3
|
2021-09-11T06:16:53.000Z
|
2021-12-11T21:43:15.000Z
|
pyresolver/_exception_helper.py
|
zaryanezrya/pyresolver
|
e6d92f524497c8ec944ac2ae929affde384b386a
|
[
"MIT"
] | null | null | null |
pyresolver/_exception_helper.py
|
zaryanezrya/pyresolver
|
e6d92f524497c8ec944ac2ae929affde384b386a
|
[
"MIT"
] | null | null | null |
def raise_(ex):
raise ex
| 9.666667
| 15
| 0.62069
| 5
| 29
| 3.4
| 0.6
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.275862
| 29
| 2
| 16
| 14.5
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cde94c340555de2ca424d0a7f0b86fc0c0ae58df
| 2,539
|
py
|
Python
|
RealGmPlayerInfo.py
|
sderenth/Draft-Model
|
333f29883cc9a5b0a7fedb365fed5e04b8144e09
|
[
"MIT"
] | 1
|
2019-08-29T15:20:35.000Z
|
2019-08-29T15:20:35.000Z
|
RealGmPlayerInfo.py
|
sderenth/Draft-Model
|
333f29883cc9a5b0a7fedb365fed5e04b8144e09
|
[
"MIT"
] | null | null | null |
RealGmPlayerInfo.py
|
sderenth/Draft-Model
|
333f29883cc9a5b0a7fedb365fed5e04b8144e09
|
[
"MIT"
] | null | null | null |
import scrapy
from bs4 import BeautifulSoup
class preNBAdata(scrapy.Spider):
name = "playerInfo"
start_urls = ['https://basketball.realgm.com/ncaa/players/2018/A',
'https://basketball.realgm.com/ncaa/players/2018/B',
'https://basketball.realgm.com/ncaa/players/2018/C',
'https://basketball.realgm.com/ncaa/players/2018/D',
'https://basketball.realgm.com/ncaa/players/2018/E',
'https://basketball.realgm.com/ncaa/players/2018/F',
'https://basketball.realgm.com/ncaa/players/2018/G',
'https://basketball.realgm.com/ncaa/players/2018/H',
'https://basketball.realgm.com/ncaa/players/2018/I',
'https://basketball.realgm.com/ncaa/players/2018/J',
'https://basketball.realgm.com/ncaa/players/2018/K',
'https://basketball.realgm.com/ncaa/players/2018/L',
'https://basketball.realgm.com/ncaa/players/2018/M',
'https://basketball.realgm.com/ncaa/players/2018/N',
'https://basketball.realgm.com/ncaa/players/2018/O',
'https://basketball.realgm.com/ncaa/players/2018/P',
'https://basketball.realgm.com/ncaa/players/2018/Q',
'https://basketball.realgm.com/ncaa/players/2018/R',
'https://basketball.realgm.com/ncaa/players/2018/S',
'https://basketball.realgm.com/ncaa/players/2018/T',
'https://basketball.realgm.com/ncaa/players/2018/U',
'https://basketball.realgm.com/ncaa/players/2018/V',
'https://basketball.realgm.com/ncaa/players/2018/W',
'https://basketball.realgm.com/ncaa/players/2018/X',
'https://basketball.realgm.com/ncaa/players/2018/Y',
'https://basketball.realgm.com/ncaa/players/2018/Z']
def parse(self, response):
soup = BeautifulSoup(response.text, 'html.parser')
tab_rows = soup.find_all('tr')[1:]
for row in tab_rows:
tds = row.find_all('td')
yield {
'player_name': tds[0].getText(),
'href': tds[0].a['href'],
'pos': tds[1].getText(),
'height': tds[2].getText(),
'weight': tds[3].getText(),
'team': tds[4].getText(),
'birthday_code': tds[6]['rel']
}
| 52.895833
| 71
| 0.538007
| 281
| 2,539
| 4.836299
| 0.284698
| 0.286976
| 0.401766
| 0.459161
| 0.746137
| 0.746137
| 0.746137
| 0
| 0
| 0
| 0
| 0.063412
| 0.298149
| 2,539
| 48
| 72
| 52.895833
| 0.699214
| 0
| 0
| 0
| 0
| 0
| 0.54272
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.022727
| false
| 0
| 0.045455
| 0
| 0.136364
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a81a5a5ae81995a1e3770c1a2f82af6316280cb7
| 81
|
py
|
Python
|
pandas_ta/utils/data/__init__.py
|
ryanrussell/pandas-ta
|
720bbcf0196d363d621beeced8fba711990d075d
|
[
"MIT"
] | 2,298
|
2019-02-20T18:38:18.000Z
|
2022-03-31T07:45:50.000Z
|
pandas_ta/utils/data/__init__.py
|
ryanrussell/pandas-ta
|
720bbcf0196d363d621beeced8fba711990d075d
|
[
"MIT"
] | 451
|
2019-02-26T00:50:02.000Z
|
2022-03-31T03:17:39.000Z
|
pandas_ta/utils/data/__init__.py
|
ryanrussell/pandas-ta
|
720bbcf0196d363d621beeced8fba711990d075d
|
[
"MIT"
] | 579
|
2019-03-19T01:53:03.000Z
|
2022-03-31T11:13:50.000Z
|
# -*- coding: utf-8 -*-
from .alphavantage import av
from .yahoofinance import yf
| 27
| 28
| 0.716049
| 11
| 81
| 5.272727
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.148148
| 81
| 3
| 29
| 27
| 0.826087
| 0.259259
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a82a0e8a432884cd1ccba8b19153ecfbbe32a2ac
| 2,815
|
py
|
Python
|
tests/unit/protocol/stacks.py
|
ethanjli/phyllo-python
|
1fc17737951df9c23a9fae72212e3004a78c4da2
|
[
"MIT"
] | null | null | null |
tests/unit/protocol/stacks.py
|
ethanjli/phyllo-python
|
1fc17737951df9c23a9fae72212e3004a78c4da2
|
[
"MIT"
] | null | null | null |
tests/unit/protocol/stacks.py
|
ethanjli/phyllo-python
|
1fc17737951df9c23a9fae72212e3004a78c4da2
|
[
"MIT"
] | null | null | null |
"""Test the protocol.stacks module."""
# Builtins
# Packages
from phylline.links.loopback import TopLoopbackLink
from phylline.pipelines import PipelineBottomCoupler
from phyllo.protocol.application.stacks import make_minimal, make_pubsub
from phyllo.protocol.communication import AutomaticStack
from phyllo.protocol.stacks import make_stack
from phyllo.protocol.transport.stacks import (
make_logical_minimal, make_logical_reduced
)
from phyllo.protocol.transport.stacks import make_stack as make_transport
import pytest
from tests.unit.protocol.transport.stacks import assert_loopback_below
@pytest.mark.parametrize('logical_substack_factory', [
make_logical_minimal,
make_logical_reduced
])
def test_minimal_loopback_coupler(logical_substack_factory):
"""Test for correct echo from send to receive."""
print('Testing document loopback with PipelineBottomCoupler...')
stack_one = make_stack(
transport_stack=make_transport(logical_substack=logical_substack_factory()),
application_stack=make_minimal(), name=' Protocol'
)
stack_two = AutomaticStack(
make_stack(
transport_stack=make_transport(logical_substack=logical_substack_factory()),
application_stack=make_minimal()
),
TopLoopbackLink()
)
coupler = PipelineBottomCoupler(stack_one, stack_two)
print(coupler)
assert_loopback_below(coupler.pipeline_one, (1, 2, 3))
assert_loopback_below(coupler.pipeline_one, {'hello': 'world', 'foo': 'bar'})
assert_loopback_below(
coupler.pipeline_one, (0, 1, 2, True, None, (3, 4), {'foo': 'bar'})
)
assert_loopback_below(coupler.pipeline_one, 12345)
@pytest.mark.parametrize('logical_substack_factory', [
make_logical_minimal,
make_logical_reduced
])
def test_pubsub_loopback_coupler(logical_substack_factory):
"""Test for correct echo from send to receive."""
print('Testing pub-sub loopback with PipelineBottomCoupler...')
stack_one = make_stack(
transport_stack=make_transport(logical_substack=logical_substack_factory()),
application_stack=make_pubsub(), name=' Protocol'
)
stack_two = AutomaticStack(
make_stack(
transport_stack=make_transport(logical_substack=logical_substack_factory()),
application_stack=make_pubsub()
),
TopLoopbackLink()
)
coupler = PipelineBottomCoupler(stack_one, stack_two)
print(coupler)
assert_loopback_below(coupler.pipeline_one, (b'list', (1, 2, 3)))
assert_loopback_below(coupler.pipeline_one, (b'dict', {'hello': 'world', 'foo': 'bar'}))
assert_loopback_below(
coupler.pipeline_one, (b'nested', (0, 1, 2, True, None, (3, 4), {'foo': 'bar'}))
)
assert_loopback_below(coupler.pipeline_one, (b'number', 12345))
| 36.558442
| 92
| 0.731794
| 327
| 2,815
| 6.003058
| 0.217125
| 0.091696
| 0.087112
| 0.10596
| 0.776363
| 0.776363
| 0.760061
| 0.715232
| 0.715232
| 0.673459
| 0
| 0.01104
| 0.16341
| 2,815
| 76
| 93
| 37.039474
| 0.822505
| 0.049378
| 0
| 0.459016
| 0
| 0
| 0.089883
| 0.036104
| 0
| 0
| 0
| 0
| 0.147541
| 1
| 0.032787
| false
| 0
| 0.147541
| 0
| 0.180328
| 0.065574
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b5725468460be57379c07a89c907ca3ab137f256
| 177
|
py
|
Python
|
simclr/modules/__init__.py
|
jesse1029/CCAT-CT-Detection
|
ff1cd1ac3037990728353db13e9df6520df8b505
|
[
"MIT"
] | null | null | null |
simclr/modules/__init__.py
|
jesse1029/CCAT-CT-Detection
|
ff1cd1ac3037990728353db13e9df6520df8b505
|
[
"MIT"
] | null | null | null |
simclr/modules/__init__.py
|
jesse1029/CCAT-CT-Detection
|
ff1cd1ac3037990728353db13e9df6520df8b505
|
[
"MIT"
] | null | null | null |
from .nt_xent import NT_Xent
from .logistic_regression import LogisticRegression
from .lars import LARS
from .gather import GatherLayer
from .STViT import *
from .gmlp import *
| 25.285714
| 51
| 0.819209
| 25
| 177
| 5.68
| 0.48
| 0.084507
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135593
| 177
| 6
| 52
| 29.5
| 0.928105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b5a65ddd8a1a1835fffa881015ad64e5238d0aa2
| 39
|
py
|
Python
|
tests/desugar/funcall/input/test02.py
|
Nakrez/RePy
|
057db55a99eac2c5cb3d622fa1f2e29f6083d8d6
|
[
"MIT"
] | 1
|
2020-11-24T05:24:26.000Z
|
2020-11-24T05:24:26.000Z
|
tests/desugar/funcall/input/test02.py
|
Nakrez/RePy
|
057db55a99eac2c5cb3d622fa1f2e29f6083d8d6
|
[
"MIT"
] | null | null | null |
tests/desugar/funcall/input/test02.py
|
Nakrez/RePy
|
057db55a99eac2c5cb3d622fa1f2e29f6083d8d6
|
[
"MIT"
] | null | null | null |
def fun(a, b):
return 1
fun(1, 2)
| 7.8
| 14
| 0.512821
| 9
| 39
| 2.222222
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0.307692
| 39
| 4
| 15
| 9.75
| 0.62963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
b5accffc6b94477eb53d118dbd662ae3edc6e5f3
| 98
|
py
|
Python
|
konst/string.py
|
yehonatanz/konst
|
4fa5539960a0219817c47e254be8fbc20620d2f8
|
[
"MIT"
] | null | null | null |
konst/string.py
|
yehonatanz/konst
|
4fa5539960a0219817c47e254be8fbc20620d2f8
|
[
"MIT"
] | null | null | null |
konst/string.py
|
yehonatanz/konst
|
4fa5539960a0219817c47e254be8fbc20620d2f8
|
[
"MIT"
] | null | null | null |
from ._common import _verify_attr
def __getattr__(attr):
_verify_attr(attr)
return attr
| 14
| 33
| 0.744898
| 13
| 98
| 4.923077
| 0.615385
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193878
| 98
| 6
| 34
| 16.333333
| 0.810127
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
a9101421ad5aba1578dc1d113949ab9932132a5f
| 47,855
|
py
|
Python
|
parsetab.py
|
alianmohammad/pd-gem5-latest
|
cfcf6aa004c168d6abdfedcd595de4b30f5e88ee
|
[
"BSD-3-Clause"
] | null | null | null |
parsetab.py
|
alianmohammad/pd-gem5-latest
|
cfcf6aa004c168d6abdfedcd595de4b30f5e88ee
|
[
"BSD-3-Clause"
] | null | null | null |
parsetab.py
|
alianmohammad/pd-gem5-latest
|
cfcf6aa004c168d6abdfedcd595de4b30f5e88ee
|
[
"BSD-3-Clause"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = 'D\xccZ\x0b=\xf2\xd6\x89\x1e\xeb\xa3n\xa2z\xd6n'
_lr_action_items = {'PEEK':([179,250,251,256,296,303,325,346,351,358,361,372,374,375,376,378,381,382,],[244,244,-98,-82,-81,-88,-97,-95,-89,-94,-99,-90,-92,-100,-101,-93,-91,-96,]),'TRANS':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[8,8,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,8,-18,-16,-81,-20,8,-19,-21,-13,-8,-15,-12,-9,-11,]),'STAR':([5,11,20,22,61,81,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,174,185,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,227,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,33,-62,-61,-60,128,-139,-138,-115,-107,-104,-137,-106,-110,-142,147,-140,-109,147,147,147,-105,-133,-130,147,241,128,147,-111,-134,-141,147,147,-116,147,147,147,147,147,147,147,147,-117,147,147,33,147,-135,-113,-136,-108,147,-137,147,147,147,-112,-102,-114,147,-103,147,]),'SLASH':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,157,-140,-109,157,157,157,-105,-133,-130,157,157,-111,-134,-141,157,157,-116,157,157,157,157,157,157,157,157,-117,157,157,157,-135,-113,-136,-108,157,-137,157,157,157,-112,-102,-114,157,-103,157,]),'FLOATNUMBER':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,-98,-82,83,83,83,83,-81,83,-88,83,-97,83,-95,-89,-94,-99,83,-90,-92,-100,-101,-93,-91,-96,]),'VOID':([0,1,2,5,7,15,45,56,62,73,120,149,161,172,178,220,229,230,233,235,237,238,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[3,3,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,3,-10,-33,-17,3,-26,3,-27,-28,-14,-82,-41,-36,-38,-40,-35,-37,3,-18,-16,-81,-20,3,-19,-21,-13,-8,-15,-12,-9,-11,]),'GLOBAL':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[4,4,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,4,-18,-16,-81,-20,4,-19,-21,-13,-8,-15,-12,-9,-11,]),'NUMBER':([54,88,89,91,98,103,105,123,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,188,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[84,84,84,84,84,84,84,182,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,260,84,84,-98,-82,84,84,84,84,-81,84,-88,84,-97,84,-95,-89,-94,-99,84,-90,-92,-100,-101,-93,-91,-96,]),',':([5,20,22,32,44,45,46,48,49,55,58,59,60,61,63,64,65,68,75,77,78,81,83,84,87,93,94,96,97,99,100,102,116,120,121,126,127,130,132,135,136,140,142,160,163,164,171,180,181,182,189,191,194,197,199,200,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,243,259,260,261,264,266,269,271,275,282,284,288,306,309,324,328,329,332,333,335,336,341,357,359,362,363,],[-70,-62,-61,51,51,-65,67,71,51,51,51,51,51,-60,51,51,114,119,-80,124,125,129,-139,-138,-115,-107,-104,-137,-106,-110,-142,-140,174,-64,177,51,-51,51,-109,-132,-131,-105,-133,-130,51,51,232,-78,-77,-79,-52,129,-142,265,-111,268,-134,-141,-126,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,-127,51,-56,-54,-55,-135,-113,-136,-108,51,51,318,51,-53,334,345,348,349,352,-112,-102,-114,51,51,367,370,-103,]),'GT':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,155,-140,-109,155,155,155,-105,-133,-130,155,155,-111,-134,-141,155,-129,-116,155,155,-122,-123,-119,-120,-121,-118,-117,-128,155,155,-135,-113,-136,-108,155,-137,155,155,155,-112,-102,-114,155,-103,155,]),'NEW':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,-98,-82,86,86,86,86,-81,86,-88,86,-97,86,-95,-89,-94,-99,86,-90,-92,-100,-101,-93,-91,-96,]),'RIGHTSHIFT':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,158,-140,-109,158,158,158,-105,-133,-130,158,158,-111,-134,-141,158,-129,-116,158,158,158,158,-119,158,158,-118,-117,-128,158,158,-135,-113,-136,-108,158,-137,158,158,158,-112,-102,-114,158,-103,158,]),'CHECK_NEXT_CYCLE':([179,250,251,256,296,303,325,346,351,358,361,372,374,375,376,378,381,382,],[247,247,-98,-82,-81,-88,-97,-95,-89,-94,-99,-90,-92,-100,-101,-93,-91,-96,]),'DOT':([5,20,22,61,83,84,87,93,94,96,97,99,100,102,132,140,199,201,205,264,266,269,271,309,333,335,336,363,],[-70,-62,-61,-60,-139,-138,134,-107,-104,-137,-106,-110,-142,-140,-109,-105,-111,-134,-141,-135,-113,-136,-108,-137,-112,-102,-114,-103,]),'LEFTSHIFT':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,146,-140,-109,146,146,146,-105,-133,-130,146,146,-111,-134,-141,146,-129,-116,146,146,146,146,-119,146,146,-118,-117,-128,146,146,-135,-113,-136,-108,146,-137,146,146,146,-112,-102,-114,146,-103,146,]),'INCR':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,-98,-82,89,89,89,89,-81,89,-88,89,-97,89,-95,-89,-94,-99,89,-90,-92,-100,-101,-93,-91,-96,]),'LE':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,151,-140,-109,151,151,151,-105,-133,-130,151,151,-111,-134,-141,151,-129,-116,151,151,-122,-123,-119,-120,-121,-118,-117,-128,151,151,-135,-113,-136,-108,151,-137,151,151,151,-112,-102,-114,151,-103,151,]),'SEMI':([5,20,22,32,34,40,50,52,55,61,68,75,76,77,83,84,87,93,94,96,97,99,100,101,102,104,126,130,132,135,136,140,142,160,162,163,164,168,180,181,182,183,187,193,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,221,222,254,264,266,269,271,275,282,295,312,323,326,331,333,335,336,341,347,355,363,368,380,],[-70,-62,-61,-2,56,62,73,-74,-2,-60,117,-80,-73,-76,-139,-138,-115,-107,-104,-137,-106,-110,-142,149,-140,161,-2,-2,-109,-132,-131,-105,-133,-130,220,-2,-2,229,-78,-77,-79,-75,258,263,-111,-134,-141,-126,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,-127,273,274,303,-135,-113,-136,-108,-2,-2,325,337,344,346,351,-112,-102,-114,-2,358,364,-103,374,382,]),'STATIC_CAST':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,-98,-82,90,90,90,90,-81,90,-88,90,-97,90,-95,-89,-94,-99,90,-90,-92,-100,-101,-93,-91,-96,]),')':([5,20,22,44,45,49,52,53,57,58,59,60,61,63,64,66,72,75,76,77,78,79,80,81,82,83,84,87,93,94,96,97,99,100,102,106,107,108,109,111,112,113,116,120,125,127,129,132,135,136,138,140,142,143,160,180,181,182,183,184,186,189,190,191,192,194,195,196,197,199,201,202,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,240,241,242,243,259,260,261,264,265,266,267,269,270,271,288,293,297,306,307,308,309,310,311,321,327,330,333,335,336,353,357,359,360,363,365,373,377,],[-70,-62,-61,-2,-65,-2,-74,-2,-2,-2,110,-2,-60,-2,-2,115,122,-80,-73,-76,-49,126,-50,-58,130,-139,-138,-115,-107,-104,-137,-106,-110,-142,-140,163,164,165,166,168,169,170,173,-64,-2,-51,-2,-109,-132,-131,201,-105,-133,-2,-130,-78,-77,-79,-75,-48,-50,-52,-57,-58,-59,-142,264,-87,-86,-111,-134,269,271,-141,-126,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,-127,-71,-72,292,-2,-56,-54,-55,-135,-2,-113,-2,-136,-2,-108,-2,323,326,-53,-85,333,-137,335,336,342,347,350,-112,-102,-114,363,-2,366,368,-103,371,379,380,]),'(':([4,5,8,9,10,17,18,19,23,24,26,32,35,54,85,88,89,90,91,92,98,100,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,199,203,244,245,247,248,249,250,251,252,253,255,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[28,-70,29,30,31,36,37,38,41,42,43,53,57,91,131,91,91,137,91,139,91,143,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,267,270,294,91,297,298,299,91,-98,301,302,305,-82,91,91,91,91,-81,91,-88,91,-97,91,-95,-89,-94,-99,91,-90,-92,-100,-101,-93,-91,-96,]),'IS_INVALID':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,-98,-82,92,92,92,92,-81,92,-88,92,-97,92,-95,-89,-94,-99,92,-90,-92,-100,-101,-93,-91,-96,]),'NE':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,148,-140,-109,148,148,148,-105,-133,-130,148,148,-111,-134,-141,148,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,148,148,-135,-113,-136,-108,148,-137,148,148,148,-112,-102,-114,148,-103,148,]),'OUT_PORT':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[9,9,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,9,-18,-16,-81,-20,9,-19,-21,-13,-8,-15,-12,-9,-11,]),'ENQUEUE':([179,250,251,256,296,303,325,346,351,358,361,372,374,375,376,378,381,382,],[249,249,-98,-82,-81,-88,-97,-95,-89,-94,-99,-90,-92,-100,-101,-93,-91,-96,]),'LT':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,154,-140,-109,154,154,154,-105,-133,-130,154,154,-111,-134,-141,154,-129,-116,154,154,-122,-123,-119,-120,-121,-118,-117,-128,154,154,-135,-113,-136,-108,154,-137,154,154,154,-112,-102,-114,154,-103,154,]),'DOUBLE_COLON':([5,20,22,61,95,100,],[-70,39,-61,-60,141,-61,]),'PLUS':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,156,-140,-109,156,156,156,-105,-133,-130,156,156,-111,-134,-141,156,156,-116,156,156,156,156,-119,156,156,-118,-117,156,156,156,-135,-113,-136,-108,156,-137,156,156,156,-112,-102,-114,156,-103,156,]),'DECR':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,-98,-82,88,88,88,88,-81,88,-88,88,-97,88,-95,-89,-94,-99,88,-90,-92,-100,-101,-93,-91,-96,]),'ACTION':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[10,10,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,10,-18,-16,-81,-20,10,-19,-21,-13,-8,-15,-12,-9,-11,]),':':([5,100,110,166,340,],[-70,144,167,224,144,]),'=':([5,74,],[-70,123,]),'ASSIGN':([5,20,22,32,55,61,83,84,87,93,94,96,97,99,100,102,127,132,135,136,140,142,160,189,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,282,333,335,336,363,],[-70,-62,-61,54,105,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,-140,188,-109,-132,-131,-105,-133,-130,262,-111,-134,-141,-126,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,-127,304,-135,-113,-136,-108,54,-112,-102,-114,-103,]),'$end':([0,1,2,5,6,7,12,13,15,25,27,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,289,291,296,313,317,319,322,339,343,344,354,356,],[-2,-2,-29,-70,0,-34,-5,-3,-39,-1,-4,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,-18,-16,-81,-20,-19,-21,-13,-8,-15,-12,-9,-11,]),'IDENT':([0,1,2,3,5,7,11,15,16,20,22,28,29,30,31,33,36,37,38,39,41,42,43,45,47,51,53,54,56,57,61,62,67,68,71,73,81,86,88,89,91,95,98,100,103,105,114,117,119,120,123,124,125,128,129,131,133,134,137,139,141,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,167,172,173,174,177,178,179,185,220,223,224,225,227,229,230,231,232,233,235,237,238,239,245,250,251,256,257,258,263,265,267,268,270,272,273,274,277,281,286,289,291,292,294,296,298,299,301,302,303,304,305,313,315,317,318,319,322,325,334,337,339,343,344,345,346,348,349,351,354,356,358,361,364,367,372,374,375,376,378,381,382,],[5,5,-29,-63,-70,-34,5,-39,5,-62,-61,5,5,5,5,5,5,5,5,5,5,5,5,-65,5,5,5,5,-6,5,-60,-7,5,5,5,-30,5,5,5,5,5,5,5,-61,5,5,5,5,5,-64,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,-32,5,5,5,5,5,5,5,5,5,5,-31,5,5,5,5,5,-10,5,5,-33,5,5,5,5,-17,5,5,5,-26,5,-27,-28,5,5,5,-98,-82,-41,-36,-38,5,5,5,5,-40,-35,-37,5,5,5,-18,-16,5,5,-81,5,5,5,5,-88,5,5,-20,5,-19,5,-21,5,-97,5,-44,-8,-15,-12,5,-95,5,5,-89,-9,-11,-94,-99,-47,5,-90,-92,-100,-101,-93,-91,-96,]),'PROTOCOL':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[14,14,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,14,-18,-16,-81,-20,14,-19,-21,-13,-8,-15,-12,-9,-11,]),'STRING':([14,21,51,54,88,89,91,98,103,105,123,124,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,188,245,250,251,256,262,265,267,268,270,296,302,303,304,325,334,346,351,352,358,361,367,370,372,374,375,376,378,381,382,],[34,40,75,96,96,96,96,96,96,96,181,75,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,259,96,96,-98,-82,306,96,96,309,96,-81,96,-88,96,-97,96,-95,-89,362,-94,-99,96,377,-90,-92,-100,-101,-93,-91,-96,]),'STALL_AND_WAIT':([179,250,251,256,296,303,325,346,351,358,361,372,374,375,376,378,381,382,],[252,252,-98,-82,-81,-88,-97,-95,-89,-94,-99,-90,-92,-100,-101,-93,-91,-96,]),'OOD':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,-98,-82,99,99,99,99,-81,99,-88,99,-97,99,-95,-89,-94,-99,99,-90,-92,-100,-101,-93,-91,-96,]),'ENUM':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[17,17,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,17,-18,-16,-81,-20,17,-19,-21,-13,-8,-15,-12,-9,-11,]),'ELSE':([256,296,361,],[-82,-81,369,]),'MACHINE':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[18,18,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,18,-18,-16,-81,-20,18,-19,-21,-13,-8,-15,-12,-9,-11,]),'GE':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,152,-140,-109,152,152,152,-105,-133,-130,152,152,-111,-134,-141,152,-129,-116,152,152,-122,-123,-119,-120,-121,-118,-117,-128,152,152,-135,-113,-136,-108,152,-137,152,152,152,-112,-102,-114,152,-103,152,]),'EXTERN_TYPE':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[19,19,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,19,-18,-16,-81,-20,19,-19,-21,-13,-8,-15,-12,-9,-11,]),'[':([5,20,22,61,83,84,87,93,94,96,97,99,100,102,132,140,199,201,205,264,266,269,271,309,333,335,336,363,],[-70,-62,-61,-60,-139,-138,133,-107,-104,-137,-106,-110,-142,-140,-109,-105,-111,-134,-141,-135,-113,-136,-108,-137,-112,-102,-114,-103,]),'INCLUDE':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[21,21,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,21,-18,-16,-81,-20,21,-19,-21,-13,-8,-15,-12,-9,-11,]),']':([5,20,22,61,83,84,87,93,94,96,97,99,100,102,132,133,135,136,140,142,160,196,197,198,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,264,265,266,269,271,307,333,335,336,363,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,-140,-109,-2,-132,-131,-105,-133,-130,-87,-86,266,-111,-134,-141,-126,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,-127,-135,-2,-113,-136,-108,-85,-112,-102,-114,-103,]),'IF':([179,250,251,256,296,303,325,346,351,358,361,369,372,374,375,376,378,381,382,],[253,253,-98,-82,-81,-88,-97,-95,-89,-94,-99,253,-90,-92,-100,-101,-93,-91,-96,]),'AND':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,145,-140,-109,145,145,145,-105,-133,-130,145,145,-111,-134,-141,-126,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,-127,145,-135,-113,-136,-108,145,-137,145,145,145,-112,-102,-114,145,-103,145,]),'DASH':([5,20,22,54,61,83,84,87,88,89,91,93,94,96,97,98,99,100,101,102,103,105,132,133,135,136,138,140,142,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,160,162,179,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,245,250,251,254,256,264,265,266,267,268,269,270,271,295,296,302,303,304,309,310,325,330,331,333,334,335,336,346,351,353,358,361,363,367,372,373,374,375,376,378,381,382,],[-70,-62,-61,98,-60,-139,-138,-115,98,98,98,-107,-104,-137,-106,98,-110,-142,153,-140,98,98,-109,98,153,153,153,-105,-133,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,-130,153,98,153,-111,-134,-141,153,153,-116,153,153,153,153,-119,153,153,-118,-117,153,153,98,98,-98,153,-82,-135,98,-113,98,98,-136,98,-108,153,-81,98,-88,98,-137,153,-97,153,153,-112,98,-102,-114,-95,-89,153,-94,-99,-103,98,-90,153,-92,-100,-101,-93,-91,-96,]),'RETURN':([179,250,251,256,296,303,325,346,351,358,361,372,374,375,376,378,381,382,],[245,245,-98,-82,-81,-88,-97,-95,-89,-94,-99,-90,-92,-100,-101,-93,-91,-96,]),'EQ':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,150,-140,-109,150,150,150,-105,-133,-130,150,150,-111,-134,-141,150,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,150,150,-135,-113,-136,-108,150,-137,150,150,150,-112,-102,-114,150,-103,150,]),'STRUCT':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[23,23,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,23,-18,-16,-81,-20,23,-19,-21,-13,-8,-15,-12,-9,-11,]),'CHECK_STOP_SLOTS':([179,250,251,256,296,303,325,346,351,358,361,372,374,375,376,378,381,382,],[255,255,-98,-82,-81,-88,-97,-95,-89,-94,-99,-90,-92,-100,-101,-93,-91,-96,]),'STATE_DECL':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[24,24,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,24,-18,-16,-81,-20,24,-19,-21,-13,-8,-15,-12,-9,-11,]),'CHECK_ALLOCATE':([179,250,251,256,296,303,325,346,351,358,361,372,374,375,376,378,381,382,],[248,248,-98,-82,-81,-88,-97,-95,-89,-94,-99,-90,-92,-100,-101,-93,-91,-96,]),'LIT_BOOL':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,188,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,261,102,102,-98,-82,102,102,102,102,-81,102,-88,102,-97,102,-95,-89,-94,-99,102,-90,-92,-100,-101,-93,-91,-96,]),'IS_VALID':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,-98,-82,85,85,85,85,-81,85,-88,85,-97,85,-95,-89,-94,-99,85,-90,-92,-100,-101,-93,-91,-96,]),'NOT':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,251,256,265,267,268,270,296,302,303,304,325,334,346,351,358,361,367,372,374,375,376,378,381,382,],[103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,-98,-82,103,103,103,103,-81,103,-88,103,-97,103,-95,-89,-94,-99,103,-90,-92,-100,-101,-93,-91,-96,]),'{':([5,29,37,45,52,67,73,75,76,77,115,120,122,126,149,161,163,165,167,169,170,173,180,181,182,183,187,220,221,224,225,226,228,239,279,280,292,322,342,350,366,369,371,379,],[-70,47,47,-65,-74,47,-30,-80,-73,-76,172,-64,179,-2,-32,-31,-2,223,-2,230,231,47,-78,-77,-79,-75,179,-33,179,-2,-2,281,-23,47,315,-22,47,47,179,179,179,179,179,179,]),'}':([1,2,5,7,12,13,15,27,45,47,56,62,68,69,70,73,117,118,119,120,149,161,172,175,176,178,179,220,223,229,230,231,233,234,235,236,237,238,239,246,250,251,256,257,258,263,272,273,274,276,277,278,281,283,285,286,287,289,290,291,296,300,303,313,314,315,316,317,319,320,322,325,337,338,339,343,344,346,351,354,356,358,361,364,372,374,375,376,378,381,382,],[-2,-29,-70,-34,-5,-3,-39,-4,-65,-2,-6,-7,-2,120,-69,-30,-2,-68,-2,-64,-32,-31,-2,-66,-67,-10,256,-33,-2,-17,-2,-2,-26,289,-2,-25,-27,-28,-14,296,-84,-98,-82,-41,-36,-38,-40,-35,-37,313,-2,-43,-2,317,319,-2,-46,-18,-24,-16,-81,-83,-88,-20,-42,-2,339,-19,-21,-45,-13,-97,-44,354,-8,-15,-12,-95,-89,-9,-11,-94,-99,-47,-90,-92,-100,-101,-93,-91,-96,]),'OR':([5,20,22,61,83,84,87,93,94,96,97,99,100,101,102,132,135,136,138,140,142,160,162,197,199,201,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,264,266,269,271,295,309,310,330,331,333,335,336,353,363,373,],[-70,-62,-61,-60,-139,-138,-115,-107,-104,-137,-106,-110,-142,159,-140,-109,159,159,159,-105,-133,-130,159,159,-111,-134,-141,-126,-129,-116,-125,-124,-122,-123,-119,-120,-121,-118,-117,-128,-127,159,-135,-113,-136,-108,159,-137,159,159,159,-112,-102,-114,159,-103,159,]),'IN_PORT':([0,1,2,5,7,15,45,56,62,73,120,149,161,178,220,229,239,256,257,258,263,272,273,274,281,289,291,296,313,315,317,319,322,339,343,344,354,356,],[26,26,-29,-70,-34,-39,-65,-6,-7,-30,-64,-32,-31,-10,-33,-17,-14,-82,-41,-36,-38,-40,-35,-37,26,-18,-16,-81,-20,26,-19,-21,-13,-8,-15,-12,-9,-11,]),}
_lr_action = { }
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = { }
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'decl':([0,1,281,315,],[1,1,1,1,]),'obj_decl':([0,1,167,172,224,225,230,235,281,315,],[2,2,225,233,225,225,233,233,2,2,]),'statements':([122,187,221,342,350,366,369,371,379,],[178,257,272,356,361,372,375,378,381,]),'type_enums':([223,277,],[276,314,]),'pairsx':([51,124,],[76,183,]),'type_members':([172,230,235,],[234,283,290,]),'ident_or_star':([174,],[242,]),'statements_inner':([179,250,],[246,300,]),'enumeration':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,265,267,268,270,302,304,318,334,367,],[93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,341,93,93,]),'file':([0,],[6,]),'type_state':([231,286,],[286,286,]),'type_member':([172,230,235,],[235,235,235,]),'aexpr':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,265,267,268,270,302,304,334,367,],[87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,]),'param':([53,57,125,],[78,78,78,]),'literal':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,265,267,268,270,302,304,334,367,],[97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,]),'params':([53,57,125,],[79,106,184,]),'statement':([179,250,],[250,250,]),'var':([54,88,89,91,98,103,105,131,133,139,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,177,179,232,245,250,265,267,268,270,294,298,299,301,302,304,305,334,349,367,],[94,94,94,94,94,94,94,195,94,202,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,243,94,288,94,94,94,94,94,94,324,327,328,329,94,94,332,94,360,94,]),'if_statement':([179,250,369,],[251,251,376,]),'type':([0,1,28,36,38,41,42,53,54,57,71,86,88,89,91,98,103,105,114,125,129,133,137,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,167,172,179,224,225,230,235,245,250,265,267,268,270,281,302,304,315,334,345,348,367,],[11,11,44,58,60,63,64,81,95,81,121,132,95,95,95,95,95,95,171,185,191,95,200,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,227,11,95,227,227,11,11,95,95,95,95,95,95,11,95,95,11,95,357,359,95,]),'empty':([0,1,32,44,47,49,53,55,57,58,59,60,63,64,68,117,119,125,126,129,130,133,143,163,164,167,172,223,224,225,230,231,235,243,265,267,270,275,277,281,282,286,288,315,341,357,],[12,12,52,52,70,52,80,52,80,52,52,52,52,52,70,70,70,186,52,192,52,196,196,52,52,228,236,278,228,228,236,287,236,52,196,196,196,52,278,12,52,287,52,12,52,52,]),'declsx':([0,1,281,315,],[13,27,13,13,]),'func_decl':([0,1,172,230,235,281,315,],[7,7,237,237,237,7,7,]),'func_def':([0,1,172,230,235,281,315,],[15,15,238,238,238,15,15,]),'idents':([29,37,67,173,239,292,322,],[46,59,116,239,291,322,343,]),'void':([0,1,172,230,235,281,315,],[16,16,16,16,16,16,16,]),'identx':([47,68,117,119,],[69,118,175,176,]),'type_states':([231,286,],[285,320,]),'pair':([51,124,],[77,77,]),'type_enum':([223,277,],[277,277,]),'typestr':([0,1,28,36,38,41,42,53,54,57,71,86,88,89,91,98,103,105,114,125,129,133,137,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,167,172,179,224,225,230,235,245,250,265,267,268,270,281,302,304,315,334,345,348,367,],[20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,]),'types':([53,57,129,],[82,107,190,]),'pairs':([32,44,49,55,58,59,60,63,64,126,130,163,164,243,275,282,288,341,357,],[50,66,72,104,108,109,111,112,113,187,193,221,222,293,312,50,321,355,365,]),'ident':([0,1,11,16,28,29,30,31,33,36,37,38,39,41,42,43,47,51,53,54,57,67,68,71,81,86,88,89,91,95,98,103,105,114,117,119,123,124,125,128,129,131,133,134,137,139,141,143,144,145,146,147,148,150,151,152,153,154,155,156,157,158,159,167,172,173,174,177,179,185,223,224,225,227,230,231,232,235,239,245,250,265,267,268,270,277,281,286,292,294,298,299,301,302,304,305,315,318,322,334,345,348,349,367,],[22,22,32,35,22,45,48,49,55,22,45,22,61,22,22,65,68,74,22,100,22,45,68,22,127,22,100,100,100,140,100,100,100,22,68,68,180,74,22,189,22,194,100,199,22,194,203,100,205,100,100,100,100,100,100,100,100,100,100,100,100,100,100,22,22,45,240,194,100,127,275,22,22,282,22,284,194,22,45,100,100,100,100,100,100,275,22,284,45,194,194,194,194,100,100,194,22,340,45,100,22,22,194,100,]),'obj_decls':([167,224,225,],[226,279,280,]),'expr':([54,88,89,91,98,103,105,133,143,145,146,147,148,150,151,152,153,154,155,156,157,158,159,179,245,250,265,267,268,270,302,304,334,367,],[101,135,136,138,142,160,162,197,197,206,207,208,209,210,211,212,213,214,215,216,217,218,219,254,295,254,197,197,310,197,330,331,353,373,]),'exprs':([133,143,265,267,270,],[198,204,307,308,311,]),'decls':([0,281,315,],[25,316,338,]),}
_lr_goto = { }
for _k, _v in _lr_goto_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_goto: _lr_goto[_x] = { }
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> file","S'",1,None,None,None),
('file -> decls','file',1,'p_file','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',219),
('empty -> <empty>','empty',0,'p_empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',223),
('decls -> declsx','decls',1,'p_decls','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',226),
('declsx -> decl declsx','declsx',2,'p_declsx__list','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',230),
('declsx -> empty','declsx',1,'p_declsx__none','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',240),
('decl -> PROTOCOL STRING SEMI','decl',3,'p_decl__protocol','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',244),
('decl -> INCLUDE STRING SEMI','decl',3,'p_decl__include','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',253),
('decl -> MACHINE ( idents ) : obj_decls { decls }','decl',9,'p_decl__machine0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',262),
('decl -> MACHINE ( idents pairs ) : obj_decls { decls }','decl',10,'p_decl__machine1','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',266),
('decl -> ACTION ( ident pairs ) statements','decl',6,'p_decl__action','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',270),
('decl -> IN_PORT ( ident , type , var pairs ) statements','decl',10,'p_decl__in_port','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',274),
('decl -> OUT_PORT ( ident , type , var pairs ) SEMI','decl',10,'p_decl__out_port','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',278),
('decl -> TRANS ( idents , idents , ident_or_star ) idents','decl',9,'p_decl__trans0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',282),
('decl -> TRANS ( idents , idents ) idents','decl',7,'p_decl__trans1','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',286),
('decl -> TRANS ( idents , idents , ident_or_star ) idents idents','decl',10,'p_decl__trans2','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',290),
('decl -> TRANS ( idents , idents ) idents idents','decl',8,'p_decl__trans3','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',294),
('decl -> EXTERN_TYPE ( type pairs ) SEMI','decl',6,'p_decl__extern0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',298),
('decl -> GLOBAL ( type pairs ) { type_members }','decl',8,'p_decl__global','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',303),
('decl -> STRUCT ( type pairs ) { type_members }','decl',8,'p_decl__struct','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',308),
('decl -> ENUM ( type pairs ) { type_enums }','decl',8,'p_decl__enum','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',312),
('decl -> STATE_DECL ( type pairs ) { type_states }','decl',8,'p_decl__state_decl','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',317),
('obj_decls -> obj_decl obj_decls','obj_decls',2,'p_obj_decls__list','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',324),
('obj_decls -> empty','obj_decls',1,'p_obj_decls__empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',328),
('type_members -> type_member type_members','type_members',2,'p_type_members__list','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',332),
('type_members -> empty','type_members',1,'p_type_members__empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',336),
('type_member -> obj_decl','type_member',1,'p_type_member__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',340),
('type_member -> func_decl','type_member',1,'p_type_member__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',341),
('type_member -> func_def','type_member',1,'p_type_member__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',342),
('decl -> obj_decl','decl',1,'p_decl__obj_decl','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',347),
('obj_decl -> type ident pairs SEMI','obj_decl',4,'p_obj_decl__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',351),
('obj_decl -> type STAR ident pairs SEMI','obj_decl',5,'p_obj_decl__1','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',355),
('obj_decl -> type ident ASSIGN expr SEMI','obj_decl',5,'p_obj_decl__2','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',359),
('obj_decl -> type STAR ident ASSIGN expr SEMI','obj_decl',6,'p_obj_decl__3','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',364),
('decl -> func_decl','decl',1,'p_decl__func_decl','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',370),
('func_decl -> void ident ( params ) pairs SEMI','func_decl',7,'p_func_decl__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',374),
('func_decl -> type ident ( params ) pairs SEMI','func_decl',7,'p_func_decl__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',375),
('func_decl -> void ident ( types ) pairs SEMI','func_decl',7,'p_func_decl__1','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',379),
('func_decl -> type ident ( types ) pairs SEMI','func_decl',7,'p_func_decl__1','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',380),
('decl -> func_def','decl',1,'p_decl__func_def','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',384),
('func_def -> void ident ( params ) pairs statements','func_def',7,'p_func_def__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',388),
('func_def -> type ident ( params ) pairs statements','func_def',7,'p_func_def__0','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',389),
('type_enums -> type_enum type_enums','type_enums',2,'p_type_enums__list','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',394),
('type_enums -> empty','type_enums',1,'p_type_enums__empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',398),
('type_enum -> ident pairs SEMI','type_enum',3,'p_type_enum','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',402),
('type_states -> type_state type_states','type_states',2,'p_type_states__list','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',407),
('type_states -> empty','type_states',1,'p_type_states__empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',411),
('type_state -> ident , enumeration pairs SEMI','type_state',5,'p_type_state','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',415),
('params -> param , params','params',3,'p_params__many','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',420),
('params -> param','params',1,'p_params__one','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',424),
('params -> empty','params',1,'p_params__none','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',428),
('param -> type ident','param',2,'p_param','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',432),
('param -> type STAR ident','param',3,'p_param__pointer','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',436),
('param -> type STAR ident ASSIGN STRING','param',5,'p_param__pointer_default','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',440),
('param -> type ident ASSIGN NUMBER','param',4,'p_param__default_number','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',444),
('param -> type ident ASSIGN LIT_BOOL','param',4,'p_param__default_bool','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',448),
('param -> type ident ASSIGN STRING','param',4,'p_param__default_string','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',452),
('types -> type , types','types',3,'p_types__multiple','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',457),
('types -> type','types',1,'p_types__one','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',461),
('types -> empty','types',1,'p_types__empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',465),
('typestr -> typestr DOUBLE_COLON ident','typestr',3,'p_typestr__multi','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',469),
('typestr -> ident','typestr',1,'p_typestr__single','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',473),
('type -> typestr','type',1,'p_type__one','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',477),
('void -> VOID','void',1,'p_void','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',481),
('idents -> { identx }','idents',3,'p_idents__braced','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',486),
('idents -> ident','idents',1,'p_idents__bare','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',490),
('identx -> ident SEMI identx','identx',3,'p_identx__multiple_1','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',494),
('identx -> ident , identx','identx',3,'p_identx__multiple_1','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',495),
('identx -> ident identx','identx',2,'p_identx__multiple_2','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',499),
('identx -> empty','identx',1,'p_identx__single','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',503),
('ident -> IDENT','ident',1,'p_ident','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',507),
('ident_or_star -> ident','ident_or_star',1,'p_ident_or_star','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',511),
('ident_or_star -> STAR','ident_or_star',1,'p_ident_or_star','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',512),
('pairs -> , pairsx','pairs',2,'p_pairs__list','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',517),
('pairs -> empty','pairs',1,'p_pairs__empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',521),
('pairsx -> pair , pairsx','pairsx',3,'p_pairsx__many','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',525),
('pairsx -> pair','pairsx',1,'p_pairsx__one','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',530),
('pair -> ident = STRING','pair',3,'p_pair__assign','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',535),
('pair -> ident = ident','pair',3,'p_pair__assign','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',536),
('pair -> ident = NUMBER','pair',3,'p_pair__assign','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',537),
('pair -> STRING','pair',1,'p_pair__literal','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',541),
('statements -> { statements_inner }','statements',3,'p_statements__inner','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',546),
('statements -> { }','statements',2,'p_statements__none','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',550),
('statements_inner -> statement statements_inner','statements_inner',2,'p_statements_inner__many','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',554),
('statements_inner -> statement','statements_inner',1,'p_statements_inner__one','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',558),
('exprs -> expr , exprs','exprs',3,'p_exprs__multiple','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',562),
('exprs -> expr','exprs',1,'p_exprs__one','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',566),
('exprs -> empty','exprs',1,'p_exprs__empty','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',570),
('statement -> expr SEMI','statement',2,'p_statement__expression','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',574),
('statement -> expr ASSIGN expr SEMI','statement',4,'p_statement__assign','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',578),
('statement -> ENQUEUE ( var , type ) statements','statement',7,'p_statement__enqueue','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',582),
('statement -> ENQUEUE ( var , type , expr ) statements','statement',9,'p_statement__enqueue_latency','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',586),
('statement -> STALL_AND_WAIT ( var , var ) SEMI','statement',7,'p_statement__stall_and_wait','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',590),
('statement -> PEEK ( var , type pairs ) statements','statement',8,'p_statement__peek','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',594),
('statement -> CHECK_ALLOCATE ( var ) SEMI','statement',5,'p_statement__check_allocate','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',598),
('statement -> CHECK_NEXT_CYCLE ( ) SEMI','statement',4,'p_statement__check_next_cycle','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',602),
('statement -> CHECK_STOP_SLOTS ( var , STRING , STRING ) SEMI','statement',9,'p_statement__check_stop','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',606),
('statement -> RETURN expr SEMI','statement',3,'p_statement__return','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',610),
('statement -> if_statement','statement',1,'p_statement__if','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',614),
('if_statement -> IF ( expr ) statements','if_statement',5,'p_if_statement__if','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',618),
('if_statement -> IF ( expr ) statements ELSE statements','if_statement',7,'p_if_statement__if_else','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',622),
('if_statement -> IF ( expr ) statements ELSE if_statement','if_statement',7,'p_statement__if_else_if','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',626),
('aexpr -> STATIC_CAST ( type , expr )','aexpr',6,'p_expr__static_cast','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',631),
('aexpr -> STATIC_CAST ( type , STRING , expr )','aexpr',8,'p_expr__static_cast_ptr','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',635),
('aexpr -> var','aexpr',1,'p_expr__var','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',639),
('aexpr -> type ident','aexpr',2,'p_expr__localvar','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',643),
('aexpr -> literal','aexpr',1,'p_expr__literal','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',647),
('aexpr -> enumeration','aexpr',1,'p_expr__enumeration','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',651),
('aexpr -> ident ( exprs )','aexpr',4,'p_expr__func_call','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',655),
('aexpr -> NEW type','aexpr',2,'p_expr__new','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',659),
('aexpr -> OOD','aexpr',1,'p_expr__null','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',663),
('aexpr -> aexpr DOT ident','aexpr',3,'p_expr__member','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',667),
('aexpr -> aexpr DOT ident ( exprs )','aexpr',6,'p_expr__member_method_call','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',671),
('aexpr -> aexpr [ exprs ]','aexpr',4,'p_expr__member_method_call_lookup','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',675),
('aexpr -> type DOUBLE_COLON ident ( exprs )','aexpr',6,'p_expr__class_method_call','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',679),
('expr -> aexpr','expr',1,'p_expr__aexpr','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',683),
('expr -> expr STAR expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',687),
('expr -> expr SLASH expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',688),
('expr -> expr PLUS expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',689),
('expr -> expr DASH expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',690),
('expr -> expr LT expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',691),
('expr -> expr GT expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',692),
('expr -> expr LE expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',693),
('expr -> expr GE expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',694),
('expr -> expr EQ expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',695),
('expr -> expr NE expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',696),
('expr -> expr AND expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',697),
('expr -> expr OR expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',698),
('expr -> expr RIGHTSHIFT expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',699),
('expr -> expr LEFTSHIFT expr','expr',3,'p_expr__binary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',700),
('expr -> NOT expr','expr',2,'p_expr__unary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',705),
('expr -> INCR expr','expr',2,'p_expr__unary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',706),
('expr -> DECR expr','expr',2,'p_expr__unary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',707),
('expr -> DASH expr','expr',2,'p_expr__unary_op','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',708),
('aexpr -> ( expr )','aexpr',3,'p_expr__parens','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',712),
('aexpr -> IS_VALID ( var )','aexpr',4,'p_expr__is_valid_ptr','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',716),
('aexpr -> IS_INVALID ( var )','aexpr',4,'p_expr__is_invalid_ptr','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',720),
('literal -> STRING','literal',1,'p_literal__string','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',724),
('literal -> NUMBER','literal',1,'p_literal__number','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',728),
('literal -> FLOATNUMBER','literal',1,'p_literal__float','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',732),
('literal -> LIT_BOOL','literal',1,'p_literal__bool','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',736),
('enumeration -> ident : ident','enumeration',3,'p_enumeration','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',740),
('var -> ident','var',1,'p_var','/users/alian/simulators/pdgem5/src/mem/slicc/parser.py',744),
]
| 278.226744
| 24,276
| 0.677233
| 10,217
| 47,855
| 3.104238
| 0.064109
| 0.044772
| 0.089545
| 0.116408
| 0.653771
| 0.628831
| 0.6084
| 0.590301
| 0.572897
| 0.505108
| 0
| 0.406537
| 0.024971
| 47,855
| 171
| 24,277
| 279.853801
| 0.273189
| 0.001296
| 0
| 0.012346
| 1
| 0.006173
| 0.326414
| 0.171692
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a922bc9f5545d88cdf78f5c02e79eda250c3f954
| 148
|
py
|
Python
|
__init__.py
|
OctopusRice/LineNet
|
a03ce3bf741dc497ae6bc680cd779128bda1a34b
|
[
"BSD-3-Clause"
] | 1
|
2020-12-03T03:07:15.000Z
|
2020-12-03T03:07:15.000Z
|
__init__.py
|
OctopusRice/LineNet
|
a03ce3bf741dc497ae6bc680cd779128bda1a34b
|
[
"BSD-3-Clause"
] | 1
|
2019-08-23T09:27:33.000Z
|
2019-08-29T01:46:12.000Z
|
__init__.py
|
OctopusRice/LineNet
|
a03ce3bf741dc497ae6bc680cd779128bda1a34b
|
[
"BSD-3-Clause"
] | null | null | null |
from .core.detectors import CornerNet, LineNet, CornerNet_Squeeze, CornerNet_Saccade, CornerNet_ifp_Saccade
from .core.vis_utils import draw_bboxes
| 49.333333
| 107
| 0.864865
| 20
| 148
| 6.1
| 0.65
| 0.131148
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 148
| 2
| 108
| 74
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a9501e96c71c0c09ec21e0013e9daf2680f028c8
| 2,949
|
py
|
Python
|
test/test_darts.py
|
jiang7369/darts-clone-python
|
24a38402a6e0d9afb89be1ec3f979c6d4179d324
|
[
"Apache-2.0"
] | 15
|
2019-07-24T01:27:43.000Z
|
2022-03-18T06:39:32.000Z
|
test/test_darts.py
|
jiang7369/darts-clone-python
|
24a38402a6e0d9afb89be1ec3f979c6d4179d324
|
[
"Apache-2.0"
] | 9
|
2019-09-01T12:40:11.000Z
|
2020-03-24T17:07:37.000Z
|
test/test_darts.py
|
jiang7369/darts-clone-python
|
24a38402a6e0d9afb89be1ec3f979c6d4179d324
|
[
"Apache-2.0"
] | 6
|
2019-07-24T01:27:53.000Z
|
2021-04-10T10:28:20.000Z
|
import tempfile
import unittest
import pickle
from dartsclone import DoubleArray
class DoubleArrayTest(unittest.TestCase):
"""test class of double array
"""
def test_darts_no_values(self):
keys = ['test', 'テスト', 'テストケース']
darts = DoubleArray()
darts.build(sorted([key.encode() for key in keys]))
self.assertEqual(1, darts.exact_match_search('テスト'.encode(), pair_type=False))
self.assertEqual(0, darts.common_prefix_search('testcase'.encode(), pair_type=False)[0])
self.assertEqual(0, darts.exact_match_search('test'.encode(), pair_type=False))
self.assertEqual(2, darts.common_prefix_search('テストケース'.encode(), pair_type=False)[1])
def test_darts_with_values(self):
keys = ['test', 'テスト', 'テストケース']
darts = DoubleArray()
darts.build(sorted([key.encode() for key in keys]), values=[3, 5, 1])
self.assertEqual(5, darts.exact_match_search('テスト'.encode(), pair_type=False))
self.assertEqual(3, darts.common_prefix_search('testcase'.encode(), pair_type=False)[0])
self.assertEqual(1, darts.exact_match_search('テストケース'.encode(), pair_type=False))
self.assertEqual(1, darts.common_prefix_search('テストケース'.encode(), pair_type=False)[1])
def test_darts_save(self):
keys = ['test', 'テスト', 'テストケース']
darts = DoubleArray()
darts.build(sorted([key.encode() for key in keys]), values=[3, 5, 1])
with tempfile.NamedTemporaryFile('wb') as output_file:
darts.save(output_file.name)
output_file.flush()
darts.clear()
darts.open(output_file.name)
self.assertEqual(5, darts.exact_match_search('テスト'.encode(), pair_type=False))
self.assertEqual(3, darts.common_prefix_search('testcase'.encode(), pair_type=False)[0])
def test_darts_pickle(self):
keys = ['test', 'テスト', 'テストケース']
darts = DoubleArray()
darts.build(sorted([key.encode() for key in keys]), values=[3, 5, 1])
with tempfile.NamedTemporaryFile('wb') as output_file:
pickle.dump(darts, output_file)
output_file.flush()
with open(output_file.name, 'rb') as input_file:
darts = pickle.load(input_file)
self.assertEqual(5, darts.exact_match_search('テスト'.encode(), pair_type=False))
self.assertEqual(3, darts.common_prefix_search('testcase'.encode(), pair_type=False)[0])
def test_darts_array(self):
keys = ['test', 'テスト', 'テストケース']
darts = DoubleArray()
darts.build(sorted([key.encode() for key in keys]), values=[3, 5, 1])
array = darts.array()
darts = DoubleArray()
darts.set_array(array)
self.assertEqual(5, darts.exact_match_search('テスト'.encode(), pair_type=False))
self.assertEqual(3, darts.common_prefix_search('testcase'.encode(), pair_type=False)[0])
if __name__ == "__main__":
unittest.main()
| 44.014925
| 96
| 0.648355
| 377
| 2,949
| 4.877984
| 0.159151
| 0.114193
| 0.10658
| 0.144644
| 0.76509
| 0.76509
| 0.72485
| 0.704187
| 0.704187
| 0.704187
| 0
| 0.014025
| 0.202102
| 2,949
| 66
| 97
| 44.681818
| 0.767531
| 0.008817
| 0
| 0.5
| 0
| 0
| 0.053571
| 0
| 0
| 0
| 0
| 0
| 0.259259
| 1
| 0.092593
| false
| 0
| 0.074074
| 0
| 0.185185
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a967e9224f80415197121aa0341c3a1f26322553
| 390
|
py
|
Python
|
tests/dummy_class.py
|
vertliba/unittest-mocker
|
c3422d417776d589b844403f6489cc3ac3971afc
|
[
"MIT"
] | 3
|
2021-11-05T20:53:43.000Z
|
2022-02-08T23:26:22.000Z
|
tests/dummy_class.py
|
vertliba/unittest-mocker
|
c3422d417776d589b844403f6489cc3ac3971afc
|
[
"MIT"
] | null | null | null |
tests/dummy_class.py
|
vertliba/unittest-mocker
|
c3422d417776d589b844403f6489cc3ac3971afc
|
[
"MIT"
] | null | null | null |
class DummyClass:
dummy_var = 'original'
def __init__(self, init_param=0):
pass
def __call__(self, call_param=0):
return 'not_mocked_call'
def some_method(self):
# def some_method(self, some_method_param):
return 'not_mocked_some_method'
def some_other_method(self, some_other_method_param):
return 'not_mocked_some_other_method'
| 24.375
| 57
| 0.694872
| 53
| 390
| 4.566038
| 0.339623
| 0.165289
| 0.18595
| 0.140496
| 0.247934
| 0.247934
| 0
| 0
| 0
| 0
| 0
| 0.006601
| 0.223077
| 390
| 15
| 58
| 26
| 0.792079
| 0.105128
| 0
| 0
| 0
| 0
| 0.210375
| 0.144092
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.1
| 0
| 0.3
| 0.9
| 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
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
8d3220f525a67763177964d499576c26117406c4
| 196
|
py
|
Python
|
ex015/ex015.py
|
joaoguilhermemendes/python
|
ed97a5e262b709df013eb9363f150f1b33e67bdf
|
[
"MIT"
] | null | null | null |
ex015/ex015.py
|
joaoguilhermemendes/python
|
ed97a5e262b709df013eb9363f150f1b33e67bdf
|
[
"MIT"
] | null | null | null |
ex015/ex015.py
|
joaoguilhermemendes/python
|
ed97a5e262b709df013eb9363f150f1b33e67bdf
|
[
"MIT"
] | null | null | null |
print('-=-=- Aluguel de carros -=-=-')
dias = int(input('Quantos dias usou o veículo? '))
kms = int(input('Quantos Kms rodou? '))
print(f'O valor a ser pago é de --> R${(60*dias) + (0.15*kms)}')
| 32.666667
| 64
| 0.596939
| 33
| 196
| 3.545455
| 0.69697
| 0.136752
| 0.25641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.158163
| 196
| 6
| 64
| 32.666667
| 0.678788
| 0
| 0
| 0
| 0
| 0.25
| 0.664975
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8daa20e2c5e08e43490f8435d427e2cf9189d659
| 190
|
py
|
Python
|
src/probnum/utils/linalg/__init__.py
|
christopheroates/probnum
|
4ae63da307bd7279c3ce477ef68cbd0b8e30c73a
|
[
"MIT"
] | 226
|
2019-11-01T09:44:09.000Z
|
2022-03-30T23:17:17.000Z
|
src/probnum/utils/linalg/__init__.py
|
christopheroates/probnum
|
4ae63da307bd7279c3ce477ef68cbd0b8e30c73a
|
[
"MIT"
] | 590
|
2019-11-21T08:32:30.000Z
|
2022-03-31T12:37:37.000Z
|
src/probnum/utils/linalg/__init__.py
|
christopheroates/probnum
|
4ae63da307bd7279c3ce477ef68cbd0b8e30c73a
|
[
"MIT"
] | 39
|
2020-01-13T16:29:45.000Z
|
2022-03-28T16:16:54.000Z
|
"""Utility functions that involve numerical linear algebra."""
from ._cholesky_updates import cholesky_update, tril_to_positive_tril
__all__ = ["cholesky_update", "tril_to_positive_tril"]
| 31.666667
| 69
| 0.815789
| 24
| 190
| 5.875
| 0.666667
| 0.198582
| 0.255319
| 0.283688
| 0.453901
| 0.453901
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094737
| 190
| 5
| 70
| 38
| 0.819767
| 0.294737
| 0
| 0
| 0
| 0
| 0.28125
| 0.164063
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a5caf74429f515359f097d83d512e095dc3589dd
| 23
|
py
|
Python
|
examples/badhello.py
|
mcandre/stank
|
6992b8a0281cee8b24affa91e83daa7d79ea82f4
|
[
"BSD-2-Clause-FreeBSD"
] | 49
|
2017-08-10T12:53:33.000Z
|
2022-03-04T23:52:48.000Z
|
examples/badhello.py
|
mcandre/stank
|
6992b8a0281cee8b24affa91e83daa7d79ea82f4
|
[
"BSD-2-Clause-FreeBSD"
] | 108
|
2017-08-10T18:55:48.000Z
|
2021-09-23T01:32:06.000Z
|
examples/badhello.py
|
mcandre/stank
|
6992b8a0281cee8b24affa91e83daa7d79ea82f4
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
#!python
print "Hello"
| 7.666667
| 13
| 0.695652
| 3
| 23
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 23
| 2
| 14
| 11.5
| 0.8
| 0.304348
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
5704992043b998b6a1aeb84393c6357afa1506f0
| 96
|
py
|
Python
|
tests/conftest.py
|
tristaaan/rigor
|
0eddcb1ee8e0779fce8db4f70de27478d39d5187
|
[
"MIT"
] | 74
|
2018-02-08T14:39:52.000Z
|
2021-12-14T18:25:07.000Z
|
tests/conftest.py
|
tristaaan/rigor
|
0eddcb1ee8e0779fce8db4f70de27478d39d5187
|
[
"MIT"
] | 12
|
2018-02-21T12:29:59.000Z
|
2021-09-08T15:26:56.000Z
|
tests/conftest.py
|
tristaaan/rigor
|
0eddcb1ee8e0779fce8db4f70de27478d39d5187
|
[
"MIT"
] | 6
|
2018-02-25T02:51:31.000Z
|
2021-09-08T13:48:33.000Z
|
import rigor
def pytest_runtest_setup(item):
rigor.setup_logging(quiet=False, json=False)
| 16
| 48
| 0.78125
| 14
| 96
| 5.142857
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 96
| 5
| 49
| 19.2
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5735403161b6218645c318d034466d82ed37d55e
| 140
|
py
|
Python
|
pUtils/__init__.py
|
psudowe/parse27k_tools
|
8ae411905fbae494cc0892029924420c9cd26d5d
|
[
"MIT"
] | 12
|
2015-12-13T02:45:55.000Z
|
2019-11-07T02:44:53.000Z
|
pUtils/__init__.py
|
psudowe/parse27k_tools
|
8ae411905fbae494cc0892029924420c9cd26d5d
|
[
"MIT"
] | 3
|
2016-03-31T03:13:52.000Z
|
2017-05-30T11:45:20.000Z
|
pUtils/__init__.py
|
psudowe/parse27k_tools
|
8ae411905fbae494cc0892029924420c9cd26d5d
|
[
"MIT"
] | 7
|
2016-08-26T05:21:48.000Z
|
2020-07-22T20:00:16.000Z
|
#vim: set et ts=4 sw=4
# make the 'public' classes visible directly
from dump_args import dump_args
from fs import recreate_dir
import git
| 20
| 44
| 0.785714
| 26
| 140
| 4.115385
| 0.769231
| 0.149533
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017094
| 0.164286
| 140
| 6
| 45
| 23.333333
| 0.897436
| 0.457143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
938636a3a1428a8d5eae15c5e0f63856339accec
| 42
|
py
|
Python
|
vsgia_model/config/__init__.py
|
nkuhzx/VSG-IA
|
075b58c2bf89562cc197e721f050396589861c6a
|
[
"Apache-2.0"
] | null | null | null |
vsgia_model/config/__init__.py
|
nkuhzx/VSG-IA
|
075b58c2bf89562cc197e721f050396589861c6a
|
[
"Apache-2.0"
] | null | null | null |
vsgia_model/config/__init__.py
|
nkuhzx/VSG-IA
|
075b58c2bf89562cc197e721f050396589861c6a
|
[
"Apache-2.0"
] | null | null | null |
import os
from .default import _C as cfg
| 10.5
| 30
| 0.761905
| 8
| 42
| 3.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 42
| 3
| 31
| 14
| 0.939394
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
93ab5ece20433b546f06fdd589136583dd46047e
| 5,950
|
py
|
Python
|
src/test/resources/scripts/Message.py
|
tomjbarry/Penstro
|
d9179852158bebf48aaba7a198de5246acb1b064
|
[
"MIT"
] | 1
|
2019-02-25T05:55:34.000Z
|
2019-02-25T05:55:34.000Z
|
src/test/resources/scripts/Message.py
|
tomjbarry/penstro
|
d9179852158bebf48aaba7a198de5246acb1b064
|
[
"MIT"
] | null | null | null |
src/test/resources/scripts/Message.py
|
tomjbarry/penstro
|
d9179852158bebf48aaba7a198de5246acb1b064
|
[
"MIT"
] | null | null | null |
from PyConstants import Paths
from PyConstants import Codes
from PyBaseTest import BaseTest
from PyRequest import PyRequest
class Message(BaseTest):
def runTests(self):
print("Running message tests")
self.inbox = 0
self.outbox = 0
self.conversations = 0
self.testConversations()
self.testConversationMessages()
self.testSend()
self.testConversations()
self.testConversationMessages()
self.testFlagConversation()
self.testConversationMessages()
self.testConversations()
def testConversations(self):
if self.inbox > 1 or self.outbox > 1:
self.conversations = 1
expectedEmpty = self.unauthed.getPageResponse({"totalElements": 0})
if self.conversations == 0:
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.GET, None, self.expectedNotFound, self.target)
expectedConversations = self.unauthed.getPageResponse({"totalElements": self.conversations})
self.unauthed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, self.expectedDenied)
self.authed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedConversations)
self.targetAuthed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedConversations)
self.unauthed.expectResponse(Paths.MESSAGES_CONVERSATION_SHOW, PyRequest.DELETE, None, self.expectedDenied, self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_SHOW, PyRequest.DELETE, None, self.expectedSuccess, self.target)
self.authed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedEmpty)
self.targetAuthed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedConversations)
self.targetAuthed.expectResponse(Paths.MESSAGES_CONVERSATION_SHOW, PyRequest.DELETE, None, self.expectedSuccess, self.username)
self.authed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedEmpty)
self.targetAuthed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedEmpty)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_SHOW, PyRequest.POST, None, self.expectedSuccess, self.target)
self.authed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedConversations)
self.targetAuthed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedEmpty)
self.targetAuthed.expectResponse(Paths.MESSAGES_CONVERSATION_SHOW, PyRequest.POST, None, self.expectedSuccess, self.username)
self.authed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedConversations)
self.targetAuthed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedConversations)
if self.conversations > 0:
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.GET, None, self.unauthed.getDTOResponse({}), self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_SHOW, PyRequest.DELETE, None, self.expectedSuccess, self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.GET, None, self.expectedNotAllowed, self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_SHOW, PyRequest.POST, None, self.expectedSuccess, self.target)
self.authed.expectResponse(Paths.MESSAGES, PyRequest.GET, None, expectedConversations)
def testConversationMessages(self):
page = {'totalElements':self.inbox + self.outbox}
expected = self.unauthed.getPageResponse(page)
self.unauthed.expectResponse(Paths.MESSAGES_CONVERSATION_MESSAGES, PyRequest.GET, None, self.expectedDenied, self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_MESSAGES, PyRequest.GET, None, expected, self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_MESSAGES, PyRequest.GET, None, expected, self.target.upper())
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_MESSAGES, PyRequest.GET, None, expected, self.target.lower())
def testSend(self):
body = {'message':'This is a test!'}
message = {"message":"This is a test!", "author":self.createUsername(self.username)}
self.unauthed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.POST, body, self.expectedDenied, self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.POST, body, self.expectedSuccess, self.target)
self.outbox = self.outbox + 1
targetPage = {"totalElements": self.outbox, "content": message}
expectedTargetResponse = self.unauthed.getPageResponse(targetPage)
self.targetAuthed.expectResponse(Paths.MESSAGES_CONVERSATION_MESSAGES, PyRequest.GET, None, expectedTargetResponse, self.username)
self.targetAuthed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.POST, body, self.expectedSuccess, self.username)
self.authed.expectResponse(Paths.BLOCKED_ID, PyRequest.POST, None, self.expectedSuccess, self.target)
self.targetAuthed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.POST, body, self.expectedNotAllowed, self.username)
self.authed.expectResponse(Paths.BLOCKED_ID, PyRequest.DELETE, None, self.expectedSuccess, self.target)
self.targetAuthed.expectResponse(Paths.MESSAGES_CONVERSATION, PyRequest.POST, body, self.expectedSuccess, self.username)
self.inbox = self.inbox + 2
def testFlagConversation(self):
self.unauthed.expectResponse(Paths.MESSAGES_CONVERSATION_FLAG, PyRequest.POST, None, self.expectedDenied, self.target)
self.authed.expectResponse(Paths.MESSAGES_CONVERSATION_FLAG, PyRequest.POST, None, self.expectedSuccess, self.target)
# ensure user is not suspended after a single flagging
self.targetAuthed.expectResponse(Paths.USERS_CURRENT, PyRequest.GET, None, self.unauthed.getDTOResponse())
| 63.978495
| 138
| 0.746891
| 599
| 5,950
| 7.353923
| 0.126878
| 0.159591
| 0.2084
| 0.194779
| 0.770261
| 0.733031
| 0.700568
| 0.685358
| 0.642679
| 0.587968
| 0
| 0.002194
| 0.157479
| 5,950
| 92
| 139
| 64.673913
| 0.876521
| 0.00874
| 0
| 0.315068
| 0
| 0
| 0.022049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.054795
| null | null | 0.013699
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f55b1f2ddbf873799e6bc21b090aeba9557ed795
| 4,301
|
py
|
Python
|
Modules/Bugzilla_API.py
|
ghasemieh/Duplicate-Bug-Identification-system
|
c6b40a0be999f80c73a92c138bb2a047789664ae
|
[
"MIT"
] | 4
|
2020-01-30T16:29:22.000Z
|
2021-11-25T02:16:42.000Z
|
Modules/Bugzilla_API.py
|
ghasemieh/Duplicate-Bug-Identification-system
|
c6b40a0be999f80c73a92c138bb2a047789664ae
|
[
"MIT"
] | 6
|
2020-02-05T05:43:34.000Z
|
2021-08-23T20:36:52.000Z
|
Modules/Bugzilla_API.py
|
ghasemieh/Duplicated-Bug-Report-Detection-System
|
c6b40a0be999f80c73a92c138bb2a047789664ae
|
[
"MIT"
] | null | null | null |
"""
-------------------------------------------------------
Duplicated Bug Report Detection
-------------------------------------------------------
Copyright (c) 2020.
Author: Alireza Ghasemieh
Email: a.ghasemieh65@gmail.com
https://github.com/ghasemieh
__Updated__ = 1/29/20, 6:35 AM.
-------------------------------------------------------
"""
import datetime
import os
import pandas as pd
import pymongo
import pytz
import requests
def API_data_extract_2(from_id_number_till_now):
controller = 'https://bugzilla.mozilla.org/rest/bug?include_fields=id,type,product,component,creation_time,status,priority,severity,version,summary,processed_summary,duplicates&f1=bug_id&o1=greaterthan&v1='
get_bug_url = controller + from_id_number_till_now
try:
# Extract data from Bugzilla REST API
response = requests.get(get_bug_url)
response_json = response.json()
data = response_json["bugs"]
print("Number of bug reports:", len(data))
if len(data) > 0:
# Initiate mongoDB
client = pymongo.MongoClient(os.environ.get('MONGO_ADDRESS', "mongodb://127.0.0.1:27017/"))
mydb = client["mydatabase"]
mycol = mydb["bug_report"]
mycol.create_index([('id', pymongo.ASCENDING)], unique=True)
for tup in data:
# convert the date and time
time_convert = datetime.datetime.strptime(tup['creation_time'], "%Y-%m-%dT%H:%M:%SZ")
tup["creation_time"] = time_convert
# add insertion time to the record
tz_London = pytz.timezone('Europe/London')
tup['insertion_time'] = datetime.datetime.now(tz_London)
# Insert record to mongoDB
try:
mycol.insert_one(tup)
except:
None
data = pd.DataFrame(data)
data.drop(columns=['_id'], inplace=True)
else:
data = pd.DataFrame(data)
return data
except:
print("API Error")
def API_data_extract(from_a_preiod_of_time_untill_now='2h'):
"""
-------------------------------------------------------
Extract data from bugzilla website based on the a period of time untill now and then insert to the
mongoDB to make a data-lake
Use: data = API_data_extract(from_a_preiod_of_time_untill_now = '2h')
-------------------------------------------------------
Returns:
A data frame of the data
-------------------------------------------------------
"""
controller = 'https://bugzilla.mozilla.org/rest/bug?include_fields=id,type,product,component,creation_time,status,priority,severity,version,summary,processed_summary,duplicates&chfield=%5BBug%20creation%5D&chfieldfrom=-'
get_bug_url = controller + from_a_preiod_of_time_untill_now + '&chfieldto=Now'
try:
# Extract data from Bugzilla REST API
response = requests.get(get_bug_url)
response_json = response.json()
data = response_json["bugs"]
print("Number of bug reports:", len(data))
# Initiate mongoDB
client = pymongo.MongoClient(os.environ.get('MONGO_ADDRESS', "mongodb://127.0.0.1:27017/"))
mydb = client["mydatabase"]
mycol = mydb["bug_report"]
mycol.create_index([('id', pymongo.ASCENDING)], unique=True)
for tup in data:
# convert the date and time
time_convert = datetime.datetime.strptime(tup['creation_time'], "%Y-%m-%dT%H:%M:%SZ")
tup["creation_time"] = time_convert
# add insertion time to the record
tz_London = pytz.timezone('Europe/London')
tup['insertion_time'] = datetime.datetime.now(tz_London)
# Insert record to mongoDB
try:
mycol.insert_one(tup)
except:
print(tup['id'], ' Duplicate Bug Report')
data = pd.DataFrame(data)
data.drop(columns=['_id'], inplace=True)
return data
except:
print("API Error")
def API_id_extract(id):
"""
-------------------------------------------------------
Extract data from bugzilla website based on the ID
Use: data = API_data_extract(id = 100)
-------------------------------------------------------
Returns:
A data frame of the data
-------------------------------------------------------
"""
id_str = str(id)
get_bug_url = 'https://bugzilla.mozilla.org/rest/bug/' + id_str + '?include_fields=id,type,product,component,creation_time,status,priority,severity,version,summary,processed_summary'
try:
response = requests.get(get_bug_url)
response_json = response.json()
data = response_json["bugs"]
print(data)
return pd.DataFrame(data)
except:
df = pd.DataFrame([])
return df
| 34.96748
| 221
| 0.639154
| 553
| 4,301
| 4.799277
| 0.271248
| 0.040693
| 0.020347
| 0.034665
| 0.807084
| 0.769028
| 0.757724
| 0.728335
| 0.672947
| 0.672947
| 0
| 0.013408
| 0.132992
| 4,301
| 122
| 222
| 35.254098
| 0.698311
| 0.306673
| 0
| 0.684932
| 0
| 0.041096
| 0.317422
| 0.056597
| 0
| 0
| 0
| 0
| 0
| 1
| 0.041096
| false
| 0
| 0.082192
| 0
| 0.178082
| 0.082192
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
f5a600cc04c8129e7df3f2a3808bc85ba1e52d6d
| 2,714
|
py
|
Python
|
intrusiondetection/presets.py
|
alessandrostockman/cv-intrusion-detection-project-work
|
efdb9e9296976a84b7aa2addcb0a1ee7cffa526b
|
[
"MIT"
] | 1
|
2022-02-22T09:43:49.000Z
|
2022-02-22T09:43:49.000Z
|
intrusiondetection/presets.py
|
Marco97-exe/cv-intrusion-detection-project-work
|
efdb9e9296976a84b7aa2addcb0a1ee7cffa526b
|
[
"MIT"
] | null | null | null |
intrusiondetection/presets.py
|
Marco97-exe/cv-intrusion-detection-project-work
|
efdb9e9296976a84b7aa2addcb0a1ee7cffa526b
|
[
"MIT"
] | 1
|
2022-02-22T09:43:40.000Z
|
2022-02-22T09:43:40.000Z
|
import numpy as np
import cv2
from intrusiondetection.morphology import MorphOp, MorphOpsSet
from intrusiondetection.utility import distance_euclidean
from intrusiondetection.enum import ParameterPreset
def default_preset(preset):
return {
ParameterPreset.FAST: preset_3,
ParameterPreset.MEDIUM: preset_2,
ParameterPreset.SLOW: preset_1
}.get(preset, None)
preset_1 = {
"initial_background_frames": 80,
"initial_background_interpolation": np.median,
"background_alpha": 0.3,
"background_threshold": 30,
"background_distance": distance_euclidean,
"background_morph_ops": MorphOpsSet(
MorphOp(cv2.MORPH_OPEN, (3,3)),
MorphOp(cv2.MORPH_CLOSE, (50,50), cv2.MORPH_ELLIPSE),
MorphOp(cv2.MORPH_DILATE, (15,15), cv2.MORPH_ELLIPSE)
),
"threshold": 15,
"distance": distance_euclidean,
"morph_ops": MorphOpsSet(
MorphOp(cv2.MORPH_OPEN, (3,3)),
MorphOp(cv2.MORPH_CLOSE, (50, 50), cv2.MORPH_ELLIPSE),
MorphOp(cv2.MORPH_OPEN, (10,10), cv2.MORPH_ELLIPSE),
),
"similarity_threshold": 80,
"classification_threshold": 2.6,
"edge_threshold": 92,
"edge_adaptation": 0.1
}
preset_2 = {
"initial_background_frames": 80,
"initial_background_interpolation": np.median,
"background_alpha": 0.3,
"background_threshold": 30,
"background_distance": distance_euclidean,
"background_morph_ops": MorphOpsSet(
MorphOp(cv2.MORPH_OPEN, (3,3)),
MorphOp(cv2.MORPH_CLOSE, (55,55)),
MorphOp(cv2.MORPH_DILATE, (15,15))
),
"threshold": 15,
"distance": distance_euclidean,
"morph_ops": MorphOpsSet(
MorphOp(cv2.MORPH_OPEN, (3,3), cv2.MORPH_ELLIPSE),
MorphOp(cv2.MORPH_CLOSE, (50, 50), cv2.MORPH_ELLIPSE),
MorphOp(cv2.MORPH_OPEN, (15,15)),
),
"similarity_threshold": 80,
"classification_threshold": 2.6,
"edge_threshold": 110,
"edge_adaptation": 0.3
}
preset_3 = {
"initial_background_frames": 80,
"initial_background_interpolation": np.median,
"background_alpha": 0.3,
"background_threshold": 30,
"background_distance": distance_euclidean,
"background_morph_ops": MorphOpsSet(
MorphOp(cv2.MORPH_OPEN, (3,3)),
MorphOp(cv2.MORPH_CLOSE, (55,55)),
MorphOp(cv2.MORPH_DILATE, (15,15))
),
"threshold": 15,
"distance": distance_euclidean,
"morph_ops": MorphOpsSet(
MorphOp(cv2.MORPH_OPEN, (3,3), cv2.MORPH_ELLIPSE),
MorphOp(cv2.MORPH_CLOSE, (50, 50)),
MorphOp(cv2.MORPH_OPEN, (15,15)),
),
"similarity_threshold": 80,
"classification_threshold": 2.6,
"edge_threshold": 70,
"edge_adaptation": 0.3
}
| 31.929412
| 62
| 0.668018
| 316
| 2,714
| 5.481013
| 0.174051
| 0.115473
| 0.155889
| 0.09873
| 0.763279
| 0.763279
| 0.757506
| 0.757506
| 0.757506
| 0.723441
| 0
| 0.064828
| 0.1986
| 2,714
| 85
| 63
| 31.929412
| 0.731494
| 0
| 0
| 0.7
| 0
| 0
| 0.255249
| 0.089503
| 0
| 0
| 0
| 0
| 0
| 1
| 0.0125
| false
| 0
| 0.0625
| 0.0125
| 0.0875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
193cb9ed986168008715cc203a5b38f919d0760c
| 130
|
py
|
Python
|
tests/issue_tests/__init__.py
|
janik-martin/fhirtordf
|
05b23ba1df9f322c148b7f20ebbd6d58cb92cefc
|
[
"CC0-1.0"
] | 10
|
2017-11-20T07:18:36.000Z
|
2022-02-03T12:59:26.000Z
|
tests/issue_tests/__init__.py
|
janik-martin/fhirtordf
|
05b23ba1df9f322c148b7f20ebbd6d58cb92cefc
|
[
"CC0-1.0"
] | 22
|
2017-09-12T22:15:11.000Z
|
2021-05-14T13:48:48.000Z
|
tests/issue_tests/__init__.py
|
janik-martin/fhirtordf
|
05b23ba1df9f322c148b7f20ebbd6d58cb92cefc
|
[
"CC0-1.0"
] | 9
|
2018-05-09T07:51:51.000Z
|
2022-03-09T16:03:19.000Z
|
import os
ISSUE_TEST_DIR = os.path.abspath(os.path.dirname(__file__))
ISSUE_TEST_DATA_DIR = os.path.join(ISSUE_TEST_DIR, 'data')
| 26
| 59
| 0.792308
| 23
| 130
| 4
| 0.478261
| 0.293478
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 130
| 4
| 60
| 32.5
| 0.766667
| 0
| 0
| 0
| 0
| 0
| 0.030769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
1945a9fd5a711ec370e8cd51878b1e171a4f6ba3
| 224
|
gyp
|
Python
|
examples/pxScene2d/external/libnode-v10.15.3/test/addons-napi/test_constructor/binding.gyp
|
madanagopaltcomcast/pxCore
|
c4a3a40a190521c8b6383d126c87612eca5b3c42
|
[
"Apache-2.0"
] | 1,144
|
2018-12-18T09:46:47.000Z
|
2022-03-07T14:51:46.000Z
|
examples/pxScene2d/external/libnode-v10.15.3/test/addons-napi/test_constructor/binding.gyp
|
madanagopaltcomcast/pxCore
|
c4a3a40a190521c8b6383d126c87612eca5b3c42
|
[
"Apache-2.0"
] | 1,432
|
2017-06-21T04:08:48.000Z
|
2020-08-25T16:21:15.000Z
|
examples/pxScene2d/external/libnode-v10.15.3/test/addons-napi/test_constructor/binding.gyp
|
madanagopaltcomcast/pxCore
|
c4a3a40a190521c8b6383d126c87612eca5b3c42
|
[
"Apache-2.0"
] | 317
|
2017-06-20T19:57:17.000Z
|
2020-09-16T10:28:30.000Z
|
{
"targets": [
{
"target_name": "test_constructor",
"sources": [ "test_constructor.c" ]
},
{
"target_name": "test_constructor_name",
"sources": [ "test_constructor_name.c" ]
}
]
}
| 17.230769
| 46
| 0.53125
| 19
| 224
| 5.842105
| 0.368421
| 0.540541
| 0.252252
| 0.45045
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.290179
| 224
| 12
| 47
| 18.666667
| 0.698113
| 0
| 0
| 0
| 0
| 0
| 0.540179
| 0.196429
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1952267644b7a735d455cf0f97d8e81a57266595
| 6,125
|
py
|
Python
|
itests/asgard/api/test_apps.py
|
b2wdigital/asgard-api
|
5444d81be33bf4af3c9cf5a2185c16ff10357034
|
[
"MIT"
] | 3
|
2020-01-10T02:16:09.000Z
|
2020-02-19T18:42:37.000Z
|
itests/asgard/api/test_apps.py
|
b2wdigital/asgard-api
|
5444d81be33bf4af3c9cf5a2185c16ff10357034
|
[
"MIT"
] | 13
|
2020-01-15T18:22:35.000Z
|
2021-03-31T19:21:54.000Z
|
itests/asgard/api/test_apps.py
|
b2wdigital/asgard-api
|
5444d81be33bf4af3c9cf5a2185c16ff10357034
|
[
"MIT"
] | 6
|
2020-03-07T09:49:19.000Z
|
2021-07-25T03:14:10.000Z
|
from datetime import datetime, timezone
from http import HTTPStatus
from aioresponses import aioresponses
from asyncworker.testing import HttpClientContext
from asgard.api.apps import app
from asgard.conf import settings
from asgard.models.app import AppStats
from itests.util import (
BaseTestCase,
ACCOUNT_DEV_ID,
USER_WITH_MULTIPLE_ACCOUNTS_AUTH_KEY,
)
from tests.utils import build_mesos_cluster, get_fixture
class AppStatsTest(BaseTestCase):
async def setUp(self):
await super(AppStatsTest, self).setUp()
self.client = await self.aiohttp_client(app)
self.utc_now = datetime.utcnow().replace(tzinfo=timezone.utc)
self.INDEX_NAME = (
f"asgard-app-stats-{self.utc_now.strftime('%Y-%m-%d-%H')}"
)
async def tearDown(self):
await super(AppStatsTest, self).tearDown()
await self.esclient.indices.delete(
index=self.INDEX_NAME,
ignore=[HTTPStatus.BAD_REQUEST, HTTPStatus.NOT_FOUND],
)
async def test_apps_stats_empty_stats_for_existing_app(self):
async with HttpClientContext(app) as client:
local_address = (
f"http://{client._server.host}:{client._server.port}"
)
with aioresponses(
passthrough=[local_address, settings.STATS_API_URL]
) as rsps:
agent_id = "ead07ffb-5a61-42c9-9386-21b680597e6c-S0"
build_mesos_cluster(rsps, agent_id) # namespace=asgard-infra
app_stats_datapoints = get_fixture(
f"agents/{agent_id}/app_stats.json"
)
await self._load_app_stats_into_storage(
self.INDEX_NAME, self.utc_now, app_stats_datapoints
)
resp = await client.get(
f"/apps/infra/asgard/api/stats?account_id={ACCOUNT_DEV_ID}",
headers={
"Authorization": f"Token {USER_WITH_MULTIPLE_ACCOUNTS_AUTH_KEY}"
},
)
self.assertEqual(HTTPStatus.OK, resp.status)
data = await resp.json()
self.assertEqual(
AppStats(
cpu_pct="0.25", ram_pct="15.05", cpu_thr_pct="1.00"
).dict(),
data["stats"],
)
async def test_apps_stats_with_avg_1_min(self):
async with HttpClientContext(app) as client:
local_address = (
f"http://{client._server.host}:{client._server.port}"
)
with aioresponses(
passthrough=[local_address, settings.STATS_API_URL]
) as rsps:
agent_id = "ead07ffb-5a61-42c9-9386-21b680597e6c-S0"
build_mesos_cluster(rsps, agent_id) # namespace=asgard-infra
app_stats_datapoints = get_fixture(
f"agents/{agent_id}/app_stats.json"
)
await self._load_app_stats_into_storage(
self.INDEX_NAME, self.utc_now, app_stats_datapoints
)
resp = await client.get(
f"/apps/infra/asgard/api/stats/avg-1min?account_id={ACCOUNT_DEV_ID}",
headers={
"Authorization": f"Token {USER_WITH_MULTIPLE_ACCOUNTS_AUTH_KEY}"
},
)
self.assertEqual(HTTPStatus.OK, resp.status)
data = await resp.json()
self.assertEqual(
AppStats(
cpu_pct="0.25", ram_pct="15.05", cpu_thr_pct="1.00"
).dict(),
data["stats"],
)
async def test_apps_stats_app_not_found(self):
async with HttpClientContext(app) as client:
local_address = (
f"http://{client._server.host}:{client._server.port}"
)
with aioresponses(
passthrough=[local_address, settings.STATS_API_URL]
) as rsps:
agent_id = "ead07ffb-5a61-42c9-9386-21b680597e6c-S0"
build_mesos_cluster(rsps, agent_id) # namespace=asgard-infra
app_stats_datapoints = get_fixture(
f"agents/{agent_id}/app_stats.json"
)
resp = await client.get(
f"/apps/asgard/api/not-exist/stats?account_id={ACCOUNT_DEV_ID}",
headers={
"Authorization": f"Token {USER_WITH_MULTIPLE_ACCOUNTS_AUTH_KEY}"
},
)
self.assertEqual(HTTPStatus.OK, resp.status)
data = await resp.json()
self.assertEqual(
AppStats(cpu_pct="0", ram_pct="0", cpu_thr_pct="0").dict(),
data["stats"],
)
async def test_apps_stats_check_uri_regex(self):
async with HttpClientContext(app) as client:
local_address = (
f"http://{client._server.host}:{client._server.port}"
)
with aioresponses(
passthrough=[local_address, settings.STATS_API_URL]
) as rsps:
agent_id = "ead07ffb-5a61-42c9-9386-21b680597e6c-S0"
build_mesos_cluster(rsps, agent_id) # namespace=asgard-infra
resp = await client.get(
f"/apps/asgard/pgsql-9.4/stats?account_id={ACCOUNT_DEV_ID}",
headers={
"Authorization": f"Token {USER_WITH_MULTIPLE_ACCOUNTS_AUTH_KEY}"
},
)
self.assertEqual(HTTPStatus.OK, resp.status)
resp = await client.get(
f"/apps/asgard/pgsql-9..4/stats?account_id={ACCOUNT_DEV_ID}",
headers={
"Authorization": f"Token {USER_WITH_MULTIPLE_ACCOUNTS_AUTH_KEY}"
},
)
self.assertEqual(HTTPStatus.OK, resp.status)
| 39.262821
| 89
| 0.543347
| 635
| 6,125
| 4.981102
| 0.2
| 0.027822
| 0.027822
| 0.045526
| 0.77711
| 0.751502
| 0.741701
| 0.732532
| 0.721783
| 0.721783
| 0
| 0.029954
| 0.362286
| 6,125
| 155
| 90
| 39.516129
| 0.779826
| 0.014857
| 0
| 0.566176
| 0
| 0
| 0.187427
| 0.131199
| 0
| 0
| 0
| 0
| 0.058824
| 1
| 0
| false
| 0.029412
| 0.066176
| 0
| 0.073529
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
198452bf6668d13c319d6a9e88551499304c847f
| 61
|
py
|
Python
|
doodad/__init__.py
|
charlesjsun/doodad
|
eb30cfc668054ab84f58536eb777a1a56258030a
|
[
"MIT"
] | 1
|
2020-10-12T13:55:48.000Z
|
2020-10-12T13:55:48.000Z
|
doodad/__init__.py
|
charlesjsun/doodad
|
eb30cfc668054ab84f58536eb777a1a56258030a
|
[
"MIT"
] | 1
|
2020-03-11T14:41:43.000Z
|
2020-03-11T14:41:43.000Z
|
doodad/__init__.py
|
charlesjsun/doodad
|
eb30cfc668054ab84f58536eb777a1a56258030a
|
[
"MIT"
] | 10
|
2018-06-25T21:07:14.000Z
|
2021-07-19T18:46:17.000Z
|
from .launch_tools import *
from .arg_parse import get_args
| 20.333333
| 32
| 0.803279
| 10
| 61
| 4.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147541
| 61
| 2
| 33
| 30.5
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1985aef1c9e2458698124d87727ecf356e146c13
| 1,577
|
py
|
Python
|
mobile/tests/utils/test_cache_helper.py
|
invinst/CPDB
|
c2d8ae8888b13d956cc1068742f18d45736d4121
|
[
"Apache-2.0"
] | 16
|
2016-05-20T09:03:32.000Z
|
2020-09-13T14:23:06.000Z
|
mobile/tests/utils/test_cache_helper.py
|
invinst/CPDB
|
c2d8ae8888b13d956cc1068742f18d45736d4121
|
[
"Apache-2.0"
] | 2
|
2016-05-24T01:44:14.000Z
|
2016-06-17T22:19:45.000Z
|
mobile/tests/utils/test_cache_helper.py
|
invinst/CPDB
|
c2d8ae8888b13d956cc1068742f18d45736d4121
|
[
"Apache-2.0"
] | 2
|
2016-10-10T16:14:19.000Z
|
2020-10-26T00:17:02.000Z
|
from unittest.mock import MagicMock
from django.core.cache import cache
from django.test import override_settings
from common.tests.core import SimpleTestCase
from mobile.utils.cache_helper import CacheHelper, get_or_set
@override_settings(CACHES={
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
})
class CacheHelperTest(SimpleTestCase):
def tearDown(self):
cache.clear()
def test_get_or_set_when_already_have_value(self):
cache.set('cache_key', 'other_value')
CacheHelper.get_or_set('cache_key', 'value')
cache.get('cache_key').should.be.equal('other_value')
def test_get_or_set_when_not_set_yet(self):
CacheHelper.get_or_set('cache_key', 'value')
cache.get('cache_key').should.be.equal('value')
@override_settings(CACHES={
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
})
class GetOrSetDecoratorTest(SimpleTestCase):
def tearDown(self):
cache.clear()
def test_get_or_set_when_already_have_value(self):
cache.set('cache_key', 'other_value')
method = MagicMock(return_value='value')
decorated_method = get_or_set('cache_key')(method)
decorated_method().should.equal('other_value')
def test_get_or_set_when_not_set_yet(self):
method = MagicMock(return_value='value')
decorated_method = get_or_set('cache_key')(method)
decorated_method().should.equal('value')
| 29.203704
| 67
| 0.699429
| 197
| 1,577
| 5.294416
| 0.258883
| 0.043145
| 0.069032
| 0.046021
| 0.776606
| 0.776606
| 0.776606
| 0.776606
| 0.776606
| 0.776606
| 0
| 0
| 0.176918
| 1,577
| 53
| 68
| 29.754717
| 0.803544
| 0
| 0
| 0.666667
| 0
| 0
| 0.197844
| 0.05707
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| false
| 0
| 0.128205
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
19a3252e92eff98590a88a493e3f5f90025124c1
| 66
|
py
|
Python
|
mne/artifacts/__init__.py
|
mluessi/mne-python
|
aef0cd79b0543c6d121de236098bd7865feff39e
|
[
"BSD-3-Clause"
] | 1
|
2022-03-23T22:26:50.000Z
|
2022-03-23T22:26:50.000Z
|
mne/artifacts/__init__.py
|
neurodebian/mne-python
|
44a5ef5241a748b2f77c62fdcda6334220c6af45
|
[
"BSD-3-Clause"
] | null | null | null |
mne/artifacts/__init__.py
|
neurodebian/mne-python
|
44a5ef5241a748b2f77c62fdcda6334220c6af45
|
[
"BSD-3-Clause"
] | null | null | null |
from .eog import find_eog_events
from .ecg import find_ecg_events
| 22
| 32
| 0.848485
| 12
| 66
| 4.333333
| 0.5
| 0.384615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 66
| 2
| 33
| 33
| 0.896552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
5fdbbbd3780d87b19d0ce1416ee3bcb974b6709f
| 245
|
py
|
Python
|
training/Loss/__init__.py
|
bit-bcilab/SiamDCA
|
78a520f2bf6b89f8dee8b05ca7a9399813f77e92
|
[
"Apache-2.0"
] | null | null | null |
training/Loss/__init__.py
|
bit-bcilab/SiamDCA
|
78a520f2bf6b89f8dee8b05ca7a9399813f77e92
|
[
"Apache-2.0"
] | null | null | null |
training/Loss/__init__.py
|
bit-bcilab/SiamDCA
|
78a520f2bf6b89f8dee8b05ca7a9399813f77e92
|
[
"Apache-2.0"
] | null | null | null |
from .ClassificationLoss import PreprocessCls, NllPosLoss, NllNegLoss, FocalPosLoss, FocalNegLoss
from .LocationLoss import L1Loss, SmoothL1Loss, IOULoss, GIOULoss, DIOULoss, CIOULoss
from .QualityLoss import ShrinkageLoss, HuberLoss
| 30.625
| 98
| 0.812245
| 22
| 245
| 9.045455
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009434
| 0.134694
| 245
| 7
| 99
| 35
| 0.929245
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5fe977c764469e1f516ca5c8ee70321d019e7706
| 21
|
py
|
Python
|
torauth/mocks/__init__.py
|
tonlabs/tor-service
|
1d7e15c20277202927e9869f73094fec7077bd38
|
[
"Apache-2.0"
] | 4
|
2021-01-25T08:22:57.000Z
|
2022-02-01T20:39:00.000Z
|
torauth/mocks/__init__.py
|
tonlabs/tor-service
|
1d7e15c20277202927e9869f73094fec7077bd38
|
[
"Apache-2.0"
] | 1
|
2021-03-31T19:09:08.000Z
|
2021-04-05T10:20:06.000Z
|
torauth/mocks/__init__.py
|
tonlabs/tor-service
|
1d7e15c20277202927e9869f73094fec7077bd38
|
[
"Apache-2.0"
] | null | null | null |
from . Surf import *
| 10.5
| 20
| 0.666667
| 3
| 21
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238095
| 21
| 1
| 21
| 21
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
271abd8ccbd1ea479eab0e1c4ba059acd28162cc
| 81
|
py
|
Python
|
app/view.py
|
fauziwei/_flask_
|
a2e8ed2f459df289945fa7942b23e9e02da63bb8
|
[
"Apache-2.0"
] | null | null | null |
app/view.py
|
fauziwei/_flask_
|
a2e8ed2f459df289945fa7942b23e9e02da63bb8
|
[
"Apache-2.0"
] | null | null | null |
app/view.py
|
fauziwei/_flask_
|
a2e8ed2f459df289945fa7942b23e9e02da63bb8
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
'''Fauzi, fauzi@soovii.com'''
from flask_restful import Resource
| 20.25
| 34
| 0.740741
| 12
| 81
| 4.916667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013889
| 0.111111
| 81
| 4
| 34
| 20.25
| 0.805556
| 0.469136
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
274385894fd3b97db05d602f76c2b2cacaafca3e
| 8,399
|
py
|
Python
|
micromagnetictests/calculatortests/zeeman.py
|
ubermag/micromagnetictests
|
60ad592b146f1ca5c35c897b64f281d62fa77699
|
[
"BSD-3-Clause"
] | 2
|
2021-05-27T05:00:39.000Z
|
2022-01-16T15:01:39.000Z
|
micromagnetictests/calculatortests/zeeman.py
|
ubermag/micromagnetictests
|
60ad592b146f1ca5c35c897b64f281d62fa77699
|
[
"BSD-3-Clause"
] | 6
|
2021-06-25T09:42:35.000Z
|
2022-03-15T00:09:10.000Z
|
micromagnetictests/calculatortests/zeeman.py
|
ubermag/micromagnetictests
|
60ad592b146f1ca5c35c897b64f281d62fa77699
|
[
"BSD-3-Clause"
] | 1
|
2021-07-04T15:39:10.000Z
|
2021-07-04T15:39:10.000Z
|
import pytest
import numpy as np
import discretisedfield as df
import micromagneticmodel as mm
class TestZeeman:
@pytest.fixture(autouse=True)
def _setup_calculator(self, calculator):
self.calculator = calculator
def setup(self):
p1 = (-10e-9, -5e-9, -3e-9)
p2 = (10e-9, 5e-9, 3e-9)
self.region = df.Region(p1=p1, p2=p2)
self.cell = (1e-9, 1e-9, 1e-9)
self.subregions = {'r1': df.Region(p1=(-10e-9, -5e-9, -3e-9),
p2=(10e-9, 0, 3e-9)),
'r2': df.Region(p1=(-10e-9, 0, -3e-9),
p2=(10e-9, 5e-9, 3e-9))}
def test_vector(self):
name = 'zeeman_vector'
H = (0, 0, 1e6)
Ms = 1e6
system = mm.System(name=name)
# time-independent
system.energy = mm.Zeeman(H=H)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
md = self.calculator.MinDriver()
md.drive(system)
value = system.m(mesh.region.random_point())
assert np.linalg.norm(np.subtract(value, (0, 0, Ms))) < 1e-3
# time-dependent - sin
system.energy = mm.Zeeman(H=H, wave='sin', f=1e9, t0=1e-12)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
# time-dependent - sinc
system.energy = mm.Zeeman(H=H, wave='sinc', f=1e9, t0=0)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
self.calculator.delete(system)
# time-dependent - function
def t_func(t):
if t < 1e-10:
return 1
elif t < 5e-10:
return (5e-10 - t) / 4e-10
else:
return 0
system.energy = mm.Zeeman(H=H, time_dependence=t_func, tstep=1e-13)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
# time-dependent - tcl strings
tcl_strings = {}
tcl_strings['proc'] = '''proc TimeFunction { total_time } {
set Hx [expr {sin($total_time * 1e10)}]
set dHx [expr {1e10 * cos($total_time * 1e10)}]
return [list $Hx 0 0 $dHx 0 0]
}
'''
tcl_strings['energy'] = 'Oxs_ScriptUZeeman'
tcl_strings['script_args'] = 'total_time'
tcl_strings['script'] = 'TimeFunction'
system.energy = mm.Zeeman(H=H, tcl_strings=tcl_strings)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
self.calculator.delete(system)
def test_dict(self):
name = 'zeeman_dict'
H = {'r1': (1e5, 0, 0), 'r2': (0, 0, 1e5)}
Ms = 1e6
system = mm.System(name=name)
system.energy = mm.Zeeman(H=H)
mesh = df.Mesh(region=self.region, cell=self.cell,
subregions=self.subregions)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
md = self.calculator.MinDriver()
md.drive(system)
assert np.linalg.norm(np.subtract(system.m['r1'].average,
(Ms, 0, 0))) < 1
assert np.linalg.norm(np.subtract(system.m['r2'].average,
(0, 0, Ms))) < 1
# time-dependent - sin
system.energy = mm.Zeeman(H=H, wave='sin', f=1e9, t0=1e-12)
mesh = df.Mesh(region=self.region, cell=self.cell,
subregions=self.subregions)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
# time-dependent - sinc
system.energy = mm.Zeeman(H=H, wave='sinc', f=1e9, t0=0)
mesh = df.Mesh(region=self.region, cell=self.cell,
subregions=self.subregions)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
# time-dependent - function
def t_func(t):
if t < 1e-10:
return 1
elif t < 5e-10:
return (5e-10 - t) / 4e-10
else:
return 0
system.energy = mm.Zeeman(H=H, time_dependence=t_func, tstep=1e-13)
mesh = df.Mesh(region=self.region, cell=self.cell,
subregions=self.subregions)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
self.calculator.delete(system)
def test_field(self):
name = 'zeeman_field'
def value_fun(pos):
x, y, z = pos
if x <= 0:
return (1e6, 0, 0)
else:
return (0, 0, 1e6)
mesh = df.Mesh(region=self.region, cell=self.cell)
H = df.Field(mesh, dim=3, value=value_fun)
Ms = 1e6
system = mm.System(name=name)
system.energy = mm.Zeeman(H=H)
system.m = df.Field(mesh, dim=3, value=(0, 1, 0), norm=Ms)
md = self.calculator.MinDriver()
md.drive(system)
value = system.m((-2e-9, -2e-9, -2e-9))
assert np.linalg.norm(np.subtract(value, (Ms, 0, 0))) < 1e-3
value = system.m((2e-9, 2e-9, 2e-9))
assert np.linalg.norm(np.subtract(value, (0, 0, Ms))) < 1e-3
# time-dependent - sin
system.energy = mm.Zeeman(H=H, wave='sin', f=1e9, t0=1e-12)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
# time-dependent - sinc
system.energy = mm.Zeeman(H=H, wave='sinc', f=1e9, t0=0)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
# time-dependent - function
def t_func(t):
omega = 2*np.pi * 1e9
return [np.cos(omega * t), -np.sin(omega * t), 0,
np.sin(omega * t), np.cos(omega * t), 0,
0, 0, 1]
system.energy = mm.Zeeman(H=H, time_dependence=t_func, tstep=1e-13)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
# time-dependent - tcl strings
tcl_strings = {}
tcl_strings['proc'] = '''proc TimeFunction { total_time } {
set PI [expr {4*atan(1.)}]
set w [expr {1e9*2*$PI}]
set ct [expr {cos($w*$total_time)}]
set mct [expr {-1*$ct}] ;# "mct" is "minus cosine (w)t"
set st [expr {sin($w*$total_time)}]
set mst [expr {-1*$st}] ;# "mst" is "minus sine (w)t"
return [list $ct $mst 0 \
$st $ct 0 \
0 0 1 \
[expr {$w*$mst}] [expr {$w*$mct}] 0 \
[expr {$w*$ct}] [expr {$w*$mst}] 0 \
0 0 0]
}'''
tcl_strings['energy'] = 'Oxs_TransformZeeman'
tcl_strings['type'] = 'general'
tcl_strings['script_args'] = 'total_time'
tcl_strings['script'] = 'TimeFunction'
system.energy = mm.Zeeman(H=H, tcl_strings=tcl_strings)
mesh = df.Mesh(region=self.region, cell=self.cell)
system.m = df.Field(mesh, dim=3, value=(1, 1, 1), norm=Ms)
td = self.calculator.TimeDriver()
td.drive(system, t=0.1e-9, n=20)
self.calculator.delete(system)
| 33.066929
| 75
| 0.514823
| 1,185
| 8,399
| 3.609283
| 0.105485
| 0.012158
| 0.038578
| 0.0491
| 0.79986
| 0.793547
| 0.779051
| 0.772738
| 0.750058
| 0.736264
| 0
| 0.059659
| 0.329444
| 8,399
| 253
| 76
| 33.197628
| 0.699751
| 0.033456
| 0
| 0.626437
| 0
| 0.011494
| 0.134238
| 0.005429
| 0
| 0
| 0
| 0
| 0.028736
| 1
| 0.051724
| false
| 0
| 0.022989
| 0
| 0.143678
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2764f6056dca0c2480a97996b9db43fd0791ef1a
| 164
|
py
|
Python
|
home/config/calibre/conversion/search_and_replace.py
|
phongvcao/dotfiles
|
a1f09a7adc5548f27d64954fe6e338658e7a4e2a
|
[
"MIT"
] | 6
|
2015-03-01T02:16:38.000Z
|
2020-08-10T07:20:51.000Z
|
home/config/calibre/conversion/search_and_replace.py
|
phongvcao/dotfiles
|
a1f09a7adc5548f27d64954fe6e338658e7a4e2a
|
[
"MIT"
] | null | null | null |
home/config/calibre/conversion/search_and_replace.py
|
phongvcao/dotfiles
|
a1f09a7adc5548f27d64954fe6e338658e7a4e2a
|
[
"MIT"
] | 1
|
2020-11-11T05:30:52.000Z
|
2020-11-11T05:30:52.000Z
|
{
'sr1_replace' : None,
'search_replace' : '[]',
'sr2_search' : None,
'sr2_replace' : None,
'sr1_search' : None,
'sr3_search' : None,
'sr3_replace' : None,
}
| 18.222222
| 25
| 0.615854
| 20
| 164
| 4.7
| 0.3
| 0.351064
| 0.276596
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044444
| 0.176829
| 164
| 9
| 26
| 18.222222
| 0.651852
| 0
| 0
| 0
| 0
| 0
| 0.478788
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
27ac02929dc7a63642b4281410c94aea51b2553e
| 14,859
|
py
|
Python
|
source/hsicbt/core/engine.py
|
tongjian121/PK-HBaR
|
c564e0f08c2c09e0023384adecfcf25e2d53a8a3
|
[
"MIT"
] | null | null | null |
source/hsicbt/core/engine.py
|
tongjian121/PK-HBaR
|
c564e0f08c2c09e0023384adecfcf25e2d53a8a3
|
[
"MIT"
] | null | null | null |
source/hsicbt/core/engine.py
|
tongjian121/PK-HBaR
|
c564e0f08c2c09e0023384adecfcf25e2d53a8a3
|
[
"MIT"
] | null | null | null |
import collections
from .. import *
from . import *
from .train_misc import *
from .train_hsic import *
from .train_standard import *
from ..utils.path import *
from ..math.admm import *
from ..utils.masks import *
from .train_competitor1 import *
from .train_competitor2 import *
from .train_competitor3 import *
from .train_competitor4 import *
from .train_hsic_prune import *
from .train_hsic_prune_proj import *
import torch
def training_standard(config_dict):
"""
Train model with HBaR or CE only
"""
train_loader, test_loader = get_dataset_from_code(config_dict['data_code'], config_dict['batch_size'])
torch.manual_seed(config_dict['seed'])
model = model_distribution(config_dict)
#config_dict['robustness'] = True
model_single_output = model_distribution(config_dict)
for name, weight in model.named_parameters():
print(name)
# load pretrained model
if 'load_model' in config_dict:
model.load_state_dict(load_model(get_model_path("{}".format(config_dict['load_model']))))
nepoch = config_dict['epochs']
optimizer, scheduler = set_optimizer(config_dict, model, train_loader, \
config_dict['optimizer'], config_dict['learning_rate'], nepoch)
best = 0
log_dict = {}
batch_log_list = []
epoch_log_dict = collections.defaultdict(list)
filename = os.path.splitext(config_dict['model_file'])[0]
#train_loss, train_acc, train_hx, train_hy = misc.get_hsic_epoch(config_dict, model, train_loader)
#test_loss, test_acc, test_hx, test_hy = misc.get_hsic_epoch(config_dict, model, test_loader)
#epoch_log_dict = append_epoch_log_dict(epoch_log_dict, train_loss, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy)
#print("Epoch-[{:03d}]: Train acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}; Test loss: {:.2f}, acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}.".format(0, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy))
for cepoch in range(0, nepoch+1):
if cepoch > 0:
print(get_lr(optimizer))
if config_dict['training_type'] == 'hsictrain':
hsic_prune(cepoch, model, train_loader, optimizer, scheduler, config_dict)
elif config_dict['training_type'] == 'backprop':
standard_train(cepoch, model, train_loader, optimizer, scheduler, config_dict)
elif config_dict['training_type'] == 'competitor1': ### competing method: HSIC BottleNeck
competitor1(cepoch, model, train_loader, optimizer, scheduler, config_dict)
elif config_dict['training_type'] == 'competitor2': ### competing method: HSIC(X, Y-h(x)) + CE
competitor2(cepoch, model, train_loader, optimizer, scheduler, config_dict)
elif config_dict['training_type'] == 'competitor3': ### competing method: adversarial training via mart
competitor3(cepoch, model, train_loader, optimizer, scheduler, config_dict)
elif config_dict['training_type'] == 'competitor4': ### competing method: adversarial training via trades
competitor4(cepoch, model, train_loader, optimizer, scheduler, config_dict)
else:
raise ValueError("Unknown training type or not support [{}]".format(config_dict['training_type']))
train_loss, train_acc, train_hx, train_hy, train_dl = misc.get_hsic_epoch(config_dict, model, train_loader)
test_loss, test_acc, test_hx, test_hy, test_dl = misc.get_hsic_epoch(config_dict, model, test_loader)
epoch_log_dict = append_epoch_log_dict(epoch_log_dict, train_loss, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy)
print("Epoch-[{:03d}]: Train acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}; Test loss: {:.2f}, acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}.".format(cepoch, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy))
# Robustness Analysis
model_single_output.load_state_dict(model.state_dict())
model_single_output.eval()
rob_acc, rob_acc5, rob_hx, rob_hy = misc.eval_robust_epoch(model_single_output, test_loader, config_dict)
epoch_log_dict['rob'].append(rob_acc)
epoch_log_dict['rob_hx'].append(rob_hx)
epoch_log_dict['rob_hy'].append(rob_hy)
if config_dict['save_last_model_only'] and cepoch == nepoch:
save_model(model,get_model_path("{}.pt".format(filename)))
else:
temp = test_acc + rob_acc
if temp > best:
save_model(model,get_model_path("{}.pt".format(filename)))
best = temp
log_dict['epoch_log_dict'] = epoch_log_dict
log_dict['config_dict'] = config_dict
filename = "{}.npy".format(os.path.splitext(config_dict['model_file'])[0])
save_logs(log_dict, get_log_filepath("{}".format(filename)))
return batch_log_list, epoch_log_dict
def training_hsic_prune(config_dict):
"""
Train hsic model parameters with hsic + hard pruning + masked retrain
"""
train_loader, test_loader = get_dataset_from_code(config_dict['data_code'], config_dict['batch_size'])
torch.manual_seed(config_dict['seed'])
# load pre-trained model
model = model_distribution(config_dict)
model.load_state_dict(load_model(get_model_path("{}".format(config_dict['load_model']))))
# distillation teacher model
if config_dict['distill']:
pretrained = deepcopy(model)
pretrained.load_state_dict(torch.load(config_dict['distill_model_path']))
pretrained = pretrained.to(config_dict['device'])
pretrained.eval()
config_dict['pretrained'] = pretrained
if config_dict['distill_loss'] == 'kl':
distillation_criterion = torch.nn.KLDivLoss(log_target=True).to(config_dict['device'])
elif config_dict['distill_loss'] == 'mse' or 'mseml':
distillation_criterion = torch.nn.MSELoss().to(config_dict['device'])
config_dict['distillation_criterion'] = distillation_criterion
# construct single output model for test
# config_dict['robustness'] = True
model_single_output = model_distribution(config_dict)
# optimizer
nepoch = config_dict['epochs']
re_nepoch = config_dict['retrain_ep']
optimizer, scheduler = set_optimizer(config_dict, model, train_loader, \
config_dict['optimizer'], config_dict['learning_rate'], nepoch)
log_dict = {}
batch_log_list = []
epoch_log_dict = collections.defaultdict(list)
# pre-test
train_loss, train_acc, train_hx, train_hy, train_dl = misc.get_hsic_epoch(config_dict, model, train_loader)
test_loss, test_acc, test_hx, test_hy, test_dl = misc.get_hsic_epoch(config_dict, model, test_loader)
epoch_log_dict = append_epoch_log_dict(epoch_log_dict, train_loss, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy)
print("Epoch-[{:03d}]: Train acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, train_dl {:.4f}; Test loss: {:.2f}, acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, test_dl {:.4f}.".format(0, train_acc, train_hx, train_hy, train_dl, test_loss, test_acc, test_hx, test_hy, test_dl))
# Robustness Analysis
model_single_output.load_state_dict(model.state_dict())
model_single_output.eval()
rob_acc, rob_acc5, rob_hx, rob_hy = misc.eval_robust_epoch(model_single_output, test_loader, config_dict)
epoch_log_dict['rob'].append(rob_acc)
epoch_log_dict['rob_hx'].append(rob_hx)
epoch_log_dict['rob_hy'].append(rob_hy)
# Tong: Initializing ADMM; if not admm, do hard pruning only
admm = ADMM(config_dict, model, config=get_pr_path(config_dict), rho=config_dict['rho']) if config_dict['admm'] else None
for cepoch in range(1, nepoch+1):
if config_dict['training_type'] == 'hsicproj':
#Train hsic model parameters with backprop + pruning, in the end of each epoch, do ADMM + hsic projection
hsic_proj_prune(cepoch, model, train_loader, optimizer, scheduler, config_dict, ADMM=admm)
elif config_dict['training_type'] == 'hsictrain':
#Train hsic model parameters with (backprop + hisc) + pruning, in the end of each epoch, do ADMM
hsic_prune(cepoch, model, train_loader, optimizer, scheduler, config_dict, ADMM=admm)
elif config_dict['training_type'] == 'backprop':
#Train hsic model parameters with backprop + pruning, in the end of each epoch, do ADMM
standard_train(cepoch, model, train_loader, optimizer, scheduler, config_dict, ADMM=admm)
else:
raise ValueError("Unknown training type or not support [{}]".format(config_dict['training_type']))
train_loss, train_acc, train_hx, train_hy, train_dl = misc.get_hsic_epoch(config_dict, model, train_loader)
test_loss, test_acc, test_hx, test_hy, test_dl = misc.get_hsic_epoch(config_dict, model, test_loader)
epoch_log_dict = append_epoch_log_dict(epoch_log_dict, train_loss, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy)
print("Epoch-[{:03d}]: Train acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, train_dl {:.4f}; Test loss: {:.2f}, acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, test_dl {:.4f}.".format(cepoch, train_acc, train_hx, train_hy, train_dl, test_loss, test_acc, test_hx, test_hy, test_dl))
# Robustness Analysis
model_single_output.load_state_dict(model.state_dict())
model_single_output.eval()
rob_acc, rob_acc5, rob_hx, rob_hy = misc.eval_robust_epoch(model_single_output, test_loader, config_dict)
epoch_log_dict['rob'].append(rob_acc)
epoch_log_dict['rob_hx'].append(rob_hx)
epoch_log_dict['rob_hy'].append(rob_hy)
print(get_lr(optimizer))
# Tong: if not admm, do hard pruning only
#filename = os.path.splitext(config_dict['model_file'])[0]
#save_model(model,get_model_path("{}.pt".format(filename+'_beforeHardprune')))
# hard prune
hard_prune(admm, model, config_dict['sparsity_type'], option=None)
if config_dict['sparsity_type']=='filter':
test_filter_sparsity(model)
else:
test_irregular_sparsity(model)
masks = get_model_mask(model=model)
train_loss, train_acc, train_hx, train_hy, train_dl = misc.get_hsic_epoch(config_dict, model, train_loader)
test_loss, test_acc, test_hx, test_hy, test_dl = misc.get_hsic_epoch(config_dict, model, test_loader)
epoch_log_dict = append_epoch_log_dict(epoch_log_dict, train_loss, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy)
# print("Epoch-[{:03d}]: Train acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, train_dl {:.4f}; Test loss: {:.2f}, acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, test_dl {:.4f}.".format(0, train_acc, train_hx, train_hy, train_dl, test_loss, test_acc, test_hx, test_hy, test_dl))
print("After hard prune: Train acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, train_dl {:.4f}; Test loss: {:.2f}, acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, test_dl {:.4f}.".format(train_acc, train_hx, train_hy, train_dl, test_loss, test_acc, test_hx, test_hy, test_dl))
# Robustness Analysis
model_single_output.load_state_dict(model.state_dict())
model_single_output.eval()
rob_acc, rob_acc5, rob_hx, rob_hy = misc.eval_robust_epoch(model_single_output, test_loader, config_dict)
epoch_log_dict['rob'].append(rob_acc)
epoch_log_dict['rob_hx'].append(rob_hx)
epoch_log_dict['rob_hy'].append(rob_hy)
# masked retrain
best = 0
train_loader, test_loader = get_dataset_from_code(config_dict['data_code'], config_dict['retrain_bs'])
optimizer, scheduler = set_optimizer(config_dict, model, train_loader, \
config_dict['retrain_opt'], config_dict['retrain_lr'], re_nepoch)
for cepoch in range(1, re_nepoch+1):
# you can also re-write hsic_train function
if config_dict['retraining_type'] == 'hsicproj' or config_dict['retraining_type'] == 'hsictrain':
#Train hsic model parameters with backprop + hsic with masks
hsic_prune(cepoch, model, train_loader, optimizer, scheduler, config_dict, masks=masks)
elif config_dict['retraining_type'] == 'backprop':
#Train hsic model parameters with backprop with masks
standard_train(cepoch, model, train_loader, optimizer, scheduler, config_dict, masks=masks)
else:
raise ValueError("Unknown training type or not support [{}]".format(config_dict['retraining_type']))
train_loss, train_acc, train_hx, train_hy, train_dl = misc.get_hsic_epoch(config_dict, model, train_loader)
test_loss, test_acc, test_hx, test_hy, test_dl = misc.get_hsic_epoch(config_dict, model, test_loader)
epoch_log_dict = append_epoch_log_dict(epoch_log_dict, train_loss, train_acc, train_hx, train_hy, test_loss, test_acc, test_hx, test_hy)
print("Epoch-[{:03d}]: Train acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, train_dl {:.4f}; Test loss: {:.2f}, acc: {:.2f}, hsic_xz: {:.2f}, hsic_yz: {:.2f}, test_dl {:.4f}.".format(cepoch, train_acc, train_hx, train_hy, train_dl, test_loss, test_acc, test_hx, test_hy, test_dl))
# Robustness Analysis
model_single_output.load_state_dict(model.state_dict())
model_single_output.eval()
rob_acc, rob_acc5, rob_hx, rob_hy = misc.eval_robust_epoch(model_single_output, test_loader, config_dict)
epoch_log_dict['rob'].append(rob_acc)
epoch_log_dict['rob_hx'].append(rob_hx)
epoch_log_dict['rob_hy'].append(rob_hy)
print(get_lr(optimizer))
# Save Model
#temp = test_acc + rob_acc
temp = rob_acc
if temp > best:
filename = os.path.splitext(config_dict['model_file'])[0]
print("!!!!!Saving the model at retrain epoch {}".format(cepoch))
save_model(model,get_model_path("{}.pt".format(filename+'_best')))
best = temp
#if config_dict['save_last_model_only'] and cepoch == re_nepoch:
# filename = os.path.splitext(config_dict['model_file'])[0]
# save_model(model,get_model_path("{}.pt".format(filename)))
log_dict['epoch_log_dict'] = epoch_log_dict
#log_dict['config_dict'] = config_dict
filename = "{}.npy".format(os.path.splitext(config_dict['model_file'])[0])
save_logs(log_dict, get_log_filepath("{}".format(filename)))
# Test pruning ratio
test_irregular_sparsity(model)
return batch_log_list, epoch_log_dict
| 55.651685
| 288
| 0.677502
| 2,060
| 14,859
| 4.534466
| 0.085437
| 0.108125
| 0.052671
| 0.030511
| 0.791136
| 0.753131
| 0.752275
| 0.740285
| 0.714806
| 0.693181
| 0
| 0.008884
| 0.197052
| 14,859
| 267
| 289
| 55.651685
| 0.774034
| 0.159365
| 0
| 0.579545
| 0
| 0.028409
| 0.147104
| 0.001772
| 0
| 0
| 0
| 0
| 0
| 1
| 0.011364
| false
| 0
| 0.090909
| 0
| 0.113636
| 0.056818
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
27b7907660846640b258c71c31dddad10d0867f6
| 4,244
|
py
|
Python
|
CircleCityConCTF2021/Crypto/CRT_RSA_solve.py
|
yl-ang/CTF
|
a075231a3dc32630a26f3b2d4dfc1dd9b9f1e0b9
|
[
"MIT"
] | null | null | null |
CircleCityConCTF2021/Crypto/CRT_RSA_solve.py
|
yl-ang/CTF
|
a075231a3dc32630a26f3b2d4dfc1dd9b9f1e0b9
|
[
"MIT"
] | null | null | null |
CircleCityConCTF2021/Crypto/CRT_RSA_solve.py
|
yl-ang/CTF
|
a075231a3dc32630a26f3b2d4dfc1dd9b9f1e0b9
|
[
"MIT"
] | 3
|
2021-06-28T09:52:07.000Z
|
2021-09-22T03:28:40.000Z
|
# from User's Guide to PARI/GP, nth_root function
import libnum
n_0 = 18313667803478867336609004721464541537328973484305462826796382793855753159667702339443214415676107219128019719918729781240367765840170011546130583192904778311406642412055832301895834234050092458894891378245659415453668079516268277621821820816314253525389030994411875738859521385775378994318680298110895022910442167872459649446752807884859578440573460451717182770603357201261838877834565082113563029377616922987738400092690457439097525425733191455006127272117318175252557137776704423298751249687687982939242399995960217891670545776591917279437324424655966555374035972380565105603454122721599641307596329237684195317587
n_1 = 20194467459457647060586516996478370472351267218473917410062391619804366508155615598555934151439965040658239840971767337317396956926547783621869694734101324546348705982578129843495046800965472146299498824698092002656707267929600194580016819675385334043852783023251749457877096316831425135876783876607713235344100191162140401175616183217075255611260047339942560958156070307547443884997807476833178558920808584815204100121025788968550385803770908539890673979000205479656826535064665232908045866184941964720268186377486138453445647534884078844954199823059749774156922214595091852691529313493766002778666818883664405832403
n_2 = 28410407035821399633105602414308666083186296658943720122869492873011020714858272525924383333651592284428901214906611872460164447581815587883155804582069085992375163808745662275133491411336915996399762543519217523867565162464721135784726071214566835068379436095952306868321574023543552212709114558637219985795158790999008762464781584235742497782435874814916996914994622843458737648796476512273155699038887480170809464170867427859436811167822162365878701943537205202829629515767060354955288883378511576712085561459099352295975180411538002583505384685029771639657760193592641463091670959570110199839193007853012047792951
ct_0 = 4361068625491121585959284487341364298014917091167459186815285529598354735142456720602466259897053502006543584155650414108053083187715487460414552189153473176328972836654051104002438654670972840351138096724369732822616030793769716381154959736278166838792024300286881567007214354013293287163863182681969888796359513260199887574592768851482378233523702226160031879160962727499277063367162956148498154268271025542127905089334411348063974019724471911095717624141476012283069088544181538863919281957631181754200250370777952217187591480953121517810770662230820689692425877920149973485291740351240601042031554568416165653801
ct_1 = 7454119914503246454695225608366998910502362663575277057804461920278767763248677179908320434252341988720062910948247234833145541538721789767567216822524509307779250204983551429213791107932957166581434644890426988090302661172536864772938094552788386232242044947782405157429008368192073663951594129377676752306905041733416517122507652313240587554617250337508737466749142455332827859556080609592971327915921976414897414103328089640910405224692254001370474817181338600658683188149268215440111576616804026782469078580075278163035385301354208954742090806396419312598674668782737577467445931682124259183904307994197406247889
ct_2 = 475431757150415548038120878675026605258081422958849322189947529651864550511016854432752841608067858620795144603286556404827027829790131339932716728168413658428417455936312330389421287814427992302961543375036809563812960151703062899930161470602633031599828887098914730417799654684023064362771853376591221374617439483919394574339804160488928252982891682671342232959007865677713493662084854838321612782206385687329676060126776093320146302404930844788632687207893577657763961310494363939265885733023621969573701702862867184316968075660702024069750913111874157011920933780381567012981148057478008081618456449117864142394
# product of all moduli
N_012 = n_0 * n_1 * n_2
# n1 * n2
m_s_0 = n_1 * n_2
# n0 * n2
m_s_1 = n_0 * n_2
# n0 * n1
m_s_2 = n_0 * n_1
crt = libnum.solve_crt([ct_0,ct_1,ct_2], [n_0,n_1,n_2])
c_0 = crt % n_0
c_1 = crt % n_1
c_2 = crt % n_2
result = ((c_0 * m_s_0 * libnum.invmod(m_s_0, n_0)) + (c_1 * m_s_1 * libnum.invmod(m_s_1, n_1)) + (c_2 * m_s_2 * libnum.invmod(m_s_2, n_2))) % N_012
pt = libnum.nroot(result, 3)
print(libnum.n2s(pt))
| 176.833333
| 623
| 0.952639
| 148
| 4,244
| 26.945946
| 0.283784
| 0.004514
| 0.003009
| 0.003009
| 0.005767
| 0.003009
| 0
| 0
| 0
| 0
| 0
| 0.909399
| 0.027333
| 4,244
| 24
| 624
| 176.833333
| 0.056686
| 0.021913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.055556
| 0
| 0.055556
| 0.055556
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
27bcac306ec8a347d6571a77521ca9c03efc5f76
| 466
|
py
|
Python
|
regression/__init__.py
|
sahitpj/MachineLearning
|
2ce5a337ec432daff64a216df6847ef834bcb8d7
|
[
"MIT"
] | 2
|
2019-01-23T15:51:29.000Z
|
2019-02-01T16:50:33.000Z
|
regression/__init__.py
|
sahitpj/MachineLearning
|
2ce5a337ec432daff64a216df6847ef834bcb8d7
|
[
"MIT"
] | null | null | null |
regression/__init__.py
|
sahitpj/MachineLearning
|
2ce5a337ec432daff64a216df6847ef834bcb8d7
|
[
"MIT"
] | null | null | null |
from .linear_np import normalEquationRegression, gradientDescentRegression, gradientDescentAutogradRegression
from .linear_torch import TorchNormalEquationRegression, TorchGradientDescentRegression, TorchGradientDescentAutogradRegression
from .cordinate import coordinateDescent
from .lasso import coordinateDescentLASSO, coordinateDescentLASSOAutoGrad
from .ridge import normalEquationRidgeRegression, TorchridgeRegression
from .sgd import stochasticGradientDescent
| 77.666667
| 127
| 0.912017
| 32
| 466
| 13.21875
| 0.65625
| 0.047281
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.062232
| 466
| 6
| 128
| 77.666667
| 0.967963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fdab267cdfbb07b5dc70dc066366b8ec8f7f5694
| 167
|
py
|
Python
|
shadowsocks_manager/dynamicmethod/views.py
|
alexzhangs/shadowsocks-manager
|
211be82a796ee124075687b99c3af5018d6cca2c
|
[
"MIT"
] | 5
|
2019-09-26T10:47:12.000Z
|
2022-03-31T10:33:27.000Z
|
shadowsocks_manager/dynamicmethod/views.py
|
alexzhangs/shadowsocks-manager
|
211be82a796ee124075687b99c3af5018d6cca2c
|
[
"MIT"
] | 4
|
2019-09-26T10:53:53.000Z
|
2021-04-03T18:14:19.000Z
|
shadowsocks_manager/singleton/views.py
|
alexzhangs/shadowsocks-manager
|
211be82a796ee124075687b99c3af5018d6cca2c
|
[
"MIT"
] | 1
|
2021-03-30T07:25:27.000Z
|
2021-03-30T07:25:27.000Z
|
# -*- coding: utf-8 -*-
# py2.7 and py3 compatibility imports
from __future__ import unicode_literals
from django.shortcuts import render
# Create your views here.
| 18.555556
| 39
| 0.754491
| 23
| 167
| 5.26087
| 0.913043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.161677
| 167
| 8
| 40
| 20.875
| 0.835714
| 0.48503
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fdcf4a6b529b80ac1a9149d44f52f27983124c94
| 782
|
py
|
Python
|
{{cookiecutter.repo_name}}/tests/test_{{cookiecutter.repo_name}}.py
|
LSSTDESC/desc_package_template
|
d796c30055916d6039b2e9c565c9aa75aa360e41
|
[
"BSD-3-Clause"
] | 2
|
2016-05-16T17:38:33.000Z
|
2016-09-12T21:58:41.000Z
|
{{cookiecutter.repo_name}}/tests/test_{{cookiecutter.repo_name}}.py
|
LSSTDESC/desc_package_template
|
d796c30055916d6039b2e9c565c9aa75aa360e41
|
[
"BSD-3-Clause"
] | 5
|
2017-02-07T17:32:46.000Z
|
2018-06-18T23:28:15.000Z
|
{{cookiecutter.repo_name}}/tests/test_{{cookiecutter.repo_name}}.py
|
DarkEnergyScienceCollaboration/desc_package_template
|
d796c30055916d6039b2e9c565c9aa75aa360e41
|
[
"BSD-3-Clause"
] | 4
|
2017-12-05T12:38:26.000Z
|
2020-10-01T17:14:45.000Z
|
"""
Example unit tests for {{cookiecutter.repo_name}} package
"""
import unittest
import desc.{{cookiecutter.repo_name|lower}}
class {{cookiecutter.repo_name}}TestCase(unittest.TestCase):
def setUp(self):
self.message = 'Hello, world'
def tearDown(self):
pass
def test_run(self):
foo = desc.{{cookiecutter.repo_name|lower}}.{{cookiecutter.repo_name}}(self.message)
self.assertEqual(foo.run(), self.message)
def test_failure(self):
self.assertRaises(TypeError, desc.{{cookiecutter.repo_name|lower}}.{{cookiecutter.repo_name}})
foo = desc.{{cookiecutter.repo_name|lower}}.{{cookiecutter.repo_name}}(self.message)
self.assertRaises(RuntimeError, foo.run, True)
if __name__ == '__main__':
unittest.main()
| 31.28
| 102
| 0.689258
| 92
| 782
| 5.652174
| 0.358696
| 0.276923
| 0.346154
| 0.184615
| 0.407692
| 0.351923
| 0.351923
| 0.351923
| 0.257692
| 0.257692
| 0
| 0
| 0.161125
| 782
| 24
| 103
| 32.583333
| 0.792683
| 0
| 0
| 0.125
| 0
| 0
| 0.027894
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 0
| null | null | 0.0625
| 0.125
| null | null | 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
fdf645dc3f87ab3b3a14f2345bff8e7943771578
| 54
|
py
|
Python
|
sso_tools/lightcurves/__init__.py
|
dirac-institute/sso_tools
|
e07e057a23ea83d39bf2cf16af2b1353dd829837
|
[
"MIT"
] | 1
|
2018-11-08T23:13:22.000Z
|
2018-11-08T23:13:22.000Z
|
sso_tools/lightcurves/__init__.py
|
dirac-institute/sso_tools
|
e07e057a23ea83d39bf2cf16af2b1353dd829837
|
[
"MIT"
] | null | null | null |
sso_tools/lightcurves/__init__.py
|
dirac-institute/sso_tools
|
e07e057a23ea83d39bf2cf16af2b1353dd829837
|
[
"MIT"
] | 1
|
2021-12-16T03:40:44.000Z
|
2021-12-16T03:40:44.000Z
|
"""
sso_tools.lightcurve
"""
from .lc_utils import *
| 9
| 23
| 0.685185
| 7
| 54
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 54
| 5
| 24
| 10.8
| 0.76087
| 0.37037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e382ff548504662cd017b1f046f8af9fb5e558a8
| 104
|
py
|
Python
|
logica-de-programacao/aula2.py
|
agnaldom/impactar-ads
|
2f50ccedc2f8a8d61e0877dd1226cea68d426069
|
[
"MIT"
] | null | null | null |
logica-de-programacao/aula2.py
|
agnaldom/impactar-ads
|
2f50ccedc2f8a8d61e0877dd1226cea68d426069
|
[
"MIT"
] | null | null | null |
logica-de-programacao/aula2.py
|
agnaldom/impactar-ads
|
2f50ccedc2f8a8d61e0877dd1226cea68d426069
|
[
"MIT"
] | null | null | null |
N1 = int(input("Digite o primeiro numero: "))
N2 = int(input("Digite o segundo numero:"))
print(N1+N2)
| 20.8
| 45
| 0.673077
| 17
| 104
| 4.117647
| 0.588235
| 0.228571
| 0.4
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044944
| 0.144231
| 104
| 4
| 46
| 26
| 0.741573
| 0
| 0
| 0
| 0
| 0
| 0.480769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8b8264b65e149f6f1e170c92827fec4e784a84ac
| 212
|
py
|
Python
|
tests/modules/contrib/test_octoprint.py
|
spxtr/bumblebee-status
|
45125f39af8323775aeabf809ae5ae80cfe3ccd9
|
[
"MIT"
] | 1,089
|
2016-11-06T10:02:53.000Z
|
2022-03-26T12:53:30.000Z
|
tests/modules/contrib/test_octoprint.py
|
spxtr/bumblebee-status
|
45125f39af8323775aeabf809ae5ae80cfe3ccd9
|
[
"MIT"
] | 817
|
2016-11-05T05:42:39.000Z
|
2022-03-25T19:43:52.000Z
|
tests/modules/contrib/test_octoprint.py
|
spxtr/bumblebee-status
|
45125f39af8323775aeabf809ae5ae80cfe3ccd9
|
[
"MIT"
] | 317
|
2016-11-05T00:35:06.000Z
|
2022-03-24T13:35:03.000Z
|
import pytest
pytest.importorskip("tkinter")
pytest.importorskip("PIL")
pytest.importorskip("requests")
pytest.importorskip("simplejson")
def test_load_module():
__import__("modules.contrib.octoprint")
| 15.142857
| 43
| 0.773585
| 22
| 212
| 7.181818
| 0.636364
| 0.455696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089623
| 212
| 13
| 44
| 16.307692
| 0.818653
| 0
| 0
| 0
| 0
| 0
| 0.251185
| 0.118483
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0
| 0.857143
| 0
| 1
| 0.142857
| 1
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
8bb3c2551969df8414b955b0c6ef312c7604fe13
| 263
|
py
|
Python
|
mappers/MoneyAmountMapper.py
|
NikolaySohryakov/tinkoff_invest
|
58e2bf88e821046d2884468164b822847f844171
|
[
"MIT"
] | null | null | null |
mappers/MoneyAmountMapper.py
|
NikolaySohryakov/tinkoff_invest
|
58e2bf88e821046d2884468164b822847f844171
|
[
"MIT"
] | null | null | null |
mappers/MoneyAmountMapper.py
|
NikolaySohryakov/tinkoff_invest
|
58e2bf88e821046d2884468164b822847f844171
|
[
"MIT"
] | null | null | null |
from portfolio import MoneyAmount
class MoneyAmountMapper:
@staticmethod
def map(tinkoff_money_amount) -> MoneyAmount:
return MoneyAmount(value=tinkoff_money_amount.value,
currency=tinkoff_money_amount.currency.value)
| 29.222222
| 72
| 0.718631
| 26
| 263
| 7.038462
| 0.576923
| 0.196721
| 0.295082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.224335
| 263
| 8
| 73
| 32.875
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0.166667
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
4737dcb1b28eb674075a19908a88e16401989558
| 96
|
py
|
Python
|
dtr_code/shared/torch_models/lstm/__init__.py
|
uwsampl/dtr-prototype
|
eff53cc4804cc7d6246a6e5086861ce2b846f62b
|
[
"Linux-OpenIB"
] | 90
|
2020-06-18T05:32:06.000Z
|
2022-03-28T13:05:17.000Z
|
dtr_code/shared/torch_models/lstm/__init__.py
|
merrymercy/dtr-prototype
|
bf40e182453a7d8d23581ea68f32a9d7d2037d62
|
[
"Linux-OpenIB"
] | 5
|
2020-07-02T02:25:16.000Z
|
2022-03-24T05:50:30.000Z
|
dtr_code/shared/torch_models/lstm/__init__.py
|
uwsampl/dtr-prototype
|
eff53cc4804cc7d6246a6e5086861ce2b846f62b
|
[
"Linux-OpenIB"
] | 13
|
2020-06-27T07:01:54.000Z
|
2022-01-18T07:31:01.000Z
|
from .model import LSTMClassifier, GRUClassifier, LSTM, LSTMCell
from .data_processing import *
| 32
| 64
| 0.822917
| 11
| 96
| 7.090909
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 96
| 2
| 65
| 48
| 0.917647
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
474cc72ba788d5f9593532d306d16c48e853a78f
| 37
|
py
|
Python
|
src/overwatch/__init__.py
|
siddk/mnist-vae-scaling
|
2a0a0700f73bad9b35cf32b3a2e0041dd456d7ec
|
[
"MIT"
] | 3
|
2022-01-29T20:10:42.000Z
|
2022-02-11T21:28:31.000Z
|
src/overwatch/__init__.py
|
siddk/mnist-vae-scaling
|
2a0a0700f73bad9b35cf32b3a2e0041dd456d7ec
|
[
"MIT"
] | null | null | null |
src/overwatch/__init__.py
|
siddk/mnist-vae-scaling
|
2a0a0700f73bad9b35cf32b3a2e0041dd456d7ec
|
[
"MIT"
] | 2
|
2022-01-31T03:38:06.000Z
|
2022-02-11T21:28:39.000Z
|
from .overwatch import get_overwatch
| 18.5
| 36
| 0.864865
| 5
| 37
| 6.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 37
| 1
| 37
| 37
| 0.939394
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4753fa7bdcddd6a61cfedbb496adf14907e449f9
| 116
|
py
|
Python
|
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/transformations/constantfolding/data/wrong_assoc/out_1.py
|
JetBrains-Research/ast-transformations
|
0ab408af3275b520cc87a473f418c4b4dfcb0284
|
[
"MIT"
] | 8
|
2021-01-19T21:15:54.000Z
|
2022-02-23T19:16:25.000Z
|
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/transformations/constantfolding/data/wrong_assoc/out_1.py
|
JetBrains-Research/ast-transformations
|
0ab408af3275b520cc87a473f418c4b4dfcb0284
|
[
"MIT"
] | 4
|
2020-11-17T14:28:25.000Z
|
2022-02-24T07:54:28.000Z
|
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/transformations/constantfolding/data/wrong_assoc/out_1.py
|
nbirillo/ast-transformations
|
717706765a2da29087a0de768fc851698886dd65
|
[
"MIT"
] | 1
|
2022-02-23T19:16:30.000Z
|
2022-02-23T19:16:30.000Z
|
x = int(input())
_ = ((x) + (3))
_ = ((x) * (6))
_ = ((x) & (2))
_ = ((x) ^ (1))
_ = ((x) | (3))
_ = ((x) + (10))
| 11.6
| 16
| 0.241379
| 15
| 116
| 1.466667
| 0.533333
| 0.181818
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08642
| 0.301724
| 116
| 9
| 17
| 12.888889
| 0.185185
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
47b02f702a0f316794bb13f7bc16bdc773c18238
| 53
|
py
|
Python
|
carberretta/bot/__init__.py
|
namanyt/Carberretta
|
182733caeff3da475f052bfc7fa6090244d5f2dc
|
[
"BSD-3-Clause"
] | 21
|
2020-09-30T11:15:40.000Z
|
2022-03-11T09:46:48.000Z
|
carberretta/bot/__init__.py
|
namanyt/Carberretta
|
182733caeff3da475f052bfc7fa6090244d5f2dc
|
[
"BSD-3-Clause"
] | 110
|
2020-09-27T14:37:05.000Z
|
2021-12-17T17:21:33.000Z
|
carberretta/bot/__init__.py
|
namanyt/Carberretta
|
182733caeff3da475f052bfc7fa6090244d5f2dc
|
[
"BSD-3-Clause"
] | 26
|
2020-09-21T19:38:12.000Z
|
2022-02-08T18:41:58.000Z
|
from carberretta import Config
from .bot import Bot
| 13.25
| 30
| 0.811321
| 8
| 53
| 5.375
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169811
| 53
| 3
| 31
| 17.666667
| 0.977273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
47bc574b7e9df5df4b14b50fa26a74c49b301073
| 887
|
py
|
Python
|
selenium_chrome/chrome_addons/ublock_origin_addon_settings.py
|
kkristof200/selenium_chrome
|
1bb1f2ac6c0254704607f6f28d80029546043c11
|
[
"MIT"
] | 3
|
2021-07-27T05:22:42.000Z
|
2022-03-21T10:55:32.000Z
|
selenium_chrome/chrome_addons/ublock_origin_addon_settings.py
|
kkristof200/selenium_chrome
|
1bb1f2ac6c0254704607f6f28d80029546043c11
|
[
"MIT"
] | null | null | null |
selenium_chrome/chrome_addons/ublock_origin_addon_settings.py
|
kkristof200/selenium_chrome
|
1bb1f2ac6c0254704607f6f28d80029546043c11
|
[
"MIT"
] | 1
|
2021-11-24T07:34:35.000Z
|
2021-11-24T07:34:35.000Z
|
# ------------------------------------------------------------ Imports ----------------------------------------------------------- #
# Local
from .builtin_addon_install_settings import BuiltinAddonInstallSettings
# -------------------------------------------------------------------------------------------------------------------------------- #
# ----------------------------------------------- class: UBlockOriginAddonSettings ----------------------------------------------- #
class UBlockOriginAddonSettings(BuiltinAddonInstallSettings):
# --------------------------------------------------- Public properties -------------------------------------------------- #
_name = 'ublock_origin'
_id = 'cjpalhdlnbpafiamejdnhcphjbkeiagm'
# -------------------------------------------------------------------------------------------------------------------------------- #
| 44.35
| 132
| 0.264938
| 21
| 887
| 10.904762
| 0.857143
| 0.262009
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067644
| 887
| 20
| 133
| 44.35
| 0.276904
| 0.728298
| 0
| 0
| 0
| 0
| 0.196507
| 0.139738
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 1
| 0
| 1
| 0
| 1
| null | 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
47cf6d9349b4800d1b2ce921e0a9646471204ede
| 104
|
py
|
Python
|
shortener/admin.py
|
Shegami/project-1
|
9fca866cad831923c048543b765d0e364522f005
|
[
"MIT"
] | null | null | null |
shortener/admin.py
|
Shegami/project-1
|
9fca866cad831923c048543b765d0e364522f005
|
[
"MIT"
] | null | null | null |
shortener/admin.py
|
Shegami/project-1
|
9fca866cad831923c048543b765d0e364522f005
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from shortener.models import Shortener
admin.site.register(Shortener)
| 20.8
| 38
| 0.846154
| 14
| 104
| 6.285714
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 104
| 4
| 39
| 26
| 0.93617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9a0387b6dcbe78f7d978b9de4ec0396588ef3bf5
| 4,670
|
py
|
Python
|
src/backend/tasks_io/datafeeds/parsers/fms_api/tests/fms_api_event_rankings_parser_test.py
|
ofekashery/the-blue-alliance
|
df0e47d054161fe742ac6198a6684247d0713279
|
[
"MIT"
] | null | null | null |
src/backend/tasks_io/datafeeds/parsers/fms_api/tests/fms_api_event_rankings_parser_test.py
|
ofekashery/the-blue-alliance
|
df0e47d054161fe742ac6198a6684247d0713279
|
[
"MIT"
] | null | null | null |
src/backend/tasks_io/datafeeds/parsers/fms_api/tests/fms_api_event_rankings_parser_test.py
|
ofekashery/the-blue-alliance
|
df0e47d054161fe742ac6198a6684247d0713279
|
[
"MIT"
] | null | null | null |
import json
from google.cloud import ndb
from backend.tasks_io.datafeeds.parsers.fms_api.fms_api_event_rankings_parser import (
FMSAPIEventRankingsParser,
)
def test_parse_event_rankings_none(test_data_importer, ndb_client: ndb.Client):
path = test_data_importer._get_path(__file__, "data/2015miket_rankings_none.json")
with open(path, "r") as f:
data = json.load(f)
with ndb_client.context():
rankings = FMSAPIEventRankingsParser(2015).parse(data)
assert rankings is None
def test_parse_event_rankings_2015(test_data_importer, ndb_client: ndb.Client):
path = test_data_importer._get_path(__file__, "data/2015miket_rankings.json")
with open(path, "r") as f:
data = json.load(f)
with ndb_client.context():
rankings = FMSAPIEventRankingsParser(2015).parse(data)
assert rankings is not None
assert len(rankings) == 41
# Spot check rankings
one = rankings[0]
assert one is not None
assert one == {
"dq": 0,
"matches_played": 12,
"qual_average": 76.83,
"rank": 1,
"record": None,
"sort_orders": [76.83, 160.0, 12.0, 348.0, 262.0, 140.0],
"team_key": "frc314",
}
ten = rankings[9]
assert ten is not None
assert ten == {
"dq": 0,
"matches_played": 12,
"qual_average": 42.5,
"rank": 10,
"record": None,
"sort_orders": [42.5, 40.0, 56.0, 116.0, 146.0, 158.0],
"team_key": "frc5282",
}
def test_parse_event_rankings_2016(test_data_importer, ndb_client: ndb.Client):
path = test_data_importer._get_path(__file__, "data/2016miket_rankings.json")
with open(path, "r") as f:
data = json.load(f)
with ndb_client.context():
rankings = FMSAPIEventRankingsParser(2016).parse(data)
assert rankings is not None
assert len(rankings) == 40
# Spot check rankings
one = rankings[0]
assert one is not None
assert one == {
"dq": 0,
"matches_played": 12,
"qual_average": None,
"rank": 1,
"record": {"losses": 2, "ties": 0, "wins": 10},
"sort_orders": [33.0, 166.0, 130.0, 99.0, 625.0, 0.48],
"team_key": "frc5150",
}
ten = rankings[9]
assert ten is not None
assert ten == {
"dq": 0,
"matches_played": 12,
"qual_average": None,
"rank": 10,
"record": {"losses": 5, "ties": 0, "wins": 7},
"sort_orders": [23.0, 236.0, 125.0, 113.0, 595.0, 0.13],
"team_key": "frc3535",
}
def test_parse_event_rankings_2017(test_data_importer, ndb_client: ndb.Client):
path = test_data_importer._get_path(__file__, "data/2017miket_rankings.json")
with open(path, "r") as f:
data = json.load(f)
with ndb_client.context():
rankings = FMSAPIEventRankingsParser(2017).parse(data)
assert rankings is not None
assert len(rankings) == 38
# Spot check rankings
one = rankings[0]
assert one is not None
assert one == {
"dq": 0,
"matches_played": 12,
"qual_average": None,
"rank": 1,
"record": {"losses": 2, "ties": 0, "wins": 10},
"sort_orders": [1.66, 2661.0, 629.0, 1320.0, 950.0, 6.0],
"team_key": "frc2619",
}
ten = rankings[9]
assert ten is not None
assert ten == {
"dq": 0,
"matches_played": 12,
"qual_average": None,
"rank": 10,
"record": {"losses": 5, "ties": 0, "wins": 7},
"sort_orders": [1.16, 2695.0, 395.0, 1400.0, 1050.0, 5.0],
"team_key": "frc5150",
}
def test_parse_event_rankings_2020(test_data_importer, ndb_client: ndb.Client):
path = test_data_importer._get_path(__file__, "data/2020miket_rankings.json")
with open(path, "r") as f:
data = json.load(f)
with ndb_client.context():
rankings = FMSAPIEventRankingsParser(2020).parse(data)
assert rankings is not None
assert len(rankings) == 40
# Spot check rankings
one = rankings[0]
assert one is not None
assert one == {
"dq": 0,
"matches_played": 12,
"qual_average": None,
"rank": 1,
"record": {"losses": 0, "ties": 0, "wins": 12},
"sort_orders": [2.5, 485.0, 620.0, 350.0, 0.0, 0.0],
"team_key": "frc2337",
}
ten = rankings[9]
assert ten is not None
assert ten == {
"dq": 0,
"matches_played": 12,
"qual_average": None,
"rank": 10,
"record": {"losses": 3, "ties": 1, "wins": 8},
"sort_orders": [1.5, 361.0, 255.0, 239.0, 0.0, 0.0],
"team_key": "frc5641",
}
| 27.964072
| 86
| 0.583512
| 634
| 4,670
| 4.102524
| 0.195584
| 0.051903
| 0.041522
| 0.069204
| 0.785083
| 0.737024
| 0.737024
| 0.727797
| 0.727797
| 0.727797
| 0
| 0.098856
| 0.270021
| 4,670
| 166
| 87
| 28.13253
| 0.664124
| 0.016916
| 0
| 0.643939
| 0
| 0
| 0.162451
| 0.031618
| 0
| 0
| 0
| 0
| 0.189394
| 1
| 0.037879
| false
| 0
| 0.098485
| 0
| 0.136364
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d0347bba5b4656895e282c77ae2d5f51b8a515c3
| 51
|
py
|
Python
|
opendatatools/datayes/__init__.py
|
solider245/OpenData
|
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
|
[
"Apache-2.0"
] | 1,179
|
2018-05-28T07:14:41.000Z
|
2022-03-27T16:03:51.000Z
|
opendatatools/datayes/__init__.py
|
taoyeah/OpenData
|
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
|
[
"Apache-2.0"
] | 42
|
2018-07-05T02:44:56.000Z
|
2022-03-29T12:12:30.000Z
|
opendatatools/datayes/__init__.py
|
taoyeah/OpenData
|
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
|
[
"Apache-2.0"
] | 297
|
2018-05-28T07:39:38.000Z
|
2022-03-28T02:35:59.000Z
|
# encoding: utf-8
from .datayes_interface import *
| 17
| 32
| 0.764706
| 7
| 51
| 5.428571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022727
| 0.137255
| 51
| 3
| 32
| 17
| 0.840909
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d08c7a9d21a57dec9d106eb185131ad27a7c7b01
| 116
|
py
|
Python
|
myfav/admin.py
|
MahoMori/my_fav_list
|
47b2b6f95353868fe7e6db73e625d74d43c7d85d
|
[
"MIT"
] | null | null | null |
myfav/admin.py
|
MahoMori/my_fav_list
|
47b2b6f95353868fe7e6db73e625d74d43c7d85d
|
[
"MIT"
] | null | null | null |
myfav/admin.py
|
MahoMori/my_fav_list
|
47b2b6f95353868fe7e6db73e625d74d43c7d85d
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Myfav
# Register your models here.
admin.site.register(Myfav)
| 19.333333
| 32
| 0.801724
| 17
| 116
| 5.470588
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12931
| 116
| 6
| 33
| 19.333333
| 0.920792
| 0.224138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d09fa320c70da7d72030bdd3e92abb6b326d8b9d
| 559
|
py
|
Python
|
2016_ENSG_PYTHON_COURS/transformations/__init__.py
|
yoyonel/2016_ENSG_PYTHON_COURS
|
dcac5bdaf4e203f6cebf2e015d8b06fb937564c0
|
[
"MIT"
] | null | null | null |
2016_ENSG_PYTHON_COURS/transformations/__init__.py
|
yoyonel/2016_ENSG_PYTHON_COURS
|
dcac5bdaf4e203f6cebf2e015d8b06fb937564c0
|
[
"MIT"
] | 1
|
2016-09-04T08:53:26.000Z
|
2016-09-04T08:53:26.000Z
|
2016_ENSG_PYTHON_COURS/transformations/__init__.py
|
yoyonel/2016_ENSG_PYTHON_COURS
|
dcac5bdaf4e203f6cebf2e015d8b06fb937564c0
|
[
"MIT"
] | null | null | null |
# Python 2 and 3:
# To make Py2 code safer (more like Py3) by preventing
# implicit relative imports, you can also add this to the top:
# from __future__ import absolute_import
# from transformations import quaternion_from_euler, quaternion_matrix, euler_matrix
# from transformations import euler_matrix
try:
from transformations import euler_matrix
except ImportError:
# url: https://docs.python.org/3/reference/import.html
from .transformations import euler_matrix
# url: http://pythoncentral.io/how-to-create-a-python-package/
| 37.266667
| 85
| 0.767442
| 77
| 559
| 5.415584
| 0.623377
| 0.182254
| 0.239808
| 0.215827
| 0.258993
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010661
| 0.161002
| 559
| 14
| 86
| 39.928571
| 0.878465
| 0.726297
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d0ba6b298b8b57a5b3cbf2349eed6715a94a3e27
| 11,934
|
py
|
Python
|
tests/band_tests.py
|
fortyninemaps/karta
|
b35d8cbcfb62e9f1d826a5c73605d34a0c0990b6
|
[
"MIT"
] | 84
|
2016-03-18T15:42:02.000Z
|
2022-02-20T15:12:28.000Z
|
tests/band_tests.py
|
fortyninemaps/karta
|
b35d8cbcfb62e9f1d826a5c73605d34a0c0990b6
|
[
"MIT"
] | 21
|
2016-03-06T01:47:38.000Z
|
2019-01-13T20:33:52.000Z
|
tests/band_tests.py
|
fortyninemaps/karta
|
b35d8cbcfb62e9f1d826a5c73605d34a0c0990b6
|
[
"MIT"
] | 12
|
2016-03-18T15:33:53.000Z
|
2022-03-02T08:18:22.000Z
|
import unittest
import numpy as np
import numpy.testing as npt
from karta.raster import SimpleBand, CompressedBand
from karta.raster.band import BandIndexer
class GenericBandTests(object):
""" Tests that all Band classes must pass """
def test_get_dtype(self):
band = self.type((64, 64), np.float64, **self.initkwargs)
self.assertEqual(band.dtype, np.float64)
#def test_setblock_getblock_striped(self):
# x, y = np.meshgrid(np.arange(832), np.arange(1024))
# d = (x**2+np.sqrt(y))[::2, ::3]
# band = self.type((1024, 1024), np.float64, **self.initkwargs)
# bi = BandIndexer([band])
# bi[::2, 128:960:3, 0] = d
# self.assertEqual(np.sum(bi[::2, 128:960:3, 0]-d), 0.0)
def test_setblock_getblock_full(self):
x, y = np.meshgrid(np.arange(1024), np.arange(1024))
d = x**2+np.sqrt(y)
band = self.type((1024, 1024), np.float64, **self.initkwargs)
band.setblock(0, 0, d)
self.assertEqual(np.sum(band.getblock(0, 0, 1024, 1024) - d), 0.0)
def test_setblock_getblock_partial(self):
x, y = np.meshgrid(np.arange(1024), np.arange(832))
d = x**2+np.sqrt(y)
band = self.type((1024, 1024), np.float64, **self.initkwargs)
band.setblock(128, 0, d)
self.assertEqual(np.sum(band.getblock(128, 0, 832, 1024) - d), 0.0)
def test_get_scalar(self):
x, y = np.meshgrid(np.arange(1024), np.arange(1024))
d = x**2+np.sqrt(y)
band = self.type((1024, 1024), np.float64, **self.initkwargs)
band.setblock(0, 0, d)
self.assertTrue(band.getblock(4, 3, 1, 1).shape, (1, 1))
self.assertEqual(band.getblock(4, 3, 1, 1)[0], 11.0)
def test_initval(self):
band = self.type((1024, 1024), np.float64, initval=0.0)
self.assertTrue(band is not None)
class SimpleBandTests(unittest.TestCase, GenericBandTests):
def setUp(self):
self.type = SimpleBand
self.initkwargs = dict()
class CompressedBandTests(unittest.TestCase, GenericBandTests):
def setUp(self):
self.type = CompressedBand
self.initkwargs = dict(chunksize=(256, 256))
class BandIndexerTests(unittest.TestCase):
def test_get_set_typeerror(self):
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
indexer = BandIndexer(bands)
with self.assertRaises(TypeError):
indexer[None]
with self.assertRaises(TypeError):
indexer[None] = 3.0
def test_get_masked(self):
values = np.ones([16, 16])
band = CompressedBand((16, 16), np.float32)
band.setblock(0, 0, values)
indexer = BandIndexer([band])
mask = np.zeros([16, 16], dtype=np.bool)
mask[8:, 2:] = True
self.assertEqual(np.sum(indexer[mask]), 112)
def test_set_masked(self):
values = np.ones([16, 16])
band = CompressedBand((16, 16), np.float32)
band.setblock(0, 0, values)
indexer = BandIndexer([band])
mask = np.zeros([16, 16], dtype=np.bool)
mask[8:, 2:] = True
indexer[mask] = -1
self.assertEqual(np.sum(indexer[:,:]), 32)
def test_get_errors(self):
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
indexer = BandIndexer(bands)
with self.assertRaises(TypeError):
indexer["a", 0, 0]
with self.assertRaises(TypeError):
indexer[0, [1, 3], 0]
with self.assertRaises(TypeError):
indexer[0, 0, None]
def test_set_errors(self):
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
indexer = BandIndexer(bands)
with self.assertRaises(TypeError):
indexer["a", 0, 0] = 1.0
with self.assertRaises(TypeError):
indexer[0, [1, 3], 0] = 1.0
with self.assertRaises(TypeError):
indexer[0, 0, None] = 1.0
def test_get_integer(self):
values = np.ones([16, 16])
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
bands[0].setblock(0, 0, values)
bands[1].setblock(0, 0, 2*values)
bands[2].setblock(0, 0, 3*values)
indexer = BandIndexer(bands)
result = indexer[10,2]
npt.assert_equal(result, np.array([1.0, 2.0, 3.0]))
result = indexer[10,2,:]
npt.assert_equal(result, np.array([1.0, 2.0, 3.0]))
# make sure it works with a scalar band index
result = indexer[10,2,1]
self.assertEqual(result, 2.0)
def test_set_integer(self):
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
indexer = BandIndexer(bands)
indexer[3,4,0] = -1.0
self.assertEqual(bands[0].getblock(3, 4, 1, 1)[0], -1.0)
indexer[4,5,:] = np.array([1.0, 2.0, 3.0])
self.assertEqual(bands[0].getblock(4, 5, 1, 1)[0], 1.0)
self.assertEqual(bands[1].getblock(4, 5, 1, 1)[0], 2.0)
self.assertEqual(bands[2].getblock(4, 5, 1, 1)[0], 3.0)
indexer[5,6,:] = 5.0
self.assertEqual(bands[0].getblock(5, 6, 1, 1)[0], 5.0)
self.assertEqual(bands[1].getblock(5, 6, 1, 1)[0], 5.0)
self.assertEqual(bands[2].getblock(5, 6, 1, 1)[0], 5.0)
def test_get_slice(self):
values = np.ones([16, 16])
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
bands[0].setblock(0, 0, values)
bands[1].setblock(0, 0, 2*values)
bands[2].setblock(0, 0, 3*values)
indexer = BandIndexer(bands)
result = indexer[4:7,2:8,:]
self.assertEqual(result.shape, (3, 6, 3))
npt.assert_equal(result[0,0,:], np.array([1.0, 2.0, 3.0]))
result = indexer[12:]
self.assertEqual(result.shape, (4, 16, 3))
npt.assert_equal(result[0,0,:], np.array([1.0, 2.0, 3.0]))
# make sure it works with a scalar band index
result = indexer[4:7,2:8,1]
self.assertEqual(result.shape, (3, 6))
npt.assert_equal(result, 2.0)
def test_set_slice(self):
values = np.ones([16, 16])
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
indexer = BandIndexer(bands)
indexer[:,:,0] = values
indexer[:,:,1:] = 2*values
npt.assert_equal(bands[0].getblock(0, 0, 16, 16), 1.0)
npt.assert_equal(bands[1].getblock(0, 0, 16, 16), 2.0)
npt.assert_equal(bands[2].getblock(0, 0, 16, 16), 2.0)
indexer[:,:,1:] = np.dstack([2*values, 3*values])
npt.assert_equal(bands[1].getblock(0, 0, 16, 16), 2.0)
npt.assert_equal(bands[2].getblock(0, 0, 16, 16), 3.0)
def test_get_mask2(self):
values = np.ones([3, 3])
bands = [CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32)]
bands[0].setblock(0, 0, values)
bands[1].setblock(0, 0, 2*values)
bands[2].setblock(0, 0, 3*values)
indexer = BandIndexer(bands)
mask = np.array([[True, False, False], [False, True, False], [False, False, True]])
result = indexer[mask]
npt.assert_equal(np.tile(np.array([1, 2, 3]), (3, 1)), result)
def test_set_mask2(self):
values = np.ones([3, 3])
bands = [CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32)]
bands[0].setblock(0, 0, values)
bands[1].setblock(0, 0, 2*values)
bands[2].setblock(0, 0, 3*values)
indexer = BandIndexer(bands)
mask = np.array([[True, False, False], [False, True, False], [False, False, True]])
indexer[mask] = -1
for band in bands:
self.assertEqual(band.getblock(0, 0, 1, 1)[0], -1.0)
self.assertEqual(band.getblock(1, 1, 1, 1)[0], -1.0)
self.assertEqual(band.getblock(2, 2, 1, 1)[0], -1.0)
def test_get_mask3(self):
values = np.ones([3, 3])
bands = [CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32)]
bands[0].setblock(0, 0, values)
bands[1].setblock(0, 0, 2*values)
bands[2].setblock(0, 0, 3*values)
indexer = BandIndexer(bands)
# Create mask in band, row, column order than use np.moveaxis to put in
# row, column, band order for karta
mask = np.array([
[[True, False, False], [False, True, False], [False, False, True]],
[[False, False, False], [False, False, False], [False, True, False]],
[[True, False, False], [False, False, False], [True, False, True]]])
result = indexer[np.moveaxis(mask, 0, -1)]
expected = np.array([1, 3, 1, 3, 2, 1, 3])
npt.assert_equal(expected, result)
def test_set_mask3(self):
values = np.ones([3, 3])
bands = [CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32),
CompressedBand((3, 3), np.float32)]
bands[0].setblock(0, 0, values)
bands[1].setblock(0, 0, 2*values)
bands[2].setblock(0, 0, 3*values)
indexer = BandIndexer(bands)
# Create mask in band, row, column order than use np.moveaxis to put in
# row, column, band order for karta
mask = np.array([
[[True, False, False], [False, True, False], [False, False, True]],
[[False, False, False], [False, False, False], [False, True, False]],
[[True, False, False], [False, False, False], [True, False, True]]])
indexer[np.moveaxis(mask, 0, -1)] = -1
self.assertEqual(bands[0].getblock(0, 0, 1, 1)[0], -1)
self.assertEqual(bands[1].getblock(2, 1, 1, 1)[0], -1)
self.assertEqual(bands[2].getblock(0, 0, 1, 1)[0], -1)
self.assertEqual(bands[2].getblock(2, 0, 1, 1)[0], -1)
def test_set_masked_scalar(self):
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
mask = np.zeros([16, 16], dtype=np.bool)
mask[8:, 2:] = True
indexer = BandIndexer(bands)
indexer[:,:] = np.zeros([16, 16])
indexer[mask] = 1.0
self.assertEqual(np.sum(indexer[:,:]), 336)
def test_set_masked_array(self):
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
mask = np.zeros([16, 16], dtype=np.bool)
mask[8:, 2:] = True
indexer = BandIndexer(bands)
indexer[:,:,:] = np.zeros([16, 16])
indexer[mask] = np.ones(8*14)
self.assertEqual(np.sum(indexer[:,:]), 336)
def test_shape(self):
bands = [CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32),
CompressedBand((16, 16), np.float32)]
indexer1 = BandIndexer([bands[0]])
self.assertEqual(indexer1.shape, (16, 16))
indexer3 = BandIndexer(bands)
self.assertEqual(indexer3.shape, (16, 16))
if __name__ == "__main__":
unittest.main()
| 36.72
| 91
| 0.561002
| 1,611
| 11,934
| 4.113594
| 0.081316
| 0.03018
| 0.086917
| 0.096575
| 0.817565
| 0.788139
| 0.727629
| 0.703486
| 0.663045
| 0.625321
| 0
| 0.097769
| 0.271493
| 11,934
| 324
| 92
| 36.833333
| 0.664481
| 0.054131
| 0
| 0.564315
| 0
| 0
| 0.000887
| 0
| 0
| 0
| 0
| 0
| 0.207469
| 1
| 0.095436
| false
| 0
| 0.020747
| 0
| 0.13278
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
d0e08fef7db0aa0eae62403c31493b13afe5d107
| 85
|
py
|
Python
|
dzprojects/users/admin.py
|
Aniter-amine/Projects-Posting
|
f7ea6739d9cf179963123ef7a11cbf95f9886d48
|
[
"Apache-2.0"
] | null | null | null |
dzprojects/users/admin.py
|
Aniter-amine/Projects-Posting
|
f7ea6739d9cf179963123ef7a11cbf95f9886d48
|
[
"Apache-2.0"
] | null | null | null |
dzprojects/users/admin.py
|
Aniter-amine/Projects-Posting
|
f7ea6739d9cf179963123ef7a11cbf95f9886d48
|
[
"Apache-2.0"
] | null | null | null |
from django.contrib import admin
from .models import Prof
admin.site.register(Prof)
| 17
| 32
| 0.811765
| 13
| 85
| 5.307692
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 85
| 4
| 33
| 21.25
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d0f54ba78e6f76b851151df030573a53d4d19bba
| 82
|
py
|
Python
|
dbops_venv/lib/python3.5/site-packages/alembic/autogenerate/__init__.py
|
fractal520/dbops
|
20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac
|
[
"MIT"
] | 15
|
2016-02-24T06:32:57.000Z
|
2020-06-17T05:06:36.000Z
|
dbops_venv/lib/python3.5/site-packages/alembic/autogenerate/__init__.py
|
fractal520/dbops
|
20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac
|
[
"MIT"
] | 5
|
2015-01-05T14:32:59.000Z
|
2015-09-29T10:27:27.000Z
|
dbops_venv/lib/python3.5/site-packages/alembic/autogenerate/__init__.py
|
fractal520/dbops
|
20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac
|
[
"MIT"
] | 6
|
2015-01-06T17:02:01.000Z
|
2016-11-11T02:50:27.000Z
|
from .api import compare_metadata, _produce_migration_diffs, _produce_net_changes
| 41
| 81
| 0.890244
| 11
| 82
| 6
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073171
| 82
| 1
| 82
| 82
| 0.868421
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d0f9d26dcef50e14072b755c1967676c34630937
| 55
|
py
|
Python
|
pypy/module/micronumpy/test/__init__.py
|
olliemath/pypy
|
8b873bd0b8bf76075aba3d915c260789f26f5788
|
[
"Apache-2.0",
"OpenSSL"
] | 1
|
2021-06-02T23:02:09.000Z
|
2021-06-02T23:02:09.000Z
|
pypy/module/micronumpy/test/__init__.py
|
olliemath/pypy
|
8b873bd0b8bf76075aba3d915c260789f26f5788
|
[
"Apache-2.0",
"OpenSSL"
] | 1
|
2021-03-30T18:08:41.000Z
|
2021-03-30T18:08:41.000Z
|
pypy/module/micronumpy/test/__init__.py
|
olliemath/pypy
|
8b873bd0b8bf76075aba3d915c260789f26f5788
|
[
"Apache-2.0",
"OpenSSL"
] | 1
|
2022-03-30T11:42:37.000Z
|
2022-03-30T11:42:37.000Z
|
import py
# XXX py.test.py3k_skip('not yet supported')
| 18.333333
| 44
| 0.745455
| 10
| 55
| 4
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020833
| 0.127273
| 55
| 2
| 45
| 27.5
| 0.8125
| 0.763636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
efe0451a020640fecd85019e37ba94459763b794
| 120
|
py
|
Python
|
cars/admin.py
|
gsong/django-postgres-docker
|
95a71eb3d1ca978246aa47944f79e0531516709a
|
[
"MIT"
] | null | null | null |
cars/admin.py
|
gsong/django-postgres-docker
|
95a71eb3d1ca978246aa47944f79e0531516709a
|
[
"MIT"
] | 4
|
2021-04-08T20:41:57.000Z
|
2021-09-22T19:40:52.000Z
|
cars/admin.py
|
gsong/django-postgres-docker
|
95a71eb3d1ca978246aa47944f79e0531516709a
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Car, Driver
admin.site.register(Car)
admin.site.register(Driver)
| 17.142857
| 32
| 0.8
| 18
| 120
| 5.333333
| 0.555556
| 0.1875
| 0.354167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108333
| 120
| 6
| 33
| 20
| 0.897196
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
eff084041b495172b12b7c78e946ea73ca78cc27
| 314
|
py
|
Python
|
tests/test_point.py
|
sdeu/pyrt
|
528d0c48fc49aa52956863bf9c0efff6913efc18
|
[
"MIT"
] | null | null | null |
tests/test_point.py
|
sdeu/pyrt
|
528d0c48fc49aa52956863bf9c0efff6913efc18
|
[
"MIT"
] | 4
|
2021-03-22T19:59:10.000Z
|
2022-03-12T00:59:42.000Z
|
tests/test_point.py
|
sdeu/pyrt
|
528d0c48fc49aa52956863bf9c0efff6913efc18
|
[
"MIT"
] | null | null | null |
from pyrt.point import Point3
from pyrt.vec3 import Vec3
def test_point_point_addition():
assert isinstance(Point3(0, 0, 0) + Point3(0, 0, 0), Vec3)
def test_point_vec_addition():
assert isinstance(Point3(0, 0, 0) + Vec3(0, 0, 0), Point3)
assert isinstance(Vec3(0, 0, 0) + Point3(0, 0, 0), Point3)
| 26.166667
| 62
| 0.684713
| 53
| 314
| 3.943396
| 0.245283
| 0.114833
| 0.086124
| 0.172249
| 0.545455
| 0.416268
| 0.416268
| 0
| 0
| 0
| 0
| 0.11583
| 0.175159
| 314
| 11
| 63
| 28.545455
| 0.69112
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.428571
| 1
| 0.285714
| true
| 0
| 0.285714
| 0
| 0.571429
| 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
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
eff4529a36a3be7584ee12138ed11fd5402bb7e5
| 2,438
|
py
|
Python
|
upload_code/1.py
|
MKutay/Bilisim-Projesi-Moodle-
|
e3b6062f0d70718fde258ba67d49838d178299b8
|
[
"MIT"
] | 2
|
2020-11-04T10:10:07.000Z
|
2021-03-21T11:51:06.000Z
|
upload_code/1.py
|
MKutay/Bilisim-Projesi-Moodle-
|
e3b6062f0d70718fde258ba67d49838d178299b8
|
[
"MIT"
] | 1
|
2020-12-29T05:51:30.000Z
|
2021-02-15T07:31:06.000Z
|
upload_code/1.py
|
MKutay/Bilisim-Projesi-Moodle-
|
e3b6062f0d70718fde258ba67d49838d178299b8
|
[
"MIT"
] | null | null | null |
import requests
cookies = {
'MoodleSession': 'olejbrro3hr5jqva949dj9noo5',
}
headers = {
'Connection': 'keep-alive',
'sec-ch-ua': '"Chromium";v="86", "\\"Not\\\\A;Brand";v="99", "Google Chrome";v="86"',
'sec-ch-ua-mobile': '?0',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36',
'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryutxvYAyTCo2KHIt9',
'Accept': '*/*',
'Origin': 'https://arionline.ariokullari.k12.tr',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://arionline.ariokullari.k12.tr/mod/assign/view.php?id=5788&action=editsubmission',
'Accept-Language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
}
params = (
('action', 'upload'),
)
data = '$------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="repo_upload_file"; filename="mat eis 8. foy.pdf"\\r\\nContent-Type: application/pdf\\r\\n\\r\\n\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="sesskey"\\r\\n\\r\\nn2qKBiw90o\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="repo_id"\\r\\n\\r\\n4\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="itemid"\\r\\n\\r\\n326857940\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="author"\\r\\n\\r\\nMEHMET KUTAY BOZKURT\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="savepath"\\r\\n\\r\\n/\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="title"\\r\\n\\r\\nmat eis 8. foy.pdf\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9\\r\\nContent-Disposition: form-data; name="ctx_id"\\r\\n\\r\\n12430\\r\\n------WebKitFormBoundaryutxvYAyTCo2KHIt9--\\r\\n'
response = requests.post('https://arionline.ariokullari.k12.tr/repository/repository_ajax.php', headers=headers, params=params, cookies=cookies, data=data)
#NB. Original query string below. It seems impossible to parse and
#reproduce query strings 100% accurately so the one below is given
#in case the reproduced version is not "correct".
# response = requests.post('https://arionline.ariokullari.k12.tr/repository/repository_ajax.php?action=upload', headers=headers, cookies=cookies, data=data)
| 69.657143
| 1,073
| 0.706727
| 324
| 2,438
| 5.29321
| 0.425926
| 0.022157
| 0.017493
| 0.251895
| 0.462391
| 0.41516
| 0.41516
| 0.41516
| 0.372012
| 0.173761
| 0
| 0.045009
| 0.079573
| 2,438
| 34
| 1,074
| 71.705882
| 0.719251
| 0.136587
| 0
| 0
| 0
| 0.217391
| 0.84
| 0.507143
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.043478
| 0
| 0.043478
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
efff04b072446205e389530574b79ccd721bf232
| 153
|
py
|
Python
|
src/lib/db/src/create_all.py
|
arnulfojr/money-manager
|
8600f1ff258a89f5742ffad4d5f589fd1def5259
|
[
"MIT"
] | 1
|
2020-08-18T08:03:44.000Z
|
2020-08-18T08:03:44.000Z
|
src/lib/db/src/create_all.py
|
arnulfojr/money-manager
|
8600f1ff258a89f5742ffad4d5f589fd1def5259
|
[
"MIT"
] | null | null | null |
src/lib/db/src/create_all.py
|
arnulfojr/money-manager
|
8600f1ff258a89f5742ffad4d5f589fd1def5259
|
[
"MIT"
] | null | null | null |
from .. import Model
from .. import engine
def create_all():
"""Create tables for all registered models"""
Model.metadata.create_all(engine)
| 15.3
| 49
| 0.699346
| 20
| 153
| 5.25
| 0.6
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.189542
| 153
| 9
| 50
| 17
| 0.846774
| 0.254902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4bfdcce336b66c7acaf5a4a9c00b3c17db5dfad8
| 172
|
py
|
Python
|
pydle/features/ircv3_2/__init__.py
|
suut/psychic-happiness
|
56c0daef93f40b91e8a859f04a4660dde2b5c5c1
|
[
"Unlicense"
] | 1
|
2020-02-25T10:47:00.000Z
|
2020-02-25T10:47:00.000Z
|
pydle/features/ircv3_2/__init__.py
|
suut/psychic-happiness
|
56c0daef93f40b91e8a859f04a4660dde2b5c5c1
|
[
"Unlicense"
] | null | null | null |
pydle/features/ircv3_2/__init__.py
|
suut/psychic-happiness
|
56c0daef93f40b91e8a859f04a4660dde2b5c5c1
|
[
"Unlicense"
] | null | null | null |
## IRCv3.2 support.
from . import monitor, tags, ircv3_2
from .monitor import MonitoringSupport
from .tags import TaggedMessageSupport
from .ircv3_2 import IRCv3_2Support
| 24.571429
| 38
| 0.813953
| 23
| 172
| 5.956522
| 0.434783
| 0.131387
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053333
| 0.127907
| 172
| 6
| 39
| 28.666667
| 0.86
| 0.093023
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ef067b7ec21b10fb8449a5c815f52fbea9a69bde
| 86
|
py
|
Python
|
pdip/api/handlers/__init__.py
|
ahmetcagriakca/pdip
|
c4c16d5666a740154cabdc6762cd44d98b7bdde8
|
[
"MIT"
] | 2
|
2021-12-09T21:07:46.000Z
|
2021-12-11T22:18:01.000Z
|
pdip/api/handlers/__init__.py
|
fmuyilmaz/pdip
|
f7e30b0c04d9e85ef46b0b7094fafd3ce18bccab
|
[
"MIT"
] | null | null | null |
pdip/api/handlers/__init__.py
|
fmuyilmaz/pdip
|
f7e30b0c04d9e85ef46b0b7094fafd3ce18bccab
|
[
"MIT"
] | 3
|
2021-11-15T00:47:00.000Z
|
2021-12-17T11:35:45.000Z
|
from .error_handlers import ErrorHandlers
from .request_handler import RequestHandler
| 28.666667
| 43
| 0.883721
| 10
| 86
| 7.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093023
| 86
| 2
| 44
| 43
| 0.948718
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ef3140bda6e346122b2848676c5e90855d66ed5a
| 136
|
py
|
Python
|
pyocle/__init__.py
|
jsexton-portfolio/pyocle
|
e50e183c05acf4fde4d93ce9d09e350ea4487437
|
[
"MIT"
] | 1
|
2021-03-11T22:53:18.000Z
|
2021-03-11T22:53:18.000Z
|
pyocle/__init__.py
|
jsexton-portfolio/pyocle
|
e50e183c05acf4fde4d93ce9d09e350ea4487437
|
[
"MIT"
] | 1
|
2021-08-25T05:21:57.000Z
|
2021-08-25T05:21:57.000Z
|
pyocle/__init__.py
|
jsexton-portfolio/pyocle
|
e50e183c05acf4fde4d93ce9d09e350ea4487437
|
[
"MIT"
] | null | null | null |
__version__ = '0.4.2'
from . import config
from . import form
from . import response
from . import serialization
from . import service
| 17
| 27
| 0.75
| 19
| 136
| 5.157895
| 0.578947
| 0.510204
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026786
| 0.176471
| 136
| 7
| 28
| 19.428571
| 0.848214
| 0
| 0
| 0
| 0
| 0
| 0.036765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
324e520a7081bf66a3d5c7409e1ad07a2038fd39
| 114
|
py
|
Python
|
components/studio/ingress/admin.py
|
aitmlouk/stackn
|
c8029394a15b03796a4864938f9db251b65c7354
|
[
"Apache-2.0"
] | 25
|
2020-05-08T22:24:54.000Z
|
2022-03-11T18:16:58.000Z
|
components/studio/ingress/admin.py
|
aitmlouk/stackn
|
c8029394a15b03796a4864938f9db251b65c7354
|
[
"Apache-2.0"
] | 75
|
2020-05-08T22:15:59.000Z
|
2021-11-22T10:00:04.000Z
|
components/studio/ingress/admin.py
|
aitmlouk/stackn
|
c8029394a15b03796a4864938f9db251b65c7354
|
[
"Apache-2.0"
] | 12
|
2020-11-04T13:09:46.000Z
|
2022-03-14T16:22:40.000Z
|
from django.contrib import admin
from .models import Page
# Register your models here.
admin.site.register(Page)
| 19
| 32
| 0.798246
| 17
| 114
| 5.352941
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 114
| 6
| 33
| 19
| 0.919192
| 0.22807
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
328ca8e734ba6656762fc6e9a582c1ff66431257
| 84
|
py
|
Python
|
tltorch/functional/__init__.py
|
colehawkins/torch
|
914bdb8acad64d93a612e46f47ce1df507016b1b
|
[
"BSD-3-Clause"
] | 27
|
2020-12-15T21:34:48.000Z
|
2022-02-24T09:56:13.000Z
|
tltorch/functional/__init__.py
|
colehawkins/torch
|
914bdb8acad64d93a612e46f47ce1df507016b1b
|
[
"BSD-3-Clause"
] | 15
|
2020-12-23T05:10:31.000Z
|
2022-03-03T00:10:10.000Z
|
tltorch/functional/__init__.py
|
colehawkins/torch
|
914bdb8acad64d93a612e46f47ce1df507016b1b
|
[
"BSD-3-Clause"
] | 12
|
2020-12-23T04:26:41.000Z
|
2021-12-15T02:39:30.000Z
|
from .convolution import convolve, tucker_conv
from .linear import factorized_linear
| 42
| 46
| 0.869048
| 11
| 84
| 6.454545
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 84
| 2
| 47
| 42
| 0.934211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
328f4abd145b5b86768c058f56db3c8765a3edc6
| 444
|
py
|
Python
|
build/lib.linux-x86_64-2.7/ryu/app/experiments/iperf_peers_fsize4.py
|
Helloworld1995/Ryu_SDN_Controller
|
2680f967debca361adc6ff14ddadcbbcde0c7082
|
[
"Apache-2.0"
] | 1
|
2021-03-11T01:47:35.000Z
|
2021-03-11T01:47:35.000Z
|
ryu/app/experiments/iperf_peers_fsize4.py
|
Helloworld1995/Ryu_SDN_Controller
|
2680f967debca361adc6ff14ddadcbbcde0c7082
|
[
"Apache-2.0"
] | null | null | null |
ryu/app/experiments/iperf_peers_fsize4.py
|
Helloworld1995/Ryu_SDN_Controller
|
2680f967debca361adc6ff14ddadcbbcde0c7082
|
[
"Apache-2.0"
] | null | null | null |
iperf_peers=[('h004', 'h006', '67.5M'), ('h001', 'h002', '67.5M'), ('h016', 'h015', '67.5M'), ('h006', 'h003', '67.5M'), ('h015', 'h001', '67.5M'), ('h011', 'h010', '67.5M'), ('h002', 'h003', '67.5M'), ('h013', 'h007', '67.5M'), ('h008', 'h005', '67.5M'), ('h014', 'h011', '67.5M'), ('h009', 'h012', '67.5M'), ('h010', 'h007', '67.5M'), ('h003', 'h013', '67.5M'), ('h007', 'h004', '67.5M'), ('h012', 'h014', '67.5M'), ('h005', 'h008', '67.5M')]
| 444
| 444
| 0.457207
| 66
| 444
| 3.060606
| 0.30303
| 0.316832
| 0.079208
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.36272
| 0.105856
| 444
| 1
| 444
| 444
| 0.146096
| 0
| 0
| 0
| 0
| 0
| 0.467416
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3296154fdb55b937ccc9d853f6395ac2600737a8
| 94
|
py
|
Python
|
backend/Dormroom/admin.py
|
henrikhorluck/tdt4140-washlists
|
a75c3bc38a3f915eb48cf3e9ecba848f46a2bcaa
|
[
"MIT"
] | null | null | null |
backend/Dormroom/admin.py
|
henrikhorluck/tdt4140-washlists
|
a75c3bc38a3f915eb48cf3e9ecba848f46a2bcaa
|
[
"MIT"
] | 2
|
2020-05-02T18:17:44.000Z
|
2020-05-02T18:18:02.000Z
|
backend/Dormroom/admin.py
|
henrikhorluck/tdt4140-washlists
|
a75c3bc38a3f915eb48cf3e9ecba848f46a2bcaa
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Dormroom
admin.site.register(Dormroom)
| 15.666667
| 32
| 0.819149
| 13
| 94
| 5.923077
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117021
| 94
| 5
| 33
| 18.8
| 0.927711
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
32be61e793290980130079fd99bd37e6fd5320c3
| 294
|
py
|
Python
|
src/panel_components/shoelace/widgets/shoelace_widget.py
|
MarcSkovMadsen/panel-components
|
ca176f605006165889cbbd3c775d24cdcc4f964d
|
[
"MIT"
] | 5
|
2020-09-30T03:10:33.000Z
|
2022-02-04T19:54:58.000Z
|
src/panel_components/shoelace/widgets/shoelace_widget.py
|
MarcSkovMadsen/panel-components
|
ca176f605006165889cbbd3c775d24cdcc4f964d
|
[
"MIT"
] | null | null | null |
src/panel_components/shoelace/widgets/shoelace_widget.py
|
MarcSkovMadsen/panel-components
|
ca176f605006165889cbbd3c775d24cdcc4f964d
|
[
"MIT"
] | 1
|
2021-11-08T19:00:45.000Z
|
2021-11-08T19:00:45.000Z
|
"""# Shoelace Widget Functionality
Provides the ShoelaceWidget and ShoelaceWidgetGenerator
"""
from ..shoelace_component import ShoelaceComponent
class ShoelaceWidget(ShoelaceComponent): # pylint: disable=too-few-public-methods
"""Your Shoelace Widgets should inherits this"""
| 29.4
| 83
| 0.77551
| 28
| 294
| 8.107143
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 294
| 9
| 84
| 32.666667
| 0.900794
| 0.581633
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
08c02ea8b2a21bcf3273d39694043a5622ebb653
| 48
|
py
|
Python
|
knot/config/__init__.py
|
LegitStack/knot
|
4661eb53c3ca7aacbad33b17b4a92a156db5b6dc
|
[
"MIT"
] | null | null | null |
knot/config/__init__.py
|
LegitStack/knot
|
4661eb53c3ca7aacbad33b17b4a92a156db5b6dc
|
[
"MIT"
] | null | null | null |
knot/config/__init__.py
|
LegitStack/knot
|
4661eb53c3ca7aacbad33b17b4a92a156db5b6dc
|
[
"MIT"
] | null | null | null |
from .config import get, put, env, project_path
| 24
| 47
| 0.770833
| 8
| 48
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145833
| 48
| 1
| 48
| 48
| 0.878049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3e9e3146e1efeced913cef561fa5e9f41dadd0ae
| 51
|
py
|
Python
|
Test/__init__.py
|
ritwikd/interom
|
0b626351fd742f2a99d0a6d11ba8c1a214aab576
|
[
"MIT"
] | null | null | null |
Test/__init__.py
|
ritwikd/interom
|
0b626351fd742f2a99d0a6d11ba8c1a214aab576
|
[
"MIT"
] | 1
|
2021-03-06T22:08:32.000Z
|
2021-03-06T22:09:07.000Z
|
Test/__init__.py
|
ritwikd/interom
|
0b626351fd742f2a99d0a6d11ba8c1a214aab576
|
[
"MIT"
] | 1
|
2021-03-03T22:48:07.000Z
|
2021-03-03T22:48:07.000Z
|
from . import AlgNote, CheckTest, DoMove, ValidMove
| 51
| 51
| 0.803922
| 6
| 51
| 6.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 51
| 1
| 51
| 51
| 0.911111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
3ebda503fd7769140207482f80323c9adbfb8fea
| 130
|
py
|
Python
|
wfirst_cgi/models_phaseb/python/wfirst_phaseb_proper/examples/__init__.py
|
PhillipKP/proper-models
|
5a859a2c65113c58d52488b43d9f8db6691b536b
|
[
"Apache-2.0"
] | 3
|
2019-05-22T22:23:45.000Z
|
2022-03-26T02:26:14.000Z
|
wfirst_cgi/models_phaseb/python/wfirst_phaseb_proper/examples/__init__.py
|
PhillipKP/proper-models
|
5a859a2c65113c58d52488b43d9f8db6691b536b
|
[
"Apache-2.0"
] | null | null | null |
wfirst_cgi/models_phaseb/python/wfirst_phaseb_proper/examples/__init__.py
|
PhillipKP/proper-models
|
5a859a2c65113c58d52488b43d9f8db6691b536b
|
[
"Apache-2.0"
] | 4
|
2020-06-18T21:15:28.000Z
|
2021-09-30T08:19:58.000Z
|
# Copyright 2019 California Institute of Technology
# ------------------------------------------------------------------
#
#
#
| 18.571429
| 68
| 0.338462
| 6
| 130
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034783
| 0.115385
| 130
| 6
| 69
| 21.666667
| 0.347826
| 0.892308
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3ec59eca3921f9bd71f4e813b4b1ebce2ca8f0f0
| 115
|
py
|
Python
|
Src/Escher/tools/__init__.py
|
sanjeevmk/GLASS
|
91c0954eab87d25d4866fea5c338f79fbca4f79e
|
[
"MIT"
] | 2
|
2022-03-22T17:36:14.000Z
|
2022-03-27T05:03:39.000Z
|
Src/Escher/tools/__init__.py
|
sanjeevmk/glass
|
91c0954eab87d25d4866fea5c338f79fbca4f79e
|
[
"MIT"
] | null | null | null |
Src/Escher/tools/__init__.py
|
sanjeevmk/glass
|
91c0954eab87d25d4866fea5c338f79fbca4f79e
|
[
"MIT"
] | null | null | null |
from .mesh_interpolate import deformation_interpolation
from .ApplyDecimationFilter import apply_decimation_filter
| 38.333333
| 58
| 0.913043
| 12
| 115
| 8.416667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069565
| 115
| 2
| 59
| 57.5
| 0.943925
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
3ecc3639821d3e7945f3b42f22eeaf0c03cc0bf8
| 2,992
|
py
|
Python
|
hallo/test/modules/convert/test_convert_set_type_decimals.py
|
SpangleLabs/Hallo
|
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
|
[
"MIT"
] | 1
|
2022-01-27T13:25:01.000Z
|
2022-01-27T13:25:01.000Z
|
hallo/test/modules/convert/test_convert_set_type_decimals.py
|
joshcoales/Hallo
|
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
|
[
"MIT"
] | 75
|
2015-09-26T18:07:18.000Z
|
2022-01-04T07:15:11.000Z
|
hallo/test/modules/convert/test_convert_set_type_decimals.py
|
SpangleLabs/Hallo
|
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
|
[
"MIT"
] | 1
|
2021-04-10T12:02:47.000Z
|
2021-04-10T12:02:47.000Z
|
import unittest
from hallo.events import EventMessage
from hallo.test.modules.convert.convert_function_test_base import ConvertFunctionTestBase
class ConvertSetTypeDecimalsTest(ConvertFunctionTestBase, unittest.TestCase):
def test_no_number_given(self):
decimals = self.test_repo.get_type_by_name("test_type1").decimals
self.function_dispatcher.dispatch(
EventMessage(
self.server,
None,
self.test_user,
"convert set type decimals test_type1",
)
)
data = self.server.get_send_data(1, self.test_user, EventMessage)
assert "please specify" in data[0].text.lower()
assert "a number of decimal places" in data[0].text.lower()
assert (
self.test_repo.get_type_by_name("test_type1").decimals == decimals
), "Decimals shouldn't have changed."
def test_decimals_at_start(self):
self.function_dispatcher.dispatch(
EventMessage(
self.server,
None,
self.test_user,
"convert set type decimals 5 test_type1",
)
)
data = self.server.get_send_data(1, self.test_user, EventMessage)
assert "set the number of decimal places" in data[0].text.lower()
assert '"test_type1" type units' in data[0].text
assert "at 5 places" in data[0].text
assert (
self.test_repo.get_type_by_name("test_type1").decimals == 5
), "Decimals wasn't set."
def test_decimals_at_end(self):
self.function_dispatcher.dispatch(
EventMessage(
self.server,
None,
self.test_user,
"convert set type decimals test_type1 5",
)
)
data = self.server.get_send_data(1, self.test_user, EventMessage)
assert "set the number of decimal places" in data[0].text.lower()
assert '"test_type1" type units' in data[0].text
assert "at 5 places" in data[0].text
assert (
self.test_repo.get_type_by_name("test_type1").decimals == 5
), "Decimals wasn't set."
def test_no_type(self):
decimals1 = self.test_repo.get_type_by_name("test_type1").decimals
decimals2 = self.test_repo.get_type_by_name("test_type2").decimals
self.function_dispatcher.dispatch(
EventMessage(
self.server, None, self.test_user, "convert set type decimals 5"
)
)
data = self.server.get_send_data(1, self.test_user, EventMessage)
assert "this is not a recognised conversion type" in data[0].text.lower()
assert (
self.test_repo.get_type_by_name("test_type1").decimals == decimals1
), "Decimals shouldn't have changed."
assert (
self.test_repo.get_type_by_name("test_type2").decimals == decimals2
), "Decimals shouldn't have changed."
| 39.893333
| 89
| 0.61631
| 365
| 2,992
| 4.835616
| 0.180822
| 0.072521
| 0.035694
| 0.056091
| 0.793201
| 0.747309
| 0.734844
| 0.734844
| 0.734844
| 0.731445
| 0
| 0.017445
| 0.29111
| 2,992
| 74
| 90
| 40.432432
| 0.81471
| 0
| 0
| 0.573529
| 0
| 0
| 0.189505
| 0
| 0
| 0
| 0
| 0
| 0.205882
| 1
| 0.058824
| false
| 0
| 0.044118
| 0
| 0.117647
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f5cb97cd299dc2bbbc17aae5f0f1221e2d62508b
| 27
|
py
|
Python
|
robot_controller/__init__.py
|
james-c/robot_controller
|
2b4318a2ac3c394e394f27408a3939218d945a71
|
[
"MIT"
] | null | null | null |
robot_controller/__init__.py
|
james-c/robot_controller
|
2b4318a2ac3c394e394f27408a3939218d945a71
|
[
"MIT"
] | null | null | null |
robot_controller/__init__.py
|
james-c/robot_controller
|
2b4318a2ac3c394e394f27408a3939218d945a71
|
[
"MIT"
] | null | null | null |
from controller import app
| 13.5
| 26
| 0.851852
| 4
| 27
| 5.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 27
| 1
| 27
| 27
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f5cce56df52159c4ec0d402eea9770950cf40879
| 32,082
|
py
|
Python
|
venv/lib/python3.6/site-packages/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_logging_global.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | 1
|
2020-01-22T13:11:23.000Z
|
2020-01-22T13:11:23.000Z
|
venv/lib/python3.6/site-packages/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_logging_global.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | 12
|
2020-02-21T07:24:52.000Z
|
2020-04-14T09:54:32.000Z
|
venv/lib/python3.6/site-packages/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_logging_global.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | null | null | null |
#
# (c) 2021, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from textwrap import dedent
from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
from ansible_collections.cisco.ios.plugins.modules import ios_logging_global
from ansible_collections.cisco.ios.tests.unit.modules.utils import (
set_module_args,
)
from .ios_module import TestIosModule
class TestIosLoggingGlobalModule(TestIosModule):
module = ios_logging_global
def setUp(self):
super(TestIosLoggingGlobalModule, self).setUp()
self.mock_get_config = patch(
"ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
)
self.get_config = self.mock_get_config.start()
self.mock_load_config = patch(
"ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
)
self.load_config = self.mock_load_config.start()
self.mock_get_resource_connection_config = patch(
"ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
"get_resource_connection"
)
self.get_resource_connection_config = (
self.mock_get_resource_connection_config.start()
)
self.mock_get_resource_connection_facts = patch(
"ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.resource_module_base."
"get_resource_connection"
)
self.get_resource_connection_facts = (
self.mock_get_resource_connection_facts.start()
)
self.mock_edit_config = patch(
"ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
)
self.edit_config = self.mock_edit_config.start()
self.mock_execute_show_command = patch(
"ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.logging_global.logging_global."
"Logging_globalFacts.get_logging_data"
)
self.execute_show_command = self.mock_execute_show_command.start()
def tearDown(self):
super(TestIosLoggingGlobalModule, self).tearDown()
self.mock_get_resource_connection_config.stop()
self.mock_get_resource_connection_facts.stop()
self.mock_edit_config.stop()
self.mock_get_config.stop()
self.mock_load_config.stop()
self.mock_execute_show_command.stop()
self.allCommands = [
"logging on",
"logging buffered xml 5099 notifications",
"logging buginf",
"logging cns-events warnings",
"logging console xml critical",
"logging count",
"logging delimiter tcp",
"logging discriminator msglog01 severity includes 5",
"logging dmvpn rate-limit 10",
"logging esm config",
"logging exception 4099",
"logging facility local5",
"logging filter tftp://172.16.2.18/ESM/elate.tcl args TESTInst2",
"logging filter tftp://172.16.2.14/ESM/escalate.tcl args TESTInst",
"logging history alerts",
"logging host 172.16.1.1",
"logging host 172.16.1.11 xml",
"logging host 172.16.1.25 filtered",
"logging host 172.16.1.10 filtered stream 10",
"logging host 172.16.1.13 transport tcp port 514",
"logging message-counter log",
"logging message-counter debug",
"logging monitor warnings",
"logging origin-id hostname",
"logging persistent batch 4444",
"logging policy-firewall rate-limit 10",
"logging queue-limit esm 150",
"logging rate-limit all 2",
"logging reload alerts",
"logging server-arp",
"logging snmp-trap errors",
"logging source-interface GBit1/0",
"logging source-interface CTunnel2",
"logging trap errors",
"logging userinfo",
]
def test_ios_logging_global_merged_idempotent(self):
"""
passing all commands as have and expecting [] commands
"""
self.execute_show_command.return_value = dedent(
"""\
logging on
logging count
logging buginf
logging userinfo
logging esm config
logging server-arp
logging trap errors
logging delimiter tcp
logging reload alerts
logging host 172.16.1.1
logging exception 4099
logging history alerts
logging facility local5
logging snmp-trap errors
logging monitor warnings
logging origin-id hostname
logging host 172.16.1.11 xml
logging cns-events warnings
logging queue-limit esm 150
logging dmvpn rate-limit 10
logging message-counter log
logging console xml critical
logging message-counter debug
logging persistent batch 4444
logging host 172.16.1.25 filtered
logging source-interface GBit1/0
logging source-interface CTunnel2
logging policy-firewall rate-limit 10
logging buffered xml 5099 notifications
logging rate-limit all 2 except warnings
logging host 172.16.1.10 filtered stream 10
logging host 172.16.1.13 transport tcp port 514
logging discriminator msglog01 severity includes 5
logging filter tftp://172.16.2.18/ESM/elate.tcl args TESTInst2
logging filter tftp://172.16.2.14/ESM/escalate.tcl args TESTInst
"""
)
playbook = dict(
config=dict(
logging_on="enable",
buffered=dict(size=5099, severity="notifications", xml=True),
buginf=True,
cns_events="warnings",
console=dict(severity="critical", xml=True),
count=True,
delimiter=dict(tcp=True),
discriminator=["msglog01 severity includes 5"],
dmvpn=dict(rate_limit=10),
esm=dict(config=True),
exception=4099,
facility="local5",
filter=[
dict(
url="tftp://172.16.2.18/ESM/elate.tcl",
args="TESTInst2",
),
dict(
url="tftp://172.16.2.14/ESM/escalate.tcl",
args="TESTInst",
),
],
history=dict(severity="alerts"),
hosts=[
dict(hostname="172.16.1.1"),
dict(hostname="172.16.1.11", xml=True),
dict(hostname="172.16.1.25", filtered=True),
dict(hostname="172.16.1.10", stream=10, filtered=True),
dict(
hostname="172.16.1.13",
transport=dict(tcp=dict(port=514)),
),
],
message_counter=["log", "debug"],
monitor=dict(severity="warnings"),
origin_id=dict(tag="hostname"),
persistent=dict(batch=4444),
policy_firewall=dict(rate_limit=10),
queue_limit=dict(esm=150),
rate_limit=dict(all=True, size=2, except_severity="warnings"),
reload=dict(severity="alerts"),
server_arp=True,
snmp_trap=["errors"],
source_interface=[
dict(interface="GBit1/0"),
dict(interface="CTunnel2"),
],
trap="errors",
userinfo=True,
)
)
merged = []
playbook["state"] = "merged"
set_module_args(playbook)
result = self.execute_module()
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(merged))
def test_ios_logging_global_deleted(self):
self.execute_show_command.return_value = dedent(
"""\
logging on
logging count
logging buginf
logging buffered xml 5099 notifications
logging console xml critical
logging delimiter tcp
logging dmvpn rate-limit 10
logging esm config
logging exception 4099
logging facility local5
logging history alerts
logging monitor warnings
logging origin-id hostname
logging persistent batch 4444
logging policy-firewall rate-limit 10
logging queue-limit esm 150
logging rate-limit all 2 except warnings
logging server-arp
logging reload alerts
logging userinfo
logging trap errors
"""
)
playbook = dict(
config=dict(
logging_on="enable",
count=True,
buffered=dict(size=5099, severity="notifications", xml=True),
buginf=True,
console=dict(severity="critical", xml=True),
delimiter=dict(tcp=True),
dmvpn=dict(rate_limit=10),
esm=dict(config=True),
exception=4099,
facility="local5",
history=dict(severity="alerts"),
monitor=dict(severity="warnings"),
origin_id=dict(tag="hostname"),
persistent=dict(batch=4444),
policy_firewall=dict(rate_limit=10),
queue_limit=dict(esm=150),
rate_limit=dict(all=True, size=2, except_severity="warnings"),
reload=dict(severity="alerts"),
server_arp=True,
trap="errors",
userinfo=True,
)
)
deleted = [
"no logging on",
"no logging count",
"no logging buginf",
"no logging buffered xml 5099 notifications",
"no logging console xml critical",
"no logging delimiter tcp",
"no logging dmvpn rate-limit 10",
"no logging esm config",
"no logging exception 4099",
"no logging facility local5",
"no logging history alerts",
"no logging monitor warnings",
"no logging origin-id hostname",
"no logging persistent batch 4444",
"no logging policy-firewall rate-limit 10",
"no logging queue-limit esm 150",
"no logging rate-limit all 2 except warnings",
"no logging server-arp",
"no logging reload alerts",
"no logging userinfo",
"no logging trap errors",
]
playbook["state"] = "deleted"
set_module_args(playbook)
result = self.execute_module(changed=True)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(deleted))
def test_ios_logging_global_deleted_list(self):
self.execute_show_command.return_value = dedent(
"""\
logging discriminator msglog01 severity includes 5
logging filter tftp://172.16.2.18/ESM/elate.tcl args TESTInst2
logging filter tftp://172.16.2.14/ESM/escalate.tcl args TESTInst
logging host 172.16.1.1
logging host 172.16.1.11 xml
logging host 172.16.1.25 filtered
logging host 172.16.1.10 filtered stream 10
logging host 172.16.1.13 transport tcp port 514
logging message-counter log
logging message-counter debug
logging snmp-trap errors
logging source-interface GBit1/0
logging source-interface CTunnel2
"""
)
playbook = dict(
config=dict(
discriminator=["msglog01 severity includes 5"],
filter=[
dict(
url="tftp://172.16.2.18/ESM/elate.tcl",
args="TESTInst2",
),
dict(
url="tftp://172.16.2.14/ESM/escalate.tcl",
args="TESTInst",
),
],
hosts=[
dict(hostname="172.16.1.1"),
dict(hostname="172.16.1.11", xml=True),
dict(hostname="172.16.1.25", filtered=True),
dict(hostname="172.16.1.10", stream=10, filtered=True),
dict(
hostname="172.16.1.13",
transport=dict(tcp=dict(port=514)),
),
],
message_counter=["log", "debug"],
snmp_trap=["errors"],
source_interface=[
dict(interface="GBit1/0"),
dict(interface="CTunnel2"),
],
)
)
deleted = [
"no logging discriminator msglog01 severity includes 5",
"no logging filter tftp://172.16.2.18/ESM/elate.tcl args TESTInst2",
"no logging filter tftp://172.16.2.14/ESM/escalate.tcl args TESTInst",
"no logging host 172.16.1.1",
"no logging host 172.16.1.11",
"no logging host 172.16.1.25",
"no logging host 172.16.1.10",
"no logging host 172.16.1.13",
"no logging message-counter log",
"no logging message-counter debug",
"no logging snmp-trap errors",
"no logging source-interface GBit1/0",
"no logging source-interface CTunnel2",
]
playbook["state"] = "deleted"
set_module_args(playbook)
result = self.execute_module(changed=True)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(deleted))
def test_ios_logging_global_overridden(self):
self.execute_show_command.return_value = dedent(
"""\
logging on
logging count
logging buginf
logging buffered xml 5099 notifications
logging console xml critical
logging delimiter tcp
logging dmvpn rate-limit 10
logging esm config
logging exception 4099
logging facility local5
logging history alerts
logging monitor warnings
logging origin-id hostname
logging persistent batch 4444
logging policy-firewall rate-limit 10
logging queue-limit esm 150
logging rate-limit all 2 except warnings
logging server-arp
logging reload alerts
logging userinfo
logging trap errors
"""
)
playbook = dict(
config=dict(
discriminator=["msglog01 severity includes 5"],
filter=[
dict(
url="tftp://172.16.2.18/ESM/elate.tcl",
args="TESTInst2",
),
dict(
url="tftp://172.16.2.14/ESM/escalate.tcl",
args="TESTInst",
),
],
hosts=[
dict(hostname="172.16.1.1"),
dict(hostname="172.16.1.11", xml=True),
dict(hostname="172.16.1.25", filtered=True),
dict(hostname="172.16.1.10", stream=10, filtered=True),
dict(
hostname="172.16.1.13",
transport=dict(tcp=dict(port=514)),
),
],
message_counter=["log", "debug"],
snmp_trap=["errors"],
source_interface=[
dict(interface="GBit1/0"),
dict(interface="CTunnel2"),
],
)
)
overridden = [
"no logging on",
"no logging count",
"no logging buginf",
"no logging buffered xml 5099 notifications",
"no logging console xml critical",
"no logging delimiter tcp",
"no logging dmvpn rate-limit 10",
"no logging esm config",
"no logging exception 4099",
"no logging facility local5",
"no logging history alerts",
"no logging monitor warnings",
"no logging origin-id hostname",
"no logging persistent batch 4444",
"no logging policy-firewall rate-limit 10",
"no logging queue-limit esm 150",
"no logging rate-limit all 2 except warnings",
"no logging server-arp",
"no logging reload alerts",
"no logging userinfo",
"no logging trap errors",
"logging discriminator msglog01 severity includes 5",
"logging filter tftp://172.16.2.18/ESM/elate.tcl args TESTInst2",
"logging filter tftp://172.16.2.14/ESM/escalate.tcl args TESTInst",
"logging host 172.16.1.1",
"logging host 172.16.1.11 xml",
"logging host 172.16.1.25 filtered",
"logging host 172.16.1.10 filtered stream 10",
"logging host 172.16.1.13 transport tcp port 514",
"logging message-counter log",
"logging message-counter debug",
"logging snmp-trap errors",
"logging source-interface GBit1/0",
"logging source-interface CTunnel2",
]
playbook["state"] = "overridden"
set_module_args(playbook)
result = self.execute_module(changed=True)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(overridden))
def test_ios_logging_global_overridden_idempotent(self):
self.execute_show_command.return_value = dedent(
"""\
logging host 172.16.1.11 xml
logging monitor critical
logging buffered xml 5099 warnings
logging facility local6
"""
)
playbook = dict(
config=dict(
buffered=dict(size=5099, severity="warnings", xml=True),
facility="local6",
hosts=[dict(hostname="172.16.1.11", xml=True)],
monitor=dict(severity="critical"),
)
)
overridden = []
playbook["state"] = "overridden"
set_module_args(playbook)
result = self.execute_module(changed=False)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(overridden))
def test_ios_logging_global_merged(self):
self.execute_show_command.return_value = dedent(
"""\
logging host 172.16.1.1
"""
)
playbook = dict(
config=dict(
hosts=[
dict(hostname="172.16.2.15", session_id=dict(text="Test")),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7304",
discriminator="msglog01 severity includes 5",
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7314",
sequence_num_session=True,
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7324",
vrf="vpn1",
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7334",
stream=10,
filtered=True,
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7344",
session_id=dict(tag="ipv4"),
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7354",
transport=dict(tcp=dict(port=514, xml=True)),
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7374",
vrf="Apn2",
transport=dict(
udp=dict(
discriminator="msglog01 severity includes 5"
)
),
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7384",
transport=dict(udp=dict(sequence_num_session=True)),
),
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7364",
transport=dict(
tcp=dict(
audit=True,
filtered=True,
stream=10,
session_id=dict(text="Test"),
)
),
),
]
)
)
merged = [
"logging host 172.16.2.15 session-id string Test",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7304 discriminator msglog01 severity includes 5",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7314 sequence-num-session",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7324 vrf vpn1",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7334 filtered stream 10",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7344 session-id ipv4",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7354 transport tcp port 514 xml",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7364 transport tcp audit filtered stream 10 session-id string Test",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7374 vrf Apn2 transport udp discriminator msglog01 severity includes 5",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7384 transport udp sequence-num-session",
]
playbook["state"] = "merged"
set_module_args(playbook)
result = self.execute_module(changed=True)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(merged))
def test_ios_logging_global_parsed(self):
set_module_args(
dict(
running_config=dedent(
"""\
logging on
logging buffered xml 5099 notifications
logging buginf
logging cns-events warnings
logging console xml critical
logging count
logging delimiter tcp
"""
),
state="parsed",
)
)
parsed = dict(
logging_on="enable",
buffered=dict(size=5099, severity="notifications", xml=True),
buginf=True,
cns_events="warnings",
console=dict(severity="critical", xml=True),
count=True,
delimiter=dict(tcp=True),
)
result = self.execute_module(changed=False)
self.maxDiff = None
self.assertEqual(sorted(result["parsed"]), sorted(parsed))
def test_ios_logging_global_gathered(self):
self.execute_show_command.return_value = dedent(
"""\
logging persistent notify
"""
)
set_module_args(dict(state="gathered"))
gathered = dict(persistent=dict(notify=True))
result = self.execute_module(changed=False)
self.maxDiff = None
self.assertEqual(sorted(result["gathered"]), sorted(gathered))
def test_ios_logging_global_gathered_host(self):
self.execute_show_command.return_value = dedent(
"""\
logging host 172.16.1.1 vrf vpn1 transport tcp audit
"""
)
set_module_args(dict(state="gathered"))
gathered = dict(
hosts=[
dict(
hostname="172.16.1.1",
vrf="vpn1",
transport=dict(tcp=dict(audit=True)),
)
]
)
result = self.execute_module(changed=False)
self.maxDiff = None
self.assertEqual(sorted(result["gathered"]), sorted(gathered))
def test_ios_logging_global_rendered(self):
set_module_args(
dict(
config=dict(
rate_limit=dict(
console=True, size=2, except_severity="warnings"
),
reload=dict(message_limit=10, severity="alerts"),
persistent=dict(
url="flash0:172.16.0.1",
threshold=2,
immediate=True,
protected=True,
notify=True,
),
queue_limit=dict(trap=1000),
buffered=dict(
discriminator="notifications", filtered=True
),
hosts=[
dict(
ipv6="2001:0db8:85a3:0000:0000:8a2e:0370:7364",
transport=dict(
tcp=dict(session_id=dict(tag="hostname"))
),
)
],
),
state="rendered",
)
)
rendered = [
"logging reload message-limit 10 alerts",
"logging rate-limit console 2 except warnings",
"logging buffered discriminator notifications filtered",
"logging persistent url flash0:172.16.0.1 threshold 2 immediate protected notify",
"logging queue-limit trap 1000",
"logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7364 transport tcp session-id hostname",
]
result = self.execute_module(changed=False)
self.maxDiff = None
self.assertEqual(sorted(result["rendered"]), sorted(rendered))
def test_ios_logging_global_deleted_empty(self):
self.execute_show_command.return_value = dedent(
"""\
logging rate-limit all 2 except warnings
logging server-arp
logging origin-id string Test
logging reload alerts
logging userinfo
logging trap errors
logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7324
logging persistent size 1000 filesize 1000
logging source-interface Gbit0/1 vrf vpn1
logging filter flash:172.16.1.1 1 args Test
"""
)
playbook = dict(config=dict())
deleted = [
"no logging rate-limit all 2 except warnings",
"no logging server-arp",
"no logging origin-id string Test",
"no logging reload alerts",
"no logging userinfo",
"no logging trap errors",
"no logging host ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7324",
"no logging persistent size 1000 filesize 1000",
"no logging source-interface Gbit0/1 vrf vpn1",
"no logging filter flash:172.16.1.1 1 args Test",
]
playbook["state"] = "deleted"
set_module_args(playbook)
result = self.execute_module(changed=True)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(deleted))
def test_ios_logging_global_deleted_idempotent(self):
self.execute_show_command.return_value = dedent(
"""\
no logging exception
no logging buffered
no logging reload
no logging rate-limit
no logging console
no logging monitor
no logging cns-events
no logging trap
"""
)
playbook = dict(config=dict())
deleted = []
playbook["state"] = "deleted"
set_module_args(playbook)
result = self.execute_module(changed=False)
self.maxDiff = None
self.assertEqual(result["commands"], deleted)
def test_ios_logging_global_replaced(self):
self.execute_show_command.return_value = dedent(
"""\
logging host 172.16.1.1
"""
)
playbook = dict(
config=dict(
hosts=[
dict(hostname="172.16.2.15", session_id=dict(text="Test"))
]
)
)
replaced = [
"no logging host 172.16.1.1",
"logging host 172.16.2.15 session-id string Test",
]
playbook["state"] = "replaced"
set_module_args(playbook)
result = self.execute_module(changed=True)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(replaced))
def test_ios_logging_global_replaced_ordering_host(self):
self.execute_show_command.return_value = dedent(
"""\
logging buffered 64000
no logging console
no logging monitor
logging history notifications
logging origin-id hostname
logging source-interface GigabitEthernet0 vrf Mgmt-intf
logging host 172.16.0.1 transport udp port 10000
logging host 172.16.0.2
"""
)
playbook = {
"config": {
"buffered": {"size": 64000},
"history": {"severity": "notifications"},
"hosts": [
{"hostname": "172.16.0.1", "vrf": "Mgmt-intf"},
{"hostname": "172.16.0.3", "vrf": "Mgmt-intf"},
{"hostname": "172.16.0.4", "vrf": "Mgmt-intf"},
],
"origin_id": {"tag": "hostname"},
"rate_limit": {
"console": True,
"except_severity": "errors",
"size": 10,
},
"source_interface": [
{"interface": "GigabitEthernet0", "vrf": "Mgmt-intf"}
],
"trap": "informational",
}
}
replaced = [
"logging rate-limit console 10 except errors",
"logging trap informational",
"logging host 172.16.0.1 vrf Mgmt-intf",
"logging host 172.16.0.3 vrf Mgmt-intf",
"logging host 172.16.0.4 vrf Mgmt-intf",
"no logging host 172.16.0.2",
]
playbook["state"] = "replaced"
set_module_args(playbook)
result = self.execute_module(changed=True)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(replaced))
def test_ios_logging_global_replaced_idempotent(self):
self.execute_show_command.return_value = dedent(
"""\
logging host 172.16.2.15
"""
)
playbook = dict(config=dict(hosts=[dict(hostname="172.16.2.15")]))
replaced = []
playbook["state"] = "replaced"
set_module_args(playbook)
result = self.execute_module(changed=False)
self.maxDiff = None
self.assertEqual(sorted(result["commands"]), sorted(replaced))
| 39.220049
| 138
| 0.52478
| 3,235
| 32,082
| 5.108501
| 0.075425
| 0.024809
| 0.01779
| 0.037759
| 0.841522
| 0.801585
| 0.754084
| 0.720562
| 0.68601
| 0.667191
| 0
| 0.082013
| 0.380494
| 32,082
| 817
| 139
| 39.268054
| 0.749484
| 0.005611
| 0
| 0.588235
| 0
| 0.01634
| 0.287356
| 0.072268
| 0
| 0
| 0
| 0
| 0.02451
| 1
| 0.027778
| false
| 0
| 0.009804
| 0
| 0.04085
| 0.001634
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
f5df6ffb3f578734b48842deca10af9f2b8917a8
| 158
|
py
|
Python
|
quotes/serializers.py
|
thulasi-ram/logistika
|
a9a7b649f0e15bf8cdad43fdab2a8bd61326f83d
|
[
"MIT"
] | null | null | null |
quotes/serializers.py
|
thulasi-ram/logistika
|
a9a7b649f0e15bf8cdad43fdab2a8bd61326f83d
|
[
"MIT"
] | null | null | null |
quotes/serializers.py
|
thulasi-ram/logistika
|
a9a7b649f0e15bf8cdad43fdab2a8bd61326f83d
|
[
"MIT"
] | null | null | null |
from django.core.serializers.json import Serializer
class QuotesJSONSerializer(Serializer):
def get_dump_object(self, obj):
return self._current
| 26.333333
| 51
| 0.778481
| 19
| 158
| 6.315789
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151899
| 158
| 6
| 52
| 26.333333
| 0.895522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.