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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
938336bca0b5a2534f8ddc2fc227a2cf4ee70918
| 96
|
py
|
Python
|
skssl/transformers/neuralproc/__init__.py
|
YannDubs/Semi-Supervised-Neural-Processes
|
77176131923817f3a165883dd6fca7b9f1e9d0b3
|
[
"MIT"
] | 5
|
2019-06-19T11:11:56.000Z
|
2020-07-03T08:42:36.000Z
|
skssl/transformers/neuralproc/__init__.py
|
YannDubs/Semi-Supervised-Neural-Processes
|
77176131923817f3a165883dd6fca7b9f1e9d0b3
|
[
"MIT"
] | null | null | null |
skssl/transformers/neuralproc/__init__.py
|
YannDubs/Semi-Supervised-Neural-Processes
|
77176131923817f3a165883dd6fca7b9f1e9d0b3
|
[
"MIT"
] | null | null | null |
from .neuralproc import *
from .losses import *
from .attention import *
from .helpers import *
| 19.2
| 25
| 0.75
| 12
| 96
| 6
| 0.5
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 96
| 4
| 26
| 24
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
fa72cb4ef379b0b1cf4c183ab6e48d7b618e6829
| 136
|
py
|
Python
|
openfst_python/__init__.py
|
Ma-Dan/openfst-python
|
95cb83b1f45b3d74a46046d6961d35c55c733ec0
|
[
"Apache-2.0"
] | 49
|
2019-01-01T22:32:44.000Z
|
2022-03-06T11:51:02.000Z
|
openfst_python/__init__.py
|
Ma-Dan/openfst-python
|
95cb83b1f45b3d74a46046d6961d35c55c733ec0
|
[
"Apache-2.0"
] | 3
|
2020-05-20T09:54:59.000Z
|
2021-06-28T14:52:36.000Z
|
openfst_python/__init__.py
|
Ma-Dan/openfst-python
|
95cb83b1f45b3d74a46046d6961d35c55c733ec0
|
[
"Apache-2.0"
] | 9
|
2019-06-28T03:28:24.000Z
|
2021-10-20T18:15:24.000Z
|
from __future__ import absolute_import
# Import everything from the official pywrapfst library.
from openfst_python.pywrapfst import *
| 27.2
| 56
| 0.845588
| 17
| 136
| 6.411765
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 136
| 4
| 57
| 34
| 0.915966
| 0.397059
| 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
|
fa951b16dbc221b0088aa977e8158e50aaf5d2ce
| 91
|
py
|
Python
|
purescript_show_python/ffi/Data/Functor.py
|
thautwarm/purescript-show-python
|
e40134362653baa2f5feffced579504d7fe7f7ba
|
[
"MIT"
] | null | null | null |
purescript_show_python/ffi/Data/Functor.py
|
thautwarm/purescript-show-python
|
e40134362653baa2f5feffced579504d7fe7f7ba
|
[
"MIT"
] | 1
|
2020-02-24T16:38:30.000Z
|
2020-02-24T16:38:30.000Z
|
purescript_show_python/ffi/Data/Functor.py
|
purescript-python/purescript-show-python
|
e40134362653baa2f5feffced579504d7fe7f7ba
|
[
"MIT"
] | null | null | null |
def arrayMap(f):
def app(arr):
return tuple(f(e) for e in arr)
return app
| 15.166667
| 39
| 0.571429
| 16
| 91
| 3.25
| 0.625
| 0.346154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.318681
| 91
| 5
| 40
| 18.2
| 0.83871
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
fac28e5b2584284a0cac4e77c6acedb00d38ab7a
| 692
|
py
|
Python
|
murpy/commands/operators/compare.py
|
eisterman/MurPy
|
06f6eee07cee7ac51230a81bacf159af4b8a7517
|
[
"MIT"
] | 3
|
2019-10-10T10:34:38.000Z
|
2021-02-16T21:06:45.000Z
|
murpy/commands/operators/compare.py
|
eisterman/BFPyCompiler
|
06f6eee07cee7ac51230a81bacf159af4b8a7517
|
[
"MIT"
] | null | null | null |
murpy/commands/operators/compare.py
|
eisterman/BFPyCompiler
|
06f6eee07cee7ac51230a81bacf159af4b8a7517
|
[
"MIT"
] | null | null | null |
from .. import InterfaceObj, NestedInterfaceObj
from ...core.operations.compare import EqualOp, NotEqualOp, GreaterOp
class EQ(InterfaceObj, NestedInterfaceObj):
# TODO: DOCUMENTAZIONE EQ
def __init__(self, name1, name2):
super().__init__()
self._OPERATION = EqualOp(name1, name2)
class NEQ(InterfaceObj, NestedInterfaceObj):
# TODO: DOCUMENTAZIONE NEQ
def __init__(self, name1, name2):
super().__init__()
self._OPERATION = NotEqualOp(name1, name2)
class GR(InterfaceObj, NestedInterfaceObj):
# TODO: DOCUMENTAZIONE GR
def __init__(self, name1, name2):
super().__init__()
self._OPERATION = GreaterOp(name1, name2)
| 28.833333
| 69
| 0.696532
| 69
| 692
| 6.594203
| 0.333333
| 0.105495
| 0.224176
| 0.316484
| 0.283516
| 0.283516
| 0.283516
| 0.283516
| 0.283516
| 0
| 0
| 0.021622
| 0.197977
| 692
| 23
| 70
| 30.086957
| 0.798198
| 0.104046
| 0
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0
| 1
| 0.214286
| false
| 0
| 0.142857
| 0
| 0.571429
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
878820aeb6edf7974efbd020a832e402fed05416
| 286
|
py
|
Python
|
tanmay/views.py
|
tanmaymunjal/tanmay
|
9cb2f9be6a6e0345c54351f2501815aaec3b9b36
|
[
"MIT"
] | null | null | null |
tanmay/views.py
|
tanmaymunjal/tanmay
|
9cb2f9be6a6e0345c54351f2501815aaec3b9b36
|
[
"MIT"
] | null | null | null |
tanmay/views.py
|
tanmaymunjal/tanmay
|
9cb2f9be6a6e0345c54351f2501815aaec3b9b36
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
from django.contrib import admin
def index(request):
return render(request, 'initial.html') #returns the initial.html
def contact(request):
return render(request,'contact.html')
def about(request):
return render(request,'about.html')
| 22
| 68
| 0.751748
| 38
| 286
| 5.657895
| 0.447368
| 0.181395
| 0.265116
| 0.362791
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13986
| 286
| 12
| 69
| 23.833333
| 0.873984
| 0.083916
| 0
| 0
| 0
| 0
| 0.130769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.25
| 0.375
| 1
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
87994a5bb9a58930722f98ca849453b46a613715
| 100
|
py
|
Python
|
accounts/context_processors.py
|
mtuktarov/mtuktarov.com
|
82a3b70da1f81e49f5df0d4c98fd213372c3a7bc
|
[
"MIT"
] | null | null | null |
accounts/context_processors.py
|
mtuktarov/mtuktarov.com
|
82a3b70da1f81e49f5df0d4c98fd213372c3a7bc
|
[
"MIT"
] | null | null | null |
accounts/context_processors.py
|
mtuktarov/mtuktarov.com
|
82a3b70da1f81e49f5df0d4c98fd213372c3a7bc
|
[
"MIT"
] | null | null | null |
from .forms import LoginForm
def login_form(request):
return {
'login_form': LoginForm()
}
| 16.666667
| 30
| 0.69
| 12
| 100
| 5.583333
| 0.75
| 0.268657
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 100
| 6
| 31
| 16.666667
| 0.8375
| 0
| 0
| 0
| 0
| 0
| 0.09901
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 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
| 0
| 1
| 1
| 0
|
0
| 5
|
87aeefa3cc085c800b01d5379ee1dbe92aff8999
| 56
|
py
|
Python
|
test/__init__.py
|
dh-richarddean/pgsanity
|
1b442a94663d090ab232b2e65efb7b62b4af7cc5
|
[
"MIT"
] | 233
|
2015-01-08T14:44:03.000Z
|
2022-03-11T06:06:16.000Z
|
test/__init__.py
|
dh-richarddean/pgsanity
|
1b442a94663d090ab232b2e65efb7b62b4af7cc5
|
[
"MIT"
] | 27
|
2015-04-07T16:25:13.000Z
|
2021-06-24T11:23:00.000Z
|
test/__init__.py
|
dh-richarddean/pgsanity
|
1b442a94663d090ab232b2e65efb7b62b4af7cc5
|
[
"MIT"
] | 29
|
2015-01-29T15:58:28.000Z
|
2020-11-02T14:35:25.000Z
|
from test import test_sqlprep, test_ecpg, test_pgsanity
| 28
| 55
| 0.857143
| 9
| 56
| 5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 56
| 1
| 56
| 56
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 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
|
87bc30616cd68ad38778e282d8850814108fab48
| 83
|
py
|
Python
|
tests/test_common/test_vision/test_models/__init__.py
|
VishalBh4r4mbe/code-soup
|
8499a86df0da6e046bfdb98070e3416bbd0c6af2
|
[
"MIT"
] | null | null | null |
tests/test_common/test_vision/test_models/__init__.py
|
VishalBh4r4mbe/code-soup
|
8499a86df0da6e046bfdb98070e3416bbd0c6af2
|
[
"MIT"
] | null | null | null |
tests/test_common/test_vision/test_models/__init__.py
|
VishalBh4r4mbe/code-soup
|
8499a86df0da6e046bfdb98070e3416bbd0c6af2
|
[
"MIT"
] | null | null | null |
from tests.test_common.test_vision.test_models.test_allconv import TestAllConvNet
| 41.5
| 82
| 0.891566
| 12
| 83
| 5.833333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060241
| 83
| 1
| 83
| 83
| 0.897436
| 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
|
e20305c5c370424b0dc63aaaa58f7099c6cfbc70
| 62
|
py
|
Python
|
src/deeply/callbacks/plots/__init__.py
|
achillesrasquinha/deeply
|
fd1ce32da130591fc92df8df89e07f1497b2b902
|
[
"MIT"
] | 2
|
2021-10-05T16:37:30.000Z
|
2021-10-11T21:31:43.000Z
|
src/deeply/callbacks/plots/__init__.py
|
achillesrasquinha/deeply
|
fd1ce32da130591fc92df8df89e07f1497b2b902
|
[
"MIT"
] | null | null | null |
src/deeply/callbacks/plots/__init__.py
|
achillesrasquinha/deeply
|
fd1ce32da130591fc92df8df89e07f1497b2b902
|
[
"MIT"
] | 1
|
2021-07-16T02:23:37.000Z
|
2021-07-16T02:23:37.000Z
|
from deeply.callbacks.plots.history import PlotHistoryCallback
| 62
| 62
| 0.903226
| 7
| 62
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.048387
| 62
| 1
| 62
| 62
| 0.949153
| 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
|
358cc2aba4225b68211a0cf8bf64fad2bf23ca49
| 129
|
py
|
Python
|
ros_ws/src/baxter_tools/scripts/camera_control.py
|
mesneym/Baxter-Arm-PP
|
fdbf86309bc64c31af105daa026b2f8519710129
|
[
"MIT"
] | null | null | null |
ros_ws/src/baxter_tools/scripts/camera_control.py
|
mesneym/Baxter-Arm-PP
|
fdbf86309bc64c31af105daa026b2f8519710129
|
[
"MIT"
] | null | null | null |
ros_ws/src/baxter_tools/scripts/camera_control.py
|
mesneym/Baxter-Arm-PP
|
fdbf86309bc64c31af105daa026b2f8519710129
|
[
"MIT"
] | null | null | null |
version https://git-lfs.github.com/spec/v1
oid sha256:63fc149cf8788835d8fa1a652cadb155263fe4716fe248ca8ab3cdbd07a73ece
size 5510
| 32.25
| 75
| 0.883721
| 13
| 129
| 8.769231
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.357724
| 0.046512
| 129
| 3
| 76
| 43
| 0.569106
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
35af43d3da6358c855dd3565c9f5e5a56a14a048
| 80
|
py
|
Python
|
universe/exceptions.py
|
jbradberry/universe
|
109261f75c49435d118cf9c5238124466a03d2d3
|
[
"MIT"
] | null | null | null |
universe/exceptions.py
|
jbradberry/universe
|
109261f75c49435d118cf9c5238124466a03d2d3
|
[
"MIT"
] | 24
|
2020-04-14T20:32:21.000Z
|
2021-08-03T13:29:45.000Z
|
universe/exceptions.py
|
jbradberry/universe
|
109261f75c49435d118cf9c5238124466a03d2d3
|
[
"MIT"
] | 3
|
2016-10-28T19:20:30.000Z
|
2021-02-28T03:19:49.000Z
|
class ValidationError(Exception):
pass
class empty(Exception):
pass
| 8.888889
| 33
| 0.7
| 8
| 80
| 7
| 0.625
| 0.464286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.225
| 80
| 8
| 34
| 10
| 0.903226
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
35b0ca4541446dd34543cccaa047fd3ba703b116
| 88
|
py
|
Python
|
Apartment_Management/noticeboard/admin.py
|
anmolharsh/Apartment-Management-DBMS_1
|
196fbe11ceb0fe146b41075b0350b518713cdb58
|
[
"MIT"
] | 2
|
2021-08-15T02:17:43.000Z
|
2022-01-31T14:46:20.000Z
|
rainy_project/notice/admin.py
|
habijung/WEB_HeavyReading_Rainy
|
58b7429e88931175ddceab2c280161a267149a15
|
[
"MIT"
] | null | null | null |
rainy_project/notice/admin.py
|
habijung/WEB_HeavyReading_Rainy
|
58b7429e88931175ddceab2c280161a267149a15
|
[
"MIT"
] | 2
|
2020-11-17T09:37:24.000Z
|
2021-10-04T05:59:02.000Z
|
from django.contrib import admin
from .models import Notice
admin.site.register(Notice)
| 22
| 32
| 0.829545
| 13
| 88
| 5.615385
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102273
| 88
| 4
| 33
| 22
| 0.924051
| 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
|
35e5e0a718a0d8ff249947cf2a8412e119576a67
| 122
|
py
|
Python
|
src/presquel/model/__init__.py
|
groboclown/presquel
|
83a099729678a1d0a5e46ac55f07c772a5410e34
|
[
"CC0-1.0"
] | null | null | null |
src/presquel/model/__init__.py
|
groboclown/presquel
|
83a099729678a1d0a5e46ac55f07c772a5410e34
|
[
"CC0-1.0"
] | null | null | null |
src/presquel/model/__init__.py
|
groboclown/presquel
|
83a099729678a1d0a5e46ac55f07c772a5410e34
|
[
"CC0-1.0"
] | null | null | null |
__author__ = 'Groboclown'
from .base import *
from .change import *
from .schema import *
from .version import *
| 15.25
| 26
| 0.680328
| 14
| 122
| 5.642857
| 0.571429
| 0.379747
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229508
| 122
| 7
| 27
| 17.428571
| 0.840426
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 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
|
ea1c887150da207c2aeea7eaa8be477abb370ddd
| 128
|
py
|
Python
|
tests/integration/files/file/base/script.py
|
byteskeptical/salt
|
637fe0b04f38b2274191b005d73b3c6707d7f400
|
[
"Apache-2.0"
] | 12
|
2015-01-21T00:18:25.000Z
|
2021-07-11T07:35:26.000Z
|
tests/integration/files/file/base/script.py
|
byteskeptical/salt
|
637fe0b04f38b2274191b005d73b3c6707d7f400
|
[
"Apache-2.0"
] | 86
|
2017-01-27T11:54:46.000Z
|
2020-05-20T06:25:26.000Z
|
tests/integration/files/file/base/script.py
|
byteskeptical/salt
|
637fe0b04f38b2274191b005d73b3c6707d7f400
|
[
"Apache-2.0"
] | 12
|
2015-01-05T09:50:42.000Z
|
2019-08-19T01:43:40.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import sys
print(' '.join(sys.argv[1:]))
| 16
| 38
| 0.671875
| 19
| 128
| 4.263158
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018018
| 0.132813
| 128
| 7
| 39
| 18.285714
| 0.711712
| 0.328125
| 0
| 0
| 0
| 0
| 0.011905
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ea2cc99df4ee167390b161abb619447f6aae97d3
| 24,204
|
py
|
Python
|
processes/tests/test_get_tmdb.py
|
kinoreel/kino-gather
|
defc0d6b311651f985467b5bfcfdbf77d73c10ae
|
[
"MIT"
] | null | null | null |
processes/tests/test_get_tmdb.py
|
kinoreel/kino-gather
|
defc0d6b311651f985467b5bfcfdbf77d73c10ae
|
[
"MIT"
] | 3
|
2017-06-03T16:50:56.000Z
|
2017-10-01T09:24:37.000Z
|
processes/tests/test_get_tmdb.py
|
kinoreel/kino-gather
|
defc0d6b311651f985467b5bfcfdbf77d73c10ae
|
[
"MIT"
] | null | null | null |
import unittest
import os
import sys
import responses
current_dir = (os.path.abspath(os.path.dirname(__file__)))
sys.path.insert(0, os.path.join(current_dir, '..', '..'))
from processes.get_tmdb import Main, RequestAPI, StandardiseResponse, GatherException
class TestMain(unittest.TestCase):
"""Testing GetAPI"""
@classmethod
def setUpClass(cls):
cls.main = Main()
@responses.activate
def test_get_info(self):
# Mock the request to the API
responses.add(responses.GET, 'https://api.themoviedb.org/3/movie/tt0083658',
json={'budget': 28000000,
'overview': 'In the smog-choked dystopian Los Angeles of 2019, blade runner Rick Deckard '
'is called out of retirement to terminate a quartet of replicants who have'
' escaped to Earth seeking their creator for a way to extend their'
' short life spans.',
'tagline': "Man has made his match... now it's his problem.",
'release_date': '1982-06-25',
'id': 78,
'status': 'Released',
'title': 'Blade Runner',
'popularity': 102.026128,
'credits': {
'crew': [{
'name': 'Ridley Scott',
'credit_id': '52fe4214c3a36847f8002595',
'gender': 2,
'profile_path': '/oTAL0z0vsjipCruxXUsDUIieuhk.jpg',
'id': 578,
'job': 'Director',
'department': 'Directing'
}, {
'name': 'Michael Deeley',
'credit_id': '52fe4214c3a36847f800259b',
'gender': 2,
'profile_path': None,
'id': 581,
'job': 'Producer',
'department': 'Production'
}, {
'name': 'Jordan Cronenweth',
'credit_id': '52fe4214c3a36847f80025c9',
'gender': 2,
'profile_path': None,
'id': 594,
'job': 'Director of Photography',
'department': 'Camera'
}],
'cast': [{
'cast_id': 6,
'character': 'Rick Deckard',
'credit_id': '52fe4214c3a36847f800259f',
'order': 0,
'gender': 2,
'id': 3,
'name': 'Harrison Ford',
'profile_path': '/7CcoVFTogQgex2kJkXKMe8qHZrC.jpg'
}, {
'cast_id': 7,
'character': 'Roy Batty',
'credit_id': '52fe4214c3a36847f80025a3',
'order': 1,
'gender': 2,
'id': 585,
'name': 'Rutger Hauer',
'profile_path': '/2x1S2VAUvZXZuDjZ4E9iEKINvNu.jpg'
}, {
'cast_id': 8,
'character': 'Rachael',
'credit_id': '52fe4214c3a36847f80025a7',
'order': 2,
'gender': 1,
'id': 586,
'name': 'Sean Young',
'profile_path': '/4zgkRFQruIlaJ4JakNZLoKJ70fH.jpg'
}]
},
'backdrop_path': '/5hJ0XDCxE3qGfp1H3h7HQP9rLfU.jpg',
'original_title': 'Blade Runner',
'belongs_to_collection': {
'poster_path': '/foT46aJ7QPUFDl3CK8ArDl0JaZX.jpg',
'backdrop_path': '/57zhlMYblPute6qb8v16ZmGSPVv.jpg',
'id': 422837,
'name': 'Blade Runner Collection'
},
'vote_average': 7.9,
'production_companies': [{
'id': 5798,
'name': 'Shaw Brothers'
}, {
'id': 6194,
'name': 'Warner Bros.'
}, {
'id': 7965,
'name': 'The Ladd Company'
}],
'adult': False,
'original_language': 'en',
'spoken_languages': [{
'iso_639_1': 'en',
'name': 'English'
}, {
'iso_639_1': 'de',
'name': 'Deutsch'
}, {
'iso_639_1': 'cn',
'name': '广州话 / 廣州話'
}, {
'iso_639_1': 'ja',
'name': '日本語'
}, {
'iso_639_1': 'hu',
'name': 'Magyar'
}],
'imdb_id': 'tt0083658',
'genres': [{
'id': 878,
'name': 'Science Fiction'
}, {
'id': 18,
'name': 'Drama'
}, {
'id': 53,
'name': 'Thriller'
}],
'production_countries': [{
'iso_3166_1': 'US',
'name': 'United States of America'
}, {
'iso_3166_1': 'HK',
'name': 'Hong Kong'
}, {
'iso_3166_1': 'GB',
'name': 'United Kingdom'
}],
'keywords': {
'keywords': [{
'id': 310,
'name': 'artificial intelligence'
}, {
'id': 801,
'name': 'bounty hunter'
}]
},
'video': False,
'poster_path': '/p64TtbZGCElxQHpAMWmDHkWJlH2.jpg',
'homepage': 'http://www.warnerbros.com/blade-runner',
'videos': {
'results': [{
'key': 'PSIiGE105iA',
'type': 'Featurette',
'name': 'Harrison Ford On Blade Runner',
'iso_639_1': 'en',
'id': '533ec651c3a368544800008a',
'site': 'YouTube',
'iso_3166_1': 'US',
'size': 480
}, {
'key': 'W_9rhPDLHWk',
'type': 'Trailer',
'name': 'The Final Cut trailer',
'iso_639_1': 'en',
'id': '54ff5ca09251413d9b00032c',
'site': 'YouTube',
'iso_3166_1': 'US',
'size': 1080
}, {
'key': 'AQL9hRRYDIw',
'type': 'Trailer',
'name': 'Trailer',
'iso_639_1': 'en',
'id': '586522349251412b8701d59c',
'site': 'YouTube',
'iso_3166_1': 'US',
'size': 480
}]
},
'vote_count': 3912,
'revenue': 33139618,
'runtime': 117
},
status=200)
# Check get_info for a correct imdb_id
request = {'imdb_id': 'tt0083658'}
expected_keys = ['tmdb_main', 'tmdb_cast', 'tmdb_crew', 'tmdb_company', 'tmdb_genre', 'tmdb_keywords',
'tmdb_trailer']
info = self.main.run(request)
self.assertEqual(set(info.keys()), set(expected_keys))
class TestRequestAPI(unittest.TestCase):
"""Testing RequestAPI"""
@classmethod
def setUpClass(cls):
cls.req = RequestAPI()
@responses.activate
def test_get_tmdb_good(self):
# Mock the request to the API
responses.add(responses.GET, 'https://api.themoviedb.org/3/movie/tt0083658',
json={'imdb_id': 'tt0083658', 'title': 'Blade Runner'},
status=200)
# Blade Runner
imdb_id = 'tt0083658'
response = self.req.get_tmdb(imdb_id)
self.assertEqual(response['title'], 'Blade Runner')
self.assertEqual(response['imdb_id'], imdb_id)
@responses.activate
def test_get_tmdb_bad(self):
# Mock the request to the API
responses.add(responses.GET, 'https://api.themoviedb.org/3/movie/invalid',
json={'status_message': 'The resource you requested could not be found.', 'status_code': 34},
status=200)
# Blade Runner
imdb_id = 'invalid'
self.failUnlessRaises(GatherException, self.req.get_tmdb, imdb_id)
class TestStandardiseResponse(unittest.TestCase):
"""Testing StandardiseResponse"""
@classmethod
def setUpClass(cls):
cls.stan = StandardiseResponse()
cls.imdb_id = 'tt0083658'
# Shortened response for Blade Runner from the TMDB API.
cls.response = {
'budget': 28000000,
'overview': 'In the smog-choked dystopian Los Angeles of 2019, blade runner Rick Deckard is called out'
' of retirement to terminate a quartet of replicants who have escaped to Earth seeking their'
' creator for a way to extend their short life spans.',
'tagline': "Man has made his match... now it's his problem.",
'release_date': '1982-06-25',
'id': 78,
'status': 'Released',
'title': 'Blade Runner',
'popularity': 102.026128,
'credits': {
'crew': [{
'name': 'Ridley Scott',
'credit_id': '52fe4214c3a36847f8002595',
'gender': 2,
'profile_path': '/oTAL0z0vsjipCruxXUsDUIieuhk.jpg',
'id': 578,
'job': 'Director',
'department': 'Directing'
}, {
'name': 'Michael Deeley',
'credit_id': '52fe4214c3a36847f800259b',
'gender': 2,
'profile_path': None,
'id': 581,
'job': 'Producer',
'department': 'Production'
}, {
'name': 'Jordan Cronenweth',
'credit_id': '52fe4214c3a36847f80025c9',
'gender': 2,
'profile_path': None,
'id': 594,
'job': 'Director of Photography',
'department': 'Camera'
}],
'cast': [{
'cast_id': 6,
'character': 'Rick Deckard',
'credit_id': '52fe4214c3a36847f800259f',
'order': 0,
'gender': 2,
'id': 3,
'name': 'Harrison Ford',
'profile_path': '/7CcoVFTogQgex2kJkXKMe8qHZrC.jpg'
}, {
'cast_id': 7,
'character': 'Roy Batty',
'credit_id': '52fe4214c3a36847f80025a3',
'order': 1,
'gender': 2,
'id': 585,
'name': 'Rutger Hauer',
'profile_path': '/2x1S2VAUvZXZuDjZ4E9iEKINvNu.jpg'
}, {
'cast_id': 8,
'character': 'Rachael',
'credit_id': '52fe4214c3a36847f80025a7',
'order': 2,
'gender': 1,
'id': 586,
'name': 'Sean Young',
'profile_path': '/4zgkRFQruIlaJ4JakNZLoKJ70fH.jpg'
}]
},
'backdrop_path': '/5hJ0XDCxE3qGfp1H3h7HQP9rLfU.jpg',
'original_title': 'Blade Runner',
'belongs_to_collection': {
'poster_path': '/foT46aJ7QPUFDl3CK8ArDl0JaZX.jpg',
'backdrop_path': '/57zhlMYblPute6qb8v16ZmGSPVv.jpg',
'id': 422837,
'name': 'Blade Runner Collection'
},
'vote_average': 7.9,
'production_companies': [{
'id': 5798,
'name': 'Shaw Brothers'
}, {
'id': 6194,
'name': 'Warner Bros.'
}, {
'id': 7965,
'name': 'The Ladd Company'
}],
'adult': False,
'original_language': 'en',
'spoken_languages': [{
'iso_639_1': 'en',
'name': 'English'
}, {
'iso_639_1': 'de',
'name': 'Deutsch'
}, {
'iso_639_1': 'cn',
'name': '广州话 / 廣州話'
}, {
'iso_639_1': 'ja',
'name': '日本語'
}, {
'iso_639_1': 'hu',
'name': 'Magyar'
}],
'imdb_id': 'tt0083658',
'genres': [{
'id': 878,
'name': 'Science Fiction'
}, {
'id': 18,
'name': 'Drama'
}, {
'id': 53,
'name': 'Thriller'
}],
'production_countries': [{
'iso_3166_1': 'US',
'name': 'United States of America'
}, {
'iso_3166_1': 'HK',
'name': 'Hong Kong'
}, {
'iso_3166_1': 'GB',
'name': 'United Kingdom'
}],
'keywords': {
'keywords': [{
'id': 310,
'name': 'artificial intelligence'
}, {
'id': 801,
'name': 'bounty hunter'
}]
},
'video': False,
'poster_path': '/p64TtbZGCElxQHpAMWmDHkWJlH2.jpg',
'homepage': 'http://www.warnerbros.com/blade-runner',
'videos': {
'results': [{
'key': 'PSIiGE105iA',
'type': 'Featurette',
'name': 'Harrison Ford On Blade Runner',
'iso_639_1': 'en',
'id': '533ec651c3a368544800008a',
'site': 'YouTube',
'iso_3166_1': 'US',
'size': 480
}, {
'key': 'W_9rhPDLHWk',
'type': 'Trailer',
'name': 'The Final Cut trailer',
'iso_639_1': 'en',
'id': '54ff5ca09251413d9b00032c',
'site': 'YouTube',
'iso_3166_1': 'US',
'size': 1080
}, {
'key': 'AQL9hRRYDIw',
'type': 'Trailer',
'name': 'Trailer',
'iso_639_1': 'en',
'id': '586522349251412b8701d59c',
'site': 'YouTube',
'iso_3166_1': 'US',
'size': 480
}]
},
'vote_count': 3912,
'revenue': 33139618,
'runtime': 117
}
def test_get_main_data(self):
expected_result = [{'title': 'Blade Runner', 'runtime': 117, 'revenue': 33139618, 'budget': 28000000,
'imdb_id': 'tt0083658', 'original_language': 'en', 'release_date': '1982-06-25',
'plot': 'In the smog-choked dystopian Los Angeles of 2019, blade runner Rick Deckard is'
' called out of retirement to terminate a quartet of replicants who have escaped'
' to Earth seeking their creator for a way to extend their short life spans.'}]
main_data = self.stan.get_main_data(self.imdb_id, self.response)
self.assertEqual(expected_result, main_data)
def test_get_crew_data(self):
expected_result = [{'name': 'Ridley Scott', 'imdb_id': 'tt0083658', 'role': 'director'},
{'name': 'Michael Deeley', 'imdb_id': 'tt0083658', 'role': 'producer'},
{'name': 'Jordan Cronenweth', 'imdb_id': 'tt0083658', 'role': 'director of photography'}]
crew_data = self.stan.get_crew_data(self.imdb_id, self.response)
self.assertEqual(crew_data, expected_result)
def test_get_cast_data(self):
expected_result = [{'imdb_id': 'tt0083658', 'name': 'Harrison Ford', 'role': 'actor', 'cast_order': 0},
{'imdb_id': 'tt0083658', 'name': 'Rutger Hauer', 'role': 'actor', 'cast_order': 1},
{'imdb_id': 'tt0083658', 'name': 'Sean Young', 'role': 'actor', 'cast_order': 2}]
cast_data = self.stan.get_cast_data(self.imdb_id, self.response)
self.assertEqual(cast_data, expected_result)
def test_get_keyword_data(self):
expected_result = [{'keyword': 'artificial intelligence', 'imdb_id': 'tt0083658'},
{'keyword': 'bounty hunter', 'imdb_id': 'tt0083658'}]
keywords_data = self.stan.get_keywords_data(self.imdb_id, self.response)
self.assertEqual(keywords_data, expected_result)
def test_get_genre_data(self):
expected_result = [{'genre': 'Science Fiction', 'imdb_id': 'tt0083658'},
{'genre': 'Drama', 'imdb_id': 'tt0083658'},
{'genre': 'Thriller', 'imdb_id': 'tt0083658'}]
genre_data = self.stan.get_genre_data(self.imdb_id, self.response)
self.assertEqual(genre_data, expected_result)
def test_get_company_data(self):
expected_result = [{'name': 'Shaw Brothers', 'imdb_id': 'tt0083658'},
{'name': 'Warner Bros.', 'imdb_id': 'tt0083658'},
{'name': 'The Ladd Company', 'imdb_id': 'tt0083658'}]
company_data = self.stan.get_company_data(self.imdb_id, self.response)
self.assertEqual(company_data, expected_result)
def test_get_trailer_data(self):
expected_result = [{'video_id': 'W_9rhPDLHWk', 'imdb_id': 'tt0083658', 'size': 1080}]
trailer_data = self.stan.get_trailer_data(self.imdb_id, self.response)
self.assertEqual(trailer_data, expected_result)
def test_get_trailer_data_bad(self):
response = {
'videos': {
'results': [{
'key': 'PSIiGE105iA',
'type': 'Featurette',
'name': 'Harrison Ford On Blade Runner',
'iso_639_1': 'en',
'id': '533ec651c3a368544800008a',
'site': 'YouTube',
'iso_3166_1': 'US',
'size': 480
}]
}}
expected_result = []
trailer_data = self.stan.get_trailer_data(self.imdb_id, response)
self.assertEqual(trailer_data, expected_result)
def test_sort_video_list_trailer(self):
video_list = [{
'name': 'Tv Promo',
'iso_639_1': 'en',
'size': 1080
}, {
'name': 'Trailer',
'iso_639_1': 'en',
'size': 1080
}]
result = self.stan.sort_videos_list(video_list)
expected = [{
'name': 'Trailer',
'iso_639_1': 'en',
'size': 1080
}, {
'name': 'Tv Promo',
'iso_639_1': 'en',
'size': 1080
}]
self.assertEqual(result, expected)
def test_sort_video_list_official(self):
video_list = [{
'name': 'Official video',
'iso_639_1': 'en',
'size': 1080
}, {
'name': 'Video',
'iso_639_1': 'en',
'size': 1080
}]
result = self.stan.sort_videos_list(video_list)
expected = [{
'name': 'Official video',
'iso_639_1': 'en',
'size': 1080
}, {
'name': 'Video',
'iso_639_1': 'en',
'size': 1080
}]
self.assertEqual(result, expected)
def test_sort_video_list_size(self):
video_list = [{
'name': 'Official Trailer',
'iso_639_1': 'en',
'size': 720
}, {
'name': 'Official Trailer',
'iso_639_1': 'en',
'size': 1080
}]
video_list = self.stan.sort_videos_list(video_list)
expected = [{
'name': 'Official Trailer',
'iso_639_1': 'en',
'size': 1080
}, {
'name': 'Official Trailer',
'iso_639_1': 'en',
'size': 720
}]
self.assertEqual(video_list, expected)
def test_sort_video_list_(self):
video_list = [{
'name': 'Official Video',
'iso_639_1': 'en',
'size': 720
}, {
'name': 'Trailer',
'iso_639_1': 'en',
'size': 480
}, {
'name': 'Random Video',
'iso_639_1': 'en',
'size': 1080
}]
result = self.stan.sort_videos_list(video_list)
expected = [{
'name': 'Trailer',
'iso_639_1': 'en',
'size': 480
}, {
'name': 'Official Video',
'iso_639_1': 'en',
'size': 720
}, {
'name': 'Random Video',
'iso_639_1': 'en',
'size': 1080
}]
self.assertEqual(result, expected)
if __name__ == '__main__':
unittest.main()
| 42.093913
| 118
| 0.386672
| 1,775
| 24,204
| 5.079437
| 0.171831
| 0.023957
| 0.027174
| 0.026952
| 0.77551
| 0.745785
| 0.713177
| 0.713177
| 0.677906
| 0.642303
| 0
| 0.095644
| 0.496323
| 24,204
| 574
| 119
| 42.167247
| 0.643918
| 0.010907
| 0
| 0.806331
| 0
| 0
| 0.275274
| 0.042228
| 0
| 0
| 0
| 0
| 0.027933
| 1
| 0.03352
| false
| 0
| 0.009311
| 0
| 0.048417
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ea4b1fc752dd0c2b288d59ecc337d87d6f8c4d90
| 367
|
py
|
Python
|
src/hgbot_infra/real_gpio.py
|
huegli/hgbot_infra
|
1a3e388c92745f60b3b97fcfed57070f02b7b4a1
|
[
"BSD-3-Clause"
] | null | null | null |
src/hgbot_infra/real_gpio.py
|
huegli/hgbot_infra
|
1a3e388c92745f60b3b97fcfed57070f02b7b4a1
|
[
"BSD-3-Clause"
] | null | null | null |
src/hgbot_infra/real_gpio.py
|
huegli/hgbot_infra
|
1a3e388c92745f60b3b97fcfed57070f02b7b4a1
|
[
"BSD-3-Clause"
] | null | null | null |
"""Provide wrappers for low level access to actual RPI GGPIo's"""
import RPi.GPIO
def init_gpio():
RPi.GPIO.setmode(RPi.GPIO.BCM)
def set_output(gpio):
RPi.GPIO.setup(gpio, RPi.GPIO.OUT)
def set_on(gpio):
RPi.GPIO.output(gpio, RPi.GPIO.HIGH)
def set_off(gpio):
RPi.GPIO.output(gpio, RPi.GPIO.LOW)
def cleanup_gpio():
RPi.GPIO.cleanup()
| 15.291667
| 65
| 0.686649
| 62
| 367
| 3.983871
| 0.403226
| 0.283401
| 0.356275
| 0.206478
| 0.226721
| 0.226721
| 0.226721
| 0
| 0
| 0
| 0
| 0
| 0.166213
| 367
| 23
| 66
| 15.956522
| 0.80719
| 0.160763
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.454545
| false
| 0
| 0.090909
| 0
| 0.545455
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
ea91bcb0724fcc5a7bba492b30f58727f7048e39
| 120
|
wsgi
|
Python
|
lectioapi/wsgi.wsgi
|
JonasUJ/lectiotime.xyz
|
04f6eb2096589d634f796e0b2635fc9a032a138f
|
[
"Apache-2.0"
] | null | null | null |
lectioapi/wsgi.wsgi
|
JonasUJ/lectiotime.xyz
|
04f6eb2096589d634f796e0b2635fc9a032a138f
|
[
"Apache-2.0"
] | null | null | null |
lectioapi/wsgi.wsgi
|
JonasUJ/lectiotime.xyz
|
04f6eb2096589d634f796e0b2635fc9a032a138f
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/python
import sys
sys.path.insert(0,"/var/www/lectiotime.xyz/lectioapi/")
from main import app as application
| 30
| 55
| 0.775
| 20
| 120
| 4.65
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009009
| 0.075
| 120
| 4
| 56
| 30
| 0.828829
| 0.133333
| 0
| 0
| 0
| 0
| 0.326923
| 0.326923
| 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
|
ea9d592f95a95a42932d14d712fdc63befeba1d6
| 189
|
py
|
Python
|
amulet/api/chunk/__init__.py
|
architectdrone/Amulet-Core
|
7c533b09ce730e787e76d4f5cccfc52fae2d0e3a
|
[
"MIT"
] | null | null | null |
amulet/api/chunk/__init__.py
|
architectdrone/Amulet-Core
|
7c533b09ce730e787e76d4f5cccfc52fae2d0e3a
|
[
"MIT"
] | null | null | null |
amulet/api/chunk/__init__.py
|
architectdrone/Amulet-Core
|
7c533b09ce730e787e76d4f5cccfc52fae2d0e3a
|
[
"MIT"
] | null | null | null |
from .blocks import Blocks
from .status import Status
from .biomes import Biomes
from .entity_list import EntityList
from .block_entity_dict import BlockEntityDict
from .chunk import Chunk
| 27
| 46
| 0.84127
| 27
| 189
| 5.777778
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126984
| 189
| 6
| 47
| 31.5
| 0.945455
| 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
|
5760a30884304a4f08e51130f6011569a11fadf7
| 55
|
py
|
Python
|
alntools/matrix/__init__.py
|
churchill-lab/alntools
|
dd9668284a7d924d881e4d39d1841242ef883d9c
|
[
"MIT"
] | 1
|
2018-03-22T21:52:27.000Z
|
2018-03-22T21:52:27.000Z
|
alntools/matrix/__init__.py
|
churchill-lab/alntools
|
dd9668284a7d924d881e4d39d1841242ef883d9c
|
[
"MIT"
] | 8
|
2018-08-22T16:09:16.000Z
|
2021-11-15T17:46:56.000Z
|
alntools/matrix/__init__.py
|
churchill-lab/alntools
|
dd9668284a7d924d881e4d39d1841242ef883d9c
|
[
"MIT"
] | 2
|
2019-03-10T04:34:16.000Z
|
2020-06-03T21:30:27.000Z
|
__all__ = ['AlignmentPropertyMatrix', 'Sparse3DMatrix']
| 55
| 55
| 0.8
| 3
| 55
| 13.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.054545
| 55
| 1
| 55
| 55
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.660714
| 0.410714
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5769034c5eb2d768fc20124c8b7289430899f0a4
| 2,712
|
py
|
Python
|
schema.py
|
scientist94/Udacity_DAND_Data_Wrangling
|
92cf7bb9807133c38f5d02c187df34e32273cf43
|
[
"FTL"
] | null | null | null |
schema.py
|
scientist94/Udacity_DAND_Data_Wrangling
|
92cf7bb9807133c38f5d02c187df34e32273cf43
|
[
"FTL"
] | null | null | null |
schema.py
|
scientist94/Udacity_DAND_Data_Wrangling
|
92cf7bb9807133c38f5d02c187df34e32273cf43
|
[
"FTL"
] | null | null | null |
# Note: The schema is stored in a .py file in order to take advantage of the
# int() and float() type coercion functions. Otherwise it could easily stored as
# as JSON or another serialized format.
'''This schema has been changed compared to the Udacity schema,
due to missing values for attributes 'user' and 'uid'.
It makes sense to keep them in the schema for use of other OSM data.'''
schema = {
'node': {
'type': 'dict',
'schema': {
'id': {'required': True, 'type': 'integer', 'coerce': int},
'lat': {'required': True, 'type': 'float', 'coerce': float},
'lon': {'required': True, 'type': 'float', 'coerce': float},
'user': {'required': False, 'type': 'string'},
'uid': {'required': False, 'type': 'integer', 'coerce': int},
'version': {'required': True, 'type': 'string'},
'changeset': {'required': True, 'type': 'integer', 'coerce': int},
'timestamp': {'required': True, 'type': 'string'}
}
},
'node_tags': {
'type': 'list',
'schema': {
'type': 'dict',
'schema': {
'id': {'required': True, 'type': 'integer', 'coerce': int},
'key': {'required': True, 'type': 'string'},
'value': {'required': True, 'type': 'string'},
'type': {'required': True, 'type': 'string'}
}
}
},
'way': {
'type': 'dict',
'schema': {
'id': {'required': True, 'type': 'integer', 'coerce': int},
'user': {'required': False, 'type': 'string'},
'uid': {'required': False, 'type': 'integer', 'coerce': int},
'version': {'required': True, 'type': 'string'},
'changeset': {'required': True, 'type': 'integer', 'coerce': int},
'timestamp': {'required': True, 'type': 'string'}
}
},
'way_nodes': {
'type': 'list',
'schema': {
'type': 'dict',
'schema': {
'id': {'required': True, 'type': 'integer', 'coerce': int},
'node_id': {'required': True, 'type': 'integer', 'coerce': int},
'position': {'required': True, 'type': 'integer', 'coerce': int}
}
}
},
'way_tags': {
'type': 'list',
'schema': {
'type': 'dict',
'schema': {
'id': {'required': True, 'type': 'integer', 'coerce': int},
'key': {'required': True, 'type': 'string'},
'value': {'required': True, 'type': 'string'},
'type': {'required': True, 'type': 'string'}
}
}
}
}
| 38.197183
| 80
| 0.460177
| 253
| 2,712
| 4.916996
| 0.284585
| 0.202572
| 0.270096
| 0.176849
| 0.731511
| 0.726688
| 0.649518
| 0.622187
| 0.622187
| 0.622187
| 0
| 0
| 0.331121
| 2,712
| 70
| 81
| 38.742857
| 0.685777
| 0.139012
| 0
| 0.606557
| 0
| 0
| 0.344664
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
57b29beff7ffa7fea50ec7dc9bd8cb395c62793b
| 93
|
py
|
Python
|
tccli/services/lowcode/__init__.py
|
tencentcloudapi-test/tencentcloud-cli
|
da9733765df2b405b83b7acff48256f31e053ab1
|
[
"Apache-2.0"
] | null | null | null |
tccli/services/lowcode/__init__.py
|
tencentcloudapi-test/tencentcloud-cli
|
da9733765df2b405b83b7acff48256f31e053ab1
|
[
"Apache-2.0"
] | null | null | null |
tccli/services/lowcode/__init__.py
|
tencentcloudapi-test/tencentcloud-cli
|
da9733765df2b405b83b7acff48256f31e053ab1
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
from tccli.services.lowcode.lowcode_client import action_caller
| 23.25
| 63
| 0.72043
| 12
| 93
| 5.416667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012658
| 0.150538
| 93
| 4
| 64
| 23.25
| 0.810127
| 0.225806
| 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
|
57d229ab973b9e9f35466ab6a4f5cd518ddc7b68
| 561
|
py
|
Python
|
carp_api/__init__.py
|
Drachenfels/carp-api
|
b7f280a645d5116d85dc7cd1d177b449704457de
|
[
"MIT"
] | null | null | null |
carp_api/__init__.py
|
Drachenfels/carp-api
|
b7f280a645d5116d85dc7cd1d177b449704457de
|
[
"MIT"
] | null | null | null |
carp_api/__init__.py
|
Drachenfels/carp-api
|
b7f280a645d5116d85dc7cd1d177b449704457de
|
[
"MIT"
] | null | null | null |
# keep imports one per line,
# order of imports makes difference (aka may cause cyclic import if messed up)
from . import exception # NOQA
from . import url # NOQA
from . import cli # NOQA
from . import api_request # NOQA
from . import auth_model # NOQA
from . import datetime_helper # NOQA
from . import misc_helper # NOQA
from . import request_parser # NOQA
from . import validator # NOQA
from . import signal # NOQA
from . import endpoint # NOQA
from . import routing # NOQA
from . import common # NOQA
from . import server_factory # NOQA
| 25.5
| 78
| 0.721925
| 80
| 561
| 4.9875
| 0.4625
| 0.350877
| 0.45614
| 0.100251
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.219251
| 561
| 21
| 79
| 26.714286
| 0.910959
| 0.308378
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
17f047459ec13a5bcad041c54ccb9bf43adfbe70
| 40
|
py
|
Python
|
UDAT/CAR/toolkit/evaluation/__init__.py
|
vision4robotics/UDAT
|
f06971ec7d6794d0572864cf9fd6d49a66201303
|
[
"Apache-2.0"
] | 81
|
2022-03-06T05:10:46.000Z
|
2022-03-30T09:43:41.000Z
|
UDAT/CAR/toolkit/evaluation/__init__.py
|
JayYe99/UDAT
|
f06971ec7d6794d0572864cf9fd6d49a66201303
|
[
"Apache-2.0"
] | 3
|
2022-03-07T12:02:18.000Z
|
2022-03-22T08:16:09.000Z
|
UDAT/CAR/toolkit/evaluation/__init__.py
|
JayYe99/UDAT
|
f06971ec7d6794d0572864cf9fd6d49a66201303
|
[
"Apache-2.0"
] | 17
|
2022-03-04T01:52:58.000Z
|
2022-03-30T11:57:42.000Z
|
from .ope_benchmark import OPEBenchmark
| 20
| 39
| 0.875
| 5
| 40
| 6.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 40
| 1
| 40
| 40
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
aa14a86279ae6ba1c5a9072f2de78dd4b46e2b15
| 113
|
py
|
Python
|
netfilterqueue/_version.py
|
sprintcp/python-netfilterqueue
|
a3dedaea5760accd687e4b6e2a755d63513a7943
|
[
"MIT"
] | 17
|
2021-10-30T19:28:44.000Z
|
2022-03-22T02:25:27.000Z
|
netfilterqueue/_version.py
|
sprintcp/python-netfilterqueue
|
a3dedaea5760accd687e4b6e2a755d63513a7943
|
[
"MIT"
] | 34
|
2021-11-06T19:33:53.000Z
|
2022-03-27T12:24:55.000Z
|
netfilterqueue/_version.py
|
sprintcp/python-netfilterqueue
|
a3dedaea5760accd687e4b6e2a755d63513a7943
|
[
"MIT"
] | 15
|
2021-10-30T13:54:24.000Z
|
2022-03-27T15:26:52.000Z
|
# This file is imported from __init__.py and exec'd from setup.py
__version__ = "1.0.0+dev"
VERSION = (1, 0, 0)
| 22.6
| 65
| 0.690265
| 22
| 113
| 3.181818
| 0.681818
| 0.228571
| 0.257143
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 0.176991
| 113
| 4
| 66
| 28.25
| 0.688172
| 0.557522
| 0
| 0
| 0
| 0
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
aa158d46fe3516463fc6085bc19ace78f0e028bf
| 88
|
py
|
Python
|
src/tracks/admin.py
|
craftbytesio/trackmate-backend
|
0e62557d997a147137aadab0bdd582a9c8d2aa75
|
[
"MIT"
] | null | null | null |
src/tracks/admin.py
|
craftbytesio/trackmate-backend
|
0e62557d997a147137aadab0bdd582a9c8d2aa75
|
[
"MIT"
] | null | null | null |
src/tracks/admin.py
|
craftbytesio/trackmate-backend
|
0e62557d997a147137aadab0bdd582a9c8d2aa75
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Track
admin.site.register(Track)
| 14.666667
| 32
| 0.806818
| 13
| 88
| 5.461538
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 88
| 5
| 33
| 17.6
| 0.922078
| 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
|
aa473939c8750c5713cb1a26502a1ce53e78852c
| 88
|
py
|
Python
|
apps/grupo/admin.py
|
emilioeiji/gestao_gbareru
|
2f3d196c2f511910cba2857062725b817547896a
|
[
"CC0-1.0"
] | null | null | null |
apps/grupo/admin.py
|
emilioeiji/gestao_gbareru
|
2f3d196c2f511910cba2857062725b817547896a
|
[
"CC0-1.0"
] | null | null | null |
apps/grupo/admin.py
|
emilioeiji/gestao_gbareru
|
2f3d196c2f511910cba2857062725b817547896a
|
[
"CC0-1.0"
] | null | null | null |
from django.contrib import admin
from .models import Grupo
admin.site.register(Grupo)
| 14.666667
| 32
| 0.806818
| 13
| 88
| 5.461538
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 88
| 5
| 33
| 17.6
| 0.922078
| 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
|
a4d09855aebc602b0988e58448410b2f181afbf1
| 3,947
|
py
|
Python
|
tests/test_utils.py
|
unterwegi/aionap
|
31cd743314e2071d1a5b007c0ed640deedd634d8
|
[
"BSD-2-Clause"
] | 9
|
2017-09-04T10:55:28.000Z
|
2020-08-13T08:03:25.000Z
|
tests/test_utils.py
|
unterwegi/aionap
|
31cd743314e2071d1a5b007c0ed640deedd634d8
|
[
"BSD-2-Clause"
] | 11
|
2017-08-28T07:31:15.000Z
|
2019-03-27T23:57:33.000Z
|
tests/test_utils.py
|
unterwegi/aionap
|
31cd743314e2071d1a5b007c0ed640deedd634d8
|
[
"BSD-2-Clause"
] | 4
|
2017-09-05T04:41:43.000Z
|
2021-02-25T21:53:33.000Z
|
import pytest
import aionap.utils
@pytest.mark.parametrize("urljoin_args, expected", [
# http + base with trailing slash
(["http://example.com/"], "http://example.com/"),
(["http://example.com/", "test"], "http://example.com/test"),
(["http://example.com/", "test", "example"], "http://example.com/test/example"),
# http + base without trailing slash
(["http://example.com"], "http://example.com/"),
(["http://example.com", "test"], "http://example.com/test"),
(["http://example.com", "test", "example"], "http://example.com/test/example"),
# https + base with trailing slash
(["https://example.com/"], "https://example.com/"),
(["https://example.com/", "test"], "https://example.com/test"),
(["https://example.com/", "test", "example"], "https://example.com/test/example"),
# https + base without trailing slash
(["https://example.com"], "https://example.com/"),
(["https://example.com", "test"], "https://example.com/test"),
(["https://example.com", "test", "example"], "https://example.com/test/example"),
# http + port + base with trailing slash
(["http://example.com:80/"], "http://example.com:80/"),
(["http://example.com:80/", "test"], "http://example.com:80/test"),
(["http://example.com:80/", "test", "example"], "http://example.com:80/test/example"),
# http + port +base without trailing slash
(["http://example.com:80"], "http://example.com:80/"),
(["http://example.com:80", "test"], "http://example.com:80/test"),
(["http://example.com:80", "test", "example"], "http://example.com:80/test/example"),
# https + port + base with trailing slash
(["https://example.com:443/"], "https://example.com:443/"),
(["https://example.com:443/", "test"], "https://example.com:443/test"),
(["https://example.com:443/", "test", "example"], "https://example.com:443/test/example"),
# https + port + base without trailing slash
(["https://example.com:443"], "https://example.com:443/"),
(["https://example.com:443", "test"], "https://example.com:443/test"),
(["https://example.com:443", "test", "example"], "https://example.com:443/test/example"),
# path
(["/"], "/"),
(["/", "test"], "/test"),
(["/", "test", "example"], "/test/example"),
# with base path
(["/path/"], "/path/"),
(["/path/", "test"], "/path/test"),
(["/path/", "test", "example"], "/path/test/example"),
# trailing slash
(["http://example.com/", "test/"], "http://example.com/test/"),
(["http://example.com/", "test/", "example/"], "http://example.com/test/example/"),
])
def test_urljoin(urljoin_args, expected):
assert aionap.utils.urljoin(*urljoin_args) == expected
@pytest.mark.parametrize("params, expected", [
# empty
({}, []),
([], []),
# no lists
({'key1': 'value1'}, [('key1', 'value1')]),
({'key1': 'value1', 'key2': 'value2'}, [('key1', 'value1'), ('key2', 'value2')]),
# just lists
({'key1': ['value1']}, [('key1', 'value1')]),
({'key1': ['value1', 'value2']}, [('key1', 'value1'), ('key1', 'value2')]),
({'key1': ['value1'], 'key2': ['value2']}, [('key1', 'value1'), ('key2', 'value2')]),
({'key1': ['value1', 'value2'], 'key2': ['value1', 'value2']}, [('key1', 'value1'), ('key1', 'value2'), ('key2', 'value1'), ('key2', 'value2')]),
# mixed
({'key1': ['value1'], 'd': 'v'}, [('key1', 'value1'), ('d', 'v')]),
({'key1': ['value1', 'value2'], 'd': 'v'}, [('key1', 'value1'), ('key1', 'value2'), ('d', 'v')]),
({'key1': ['value1'], 'key2': ['value2'], 'd': 'v'}, [('key1', 'value1'), ('key2', 'value2'), ('d', 'v')]),
({'key1': ['value1', 'value2'], 'key2': ['value1', 'value2'], 'd': 'v'}, [('key1', 'value1'), ('key1', 'value2'), ('key2', 'value1'), ('key2', 'value2'), ('d', 'v')]),
])
def test_transform_url_parameters(params, expected):
assert sorted(aionap.utils.transform_url_parameters(params)) == sorted(expected)
| 51.934211
| 171
| 0.547758
| 448
| 3,947
| 4.805804
| 0.091518
| 0.241523
| 0.182072
| 0.100325
| 0.810497
| 0.791918
| 0.748258
| 0.673479
| 0.579656
| 0.579656
| 0
| 0.04066
| 0.140106
| 3,947
| 75
| 172
| 52.626667
| 0.593695
| 0.092475
| 0
| 0.037037
| 0
| 0
| 0.53913
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 1
| 0.037037
| false
| 0
| 0.037037
| 0
| 0.074074
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a4e6428f11983820b07c9b072067d90fb64a1778
| 40
|
py
|
Python
|
atcoder/abc/a192.py
|
tomato-300yen/coding
|
db6f440a96d8c83f486005c650461a69f27e3926
|
[
"MIT"
] | null | null | null |
atcoder/abc/a192.py
|
tomato-300yen/coding
|
db6f440a96d8c83f486005c650461a69f27e3926
|
[
"MIT"
] | null | null | null |
atcoder/abc/a192.py
|
tomato-300yen/coding
|
db6f440a96d8c83f486005c650461a69f27e3926
|
[
"MIT"
] | null | null | null |
X = int(input())
print(100 - (X % 100))
| 13.333333
| 22
| 0.525
| 7
| 40
| 3
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 0.2
| 40
| 2
| 23
| 20
| 0.46875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
a4ee62774e0c88f73f69bff3c492029341923402
| 35,480
|
py
|
Python
|
chainlibpy/generated/cosmos/tx/v1beta1/tx_pb2.py
|
yihuang/chainlibpy
|
c4f7c12373ba6a84df8f5a783e828f2ad937dc0a
|
[
"Apache-2.0"
] | 8
|
2021-03-29T10:21:29.000Z
|
2021-12-18T19:33:45.000Z
|
chainlibpy/generated/cosmos/tx/v1beta1/tx_pb2.py
|
yihuang/chainlibpy
|
c4f7c12373ba6a84df8f5a783e828f2ad937dc0a
|
[
"Apache-2.0"
] | 34
|
2021-03-12T07:20:28.000Z
|
2022-02-17T08:41:51.000Z
|
chainlibpy/generated/cosmos/tx/v1beta1/tx_pb2.py
|
yihuang/chainlibpy
|
c4f7c12373ba6a84df8f5a783e828f2ad937dc0a
|
[
"Apache-2.0"
] | 5
|
2020-12-25T03:06:55.000Z
|
2021-01-21T10:37:12.000Z
|
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cosmos/tx/v1beta1/tx.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2
from cosmos.crypto.multisig.v1beta1 import multisig_pb2 as cosmos_dot_crypto_dot_multisig_dot_v1beta1_dot_multisig__pb2
from cosmos.base.v1beta1 import coin_pb2 as cosmos_dot_base_dot_v1beta1_dot_coin__pb2
from cosmos.tx.signing.v1beta1 import signing_pb2 as cosmos_dot_tx_dot_signing_dot_v1beta1_dot_signing__pb2
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
from cosmos_proto import cosmos_pb2 as cosmos__proto_dot_cosmos__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='cosmos/tx/v1beta1/tx.proto',
package='cosmos.tx.v1beta1',
syntax='proto3',
serialized_options=b'Z%github.com/cosmos/cosmos-sdk/types/tx',
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x1a\x63osmos/tx/v1beta1/tx.proto\x12\x11\x63osmos.tx.v1beta1\x1a\x14gogoproto/gogo.proto\x1a-cosmos/crypto/multisig/v1beta1/multisig.proto\x1a\x1e\x63osmos/base/v1beta1/coin.proto\x1a\'cosmos/tx/signing/v1beta1/signing.proto\x1a\x19google/protobuf/any.proto\x1a\x19\x63osmos_proto/cosmos.proto\"q\n\x02Tx\x12\'\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x19.cosmos.tx.v1beta1.TxBody\x12.\n\tauth_info\x18\x02 \x01(\x0b\x32\x1b.cosmos.tx.v1beta1.AuthInfo\x12\x12\n\nsignatures\x18\x03 \x03(\x0c\"H\n\x05TxRaw\x12\x12\n\nbody_bytes\x18\x01 \x01(\x0c\x12\x17\n\x0f\x61uth_info_bytes\x18\x02 \x01(\x0c\x12\x12\n\nsignatures\x18\x03 \x03(\x0c\"`\n\x07SignDoc\x12\x12\n\nbody_bytes\x18\x01 \x01(\x0c\x12\x17\n\x0f\x61uth_info_bytes\x18\x02 \x01(\x0c\x12\x10\n\x08\x63hain_id\x18\x03 \x01(\t\x12\x16\n\x0e\x61\x63\x63ount_number\x18\x04 \x01(\x04\"\xb1\x01\n\x10SignDocDirectAux\x12\x12\n\nbody_bytes\x18\x01 \x01(\x0c\x12(\n\npublic_key\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x10\n\x08\x63hain_id\x18\x03 \x01(\t\x12\x16\n\x0e\x61\x63\x63ount_number\x18\x04 \x01(\x04\x12\x10\n\x08sequence\x18\x05 \x01(\x04\x12#\n\x03tip\x18\x06 \x01(\x0b\x32\x16.cosmos.tx.v1beta1.Tip\"\xc7\x01\n\x06TxBody\x12&\n\x08messages\x18\x01 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x0c\n\x04memo\x18\x02 \x01(\t\x12\x16\n\x0etimeout_height\x18\x03 \x01(\x04\x12\x30\n\x11\x65xtension_options\x18\xff\x07 \x03(\x0b\x32\x14.google.protobuf.Any\x12=\n\x1enon_critical_extension_options\x18\xff\x0f \x03(\x0b\x32\x14.google.protobuf.Any\"\x89\x01\n\x08\x41uthInfo\x12\x33\n\x0csigner_infos\x18\x01 \x03(\x0b\x32\x1d.cosmos.tx.v1beta1.SignerInfo\x12#\n\x03\x66\x65\x65\x18\x02 \x01(\x0b\x32\x16.cosmos.tx.v1beta1.Fee\x12#\n\x03tip\x18\x03 \x01(\x0b\x32\x16.cosmos.tx.v1beta1.Tip\"x\n\nSignerInfo\x12(\n\npublic_key\x18\x01 \x01(\x0b\x32\x14.google.protobuf.Any\x12.\n\tmode_info\x18\x02 \x01(\x0b\x32\x1b.cosmos.tx.v1beta1.ModeInfo\x12\x10\n\x08sequence\x18\x03 \x01(\x04\"\xb5\x02\n\x08ModeInfo\x12\x34\n\x06single\x18\x01 \x01(\x0b\x32\".cosmos.tx.v1beta1.ModeInfo.SingleH\x00\x12\x32\n\x05multi\x18\x02 \x01(\x0b\x32!.cosmos.tx.v1beta1.ModeInfo.MultiH\x00\x1a;\n\x06Single\x12\x31\n\x04mode\x18\x01 \x01(\x0e\x32#.cosmos.tx.signing.v1beta1.SignMode\x1a{\n\x05Multi\x12\x41\n\x08\x62itarray\x18\x01 \x01(\x0b\x32/.cosmos.crypto.multisig.v1beta1.CompactBitArray\x12/\n\nmode_infos\x18\x02 \x03(\x0b\x32\x1b.cosmos.tx.v1beta1.ModeInfoB\x05\n\x03sum\"\xc9\x01\n\x03\x46\x65\x65\x12[\n\x06\x61mount\x18\x01 \x03(\x0b\x32\x19.cosmos.base.v1beta1.CoinB0\xc8\xde\x1f\x00\xaa\xdf\x1f(github.com/cosmos/cosmos-sdk/types.Coins\x12\x11\n\tgas_limit\x18\x02 \x01(\x04\x12\'\n\x05payer\x18\x03 \x01(\tB\x18\xd2\xb4-\x14\x63osmos.AddressString\x12)\n\x07granter\x18\x04 \x01(\tB\x18\xd2\xb4-\x14\x63osmos.AddressString\"\x8c\x01\n\x03Tip\x12[\n\x06\x61mount\x18\x01 \x03(\x0b\x32\x19.cosmos.base.v1beta1.CoinB0\xc8\xde\x1f\x00\xaa\xdf\x1f(github.com/cosmos/cosmos-sdk/types.Coins\x12(\n\x06tipper\x18\x02 \x01(\tB\x18\xd2\xb4-\x14\x63osmos.AddressString\"\xb1\x01\n\rAuxSignerData\x12)\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x18\xd2\xb4-\x14\x63osmos.AddressString\x12\x35\n\x08sign_doc\x18\x02 \x01(\x0b\x32#.cosmos.tx.v1beta1.SignDocDirectAux\x12\x31\n\x04mode\x18\x03 \x01(\x0e\x32#.cosmos.tx.signing.v1beta1.SignMode\x12\x0b\n\x03sig\x18\x04 \x01(\x0c\x42\'Z%github.com/cosmos/cosmos-sdk/types/txb\x06proto3'
,
dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,cosmos_dot_crypto_dot_multisig_dot_v1beta1_dot_multisig__pb2.DESCRIPTOR,cosmos_dot_base_dot_v1beta1_dot_coin__pb2.DESCRIPTOR,cosmos_dot_tx_dot_signing_dot_v1beta1_dot_signing__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,cosmos__proto_dot_cosmos__pb2.DESCRIPTOR,])
_TX = _descriptor.Descriptor(
name='Tx',
full_name='cosmos.tx.v1beta1.Tx',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='body', full_name='cosmos.tx.v1beta1.Tx.body', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='auth_info', full_name='cosmos.tx.v1beta1.Tx.auth_info', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='signatures', full_name='cosmos.tx.v1beta1.Tx.signatures', index=2,
number=3, type=12, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=245,
serialized_end=358,
)
_TXRAW = _descriptor.Descriptor(
name='TxRaw',
full_name='cosmos.tx.v1beta1.TxRaw',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='body_bytes', full_name='cosmos.tx.v1beta1.TxRaw.body_bytes', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='auth_info_bytes', full_name='cosmos.tx.v1beta1.TxRaw.auth_info_bytes', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='signatures', full_name='cosmos.tx.v1beta1.TxRaw.signatures', index=2,
number=3, type=12, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=360,
serialized_end=432,
)
_SIGNDOC = _descriptor.Descriptor(
name='SignDoc',
full_name='cosmos.tx.v1beta1.SignDoc',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='body_bytes', full_name='cosmos.tx.v1beta1.SignDoc.body_bytes', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='auth_info_bytes', full_name='cosmos.tx.v1beta1.SignDoc.auth_info_bytes', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='chain_id', full_name='cosmos.tx.v1beta1.SignDoc.chain_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='account_number', full_name='cosmos.tx.v1beta1.SignDoc.account_number', index=3,
number=4, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=434,
serialized_end=530,
)
_SIGNDOCDIRECTAUX = _descriptor.Descriptor(
name='SignDocDirectAux',
full_name='cosmos.tx.v1beta1.SignDocDirectAux',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='body_bytes', full_name='cosmos.tx.v1beta1.SignDocDirectAux.body_bytes', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='public_key', full_name='cosmos.tx.v1beta1.SignDocDirectAux.public_key', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='chain_id', full_name='cosmos.tx.v1beta1.SignDocDirectAux.chain_id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='account_number', full_name='cosmos.tx.v1beta1.SignDocDirectAux.account_number', index=3,
number=4, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='sequence', full_name='cosmos.tx.v1beta1.SignDocDirectAux.sequence', index=4,
number=5, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tip', full_name='cosmos.tx.v1beta1.SignDocDirectAux.tip', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=533,
serialized_end=710,
)
_TXBODY = _descriptor.Descriptor(
name='TxBody',
full_name='cosmos.tx.v1beta1.TxBody',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='messages', full_name='cosmos.tx.v1beta1.TxBody.messages', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='memo', full_name='cosmos.tx.v1beta1.TxBody.memo', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='timeout_height', full_name='cosmos.tx.v1beta1.TxBody.timeout_height', index=2,
number=3, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='extension_options', full_name='cosmos.tx.v1beta1.TxBody.extension_options', index=3,
number=1023, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='non_critical_extension_options', full_name='cosmos.tx.v1beta1.TxBody.non_critical_extension_options', index=4,
number=2047, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=713,
serialized_end=912,
)
_AUTHINFO = _descriptor.Descriptor(
name='AuthInfo',
full_name='cosmos.tx.v1beta1.AuthInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='signer_infos', full_name='cosmos.tx.v1beta1.AuthInfo.signer_infos', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='fee', full_name='cosmos.tx.v1beta1.AuthInfo.fee', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tip', full_name='cosmos.tx.v1beta1.AuthInfo.tip', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=915,
serialized_end=1052,
)
_SIGNERINFO = _descriptor.Descriptor(
name='SignerInfo',
full_name='cosmos.tx.v1beta1.SignerInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='public_key', full_name='cosmos.tx.v1beta1.SignerInfo.public_key', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='mode_info', full_name='cosmos.tx.v1beta1.SignerInfo.mode_info', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='sequence', full_name='cosmos.tx.v1beta1.SignerInfo.sequence', index=2,
number=3, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1054,
serialized_end=1174,
)
_MODEINFO_SINGLE = _descriptor.Descriptor(
name='Single',
full_name='cosmos.tx.v1beta1.ModeInfo.Single',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='mode', full_name='cosmos.tx.v1beta1.ModeInfo.Single.mode', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1295,
serialized_end=1354,
)
_MODEINFO_MULTI = _descriptor.Descriptor(
name='Multi',
full_name='cosmos.tx.v1beta1.ModeInfo.Multi',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='bitarray', full_name='cosmos.tx.v1beta1.ModeInfo.Multi.bitarray', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='mode_infos', full_name='cosmos.tx.v1beta1.ModeInfo.Multi.mode_infos', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1356,
serialized_end=1479,
)
_MODEINFO = _descriptor.Descriptor(
name='ModeInfo',
full_name='cosmos.tx.v1beta1.ModeInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='single', full_name='cosmos.tx.v1beta1.ModeInfo.single', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='multi', full_name='cosmos.tx.v1beta1.ModeInfo.multi', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[_MODEINFO_SINGLE, _MODEINFO_MULTI, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='sum', full_name='cosmos.tx.v1beta1.ModeInfo.sum',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=1177,
serialized_end=1486,
)
_FEE = _descriptor.Descriptor(
name='Fee',
full_name='cosmos.tx.v1beta1.Fee',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='amount', full_name='cosmos.tx.v1beta1.Fee.amount', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\310\336\037\000\252\337\037(github.com/cosmos/cosmos-sdk/types.Coins', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='gas_limit', full_name='cosmos.tx.v1beta1.Fee.gas_limit', index=1,
number=2, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='payer', full_name='cosmos.tx.v1beta1.Fee.payer', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\322\264-\024cosmos.AddressString', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='granter', full_name='cosmos.tx.v1beta1.Fee.granter', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\322\264-\024cosmos.AddressString', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1489,
serialized_end=1690,
)
_TIP = _descriptor.Descriptor(
name='Tip',
full_name='cosmos.tx.v1beta1.Tip',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='amount', full_name='cosmos.tx.v1beta1.Tip.amount', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\310\336\037\000\252\337\037(github.com/cosmos/cosmos-sdk/types.Coins', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tipper', full_name='cosmos.tx.v1beta1.Tip.tipper', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\322\264-\024cosmos.AddressString', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1693,
serialized_end=1833,
)
_AUXSIGNERDATA = _descriptor.Descriptor(
name='AuxSignerData',
full_name='cosmos.tx.v1beta1.AuxSignerData',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='address', full_name='cosmos.tx.v1beta1.AuxSignerData.address', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\322\264-\024cosmos.AddressString', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='sign_doc', full_name='cosmos.tx.v1beta1.AuxSignerData.sign_doc', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='mode', full_name='cosmos.tx.v1beta1.AuxSignerData.mode', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='sig', full_name='cosmos.tx.v1beta1.AuxSignerData.sig', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1836,
serialized_end=2013,
)
_TX.fields_by_name['body'].message_type = _TXBODY
_TX.fields_by_name['auth_info'].message_type = _AUTHINFO
_SIGNDOCDIRECTAUX.fields_by_name['public_key'].message_type = google_dot_protobuf_dot_any__pb2._ANY
_SIGNDOCDIRECTAUX.fields_by_name['tip'].message_type = _TIP
_TXBODY.fields_by_name['messages'].message_type = google_dot_protobuf_dot_any__pb2._ANY
_TXBODY.fields_by_name['extension_options'].message_type = google_dot_protobuf_dot_any__pb2._ANY
_TXBODY.fields_by_name['non_critical_extension_options'].message_type = google_dot_protobuf_dot_any__pb2._ANY
_AUTHINFO.fields_by_name['signer_infos'].message_type = _SIGNERINFO
_AUTHINFO.fields_by_name['fee'].message_type = _FEE
_AUTHINFO.fields_by_name['tip'].message_type = _TIP
_SIGNERINFO.fields_by_name['public_key'].message_type = google_dot_protobuf_dot_any__pb2._ANY
_SIGNERINFO.fields_by_name['mode_info'].message_type = _MODEINFO
_MODEINFO_SINGLE.fields_by_name['mode'].enum_type = cosmos_dot_tx_dot_signing_dot_v1beta1_dot_signing__pb2._SIGNMODE
_MODEINFO_SINGLE.containing_type = _MODEINFO
_MODEINFO_MULTI.fields_by_name['bitarray'].message_type = cosmos_dot_crypto_dot_multisig_dot_v1beta1_dot_multisig__pb2._COMPACTBITARRAY
_MODEINFO_MULTI.fields_by_name['mode_infos'].message_type = _MODEINFO
_MODEINFO_MULTI.containing_type = _MODEINFO
_MODEINFO.fields_by_name['single'].message_type = _MODEINFO_SINGLE
_MODEINFO.fields_by_name['multi'].message_type = _MODEINFO_MULTI
_MODEINFO.oneofs_by_name['sum'].fields.append(
_MODEINFO.fields_by_name['single'])
_MODEINFO.fields_by_name['single'].containing_oneof = _MODEINFO.oneofs_by_name['sum']
_MODEINFO.oneofs_by_name['sum'].fields.append(
_MODEINFO.fields_by_name['multi'])
_MODEINFO.fields_by_name['multi'].containing_oneof = _MODEINFO.oneofs_by_name['sum']
_FEE.fields_by_name['amount'].message_type = cosmos_dot_base_dot_v1beta1_dot_coin__pb2._COIN
_TIP.fields_by_name['amount'].message_type = cosmos_dot_base_dot_v1beta1_dot_coin__pb2._COIN
_AUXSIGNERDATA.fields_by_name['sign_doc'].message_type = _SIGNDOCDIRECTAUX
_AUXSIGNERDATA.fields_by_name['mode'].enum_type = cosmos_dot_tx_dot_signing_dot_v1beta1_dot_signing__pb2._SIGNMODE
DESCRIPTOR.message_types_by_name['Tx'] = _TX
DESCRIPTOR.message_types_by_name['TxRaw'] = _TXRAW
DESCRIPTOR.message_types_by_name['SignDoc'] = _SIGNDOC
DESCRIPTOR.message_types_by_name['SignDocDirectAux'] = _SIGNDOCDIRECTAUX
DESCRIPTOR.message_types_by_name['TxBody'] = _TXBODY
DESCRIPTOR.message_types_by_name['AuthInfo'] = _AUTHINFO
DESCRIPTOR.message_types_by_name['SignerInfo'] = _SIGNERINFO
DESCRIPTOR.message_types_by_name['ModeInfo'] = _MODEINFO
DESCRIPTOR.message_types_by_name['Fee'] = _FEE
DESCRIPTOR.message_types_by_name['Tip'] = _TIP
DESCRIPTOR.message_types_by_name['AuxSignerData'] = _AUXSIGNERDATA
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Tx = _reflection.GeneratedProtocolMessageType('Tx', (_message.Message,), {
'DESCRIPTOR' : _TX,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.Tx)
})
_sym_db.RegisterMessage(Tx)
TxRaw = _reflection.GeneratedProtocolMessageType('TxRaw', (_message.Message,), {
'DESCRIPTOR' : _TXRAW,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.TxRaw)
})
_sym_db.RegisterMessage(TxRaw)
SignDoc = _reflection.GeneratedProtocolMessageType('SignDoc', (_message.Message,), {
'DESCRIPTOR' : _SIGNDOC,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.SignDoc)
})
_sym_db.RegisterMessage(SignDoc)
SignDocDirectAux = _reflection.GeneratedProtocolMessageType('SignDocDirectAux', (_message.Message,), {
'DESCRIPTOR' : _SIGNDOCDIRECTAUX,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.SignDocDirectAux)
})
_sym_db.RegisterMessage(SignDocDirectAux)
TxBody = _reflection.GeneratedProtocolMessageType('TxBody', (_message.Message,), {
'DESCRIPTOR' : _TXBODY,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.TxBody)
})
_sym_db.RegisterMessage(TxBody)
AuthInfo = _reflection.GeneratedProtocolMessageType('AuthInfo', (_message.Message,), {
'DESCRIPTOR' : _AUTHINFO,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.AuthInfo)
})
_sym_db.RegisterMessage(AuthInfo)
SignerInfo = _reflection.GeneratedProtocolMessageType('SignerInfo', (_message.Message,), {
'DESCRIPTOR' : _SIGNERINFO,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.SignerInfo)
})
_sym_db.RegisterMessage(SignerInfo)
ModeInfo = _reflection.GeneratedProtocolMessageType('ModeInfo', (_message.Message,), {
'Single' : _reflection.GeneratedProtocolMessageType('Single', (_message.Message,), {
'DESCRIPTOR' : _MODEINFO_SINGLE,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.ModeInfo.Single)
})
,
'Multi' : _reflection.GeneratedProtocolMessageType('Multi', (_message.Message,), {
'DESCRIPTOR' : _MODEINFO_MULTI,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.ModeInfo.Multi)
})
,
'DESCRIPTOR' : _MODEINFO,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.ModeInfo)
})
_sym_db.RegisterMessage(ModeInfo)
_sym_db.RegisterMessage(ModeInfo.Single)
_sym_db.RegisterMessage(ModeInfo.Multi)
Fee = _reflection.GeneratedProtocolMessageType('Fee', (_message.Message,), {
'DESCRIPTOR' : _FEE,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.Fee)
})
_sym_db.RegisterMessage(Fee)
Tip = _reflection.GeneratedProtocolMessageType('Tip', (_message.Message,), {
'DESCRIPTOR' : _TIP,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.Tip)
})
_sym_db.RegisterMessage(Tip)
AuxSignerData = _reflection.GeneratedProtocolMessageType('AuxSignerData', (_message.Message,), {
'DESCRIPTOR' : _AUXSIGNERDATA,
'__module__' : 'cosmos.tx.v1beta1.tx_pb2'
# @@protoc_insertion_point(class_scope:cosmos.tx.v1beta1.AuxSignerData)
})
_sym_db.RegisterMessage(AuxSignerData)
DESCRIPTOR._options = None
_FEE.fields_by_name['amount']._options = None
_FEE.fields_by_name['payer']._options = None
_FEE.fields_by_name['granter']._options = None
_TIP.fields_by_name['amount']._options = None
_TIP.fields_by_name['tipper']._options = None
_AUXSIGNERDATA.fields_by_name['address']._options = None
# @@protoc_insertion_point(module_scope)
| 44.35
| 3,392
| 0.757554
| 4,750
| 35,480
| 5.321684
| 0.063579
| 0.044307
| 0.056967
| 0.042844
| 0.788512
| 0.753818
| 0.703774
| 0.684548
| 0.660258
| 0.648073
| 0
| 0.046871
| 0.114233
| 35,480
| 799
| 3,393
| 44.405507
| 0.75747
| 0.030158
| 0
| 0.66985
| 1
| 0.010914
| 0.175793
| 0.136796
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.013643
| 0
| 0.013643
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a4f6d58c059f23798584781f99e51b80b4f9c675
| 153
|
py
|
Python
|
swap_in/clothes/models/__init__.py
|
Swap-in/swap.in_master
|
22b052749bcaf779cde709fd8dde6129715d0314
|
[
"MIT"
] | null | null | null |
swap_in/clothes/models/__init__.py
|
Swap-in/swap.in_master
|
22b052749bcaf779cde709fd8dde6129715d0314
|
[
"MIT"
] | null | null | null |
swap_in/clothes/models/__init__.py
|
Swap-in/swap.in_master
|
22b052749bcaf779cde709fd8dde6129715d0314
|
[
"MIT"
] | null | null | null |
from .clothes import Clothes
from .categories import category
from .likes import like
from .notifications import notification
from .matches import Match
| 25.5
| 39
| 0.836601
| 20
| 153
| 6.4
| 0.55
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130719
| 153
| 5
| 40
| 30.6
| 0.962406
| 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
|
350313cbd2b84b6fecb229373cb3dbd59503817f
| 584
|
py
|
Python
|
pyautofinance/common/strategies/test_strats/monkey_strat.py
|
webclinic017/PyAutoFinance
|
532cb1c5418dd9eeb07f2f08646170cde1fe0303
|
[
"MIT"
] | null | null | null |
pyautofinance/common/strategies/test_strats/monkey_strat.py
|
webclinic017/PyAutoFinance
|
532cb1c5418dd9eeb07f2f08646170cde1fe0303
|
[
"MIT"
] | null | null | null |
pyautofinance/common/strategies/test_strats/monkey_strat.py
|
webclinic017/PyAutoFinance
|
532cb1c5418dd9eeb07f2f08646170cde1fe0303
|
[
"MIT"
] | 1
|
2022-02-24T09:18:13.000Z
|
2022-02-24T09:18:13.000Z
|
from random import random
from pyautofinance.common.strategies.base_strategy import BaseStrategy
class MonkeyStrat(BaseStrategy):
params = (
('entries_proba', 0.5),
('exits_proba', 0.5)
)
def _open_short_condition(self) -> bool:
return random() < self.p.entries_proba
def _open_long_condition(self) -> bool:
return random() < self.p.entries_proba
def _close_short_condition(self) -> bool:
return random() < self.p.exits_proba
def _close_long_condition(self) -> bool:
return random() < self.p.exits_proba
| 24.333333
| 70
| 0.671233
| 72
| 584
| 5.180556
| 0.375
| 0.13941
| 0.182306
| 0.246649
| 0.546917
| 0.546917
| 0.546917
| 0.546917
| 0.49866
| 0.262735
| 0
| 0.008811
| 0.222603
| 584
| 23
| 71
| 25.391304
| 0.812775
| 0
| 0
| 0.266667
| 0
| 0
| 0.041096
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.266667
| false
| 0
| 0.133333
| 0.266667
| 0.8
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
3512878409f3654e248e29e8ec68f3cd64857517
| 105
|
py
|
Python
|
simple_romp/vis_human/__init__.py
|
jjandnn/ROMP
|
653a0c9de13c7e242bc304147ae6559d1c6ff283
|
[
"MIT"
] | null | null | null |
simple_romp/vis_human/__init__.py
|
jjandnn/ROMP
|
653a0c9de13c7e242bc304147ae6559d1c6ff283
|
[
"MIT"
] | null | null | null |
simple_romp/vis_human/__init__.py
|
jjandnn/ROMP
|
653a0c9de13c7e242bc304147ae6559d1c6ff283
|
[
"MIT"
] | null | null | null |
from .main import setup_renderer, rendering_romp_bev_results
from .vis_utils import mesh_color_left2right
| 52.5
| 60
| 0.895238
| 16
| 105
| 5.4375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.07619
| 105
| 2
| 61
| 52.5
| 0.886598
| 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
|
3524379644ee74fa99026f57d024032fc4c06cea
| 354
|
py
|
Python
|
textadapter/tests/conftest.py
|
ContinuumIO/TextAdapter
|
53138c2277cdfcf32e127251313d4f77f81050aa
|
[
"BSD-3-Clause"
] | 22
|
2016-11-09T12:20:04.000Z
|
2021-02-07T03:07:58.000Z
|
dbadapter/tests/conftest.py
|
ContinuumIO/DBAdapter
|
19a49b4963d50df27cc930cf27693f31fd8e0426
|
[
"BSD-3-Clause"
] | 3
|
2016-11-01T03:43:03.000Z
|
2017-02-27T20:19:05.000Z
|
dbadapter/tests/conftest.py
|
ContinuumIO/DBAdapter
|
19a49b4963d50df27cc930cf27693f31fd8e0426
|
[
"BSD-3-Clause"
] | 10
|
2017-10-10T23:15:00.000Z
|
2021-12-04T14:44:19.000Z
|
import pytest
def pytest_addoption(parser):
parser.addoption('--pg_host', action='store')
parser.addoption('--pg_dbname', action='store')
parser.addoption('--pg_user', action='store')
parser.addoption('--acc_host', action='store')
parser.addoption('--acc_user', action='store')
parser.addoption('--acc_password', action='store')
| 35.4
| 54
| 0.689266
| 42
| 354
| 5.642857
| 0.309524
| 0.379747
| 0.35865
| 0.548523
| 0.670886
| 0.278481
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115819
| 354
| 9
| 55
| 39.333333
| 0.757189
| 0
| 0
| 0
| 0
| 0
| 0.262712
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0.125
| 0.125
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
352744fafcc7fc2242bb78fe8915d5fe2b8f3282
| 225
|
py
|
Python
|
experiments/_try_c.py
|
yitongx/baconian-public
|
a67e23c6bc6bfe7019ec9532a3d18f06aed6bbbb
|
[
"MIT"
] | null | null | null |
experiments/_try_c.py
|
yitongx/baconian-public
|
a67e23c6bc6bfe7019ec9532a3d18f06aed6bbbb
|
[
"MIT"
] | null | null | null |
experiments/_try_c.py
|
yitongx/baconian-public
|
a67e23c6bc6bfe7019ec9532a3d18f06aed6bbbb
|
[
"MIT"
] | null | null | null |
import os
from baconian.core.global_var import SinglentonStepCounter
class Func(object):
def __init__(self):
self.counter = SinglentonStepCounter()
def call(self, *args, **kwargs):
return self.counter
| 28.125
| 58
| 0.715556
| 26
| 225
| 6
| 0.730769
| 0.141026
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191111
| 225
| 8
| 59
| 28.125
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.142857
| 0.857143
| 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
|
354be05d3952cc2f1d72f990794591d7d833ee65
| 116
|
py
|
Python
|
20032018/sub_programs/ik.py
|
yararsemih/Ybs2008
|
222d34308ba08dd6d32a6f4612ffa27e490d4a0c
|
[
"MIT"
] | null | null | null |
20032018/sub_programs/ik.py
|
yararsemih/Ybs2008
|
222d34308ba08dd6d32a6f4612ffa27e490d4a0c
|
[
"MIT"
] | null | null | null |
20032018/sub_programs/ik.py
|
yararsemih/Ybs2008
|
222d34308ba08dd6d32a6f4612ffa27e490d4a0c
|
[
"MIT"
] | null | null | null |
from Views import ik_View as ikView
from Controllers import ik_Controller as ikController
ikView(ikController())
| 29
| 54
| 0.827586
| 16
| 116
| 5.875
| 0.625
| 0.170213
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 116
| 3
| 55
| 38.666667
| 0.94
| 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
|
101fedbeae9b6c92e9a2c82d13ace83ee02c65de
| 160
|
py
|
Python
|
src/apps/__init__.py
|
marloz/sandeliapp
|
7c66469ae825ffd07adcd479a8ff4d10f496ce4d
|
[
"MIT"
] | null | null | null |
src/apps/__init__.py
|
marloz/sandeliapp
|
7c66469ae825ffd07adcd479a8ff4d10f496ce4d
|
[
"MIT"
] | null | null | null |
src/apps/__init__.py
|
marloz/sandeliapp
|
7c66469ae825ffd07adcd479a8ff4d10f496ce4d
|
[
"MIT"
] | null | null | null |
# from .login import LoginApp
from .order.order import OrderApp
from .entity_app import EntityApp
# from .home import HomeApp
from .discount import DiscountApp
| 26.666667
| 33
| 0.8125
| 22
| 160
| 5.863636
| 0.590909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1375
| 160
| 5
| 34
| 32
| 0.934783
| 0.33125
| 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
|
1027cf76a3d71fe84c389bb39e2d5809f8fac6c4
| 63
|
py
|
Python
|
models/__init__.py
|
Pang-Yatian/Point-MAE
|
61727f76e9d0c28babf422505073bd43c2f517bc
|
[
"MIT"
] | 42
|
2022-03-15T02:35:03.000Z
|
2022-03-24T02:51:01.000Z
|
models/__init__.py
|
Pang-Yatian/Point-MAE
|
61727f76e9d0c28babf422505073bd43c2f517bc
|
[
"MIT"
] | 5
|
2022-03-17T15:16:48.000Z
|
2022-03-29T06:41:44.000Z
|
models/__init__.py
|
Pang-Yatian/Point-MAE
|
61727f76e9d0c28babf422505073bd43c2f517bc
|
[
"MIT"
] | 5
|
2022-03-15T02:43:57.000Z
|
2022-03-23T18:51:55.000Z
|
from .build import build_model_from_cfg
import models.Point_MAE
| 31.5
| 39
| 0.888889
| 11
| 63
| 4.727273
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 63
| 2
| 40
| 31.5
| 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 | 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
|
10459822850511279e8c1a3d2bbaf25cc719ac33
| 140
|
py
|
Python
|
backend/library_service/config.py
|
merialdo/research.matrices
|
147983bafc3b1257eca0871aca99f7eb91ce6457
|
[
"Apache-2.0"
] | 2
|
2021-11-29T19:22:17.000Z
|
2022-01-11T21:40:14.000Z
|
backend/library_service/config.py
|
merialdo/research.matrices
|
147983bafc3b1257eca0871aca99f7eb91ce6457
|
[
"Apache-2.0"
] | null | null | null |
backend/library_service/config.py
|
merialdo/research.matrices
|
147983bafc3b1257eca0871aca99f7eb91ce6457
|
[
"Apache-2.0"
] | 3
|
2021-11-30T18:24:51.000Z
|
2022-02-17T15:23:05.000Z
|
import os
LIBRARY_ROOT = os.path.abspath(os.path.join(os.path.abspath(__file__), os.path.pardir))
MONGODB_HOST = 'mongodb://localhost/HTR'
| 28
| 87
| 0.764286
| 22
| 140
| 4.590909
| 0.590909
| 0.237624
| 0.257426
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 140
| 4
| 88
| 35
| 0.776923
| 0
| 0
| 0
| 0
| 0
| 0.164286
| 0.164286
| 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
|
106caf46c35bb2be4b5baa4a6effa916d83785c3
| 903
|
py
|
Python
|
hoomd/md/__init__.py
|
kmoskovtsev/HOOMD-Blue-fork
|
99560563a5ba9e082b513764bae51a84f48fdc70
|
[
"BSD-3-Clause"
] | null | null | null |
hoomd/md/__init__.py
|
kmoskovtsev/HOOMD-Blue-fork
|
99560563a5ba9e082b513764bae51a84f48fdc70
|
[
"BSD-3-Clause"
] | null | null | null |
hoomd/md/__init__.py
|
kmoskovtsev/HOOMD-Blue-fork
|
99560563a5ba9e082b513764bae51a84f48fdc70
|
[
"BSD-3-Clause"
] | null | null | null |
# Copyright (c) 2009-2016 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
""" Molecular Dynamics
Perform Molecular Dynamics simulations with HOOMD-blue.
.. rubric:: Stability
:py:mod:`hoomd.md` is **stable**. When upgrading from version 2.x to 2.y (y > x),
existing job scripts that follow *documented* interfaces for functions and classes
will not require any modifications. **Maintainer:** Joshua A. Anderson
"""
from hoomd.md import angle
from hoomd.md import bond
from hoomd.md import charge
from hoomd.md import constrain
from hoomd.md import dihedral
from hoomd.md import external
from hoomd.md import force
from hoomd.md import improper
from hoomd.md import integrate
from hoomd.md import nlist
from hoomd.md import pair
from hoomd.md import update
from hoomd.md import wall
from hoomd.md import special_pair
| 31.137931
| 87
| 0.785161
| 146
| 903
| 4.849315
| 0.520548
| 0.148305
| 0.217514
| 0.336158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014286
| 0.147287
| 903
| 28
| 88
| 32.25
| 0.905195
| 0.540421
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
107b18f51fc5f08774e85b56c079fcbe94a148f5
| 407
|
py
|
Python
|
core/views.py
|
reddevilcero/SchoolWeb
|
7adb0d6a82a803aab3e06ebedfcb022ab758c56e
|
[
"MIT"
] | null | null | null |
core/views.py
|
reddevilcero/SchoolWeb
|
7adb0d6a82a803aab3e06ebedfcb022ab758c56e
|
[
"MIT"
] | null | null | null |
core/views.py
|
reddevilcero/SchoolWeb
|
7adb0d6a82a803aab3e06ebedfcb022ab758c56e
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
# Create your views here.
# Error Pages
def server_error(request):
return render(request, 'errors/500.html')
def not_found(request,exception):
return render(request, 'errors/404.html')
def permission_denied(request,exception):
return render(request, 'errors/403.html')
def bad_request(request,exception):
return render(request, 'errors/400.html')
| 20.35
| 45
| 0.746929
| 54
| 407
| 5.555556
| 0.5
| 0.16
| 0.253333
| 0.333333
| 0.41
| 0.41
| 0
| 0
| 0
| 0
| 0
| 0.034188
| 0.137592
| 407
| 20
| 46
| 20.35
| 0.820513
| 0.085995
| 0
| 0
| 0
| 0
| 0.162162
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.444444
| false
| 0
| 0.111111
| 0.444444
| 1
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
52ac9934cd805682f5a8d088061a57a62700fa2e
| 121
|
py
|
Python
|
rtloader/test/python/datadog_checks/checks/__init__.py
|
Jeremyyang920/datadog-agent
|
11e65147e366cbff7a0ae9f5feb8db9930173911
|
[
"Apache-2.0"
] | 1,611
|
2017-09-28T15:07:39.000Z
|
2022-03-31T18:23:05.000Z
|
rtloader/test/python/datadog_checks/checks/__init__.py
|
Jeremyyang920/datadog-agent
|
11e65147e366cbff7a0ae9f5feb8db9930173911
|
[
"Apache-2.0"
] | 3,946
|
2017-09-28T14:45:19.000Z
|
2022-03-31T20:19:36.000Z
|
rtloader/test/python/datadog_checks/checks/__init__.py
|
Jeremyyang920/datadog-agent
|
11e65147e366cbff7a0ae9f5feb8db9930173911
|
[
"Apache-2.0"
] | 916
|
2017-10-17T23:18:48.000Z
|
2022-03-30T09:26:14.000Z
|
# replicate the backward compat redirection we have in integrations-core
from ..base.checks import * # noqa: F401, F403
| 40.333333
| 72
| 0.768595
| 17
| 121
| 5.470588
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.157025
| 121
| 2
| 73
| 60.5
| 0.852941
| 0.719008
| 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
|
52b21215c42d9c3638edfcf40354431ebf304faf
| 1,397
|
py
|
Python
|
eigo/forms.py
|
joshua-hashimoto/eigo-of-the-day-django
|
68ec7fe4257c67689de596cf34e991a3750b7f36
|
[
"MIT"
] | null | null | null |
eigo/forms.py
|
joshua-hashimoto/eigo-of-the-day-django
|
68ec7fe4257c67689de596cf34e991a3750b7f36
|
[
"MIT"
] | 8
|
2021-04-08T19:45:15.000Z
|
2022-03-12T00:49:25.000Z
|
eigo/forms.py
|
joshua-hashimoto/eigo-of-the-day-django
|
68ec7fe4257c67689de596cf34e991a3750b7f36
|
[
"MIT"
] | null | null | null |
from django import forms
from extra_views import InlineFormSetFactory
from .models import Example, Snap
class ExampleInlineFormSet(InlineFormSetFactory):
"""
inlineformset class using django-extra-views.
Attributes:
model (Example): model to create an inlineformset_factory
fields (Tuple): model fields that will be rendered in the template
prefix (str): set prefix that will be use in the rendered forms in the template.
factory_kwargs (Dict): a dictionary to set additional information for inlineformset_factory.
"""
model = Example
fields = ('example',)
prefix = 'example-form'
factory_kwargs = {'extra': 3, 'max_num': None,
'can_order': False, 'can_delete': True}
class SnapInlineFormSet(InlineFormSetFactory):
"""
inlineformset class using django-extra-views.
Attributes:
model (Snap): model to create an inlineformset_factory
fields (Tuple): model fields that will be rendered in the template
prefix (str): set prefix that will be use in the rendered forms in the template.
factory_kwargs (Dict): a dictionary to set additional information for inlineformset_factory.
"""
model = Snap
fields = ('snap',)
prefix = 'snap-form'
factory_kwargs = {'extra': 5, 'max_num': None,
'can_order': False, 'can_delete': True}
| 34.925
| 100
| 0.678597
| 166
| 1,397
| 5.620482
| 0.313253
| 0.032154
| 0.042872
| 0.092176
| 0.733119
| 0.733119
| 0.733119
| 0.733119
| 0.733119
| 0.49732
| 0
| 0.001883
| 0.2398
| 1,397
| 39
| 101
| 35.820513
| 0.876648
| 0.53257
| 0
| 0.133333
| 0
| 0
| 0.161512
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.866667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
52c7263020cc86eb5914e81720a1833148e29a5a
| 169
|
py
|
Python
|
string_formating.py
|
joshavenue/python_notebook
|
8d46ba88ef4f05dea6801364bc134edb981df02e
|
[
"Unlicense"
] | null | null | null |
string_formating.py
|
joshavenue/python_notebook
|
8d46ba88ef4f05dea6801364bc134edb981df02e
|
[
"Unlicense"
] | null | null | null |
string_formating.py
|
joshavenue/python_notebook
|
8d46ba88ef4f05dea6801364bc134edb981df02e
|
[
"Unlicense"
] | null | null | null |
x = ['happy','sad','cheerful']
print('{0},{1},{2}'.format(x[0],x[1].x[2]))
##-------------------------------------------##
a = "{x}, {y}".format(x=5, y=12)
print(a)
| 16.9
| 47
| 0.337278
| 25
| 169
| 2.28
| 0.52
| 0.245614
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058442
| 0.088757
| 169
| 9
| 48
| 18.777778
| 0.311688
| 0.254438
| 0
| 0
| 0
| 0
| 0.289256
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
52fe8dbaa8c0944e1f1e6c31cc09c75ec40a5920
| 9,046
|
py
|
Python
|
a10sdk/core/ip/ip_anomaly_drop.py
|
deepfield/a10sdk-python
|
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
|
[
"Apache-2.0"
] | 16
|
2015-05-20T07:26:30.000Z
|
2021-01-23T11:56:57.000Z
|
a10sdk/core/ip/ip_anomaly_drop.py
|
deepfield/a10sdk-python
|
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
|
[
"Apache-2.0"
] | 6
|
2015-03-24T22:07:11.000Z
|
2017-03-28T21:31:18.000Z
|
a10sdk/core/ip/ip_anomaly_drop.py
|
deepfield/a10sdk-python
|
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
|
[
"Apache-2.0"
] | 23
|
2015-03-29T15:43:01.000Z
|
2021-06-02T17:12:01.000Z
|
from a10sdk.common.A10BaseClass import A10BaseClass
class SecurityAttack(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param layer_3: {"default": 0, "type": "number", "description": "drop packets with layer 3 anomaly", "format": "flag"}
:param layer_4: {"default": 0, "type": "number", "description": "drop packets with layer 4 anomaly", "format": "flag"}
:param security_attack: {"default": 0, "type": "number", "description": "drop packets causing security attack", "format": "flag"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.b_key = "security-attack"
self.DeviceProxy = ""
self.layer_3 = ""
self.layer_4 = ""
self.security_attack = ""
for keys, value in kwargs.items():
setattr(self,keys, value)
class PacketDeformity(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param layer_4: {"default": 0, "type": "number", "description": "drop packets with layer 4 anomaly", "format": "flag"}
:param layer_3: {"default": 0, "type": "number", "description": "drop packets with layer 3 anomaly", "format": "flag"}
:param packet_deformity: {"default": 0, "type": "number", "description": "drop packets with deformity", "format": "flag"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.b_key = "packet-deformity"
self.DeviceProxy = ""
self.layer_4 = ""
self.layer_3 = ""
self.packet_deformity = ""
for keys, value in kwargs.items():
setattr(self,keys, value)
class SamplingEnable(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param counters1: {"enum": ["all", "land", "emp_frg", "emp_mic_frg", "opt", "frg", "bad_ip_hdrlen", "bad_ip_flg", "bad_ip_ttl", "no_ip_payload", "over_ip_payload", "bad_ip_payload_len", "bad_ip_frg_offset", "csum", "pod", "bad_tcp_urg_offset", "tcp_sht_hdr", "tcp_bad_iplen", "tcp_null_frg", "tcp_null_scan", "tcp_syn_fin", "tcp_xmas", "tcp_xmas_scan", "tcp_syn_frg", "tcp_frg_hdr", "tcp_bad_csum", "udp_srt_hdr", "udp_bad_len", "udp_kerb_frg", "udp_port_lb", "udp_bad_csum", "runt_ip_hdr", "runt_tcp_udp_hdr", "ipip_tnl_msmtch", "tcp_opt_err", "ipip_tnl_err", "vxlan_err", "nvgre_err"], "type": "string", "description": "'all': all; 'land': land; 'emp_frg': emp_frg; 'emp_mic_frg': emp_mic_frg; 'opt': opt; 'frg': frg; 'bad_ip_hdrlen': bad_ip_hdrlen; 'bad_ip_flg': bad_ip_flg; 'bad_ip_ttl': bad_ip_ttl; 'no_ip_payload': no_ip_payload; 'over_ip_payload': over_ip_payload; 'bad_ip_payload_len': bad_ip_payload_len; 'bad_ip_frg_offset': bad_ip_frg_offset; 'csum': csum; 'pod': pod; 'bad_tcp_urg_offset': bad_tcp_urg_offset; 'tcp_sht_hdr': tcp_sht_hdr; 'tcp_bad_iplen': tcp_bad_iplen; 'tcp_null_frg': tcp_null_frg; 'tcp_null_scan': tcp_null_scan; 'tcp_syn_fin': tcp_syn_fin; 'tcp_xmas': tcp_xmas; 'tcp_xmas_scan': tcp_xmas_scan; 'tcp_syn_frg': tcp_syn_frg; 'tcp_frg_hdr': tcp_frg_hdr; 'tcp_bad_csum': tcp_bad_csum; 'udp_srt_hdr': udp_srt_hdr; 'udp_bad_len': udp_bad_len; 'udp_kerb_frg': udp_kerb_frg; 'udp_port_lb': udp_port_lb; 'udp_bad_csum': udp_bad_csum; 'runt_ip_hdr': runt_ip_hdr; 'runt_tcp_udp_hdr': runt_tcp_udp_hdr; 'ipip_tnl_msmtch': ipip_tnl_msmtch; 'tcp_opt_err': tcp_opt_err; 'ipip_tnl_err': ipip_tnl_err; 'vxlan_err': vxlan_err; 'nvgre_err': nvgre_err; ", "format": "enum"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.b_key = "sampling-enable"
self.DeviceProxy = ""
self.counters1 = ""
for keys, value in kwargs.items():
setattr(self,keys, value)
class AnomalyDrop(A10BaseClass):
""" :param frag: {"default": 0, "optional": true, "type": "number", "description": "drop all fragmented packets", "format": "flag"}
:param out_of_sequence: {"description": "out of sequence packet threshold (threshold value)", "format": "number", "type": "number", "maximum": 127, "minimum": 1, "optional": true}
:param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}
:param tcp_syn_fin: {"default": 0, "optional": true, "type": "number", "description": "drop TCP packets with both syn and fin flags set", "format": "flag"}
:param drop_all: {"default": 0, "optional": true, "type": "number", "description": "drop all IP anomaly packets", "format": "flag"}
:param ping_of_death: {"default": 0, "optional": true, "type": "number", "description": "drop oversize ICMP packets", "format": "flag"}
:param tcp_no_flag: {"default": 0, "optional": true, "type": "number", "description": "drop TCP packets with no flag", "format": "flag"}
:param zero_window: {"description": "zero window size threshold (threshold value)", "format": "number", "type": "number", "maximum": 127, "minimum": 1, "optional": true}
:param sampling_enable: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"optional": true, "counters1": {"enum": ["all", "land", "emp_frg", "emp_mic_frg", "opt", "frg", "bad_ip_hdrlen", "bad_ip_flg", "bad_ip_ttl", "no_ip_payload", "over_ip_payload", "bad_ip_payload_len", "bad_ip_frg_offset", "csum", "pod", "bad_tcp_urg_offset", "tcp_sht_hdr", "tcp_bad_iplen", "tcp_null_frg", "tcp_null_scan", "tcp_syn_fin", "tcp_xmas", "tcp_xmas_scan", "tcp_syn_frg", "tcp_frg_hdr", "tcp_bad_csum", "udp_srt_hdr", "udp_bad_len", "udp_kerb_frg", "udp_port_lb", "udp_bad_csum", "runt_ip_hdr", "runt_tcp_udp_hdr", "ipip_tnl_msmtch", "tcp_opt_err", "ipip_tnl_err", "vxlan_err", "nvgre_err"], "type": "string", "description": "'all': all; 'land': land; 'emp_frg': emp_frg; 'emp_mic_frg': emp_mic_frg; 'opt': opt; 'frg': frg; 'bad_ip_hdrlen': bad_ip_hdrlen; 'bad_ip_flg': bad_ip_flg; 'bad_ip_ttl': bad_ip_ttl; 'no_ip_payload': no_ip_payload; 'over_ip_payload': over_ip_payload; 'bad_ip_payload_len': bad_ip_payload_len; 'bad_ip_frg_offset': bad_ip_frg_offset; 'csum': csum; 'pod': pod; 'bad_tcp_urg_offset': bad_tcp_urg_offset; 'tcp_sht_hdr': tcp_sht_hdr; 'tcp_bad_iplen': tcp_bad_iplen; 'tcp_null_frg': tcp_null_frg; 'tcp_null_scan': tcp_null_scan; 'tcp_syn_fin': tcp_syn_fin; 'tcp_xmas': tcp_xmas; 'tcp_xmas_scan': tcp_xmas_scan; 'tcp_syn_frg': tcp_syn_frg; 'tcp_frg_hdr': tcp_frg_hdr; 'tcp_bad_csum': tcp_bad_csum; 'udp_srt_hdr': udp_srt_hdr; 'udp_bad_len': udp_bad_len; 'udp_kerb_frg': udp_kerb_frg; 'udp_port_lb': udp_port_lb; 'udp_bad_csum': udp_bad_csum; 'runt_ip_hdr': runt_ip_hdr; 'runt_tcp_udp_hdr': runt_tcp_udp_hdr; 'ipip_tnl_msmtch': ipip_tnl_msmtch; 'tcp_opt_err': tcp_opt_err; 'ipip_tnl_err': ipip_tnl_err; 'vxlan_err': vxlan_err; 'nvgre_err': nvgre_err; ", "format": "enum"}}}]}
:param ip_option: {"default": 0, "optional": true, "type": "number", "description": "drop packets with IP options", "format": "flag"}
:param land_attack: {"default": 0, "optional": true, "type": "number", "description": "drop IP packets with the same source and destination addresses", "format": "flag"}
:param tcp_syn_frag: {"default": 0, "optional": true, "type": "number", "description": "drop fragmented TCP packets with syn flag set", "format": "flag"}
:param bad_content: {"description": "bad content threshold (threshold value)", "format": "number", "type": "number", "maximum": 127, "minimum": 1, "optional": true}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
Class Description::
Set IP anomaly drop policy.
Class anomaly-drop supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
URL for this object::
`https://<Hostname|Ip address>//axapi/v3/ip/anomaly-drop`.
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.required=[]
self.b_key = "anomaly-drop"
self.a10_url="/axapi/v3/ip/anomaly-drop"
self.DeviceProxy = ""
self.frag = ""
self.out_of_sequence = ""
self.uuid = ""
self.tcp_syn_fin = ""
self.drop_all = ""
self.ping_of_death = ""
self.security_attack = {}
self.tcp_no_flag = ""
self.packet_deformity = {}
self.zero_window = ""
self.sampling_enable = []
self.ip_option = ""
self.land_attack = ""
self.tcp_syn_frag = ""
self.bad_content = ""
for keys, value in kwargs.items():
setattr(self,keys, value)
| 66.514706
| 1,838
| 0.672562
| 1,299
| 9,046
| 4.330254
| 0.124711
| 0.026667
| 0.052267
| 0.062222
| 0.740444
| 0.733333
| 0.731378
| 0.724267
| 0.686578
| 0.660089
| 0
| 0.008738
| 0.165045
| 9,046
| 135
| 1,839
| 67.007407
| 0.735999
| 0.782998
| 0
| 0.45283
| 0
| 0
| 0.044986
| 0.01355
| 0
| 0
| 0
| 0
| 0
| 1
| 0.075472
| false
| 0
| 0.018868
| 0
| 0.169811
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5e1e7940624a48a5c2793d91e00c663e1095f264
| 5,592
|
py
|
Python
|
bot.py
|
JITENDRAMINDA/mdbhaibot
|
3f3ceb882dedf59df0e7059ee02fda6b1d441943
|
[
"MIT"
] | null | null | null |
bot.py
|
JITENDRAMINDA/mdbhaibot
|
3f3ceb882dedf59df0e7059ee02fda6b1d441943
|
[
"MIT"
] | null | null | null |
bot.py
|
JITENDRAMINDA/mdbhaibot
|
3f3ceb882dedf59df0e7059ee02fda6b1d441943
|
[
"MIT"
] | null | null | null |
from pyrogram import Client, Filters
app = Client("820706559:AAEmDj6Rn61OC7SjWx77jqnki_IO8KNqBmA",814511,"44462f0f278503255d5cc30941b617a9")
bullet = -1001378725482
ferrari = -1001274887387
@app.on_message(Filters.chat(bullet) & ~ Filters.edited)
def main(client, message):
file = open("bullet.txt" , "r")
lines = file.readlines()
file.close()
for line in lines:
p = line.split()
for s in p:
try:
mes = client.send_message( int(s), "**" + message.text + "**" )
fie = open(str(s)+".txt","a")
fie.write(" " + str(message.message_id) + " " + str(mes.message_id))
fie.close()
except:
continue
@app.on_message(Filters.chat(ferrari) & ~ Filters.edited)
def main(client, message):
file = open("ferrari.txt" , "r")
lines = file.readlines()
file.close()
for line in lines:
p = line.split()
for r in p:
try:
mes = client.send_message( int(r), "**" + message.text + "**" )
fie = open(str(r)+".txt","a")
fie.write(" " + str(message.message_id) + " " + str(mes.message_id))
fie.close()
except:
continue
@app.on_message(Filters.chat(ferrari) & Filters.edited)
def main(client, message):
file = open("ferrari.txt" , "r")
lines = file.readlines()
file.close()
for line in lines:
t = line.split()
for m in t:
files = open(str(m)+".txt" , "r")
d = files.readlines()
files.close()
for c in d:
x = c.split()
id = str(message.message_id)
if id in x:
try:
if message.text == ".":
client.delete_messages(int(m),int(x[x.index(id)+1]))
else:
client.edit_message_text(int(m),int(x[x.index(id)+1]), "**" + message.text + "**" )
except:
continue
@app.on_message(Filters.chat(bullet) & Filters.edited)
def main(client, message):
file = open("bullet.txt" , "r")
lines = file.readlines()
file.close()
for line in lines:
b = line.split()
for a in b:
files = open(str(a)+".txt" , "r")
d = files.readlines()
files.close()
for c in d:
x = c.split()
id = str(message.message_id)
if id in x:
try:
if message.text == ".":
client.delete_messages(int(a),int(x[x.index(id)+1]))
else:
client.edit_message_text(int(a),int(x[x.index(id)+1]), "**" + message.text + "**" )
except:
continue
@app.on_message(Filters.command('add') & Filters.user(491634139) )
def forward(client, message):
if len(message.text.split(' ')) > 2:
if len(message.text.split(' ')[1]) == 14:
with open(message.text.split(" ")[2] + ".txt" , "r") as file:
lines = file.readlines()
file.close()
for line in lines:
files = open(message.text.split(" ")[2] + ".txt" , "w")
files.write(line + " " + message.text.split(' ')[1])
files.close()
with open(message.text.split(' ')[1]+".txt" , "w") as g:
g.write("001 002")
g.close()
message.reply("💾 Done, The chat_id ```" + message.text.split(' ')[1] +"```🌐 has been added to my database. ✅✅")
else:
message.reply("💼 Please write a valid chat id. ✅✅ ")
else:
message.reply("💼 Please write a valid chat id. ✅✅ ")
@app.on_message(Filters.command('remove') & Filters.user(491634139))
def forward(client, message):
if len(message.text.split(' ')) > 2:
if len(message.text.split(' ')[1]) == 14:
file = open(message.text.split(" ")[2] + ".txt" , "r")
u = file.readlines()
file.close()
for v in u:
lines = v.split()
del lines[lines.index(message.text.split(' ')[1])]
y = " ".join(str(x) for x in lines)
files = open(message.text.split(" ")[2] + ".txt" , "w")
files.write(y)
files.close()
message.reply("💾 Done, The chat_id ```" + message.text.split(' ')[1] +"```🌐 has been removed to my database. ✅✅")
else:
message.reply("💼 Please write a valid chat id. ✅✅ ")
else:
message.reply("💼 Please write a valid chat id. ✅✅ ")
@app.on_message(Filters.command('clear') & Filters.user(491634139))
def forward(client, message):
file = open(message.text.split(" ")[1] + ".txt" , "r")
lines = file.readlines()
file.close()
for line in lines:
p = line.split()
for x in p:
fie = open(str(x)+".txt","w")
fie.write("001 002")
fie.close()
message.reply("☢️ Done, Editing data cleared ✅✅")
@app.on_message(Filters.command('list') & Filters.user(491634139))
def forward(client, message):
file = open(message.text.split(" ")[1] + ".txt" , "r")
u = file.readlines()
file.close()
for v in u :
message.reply("🏘️ List of Chat_ids in my database are ```" + str(v) + "```. Its can be change. ✅✅")
@app.on_message(Filters.command('get') & Filters.user(491634139) )
def forward(client, message):
if len(message.text.split(' ')) > 1:
if len(message.text.split(' ')[1]) == 14:
x = client.get_chat(int(message.text.split(' ')[1])).title
message.reply("📶 This chat name is - "+str(x)+" ✅")
else:
message.reply("💼 Please write a valid chat id. ✅✅ ")
else:
message.reply("💼 Please write a valid chat id. ✅✅ ")
@app.on_message(Filters.command("start"))
def forward(client, message):
if message.from_user.id == 491634139:
message.reply("♻️ Welcome to your LineBot . ✅✅")
else:
message.reply("♻️ You need admins permission to use my functions. ✅✅")
@app.on_message(Filters.private)
def forward(client, message):
if not message.from_user.id == 491634139:
message.reply("♻️ You need admins permission to use my functions. ✅✅")
app.run()
| 34.518519
| 120
| 0.587446
| 799
| 5,592
| 4.131414
| 0.163955
| 0.08664
| 0.087246
| 0.061799
| 0.809149
| 0.770676
| 0.746138
| 0.724932
| 0.686156
| 0.675856
| 0
| 0.040534
| 0.223534
| 5,592
| 161
| 121
| 34.732919
| 0.70866
| 0
| 0
| 0.647436
| 0
| 0
| 0.158718
| 0.014178
| 0
| 0
| 0
| 0
| 0
| 1
| 0.070513
| false
| 0
| 0.00641
| 0
| 0.076923
| 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
|
5e2cf36607a7e23dfcfb80f33f2dbb06d7923aea
| 95
|
py
|
Python
|
basic/publishers/admin.py
|
rmolinamir/Django-App
|
b1e7eac22caa0010ac2a592ee7edb829f6eeb95a
|
[
"MIT"
] | null | null | null |
basic/publishers/admin.py
|
rmolinamir/Django-App
|
b1e7eac22caa0010ac2a592ee7edb829f6eeb95a
|
[
"MIT"
] | 7
|
2020-02-12T03:21:09.000Z
|
2022-02-10T09:04:52.000Z
|
basic/publishers/admin.py
|
rmolinamir/Django-App
|
b1e7eac22caa0010ac2a592ee7edb829f6eeb95a
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Publisher
admin.site.register(Publisher)
| 19
| 32
| 0.831579
| 13
| 95
| 6.076923
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 95
| 4
| 33
| 23.75
| 0.929412
| 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
|
ead7a3e4f39742f361a9d72deb27133b30e10795
| 13,819
|
py
|
Python
|
tests/smoke/test_smoke_checks.py
|
roocs/roocs-wps-demo
|
24ed2c3b58bbe75e45f2185489fe9ea25efaabf9
|
[
"Apache-2.0"
] | null | null | null |
tests/smoke/test_smoke_checks.py
|
roocs/roocs-wps-demo
|
24ed2c3b58bbe75e45f2185489fe9ea25efaabf9
|
[
"Apache-2.0"
] | 7
|
2020-02-14T08:03:40.000Z
|
2020-04-02T07:48:08.000Z
|
tests/smoke/test_smoke_checks.py
|
roocs/roocs-wps-demo
|
24ed2c3b58bbe75e45f2185489fe9ea25efaabf9
|
[
"Apache-2.0"
] | 1
|
2020-02-25T14:17:32.000Z
|
2020-02-25T14:17:32.000Z
|
from pyparsing import dbl_slash_comment
from tests.smoke.utils import open_dataset
from owslib.wps import ComplexDataInput
import json
import pytest
pytestmark = [pytest.mark.smoke, pytest.mark.online]
C3S_CMIP6_MON_COLLECTION = (
"c3s-cmip6.ScenarioMIP.INM.INM-CM5-0.ssp245.r1i1p1f1.Amon.rlds.gr1.v20190619"
)
C3S_CMIP6_DAY_COLLECTION = (
"c3s-cmip6.ScenarioMIP.MOHC.HadGEM3-GC31-LL.ssp245.r1i1p1f3.day.tas.gn.v20190908"
)
C3S_CMIP6_MON_TASMIN_COLLECTION = (
"c3s-cmip6.CMIP.MPI-M.MPI-ESM1-2-HR.historical.r1i1p1f1.Amon.tasmin.gn.v20190710"
)
C3S_CMIP5_DAY_COLLECTION = (
"c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest"
)
C3S_CMIP5_MON_COLLECTION = (
"c3s-cmip5.output1.MPI-M.MPI-ESM-LR.historical.mon.atmos.Amon.r1i1p1.tas.v20120315"
)
C3S_CORDEX_DAY_COLLECTION = "c3s-cordex.output.EUR-11.IPSL.IPSL-IPSL-CM5A-MR.rcp85.r1i1p1.IPSL-WRF381P.v1.day.tas.v20190919" # noqa
C3S_CORDEX_MON_COLLECTION = "c3s-cordex.output.EUR-11.CLMcom.MOHC-HadGEM2-ES.rcp85.r1i1p1.CLMcom-CCLM4-8-17.v1.mon.tas.v20150320" # noqa
WF_C3S_CMIP5 = json.dumps(
{
"doc": "subset+average on cmip5",
"inputs": {"ds": [C3S_CMIP5_DAY_COLLECTION]},
"outputs": {"output": "average/output"},
"steps": {
"subset": {
"run": "subset",
"in": {"collection": "inputs/ds", "time": "2000/2000"},
},
"average": {
"run": "average",
"in": {"collection": "subset/output", "dims": "time"},
},
},
}
)
WF_C3S_CMIP6 = json.dumps(
{
"doc": "subset+average on cmip6",
"inputs": {"ds": [C3S_CMIP6_MON_COLLECTION]},
"outputs": {"output": "average/output"},
"steps": {
"subset": {
"run": "subset",
"in": {"collection": "inputs/ds", "time": "2020-01-01/2020-12-31"},
},
"average": {
"run": "average",
"in": {"collection": "subset/output", "dims": "time"},
},
},
}
)
WF_C3S_CORDEX = json.dumps(
{
"doc": "subset on c3s-cordex",
"inputs": {"ds": [C3S_CORDEX_DAY_COLLECTION]},
"outputs": {"output": "average/output"},
"steps": {
"subset": {
"run": "subset",
"in": {
"collection": "inputs/ds",
"time": "2006/2006",
"time_components": "month:jan,feb,mar",
},
},
"average": {
"run": "average",
"in": {"collection": "subset/output", "dims": "time"},
},
},
}
)
def test_smoke_get_capabilities(wps):
caps = wps.getcapabilities()
assert caps.identification.type == "WPS"
processes = [p.identifier for p in caps.processes]
assert "subset" in processes
assert "average" in processes
assert "average_time" in processes
assert "orchestrate" in processes
def test_smoke_describe_process_subset(wps):
process = wps.describeprocess("subset")
assert process.identifier == "subset"
inputs = [inpt.identifier for inpt in process.dataInputs]
assert "collection" in inputs
assert "time" in inputs
assert "area" in inputs
def test_smoke_describe_process_average_dim(wps):
process = wps.describeprocess("average")
assert process.identifier == "average"
inputs = [inpt.identifier for inpt in process.dataInputs]
assert "collection" in inputs
assert "dims" in inputs
def test_smoke_describe_process_average_time(wps):
process = wps.describeprocess("average_time")
assert process.identifier == "average_time"
inputs = [inpt.identifier for inpt in process.dataInputs]
assert "collection" in inputs
assert "freq" in inputs
def test_smoke_describe_process_orchestrate(wps):
process = wps.describeprocess("orchestrate")
assert process.identifier == "orchestrate"
inputs = [inpt.identifier for inpt in process.dataInputs]
assert "workflow" in inputs
def test_smoke_execute_c3s_cmip5_subset(wps, tmp_path):
inputs = [
("collection", C3S_CMIP5_DAY_COLLECTION),
("time", "2005-01-01/2005-12-31"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert "tas_day_EC-EARTH_historical_r1i1p1_20050101-20051231.nc" in urls[0]
ds = open_dataset(urls[0], tmp_path)
assert "tas" in ds.variables
def test_smoke_execute_c3s_cmip6_subset(wps, tmp_path):
inputs = [
("collection", C3S_CMIP6_MON_COLLECTION),
("time", "2020-01-01/2020-12-30"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert "rlds_Amon_INM-CM5-0_ssp245_r1i1p1f1_gr1_20200116-20201216.nc" in urls[0]
ds = open_dataset(urls[0], tmp_path)
assert "rlds" in ds.variables
def test_smoke_execute_c3s_cmip6_subset_metadata(wps, tmp_path):
inputs = [
("collection", C3S_CMIP6_MON_TASMIN_COLLECTION),
("time", "2010-01-01/2010-12-31"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert (
"tasmin_Amon_MPI-ESM1-2-HR_historical_r1i1p1f1_gn_20100116-20101216.nc"
in urls[0]
)
ds = open_dataset(urls[0], tmp_path)
assert "tasmin" in ds.variables
# check fill value in bounds
assert "_FillValue" not in ds.lat_bnds.encoding
assert "_FillValue" not in ds.lon_bnds.encoding
assert "_FillValue" not in ds.time_bnds.encoding
# check fill value in coordinates
assert "_FillValue" not in ds.time.encoding
assert "_FillValue" not in ds.lat.encoding
assert "_FillValue" not in ds.lon.encoding
assert "_FillValue" not in ds.height.encoding
# check coordinates in bounds
assert "coordinates" not in ds.lat_bnds.encoding
assert "coordinates" not in ds.lon_bnds.encoding
assert "coordinates" not in ds.time_bnds.encoding
def test_smoke_execute_c3s_cordex_subset(wps, tmp_path):
inputs = [
("collection", C3S_CORDEX_MON_COLLECTION),
("time", "2020-01-01/2020-12-30"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert (
"tas_EUR-11_MOHC-HadGEM2-ES_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_mon_20200116-20201216.nc"
in urls[0]
)
ds = open_dataset(urls[0], tmp_path)
assert "tas" in ds.variables
def test_smoke_execute_c3s_cmip5_subset_by_point(wps, tmp_path):
inputs = [
("collection", C3S_CMIP5_DAY_COLLECTION),
("time", "2005-01-01/2005-12-31"),
("time_components", "month:jan,feb,mar"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert "tas_day_EC-EARTH_historical_r1i1p1_20050101-20050331.nc" in urls[0]
ds = open_dataset(urls[0], tmp_path)
assert "tas" in ds.variables
def test_smoke_execute_c3s_cmip6_subset_by_point(wps, tmp_path):
inputs = [
("collection", C3S_CMIP6_MON_COLLECTION),
("time", "2020-01-01/2020-12-30"),
("time_components", "month:jan,feb,mar"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert "rlds_Amon_INM-CM5-0_ssp245_r1i1p1f1_gr1_20200116-20200316.nc" in urls[0]
ds = open_dataset(urls[0], tmp_path)
assert "rlds" in ds.variables
def test_smoke_execute_c3s_cordex_subset_by_point(wps, tmp_path):
inputs = [
("collection", C3S_CORDEX_MON_COLLECTION),
("time", "2020-01-01/2020-12-30"),
("time_components", "month:jan,feb,mar"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert (
"tas_EUR-11_MOHC-HadGEM2-ES_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_mon_20200116-20200316.nc"
in urls[0]
)
ds = open_dataset(urls[0], tmp_path)
assert "tas" in ds.variables
def test_smoke_execute_c3s_cmip6_subset_original_files(wps):
inputs = [
("collection", C3S_CMIP6_DAY_COLLECTION),
("time", "2020-01-01/2020-12-30"),
("original_files", "1"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert "data.mips.copernicus-climate.eu" in urls[0]
# def test_smoke_execute_c3s_cmip5_subset_collection_only(wps):
# inputs = [("collection", C3S_CMIP5_MON_COLLECTION)]
# urls = wps.execute("subset", inputs)
# print(urls)
# assert len(urls) == 1
# assert "tas_mon_MPI-ESM-LR_historical_r1i1p1_18500116-20051216.nc" in urls[0]
# assert (
# "https://data.mips.copernicus-climate.eu/thredds/fileServer/esg_c3s-cmip5"
# in urls[0]
# )
def test_smoke_execute_c3s_cmip6_subset_collection_only(wps):
inputs = [("collection", C3S_CMIP6_DAY_COLLECTION)]
urls = wps.execute("subset", inputs)
print(urls)
assert len(urls) == 2
assert (
"https://data.mips.copernicus-climate.eu/thredds/fileServer/esg_c3s-cmip6"
in urls[0]
)
def test_smoke_execute_c3s_cordex_subset_collection_only(wps):
inputs = [("collection", C3S_CORDEX_MON_COLLECTION)]
urls = wps.execute("subset", inputs)
print(urls)
assert len(urls) == 10
assert (
"https://data.mips.copernicus-climate.eu/thredds/fileServer/esg_c3s-cordex"
in urls[0]
)
assert (
"tas_EUR-11_MOHC-HadGEM2-ES_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_mon_200601-201012.nc"
in urls[0]
)
def test_smoke_execute_c3s_cmip5_subset_time_and_area_cross_meridian(wps):
inputs = [
("collection", C3S_CMIP5_MON_COLLECTION),
("time", "2005/2005"),
("area", "-50,-50,50,50"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert "tas_mon_MPI-ESM-LR_historical_r1i1p1_20050116-20051216.nc" in urls[0]
def test_smoke_execute_c3s_cmip6_subset_time_and_area_cross_meridian(wps):
inputs = [
("collection", C3S_CMIP6_MON_COLLECTION),
("time", "2020-01-01/2020-12-30"),
("area", "-50,-50,50,50"),
]
urls = wps.execute("subset", inputs)
assert len(urls) == 1
assert "rlds_Amon_INM-CM5-0_ssp245_r1i1p1f1_gr1_20200116-20201216.nc" in urls[0]
def test_smoke_execute_c3s_cmip5_average_dim(wps):
inputs = [("collection", C3S_CMIP5_MON_COLLECTION), ("dims", "time")]
urls = wps.execute("average", inputs)
assert len(urls) == 1
assert "tas_mon_MPI-ESM-LR_historical_r1i1p1_avg-t.nc" in urls[0]
def test_smoke_execute_c3s_cmip5_average_time(wps):
inputs = [("collection", C3S_CMIP5_MON_COLLECTION), ("freq", "year")]
urls = wps.execute("average_time", inputs)
assert len(urls) == 1
assert (
"tas_mon_MPI-ESM-LR_historical_r1i1p1_18500101-20050101_avg-year.nc" in urls[0]
)
def test_smoke_execute_c3s_cmip6_average_dim(wps):
inputs = [("collection", C3S_CMIP6_MON_COLLECTION), ("dims", "time")]
urls = wps.execute("average", inputs)
assert len(urls) == 1
assert "rlds_Amon_INM-CM5-0_ssp245_r1i1p1f1_gr1_avg-t.nc" in urls[0]
def test_smoke_execute_c3s_cmip6_average_time(wps):
inputs = [("collection", C3S_CMIP6_MON_COLLECTION), ("freq", "year")]
urls = wps.execute("average_time", inputs)
assert len(urls) == 1
assert (
"rlds_Amon_INM-CM5-0_ssp245_r1i1p1f1_gr1_20150101-21000101_avg-year.nc"
in urls[0]
)
def test_smoke_execute_c3s_cordex_average_dim(wps):
inputs = [("collection", C3S_CORDEX_MON_COLLECTION), ("dims", "time")]
urls = wps.execute("average", inputs)
# print(urls)
assert len(urls) == 1
assert (
"tas_EUR-11_MOHC-HadGEM2-ES_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_mon_avg-t.nc"
in urls[0]
)
def test_smoke_execute_c3s_cordex_average_time(wps):
inputs = [("collection", C3S_CORDEX_MON_COLLECTION), ("freq", "year")]
urls = wps.execute("average_time", inputs)
# print(urls)
assert len(urls) == 1
assert (
"tas_EUR-11_MOHC-HadGEM2-ES_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_mon_20060101-20990101_avg-year.nc"
in urls[0]
)
def test_smoke_execute_c3s_cmip5_orchestrate(wps):
inputs = [
("workflow", ComplexDataInput(WF_C3S_CMIP5)),
]
urls = wps.execute("orchestrate", inputs)
assert len(urls) == 1
assert "tas_day_EC-EARTH_historical_r1i1p1_avg-t.nc" in urls[0]
def test_smoke_execute_c3s_cmip6_orchestrate(wps):
inputs = [
("workflow", ComplexDataInput(WF_C3S_CMIP6)),
]
urls = wps.execute("orchestrate", inputs)
assert len(urls) == 1
assert "rlds_Amon_INM-CM5-0_ssp245_r1i1p1f1_gr1_avg-t.nc" in urls[0]
def test_smoke_execute_c3s_cmip6_orchestrate_metadata(wps, tmp_path):
inputs = [
("workflow", ComplexDataInput(WF_C3S_CMIP6)),
]
urls = wps.execute("orchestrate", inputs)
assert len(urls) == 1
assert "rlds_Amon_INM-CM5-0_ssp245_r1i1p1f1_gr1_avg-t.nc" in urls[0]
ds = open_dataset(urls[0], tmp_path)
assert "rlds" in ds.variables
# check fill value in bounds
assert "_FillValue" not in ds.lat_bnds.encoding
assert "_FillValue" not in ds.lon_bnds.encoding
# assert "_FillValue" not in ds.time_bnds.encoding
# check fill value in coordinates
# assert "_FillValue" not in ds.time.encoding
assert "_FillValue" not in ds.lat.encoding
assert "_FillValue" not in ds.lon.encoding
# assert "_FillValue" not in ds.height.encoding
# check coordinates in bounds
assert "coordinates" not in ds.lat_bnds.encoding
assert "coordinates" not in ds.lon_bnds.encoding
# assert "coordinates" not in ds.time_bnds.encoding
def test_smoke_execute_c3s_cordex_orchestrate(wps):
inputs = [
("workflow", ComplexDataInput(WF_C3S_CORDEX)),
]
urls = wps.execute("orchestrate", inputs)
assert len(urls) == 1
assert (
"tas_EUR-11_IPSL-IPSL-CM5A-MR_rcp85_r1i1p1_IPSL-WRF381P_v1_day_avg-t.nc"
in urls[0]
)
| 32.515294
| 137
| 0.65902
| 1,840
| 13,819
| 4.692935
| 0.105435
| 0.019108
| 0.038911
| 0.050608
| 0.834047
| 0.805443
| 0.776954
| 0.71546
| 0.697973
| 0.672959
| 0
| 0.08067
| 0.209711
| 13,819
| 424
| 138
| 32.591981
| 0.710008
| 0.057891
| 0
| 0.486405
| 0
| 0.021148
| 0.287902
| 0.161151
| 0
| 0
| 0
| 0
| 0.259819
| 1
| 0.081571
| false
| 0
| 0.015106
| 0
| 0.096677
| 0.006042
| 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
|
d810ce2c6f49dc30b94565ae254e7bef313f5db2
| 170
|
py
|
Python
|
blackstone/pipeline/__init__.py
|
DeNeutoy/Blackstone
|
559d478389fa4af8c8c808a558921d220f7b7ae0
|
[
"Apache-2.0"
] | null | null | null |
blackstone/pipeline/__init__.py
|
DeNeutoy/Blackstone
|
559d478389fa4af8c8c808a558921d220f7b7ae0
|
[
"Apache-2.0"
] | null | null | null |
blackstone/pipeline/__init__.py
|
DeNeutoy/Blackstone
|
559d478389fa4af8c8c808a558921d220f7b7ae0
|
[
"Apache-2.0"
] | null | null | null |
from .sentence_segmenter import SentenceSegmenter
from .concepts import Concepts
from .abbreviations import AbbreviationDetector
from .compound_cases import CompoundCases
| 42.5
| 49
| 0.888235
| 18
| 170
| 8.277778
| 0.611111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 170
| 4
| 50
| 42.5
| 0.96129
| 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
|
d82858c2b775f96b31db3b7ea3a31b8ee6a0f734
| 177
|
py
|
Python
|
src/pdmongo/__init__.py
|
pakallis/python-pandas-mongo
|
1ea2c2348047b8dd1c490744a1decb0540bc0d6e
|
[
"MIT"
] | 24
|
2020-05-04T11:45:34.000Z
|
2022-03-13T06:28:32.000Z
|
src/pdmongo/__init__.py
|
pakallis/python-pandas-mongo
|
1ea2c2348047b8dd1c490744a1decb0540bc0d6e
|
[
"MIT"
] | 2
|
2020-05-05T19:06:36.000Z
|
2020-07-29T20:02:07.000Z
|
src/pdmongo/__init__.py
|
pakallis/python-pandas-mongo
|
1ea2c2348047b8dd1c490744a1decb0540bc0d6e
|
[
"MIT"
] | 2
|
2020-07-29T08:43:15.000Z
|
2021-06-25T10:06:09.000Z
|
import pandas
from .core import read_mongo # noqa
from .core import to_mongo
pandas.DataFrame.to_mongo = to_mongo
__all__ = ['read_mongo', 'to_mongo']
__version__ = '0.1.0'
| 17.7
| 36
| 0.745763
| 28
| 177
| 4.214286
| 0.464286
| 0.237288
| 0.237288
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019868
| 0.146893
| 177
| 9
| 37
| 19.666667
| 0.761589
| 0.022599
| 0
| 0
| 0
| 0
| 0.134503
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
dc62d15cd7c2cd527576059dbb7539fcf907bd6d
| 66
|
py
|
Python
|
Solution/84.py
|
pallavimr12/Python_Levelwise_Exercises
|
4090437b537260be2eca06c8d52d3a2bba1f5a5e
|
[
"BSD-3-Clause"
] | 2
|
2020-10-23T10:55:58.000Z
|
2020-11-24T04:26:23.000Z
|
Solution/84.py
|
pallavimr12/Python_Levelwise_Exercises
|
4090437b537260be2eca06c8d52d3a2bba1f5a5e
|
[
"BSD-3-Clause"
] | null | null | null |
Solution/84.py
|
pallavimr12/Python_Levelwise_Exercises
|
4090437b537260be2eca06c8d52d3a2bba1f5a5e
|
[
"BSD-3-Clause"
] | 2
|
2020-11-19T06:37:29.000Z
|
2022-01-18T14:36:46.000Z
|
li = [5,6,77,45,22,12,24]
li = [x for x in li if x%2!=0]
print(li)
| 22
| 30
| 0.560606
| 20
| 66
| 1.85
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.259259
| 0.181818
| 66
| 3
| 31
| 22
| 0.425926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dc8deaf596fb8bc0c371476c8a3137d7a49da5d2
| 190
|
py
|
Python
|
exceptions.py
|
NintendoFan/forth-py
|
b4d20f8e25ebf13712d50ba9e26292c6e5967ef6
|
[
"MIT"
] | null | null | null |
exceptions.py
|
NintendoFan/forth-py
|
b4d20f8e25ebf13712d50ba9e26292c6e5967ef6
|
[
"MIT"
] | 2
|
2020-03-17T21:09:42.000Z
|
2020-06-15T17:06:26.000Z
|
exceptions.py
|
NintendoFan/forth-py
|
b4d20f8e25ebf13712d50ba9e26292c6e5967ef6
|
[
"MIT"
] | 2
|
2020-03-21T17:25:54.000Z
|
2022-03-15T09:21:50.000Z
|
class ForthException(Exception):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class CompileException(ForthException):
pass
| 14.615385
| 39
| 0.642105
| 20
| 190
| 5.7
| 0.55
| 0.184211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.273684
| 190
| 12
| 40
| 15.833333
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0
| 0.142857
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
dc9a12db4a5877d093921f65ae94870330b20c26
| 188
|
py
|
Python
|
src/register_resources.py
|
RyanSept/pycon-weather-api
|
2e6beb2213e56ec05cf90691a14137490496abd0
|
[
"MIT"
] | null | null | null |
src/register_resources.py
|
RyanSept/pycon-weather-api
|
2e6beb2213e56ec05cf90691a14137490496abd0
|
[
"MIT"
] | null | null | null |
src/register_resources.py
|
RyanSept/pycon-weather-api
|
2e6beb2213e56ec05cf90691a14137490496abd0
|
[
"MIT"
] | null | null | null |
from src import api
from src.views import HelloWorld, Weather, Subscribe
api.add_resource(HelloWorld, '/')
api.add_resource(Weather, '/weather')
api.add_resource(Subscribe, '/subscribe')
| 26.857143
| 52
| 0.781915
| 25
| 188
| 5.76
| 0.4
| 0.125
| 0.291667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090426
| 188
| 6
| 53
| 31.333333
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0.101064
| 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
|
f4be54130f5979e8ad7d713b244abd4d65b8e691
| 259
|
py
|
Python
|
reki/grib/eccodes.py
|
perillaroc/nwpc-data
|
44d75011609e5d2d8bd8a704c7b529e0aceb7ed4
|
[
"Apache-2.0"
] | 3
|
2021-10-31T13:59:04.000Z
|
2022-03-08T06:45:41.000Z
|
reki/grib/eccodes.py
|
perillaroc/nwpc-data
|
44d75011609e5d2d8bd8a704c7b529e0aceb7ed4
|
[
"Apache-2.0"
] | null | null | null |
reki/grib/eccodes.py
|
perillaroc/nwpc-data
|
44d75011609e5d2d8bd8a704c7b529e0aceb7ed4
|
[
"Apache-2.0"
] | null | null | null |
"""
Warnings
--------
This module is only for backward compatibility.
Please use ``reki.format.grib.eccodes`` instead.
"""
from reki.format.grib.eccodes import *
import warnings
warnings.warn("Please use `reki.format.grib.eccodes` instead.", FutureWarning)
| 21.583333
| 78
| 0.741313
| 33
| 259
| 5.818182
| 0.575758
| 0.15625
| 0.21875
| 0.328125
| 0.385417
| 0.385417
| 0.385417
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 259
| 11
| 79
| 23.545455
| 0.831169
| 0.444015
| 0
| 0
| 0
| 0
| 0.338235
| 0.191176
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 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
|
f4daad7ae992e6af7aab6a8feccc0bb1fab0428d
| 68
|
py
|
Python
|
models/__init__.py
|
arpastrana/coronary-mesh-convolution
|
617e96face7f5686ef9772473c623b4dd3494047
|
[
"MIT"
] | 26
|
2021-09-22T13:21:35.000Z
|
2022-03-31T10:42:17.000Z
|
models/__init__.py
|
arpastrana/coronary-mesh-convolution
|
617e96face7f5686ef9772473c623b4dd3494047
|
[
"MIT"
] | null | null | null |
models/__init__.py
|
arpastrana/coronary-mesh-convolution
|
617e96face7f5686ef9772473c623b4dd3494047
|
[
"MIT"
] | 3
|
2021-12-24T08:37:34.000Z
|
2022-03-30T19:40:36.000Z
|
from .compare import CompareFeaSt, CompareSAGE
from .gem import GEM
| 22.666667
| 46
| 0.823529
| 9
| 68
| 6.222222
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132353
| 68
| 2
| 47
| 34
| 0.949153
| 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
|
f4e94951b3a69341935b2e5353143b38405d831c
| 410
|
py
|
Python
|
parquet_flask/io_logic/spark_constants.py
|
wphyojpl/incubator-sdap-in-situ-data-services
|
20fe50e2ebe5b9b4d3b8e266be20ee5265aadab3
|
[
"Apache-2.0"
] | 1
|
2021-11-07T20:27:13.000Z
|
2021-11-07T20:27:13.000Z
|
parquet_flask/io_logic/spark_constants.py
|
wphyojpl/incubator-sdap-in-situ-data-services
|
20fe50e2ebe5b9b4d3b8e266be20ee5265aadab3
|
[
"Apache-2.0"
] | null | null | null |
parquet_flask/io_logic/spark_constants.py
|
wphyojpl/incubator-sdap-in-situ-data-services
|
20fe50e2ebe5b9b4d3b8e266be20ee5265aadab3
|
[
"Apache-2.0"
] | 2
|
2021-11-07T20:27:05.000Z
|
2021-11-15T15:40:40.000Z
|
class SparkConstants:
SIMPLE_CRED = 'org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider'
TEMP_CRED = 'org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider'
CRED_PROVIDER_KEY = 'spark.hadoop.fs.s3a.aws.credentials.provider'
CRED_ACCESS_KEY = 'spark.hadoop.fs.s3a.access.key'
CRED_SECRET_KEY = 'spark.hadoop.fs.s3a.secret.key'
CRED_TOKEN_KEY = 'spark.hadoop.fs.s3a.session.token'
| 45.555556
| 74
| 0.768293
| 55
| 410
| 5.545455
| 0.381818
| 0.157377
| 0.216393
| 0.209836
| 0.406557
| 0.157377
| 0
| 0
| 0
| 0
| 0
| 0.016438
| 0.109756
| 410
| 8
| 75
| 51.25
| 0.819178
| 0
| 0
| 0
| 0
| 0
| 0.6
| 0.6
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
f4f3a660866603debf0d0ea5c9a3b9fd229b85fe
| 65
|
py
|
Python
|
application/providers/validator/__init__.py
|
yntonfon/dashboard-plus
|
1a4f2cf0c4d640f91d5c0aa974d0266552fb4e3d
|
[
"MIT"
] | null | null | null |
application/providers/validator/__init__.py
|
yntonfon/dashboard-plus
|
1a4f2cf0c4d640f91d5c0aa974d0266552fb4e3d
|
[
"MIT"
] | 4
|
2018-04-10T18:13:13.000Z
|
2018-05-15T15:53:13.000Z
|
application/providers/validator/__init__.py
|
yntonfon/dashboard-plus
|
1a4f2cf0c4d640f91d5c0aa974d0266552fb4e3d
|
[
"MIT"
] | null | null | null |
from .account_validator_provider import AccountValidatorProvider
| 32.5
| 64
| 0.923077
| 6
| 65
| 9.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061538
| 65
| 1
| 65
| 65
| 0.95082
| 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
|
52113a51ff07bd5d8d3d8dda13b6bc89ae26ba48
| 150
|
py
|
Python
|
flamingo/core/plugins/__init__.py
|
rohieb/flamingo
|
5212a1c201144715ff47c94e8e7724f5304be5c1
|
[
"Apache-2.0"
] | null | null | null |
flamingo/core/plugins/__init__.py
|
rohieb/flamingo
|
5212a1c201144715ff47c94e8e7724f5304be5c1
|
[
"Apache-2.0"
] | null | null | null |
flamingo/core/plugins/__init__.py
|
rohieb/flamingo
|
5212a1c201144715ff47c94e8e7724f5304be5c1
|
[
"Apache-2.0"
] | null | null | null |
from .meta_data import MetaDataProcessor # NOQA
from .static import Static # NOQA
from .hooks import Hooks # NOQA
from .media import Media # NOQA
| 30
| 48
| 0.76
| 21
| 150
| 5.380952
| 0.428571
| 0.212389
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186667
| 150
| 4
| 49
| 37.5
| 0.92623
| 0.126667
| 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
|
5220c4c31ad4659b333ce7f2b2348b3b8b699c36
| 184
|
py
|
Python
|
src/gedml/core/models/basic_models/__init__.py
|
zbr17/GeDML
|
83f6f835e7c3319e32432b3013820f98476cc96c
|
[
"MIT"
] | 25
|
2021-09-06T13:26:02.000Z
|
2022-01-06T13:25:24.000Z
|
src/gedml/core/models/basic_models/__init__.py
|
zbr17/GeDML
|
83f6f835e7c3319e32432b3013820f98476cc96c
|
[
"MIT"
] | 1
|
2021-09-09T08:29:29.000Z
|
2021-09-13T15:05:59.000Z
|
src/gedml/core/models/basic_models/__init__.py
|
zbr17/GeDML
|
83f6f835e7c3319e32432b3013820f98476cc96c
|
[
"MIT"
] | 2
|
2021-09-07T08:44:41.000Z
|
2021-09-09T08:31:55.000Z
|
from .bninception import bninception
from .mlp import BatchNormMLP, MLP
from .identity import Identity
from .resnet50 import resnet50
from .deit import deit_small_patch16_224 as DeiT_S
| 36.8
| 50
| 0.847826
| 27
| 184
| 5.62963
| 0.481481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.119565
| 184
| 5
| 50
| 36.8
| 0.882716
| 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
|
bfebd910190cb589fb648bd77d7c596083cd3e38
| 254
|
py
|
Python
|
backend/dialogs/admin.py
|
nikifkon/ChatApp
|
1b34e25dca63db7389cec87d7fb1099d95a6308a
|
[
"MIT"
] | 6
|
2019-09-15T09:35:09.000Z
|
2020-03-21T04:10:39.000Z
|
backend/dialogs/admin.py
|
nikifkon/ChatApp
|
1b34e25dca63db7389cec87d7fb1099d95a6308a
|
[
"MIT"
] | 6
|
2019-09-14T11:09:19.000Z
|
2021-06-10T18:49:50.000Z
|
backend/dialogs/admin.py
|
nikifkon/ChatApp
|
1b34e25dca63db7389cec87d7fb1099d95a6308a
|
[
"MIT"
] | 2
|
2019-10-17T21:11:53.000Z
|
2021-02-04T02:52:29.000Z
|
from django.contrib import admin
from .models import Dialog, DialogMembership, DialogMessage, DialogMessageInfo
admin.site.register(Dialog)
admin.site.register(DialogMembership)
admin.site.register(DialogMessage)
admin.site.register(DialogMessageInfo)
| 28.222222
| 78
| 0.850394
| 28
| 254
| 7.714286
| 0.428571
| 0.166667
| 0.314815
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066929
| 254
| 8
| 79
| 31.75
| 0.911392
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
|
877873b46080b1c7e73e09c52965493f5a5bb1d3
| 156
|
py
|
Python
|
vit/formatter/modified_relative.py
|
kinifwyne/vit
|
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
|
[
"MIT"
] | 179
|
2020-07-28T08:21:51.000Z
|
2022-03-30T21:39:37.000Z
|
vit/formatter/modified_relative.py
|
kinifwyne/vit
|
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
|
[
"MIT"
] | 255
|
2017-02-01T11:49:12.000Z
|
2020-07-26T22:31:25.000Z
|
vit/formatter/modified_relative.py
|
kinifwyne/vit
|
e2cbafce922b1e09c4a66e7dc9592c51fe628e9d
|
[
"MIT"
] | 26
|
2017-01-17T20:31:13.000Z
|
2020-06-17T13:09:01.000Z
|
from vit.formatter.modified import Modified
class ModifiedRelative(Modified):
def format(self, modified, task):
return self.relative(modified)
| 26
| 43
| 0.75641
| 18
| 156
| 6.555556
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160256
| 156
| 5
| 44
| 31.2
| 0.900763
| 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
|
5eb34abe7ba5e49c395ff71eec10262aead0253e
| 81
|
py
|
Python
|
python/vernacular/ai/speech/utils.py
|
Vernacular-ai/speech-recognition
|
7949dd0db6257655e2765d5e5430f09ca5042ebe
|
[
"Apache-2.0"
] | 18
|
2020-02-07T07:37:30.000Z
|
2021-08-24T18:55:30.000Z
|
python/vernacular/ai/speech/utils.py
|
skit-ai/speech-recognition
|
7949dd0db6257655e2765d5e5430f09ca5042ebe
|
[
"Apache-2.0"
] | 1
|
2020-09-08T06:48:18.000Z
|
2021-07-05T18:06:32.000Z
|
python/vernacular/ai/speech/utils.py
|
Vernacular-ai/speech-recognition
|
7949dd0db6257655e2765d5e5430f09ca5042ebe
|
[
"Apache-2.0"
] | 3
|
2020-08-08T05:11:59.000Z
|
2021-08-02T14:53:34.000Z
|
class _SpeechOperation():
def add_done_callback(callback):
pass
| 16.2
| 36
| 0.654321
| 8
| 81
| 6.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.271605
| 81
| 5
| 37
| 16.2
| 0.847458
| 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
|
5ebf17af882e909e40ad386ba0f6b632d14f6292
| 335
|
py
|
Python
|
src/modeling/models/neural_net/__init__.py
|
NovaSBE-DSKC/predict-campaing-sucess-rate
|
fec339aee7c883f55d64130eb69e490f765ee27d
|
[
"MIT"
] | null | null | null |
src/modeling/models/neural_net/__init__.py
|
NovaSBE-DSKC/predict-campaing-sucess-rate
|
fec339aee7c883f55d64130eb69e490f765ee27d
|
[
"MIT"
] | null | null | null |
src/modeling/models/neural_net/__init__.py
|
NovaSBE-DSKC/predict-campaing-sucess-rate
|
fec339aee7c883f55d64130eb69e490f765ee27d
|
[
"MIT"
] | null | null | null |
from src.modeling.models.neural_net.train import train
from src.modeling.models.neural_net.test import test, predict
from src.modeling.models.neural_net.model import load_model,save_model,get_model,display_model
from src.modeling.models.neural_net.exploration import test_models,display_models_exploration
__name__ = "Neural Network"
| 47.857143
| 94
| 0.862687
| 51
| 335
| 5.372549
| 0.352941
| 0.10219
| 0.218978
| 0.306569
| 0.437956
| 0.437956
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065672
| 335
| 6
| 95
| 55.833333
| 0.875399
| 0
| 0
| 0
| 0
| 0
| 0.041791
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0d6fc4edafc806c4723aa6412348caa7a411400b
| 30
|
py
|
Python
|
Utilities/VTKPythonWrapping/paraview/vtk/geovis.py
|
cjh1/ParaView
|
b0eba067c87078d5fe56ec3cb21447f149e1f31a
|
[
"BSD-3-Clause"
] | 17
|
2015-02-17T00:30:26.000Z
|
2022-03-17T06:13:02.000Z
|
Utilities/VTKPythonWrapping/paraview/vtk/geovis.py
|
cjh1/ParaView
|
b0eba067c87078d5fe56ec3cb21447f149e1f31a
|
[
"BSD-3-Clause"
] | null | null | null |
Utilities/VTKPythonWrapping/paraview/vtk/geovis.py
|
cjh1/ParaView
|
b0eba067c87078d5fe56ec3cb21447f149e1f31a
|
[
"BSD-3-Clause"
] | 10
|
2015-08-31T18:20:17.000Z
|
2022-02-02T15:16:21.000Z
|
from vtkCommonPython import *
| 15
| 29
| 0.833333
| 3
| 30
| 8.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 30
| 1
| 30
| 30
| 0.961538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0d7d50328b366f1b779bb8ed9b1d09379e18956a
| 958
|
py
|
Python
|
tests/test_validators.py
|
paddle-python/paddle-python
|
2bce556d09c7cb5e68057a4c658d37133ce0aa57
|
[
"MIT"
] | 15
|
2020-06-29T03:36:07.000Z
|
2022-03-20T20:22:29.000Z
|
tests/test_validators.py
|
pyepye/paddle-python
|
2bce556d09c7cb5e68057a4c658d37133ce0aa57
|
[
"MIT"
] | 5
|
2020-06-16T08:39:34.000Z
|
2021-06-16T15:14:04.000Z
|
tests/test_validators.py
|
pyepye/paddle-python
|
2bce556d09c7cb5e68057a4c658d37133ce0aa57
|
[
"MIT"
] | 3
|
2021-02-24T12:45:35.000Z
|
2021-06-12T18:43:56.000Z
|
import pytest
from paddle.validators import validate_date, validate_datetime
def test_validate_date_not_string_or_date():
field_name = 'test'
with pytest.raises(ValueError) as error:
validate_date(value=123, field_name=field_name)
msg = '{0} must be a datetime/date object or string in format YYYY-MM-DD'
error.match(msg.format(field_name))
def test_validate_datetime_not_string_or_datetime():
field_name = 'test'
with pytest.raises(ValueError) as error:
validate_datetime(value=123, field_name=field_name)
msg = '{0} must be a datetime object or string in format YYYY-MM-DD'
error.match(msg.format(field_name))
def test_validate_datetime_not_valid_string():
field_name = 'test'
with pytest.raises(ValueError) as error:
validate_datetime(value='123', field_name=field_name)
msg = '{0} must be a datetime object or string in format YYYY-MM-DD'
error.match(msg.format(field_name))
| 34.214286
| 77
| 0.73904
| 145
| 958
| 4.648276
| 0.241379
| 0.160237
| 0.066766
| 0.075668
| 0.799703
| 0.799703
| 0.799703
| 0.799703
| 0.799703
| 0.799703
| 0
| 0.015056
| 0.168058
| 958
| 27
| 78
| 35.481481
| 0.830615
| 0
| 0
| 0.55
| 0
| 0
| 0.208768
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.15
| false
| 0
| 0.1
| 0
| 0.25
| 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
|
0d9a9bc5895257b207be487e33795f60b63bf944
| 110
|
py
|
Python
|
authors/apps/favorite/admin.py
|
andela/ah-code-titans
|
4f1fc77c2ecdf8ca15c24327d39fe661eac85785
|
[
"BSD-3-Clause"
] | null | null | null |
authors/apps/favorite/admin.py
|
andela/ah-code-titans
|
4f1fc77c2ecdf8ca15c24327d39fe661eac85785
|
[
"BSD-3-Clause"
] | 20
|
2018-11-26T16:22:46.000Z
|
2018-12-21T10:08:25.000Z
|
authors/apps/favorite/admin.py
|
andela/ah-code-titans
|
4f1fc77c2ecdf8ca15c24327d39fe661eac85785
|
[
"BSD-3-Clause"
] | 3
|
2019-01-24T15:39:42.000Z
|
2019-09-25T17:57:08.000Z
|
from django.contrib import admin
from .models import FavouriteArticle
admin.site.register(FavouriteArticle)
| 18.333333
| 37
| 0.845455
| 13
| 110
| 7.153846
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 110
| 5
| 38
| 22
| 0.939394
| 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
|
0da93b8f560bed6116c2535ad67d7150a3007ee4
| 273
|
py
|
Python
|
cnf_xplor/api/admin.py
|
BFSSI-Bioinformatics-Lab/nutrition_database
|
ef63be35ceb4d37f3fa94bd6e4e8c8f3c84f8b7b
|
[
"MIT"
] | null | null | null |
cnf_xplor/api/admin.py
|
BFSSI-Bioinformatics-Lab/nutrition_database
|
ef63be35ceb4d37f3fa94bd6e4e8c8f3c84f8b7b
|
[
"MIT"
] | 46
|
2020-02-17T18:50:49.000Z
|
2020-06-03T17:20:56.000Z
|
cnf_xplor/api/admin.py
|
BFSSI-Bioinformatics-Lab/nutrition_database
|
ef63be35ceb4d37f3fa94bd6e4e8c8f3c84f8b7b
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from django.contrib import admin
from cnf_xplor.api import models
# Register your models here.
admin.site.register(models.Food)
admin.site.register(models.Nutrient)
admin.site.register(models.ConversionFactor)
| 27.3
| 44
| 0.824176
| 39
| 273
| 5.74359
| 0.410256
| 0.120536
| 0.227679
| 0.308036
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 273
| 9
| 45
| 30.333333
| 0.906883
| 0.194139
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0dab73d0fe885a3f667da365ba8f581b72b80c68
| 3,744
|
py
|
Python
|
tests/util/test_parse_heroku_logs.py
|
KarrLab/datanator_query_python
|
4190a08cbe518ba37f4a44abe5f79961c54bc15b
|
[
"MIT"
] | null | null | null |
tests/util/test_parse_heroku_logs.py
|
KarrLab/datanator_query_python
|
4190a08cbe518ba37f4a44abe5f79961c54bc15b
|
[
"MIT"
] | 18
|
2019-11-13T17:02:23.000Z
|
2020-10-27T16:01:59.000Z
|
tests/util/test_parse_heroku_logs.py
|
KarrLab/datanator_query_python
|
4190a08cbe518ba37f4a44abe5f79961c54bc15b
|
[
"MIT"
] | 1
|
2020-12-23T07:50:52.000Z
|
2020-12-23T07:50:52.000Z
|
from datanator_query_python.util import parse_heroku_logs
import unittest
import shutil
import tempfile
from pathlib import Path
class TestParseLogs(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls._dir = tempfile.mkdtemp()
cls.file_location = cls._dir + '/test_logs.txt'
s_0 = ("2020-04-29T13:00:15.687982+00:00 heroku[router]:"
"at=info method=GET path=\"/ftx/text_search/num_of_index/?index=metabolites_meta&query_message="
"glucose&from_=10&size=10&fields=protein_name&fields=synonyms&fields=enzymes&fields=ko_name&fields="
"gene_name&fields=name&fields=enzyme_name&fields=product_names&fields=substrate_names&fields="
"enzymes.subunit.canonical_sequence&fields=species' host=api.datanator.info request_id="
"9444dc4d-648b-427b-9cf1-1a5f235caacb fwd='23.20.143.235' dyno=web.1 connect=0ms service="
"123ms status=200 bytes=418988 protocol=https\n")
s_1 = ("2020-04-29T13:00:15.687982+00:00 heroku[router]:"
"at=info method=GET path=\"/something/?index=metabolites_meta&query_message="
"glucose&from_=10&size=10&fields=protein_name&fields=synonyms&fields=enzymes&fields=ko_name&fields="
"gene_name&fields=name&fields=enzyme_name&fields=product_names&fields=substrate_names&fields="
"enzymes.subunit.canonical_sequence&fields=species' host=api.datanator.info request_id="
"9444dc4d-648b-427b-9cf1-1a5f235caacb fwd='23.20.143.235' dyno=web.1 connect=0ms service="
"200ms status=200 bytes=418988 protocol=https\n")
s_2 = ("2020-04-29T13:00:15.687982+00:00 heroku[router]:"
"at=info method=GET path=\"/something/?index=metabolites_meta&query_message="
"glucose&from_=10&size=10&fields=protein_name&fields=synonyms&fields=enzymes&fields=ko_name&fields="
"gene_name&fields=name&fields=enzyme_name&fields=product_names&fields=substrate_names&fields="
"enzymes.subunit.canonical_sequence&fields=species' host=api.datanator.info request_id="
"9444dc4d-648b-427b-9cf1-1a5f235caacb fwd='23.20.143.235' dyno=web.1 connect=0ms service="
"202ms status=200 bytes=418988 protocol=https\n")
s_3 = ("what")
with open(cls.file_location, 'w+') as f:
f.writelines([s_0, s_1, s_2, s_3])
cls.src = parse_heroku_logs.ParseLogs(file_location=cls.file_location, verbose=True)
@classmethod
def tearDownClass(cls):
shutil.rmtree(cls._dir)
def test_parse_regex(self):
s = ("2020-04-29T13:00:15.687982+00:00 heroku[router]:"
"at=info method=GET path='/ftx/text_search/num_of_index/?index=metabolites_meta&query_message="
"glucose&from_=10&size=10&fields=protein_name&fields=synonyms&fields=enzymes&fields=ko_name&fields="
"gene_name&fields=name&fields=enzyme_name&fields=product_names&fields=substrate_names&fields="
"enzymes.subunit.canonical_sequence&fields=species' host=api.datanator.info request_id="
"9444dc4d-648b-427b-9cf1-1a5f235caacb fwd='23.20.143.235' dyno=web.1 connect=0ms service="
"123ms status=200 bytes=418988 protocol=https")
regex_0 = r'(\/.*\w+\/)'
regex_1 = r'service=(\d*)ms'
result_0 = self.src.parse_regex(s, regex_0)
result_1 = self.src.parse_regex(s, regex_1)
self.assertEqual(result_0.group(0), "/ftx/text_search/num_of_index/")
self.assertEqual(result_1.group(1), "123")
def test_parse_router(self):
result = self.src.parse_router()
self.assertEqual(result, {'/ftx/text_search/num_of_index/': [123], '/something/': [200, 202]})
result = self.src.parse_router(lines=1)
self.assertEqual(result, {'/ftx/text_search/num_of_index/': [123]})
| 59.428571
| 108
| 0.707799
| 537
| 3,744
| 4.75419
| 0.230912
| 0.078339
| 0.02546
| 0.031336
| 0.776733
| 0.757932
| 0.730905
| 0.730905
| 0.702703
| 0.702703
| 0
| 0.098773
| 0.150908
| 3,744
| 63
| 109
| 59.428571
| 0.70431
| 0
| 0
| 0.350877
| 0
| 0.122807
| 0.573565
| 0.39733
| 0
| 0
| 0
| 0
| 0.070175
| 1
| 0.070175
| false
| 0
| 0.087719
| 0
| 0.175439
| 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
|
0db6c4285851efff236d56c20f7b6c588089f74e
| 51
|
py
|
Python
|
src/tweepy/forte/tweepy/__init__.py
|
jzpang/forte-wrappers
|
9abe5188a5b47f7d5f50a08ae46a42ec95c0bd9d
|
[
"Apache-2.0"
] | null | null | null |
src/tweepy/forte/tweepy/__init__.py
|
jzpang/forte-wrappers
|
9abe5188a5b47f7d5f50a08ae46a42ec95c0bd9d
|
[
"Apache-2.0"
] | null | null | null |
src/tweepy/forte/tweepy/__init__.py
|
jzpang/forte-wrappers
|
9abe5188a5b47f7d5f50a08ae46a42ec95c0bd9d
|
[
"Apache-2.0"
] | null | null | null |
from forte.tweepy.twittersearch_processor import *
| 25.5
| 50
| 0.862745
| 6
| 51
| 7.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 1
| 51
| 51
| 0.914894
| 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
|
0dbebd58e4cd453c66aa0055d67a57dd74153f58
| 18
|
py
|
Python
|
test/run/t06.py
|
timmartin/skulpt
|
2e3a3fbbaccc12baa29094a717ceec491a8a6750
|
[
"MIT"
] | 2,671
|
2015-01-03T08:23:25.000Z
|
2022-03-31T06:15:48.000Z
|
test/run/t06.py
|
csev/skulpt
|
9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f
|
[
"MIT"
] | 972
|
2015-01-05T08:11:00.000Z
|
2022-03-29T13:47:15.000Z
|
test/run/t06.py
|
csev/skulpt
|
9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f
|
[
"MIT"
] | 845
|
2015-01-03T19:53:36.000Z
|
2022-03-29T18:34:22.000Z
|
x=4
x=x*3
print x
| 4.5
| 7
| 0.611111
| 7
| 18
| 1.571429
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0.222222
| 18
| 3
| 8
| 6
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.333333
| 1
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0dcd15b199255da14210e5e5d16e0d8f0e7df6aa
| 148
|
py
|
Python
|
Module2/Python_Data_Analysis_code/Chapter 1/src1/log_demo.py
|
vijaysharmapc/Python-End-to-end-Data-Analysis
|
a00f2d5d1547993e000b2551ec6a1360240885ba
|
[
"MIT"
] | 119
|
2016-08-24T20:12:01.000Z
|
2022-03-23T03:59:30.000Z
|
Module2/Python_Data_Analysis_code/Chapter 1/src1/log_demo.py
|
vijaysharmapc/Python-End-to-end-Data-Analysis
|
a00f2d5d1547993e000b2551ec6a1360240885ba
|
[
"MIT"
] | 3
|
2016-10-18T03:49:11.000Z
|
2020-11-03T12:41:29.000Z
|
Module2/Python_Data_Analysis_code/Chapter 1/src1/log_demo.py
|
vijaysharmapc/Python-End-to-end-Data-Analysis
|
a00f2d5d1547993e000b2551ec6a1360240885ba
|
[
"MIT"
] | 110
|
2016-08-19T01:57:35.000Z
|
2022-02-18T17:02:17.000Z
|
import sys
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from dautil import log_api
log_api.log(sys.modules, sys.argv[0])
| 18.5
| 37
| 0.797297
| 28
| 148
| 4.142857
| 0.607143
| 0.103448
| 0.155172
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007874
| 0.141892
| 148
| 7
| 38
| 21.142857
| 0.905512
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
217a0333fda0baf7190129a6c02a3786ea9fc5d2
| 41
|
py
|
Python
|
test_facts.py
|
blakwurm/wurmstore
|
3d832e5bf121fe16fca30d4fe63a35ccdee63363
|
[
"MIT"
] | null | null | null |
test_facts.py
|
blakwurm/wurmstore
|
3d832e5bf121fe16fca30d4fe63a35ccdee63363
|
[
"MIT"
] | null | null | null |
test_facts.py
|
blakwurm/wurmstore
|
3d832e5bf121fe16fca30d4fe63a35ccdee63363
|
[
"MIT"
] | null | null | null |
from wurmstore import Fact, dict_to_facts
| 41
| 41
| 0.878049
| 7
| 41
| 4.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097561
| 41
| 1
| 41
| 41
| 0.918919
| 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
|
218a29c4a405903a512fc3fbb8d678d674e62ddc
| 195
|
py
|
Python
|
git3Client/dlt/provider.py
|
varkiwi/git3-client
|
1fab576926091f6a771fbce05be8494d22e3efe4
|
[
"MIT"
] | 4
|
2021-08-18T15:24:02.000Z
|
2022-02-24T13:33:05.000Z
|
git3Client/dlt/provider.py
|
varkiwi/git3-client
|
1fab576926091f6a771fbce05be8494d22e3efe4
|
[
"MIT"
] | 29
|
2020-12-14T18:38:42.000Z
|
2022-03-31T12:13:54.000Z
|
git3Client/dlt/provider.py
|
varkiwi/git3-client
|
1fab576926091f6a771fbce05be8494d22e3efe4
|
[
"MIT"
] | null | null | null |
from web3 import Web3
from git3Client.config.config import RPC_ADDRESS
def get_web3_provider():
"""
Returns a web3 provider.
"""
return Web3(Web3.HTTPProvider(RPC_ADDRESS))
| 19.5
| 48
| 0.707692
| 25
| 195
| 5.36
| 0.56
| 0.149254
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045161
| 0.205128
| 195
| 10
| 49
| 19.5
| 0.819355
| 0.123077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
21a5316c313638863dc7be7ccbcf81ae92e51536
| 89
|
py
|
Python
|
by_selenium/selenium_scrappy.py
|
118020071/bilibili_scrapper
|
56e5c854bb141d34bf6b228aafcc3044e56906e9
|
[
"Apache-2.0"
] | null | null | null |
by_selenium/selenium_scrappy.py
|
118020071/bilibili_scrapper
|
56e5c854bb141d34bf6b228aafcc3044e56906e9
|
[
"Apache-2.0"
] | null | null | null |
by_selenium/selenium_scrappy.py
|
118020071/bilibili_scrapper
|
56e5c854bb141d34bf6b228aafcc3044e56906e9
|
[
"Apache-2.0"
] | null | null | null |
# Note: you should install web griver (geckover) before reading the code
import selenium
| 29.666667
| 72
| 0.797753
| 13
| 89
| 5.461538
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157303
| 89
| 2
| 73
| 44.5
| 0.946667
| 0.786517
| 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
|
21b50b1dffceaf2fa49193e6dfa965da696d6a04
| 128
|
py
|
Python
|
08/part2.py
|
DylanSalisbury/advent-of-code-2021
|
25e24cd9f637862928ca0d1039795f9d66a22dd5
|
[
"MIT"
] | null | null | null |
08/part2.py
|
DylanSalisbury/advent-of-code-2021
|
25e24cd9f637862928ca0d1039795f9d66a22dd5
|
[
"MIT"
] | null | null | null |
08/part2.py
|
DylanSalisbury/advent-of-code-2021
|
25e24cd9f637862928ca0d1039795f9d66a22dd5
|
[
"MIT"
] | null | null | null |
import util
def solve(input_path):
return util.part2(input_path)
if __name__ == '__main__':
print(solve('input.txt'))
| 12.8
| 31
| 0.695313
| 18
| 128
| 4.388889
| 0.722222
| 0.253165
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009346
| 0.164063
| 128
| 9
| 32
| 14.222222
| 0.728972
| 0
| 0
| 0
| 0
| 0
| 0.132813
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0.2
| 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
| 0
| 1
| 1
| 0
|
0
| 5
|
21ea8b3f2ee61fdcc8ee8e20bae425ad1b7f6898
| 336
|
py
|
Python
|
aleph/index/__init__.py
|
mcrouse911/findpeopleviadocument
|
fecb99a5c167dd281af324f8c862fda70021f081
|
[
"MIT"
] | null | null | null |
aleph/index/__init__.py
|
mcrouse911/findpeopleviadocument
|
fecb99a5c167dd281af324f8c862fda70021f081
|
[
"MIT"
] | null | null | null |
aleph/index/__init__.py
|
mcrouse911/findpeopleviadocument
|
fecb99a5c167dd281af324f8c862fda70021f081
|
[
"MIT"
] | null | null | null |
from aleph.index.admin import upgrade_search, delete_index # noqa
from aleph.index.entities import index_entity, delete_entity, index_bulk # noqa
from aleph.index.documents import index_document, index_document_id # noqa
from aleph.index.documents import delete_document # noqa
from aleph.index.records import index_records # noqa
| 56
| 80
| 0.827381
| 49
| 336
| 5.469388
| 0.326531
| 0.16791
| 0.261194
| 0.268657
| 0.246269
| 0.246269
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116071
| 336
| 5
| 81
| 67.2
| 0.902357
| 0.071429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
1d04225e7f4acd36ffc8ae14278226a4ea98f2ea
| 4,308
|
py
|
Python
|
tests/test_cli_create.py
|
bozdoz/tilesets-cli
|
05a00bf7ec9e88bc123ffc3833ff4fd47e6bb1f9
|
[
"BSD-2-Clause"
] | null | null | null |
tests/test_cli_create.py
|
bozdoz/tilesets-cli
|
05a00bf7ec9e88bc123ffc3833ff4fd47e6bb1f9
|
[
"BSD-2-Clause"
] | null | null | null |
tests/test_cli_create.py
|
bozdoz/tilesets-cli
|
05a00bf7ec9e88bc123ffc3833ff4fd47e6bb1f9
|
[
"BSD-2-Clause"
] | null | null | null |
import json
from unittest import mock
from click.testing import CliRunner
import pytest
from mapbox_tilesets.scripts.cli import create
@pytest.mark.usefixtures("token_environ")
def test_cli_create_missing_recipe():
runner = CliRunner()
# missing --recipe option
result = runner.invoke(create, ["test.id"])
assert result.exit_code == 2
assert 'Missing option "--recipe"' in result.output
@pytest.mark.usefixtures("token_environ")
def test_cli_create_missing_name():
runner = CliRunner()
# missing --name option
result = runner.invoke(
create, ["test.id", "--recipe", "tests/fixtures/recipe.json"]
)
assert result.exit_code == 2
assert 'Missing option "--name"' in result.output
@pytest.mark.usefixtures("token_environ")
@mock.patch("requests.post")
def test_cli_create_success(mock_request_post, MockResponse):
runner = CliRunner()
# sends request to proper endpoints
message = {"message": "mock message"}
mock_request_post.return_value = MockResponse(message)
result = runner.invoke(
create,
["test.id", "--recipe", "tests/fixtures/recipe.json", "--name", "test name"],
)
assert result.exit_code == 0
mock_request_post.assert_called_with(
"https://api.mapbox.com/tilesets/v1/test.id?access_token=fake-token",
json={
"name": "test name",
"description": "",
"recipe": {"minzoom": 0, "maxzoom": 10, "layer_name": "test_layer"},
},
)
assert json.loads(result.output) == message
@pytest.mark.usefixtures("token_environ")
@mock.patch("requests.post")
def test_cli_create_success_description(mock_request_post, MockResponse):
runner = CliRunner()
# sends request with "description" included
message = {"message": "mock message with description"}
mock_request_post.return_value = MockResponse(message)
result = runner.invoke(
create,
[
"test.id",
"--recipe",
"tests/fixtures/recipe.json",
"--name",
"test name",
"--description",
"test description",
],
)
assert result.exit_code == 0
mock_request_post.assert_called_with(
"https://api.mapbox.com/tilesets/v1/test.id?access_token=fake-token",
json={
"name": "test name",
"description": "test description",
"recipe": {"minzoom": 0, "maxzoom": 10, "layer_name": "test_layer"},
},
)
assert json.loads(result.output) == {"message": "mock message with description"}
@pytest.mark.usefixtures("token_environ")
@mock.patch("requests.post")
def test_cli_create_private_invalid(mock_request_post, MockResponse):
runner = CliRunner()
# sends request with "description" included
mock_request_post.return_value = MockResponse(
'{"message":"mock message with description"}'
)
result = runner.invoke(
create,
[
"test.id",
"--recipe",
"tests/fixtures/recipe.json",
"--name",
"test name",
"--privacy",
"invalid-privacy-value",
],
)
assert result.exit_code == 2
assert (
'Invalid value for "--privacy" / "-p": invalid choice: invalid-privacy-value. (choose from public, private)'
in result.output
)
@pytest.mark.usefixtures("token_environ")
@mock.patch("requests.post")
def test_cli_use_token_flag(mock_request_post, MockResponse):
runner = CliRunner()
message = {"message": "mock message"}
mock_request_post.return_value = MockResponse(message)
# Provides the flag --token
result = runner.invoke(
create,
[
"test.id",
"--recipe",
"tests/fixtures/recipe.json",
"--name",
"test name",
"--token",
"flag-token",
],
)
assert result.exit_code == 0
mock_request_post.assert_called_with(
"https://api.mapbox.com/tilesets/v1/test.id?access_token=flag-token",
json={
"name": "test name",
"description": "",
"recipe": {"minzoom": 0, "maxzoom": 10, "layer_name": "test_layer"},
},
)
assert json.loads(result.output) == message
| 29.916667
| 116
| 0.609564
| 465
| 4,308
| 5.48172
| 0.165591
| 0.04747
| 0.064731
| 0.043939
| 0.846214
| 0.812868
| 0.785798
| 0.739898
| 0.681836
| 0.681836
| 0
| 0.005587
| 0.252089
| 4,308
| 143
| 117
| 30.125874
| 0.785537
| 0.043872
| 0
| 0.605042
| 0
| 0.033613
| 0.28964
| 0.042072
| 0
| 0
| 0
| 0
| 0.12605
| 1
| 0.05042
| false
| 0
| 0.042017
| 0
| 0.092437
| 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
|
1d0726a94dee3769ba6391d48645f944558a57f5
| 126
|
py
|
Python
|
run_superreshelper.py
|
ehtec/pie-chart-ocr
|
ea36e29e9e585bd7a1779d7563578f190a6e0e65
|
[
"MIT"
] | null | null | null |
run_superreshelper.py
|
ehtec/pie-chart-ocr
|
ea36e29e9e585bd7a1779d7563578f190a6e0e65
|
[
"MIT"
] | 1
|
2021-12-22T18:34:42.000Z
|
2021-12-22T18:34:42.000Z
|
run_superreshelper.py
|
ehtec/pie-chart-ocr
|
ea36e29e9e585bd7a1779d7563578f190a6e0e65
|
[
"MIT"
] | null | null | null |
import logging
logging.basicConfig(level=logging.DEBUG)
from examples import test_superreshelper
test_superreshelper.main()
| 18
| 40
| 0.857143
| 15
| 126
| 7.066667
| 0.666667
| 0.339623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 126
| 6
| 41
| 21
| 0.913793
| 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 | 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
|
0dfca618ae71bcf8127b83a4efd66c96f9ff356d
| 44,785
|
py
|
Python
|
boto3_type_annotations_with_docs/boto3_type_annotations/polly/client.py
|
cowboygneox/boto3_type_annotations
|
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
|
[
"MIT"
] | 119
|
2018-12-01T18:20:57.000Z
|
2022-02-02T10:31:29.000Z
|
boto3_type_annotations_with_docs/boto3_type_annotations/polly/client.py
|
cowboygneox/boto3_type_annotations
|
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
|
[
"MIT"
] | 15
|
2018-11-16T00:16:44.000Z
|
2021-11-13T03:44:18.000Z
|
boto3_type_annotations_with_docs/boto3_type_annotations/polly/client.py
|
cowboygneox/boto3_type_annotations
|
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
|
[
"MIT"
] | 11
|
2019-05-06T05:26:51.000Z
|
2021-09-28T15:27:59.000Z
|
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import Union
from typing import List
class Client(BaseClient):
def can_paginate(self, operation_name: str = None):
"""
Check if an operation can be paginated.
:type operation_name: string
:param operation_name: The operation name. This is the same name
as the method name on the client. For example, if the
method name is ``create_foo``, and you\'d normally invoke the
operation as ``client.create_foo(**kwargs)``, if the
``create_foo`` operation can be paginated, you can use the
call ``client.get_paginator(\"create_foo\")``.
:return: ``True`` if the operation can be paginated,
``False`` otherwise.
"""
pass
def delete_lexicon(self, Name: str) -> Dict:
"""
Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the ``GetLexicon`` or ``ListLexicon`` APIs.
For more information, see `Managing Lexicons <http://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html>`__ .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DeleteLexicon>`_
**Request Syntax**
::
response = client.delete_lexicon(
Name='string'
)
**Response Syntax**
::
{}
**Response Structure**
- *(dict) --*
:type Name: string
:param Name: **[REQUIRED]**
The name of the lexicon to delete. Must be an existing lexicon in the region.
:rtype: dict
:returns:
"""
pass
def describe_voices(self, LanguageCode: str = None, IncludeAdditionalLanguageCodes: bool = None, NextToken: str = None) -> Dict:
"""
Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name.
When synthesizing speech ( ``SynthesizeSpeech`` ), you provide the voice ID for the voice you want from the list of voices returned by ``DescribeVoices`` .
For example, you want your news reader application to read news in a specific language, but giving a user the option to choose the voice. Using the ``DescribeVoices`` operation you can provide the user with a list of available voices to select from.
You can optionally specify a language code to filter the available voices. For example, if you specify ``en-US`` , the operation returns a list of all available US English voices.
This operation requires permissions to perform the ``polly:DescribeVoices`` action.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DescribeVoices>`_
**Request Syntax**
::
response = client.describe_voices(
LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR',
IncludeAdditionalLanguageCodes=True|False,
NextToken='string'
)
**Response Syntax**
::
{
'Voices': [
{
'Gender': 'Female'|'Male',
'Id': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu',
'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR',
'LanguageName': 'string',
'Name': 'string',
'AdditionalLanguageCodes': [
'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR',
]
},
],
'NextToken': 'string'
}
**Response Structure**
- *(dict) --*
- **Voices** *(list) --*
A list of voices with their properties.
- *(dict) --*
Description of the voice.
- **Gender** *(string) --*
Gender of the voice.
- **Id** *(string) --*
Amazon Polly assigned voice ID. This is the ID that you specify when calling the ``SynthesizeSpeech`` operation.
- **LanguageCode** *(string) --*
Language code of the voice.
- **LanguageName** *(string) --*
Human readable name of the language in English.
- **Name** *(string) --*
Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might display in your application.
- **AdditionalLanguageCodes** *(list) --*
Additional codes for languages available for the specified voice in addition to its default language.
For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code ``hi-IN`` .
- *(string) --*
- **NextToken** *(string) --*
The pagination token to use in the next request to continue the listing of voices. ``NextToken`` is returned only if the response is truncated.
:type LanguageCode: string
:param LanguageCode:
The language identification tag (ISO 639 code for the language name-ISO 3166 country code) for filtering the list of voices returned. If you don\'t specify this optional parameter, all available voices are returned.
:type IncludeAdditionalLanguageCodes: boolean
:param IncludeAdditionalLanguageCodes:
Boolean value indicating whether to return any bilingual voices that use the specified language as an additional language. For instance, if you request all languages that use US English (es-US), and there is an Italian voice that speaks both Italian (it-IT) and US English, that voice will be included if you specify ``yes`` but not if you specify ``no`` .
:type NextToken: string
:param NextToken:
An opaque pagination token returned from the previous ``DescribeVoices`` operation. If present, this indicates where to continue the listing.
:rtype: dict
:returns:
"""
pass
def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None):
"""
Generate a presigned url given a client, its method, and arguments
:type ClientMethod: string
:param ClientMethod: The client method to presign for
:type Params: dict
:param Params: The parameters normally passed to
``ClientMethod``.
:type ExpiresIn: int
:param ExpiresIn: The number of seconds the presigned url is valid
for. By default it expires in an hour (3600 seconds)
:type HttpMethod: string
:param HttpMethod: The http method to use on the generated url. By
default, the http method is whatever is used in the method\'s model.
:returns: The presigned url
"""
pass
def get_lexicon(self, Name: str) -> Dict:
"""
Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see `Managing Lexicons <http://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html>`__ .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexicon>`_
**Request Syntax**
::
response = client.get_lexicon(
Name='string'
)
**Response Syntax**
::
{
'Lexicon': {
'Content': 'string',
'Name': 'string'
},
'LexiconAttributes': {
'Alphabet': 'string',
'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR',
'LastModified': datetime(2015, 1, 1),
'LexiconArn': 'string',
'LexemesCount': 123,
'Size': 123
}
}
**Response Structure**
- *(dict) --*
- **Lexicon** *(dict) --*
Lexicon object that provides name and the string content of the lexicon.
- **Content** *(string) --*
Lexicon content in string format. The content of a lexicon must be in PLS format.
- **Name** *(string) --*
Name of the lexicon.
- **LexiconAttributes** *(dict) --*
Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.
- **Alphabet** *(string) --*
Phonetic alphabet used in the lexicon. Valid values are ``ipa`` and ``x-sampa`` .
- **LanguageCode** *(string) --*
Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on.
- **LastModified** *(datetime) --*
Date lexicon was last modified (a timestamp value).
- **LexiconArn** *(string) --*
Amazon Resource Name (ARN) of the lexicon.
- **LexemesCount** *(integer) --*
Number of lexemes in the lexicon.
- **Size** *(integer) --*
Total size of the lexicon, in characters.
:type Name: string
:param Name: **[REQUIRED]**
Name of the lexicon.
:rtype: dict
:returns:
"""
pass
def get_paginator(self, operation_name: str = None) -> Paginator:
"""
Create a paginator for an operation.
:type operation_name: string
:param operation_name: The operation name. This is the same name
as the method name on the client. For example, if the
method name is ``create_foo``, and you\'d normally invoke the
operation as ``client.create_foo(**kwargs)``, if the
``create_foo`` operation can be paginated, you can use the
call ``client.get_paginator(\"create_foo\")``.
:raise OperationNotPageableError: Raised if the operation is not
pageable. You can use the ``client.can_paginate`` method to
check if an operation is pageable.
:rtype: L{botocore.paginate.Paginator}
:return: A paginator object.
"""
pass
def get_speech_synthesis_task(self, TaskId: str) -> Dict:
"""
Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetSpeechSynthesisTask>`_
**Request Syntax**
::
response = client.get_speech_synthesis_task(
TaskId='string'
)
**Response Syntax**
::
{
'SynthesisTask': {
'TaskId': 'string',
'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed',
'TaskStatusReason': 'string',
'OutputUri': 'string',
'CreationTime': datetime(2015, 1, 1),
'RequestCharacters': 123,
'SnsTopicArn': 'string',
'LexiconNames': [
'string',
],
'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm',
'SampleRate': 'string',
'SpeechMarkTypes': [
'sentence'|'ssml'|'viseme'|'word',
],
'TextType': 'ssml'|'text',
'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu',
'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'
}
}
**Response Structure**
- *(dict) --*
- **SynthesisTask** *(dict) --*
SynthesisTask object that provides information from the requested task, including output format, creation time, task status, and so on.
- **TaskId** *(string) --*
The Amazon Polly generated identifier for a speech synthesis task.
- **TaskStatus** *(string) --*
Current status of the individual speech synthesis task.
- **TaskStatusReason** *(string) --*
Reason for the current status of a specific speech synthesis task, including errors if the task has failed.
- **OutputUri** *(string) --*
Pathway for the output speech file.
- **CreationTime** *(datetime) --*
Timestamp for the time the synthesis task was started.
- **RequestCharacters** *(integer) --*
Number of billable characters synthesized.
- **SnsTopicArn** *(string) --*
ARN for the SNS topic optionally used for providing status notification for a speech synthesis task.
- **LexiconNames** *(list) --*
List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice.
- *(string) --*
- **OutputFormat** *(string) --*
The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json.
- **SampleRate** *(string) --*
The audio frequency specified in Hz.
The valid values for mp3 and ogg_vorbis are "8000", "16000", and "22050". The default value is "22050".
Valid values for pcm are "8000" and "16000" The default value is "16000".
- **SpeechMarkTypes** *(list) --*
The type of speech marks returned for the input text.
- *(string) --*
- **TextType** *(string) --*
Specifies whether the input text is plain text or SSML. The default value is plain text.
- **VoiceId** *(string) --*
Voice ID to use for the synthesis.
- **LanguageCode** *(string) --*
Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).
If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the `DescribeVoices <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html>`__ operation for the ``LanguageCode`` parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.
:type TaskId: string
:param TaskId: **[REQUIRED]**
The Amazon Polly generated identifier for a speech synthesis task.
:rtype: dict
:returns:
"""
pass
def get_waiter(self, waiter_name: str = None) -> Waiter:
"""
Returns an object that can wait for some condition.
:type waiter_name: str
:param waiter_name: The name of the waiter to get. See the waiters
section of the service docs for a list of available waiters.
:returns: The specified waiter object.
:rtype: botocore.waiter.Waiter
"""
pass
def list_lexicons(self, NextToken: str = None) -> Dict:
"""
Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see `Managing Lexicons <http://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html>`__ .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexicons>`_
**Request Syntax**
::
response = client.list_lexicons(
NextToken='string'
)
**Response Syntax**
::
{
'Lexicons': [
{
'Name': 'string',
'Attributes': {
'Alphabet': 'string',
'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR',
'LastModified': datetime(2015, 1, 1),
'LexiconArn': 'string',
'LexemesCount': 123,
'Size': 123
}
},
],
'NextToken': 'string'
}
**Response Structure**
- *(dict) --*
- **Lexicons** *(list) --*
A list of lexicon names and attributes.
- *(dict) --*
Describes the content of the lexicon.
- **Name** *(string) --*
Name of the lexicon.
- **Attributes** *(dict) --*
Provides lexicon metadata.
- **Alphabet** *(string) --*
Phonetic alphabet used in the lexicon. Valid values are ``ipa`` and ``x-sampa`` .
- **LanguageCode** *(string) --*
Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on.
- **LastModified** *(datetime) --*
Date lexicon was last modified (a timestamp value).
- **LexiconArn** *(string) --*
Amazon Resource Name (ARN) of the lexicon.
- **LexemesCount** *(integer) --*
Number of lexemes in the lexicon.
- **Size** *(integer) --*
Total size of the lexicon, in characters.
- **NextToken** *(string) --*
The pagination token to use in the next request to continue the listing of lexicons. ``NextToken`` is returned only if the response is truncated.
:type NextToken: string
:param NextToken:
An opaque pagination token returned from previous ``ListLexicons`` operation. If present, indicates where to continue the list of lexicons.
:rtype: dict
:returns:
"""
pass
def list_speech_synthesis_tasks(self, MaxResults: int = None, NextToken: str = None, Status: str = None) -> Dict:
"""
Returns a list of SpeechSynthesisTask objects ordered by their creation date. This operation can filter the tasks by their status, for example, allowing users to list only tasks that are completed.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListSpeechSynthesisTasks>`_
**Request Syntax**
::
response = client.list_speech_synthesis_tasks(
MaxResults=123,
NextToken='string',
Status='scheduled'|'inProgress'|'completed'|'failed'
)
**Response Syntax**
::
{
'NextToken': 'string',
'SynthesisTasks': [
{
'TaskId': 'string',
'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed',
'TaskStatusReason': 'string',
'OutputUri': 'string',
'CreationTime': datetime(2015, 1, 1),
'RequestCharacters': 123,
'SnsTopicArn': 'string',
'LexiconNames': [
'string',
],
'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm',
'SampleRate': 'string',
'SpeechMarkTypes': [
'sentence'|'ssml'|'viseme'|'word',
],
'TextType': 'ssml'|'text',
'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu',
'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'
},
]
}
**Response Structure**
- *(dict) --*
- **NextToken** *(string) --*
An opaque pagination token returned from the previous List operation in this request. If present, this indicates where to continue the listing.
- **SynthesisTasks** *(list) --*
List of SynthesisTask objects that provides information from the specified task in the list request, including output format, creation time, task status, and so on.
- *(dict) --*
SynthesisTask object that provides information about a speech synthesis task.
- **TaskId** *(string) --*
The Amazon Polly generated identifier for a speech synthesis task.
- **TaskStatus** *(string) --*
Current status of the individual speech synthesis task.
- **TaskStatusReason** *(string) --*
Reason for the current status of a specific speech synthesis task, including errors if the task has failed.
- **OutputUri** *(string) --*
Pathway for the output speech file.
- **CreationTime** *(datetime) --*
Timestamp for the time the synthesis task was started.
- **RequestCharacters** *(integer) --*
Number of billable characters synthesized.
- **SnsTopicArn** *(string) --*
ARN for the SNS topic optionally used for providing status notification for a speech synthesis task.
- **LexiconNames** *(list) --*
List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice.
- *(string) --*
- **OutputFormat** *(string) --*
The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json.
- **SampleRate** *(string) --*
The audio frequency specified in Hz.
The valid values for mp3 and ogg_vorbis are "8000", "16000", and "22050". The default value is "22050".
Valid values for pcm are "8000" and "16000" The default value is "16000".
- **SpeechMarkTypes** *(list) --*
The type of speech marks returned for the input text.
- *(string) --*
- **TextType** *(string) --*
Specifies whether the input text is plain text or SSML. The default value is plain text.
- **VoiceId** *(string) --*
Voice ID to use for the synthesis.
- **LanguageCode** *(string) --*
Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).
If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the `DescribeVoices <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html>`__ operation for the ``LanguageCode`` parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.
:type MaxResults: integer
:param MaxResults:
Maximum number of speech synthesis tasks returned in a List operation.
:type NextToken: string
:param NextToken:
The pagination token to use in the next request to continue the listing of speech synthesis tasks.
:type Status: string
:param Status:
Status of the speech synthesis tasks returned in a List operation
:rtype: dict
:returns:
"""
pass
def put_lexicon(self, Name: str, Content: str) -> Dict:
"""
Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation.
For more information, see `Managing Lexicons <http://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html>`__ .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexicon>`_
**Request Syntax**
::
response = client.put_lexicon(
Name='string',
Content='string'
)
**Response Syntax**
::
{}
**Response Structure**
- *(dict) --*
:type Name: string
:param Name: **[REQUIRED]**
Name of the lexicon. The name must follow the regular express format [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.
:type Content: string
:param Content: **[REQUIRED]**
Content of the PLS lexicon as string data.
:rtype: dict
:returns:
"""
pass
def start_speech_synthesis_task(self, OutputFormat: str, OutputS3BucketName: str, Text: str, VoiceId: str, LexiconNames: List = None, OutputS3KeyPrefix: str = None, SampleRate: str = None, SnsTopicArn: str = None, SpeechMarkTypes: List = None, TextType: str = None, LanguageCode: str = None) -> Dict:
"""
Allows the creation of an asynchronous synthesis task, by starting a new ``SpeechSynthesisTask`` . This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status.
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/StartSpeechSynthesisTask>`_
**Request Syntax**
::
response = client.start_speech_synthesis_task(
LexiconNames=[
'string',
],
OutputFormat='json'|'mp3'|'ogg_vorbis'|'pcm',
OutputS3BucketName='string',
OutputS3KeyPrefix='string',
SampleRate='string',
SnsTopicArn='string',
SpeechMarkTypes=[
'sentence'|'ssml'|'viseme'|'word',
],
Text='string',
TextType='ssml'|'text',
VoiceId='Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu',
LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'
)
**Response Syntax**
::
{
'SynthesisTask': {
'TaskId': 'string',
'TaskStatus': 'scheduled'|'inProgress'|'completed'|'failed',
'TaskStatusReason': 'string',
'OutputUri': 'string',
'CreationTime': datetime(2015, 1, 1),
'RequestCharacters': 123,
'SnsTopicArn': 'string',
'LexiconNames': [
'string',
],
'OutputFormat': 'json'|'mp3'|'ogg_vorbis'|'pcm',
'SampleRate': 'string',
'SpeechMarkTypes': [
'sentence'|'ssml'|'viseme'|'word',
],
'TextType': 'ssml'|'text',
'VoiceId': 'Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu',
'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'
}
}
**Response Structure**
- *(dict) --*
- **SynthesisTask** *(dict) --*
SynthesisTask object that provides information and attributes about a newly submitted speech synthesis task.
- **TaskId** *(string) --*
The Amazon Polly generated identifier for a speech synthesis task.
- **TaskStatus** *(string) --*
Current status of the individual speech synthesis task.
- **TaskStatusReason** *(string) --*
Reason for the current status of a specific speech synthesis task, including errors if the task has failed.
- **OutputUri** *(string) --*
Pathway for the output speech file.
- **CreationTime** *(datetime) --*
Timestamp for the time the synthesis task was started.
- **RequestCharacters** *(integer) --*
Number of billable characters synthesized.
- **SnsTopicArn** *(string) --*
ARN for the SNS topic optionally used for providing status notification for a speech synthesis task.
- **LexiconNames** *(list) --*
List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice.
- *(string) --*
- **OutputFormat** *(string) --*
The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json.
- **SampleRate** *(string) --*
The audio frequency specified in Hz.
The valid values for mp3 and ogg_vorbis are "8000", "16000", and "22050". The default value is "22050".
Valid values for pcm are "8000" and "16000" The default value is "16000".
- **SpeechMarkTypes** *(list) --*
The type of speech marks returned for the input text.
- *(string) --*
- **TextType** *(string) --*
Specifies whether the input text is plain text or SSML. The default value is plain text.
- **VoiceId** *(string) --*
Voice ID to use for the synthesis.
- **LanguageCode** *(string) --*
Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).
If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the `DescribeVoices <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html>`__ operation for the ``LanguageCode`` parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.
:type LexiconNames: list
:param LexiconNames:
List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice.
- *(string) --*
:type OutputFormat: string
:param OutputFormat: **[REQUIRED]**
The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json.
:type OutputS3BucketName: string
:param OutputS3BucketName: **[REQUIRED]**
Amazon S3 bucket name to which the output file will be saved.
:type OutputS3KeyPrefix: string
:param OutputS3KeyPrefix:
The Amazon S3 key prefix for the output speech file.
:type SampleRate: string
:param SampleRate:
The audio frequency specified in Hz.
The valid values for mp3 and ogg_vorbis are \"8000\", \"16000\", and \"22050\". The default value is \"22050\".
Valid values for pcm are \"8000\" and \"16000\" The default value is \"16000\".
:type SnsTopicArn: string
:param SnsTopicArn:
ARN for the SNS topic optionally used for providing status notification for a speech synthesis task.
:type SpeechMarkTypes: list
:param SpeechMarkTypes:
The type of speech marks returned for the input text.
- *(string) --*
:type Text: string
:param Text: **[REQUIRED]**
The input text to synthesize. If you specify ssml as the TextType, follow the SSML format for the input text.
:type TextType: string
:param TextType:
Specifies whether the input text is plain text or SSML. The default value is plain text.
:type VoiceId: string
:param VoiceId: **[REQUIRED]**
Voice ID to use for the synthesis.
:type LanguageCode: string
:param LanguageCode:
Optional language code for the Speech Synthesis request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).
If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the `DescribeVoices <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html>`__ operation for the ``LanguageCode`` parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.
:rtype: dict
:returns:
"""
pass
def synthesize_speech(self, OutputFormat: str, Text: str, VoiceId: str, LexiconNames: List = None, SampleRate: str = None, SpeechMarkTypes: List = None, TextType: str = None, LanguageCode: str = None) -> Dict:
"""
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see `How it Works <http://docs.aws.amazon.com/polly/latest/dg/how-text-to-speech-works.html>`__ .
See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeech>`_
**Request Syntax**
::
response = client.synthesize_speech(
LexiconNames=[
'string',
],
OutputFormat='json'|'mp3'|'ogg_vorbis'|'pcm',
SampleRate='string',
SpeechMarkTypes=[
'sentence'|'ssml'|'viseme'|'word',
],
Text='string',
TextType='ssml'|'text',
VoiceId='Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu',
LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'
)
**Response Syntax**
::
{
'AudioStream': StreamingBody(),
'ContentType': 'string',
'RequestCharacters': 123
}
**Response Structure**
- *(dict) --*
- **AudioStream** (:class:`.StreamingBody`) --
Stream containing the synthesized speech.
- **ContentType** *(string) --*
Specifies the type audio stream. This should reflect the ``OutputFormat`` parameter in your request.
* If you request ``mp3`` as the ``OutputFormat`` , the ``ContentType`` returned is audio/mpeg.
* If you request ``ogg_vorbis`` as the ``OutputFormat`` , the ``ContentType`` returned is audio/ogg.
* If you request ``pcm`` as the ``OutputFormat`` , the ``ContentType`` returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.
* If you request ``json`` as the ``OutputFormat`` , the ``ContentType`` returned is audio/json.
- **RequestCharacters** *(integer) --*
Number of characters synthesized.
:type LexiconNames: list
:param LexiconNames:
List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are applied only if the language of the lexicon is the same as the language of the voice. For information about storing lexicons, see `PutLexicon <http://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html>`__ .
- *(string) --*
:type OutputFormat: string
:param OutputFormat: **[REQUIRED]**
The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json.
When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.
:type SampleRate: string
:param SampleRate:
The audio frequency specified in Hz.
The valid values for ``mp3`` and ``ogg_vorbis`` are \"8000\", \"16000\", and \"22050\". The default value is \"22050\".
Valid values for ``pcm`` are \"8000\" and \"16000\" The default value is \"16000\".
:type SpeechMarkTypes: list
:param SpeechMarkTypes:
The type of speech marks returned for the input text.
- *(string) --*
:type Text: string
:param Text: **[REQUIRED]**
Input text to synthesize. If you specify ``ssml`` as the ``TextType`` , follow the SSML format for the input text.
:type TextType: string
:param TextType:
Specifies whether the input text is plain text or SSML. The default value is plain text. For more information, see `Using SSML <http://docs.aws.amazon.com/polly/latest/dg/ssml.html>`__ .
:type VoiceId: string
:param VoiceId: **[REQUIRED]**
Voice ID to use for the synthesis. You can get a list of available voice IDs by calling the `DescribeVoices <http://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html>`__ operation.
:type LanguageCode: string
:param LanguageCode:
Optional language code for the Synthesize Speech request. This is only necessary if using a bilingual voice, such as Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).
If a bilingual voice is used and no language code is specified, Amazon Polly will use the default language of the bilingual voice. The default language for any voice is the one returned by the `DescribeVoices <https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html>`__ operation for the ``LanguageCode`` parameter. For example, if no language code is specified, Aditi will use Indian English rather than Hindi.
:rtype: dict
:returns:
"""
pass
| 63.705548
| 528
| 0.577604
| 5,242
| 44,785
| 4.913201
| 0.106829
| 0.008542
| 0.011105
| 0.013667
| 0.698583
| 0.670161
| 0.664337
| 0.662396
| 0.642633
| 0.634207
| 0
| 0.010972
| 0.291816
| 44,785
| 702
| 529
| 63.796296
| 0.801078
| 0.840058
| 0
| 0.382353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.382353
| false
| 0.382353
| 0.205882
| 0
| 0.617647
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
df03a0f35927ccb37bff2e9e4c92649cc3dec80f
| 67
|
py
|
Python
|
src/proj/__init__.py
|
Pix-00/olea-v2_flask_1_
|
7ddfa83a7a2a7dfbe55b78da002c1193f38781c0
|
[
"Apache-2.0"
] | null | null | null |
src/proj/__init__.py
|
Pix-00/olea-v2_flask_1_
|
7ddfa83a7a2a7dfbe55b78da002c1193f38781c0
|
[
"Apache-2.0"
] | null | null | null |
src/proj/__init__.py
|
Pix-00/olea-v2_flask_1_
|
7ddfa83a7a2a7dfbe55b78da002c1193f38781c0
|
[
"Apache-2.0"
] | null | null | null |
from flask import Blueprint
proj_bp = Blueprint('proj', __name__)
| 16.75
| 37
| 0.776119
| 9
| 67
| 5.222222
| 0.777778
| 0.553191
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134328
| 67
| 3
| 38
| 22.333333
| 0.810345
| 0
| 0
| 0
| 0
| 0
| 0.059701
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 1
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
df22b1661a546d6d5793fbd311792b1abb489a9e
| 74
|
py
|
Python
|
pcep/mod3_3.py
|
gliverm/devnet-study-group
|
28aecef8207cfeb8f10dc375c22e5ec953d6762b
|
[
"MIT"
] | 1
|
2020-07-30T15:23:55.000Z
|
2020-07-30T15:23:55.000Z
|
pcep/mod3_3.py
|
gliverm/devnet-study-group
|
28aecef8207cfeb8f10dc375c22e5ec953d6762b
|
[
"MIT"
] | null | null | null |
pcep/mod3_3.py
|
gliverm/devnet-study-group
|
28aecef8207cfeb8f10dc375c22e5ec953d6762b
|
[
"MIT"
] | null | null | null |
z = 10
y = 0
x = y < z and z > y or y > z and z < y
print(x)
# X = True
| 9.25
| 38
| 0.445946
| 20
| 74
| 1.65
| 0.45
| 0.121212
| 0.30303
| 0.363636
| 0.424242
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068182
| 0.405405
| 74
| 7
| 39
| 10.571429
| 0.681818
| 0.108108
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| 1
| 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
| 0
|
0
| 5
|
df7825519722cdc202e918c346c190614864a822
| 37
|
py
|
Python
|
ktrain/text/zsl/__init__.py
|
RobWillison/ktrain
|
4c690bad3046a43c0cae7b86a8e28463f8cba0a8
|
[
"Apache-2.0"
] | 1,013
|
2019-06-04T14:25:24.000Z
|
2022-03-26T05:52:00.000Z
|
ktrain/text/zsl/__init__.py
|
Shifath472533/ktrain
|
3228f336ba5be4d317538c1b79f8ad0259892b2d
|
[
"Apache-2.0"
] | 427
|
2019-06-17T13:45:50.000Z
|
2022-03-25T16:23:49.000Z
|
ktrain/text/zsl/__init__.py
|
Shifath472533/ktrain
|
3228f336ba5be4d317538c1b79f8ad0259892b2d
|
[
"Apache-2.0"
] | 272
|
2019-06-05T03:19:07.000Z
|
2022-03-28T02:23:37.000Z
|
from .core import ZeroShotClassifier
| 18.5
| 36
| 0.864865
| 4
| 37
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 37
| 1
| 37
| 37
| 0.969697
| 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
|
10c0d3f2fc3f256d7007959aa8912a2ad0f66919
| 313
|
py
|
Python
|
tests/test_day10.py
|
emauton/aoc2015
|
f321571b623a0e7acaa173be57506e64bd32765f
|
[
"MIT"
] | null | null | null |
tests/test_day10.py
|
emauton/aoc2015
|
f321571b623a0e7acaa173be57506e64bd32765f
|
[
"MIT"
] | null | null | null |
tests/test_day10.py
|
emauton/aoc2015
|
f321571b623a0e7acaa173be57506e64bd32765f
|
[
"MIT"
] | null | null | null |
from aoc2015.day10 import look_say, iterate
def test_look_say():
assert look_say('1') == '11'
assert look_say('11') == '21'
assert look_say('21') == '1211'
assert look_say('1211') == '111221'
assert look_say('111221') == '312211'
def test_iterate():
assert iterate('1', 5) == '312211'
| 22.357143
| 43
| 0.619808
| 44
| 313
| 4.204545
| 0.386364
| 0.264865
| 0.351351
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195219
| 0.198083
| 313
| 13
| 44
| 24.076923
| 0.541833
| 0
| 0
| 0
| 0
| 0
| 0.134185
| 0
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.222222
| true
| 0
| 0.111111
| 0
| 0.333333
| 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
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
10e3a2c591e0b1226fbe6c7c462d45baa1f0fb95
| 50
|
py
|
Python
|
util/__init__.py
|
cbbing/stock
|
6bde95c447544b719094f045817690c54c6e730f
|
[
"Apache-2.0"
] | 31
|
2015-10-25T05:31:49.000Z
|
2022-01-11T19:07:16.000Z
|
util/__init__.py
|
cbbing/stock
|
6bde95c447544b719094f045817690c54c6e730f
|
[
"Apache-2.0"
] | null | null | null |
util/__init__.py
|
cbbing/stock
|
6bde95c447544b719094f045817690c54c6e730f
|
[
"Apache-2.0"
] | 21
|
2015-07-17T10:11:18.000Z
|
2020-06-08T07:23:03.000Z
|
from util.stockutil import getSixDigitalStockCode
| 25
| 49
| 0.9
| 5
| 50
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 50
| 1
| 50
| 50
| 0.978261
| 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
|
800f76c700c979323f6054b3288b3fb0a47b5fa2
| 1,824
|
py
|
Python
|
lang/visitor.py
|
aleksiy325/compiler
|
c8d135709907e31f671061da25a76b3d64b67292
|
[
"MIT"
] | null | null | null |
lang/visitor.py
|
aleksiy325/compiler
|
c8d135709907e31f671061da25a76b3d64b67292
|
[
"MIT"
] | null | null | null |
lang/visitor.py
|
aleksiy325/compiler
|
c8d135709907e31f671061da25a76b3d64b67292
|
[
"MIT"
] | null | null | null |
from abc import ABCMeta, abstractmethod
class Visitor(metaclass=ABCMeta):
@abstractmethod
def visit_access(self, access):
pass
@abstractmethod
def visit_if_else(self, if_else):
pass
@abstractmethod
def visit_dot_access(self, dot_access):
pass
@abstractmethod
def visit_struct_init(self, field):
pass
@abstractmethod
def visit_field(self, field):
pass
@abstractmethod
def visit_struct(self, struct):
pass
@abstractmethod
def visit_expression_list(self, expr_list):
pass
@abstractmethod
def visit_function_id(self, func_id):
pass
@abstractmethod
def visit_arg_list(self, arg_list):
pass
@abstractmethod
def visit_type_list(self, type_list):
pass
@abstractmethod
def visit_block(self, block):
pass
@abstractmethod
def visit_function(self, func):
pass
@abstractmethod
def visit_function_call(self, func_call):
pass
@abstractmethod
def visit_variable_dereference(self, var_deref):
pass
@abstractmethod
def visit_variable_declaration(self, var_decl):
pass
@abstractmethod
def visit_variable_assignment(self, var_assign):
pass
@abstractmethod
def visit_type(self, type_t):
pass
@abstractmethod
def visit_bool(self, bool_t):
pass
@abstractmethod
def visit_float(self, float_t):
pass
@abstractmethod
def visit_integer(self, integer_t):
pass
@abstractmethod
def visit_string(self, string_t):
pass
@abstractmethod
def visit_return(self, ret):
pass
class Visitable(metaclass=ABCMeta):
@abstractmethod
def visit(self, visitor: Visitor):
pass
| 18.24
| 52
| 0.646382
| 200
| 1,824
| 5.655
| 0.225
| 0.345712
| 0.447392
| 0.482759
| 0.58267
| 0.061892
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285088
| 1,824
| 99
| 53
| 18.424242
| 0.867331
| 0
| 0
| 0.638889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.319444
| false
| 0.319444
| 0.013889
| 0
| 0.361111
| 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
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
8020c0a644d53e629fa677df769c38a0c6d7b6e5
| 77
|
py
|
Python
|
scrape_vendors.py
|
Zheruel/compari-ro-scraper
|
ec4ccdec8ac647d694eb78959f2411d901cfad70
|
[
"MIT"
] | 1
|
2021-10-09T14:39:48.000Z
|
2021-10-09T14:39:48.000Z
|
scrape_vendors.py
|
Zheruel/compari-ro-scraper
|
ec4ccdec8ac647d694eb78959f2411d901cfad70
|
[
"MIT"
] | null | null | null |
scrape_vendors.py
|
Zheruel/compari-ro-scraper
|
ec4ccdec8ac647d694eb78959f2411d901cfad70
|
[
"MIT"
] | null | null | null |
from web.vendor_scraping_controller import scrape_vendors
scrape_vendors()
| 15.4
| 57
| 0.87013
| 10
| 77
| 6.3
| 0.8
| 0.412698
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 77
| 4
| 58
| 19.25
| 0.9
| 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 | 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
|
8051d65fc6447dffd737d15b690bc6743cf0bc7f
| 976
|
py
|
Python
|
refactor/old/tests/unittesting/core/helpers/test_form_content2dict.py
|
luissaiz/apicheck
|
316971450ad226247e64e7ba7c95511e38d420c9
|
[
"Apache-2.0"
] | 2
|
2019-05-31T09:56:59.000Z
|
2019-05-31T11:28:50.000Z
|
refactor/old/tests/unittesting/core/helpers/test_form_content2dict.py
|
harry1080/apicheck
|
d38bd40711102b6f8e542c1a59786c25a6dc11ef
|
[
"Apache-2.0"
] | null | null | null |
refactor/old/tests/unittesting/core/helpers/test_form_content2dict.py
|
harry1080/apicheck
|
d38bd40711102b6f8e542c1a59786c25a6dc11ef
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2017 BBVA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from apitest.core.helpers import form_content2dict
def test_form_content2dict_runs_ok():
assert form_content2dict("user=john&password=1234") == {"user": "john", "password": "1234"}
def test_form_content2dict_runs_null_input():
assert form_content2dict(None) == dict(form_data="")
def test_form_content2dict_runs_invalid_input():
assert form_content2dict("aaaaa") == dict(form_data="aaaaa")
| 36.148148
| 95
| 0.76332
| 142
| 976
| 5.105634
| 0.598592
| 0.154483
| 0.045517
| 0.095172
| 0.111724
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027545
| 0.144467
| 976
| 26
| 96
| 37.538462
| 0.840719
| 0.554303
| 0
| 0
| 0
| 0
| 0.125891
| 0.054632
| 0
| 0
| 0
| 0
| 0.428571
| 1
| 0.428571
| true
| 0.142857
| 0.142857
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
33c6e5d068502a5d752276de07fad482beba5ef3
| 55
|
py
|
Python
|
src/lib/utils/__init__.py
|
billyeatcookies/Biscuit
|
6faa20c7755ab6317d7b68b3dfdd57c8a972750b
|
[
"MIT"
] | 1
|
2021-11-09T07:31:22.000Z
|
2021-11-09T07:31:22.000Z
|
src/lib/utils/__init__.py
|
billyeatcookies/Biscuit
|
6faa20c7755ab6317d7b68b3dfdd57c8a972750b
|
[
"MIT"
] | null | null | null |
src/lib/utils/__init__.py
|
billyeatcookies/Biscuit
|
6faa20c7755ab6317d7b68b3dfdd57c8a972750b
|
[
"MIT"
] | null | null | null |
from .binder import Binder
from .sysinfo import SysInfo
| 27.5
| 28
| 0.836364
| 8
| 55
| 5.75
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127273
| 55
| 2
| 28
| 27.5
| 0.958333
| 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
|
33ce3c87f7399fb5bf8f9ca9e92e1a6f4c7a5c64
| 46
|
py
|
Python
|
Solutions/__init__.py
|
zejacobi/ProjectEuler
|
3e5731597784ee9433e9f2249b7ea92dc93527ee
|
[
"Unlicense"
] | 1
|
2018-01-26T14:11:54.000Z
|
2018-01-26T14:11:54.000Z
|
Solutions/__init__.py
|
zejacobi/ProjectEuler
|
3e5731597784ee9433e9f2249b7ea92dc93527ee
|
[
"Unlicense"
] | null | null | null |
Solutions/__init__.py
|
zejacobi/ProjectEuler
|
3e5731597784ee9433e9f2249b7ea92dc93527ee
|
[
"Unlicense"
] | null | null | null |
"""
All completed solutions should go here
"""
| 15.333333
| 38
| 0.717391
| 6
| 46
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 46
| 3
| 39
| 15.333333
| 0.846154
| 0.826087
| 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
|
d50a72e3ebdfa0d9639f35ff32789c867ccda46b
| 42
|
py
|
Python
|
pyTONPublicAPI/__init__.py
|
Badiboy/pyTONPublicAPI
|
1f2c17dd2868741b69614f41b0129a78b16d759b
|
[
"MIT"
] | 2
|
2022-03-05T14:50:58.000Z
|
2022-03-19T20:50:08.000Z
|
pyTONPublicAPI/__init__.py
|
Badiboy/pyTONPublicAPI
|
1f2c17dd2868741b69614f41b0129a78b16d759b
|
[
"MIT"
] | null | null | null |
pyTONPublicAPI/__init__.py
|
Badiboy/pyTONPublicAPI
|
1f2c17dd2868741b69614f41b0129a78b16d759b
|
[
"MIT"
] | null | null | null |
from .api import *
from .servers import *
| 14
| 22
| 0.714286
| 6
| 42
| 5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 42
| 2
| 23
| 21
| 0.882353
| 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
|
1d28ed830e7ad4ff1e4569cfb4cef97bd63db6e7
| 210
|
py
|
Python
|
pkg/modules/__init__.py
|
dendisuhubdy/dctts-pytorch
|
b69b9f63fe83a883c2f94fd93be431ead9ec1654
|
[
"MIT"
] | 81
|
2018-06-19T15:31:45.000Z
|
2022-03-24T11:59:18.000Z
|
pkg/modules/__init__.py
|
dendisuhubdy/dctts-pytorch
|
b69b9f63fe83a883c2f94fd93be431ead9ec1654
|
[
"MIT"
] | 7
|
2018-06-23T02:53:36.000Z
|
2020-06-06T04:59:39.000Z
|
pkg/modules/__init__.py
|
dendisuhubdy/dctts-pytorch
|
b69b9f63fe83a883c2f94fd93be431ead9ec1654
|
[
"MIT"
] | 30
|
2018-06-20T06:22:19.000Z
|
2021-01-05T10:36:00.000Z
|
from .conv import MaskedConv1d, HighwayConv1d, Deconv1d
from .layers import CharEmbed
from .utils import SequentialMaker
__all__ = ['MaskedConv1d', 'HighwayConv1d', 'CharEmbed', 'SequentialMaker', 'Deconv1d']
| 35
| 87
| 0.790476
| 20
| 210
| 8.1
| 0.55
| 0.308642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031915
| 0.104762
| 210
| 5
| 88
| 42
| 0.829787
| 0
| 0
| 0
| 0
| 0
| 0.271429
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1d53696ff210256c192213c8c9ffb7cb9b6ead99
| 3,985
|
py
|
Python
|
gewittergefahr/gg_utils/time_periods_test.py
|
dopplerchase/GewitterGefahr
|
4415b08dd64f37eba5b1b9e8cc5aa9af24f96593
|
[
"MIT"
] | 26
|
2018-10-04T01:07:35.000Z
|
2022-01-29T08:49:32.000Z
|
gewittergefahr/gg_utils/time_periods_test.py
|
liuximarcus/GewitterGefahr
|
d819874d616f98a25187bfd3091073a2e6d5279e
|
[
"MIT"
] | 4
|
2017-12-25T02:01:08.000Z
|
2018-12-19T01:54:21.000Z
|
gewittergefahr/gg_utils/time_periods_test.py
|
liuximarcus/GewitterGefahr
|
d819874d616f98a25187bfd3091073a2e6d5279e
|
[
"MIT"
] | 11
|
2017-12-10T23:05:29.000Z
|
2022-01-29T08:49:33.000Z
|
"""Unit tests for time_periods.py."""
import unittest
import numpy
from gewittergefahr.gg_utils import time_periods
ESTIMATED_START_TIME_UNIX_SEC = 1506999783 # 030303 UTC 3 Oct 2017
ESTIMATED_END_TIME_UNIX_SEC = 1507004664 # 042424 UTC 3 Oct 2017
TIME_INTERVAL_SEC = 600
TIMES_WITH_ENDPOINT_UNIX_SEC = numpy.array(
[1506999600, 1507000200, 1507000800, 1507001400, 1507002000, 1507002600,
1507003200, 1507003800, 1507004400, 1507005000])
TIMES_WITHOUT_ENDPOINT_UNIX_SEC = numpy.array(
[1506999600, 1507000200, 1507000800, 1507001400, 1507002000, 1507002600,
1507003200, 1507003800, 1507004400])
TIME_IN_PERIOD_UNIX_SEC = 1507003444 # 040404 UTC 3 Oct 2017
PERIOD_LENGTH_SEC = 5400
START_TIME_UNIX_SEC = 1506999600
END_TIME_UNIX_SEC = 1507005000
class TimePeriodsTests(unittest.TestCase):
"""Each method is a unit test for time_periods.py."""
def test_range_and_interval_to_list_include_endpoint(self):
"""Ensures correct output from range_and_interval_to_list.
In this case, endpoint of period is included in list of exact times.
"""
these_times_unix_sec = time_periods.range_and_interval_to_list(
start_time_unix_sec=ESTIMATED_START_TIME_UNIX_SEC,
end_time_unix_sec=ESTIMATED_END_TIME_UNIX_SEC,
time_interval_sec=TIME_INTERVAL_SEC, include_endpoint=True)
self.assertTrue(numpy.array_equal(these_times_unix_sec,
TIMES_WITH_ENDPOINT_UNIX_SEC))
def test_range_and_interval_to_list_exclude_endpoint(self):
"""Ensures correct output from range_and_interval_to_list.
In this case, endpoint of period is excluded from list of exact times.
"""
these_times_unix_sec = time_periods.range_and_interval_to_list(
start_time_unix_sec=ESTIMATED_START_TIME_UNIX_SEC,
end_time_unix_sec=ESTIMATED_END_TIME_UNIX_SEC,
time_interval_sec=TIME_INTERVAL_SEC, include_endpoint=False)
self.assertTrue(numpy.array_equal(these_times_unix_sec,
TIMES_WITHOUT_ENDPOINT_UNIX_SEC))
def test_time_and_period_length_to_range(self):
"""Ensures correct output from time_and_period_length_to_range."""
(this_start_time_unix_sec,
this_end_time_unix_sec) = time_periods.time_and_period_length_to_range(
TIME_IN_PERIOD_UNIX_SEC, PERIOD_LENGTH_SEC)
self.assertTrue(this_start_time_unix_sec == START_TIME_UNIX_SEC)
self.assertTrue(this_end_time_unix_sec == END_TIME_UNIX_SEC)
def test_time_and_period_length_and_interval_to_list_include_endpoint(self):
"""Ensures correctness of time_and_period_length_and_interval_to_list.
In this case, endpoint of period is included in list of exact times.
"""
these_times_unix_sec = (
time_periods.time_and_period_length_and_interval_to_list(
unix_time_sec=TIME_IN_PERIOD_UNIX_SEC,
period_length_sec=PERIOD_LENGTH_SEC,
time_interval_sec=TIME_INTERVAL_SEC, include_endpoint=True))
self.assertTrue(numpy.array_equal(these_times_unix_sec,
TIMES_WITH_ENDPOINT_UNIX_SEC))
def test_time_and_period_length_and_interval_to_list_exclude_endpoint(self):
"""Ensures correctness of time_and_period_length_and_interval_to_list.
In this case, endpoint of period is excluded from list of exact times.
"""
these_times_unix_sec = (
time_periods.time_and_period_length_and_interval_to_list(
unix_time_sec=TIME_IN_PERIOD_UNIX_SEC,
period_length_sec=PERIOD_LENGTH_SEC,
time_interval_sec=TIME_INTERVAL_SEC, include_endpoint=False))
self.assertTrue(numpy.array_equal(these_times_unix_sec,
TIMES_WITHOUT_ENDPOINT_UNIX_SEC))
if __name__ == '__main__':
unittest.main()
| 42.393617
| 80
| 0.724969
| 531
| 3,985
| 4.911488
| 0.156309
| 0.096626
| 0.07592
| 0.078221
| 0.842791
| 0.776074
| 0.760736
| 0.747316
| 0.696319
| 0.68635
| 0
| 0.090061
| 0.219824
| 3,985
| 93
| 81
| 42.849462
| 0.748794
| 0.185445
| 0
| 0.436364
| 0
| 0
| 0.002548
| 0
| 0
| 0
| 0
| 0
| 0.109091
| 1
| 0.090909
| false
| 0
| 0.054545
| 0
| 0.163636
| 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
|
1d83dac4a11ae13b672030c31cee47d22f6e8dbb
| 58
|
py
|
Python
|
networks/adabins/models/__init__.py
|
EvoCargo/mono_depth
|
3a77291a7fc8f3eaad5f93aa17e2b60c9339a0b1
|
[
"MIT"
] | null | null | null |
networks/adabins/models/__init__.py
|
EvoCargo/mono_depth
|
3a77291a7fc8f3eaad5f93aa17e2b60c9339a0b1
|
[
"MIT"
] | 1
|
2021-06-09T12:56:47.000Z
|
2021-06-11T10:49:06.000Z
|
networks/adabins/models/__init__.py
|
EvoCargo/mono_depth
|
3a77291a7fc8f3eaad5f93aa17e2b60c9339a0b1
|
[
"MIT"
] | null | null | null |
from .unet_adaptive_bins import UnetAdaptiveBins # noqa
| 29
| 57
| 0.827586
| 7
| 58
| 6.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 58
| 1
| 58
| 58
| 0.92
| 0.068966
| 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
|
d5178864c1f95bf1cea6579ab4c337567c2f06a4
| 94
|
py
|
Python
|
pyqiwi/__init__.py
|
roomdie/pyqiwi
|
0b6b1074b513e05e341bbdad8df075b5f8b94892
|
[
"MIT"
] | null | null | null |
pyqiwi/__init__.py
|
roomdie/pyqiwi
|
0b6b1074b513e05e341bbdad8df075b5f8b94892
|
[
"MIT"
] | null | null | null |
pyqiwi/__init__.py
|
roomdie/pyqiwi
|
0b6b1074b513e05e341bbdad8df075b5f8b94892
|
[
"MIT"
] | null | null | null |
from .config import models, types
from . import api
from .utils import random_hex, decorators
| 23.5
| 41
| 0.797872
| 14
| 94
| 5.285714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148936
| 94
| 3
| 42
| 31.333333
| 0.925
| 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
|
d540f6c3b9bfa3c20e8fecf05a9f5ad18d04e824
| 60
|
py
|
Python
|
cs_299/model/__init__.py
|
jtara1/cs_299
|
f22d6a97d318cc0cde0f662fbdf3f87d870d3bb4
|
[
"MIT"
] | 1
|
2018-04-29T06:42:07.000Z
|
2018-04-29T06:42:07.000Z
|
cs_299/model/__init__.py
|
jtara1/cs_299
|
f22d6a97d318cc0cde0f662fbdf3f87d870d3bb4
|
[
"MIT"
] | 1
|
2018-05-24T20:54:43.000Z
|
2018-05-24T20:55:16.000Z
|
cs_299/model/__init__.py
|
jtara1/cs_299
|
f22d6a97d318cc0cde0f662fbdf3f87d870d3bb4
|
[
"MIT"
] | null | null | null |
from cs_299.model.__main__ import TweetQuery, TweetProcessor
| 60
| 60
| 0.883333
| 8
| 60
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053571
| 0.066667
| 60
| 1
| 60
| 60
| 0.803571
| 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
|
d56202ae53fc2d70d5b5897ff4c1ba88da5e3d1b
| 209
|
py
|
Python
|
Task1F.py
|
xie-yuxuan/IA-flood-risk-129
|
cf0439f64e84294625c5b0afdf0da0175b0b0e90
|
[
"MIT"
] | null | null | null |
Task1F.py
|
xie-yuxuan/IA-flood-risk-129
|
cf0439f64e84294625c5b0afdf0da0175b0b0e90
|
[
"MIT"
] | null | null | null |
Task1F.py
|
xie-yuxuan/IA-flood-risk-129
|
cf0439f64e84294625c5b0afdf0da0175b0b0e90
|
[
"MIT"
] | 1
|
2022-02-08T00:38:27.000Z
|
2022-02-08T00:38:27.000Z
|
from floodsystem.stationdata import build_station_list
from floodsystem.station import inconsistent_typical_range_stations
stations = build_station_list()
print(inconsistent_typical_range_stations(stations))
| 34.833333
| 67
| 0.894737
| 25
| 209
| 7.08
| 0.48
| 0.169492
| 0.180791
| 0.361582
| 0.451977
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.062201
| 209
| 6
| 68
| 34.833333
| 0.903061
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d5935d9c41cb122538df7dc2a81408056bff2d08
| 348
|
py
|
Python
|
chemical_reactions/__init__.py
|
hasic-haris/retrochem_toolbox
|
b5d54d4bea16287aeee632aebdd14371e22c7019
|
[
"MIT"
] | 4
|
2021-03-31T09:08:56.000Z
|
2021-09-14T13:40:20.000Z
|
chemical_reactions/__init__.py
|
hasic-haris/retrochem_toolbox
|
b5d54d4bea16287aeee632aebdd14371e22c7019
|
[
"MIT"
] | null | null | null |
chemical_reactions/__init__.py
|
hasic-haris/retrochem_toolbox
|
b5d54d4bea16287aeee632aebdd14371e22c7019
|
[
"MIT"
] | 2
|
2021-03-31T07:07:19.000Z
|
2021-06-16T07:29:08.000Z
|
"""
Author:
Haris Hasic, PhD Student
Institution:
Ishida Laboratory, Department of Computer Science, School of Computing, Tokyo Institute of Technology
Updated on:
April, 2021
"""
from .analysis_utils import *
from .descriptor_utils import *
from .editing_utils import *
from .general_utils import *
from .visualization_utils import *
| 23.2
| 105
| 0.764368
| 43
| 348
| 6.069767
| 0.674419
| 0.210728
| 0.229885
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013793
| 0.166667
| 348
| 14
| 106
| 24.857143
| 0.886207
| 0.525862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
d59696ec28ff0dbc8fb71adce42fcf37226ddf16
| 156
|
py
|
Python
|
cpo_pipeline/__init__.py
|
DiDigsDNA/cpo-pipeline
|
4b3236ef4fe37e6efa38554e90f6d289d4f1f801
|
[
"MIT"
] | null | null | null |
cpo_pipeline/__init__.py
|
DiDigsDNA/cpo-pipeline
|
4b3236ef4fe37e6efa38554e90f6d289d4f1f801
|
[
"MIT"
] | 31
|
2018-10-11T17:43:19.000Z
|
2019-06-14T19:26:26.000Z
|
cpo_pipeline/__init__.py
|
DiDigsDNA/cpo-pipeline
|
4b3236ef4fe37e6efa38554e90f6d289d4f1f801
|
[
"MIT"
] | 3
|
2018-11-15T18:04:36.000Z
|
2019-05-02T19:09:39.000Z
|
__version__ = '0.1.0'
from . import pipeline
from . import assembly
from . import typing
from . import resistance
from . import plasmids
from . import tree
| 19.5
| 24
| 0.75641
| 22
| 156
| 5.181818
| 0.5
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023256
| 0.173077
| 156
| 7
| 25
| 22.285714
| 0.860465
| 0
| 0
| 0
| 0
| 0
| 0.032051
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.857143
| 0
| 0.857143
| 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
|
6368a1ec9ec79c85b9b257e9c6625cca62a06da4
| 16
|
py
|
Python
|
grove/grover/__init__.py
|
yevbar/grove
|
0d84fdef2b25bb5fa98315a1b3f454fd286477d6
|
[
"Apache-2.0"
] | 1
|
2017-06-20T02:32:08.000Z
|
2017-06-20T02:32:08.000Z
|
grove/grover/__init__.py
|
yevbar/grove
|
0d84fdef2b25bb5fa98315a1b3f454fd286477d6
|
[
"Apache-2.0"
] | null | null | null |
grove/grover/__init__.py
|
yevbar/grove
|
0d84fdef2b25bb5fa98315a1b3f454fd286477d6
|
[
"Apache-2.0"
] | 2
|
2017-06-06T23:44:39.000Z
|
2018-07-27T04:10:11.000Z
|
# Grover's init
| 8
| 15
| 0.6875
| 3
| 16
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 16
| 1
| 16
| 16
| 0.846154
| 0.8125
| 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
|
63ccbb3491b1668d0e96912f06d376123fe358ed
| 40
|
py
|
Python
|
objective_functions/hole_reaching/mp_lib/__init__.py
|
ottofabian/rl_stochastic_search
|
0e96cdcb5d7a09e789c94f989192ae437d440861
|
[
"MIT"
] | null | null | null |
objective_functions/hole_reaching/mp_lib/__init__.py
|
ottofabian/rl_stochastic_search
|
0e96cdcb5d7a09e789c94f989192ae437d440861
|
[
"MIT"
] | 7
|
2020-07-03T14:36:46.000Z
|
2022-03-12T00:38:31.000Z
|
objective_functions/hole_reaching/mp_lib/__init__.py
|
ottofabian/rl_stochastic_search
|
0e96cdcb5d7a09e789c94f989192ae437d440861
|
[
"MIT"
] | null | null | null |
# __all__ = ['basis', 'phase', 'promps']
| 40
| 40
| 0.575
| 4
| 40
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 40
| 1
| 40
| 40
| 0.542857
| 0.95
| 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
|
8931ed33f90823663f1a8db6a60f59722551d64a
| 77
|
py
|
Python
|
renew.py
|
Flairings/Renew-And-Release
|
5a29aa4f57d3d62d4e3cd09719e183edbc6c872d
|
[
"MIT"
] | 1
|
2021-02-03T23:35:35.000Z
|
2021-02-03T23:35:35.000Z
|
renew.py
|
Flairings/Renew-And-Release
|
5a29aa4f57d3d62d4e3cd09719e183edbc6c872d
|
[
"MIT"
] | null | null | null |
renew.py
|
Flairings/Renew-And-Release
|
5a29aa4f57d3d62d4e3cd09719e183edbc6c872d
|
[
"MIT"
] | null | null | null |
import sys, os
os.system("echo Renewing IP")
os.system("ipconfig /renew")
| 19.25
| 30
| 0.701299
| 12
| 77
| 4.5
| 0.75
| 0.296296
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 77
| 4
| 31
| 19.25
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0.413333
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.