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
74465e288ae568c87d8ee7da98f3d73b7dabf8da
22
py
Python
python.py
oguzcan710/mastering-git-august
b165333bdd96552d834350d95f7fd950e5844538
[ "Apache-2.0" ]
null
null
null
python.py
oguzcan710/mastering-git-august
b165333bdd96552d834350d95f7fd950e5844538
[ "Apache-2.0" ]
null
null
null
python.py
oguzcan710/mastering-git-august
b165333bdd96552d834350d95f7fd950e5844538
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/bin/python
11
21
0.681818
4
22
3.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.045455
22
1
22
22
0.714286
0.909091
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
745efcdb285c929a84a0e99a3d292fa8280b80d9
20
py
Python
django_project/users/migrations/__init__.py
Manish-Sharma-1810/My-Django-Blog-App
9dc791bd11c9ff0e3eea21125dd127e8c2435e00
[ "MIT" ]
null
null
null
django_project/users/migrations/__init__.py
Manish-Sharma-1810/My-Django-Blog-App
9dc791bd11c9ff0e3eea21125dd127e8c2435e00
[ "MIT" ]
null
null
null
django_project/users/migrations/__init__.py
Manish-Sharma-1810/My-Django-Blog-App
9dc791bd11c9ff0e3eea21125dd127e8c2435e00
[ "MIT" ]
1
2021-12-20T14:15:47.000Z
2021-12-20T14:15:47.000Z
# This file is empty
20
20
0.75
4
20
3.75
1
0
0
0
0
0
0
0
0
0
0
0
0.2
20
1
20
20
0.9375
0.9
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
778f781ff9cc65cbd0f42226b7afbf7f0c69cc2b
75
py
Python
oj/custom_settings.example.py
gogiluv/testrepo
55e4a905b70a460e74b8116a130b720821eaf2ce
[ "MIT" ]
1
2018-01-28T07:48:13.000Z
2018-01-28T07:48:13.000Z
oj/custom_settings.example.py
OnlineJudgeNextGeneration/qduoj2
c4889d70850bd91ae7f662c02524d0555b6a3ce7
[ "MIT" ]
null
null
null
oj/custom_settings.example.py
OnlineJudgeNextGeneration/qduoj2
c4889d70850bd91ae7f662c02524d0555b6a3ce7
[ "MIT" ]
1
2020-09-29T14:21:27.000Z
2020-09-29T14:21:27.000Z
# please set your own SECRET_KEY to a long random string # SECRET_KEY = ""
25
56
0.733333
13
75
4.076923
0.846154
0.339623
0
0
0
0
0
0
0
0
0
0
0.2
75
2
57
37.5
0.883333
0.933333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
0
0
0
0
0
0
0
0
0
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
77986af2fb4a4ca5a35c228e734e2824ebae00e3
248
py
Python
object_oriented_programming/exercise_online_shopping/review.py
jepster/python_advanced_techniques
f4b0e0dda7b66be55f650f9f902e735d3f5a9f64
[ "MIT" ]
null
null
null
object_oriented_programming/exercise_online_shopping/review.py
jepster/python_advanced_techniques
f4b0e0dda7b66be55f650f9f902e735d3f5a9f64
[ "MIT" ]
null
null
null
object_oriented_programming/exercise_online_shopping/review.py
jepster/python_advanced_techniques
f4b0e0dda7b66be55f650f9f902e735d3f5a9f64
[ "MIT" ]
null
null
null
class Review: def __init__(self, content, user, product): self.content = content self.user = user self.product = product def __str__(self): return f"Review of {self.product} by {self.user}: '{self.content}'"
31
75
0.616935
31
248
4.677419
0.419355
0.227586
0
0
0
0
0
0
0
0
0
0
0.262097
248
8
75
31
0.79235
0
0
0
0
0
0.228916
0
0
0
0
0
0
1
0.285714
false
0
0
0.142857
0.571429
0
0
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
1
0
0
5
77d18b76003c4bfc898530ed0582298875b31542
29
py
Python
trader/trading/executioner.py
9600dev/mmr
b08e63b7044f2b2061d8679b216822c82d309c86
[ "Apache-2.0" ]
12
2021-09-22T21:19:23.000Z
2022-01-03T21:38:47.000Z
trader/trading/executioner.py
webclinic017/mmr
9c385c027fcf8cf365e41726c7c5d2064f33c202
[ "Apache-2.0" ]
null
null
null
trader/trading/executioner.py
webclinic017/mmr
9c385c027fcf8cf365e41726c7c5d2064f33c202
[ "Apache-2.0" ]
3
2021-09-05T23:26:13.000Z
2022-03-25T01:01:22.000Z
class Executioner(): pass
14.5
20
0.689655
3
29
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.206897
29
2
21
14.5
0.869565
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
77e475b891c5acd960168cb4f57e50fe78d26b08
270
py
Python
distrib/tests_platane.py
BonJovi1/Bullet-the-Blue-Sky
9ebf41fc85ccf9f8e2880acdafc6dfffd8a0268f
[ "WTFPL" ]
2
2019-10-13T02:56:35.000Z
2020-04-04T08:57:13.000Z
distrib/tests_platane.py
BonJovi1/Bullet-the-Blue-Sky
9ebf41fc85ccf9f8e2880acdafc6dfffd8a0268f
[ "WTFPL" ]
null
null
null
distrib/tests_platane.py
BonJovi1/Bullet-the-Blue-Sky
9ebf41fc85ccf9f8e2880acdafc6dfffd8a0268f
[ "WTFPL" ]
null
null
null
from utils import * Clean() HgUpdate21() PatchAll() Build_VC11Express_64() OptimusForceIntel() RunAll() OptimusForceNVIDIA() RunAll() Clean() HgUpdate33() PatchAll() Build_VC11Express_64() OptimusForceNVIDIA() RunAll() Clean() HgUpdate33()
11.25
23
0.692593
23
270
7.956522
0.565217
0.142077
0.262295
0.284153
0
0
0
0
0
0
0
0.063636
0.185185
270
23
24
11.73913
0.768182
0
0
0.823529
0
0
0
0
0
0
0
0
0
1
0
true
0
0.058824
0
0.058824
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
77f8db530c6e11a50fc91ef02feb1663a2228e2e
25
py
Python
utokenize/testdata/func_varargs.py
MaxTurchin/pycopy-lib
d7a69fc2a28031e2ca475c29239f715c1809d8cc
[ "PSF-2.0" ]
126
2019-07-19T14:42:41.000Z
2022-03-21T22:22:19.000Z
utokenize/testdata/func_varargs.py
MaxTurchin/pycopy-lib
d7a69fc2a28031e2ca475c29239f715c1809d8cc
[ "PSF-2.0" ]
38
2019-08-28T01:46:31.000Z
2022-03-17T05:46:51.000Z
utokenize/testdata/func_varargs.py
MaxTurchin/pycopy-lib
d7a69fc2a28031e2ca475c29239f715c1809d8cc
[ "PSF-2.0" ]
55
2019-08-02T09:32:33.000Z
2021-12-22T11:25:51.000Z
def foo(a, *b): pass
8.333333
15
0.48
5
25
2.4
1
0
0
0
0
0
0
0
0
0
0
0
0.32
25
2
16
12.5
0.705882
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
7ad6399647944ee35628a46c260ef1d398254324
81
py
Python
src/polytropon/__init__.py
xhlulu/polytropon
fd4df35a479f17ca1e3f568d96a95c1b8b5b518f
[ "MIT" ]
14
2022-03-02T10:25:22.000Z
2022-03-13T01:22:08.000Z
src/polytropon/__init__.py
xhlulu/polytropon
fd4df35a479f17ca1e3f568d96a95c1b8b5b518f
[ "MIT" ]
2
2022-03-02T15:56:37.000Z
2022-03-29T17:40:34.000Z
src/polytropon/__init__.py
xhlulu/polytropon
fd4df35a479f17ca1e3f568d96a95c1b8b5b518f
[ "MIT" ]
2
2022-03-02T15:59:47.000Z
2022-03-03T01:14:45.000Z
from . import adapters, utils from .polytropon import VARIANT2CLASS, SkilledMixin
40.5
51
0.839506
9
81
7.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0.013889
0.111111
81
2
51
40.5
0.930556
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
7ade72c37577df6464ca8dc5d4f8c8a62f6533b2
246
py
Python
ndn_python_repo/handle/__init__.py
susmit85/ndn-python-repo
45a76bd3e78b0157e364413d62d3aaa51cd20353
[ "Apache-2.0" ]
5
2020-03-23T01:32:12.000Z
2020-10-03T14:36:19.000Z
ndn_python_repo/handle/__init__.py
susmit85/ndn-python-repo
45a76bd3e78b0157e364413d62d3aaa51cd20353
[ "Apache-2.0" ]
48
2020-01-24T04:29:14.000Z
2020-12-11T09:08:50.000Z
ndn_python_repo/handle/__init__.py
susmit85/ndn-python-repo
45a76bd3e78b0157e364413d62d3aaa51cd20353
[ "Apache-2.0" ]
6
2020-02-20T00:05:33.000Z
2020-11-27T05:27:14.000Z
from .read_handle import ReadHandle from .command_handle_base import CommandHandle from .write_command_handle import WriteCommandHandle from .delete_command_handle import DeleteCommandHandle from .tcp_bulk_insert_handle import TcpBulkInsertHandle
49.2
55
0.902439
30
246
7.066667
0.533333
0.226415
0.179245
0
0
0
0
0
0
0
0
0
0.077236
246
5
55
49.2
0.933921
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
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
7ae87b35274b2c9c47cbad11cf4cc8f53a9dfec9
9,371
py
Python
microbenchmarks/sort2_20.py
jmgc/pyston
9f672c1bbb75710ac17dd3d9107da05c8e9e8e8f
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:28:45.000Z
2020-02-06T14:28:45.000Z
microbenchmarks/sort2_20.py
jmgc/pyston
9f672c1bbb75710ac17dd3d9107da05c8e9e8e8f
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
microbenchmarks/sort2_20.py
jmgc/pyston
9f672c1bbb75710ac17dd3d9107da05c8e9e8e8f
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:29:00.000Z
2020-02-06T14:29:00.000Z
def f(l): if l[0] > l[1]: l[0], l[1] = l[1], l[0] if l[0] > l[2]: l[0], l[2] = l[2], l[0] if l[0] > l[3]: l[0], l[3] = l[3], l[0] if l[0] > l[4]: l[0], l[4] = l[4], l[0] if l[0] > l[5]: l[0], l[5] = l[5], l[0] if l[0] > l[6]: l[0], l[6] = l[6], l[0] if l[0] > l[7]: l[0], l[7] = l[7], l[0] if l[0] > l[8]: l[0], l[8] = l[8], l[0] if l[0] > l[9]: l[0], l[9] = l[9], l[0] if l[0] > l[10]: l[0], l[10] = l[10], l[0] if l[0] > l[11]: l[0], l[11] = l[11], l[0] if l[0] > l[12]: l[0], l[12] = l[12], l[0] if l[0] > l[13]: l[0], l[13] = l[13], l[0] if l[0] > l[14]: l[0], l[14] = l[14], l[0] if l[0] > l[15]: l[0], l[15] = l[15], l[0] if l[0] > l[16]: l[0], l[16] = l[16], l[0] if l[0] > l[17]: l[0], l[17] = l[17], l[0] if l[0] > l[18]: l[0], l[18] = l[18], l[0] if l[0] > l[19]: l[0], l[19] = l[19], l[0] if l[1] > l[2]: l[1], l[2] = l[2], l[1] if l[1] > l[3]: l[1], l[3] = l[3], l[1] if l[1] > l[4]: l[1], l[4] = l[4], l[1] if l[1] > l[5]: l[1], l[5] = l[5], l[1] if l[1] > l[6]: l[1], l[6] = l[6], l[1] if l[1] > l[7]: l[1], l[7] = l[7], l[1] if l[1] > l[8]: l[1], l[8] = l[8], l[1] if l[1] > l[9]: l[1], l[9] = l[9], l[1] if l[1] > l[10]: l[1], l[10] = l[10], l[1] if l[1] > l[11]: l[1], l[11] = l[11], l[1] if l[1] > l[12]: l[1], l[12] = l[12], l[1] if l[1] > l[13]: l[1], l[13] = l[13], l[1] if l[1] > l[14]: l[1], l[14] = l[14], l[1] if l[1] > l[15]: l[1], l[15] = l[15], l[1] if l[1] > l[16]: l[1], l[16] = l[16], l[1] if l[1] > l[17]: l[1], l[17] = l[17], l[1] if l[1] > l[18]: l[1], l[18] = l[18], l[1] if l[1] > l[19]: l[1], l[19] = l[19], l[1] if l[2] > l[3]: l[2], l[3] = l[3], l[2] if l[2] > l[4]: l[2], l[4] = l[4], l[2] if l[2] > l[5]: l[2], l[5] = l[5], l[2] if l[2] > l[6]: l[2], l[6] = l[6], l[2] if l[2] > l[7]: l[2], l[7] = l[7], l[2] if l[2] > l[8]: l[2], l[8] = l[8], l[2] if l[2] > l[9]: l[2], l[9] = l[9], l[2] if l[2] > l[10]: l[2], l[10] = l[10], l[2] if l[2] > l[11]: l[2], l[11] = l[11], l[2] if l[2] > l[12]: l[2], l[12] = l[12], l[2] if l[2] > l[13]: l[2], l[13] = l[13], l[2] if l[2] > l[14]: l[2], l[14] = l[14], l[2] if l[2] > l[15]: l[2], l[15] = l[15], l[2] if l[2] > l[16]: l[2], l[16] = l[16], l[2] if l[2] > l[17]: l[2], l[17] = l[17], l[2] if l[2] > l[18]: l[2], l[18] = l[18], l[2] if l[2] > l[19]: l[2], l[19] = l[19], l[2] if l[3] > l[4]: l[3], l[4] = l[4], l[3] if l[3] > l[5]: l[3], l[5] = l[5], l[3] if l[3] > l[6]: l[3], l[6] = l[6], l[3] if l[3] > l[7]: l[3], l[7] = l[7], l[3] if l[3] > l[8]: l[3], l[8] = l[8], l[3] if l[3] > l[9]: l[3], l[9] = l[9], l[3] if l[3] > l[10]: l[3], l[10] = l[10], l[3] if l[3] > l[11]: l[3], l[11] = l[11], l[3] if l[3] > l[12]: l[3], l[12] = l[12], l[3] if l[3] > l[13]: l[3], l[13] = l[13], l[3] if l[3] > l[14]: l[3], l[14] = l[14], l[3] if l[3] > l[15]: l[3], l[15] = l[15], l[3] if l[3] > l[16]: l[3], l[16] = l[16], l[3] if l[3] > l[17]: l[3], l[17] = l[17], l[3] if l[3] > l[18]: l[3], l[18] = l[18], l[3] if l[3] > l[19]: l[3], l[19] = l[19], l[3] if l[4] > l[5]: l[4], l[5] = l[5], l[4] if l[4] > l[6]: l[4], l[6] = l[6], l[4] if l[4] > l[7]: l[4], l[7] = l[7], l[4] if l[4] > l[8]: l[4], l[8] = l[8], l[4] if l[4] > l[9]: l[4], l[9] = l[9], l[4] if l[4] > l[10]: l[4], l[10] = l[10], l[4] if l[4] > l[11]: l[4], l[11] = l[11], l[4] if l[4] > l[12]: l[4], l[12] = l[12], l[4] if l[4] > l[13]: l[4], l[13] = l[13], l[4] if l[4] > l[14]: l[4], l[14] = l[14], l[4] if l[4] > l[15]: l[4], l[15] = l[15], l[4] if l[4] > l[16]: l[4], l[16] = l[16], l[4] if l[4] > l[17]: l[4], l[17] = l[17], l[4] if l[4] > l[18]: l[4], l[18] = l[18], l[4] if l[4] > l[19]: l[4], l[19] = l[19], l[4] if l[5] > l[6]: l[5], l[6] = l[6], l[5] if l[5] > l[7]: l[5], l[7] = l[7], l[5] if l[5] > l[8]: l[5], l[8] = l[8], l[5] if l[5] > l[9]: l[5], l[9] = l[9], l[5] if l[5] > l[10]: l[5], l[10] = l[10], l[5] if l[5] > l[11]: l[5], l[11] = l[11], l[5] if l[5] > l[12]: l[5], l[12] = l[12], l[5] if l[5] > l[13]: l[5], l[13] = l[13], l[5] if l[5] > l[14]: l[5], l[14] = l[14], l[5] if l[5] > l[15]: l[5], l[15] = l[15], l[5] if l[5] > l[16]: l[5], l[16] = l[16], l[5] if l[5] > l[17]: l[5], l[17] = l[17], l[5] if l[5] > l[18]: l[5], l[18] = l[18], l[5] if l[5] > l[19]: l[5], l[19] = l[19], l[5] if l[6] > l[7]: l[6], l[7] = l[7], l[6] if l[6] > l[8]: l[6], l[8] = l[8], l[6] if l[6] > l[9]: l[6], l[9] = l[9], l[6] if l[6] > l[10]: l[6], l[10] = l[10], l[6] if l[6] > l[11]: l[6], l[11] = l[11], l[6] if l[6] > l[12]: l[6], l[12] = l[12], l[6] if l[6] > l[13]: l[6], l[13] = l[13], l[6] if l[6] > l[14]: l[6], l[14] = l[14], l[6] if l[6] > l[15]: l[6], l[15] = l[15], l[6] if l[6] > l[16]: l[6], l[16] = l[16], l[6] if l[6] > l[17]: l[6], l[17] = l[17], l[6] if l[6] > l[18]: l[6], l[18] = l[18], l[6] if l[6] > l[19]: l[6], l[19] = l[19], l[6] if l[7] > l[8]: l[7], l[8] = l[8], l[7] if l[7] > l[9]: l[7], l[9] = l[9], l[7] if l[7] > l[10]: l[7], l[10] = l[10], l[7] if l[7] > l[11]: l[7], l[11] = l[11], l[7] if l[7] > l[12]: l[7], l[12] = l[12], l[7] if l[7] > l[13]: l[7], l[13] = l[13], l[7] if l[7] > l[14]: l[7], l[14] = l[14], l[7] if l[7] > l[15]: l[7], l[15] = l[15], l[7] if l[7] > l[16]: l[7], l[16] = l[16], l[7] if l[7] > l[17]: l[7], l[17] = l[17], l[7] if l[7] > l[18]: l[7], l[18] = l[18], l[7] if l[7] > l[19]: l[7], l[19] = l[19], l[7] if l[8] > l[9]: l[8], l[9] = l[9], l[8] if l[8] > l[10]: l[8], l[10] = l[10], l[8] if l[8] > l[11]: l[8], l[11] = l[11], l[8] if l[8] > l[12]: l[8], l[12] = l[12], l[8] if l[8] > l[13]: l[8], l[13] = l[13], l[8] if l[8] > l[14]: l[8], l[14] = l[14], l[8] if l[8] > l[15]: l[8], l[15] = l[15], l[8] if l[8] > l[16]: l[8], l[16] = l[16], l[8] if l[8] > l[17]: l[8], l[17] = l[17], l[8] if l[8] > l[18]: l[8], l[18] = l[18], l[8] if l[8] > l[19]: l[8], l[19] = l[19], l[8] if l[9] > l[10]: l[9], l[10] = l[10], l[9] if l[9] > l[11]: l[9], l[11] = l[11], l[9] if l[9] > l[12]: l[9], l[12] = l[12], l[9] if l[9] > l[13]: l[9], l[13] = l[13], l[9] if l[9] > l[14]: l[9], l[14] = l[14], l[9] if l[9] > l[15]: l[9], l[15] = l[15], l[9] if l[9] > l[16]: l[9], l[16] = l[16], l[9] if l[9] > l[17]: l[9], l[17] = l[17], l[9] if l[9] > l[18]: l[9], l[18] = l[18], l[9] if l[9] > l[19]: l[9], l[19] = l[19], l[9] if l[10] > l[11]: l[10], l[11] = l[11], l[10] if l[10] > l[12]: l[10], l[12] = l[12], l[10] if l[10] > l[13]: l[10], l[13] = l[13], l[10] if l[10] > l[14]: l[10], l[14] = l[14], l[10] if l[10] > l[15]: l[10], l[15] = l[15], l[10] if l[10] > l[16]: l[10], l[16] = l[16], l[10] if l[10] > l[17]: l[10], l[17] = l[17], l[10] if l[10] > l[18]: l[10], l[18] = l[18], l[10] if l[10] > l[19]: l[10], l[19] = l[19], l[10] if l[11] > l[12]: l[11], l[12] = l[12], l[11] if l[11] > l[13]: l[11], l[13] = l[13], l[11] if l[11] > l[14]: l[11], l[14] = l[14], l[11] if l[11] > l[15]: l[11], l[15] = l[15], l[11] if l[11] > l[16]: l[11], l[16] = l[16], l[11] if l[11] > l[17]: l[11], l[17] = l[17], l[11] if l[11] > l[18]: l[11], l[18] = l[18], l[11] if l[11] > l[19]: l[11], l[19] = l[19], l[11] if l[12] > l[13]: l[12], l[13] = l[13], l[12] if l[12] > l[14]: l[12], l[14] = l[14], l[12] if l[12] > l[15]: l[12], l[15] = l[15], l[12] if l[12] > l[16]: l[12], l[16] = l[16], l[12] if l[12] > l[17]: l[12], l[17] = l[17], l[12] if l[12] > l[18]: l[12], l[18] = l[18], l[12] if l[12] > l[19]: l[12], l[19] = l[19], l[12] if l[13] > l[14]: l[13], l[14] = l[14], l[13] if l[13] > l[15]: l[13], l[15] = l[15], l[13] if l[13] > l[16]: l[13], l[16] = l[16], l[13] if l[13] > l[17]: l[13], l[17] = l[17], l[13] if l[13] > l[18]: l[13], l[18] = l[18], l[13] if l[13] > l[19]: l[13], l[19] = l[19], l[13] if l[14] > l[15]: l[14], l[15] = l[15], l[14] if l[14] > l[16]: l[14], l[16] = l[16], l[14] if l[14] > l[17]: l[14], l[17] = l[17], l[14] if l[14] > l[18]: l[14], l[18] = l[18], l[14] if l[14] > l[19]: l[14], l[19] = l[19], l[14] if l[15] > l[16]: l[15], l[16] = l[16], l[15] if l[15] > l[17]: l[15], l[17] = l[17], l[15] if l[15] > l[18]: l[15], l[18] = l[18], l[15] if l[15] > l[19]: l[15], l[19] = l[19], l[15] if l[16] > l[17]: l[16], l[17] = l[17], l[16] if l[16] > l[18]: l[16], l[18] = l[18], l[16] if l[16] > l[19]: l[16], l[19] = l[19], l[16] if l[17] > l[18]: l[17], l[18] = l[18], l[17] if l[17] > l[19]: l[17], l[19] = l[19], l[17] if l[18] > l[19]: l[18], l[19] = l[19], l[18] return l print f([3, 12, 16, 8, 17, 6, 13, 0, 4, 15, 1, 14, 11, 18, 10, 5, 9, 7, 2, 19]) print f([2, 6, 11, 4, 7, 18, 19, 10, 15, 13, 3, 0, 17, 5, 8, 1, 14, 9, 16, 12]) print f([6, 12, 10, 7, 19, 15, 14, 5, 16, 1, 4, 11, 13, 2, 18, 9, 0, 3, 17, 8]) print f([1, 17, 13, 8, 9, 19, 18, 6, 5, 10, 12, 14, 2, 15, 0, 4, 11, 16, 7, 3]) print f([4, 7, 8, 6, 16, 10, 0, 5, 1, 3, 19, 2, 15, 12, 17, 11, 13, 18, 14, 9]) print f([14, 16, 11, 12, 5, 0, 10, 3, 1, 8, 17, 13, 4, 19, 9, 15, 6, 2, 7, 18]) print f([0, 3, 14, 9, 19, 13, 1, 7, 4, 17, 8, 16, 10, 5, 12, 6, 15, 11, 2, 18]) print f([17, 19, 3, 13, 15, 6, 16, 4, 0, 18, 8, 1, 9, 11, 2, 12, 7, 10, 5, 14]) print f([19, 5, 15, 1, 8, 2, 3, 12, 6, 14, 17, 7, 13, 10, 4, 18, 11, 9, 16, 0]) print f([13, 10, 11, 17, 19, 12, 14, 7, 5, 9, 2, 4, 18, 8, 6, 3, 16, 15, 0, 1])
46.162562
79
0.384377
2,695
9,371
1.336549
0.009648
0.158245
0.063298
0.026374
0.877013
0.349806
0
0
0
0
0
0.284501
0.246078
9,371
202
80
46.391089
0.225336
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.049505
0
0
1
null
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
bb06b45e3723a9ef4facef11872ccca58b2eadb8
184
py
Python
applications/ip2country/models/db_iptable.py
blazejkocon/csc438
b06555a965d914ea599d3e6fc85780168486d90c
[ "BSD-3-Clause" ]
null
null
null
applications/ip2country/models/db_iptable.py
blazejkocon/csc438
b06555a965d914ea599d3e6fc85780168486d90c
[ "BSD-3-Clause" ]
null
null
null
applications/ip2country/models/db_iptable.py
blazejkocon/csc438
b06555a965d914ea599d3e6fc85780168486d90c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- db.define_table('ip2nation', Field('code',type='integer', requires=IS_NOT_EMPTY()), Field('country', requires= IS_NOT_EMPTY()))
36.8
70
0.570652
21
184
4.761905
0.761905
0.2
0.26
0.36
0
0
0
0
0
0
0
0.014184
0.233696
184
4
71
46
0.695035
0.11413
0
0
0
0
0.167702
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
bb153760d668539261a0d33707c85c1e1d93f62e
191
py
Python
PEPit/tools/__init__.py
bgoujaud/PEPit
7352607069f5e90fb1919fc689ec5e9d745c3bac
[ "MIT" ]
44
2021-11-18T16:41:20.000Z
2022-02-14T09:59:13.000Z
PEPit/tools/__init__.py
bgoujaud/PEPit
7352607069f5e90fb1919fc689ec5e9d745c3bac
[ "MIT" ]
2
2021-10-05T09:20:25.000Z
2022-02-19T13:58:01.000Z
PEPit/tools/__init__.py
PerformanceEstimation/PEPit
7005bc9a9da11dea448966437365c897734ec341
[ "MIT" ]
1
2022-02-08T12:03:29.000Z
2022-02-08T12:03:29.000Z
from .dict_operations import merge_dict, prune_dict, multiply_dicts __all__ = ['dict_operations', 'merge_dict', 'prune_dict', 'multiply_dicts', ]
23.875
67
0.602094
19
191
5.421053
0.473684
0.271845
0.271845
0.349515
0.601942
0.601942
0
0
0
0
0
0
0.303665
191
7
68
27.285714
0.774436
0
0
0
0
0
0.256545
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
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
bb5494d212a707197321c71bdad0900003edabec
1,201
py
Python
sample_synth02/make_config.py
clinfo/DeepKF
ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1
[ "MIT" ]
5
2019-12-19T13:33:36.000Z
2021-06-01T06:08:16.000Z
sample_synth02/make_config.py
clinfo/DeepKF
ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1
[ "MIT" ]
24
2020-03-03T19:40:55.000Z
2021-05-26T15:27:38.000Z
sample_synth02/make_config.py
clinfo/DeepKF
ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1
[ "MIT" ]
1
2019-12-19T13:35:07.000Z
2019-12-19T13:35:07.000Z
import numpy as np import os import json import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt os.makedirs("data",exist_ok=True) np.random.seed(10) filename="config_base.json" o=json.load(open(filename)) print(o) for j in range(10): i=j+1 o['data_train_npy']='data/data_train.n'+str(i)+'.npy' o['data_test_npy']='data/data_test.n'+str(i)+'.npy' path="experiments/result_base_"+str(i)+"/" o["result_path"]=path os.makedirs(path,exist_ok=True) cfg_path="experiments/config/" os.makedirs(cfg_path,exist_ok=True) filename=cfg_path+"/config_base"+str(i)+".json" print(filename) f = open(filename, "w") json.dump(o, f) filename="config_pot.json" o=json.load(open(filename)) print(o) for j in range(10): i=j+1 o['data_train_npy']='data/data_train.n'+str(i)+'.npy' o['data_test_npy']='data/data_test.n'+str(i)+'.npy' path="experiments/result_pot_"+str(i)+"/" o["result_path"]=path os.makedirs(path,exist_ok=True) cfg_path="experiments/config/" os.makedirs(cfg_path,exist_ok=True) filename=cfg_path+"/config_pot"+str(i)+".json" print(filename) f = open(filename, "w") json.dump(o, f)
25.020833
57
0.673605
201
1,201
3.860697
0.228856
0.041237
0.070876
0.041237
0.762887
0.762887
0.762887
0.762887
0.762887
0.762887
0
0.007744
0.139883
1,201
47
58
25.553191
0.743466
0
0
0.65
0
0
0.265221
0.039199
0
0
0
0
0
1
0
false
0
0.125
0
0.125
0.1
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
24a317b44d00bea805342c6410ef02acf942e1c0
2,949
py
Python
app/tests/v1/test_meetups.py
mr-pagani/ADC-Questioner-API
e54f1cb8147d14f3e357c24dc2af2382f60bd1a4
[ "Unlicense" ]
null
null
null
app/tests/v1/test_meetups.py
mr-pagani/ADC-Questioner-API
e54f1cb8147d14f3e357c24dc2af2382f60bd1a4
[ "Unlicense" ]
1
2019-01-15T14:42:36.000Z
2019-01-15T14:42:36.000Z
app/tests/v1/test_meetups.py
mr-pagani/ADC-Questioner-API
e54f1cb8147d14f3e357c24dc2af2382f60bd1a4
[ "Unlicense" ]
null
null
null
import json from .base_test import BaseTestCase class TestMeetups(BaseTestCase): def test_post_meetups(self): with self.client: response = self.client.post( 'api/v1/meetups', data=json.dumps(dict( meetup_id=2, createdOn='12 SEP 2019', location='nairobi', images='img.url', topic='interesting topic', happeningOn='15 SEP 2019', tags='INTERESTING' )), content_type='application/json' ) self.assertEqual(response.status_code, 201) def test_view_meetups(self): with self.client: response = self.client.get('/api/v1/meetups') x = json.loads(response.data) self.assertEqual(response.status_code, 404) self.assertEqual("meetups not found", x["message"]) def test_get_meetup_by_id(self): with self.client: response = self.client.get('/api/v1/meetups/3') x = json.loads(response.data) self.assertEqual(response.status_code, 404) self.assertEqual("Meetup with the given id not found", x["error"]) def test_view_upcoming_meetups(self): with self.client: response = self.client.get('/api/v1/meetups/3') x = json.loads(response.data) self.assertEqual(response.status_code, 404) self.assertEqual("Meetup with the given id not found", x["error"]) def test_delete_meetup(self): with self.client: self.client.post( 'api/v1/meetups', data=json.dumps(dict( meetup_id=2, createdOn='12 SEP 2019', location='nairobi', images='img.url', topic='interesting topic', happeningOn='15 SEP 2019', tags='INTERESTING' )), content_type='application/json' ) response = self.client.delete('/api/v1/meetups/3') res1 = json.loads(response.data) self.assertEqual(response.status_code, 404) self.assertEqual("Meetup with the id provided was not found", res1["error"]) response2 = self.client.delete('/api/v1/meetups/2') res = json.loads(response2.data) self.assertEqual(response2.status_code, 200) self.assertEqual("delete successful", res["message"]) def test_create_rsvp(self): with self.client: response = self.client.post('api/v1/meetups/3/rsvps', data=json.dumps(dict( id= 13, meetup= 1, user= 1, response= 'maybe' )), content_type='application/json') self.assertEqual(response.status_code, 201)
37.329114
88
0.535775
310
2,949
5.006452
0.235484
0.090206
0.061856
0.069588
0.742268
0.742268
0.706186
0.706186
0.701675
0.701675
0
0.036259
0.354697
2,949
78
89
37.807692
0.779296
0
0
0.58209
0
0
0.164802
0.00746
0
0
0
0
0.179104
1
0.089552
false
0
0.029851
0
0.134328
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
24a953522fba9a89dc6593417b426e4fb1e7cd77
197
py
Python
Logic-2/no_teen_sum.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
Logic-2/no_teen_sum.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
Logic-2/no_teen_sum.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
# NO_TEEN_SUM def no_teen_sum(a, b, c): return fix_teen(a) + fix_teen(b) + fix_teen(c) def fix_teen(n): if (n == 15 or n == 16) or n<13 or n>19: return n elif n>12 and n<20: return 0
28.142857
52
0.609137
46
197
2.434783
0.456522
0.25
0.160714
0
0
0
0
0
0
0
0
0.087248
0.243655
197
7
53
28.142857
0.66443
0.055838
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.6
0
0
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
1
0
0
5
24ce2bb821f0dd87e038601fa86a71421eb013fd
241
py
Python
askanna/core/exceptions.py
askanna-io/askanna-python
b6a1dec3b9911888f3d769cef46ce8c2d5cb0dfe
[ "Apache-2.0" ]
1
2021-02-22T15:53:47.000Z
2021-02-22T15:53:47.000Z
askanna/core/exceptions.py
askanna-io/askanna-python
b6a1dec3b9911888f3d769cef46ce8c2d5cb0dfe
[ "Apache-2.0" ]
null
null
null
askanna/core/exceptions.py
askanna-io/askanna-python
b6a1dec3b9911888f3d769cef46ce8c2d5cb0dfe
[ "Apache-2.0" ]
null
null
null
class Error(Exception): pass class GetError(Error): pass class HeadError(Error): pass class PostError(Error): pass class PatchError(Error): pass class PutError(Error): pass class RunError(Error): pass
8.925926
24
0.659751
28
241
5.678571
0.357143
0.339623
0.440252
0
0
0
0
0
0
0
0
0
0.253112
241
26
25
9.269231
0.883333
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
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
7022f0ca1aa21cce0352584f798c251857a2f29c
1,110
py
Python
guniflask/web/__init__.py
jadbin/guniflask
36253a962c056abf34884263c6919b02b921ad9c
[ "MIT" ]
12
2018-09-06T06:14:59.000Z
2021-04-18T06:30:44.000Z
guniflask/web/__init__.py
jadbin/guniflask
36253a962c056abf34884263c6919b02b921ad9c
[ "MIT" ]
null
null
null
guniflask/web/__init__.py
jadbin/guniflask
36253a962c056abf34884263c6919b02b921ad9c
[ "MIT" ]
2
2019-09-08T22:01:26.000Z
2020-08-03T07:23:29.000Z
from .bind_annotation import blueprint from .bind_annotation import delete_route from .bind_annotation import get_route from .bind_annotation import head_route from .bind_annotation import patch_route from .bind_annotation import post_route from .bind_annotation import put_route from .bind_annotation import route from .context import WebApplicationContext from .cors import CorsFilter from .errors import RequestValidationError from .filter_annotation import after_request from .filter_annotation import app_after_request from .filter_annotation import app_before_request from .filter_annotation import app_error_handler from .filter_annotation import before_request from .filter_annotation import error_handler from .request_annotation import CookieValue from .request_annotation import FilePart from .request_annotation import FormValue from .request_annotation import PathVariable from .request_annotation import RequestBody from .request_annotation import RequestHeader from .request_annotation import RequestParam from .request_filter import RequestFilter from .request_filter import RequestFilterChain
41.111111
49
0.882883
142
1,110
6.633803
0.239437
0.356688
0.152866
0.203822
0.357749
0.173036
0.087049
0
0
0
0
0
0.093694
1,110
26
50
42.692308
0.936382
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.038462
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
7074f909c5703484cedced7916b80fe2527f9870
118
py
Python
src/GUM_Dispenser/__init__.py
jrdnfike/GUM_Dispenser
b2655339445af4b1fb328676e2ec9f239dcd6bfc
[ "MIT" ]
null
null
null
src/GUM_Dispenser/__init__.py
jrdnfike/GUM_Dispenser
b2655339445af4b1fb328676e2ec9f239dcd6bfc
[ "MIT" ]
null
null
null
src/GUM_Dispenser/__init__.py
jrdnfike/GUM_Dispenser
b2655339445af4b1fb328676e2ec9f239dcd6bfc
[ "MIT" ]
null
null
null
__all__ = ['GUM_Dispenser_Main', 'GUM_setup_parser', 'GUM_Describe_Source', 'GUM_Generate_NOMNOML', 'GUM_Exceptions']
59
117
0.79661
15
118
5.4
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.059322
118
1
118
118
0.72973
0
0
0
1
0
0.737288
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
56250bc919b313aa73d52cc5859b027f7a03d9eb
18,160
py
Python
aiida/scheduler/plugins/test_pbspro.py
BIGDATA2015-AIIDA-EXTENSION/query_engine
d1cfc7cfe6084854005d2376e3825310c66876b5
[ "MIT", "BSD-3-Clause" ]
null
null
null
aiida/scheduler/plugins/test_pbspro.py
BIGDATA2015-AIIDA-EXTENSION/query_engine
d1cfc7cfe6084854005d2376e3825310c66876b5
[ "MIT", "BSD-3-Clause" ]
null
null
null
aiida/scheduler/plugins/test_pbspro.py
BIGDATA2015-AIIDA-EXTENSION/query_engine
d1cfc7cfe6084854005d2376e3825310c66876b5
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from aiida.scheduler.plugins.pbspro import * import unittest #import logging import uuid text_qstat_f_to_test = """Job Id: 68350.mycluster Job_Name = cell-Qnormal Job_Owner = usernum1@mycluster.cluster job_state = Q queue = Q_express server = mycluster Checkpoint = u ctime = Tue Apr 9 15:01:47 2013 Error_Path = mycluster.cluster:/home/usernum1/scratch/cptest/scaletest/PTOs caletest/testjob.err Hold_Types = n Join_Path = n Keep_Files = n Mail_Points = a mtime = Mon Apr 22 13:13:53 2013 Output_Path = mycluster.cluster:/home/usernum1/scratch/cptest/scaletest/PTO scaletest/testjob.out Priority = 0 qtime = Tue Apr 9 18:26:32 2013 Rerunable = False Resource_List.mpiprocs = 15 Resource_List.ncpus = 240 Resource_List.nodect = 15 Resource_List.place = free Resource_List.select = 15:ncpus=16 Resource_List.walltime = 01:00:00 substate = 10 Variable_List = PBS_O_SYSTEM=Linux,PBS_O_SHELL=/bin/bash, PBS_O_HOME=/home/usernum1,PBS_O_LOGNAME=usernum1, PBS_O_WORKDIR=/home/usernum1/scratch/cptest/scaletest/PTOscaletest, PBS_O_LANG=en_US.UTF-8, PBS_O_PATH=/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/loc al/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/b in:/opt/software/python/3.3.0/bin:/opt/software/bin, PBS_O_MAIL=/var/spool/mail/usernum1,PBS_O_QUEUE=P_share_queue, PBS_O_HOST=mycluster.cluster comment = Not Running: Node is in an ineligible state: offline etime = Tue Apr 9 18:26:32 2013 Submit_arguments = job-PTO64cell-Qnormal.6.15.1.64.4 project = _pbs_project_default Job Id: 68351.mycluster Job_Name = cell-Qnormal Job_Owner = usernum1@mycluster.cluster job_state = Q queue = Q_express server = mycluster Checkpoint = u ctime = Tue Apr 9 15:01:47 2013 Error_Path = mycluster.cluster:/home/usernum1/scratch/cptest/scaletest/PTOs caletest/testjob.err Hold_Types = n Join_Path = n Keep_Files = n Mail_Points = a mtime = Mon Apr 22 13:13:53 2013 Output_Path = mycluster.cluster:/home/usernum1/scratch/cptest/scaletest/PTO scaletest/testjob.out Priority = 0 qtime = Tue Apr 9 18:26:32 2013 Rerunable = False Resource_List.mpiprocs = 15 Resource_List.ncpus = 240 Resource_List.nodect = 15 Resource_List.place = free Resource_List.select = 15:ncpus=16 Resource_List.walltime = 01:00:00 substate = 10 Variable_List = PBS_O_SYSTEM=Linux,PBS_O_SHELL=/bin/bash, PBS_O_HOME=/home/usernum1,PBS_O_LOGNAME=usernum1, PBS_O_WORKDIR=/home/usernum1/scratch/cptest/scaletest/PTOscaletest, PBS_O_LANG=en_US.UTF-8, PBS_O_PATH=/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/loc al/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/b in:/opt/software/python/3.3.0/bin:/opt/software/bin, PBS_O_MAIL=/var/spool/mail/usernum1,PBS_O_QUEUE=P_share_queue, PBS_O_HOST=mycluster.cluster comment = Not Running: Node is in an ineligible state: offline etime = Tue Apr 9 18:26:32 2013 Submit_arguments = job-PTO64cell-Qnormal.6.15.1.64.8 project = _pbs_project_default Job Id: 69301.mycluster Job_Name = Cu-dbp Job_Owner = user02@mycluster.cluster resources_used.cpupercent = 6384 resources_used.cput = 4090:56:03 resources_used.mem = 13378420kb resources_used.ncpus = 64 resources_used.vmem = 9866188kb resources_used.walltime = 64:26:16 job_state = R queue = P_lsu server = mycluster Account_Name = lsu Checkpoint = u ctime = Wed Apr 10 17:10:29 2013 depend = afterok:69299.mycluster@mycluster.cluster, beforeok:69302.mycluster@mycluster.cluster Error_Path = mycluster.cluster:/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN7/C u-dbp.e69301 exec_host = b141/0*16+b142/0*16+b143/0*16+b144/0*16 exec_vnode = (b141:ncpus=16)+(b142:ncpus=16)+(b143:ncpus=16)+(b144:ncpus=16 ) Hold_Types = n Join_Path = oe Keep_Files = n Mail_Points = a mtime = Sat Apr 20 01:37:01 2013 Output_Path = mycluster.cluster:/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN7/ Cu-dbp.o69301 Priority = 0 qtime = Wed Apr 10 17:10:29 2013 Rerunable = False Resource_List.mpiprocs = 4 Resource_List.ncpus = 64 Resource_List.nodect = 4 Resource_List.place = excl Resource_List.select = 4:ncpus=16 Resource_List.walltime = 72:00:00 stime = Sat Apr 20 01:36:59 2013 session_id = 118473 Shell_Path_List = /bin/tcsh jobdir = /home/user02 substate = 42 Variable_List = SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass, PERL_BADLANG=0,KDE_IS_PRELINKED=1,PBS_O_HOME=/home/user02, module=() { eval `/usr/bin/modulecmd bash $*`,}, LESSOPEN=|/usr/bin/lesspipe.sh %s,PBS_O_LOGNAME=user02, SSH_CLIENT=128.178.54.94 46714 22,CVS_RSH=ssh,PBS_O_LANG=C,USER=user02, HOME=/home/user02,LIBGL_ALWAYS_INDIRECT=yes, PATH=/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin :/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/bin:/op t/software/python/3.3.0/bin:/opt/software/bin, LD_LIBRARY_PATH=/opt/software/python/3.3.0/lib, SSH_CONNECTION=128.178.54.94 46714 128.178.209.70 22,LANG=C, QTLIB=/usr/lib64/qt-3.3/lib,TERM=xterm,SHELL=/bin/bash, QTINC=/usr/lib64/qt-3.3/include,G_BROKEN_FILENAMES=1,HISTSIZE=1000, PBS_O_WORKDIR=/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN7, PBS_O_PATH=/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/loc al/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/b in:/opt/software/python/3.3.0/bin:/opt/software/bin, MANPATH=/opt/xcat/share/man:,XCATROOT=/opt/xcat, MODULESHOME=/usr/share/Modules,PBS_O_SYSTEM=Linux,MSM_PRODUCT=MSM, HOST=mycluster,MAIL=/var/spool/mail/user02, PBS_O_MAIL=/var/spool/mail/user02,_=/opt/pbs/default/bin/qsub, MODULEPATH=/etc/modulefiles:/opt/software/modulefiles:/opt/software/cs e-software/modulefiles,KDEDIRS=/usr,PBS_O_SHELL=/bin/bash, SSH_TTY=/dev/pts/55,OLDPWD=/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN6, LOADEDMODULES=,HISTCONTROL=ignoredups,SHLVL=1, PWD=/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN7,HOSTNAME=mycluster, MSM_HOME=/usr/local/MegaRAID Storage Manager,LOGNAME=user02, PBS_O_HOST=mycluster.cluster comment = Job run at Sat Apr 20 at 01:36 on (b141:ncpus=16)+(b142:ncpus=16) +(b143:ncpus=16)+(b144:ncpus=16) etime = Sat Apr 20 01:36:59 2013 Submit_arguments = job.sh project = _pbs_project_default Job Id: 69302.mycluster Job_Name = Cu-dbp Job_Owner = user02@mycluster.cluster job_state = H queue = P_lsu server = mycluster Account_Name = lsu Checkpoint = u ctime = Wed Apr 10 17:11:21 2013 depend = afterok:69301.mycluster@mycluster.cluster Error_Path = mycluster.cluster:/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN8/C u-dbp.e69302 Hold_Types = s Join_Path = oe Keep_Files = n Mail_Points = a mtime = Wed Apr 10 17:11:21 2013 Output_Path = mycluster.cluster:/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN8/ Cu-dbp.o69302 Priority = 0 qtime = Wed Apr 10 17:11:21 2013 Rerunable = False Resource_List.mpiprocs = 4 Resource_List.ncpus = 64 Resource_List.nodect = 4 Resource_List.place = excl Resource_List.select = 4:ncpus=16 Resource_List.walltime = 72:00:00 Shell_Path_List = /bin/tcsh substate = 22 Variable_List = SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass, PERL_BADLANG=0,KDE_IS_PRELINKED=1,PBS_O_HOME=/home/user02, module=() { eval `/usr/bin/modulecmd bash $*`,}, LESSOPEN=|/usr/bin/lesspipe.sh %s,PBS_O_LOGNAME=user02, SSH_CLIENT=128.178.54.94 46714 22,CVS_RSH=ssh,PBS_O_LANG=C,USER=user02, HOME=/home/user02,LIBGL_ALWAYS_INDIRECT=yes, PATH=/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin :/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/bin:/op t/software/python/3.3.0/bin:/opt/software/bin, LD_LIBRARY_PATH=/opt/software/python/3.3.0/lib, SSH_CONNECTION=128.178.54.94 46714 128.178.209.70 22,LANG=C, QTLIB=/usr/lib64/qt-3.3/lib,TERM=xterm,SHELL=/bin/bash, QTINC=/usr/lib64/qt-3.3/include,G_BROKEN_FILENAMES=1,HISTSIZE=1000, PBS_O_WORKDIR=/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN8, PBS_O_PATH=/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/loc al/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/b in:/opt/software/python/3.3.0/bin:/opt/software/bin, MANPATH=/opt/xcat/share/man:,XCATROOT=/opt/xcat, MODULESHOME=/usr/share/Modules,PBS_O_SYSTEM=Linux,MSM_PRODUCT=MSM, HOST=mycluster,MAIL=/var/spool/mail/user02, PBS_O_MAIL=/var/spool/mail/user02,_=/opt/pbs/default/bin/qsub, MODULEPATH=/etc/modulefiles:/opt/software/modulefiles:/opt/software/cs e-software/modulefiles,KDEDIRS=/usr,PBS_O_SHELL=/bin/bash, SSH_TTY=/dev/pts/55,OLDPWD=/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN7, LOADEDMODULES=,HISTCONTROL=ignoredups,SHLVL=1, PWD=/scratch/user02/QMMM-CuPhens/dbp/NOSE/RUN8,HOSTNAME=mycluster, MSM_HOME=/usr/local/MegaRAID Storage Manager,LOGNAME=user02, PBS_O_HOST=mycluster.cluster Submit_arguments = job.sh project = _pbs_project_default Job Id: 74164.mycluster Job_Name = u-100-l-96.job Job_Owner = user3@mycluster.cluster resources_used.cpupercent = 3889 resources_used.cput = 343:11:42 resources_used.mem = 1824176kb resources_used.ncpus = 32 resources_used.vmem = 3796376kb resources_used.walltime = 10:45:13 job_state = R queue = Q_normal server = mycluster Checkpoint = u ctime = Fri Apr 12 15:21:55 2013 depend = afterany:74163.mycluster@mycluster.cluster, beforeany:74165.mycluster@mycluster.cluster Error_Path = mycluster.cluster:/scratch/user3/ubiquitin/100gL/starting-from -left/production/u-100-l-96.job.e74164 exec_host = b270/0*16+b275/0*16 exec_vnode = (b270:ncpus=16)+(b275:ncpus=16) Hold_Types = n Join_Path = oe Keep_Files = n Mail_Points = abe Mail_Users = enrico.user3@epfl.ch mtime = Mon Apr 22 07:17:36 2013 Output_Path = mycluster.cluster:/scratch/user3/ubiquitin/100gL/starting-fro m-left/production/u-100-l-96.job.o74164 Priority = 0 qtime = Fri Apr 12 15:21:55 2013 Rerunable = False Resource_List.mpiprocs = 32 Resource_List.ncpus = 32 Resource_List.nodect = 2 Resource_List.place = excl Resource_List.select = 2:ncpus=16:mpiprocs=16 Resource_List.walltime = 24:00:00 stime = Mon Apr 22 07:17:36 2013 session_id = 14147 jobdir = /home/user3 substate = 42 Variable_List = PBS_O_SYSTEM=Linux,PBS_O_SHELL=/bin/bash, PBS_O_HOME=/home/user3,PBS_O_LOGNAME=user3, PBS_O_WORKDIR=/scratch/user3/ubiquitin/100gL/starting-from-left/produc tion,PBS_O_LANG=en_US.utf8, PBS_O_PATH=/opt/pbs/default/sbin/:/home/bovigny/bin:/opt/xcat/bin:/opt /xcat/sbin:/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/loca l/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/bi n:/opt/software/python/3.3.0/bin:/opt/software/bin:/opt/pbs/default/bin :/opt/software/python/3.3.0/bin:/opt/software/bin, PBS_O_MAIL=/var/spool/mail/user3,PBS_O_QUEUE=P_share_queue, PBS_O_HOST=mycluster.cluster comment = Job run at Mon Apr 22 at 07:17 on (b270:ncpus=16)+(b275:ncpus=16) etime = Mon Apr 22 07:17:34 2013 Submit_arguments = -W depend=afterany:74163 u-100-l-96.job project = _pbs_project_default Job Id: 74165.mycluster Job_Name = u-100-l-97.job Job_Owner = user3@mycluster.cluster job_state = H queue = Q_normal server = mycluster Checkpoint = u ctime = Fri Apr 12 15:22:01 2013 depend = afterany:74164.mycluster@mycluster.cluster, beforeany:74166.mycluster@mycluster.cluster Error_Path = mycluster.cluster:/scratch/user3/ubiquitin/100gL/starting-from -left/production/u-100-l-97.job.e74165 Hold_Types = s Join_Path = oe Keep_Files = n Mail_Points = abe Mail_Users = enrico.user3@epfl.ch mtime = Fri Apr 12 15:22:07 2013 Output_Path = mycluster.cluster:/scratch/user3/ubiquitin/100gL/starting-fro m-left/production/u-100-l-97.job.o74165 Priority = 0 qtime = Fri Apr 12 15:22:01 2013 Rerunable = False Resource_List.mpiprocs = 32 Resource_List.ncpus = 32 Resource_List.nodect = 2 Resource_List.place = excl Resource_List.select = 2:ncpus=16:mpiprocs=16 Resource_List.walltime = 24:00:00 substate = 22 Variable_List = PBS_O_SYSTEM=Linux,PBS_O_SHELL=/bin/bash, PBS_O_HOME=/home/user3,PBS_O_LOGNAME=user3, PBS_O_WORKDIR=/scratch/user3/ubiquitin/100gL/starting-from-left/produc tion,PBS_O_LANG=en_US.utf8, PBS_O_PATH=/opt/pbs/default/sbin/:/home/bovigny/bin:/opt/xcat/bin:/opt /xcat/sbin:/opt/xcat/bin:/opt/xcat/sbin:/usr/lib64/qt-3.3/bin:/usr/loca l/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/pbs/default/bi n:/opt/software/python/3.3.0/bin:/opt/software/bin:/opt/pbs/default/bin :/opt/software/python/3.3.0/bin:/opt/software/bin, PBS_O_MAIL=/var/spool/mail/user3,PBS_O_QUEUE=P_share_queue, PBS_O_HOST=mycluster.cluster Submit_arguments = -W depend=afterany:74164 u-100-l-97.job project = _pbs_project_default """ __copyright__ = u"Copyright (c), 2015, ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE (Theory and Simulation of Materials (THEOS) and National Centre for Computational Design and Discovery of Novel Materials (NCCR MARVEL)), Switzerland and ROBERT BOSCH LLC, USA. All rights reserved." __license__ = "MIT license, see LICENSE.txt file" __version__ = "0.4.0" __contributors__ = "Andrea Cepellotti, Giovanni Pizzi, Marco Dorigo" class TestParserQstat(unittest.TestCase): """ Tests to verify if teh function _parse_joblist_output behave correctly The tests is done parsing a string defined above, to be used offline """ def test_parse_common_joblist_output(self): """ Test whether _parse_joblist can parse the qstat -f output """ s = PbsproScheduler() retval = 0 stdout = text_qstat_f_to_test stderr = '' job_list = s._parse_joblist_output(retval, stdout, stderr) # The parameters are hard coded in the text to parse job_on_cluster = 6 job_parsed = len(job_list) self.assertEquals(job_parsed, job_on_cluster) job_running = 2 job_running_parsed = len([ j for j in job_list if j.job_state \ and j.job_state == job_states.RUNNING ]) self.assertEquals(job_running,job_running_parsed) job_held = 2 job_held_parsed = len([ j for j in job_list if j.job_state \ and j.job_state == job_states.QUEUED_HELD ]) self.assertEquals(job_held,job_held_parsed) job_queued = 2 job_queued_parsed = len([ j for j in job_list if j.job_state \ and j.job_state == job_states.QUEUED ]) self.assertEquals(job_queued,job_queued_parsed) running_users = ['user02','user3'] parsed_running_users = [ j.job_owner for j in job_list if j.job_state \ and j.job_state == job_states.RUNNING ] self.assertEquals( set(running_users) , set(parsed_running_users) ) running_jobs = ['69301.mycluster','74164.mycluster'] parsed_running_jobs = [ j.job_id for j in job_list if j.job_state \ and j.job_state == job_states.RUNNING ] self.assertEquals( set(running_jobs) , set(parsed_running_jobs) ) for j in job_list: if j.allocated_machines: num_machines = 0 num_cpus = 0 for n in j.allocated_machines: num_machines += 1 num_cpus += n.num_cpus self.assertTrue( j.num_machines==num_machines ) self.assertTrue( j.num_cpus==num_cpus ) # TODO : parse the env_vars # TODO: WHEN WE USE THE CORRECT ERROR MANAGEMENT, REIMPLEMENT THIS TEST # def test_parse_with_error_retval(self): # """ # The qstat -f command has received a retval != 0 # """ # s = PbsproScheduler() # retval = 1 # stdout = text_qstat_f_to_test # stderr = '' # # Disable logging to avoid excessive output during test # logging.disable(logging.ERROR) # with self.assertRaises(SchedulerError): # job_list = s._parse_joblist_output(retval, stdout, stderr) # # Reset logging level # logging.disable(logging.NOTSET) # def test_parse_with_error_stderr(self): # """ # The qstat -f command has received a stderr # """ # s = PbsproScheduler() # retval = 0 # stdout = text_qstat_f_to_test # stderr = 'A non empty error message' # # TODO : catch the logging error # job_list = s._parse_joblist_output(retval, stdout, stderr) # # print s._logger._log, dir(s._logger._log),'!!!!' class TestSubmitScript(unittest.TestCase): def test_submit_script(self): """ """ from aiida.scheduler.datastructures import JobTemplate s = PbsproScheduler() job_tmpl = JobTemplate() job_tmpl.argv = ["mpirun", "-np", "23", "pw.x", "-npool", "1"] job_tmpl.stdin_name = 'aiida.in' job_tmpl.job_resource = s.create_job_resource(num_machines=1, num_mpiprocs_per_machine=1) job_tmpl.uuid = str(uuid.uuid4()) job_tmpl.max_wallclock_seconds = 24 * 3600 submit_script_text = s.get_submit_script(job_tmpl) self.assertTrue( '#PBS -r n' in submit_script_text ) self.assertTrue( submit_script_text.startswith('#!/bin/bash') ) self.assertTrue( '#PBS -l walltime=24:00:00' in submit_script_text ) self.assertTrue( '#PBS -l select=1' in submit_script_text ) self.assertTrue( "'mpirun' '-np' '23' 'pw.x' '-npool' '1'" + \ " < 'aiida.in'" in submit_script_text )
40.626398
278
0.691244
2,797
18,160
4.314623
0.169825
0.019224
0.015081
0.010938
0.767981
0.741631
0.713126
0.683046
0.677743
0.664899
0
0.075775
0.188271
18,160
446
279
40.717489
0.742894
0.07913
0
0.638522
0
0.118734
0.813281
0.436839
0
0
0
0.002242
0.034301
1
0.005277
false
0.005277
0.010554
0
0.021108
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
563a4921fb61340d4b8b99bfe1684f0fe71aff68
105
py
Python
botaclan/helpers/lists.py
bataclanofficial/botaclan
93f8ccab4f29c50a395a588b7779431eab8625e8
[ "Apache-2.0" ]
null
null
null
botaclan/helpers/lists.py
bataclanofficial/botaclan
93f8ccab4f29c50a395a588b7779431eab8625e8
[ "Apache-2.0" ]
null
null
null
botaclan/helpers/lists.py
bataclanofficial/botaclan
93f8ccab4f29c50a395a588b7779431eab8625e8
[ "Apache-2.0" ]
null
null
null
from typing import List, T def get_first_item(items: List[T]) -> T: return next(iter(items), None)
17.5
40
0.685714
18
105
3.888889
0.777778
0.142857
0
0
0
0
0
0
0
0
0
0
0.180952
105
5
41
21
0.813953
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
0
0
0
5
568fe2ca1c5825bb9a77cda8a3a20df6bfce2b30
2,402
py
Python
src/titlescreen.py
bl-ackrain/Jetpack-Pokitto
240a9afea7a2c91cd1d08184b615a3dfe5c24645
[ "MIT" ]
null
null
null
src/titlescreen.py
bl-ackrain/Jetpack-Pokitto
240a9afea7a2c91cd1d08184b615a3dfe5c24645
[ "MIT" ]
null
null
null
src/titlescreen.py
bl-ackrain/Jetpack-Pokitto
240a9afea7a2c91cd1d08184b615a3dfe5c24645
[ "MIT" ]
null
null
null
# titlescreen.py import upygame logoPixels = b'\ \x99\x99\x99\x98\x80\x00\x00\x99\x99\x88\x80\x00\x99\x99\x98\x88\x80\x09\x99\x98\x88\x80\x09\x99\x88\x88\x00\x99\x99\x88\x80\x09\x99\x88\x09\ \x01\x11\x11\x19\x88\x00\x00\x91\x11\x98\x88\x99\x11\x11\x19\x98\x88\x99\x11\x99\x88\x88\x91\x11\x98\x88\x89\x11\x19\x98\x88\x91\x18\x88\x99\ \x09\x18\x81\x11\x88\x80\x09\x11\x11\x19\x89\x11\x11\x11\x11\x19\x89\x91\x11\x19\x98\x89\x11\x11\x19\x88\x91\x11\x11\x99\x89\x11\x98\x89\x99\ \x00\x90\x09\x11\x98\x88\x91\x11\x99\x17\x89\x19\x99\x19\x99\x19\x89\x11\x99\x11\x98\x91\x11\x91\x11\x98\x91\x19\x91\x19\x89\x19\x88\x99\x19\ \x00\x00\x09\x91\x19\x89\x11\x98\x88\xc9\x79\x98\x89\x19\x88\x99\x89\x19\x88\x91\x98\x91\x19\x89\x11\x98\x91\x99\x89\x99\x89\x19\x89\x91\x19\ \x00\x00\x00\x91\x19\x89\x11\x98\x88\xf7\x4c\x74\x79\x19\x88\x88\x89\x19\x88\x91\x98\x91\x99\x89\x91\x98\x91\x98\x88\x80\x09\x19\x89\x11\x98\ \x00\x00\x00\x09\x19\x89\x11\x98\x94\x7f\x4f\x4c\x49\x19\x88\xc4\xc9\x19\x99\x91\x98\x91\x89\x49\x81\x98\x91\x98\x4c\x44\xc9\x19\x89\x19\x88\ \x00\x00\x00\x09\x19\x89\x11\x11\x19\x14\x17\x77\xc9\x19\x88\x47\x49\x11\x11\x19\x87\x91\x88\x98\x81\x98\x91\x98\x47\x44\x49\x19\x99\x18\x80\ \x00\x09\x88\x89\x19\x89\x11\x11\x1f\x1c\x44\xcc\x49\x19\x88\x44\x49\x11\x99\x98\x84\x91\x11\x11\x11\x98\x91\x98\x44\x44\x49\x11\x11\x18\x00\ \x00\x99\x88\x89\x19\x89\x11\x98\x99\x77\xc7\x47\x49\x19\x88\x74\x79\x19\x88\x8c\x47\x91\x94\xc4\x91\x98\x91\x98\xc4\x44\x79\x19\x98\x19\x80\ \x09\x11\x88\x89\x19\x89\x11\x98\x88\x8f\x98\x88\x09\x19\x88\x80\x09\x19\x88\x80\x00\x91\x98\x80\x91\x98\x91\x98\x88\x00\x09\x19\x89\x19\x88\ \x91\x19\x88\x89\x19\x89\x11\x98\x88\x79\x98\x88\x09\x19\x88\x80\x09\x19\x88\x80\x00\x91\x98\x80\x91\x98\x91\x98\x88\x00\x09\x19\x89\x11\x98\ \x91\x98\x88\x91\x19\x89\x11\x98\x8c\x91\x98\x88\x09\x19\x88\x80\x09\x19\x88\x80\x00\x91\x98\x80\x91\x98\x91\x98\x88\x89\x89\x19\x88\x91\x19\ \x91\x19\x99\x11\x98\x80\x91\x19\x99\x11\x98\x88\x09\x19\x88\x80\x09\x11\x98\x80\x00\x91\x98\x80\x91\x98\x91\x19\x99\x99\x89\x19\x88\x89\x19\ \x09\x11\x11\x19\x88\x00\x09\x11\x11\x19\x88\x00\x91\x11\x98\x80\x09\x11\x19\x88\x00\x91\x19\x89\x11\x98\x09\x11\x11\x19\x88\x91\x98\x80\x99\ \x00\x99\x99\x98\x80\x00\x00\x99\x99\x98\x80\x09\x99\x99\x99\x88\x89\x99\x99\x98\x80\x99\x99\x89\x99\x98\x00\x99\x99\x98\x88\x09\x99\x88\x09\ ' logo = upygame.surface.Surface(70, 16, logoPixels);
96.08
142
0.731057
573
2,402
3.064572
0.082024
0.095672
0.076879
0.075171
0.464692
0.319476
0.211845
0.15205
0.111048
0.111048
0
0.470162
0.023314
2,402
24
143
100.083333
0.278346
0.005828
0
0
0
0.8
0
0
0
1
0
0
0
1
0
false
0
0.05
0
0.05
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
5
5693d714eafd06865a07dedef3e3c8ed43436124
263
py
Python
config_db.py
hung96ad/predict_price_cryptocurrencies
c13a9560045c6c028c26cacda1d089cd21246aaa
[ "Unlicense" ]
4
2018-11-09T18:08:04.000Z
2020-02-13T15:47:33.000Z
config_db.py
hung96ad/predict_price_cryptocurrencies
c13a9560045c6c028c26cacda1d089cd21246aaa
[ "Unlicense" ]
null
null
null
config_db.py
hung96ad/predict_price_cryptocurrencies
c13a9560045c6c028c26cacda1d089cd21246aaa
[ "Unlicense" ]
5
2019-05-28T11:14:58.000Z
2022-03-16T08:34:16.000Z
try: import mysql.connector as mysql except : import MySQLdb as mysql def config_db(): return mysql.connect(user='root', password='', host='localhost', database='coin')
26.3
68
0.48289
24
263
5.25
0.791667
0.111111
0
0
0
0
0
0
0
0
0
0
0.425856
263
9
69
29.222222
0.834437
0
0
0
0
0
0.064639
0
0
0
0
0
0
1
0.125
true
0.125
0.25
0.125
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
1
0
0
0
5
56945336d8bb03130acbfab0a81f5207b0b6b6c3
19,334
py
Python
tests/autodiff_test.py
GIS-PuppetMaster/TENSILE
e19f973bb30fba69a23644389c82a4471ee5a241
[ "MIT" ]
null
null
null
tests/autodiff_test.py
GIS-PuppetMaster/TENSILE
e19f973bb30fba69a23644389c82a4471ee5a241
[ "MIT" ]
null
null
null
tests/autodiff_test.py
GIS-PuppetMaster/TENSILE
e19f973bb30fba69a23644389c82a4471ee5a241
[ "MIT" ]
1
2020-09-27T07:27:47.000Z
2020-09-27T07:27:47.000Z
from pycode.tinyflow import autodiff as ad import numpy as np from pycode.tinyflow import ndarray from pycode.tinyflow import TrainExecute from pycode.tinyflow import train def test_identity(): x2 = ad.Variable(name="x2") y = x2 grad_x2, = ad.gradients(y, [x2]) executor = ad.Executor([y, grad_x2]) x2_val = 2 * np.ones(3) y_val, grad_x2_val = executor.run(feed_dict={x2: x2_val}) assert isinstance(y, ad.Node) assert np.array_equal(y_val, x2_val) assert np.array_equal(grad_x2_val, np.ones_like(x2_val)) def test_add_by_const(): x2 = ad.Variable(name="x2") y = 5 + x2 grad_x2, = ad.gradients(y, [x2]) executor = ad.Executor([y, grad_x2]) x2_val = 2 * np.ones(3) y_val, grad_x2_val = executor.run(feed_dict={x2: x2_val}) assert isinstance(y, ad.Node) assert np.array_equal(y_val, x2_val + 5) assert np.array_equal(grad_x2_val, np.ones_like(x2_val)) def test_mul_by_const(): x2 = ad.Variable(name="x2") y = 5 * x2 grad_x2, = ad.gradients(y, [x2]) executor = ad.Executor([y, grad_x2]) x2_val = 2 * np.ones(3) y_val, grad_x2_val = executor.run(feed_dict={x2: x2_val}) assert isinstance(y, ad.Node) assert np.array_equal(y_val, x2_val * 5) assert np.array_equal(grad_x2_val, np.ones_like(x2_val) * 5) def test_add_two_vars(): x2 = ad.Variable(name="x2") x3 = ad.Variable(name="x3") y = x2 + x3 grad_x2, grad_x3 = ad.gradients(y, [x2, x3]) executor = ad.Executor([y, grad_x2, grad_x3]) x2_val = 2 * np.ones(3) x3_val = 3 * np.ones(3) y_val, grad_x2_val, grad_x3_val = executor.run(feed_dict={x2: x2_val, x3: x3_val}) assert isinstance(y, ad.Node) assert np.array_equal(y_val, x2_val + x3_val) assert np.array_equal(grad_x2_val, np.ones_like(x2_val)) assert np.array_equal(grad_x3_val, np.ones_like(x3_val)) def test_mul_two_vars(): x2 = ad.Variable(name="x2") x3 = ad.Variable(name="x3") y = x2 * x3 grad_x2, grad_x3 = ad.gradients(y, [x2, x3]) executor = ad.Executor([y, grad_x2, grad_x3]) x2_val = 2 * np.ones(3) x3_val = 3 * np.ones(3) y_val, grad_x2_val, grad_x3_val = executor.run(feed_dict={x2: x2_val, x3: x3_val}) assert isinstance(y, ad.Node) assert np.array_equal(y_val, x2_val * x3_val) assert np.array_equal(grad_x2_val, x3_val) assert np.array_equal(grad_x3_val, x2_val) def test_add_mul_mix_1(): x1 = ad.Variable(name="x1") x2 = ad.Variable(name="x2") x3 = ad.Variable(name="x3") y = x1 + x2 * x3 * x1 grad_x1, grad_x2, grad_x3 = ad.gradients(y, [x1, x2, x3]) executor = ad.Executor([y, grad_x1, grad_x2, grad_x3]) x1_val = 1 * np.ones(3) x2_val = 2 * np.ones(3) x3_val = 3 * np.ones(3) y_val, grad_x1_val, grad_x2_val, grad_x3_val = executor.run(feed_dict={x1: x1_val, x2: x2_val, x3: x3_val}) assert isinstance(y, ad.Node) assert np.array_equal(y_val, x1_val + x2_val * x3_val) assert np.array_equal(grad_x1_val, np.ones_like(x1_val) + x2_val * x3_val) assert np.array_equal(grad_x2_val, x3_val * x1_val) assert np.array_equal(grad_x3_val, x2_val * x1_val) def test_add_mul_mix_2(): x1 = ad.Variable(name="x1") x2 = ad.Variable(name="x2") x3 = ad.Variable(name="x3") x4 = ad.Variable(name="x4") y = x1 + x2 * x3 * x4 grad_x1, grad_x2, grad_x3, grad_x4 = ad.gradients(y, [x1, x2, x3, x4]) executor = ad.Executor([y, grad_x1, grad_x2, grad_x3, grad_x4]) x1_val = 1 * np.ones(3) x2_val = 2 * np.ones(3) x3_val = 3 * np.ones(3) x4_val = 4 * np.ones(3) y_val, grad_x1_val, grad_x2_val, grad_x3_val, grad_x4_val = executor.run( feed_dict={x1: x1_val, x2: x2_val, x3: x3_val, x4: x4_val} ) assert isinstance(y, ad.Node) assert np.array_equal(y_val, x1_val + x2_val * x3_val * x4_val) assert np.array_equal(grad_x1_val, np.ones_like(x1_val)) assert np.array_equal(grad_x2_val, x3_val * x4_val) assert np.array_equal(grad_x3_val, x2_val * x4_val) assert np.array_equal(grad_x4_val, x2_val * x3_val) def test_add_mul_mix_3(): x2 = ad.Variable(name="x2") x3 = ad.Variable(name="x3") z = x2 * x2 + x2 + x3 + 3 y = z * z + x3 grad_x2, grad_x3 = ad.gradients(y, [x2, x3]) executor = ad.Executor([y, grad_x2, grad_x3]) x2_val = 2 * np.ones(3) x3_val = 3 * np.ones(3) y_val, grad_x2_val, grad_x3_val = executor.run(feed_dict={x2: x2_val, x3: x3_val}) z_val = x2_val * x2_val + x2_val + x3_val + 3 expected_yval = z_val * z_val + x3_val expected_grad_x2_val = 2 * (x2_val * x2_val + x2_val + x3_val + 3) * (2 * x2_val + 1) expected_grad_x3_val = 2 * (x2_val * x2_val + x2_val + x3_val + 3) + 1 assert isinstance(y, ad.Node) assert np.array_equal(y_val, expected_yval) assert np.array_equal(grad_x2_val, expected_grad_x2_val) assert np.array_equal(grad_x3_val, expected_grad_x3_val) def test_grad_of_grad(): x2 = ad.Variable(name="x2") x3 = ad.Variable(name="x3") y = x2 * x2 + x2 * x3 grad_x2, grad_x3 = ad.gradients(y, [x2, x3]) grad_x2_x2, grad_x2_x3 = ad.gradients(grad_x2, [x2, x3]) executor = ad.Executor([y, grad_x2, grad_x3, grad_x2_x2, grad_x2_x3]) x2_val = 2 * np.ones(3) x3_val = 3 * np.ones(3) y_val, grad_x2_val, grad_x3_val, grad_x2_x2_val, grad_x2_x3_val = executor.run( feed_dict={x2: x2_val, x3: x3_val} ) expected_yval = x2_val * x2_val + x2_val * x3_val expected_grad_x2_val = 2 * x2_val + x3_val expected_grad_x3_val = x2_val expected_grad_x2_x2_val = 2 * np.ones_like(x2_val) expected_grad_x2_x3_val = 1 * np.ones_like(x2_val) assert isinstance(y, ad.Node) assert np.array_equal(y_val, expected_yval) assert np.array_equal(grad_x2_val, expected_grad_x2_val) assert np.array_equal(grad_x3_val, expected_grad_x3_val) assert np.array_equal(grad_x2_x2_val, expected_grad_x2_x2_val) assert np.array_equal(grad_x2_x3_val, expected_grad_x2_x3_val) def test_matmul_two_vars(): x2 = ad.Variable(name="x2") x3 = ad.Variable(name="x3") y = ad.matmul_op(x2, x3) grad_x2, grad_x3 = ad.gradients(y, [x2, x3]) executor = ad.Executor([y, grad_x2, grad_x3]) x2_val = np.array([[1, 2], [3, 4], [5, 6]]) # 3x2 x3_val = np.array([[7, 8, 9], [10, 11, 12]]) # 2x3 y_val, grad_x2_val, grad_x3_val = executor.run(feed_dict={x2: x2_val, x3: x3_val}) expected_yval = np.matmul(x2_val, x3_val) expected_grad_x2_val = np.matmul(np.ones_like(expected_yval), np.transpose(x3_val)) expected_grad_x3_val = np.matmul(np.transpose(x2_val), np.ones_like(expected_yval)) assert isinstance(y, ad.Node) assert np.array_equal(y_val, expected_yval) assert np.array_equal(grad_x2_val, expected_grad_x2_val) assert np.array_equal(grad_x3_val, expected_grad_x3_val) def test_exp(): x1 = ad.Variable("x1") x2 = ad.exp_op(x1) x3 = x2 + 1 x4 = x2 * x3 x1_grad, = ad.gradients(x4, [x1]) executor = ad.Executor([x4]) x1_val = 1 x4_val, x1_grad = executor.run(feed_dict={x1: x1_val}) print(x4_val) print(x1_grad) def test_exp_grad(): x = ad.Variable("x") y = ad.exp_op(x) x_grad, = ad.gradients(y, [x]) executor = ad.Executor([y, x_grad]) x_val = 1 y_val, x_grad_val = executor.run(feed_dict={x: x_val}) print(y_val) print(x_grad_val) def test_lr(): W = ad.Variable(name="W") b = ad.Variable(name="b") X = ad.Variable(name="X") y_ = ad.Variable(name="y_") ctx = ndarray.gpu(0) # ini x_val = np.linspace(0,1,100).reshape((100,1)) y_val = x_val + 0.5 W_val = np.array([[0.1]]) b_val = np.array([0.1]) x_val = ndarray.array(x_val, ctx) W_val = ndarray.array(W_val, ctx) b_val = ndarray.array(b_val, ctx) y_val = ndarray.array(y_val, ctx) z = ad.matmul_op(X, W) # z.shape = (100,1) # b.shape = (1,1) y = z + ad.broadcastto_op(b, z) # y = (100,1) y = ad.fullyactivation_forward_op(y,"NCHW","relu") loss = ad.matmul_op(y + (-1)*y_, y + (-1)*y_, trans_A=True) * (1/100) # loss = ad.softmaxcrossentropy_op(y, y_) grad_W, grad_b = ad.gradients(loss, [W, b]) executor = ad.Executor([loss, grad_W, grad_b],ctx) aph = 1e-6 for i in range(100): loss_val, grad_W_val ,grad_b_val = executor.run(feed_dict={X: x_val,b: b_val,W: W_val,y_:y_val}) grad_W_val = grad_W_val.asnumpy() W_val = W_val.asnumpy() W_val = W_val - aph * grad_W_val W_val = ndarray.array(W_val, ctx) grad_b_val = grad_b_val.asnumpy() b_val = b_val.asnumpy() b_val = b_val - aph * grad_b_val b_val = ndarray.array(b_val, ctx) print(W_val.asnumpy(), b_val.asnumpy()) # executor = ad.Executor([y]) # res = executor.run(feed_dict={X: x_val,b: b_val,W: W_val}) # print('y_true'+str(y_val)) # print('y_pred'+str(res)) def test_convolution_1d_forward_op(): inputs = ad.Variable("inputs") filters = ad.Variable("filters") y_ = ad.Variable(name="y_") #ini ctx = ndarray.gpu(0) x_val = np.linspace(0,100,100).reshape((5,1,20)) filters_val = np.ones((1,1,20))*0.001 y_val = np.zeros((5,1)) x_val = ndarray.array(x_val,ctx) filters_val = ndarray.array(filters_val,ctx) y_val = ndarray.array(y_val, ctx) outputs = ad.convolution_1d_forward_op(inputs, filters, "NCHW", "VALID", 1) outputs_pool = ad.pooling_1d_forward_op(outputs,"NCHW","max",0,1,1) outputs_relu = ad.activation_forward_op(outputs_pool,"NCHW","relu") outputs_f = ad.flatten_op(outputs_relu) outputs_fu = ad.fullyactivation_forward_op(outputs_f, "NCHW", "relu") loss = ad.matmul_op(outputs_fu, outputs_fu, trans_A=True) *(1/5) grad_inputs,grad_f = ad.gradients(loss, [inputs,filters]) executor = ad.Executor([loss, grad_f],ctx=ctx) aph = 1.0e-6 for i in range(10): loss_val, filters_grad_val = executor.run(feed_dict={inputs: x_val,filters:filters_val}) filters_val = filters_val.asnumpy() filters_grad_val = filters_grad_val.asnumpy() filters_val = filters_val - aph * filters_grad_val filters_val = ndarray.array(filters_val, ctx) print("loss_val:",loss_val.asnumpy()) print("filters_val:",filters_val.asnumpy()) def test_convolution_2d_forward_op(): inputs = ad.Variable("inputs") filters = ad.Variable("filters") y_ = ad.Variable(name="y_") #ini ctx = ndarray.gpu(0) x_val = np.linspace(0,100,80).reshape((5,1,4,4)) filters_val = np.ones((1,1,3,3))*0.001 y_val = np.zeros((5,1)) x_val = ndarray.array(x_val,ctx) filters_val = ndarray.array(filters_val,ctx) y_val = ndarray.array(y_val, ctx) outputs = ad.convolution_2d_forward_op(inputs, filters, "NCHW", "VALID",1,1) outputs_pool = ad.pooling_2d_forward_op(outputs,"NCHW","max",0,0,1,1,2,2) outputs_relu = ad.activation_forward_op(outputs_pool,"NCHW","relu") outputs_f = ad.flatten_op(outputs_relu) loss = ad.matmul_op(outputs_f, outputs_f, trans_A=True) *(1/5) grad_inputs,grad_f = ad.gradients(loss, [inputs,filters]) executor = ad.Executor([loss, grad_f],ctx=ctx) aph = 1.0e-6 for i in range(20): loss_val, filters_grad_val = executor.run(feed_dict={inputs: x_val,filters:filters_val}) filters_val = filters_val.asnumpy() filters_grad_val = filters_grad_val.asnumpy() filters_val = filters_val - aph * filters_grad_val filters_val = ndarray.array(filters_val, ctx) print("loss_val:",loss_val.asnumpy()) print("filters_val:",filters_val.asnumpy()) def test_convolution_3d_forward_op(): inputs = ad.Variable("inputs") filters = ad.Variable("filters") y_ = ad.Variable(name="y_") #ini ctx = ndarray.gpu(0) x_val = np.linspace(0,100,135).reshape((5,1,3,3,3)) filters_val = np.ones((1,1,2,2,2))*0.001 y_val = np.zeros((5,1)) x_val = ndarray.array(x_val,ctx) filters_val = ndarray.array(filters_val,ctx) y_val = ndarray.array(y_val, ctx) outputs = ad.convolution_3d_forward_op(inputs, filters, "NCHW", "VALID",1,1,1) outputs_pool = ad.pooling_3d_forward_op(outputs,"NCHW","max",0,0,0,1,1,1,2,2,2) outputs_relu = ad.activation_forward_op(outputs_pool,"NCHW","relu") outputs_dro = ad.dropout_forward_op(outputs_relu,"NCHW",0.5,0) outputs_f = ad.flatten_op(outputs_dro) loss = ad.matmul_op(outputs_f, outputs_f, trans_A=True) *(1/5) grad_inputs,grad_f = ad.gradients(loss, [inputs,filters]) executor = ad.Executor([loss, grad_f],ctx=ctx) aph = 1.0e-6 for i in range(20): loss_val, filters_grad_val = executor.run(feed_dict={inputs: x_val,filters:filters_val}) filters_val = filters_val.asnumpy() filters_grad_val = filters_grad_val.asnumpy() filters_val = filters_val - aph * filters_grad_val filters_val = ndarray.array(filters_val, ctx) print("loss_val:",loss_val.asnumpy()) print("filters_val:",filters_val.asnumpy()) def test_sigmoid_conv_1d(): inputs = ad.Variable("inputs") filters = ad.Variable("filters") y_ = ad.Variable(name="y_") # ini ctx = ndarray.gpu(0) x_val = np.linspace(0, 100, 80).reshape((5, 1, 4, 4)) filters_val = np.ones((1, 1, 3, 3)) * 0.001 y_val = np.zeros((5, 1)) x_val = ndarray.array(x_val, ctx) filters_val = ndarray.array(filters_val, ctx) y_val = ndarray.array(y_val, ctx) outputs = ad.convolution_2d_forward_op(inputs, filters, "NCHW", "VALID", 1, 1) # outputs_pool = ad.pooling_2d_forward_op(outputs, "NCHW", "max", 0, 0, 1, 1, 2, 2) outputs_relu = ad.activation_forward_op(outputs, "NCHW", "relu") executor = ad.Executor([outputs_relu],ctx=ctx) loss_val= executor.run(feed_dict={inputs: x_val,filters:filters_val}) print("loss_val:",loss_val[0].asnumpy()) def test_full_forward_op(): inputs = ad.Variable("inputs") filters = ad.Variable("filters") y_ = ad.Variable(name="y_") #ini ctx = ndarray.gpu(0) x_val = np.linspace(0,100,100).reshape((5,1,20)) filters_val = np.ones((1,1,20))*0.001 y_val = np.zeros((5,1)) x_val = ndarray.array(x_val,ctx) filters_val = ndarray.array(filters_val,ctx) y_val = ndarray.array(y_val, ctx) outputs = ad.convolution_1d_forward_op(inputs, filters, "NCHW", "VALID", 1) outputs_pool = ad.pooling_1d_forward_op(outputs,"NCHW","max",0,1,1) outputs_relu = ad.activation_forward_op(outputs_pool,"NCHW","relu") outputs_f = ad.flatten_op(outputs_relu) output=ad.fullyactivation_forward_op(outputs_f,"NCHW","relu") loss = ad.matmul_op(output, output, trans_A=True) * (1 / 5) grad_f = ad.gradients(loss,[filters])#gra返回一个list executor = ad.Executor([grad_f[0]],ctx=ctx) g_val = executor.run(feed_dict={inputs: x_val,filters:filters_val})#返回一个list print("g_val:", g_val[0].asnumpy()) def test_exp_log_reverse_pow(): inputs = ad.Variable("inputs") filters = ad.Variable("filters") y_ = ad.Variable(name="y_") # ini ctx = ndarray.gpu(0) x_val = np.linspace(0, 100, 80).reshape((5, 1, 4, 4)) filters_val = np.ones((1, 1, 3, 3)) * 0.001 y_val = np.zeros((5, 1)) x_val = ndarray.array(x_val, ctx) filters_val = ndarray.array(filters_val, ctx) y_val = ndarray.array(y_val, ctx) #outputs = ad.exp_op(inputs) #outputs = ad.log_op(inputs) #outputs = ad.reverse_op(inputs) outputs = ad.pow_op(inputs,2) grad_out = ad.gradients(outputs, [inputs]) executor = ad.Executor([outputs,grad_out[0]], ctx=ctx) result= executor.run(feed_dict={inputs: filters_val}) print(result[0].asnumpy()) print(result[1].asnumpy()) def test_reduce_sum(): inputs = ad.Variable("inputs") ctx = ndarray.gpu(0) shape = (3,2,3) x = np.random.uniform(0, 20, shape).astype(np.float32) arr_x = ndarray.array(x, ctx=ctx) outputs = ad.reduce_sum_op(inputs,1) f_out = ad.pow_op(outputs,2) grad_out = ad.gradients(f_out, [inputs]) executor = ad.Executor([outputs,f_out , grad_out[0]], ctx=ctx) result = executor.run(feed_dict={inputs: arr_x}) print(arr_x.asnumpy()) print(result[0].asnumpy()) print(result[1].asnumpy()) print(result[2].asnumpy()) def test_reduce_mean(): inputs = ad.Variable("inputs") ctx = ndarray.gpu(0) shape = (2,2,3) x = np.random.uniform(0, 20, shape).astype(np.float32) arr_x = ndarray.array(x, ctx=ctx) outputs = ad.reduce_mean_op(inputs,1) f_out = ad.pow_op(outputs,2) grad_out = ad.gradients(f_out, [inputs]) executor = ad.Executor([outputs,f_out , grad_out[0]], ctx=ctx) result = executor.run(feed_dict={inputs: arr_x}) print(arr_x.asnumpy()) print(result[0].asnumpy()) print(result[1].asnumpy()) print(result[2].asnumpy()) def test_l1_l2_cross_loss(): inputs = ad.Variable("inputs") filters = ad.Variable("filters") y_ = ad.Variable(name="y_") # ini ctx = ndarray.gpu(0) x_val = np.ones((5,2))*0.5 filters_val = np.ones((2, 2, 10)) * 0.001 y_val = np.ones((5,2)) x_val = ndarray.array(x_val, ctx) filters_val = ndarray.array(filters_val, ctx) y_val = ndarray.array(y_val, ctx) # loss = ad.crossEntropy_op(inputs, y_) loss = ad.l1loss_op(inputs, y_) grad_f = ad.gradients(loss, [inputs,y_]) # gra返回一个list executor = ad.Executor([loss,grad_f[0],grad_f[1]], ctx=ctx) g_val = executor.run(feed_dict={inputs: x_val, y_: y_val}) # 返回一个list print("g_val:", g_val[0].asnumpy()) print("g_val:", g_val[1].asnumpy()) print("g_val:", g_val[2].asnumpy()) def test_l1_l2_regular(): inputs2 = ad.Variable("X2") y_ = ad.Placeholder("y_") # ini x_val = np.ones((10,2))*4 y_val = np.ones((5, 2)) * 0.1 a = ad.l1regular_op(inputs2) aph = 0.001 t = train.Adam_minimize(a, aph) t.init_Variable({inputs2: x_val}) valid_y_predicted = t.run_get_nodelist_once({ y_: y_val},[a])[a].asnumpy() print(valid_y_predicted) def test_concat(): inputs1 = ad.Placeholder("X1") inputs2 = ad.Variable("X2") y_ = ad.Placeholder("y_") # ini ctx = ndarray.gpu(0) x_val1 = np.linspace(2, 20, 10).reshape((5, 2)) * 0.5 x_val2 = np.ones((5, 3)) * 0.1 y_val=np.ones((5,5))*0.1 a = ad.concat_forward_op(inputs1, inputs2) loss = ad.softmaxcrossentropy_op(a, y_) aph = 0.001 t = train.Adam_minimize(loss, aph) t.init_Variable({inputs2: x_val2}) valid_y_predicted = t.run_get_nodelist_once({inputs1: x_val1,y_:y_val},[a])[a].asnumpy() print(valid_y_predicted) test_concat() #test_lr() # test_identity() # test_add_by_const() # test_mul_by_const() # test_add_two_vars() # test_mul_two_vars() # test_add_mul_mix_1() # test_add_mul_mix_2() # test_add_mul_mix_3() # test_grad_of_grad() # test_matmul_two_vars() #test_full_forward_op() #test_sigmoid_conv_1d() # =============not implement yet==================== # test_exp() # test_exp_grad() #test_full_forward_op() #test_full_forward_op() #test_exp_log_reverse_pow() #test_reduce_sum() #test_reduce_mean() # test_convolution_1d_forward_op() # test_convolution_2d_forward_op() # test_convolution_3d_forward_op() # test_l1_l2_cross_loss() # test_l1_l2_regular() # test_concat()
31.747126
111
0.65646
3,300
19,334
3.55303
0.05
0.036247
0.03548
0.049126
0.83565
0.784733
0.74209
0.70968
0.679829
0.654755
0
0.050674
0.190597
19,334
609
112
31.747126
0.698575
0.057619
0
0.565632
0
0
0.022682
0
0
0
0
0
0.100239
1
0.057279
false
0
0.011933
0
0.069212
0.066826
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
3b0e593188304a562ee695aad90eb0041fcdd4ae
112
py
Python
utils/__init__.py
valschneider/lauzhack2017
36fe0bb043165fa788a28863298332d70a95a57a
[ "MIT" ]
null
null
null
utils/__init__.py
valschneider/lauzhack2017
36fe0bb043165fa788a28863298332d70a95a57a
[ "MIT" ]
null
null
null
utils/__init__.py
valschneider/lauzhack2017
36fe0bb043165fa788a28863298332d70a95a57a
[ "MIT" ]
null
null
null
from abstract_keyboard import KeyData, AbstractKeyboard, Colours from physical_keyboard import PhysicalKeyboard
37.333333
64
0.892857
12
112
8.166667
0.75
0.285714
0
0
0
0
0
0
0
0
0
0
0.089286
112
2
65
56
0.960784
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
3b3377ab3bbbbe4087d48dd851a3fad3ecbb9f4d
7,284
py
Python
tests/unit/orders/manual/test_manual_sell_orders.py
dastra/hargreaves-sdk-python
8099d775c6a70ac415690c0322fe1b964356f6ff
[ "MIT" ]
null
null
null
tests/unit/orders/manual/test_manual_sell_orders.py
dastra/hargreaves-sdk-python
8099d775c6a70ac415690c0322fe1b964356f6ff
[ "MIT" ]
null
null
null
tests/unit/orders/manual/test_manual_sell_orders.py
dastra/hargreaves-sdk-python
8099d775c6a70ac415690c0322fe1b964356f6ff
[ "MIT" ]
null
null
null
import http from pathlib import Path from urllib.parse import urlencode from hargreaves.search.models import InvestmentCategoryTypes from hargreaves.session.mocks import MockSessionClient from hargreaves.orders.manual.clients import ManualOrderClient from hargreaves.orders.manual.models import ManualOrder, ManualOrderConfirmation, ManualOrderPosition from hargreaves.orders.manual.parsers import parse_manual_order_confirmation_page from hargreaves.orders.models import OrderPositionType, OrderAmountType from hargreaves.utils import clock from hargreaves.utils.logs import LogHelper from requests_tracker.mocks import MockWebSession LogHelper.configure_std_out() clock.freeze_time() def test_parse_manual_sell_order_confirmation_uk_equity_ok(): confirm_html = Path(Path(__file__).parent / 'files/sell/manual-sell-order-confirmation-uk-equity.html') \ .read_text() order_confirmation = parse_manual_order_confirmation_page(confirm_html=confirm_html, amount_type=OrderAmountType.Quantity) assert order_confirmation.order_date.strftime('%d/%m/%Y') == '21/03/2022' assert order_confirmation.stock_code == 'PDG' assert order_confirmation.quantity == 100.0 assert order_confirmation.order_type == 'Sell' assert order_confirmation.limit_price is None assert order_confirmation.order_status == 'Pending' def test_parse_manual_sell_order_confirmation_us_equity_ok(): confirm_html = Path(Path(__file__).parent / 'files/sell/manual-sell-order-confirmation-us-equity.html') \ .read_text() order_confirmation = parse_manual_order_confirmation_page(confirm_html=confirm_html, amount_type=OrderAmountType.Quantity) assert order_confirmation.order_date.strftime('%d/%m/%Y') == '23/03/2022' assert order_confirmation.stock_code == 'TUSK' assert order_confirmation.quantity == 500.0 assert order_confirmation.order_type == 'Sell' assert order_confirmation.limit_price == 1.9 assert order_confirmation.order_status == 'Pending' def test_submit_manual_sell_order_confirmation_uk_equity(): confirm_html = Path(Path(__file__).parent / 'files/sell/manual-sell-order-confirmation-uk-equity.html') \ .read_text() current_position = ManualOrderPosition( hl_vt="1601575001", security_type="equity", out_of_hours=True, sedol="B1JQBT1", account_id=70, available=179681.27, holding=300, holding_value=77.40, transfer_units=0, remaining_units=300, remaining_units_value=77.40, isin="GB00B1JQBT10", epic="", currency_code="GBX", SD_Bid=0.00, SD_Ask=0.00, fixed_interest=False, category_code=InvestmentCategoryTypes.EQUITIES ) order = ManualOrder( position=current_position, position_type=OrderPositionType.Sell, amount_type=OrderAmountType.Quantity, quantity=100, limit=None, earmark_orders_confirm=False) with MockWebSession() as web_session: expected_params = { 'hl_vt': "1601575001", 'type': "equity", 'out_of_hours': "1", 'sedol': "B1JQBT1", 'product_no': "70", 'available': "179681.27", 'holding': "300", 'holding_value': "77.4", 'transfer_units': "0.0000", 'remaining_units': "300", 'remaining_units_value': "77.4", 'isin': "GB00B1JQBT10", 'epic': "", 'currency_code': "GBX", 'SD_Bid': "0.00", 'SD_Ask': "0.00", 'fixed_interest': "0", 'bs': "Sell", 'quantity': "100", 'qs': "quantity", 'limit': "", 'earmark_orders_confirm': "false", } mock = web_session.mock_post( url='https://online.hl.co.uk/my-accounts/manual_deal', headers={ 'Referer': f'https://online.hl.co.uk/my-accounts/security_deal/sedol/{order.sedol}' }, response_text=confirm_html, status_code=http.HTTPStatus.OK ) session_client = MockSessionClient() client = ManualOrderClient(session_client) order_confirmation = client.submit_order(web_session=web_session, order=order) actual_param = mock.request_history[0].text assert urlencode(expected_params) == actual_param assert type(order_confirmation) == ManualOrderConfirmation assert session_client.was_called is True def test_submit_manual_sell_order_confirmation_us_equity(): confirm_html = Path(Path(__file__).parent / 'files/sell/manual-sell-order-confirmation-us-equity.html') \ .read_text() current_position = ManualOrderPosition( hl_vt="1496180636", security_type="equity", out_of_hours=True, sedol="BDBFK59", account_id=70, available=164629.62, holding=7635, holding_value=11093.562582535, transfer_units=0, remaining_units=7635, remaining_units_value=11093.562582535, isin="US56155L1089", epic="", currency_code="USD", SD_Bid=0.00, SD_Ask=0.00, fixed_interest=False, category_code=InvestmentCategoryTypes.OVERSEAS ) order = ManualOrder( position=current_position, position_type=OrderPositionType.Sell, amount_type=OrderAmountType.Value, quantity=500, limit=1.9, earmark_orders_confirm=False) with MockWebSession() as web_session: expected_params = { 'hl_vt': "1496180636", 'type': "equity", 'out_of_hours': "1", 'sedol': "BDBFK59", 'product_no': "70", 'available': "164629.62", 'holding': "7635", 'holding_value': "11093.562582535", 'transfer_units': "0.0000", 'remaining_units': "7635", 'remaining_units_value': "11093.562582535", 'isin': "US56155L1089", 'epic': "", 'currency_code': "USD", 'SD_Bid': "0.00", 'SD_Ask': "0.00", 'fixed_interest': "0", 'bs': "Sell", 'quantity': "500", 'qs': "value", 'limit': "1.9", 'earmark_orders_confirm': "false", } mock = web_session.mock_post( url='https://online.hl.co.uk/my-accounts/manual_deal_overseas', headers={ 'Referer': f'https://online.hl.co.uk/my-accounts/security_deal/sedol/{order.sedol}' }, response_text=confirm_html, status_code=http.HTTPStatus.OK ) session_client = MockSessionClient() client = ManualOrderClient(session_client) order_confirmation = client.submit_order(web_session=web_session, order=order) actual_param = mock.request_history[0].text assert urlencode(expected_params) == actual_param assert type(order_confirmation) == ManualOrderConfirmation assert session_client.was_called is True
35.705882
109
0.62905
771
7,284
5.661479
0.214008
0.112944
0.06323
0.049485
0.803207
0.792669
0.785796
0.702864
0.663918
0.626804
0
0.055432
0.261944
7,284
203
110
35.881773
0.75651
0
0
0.511364
0
0.011364
0.170785
0.042559
0
0
0
0
0.102273
1
0.022727
false
0
0.068182
0
0.090909
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
3b399f0d24af2651e241a2dbc09d0bd6f463382a
119
py
Python
campus_app/admin.py
VSSantana/APP-Campus-Online-v5.0
19e74832527e5a3beb479d4fe8a595caa319f914
[ "MIT" ]
1
2021-04-12T13:34:00.000Z
2021-04-12T13:34:00.000Z
campus_app/admin.py
VSSantana/APP-Campus-Online-v5.0
19e74832527e5a3beb479d4fe8a595caa319f914
[ "MIT" ]
19
2021-05-14T20:56:29.000Z
2022-02-10T11:59:33.000Z
APP-Campus-Online-v6.0/campus_app/admin.py
Benedito-Medeiros-Neto-UnB/TacProgWeb
c7d795a69524e428988d4ed796f4a1c2ded035e3
[ "MIT" ]
10
2021-05-13T16:18:53.000Z
2021-11-08T14:30:08.000Z
from django.contrib import admin from .models import Noticia # Register your models here. admin.site.register(Noticia)
23.8
32
0.815126
17
119
5.705882
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.117647
119
5
33
23.8
0.92381
0.218487
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
3b489c9ebfe89f6bd772777f5f5df11e70f892e2
26,402
py
Python
gmusicapi/metadata_pb2.py
antimatter15/Unofficial-Google-Music-API
4c7531dc49d17f421ec542aec0a43d4fdf5b5acc
[ "BSD-3-Clause" ]
1
2016-11-01T15:24:21.000Z
2016-11-01T15:24:21.000Z
gmusicapi/metadata_pb2.py
odiroot/Unofficial-Google-Music-API
d192908ec636c4a252ffe232d873924eb56e47df
[ "BSD-3-Clause" ]
null
null
null
gmusicapi/metadata_pb2.py
odiroot/Unofficial-Google-Music-API
d192908ec636c4a252ffe232d873924eb56e47df
[ "BSD-3-Clause" ]
1
2018-04-05T18:37:35.000Z
2018-04-05T18:37:35.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='metadata.proto', package='', serialized_pb='\n\x0emetadata.proto\"\xa3\x03\n\x05Track\x12\n\n\x02id\x18\x02 \x01(\t\x12\x10\n\x08\x63reation\x18\x03 \x01(\x05\x12\x12\n\nlastPlayed\x18\x04 \x01(\x05\x12\r\n\x05title\x18\x06 \x01(\t\x12\x0e\n\x06\x61rtist\x18\x07 \x01(\t\x12\x10\n\x08\x63omposer\x18\x08 \x01(\t\x12\r\n\x05\x61lbum\x18\t \x01(\t\x12\x13\n\x0b\x61lbumArtist\x18\n \x01(\t\x12\x0c\n\x04year\x18\x0b \x01(\x05\x12\x0f\n\x07\x63omment\x18\x0c \x01(\t\x12\r\n\x05track\x18\r \x01(\x05\x12\r\n\x05genre\x18\x0e \x01(\t\x12\x10\n\x08\x64uration\x18\x0f \x01(\x05\x12\x16\n\x0e\x62\x65\x61tsPerMinute\x18\x10 \x01(\x05\x12\x11\n\tplayCount\x18\x14 \x01(\x05\x12\x13\n\x0btotalTracks\x18\x1a \x01(\x05\x12\x0c\n\x04\x64isc\x18\x1b \x01(\x05\x12\x12\n\ntotalDiscs\x18\x1c \x01(\x05\x12\x0b\n\x03u11\x18\x1f \x01(\x05\x12\x10\n\x08\x66ileSize\x18 \x01(\x05\x12\x0b\n\x03u13\x18% \x01(\x05\x12\x0b\n\x03u14\x18& \x01(\x05\x12\x0f\n\x07\x62itrate\x18, \x01(\x05\x12\x0b\n\x03u15\x18\x35 \x01(\t\x12\x0b\n\x03u16\x18= \x01(\x05\":\n\x0fMetadataRequest\x12\x16\n\x06tracks\x18\x01 \x03(\x0b\x32\x06.Track\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\"8\n\x0cQueuedUpload\x12\n\n\x02id\x18\x01 \x01(\t\x12\n\n\x02u0\x18\x02 \x01(\x05\x12\x10\n\x08serverId\x18\x03 \x01(\t\"P\n\x06Status\x12\n\n\x02u0\x18\x01 \x01(\x05\x12\n\n\x02u1\x18\x02 \x01(\x05\x12\n\n\x02u2\x18\x03 \x01(\x05\x12\n\n\x02u3\x18\x04 \x01(\x05\x12\n\n\x02u4\x18\x05 \x01(\x05\x12\n\n\x02u5\x18\x06 \x01(\x05\"<\n\rTrackResponse\x12\x0b\n\x03ids\x18\x02 \x03(\t\x12\x1e\n\x07uploads\x18\x03 \x03(\x0b\x32\r.QueuedUpload\"X\n\x10MetadataResponse\x12\n\n\x02u0\x18\x01 \x01(\x05\x12 \n\x08response\x18\x02 \x01(\x0b\x32\x0e.TrackResponse\x12\x16\n\x05state\x18\x06 \x01(\x0b\x32\x07.Status\"/\n\nUploadAuth\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x10\n\x08hostname\x18\x02 \x01(\t\"L\n\x05Quota\x12\x15\n\rmaximumTracks\x18\x01 \x01(\x05\x12\x17\n\x0f\x61vailableTracks\x18\x02 \x01(\x05\x12\x13\n\x0btotalTracks\x18\x03 \x01(\x05\"\x1e\n\x0b\x43lientState\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"Q\n\x13\x43lientStateResponse\x12\n\n\x02u0\x18\x01 \x01(\x05\x12\x17\n\x06status\x18\x06 \x01(\x0b\x32\x07.Status\x12\x15\n\x05quota\x18\x08 \x01(\x0b\x32\x06.Quota\"Q\n\x12UploadAuthResponse\x12\n\n\x02u0\x18\x01 \x01(\x05\x12\x17\n\x06status\x18\x06 \x01(\x0b\x32\x07.Status\x12\n\n\x02u1\x18\x0b \x01(\x05\x12\n\n\x02u2\x18\x0c \x01(\x05') _TRACK = descriptor.Descriptor( name='Track', full_name='Track', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='id', full_name='Track.id', index=0, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='creation', full_name='Track.creation', index=1, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='lastPlayed', full_name='Track.lastPlayed', index=2, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='title', full_name='Track.title', index=3, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='artist', full_name='Track.artist', index=4, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='composer', full_name='Track.composer', index=5, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='album', full_name='Track.album', index=6, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='albumArtist', full_name='Track.albumArtist', index=7, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='year', full_name='Track.year', index=8, number=11, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='comment', full_name='Track.comment', index=9, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='track', full_name='Track.track', index=10, number=13, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='genre', full_name='Track.genre', index=11, number=14, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='duration', full_name='Track.duration', index=12, number=15, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='beatsPerMinute', full_name='Track.beatsPerMinute', index=13, number=16, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='playCount', full_name='Track.playCount', index=14, number=20, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='totalTracks', full_name='Track.totalTracks', index=15, number=26, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='disc', full_name='Track.disc', index=16, number=27, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='totalDiscs', full_name='Track.totalDiscs', index=17, number=28, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u11', full_name='Track.u11', index=18, number=31, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='fileSize', full_name='Track.fileSize', index=19, number=32, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u13', full_name='Track.u13', index=20, number=37, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u14', full_name='Track.u14', index=21, number=38, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='bitrate', full_name='Track.bitrate', index=22, number=44, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u15', full_name='Track.u15', index=23, number=53, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u16', full_name='Track.u16', index=24, number=61, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=19, serialized_end=438, ) _METADATAREQUEST = descriptor.Descriptor( name='MetadataRequest', full_name='MetadataRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='tracks', full_name='MetadataRequest.tracks', 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, options=None), descriptor.FieldDescriptor( name='address', full_name='MetadataRequest.address', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=440, serialized_end=498, ) _QUEUEDUPLOAD = descriptor.Descriptor( name='QueuedUpload', full_name='QueuedUpload', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='id', full_name='QueuedUpload.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u0', full_name='QueuedUpload.u0', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='serverId', full_name='QueuedUpload.serverId', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=500, serialized_end=556, ) _STATUS = descriptor.Descriptor( name='Status', full_name='Status', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='u0', full_name='Status.u0', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u1', full_name='Status.u1', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u2', full_name='Status.u2', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u3', full_name='Status.u3', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u4', full_name='Status.u4', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u5', full_name='Status.u5', index=5, number=6, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=558, serialized_end=638, ) _TRACKRESPONSE = descriptor.Descriptor( name='TrackResponse', full_name='TrackResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='ids', full_name='TrackResponse.ids', index=0, number=2, type=9, 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, options=None), descriptor.FieldDescriptor( name='uploads', full_name='TrackResponse.uploads', index=1, number=3, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=640, serialized_end=700, ) _METADATARESPONSE = descriptor.Descriptor( name='MetadataResponse', full_name='MetadataResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='u0', full_name='MetadataResponse.u0', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='response', full_name='MetadataResponse.response', 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, options=None), descriptor.FieldDescriptor( name='state', full_name='MetadataResponse.state', index=2, 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, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=702, serialized_end=790, ) _UPLOADAUTH = descriptor.Descriptor( name='UploadAuth', full_name='UploadAuth', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='address', full_name='UploadAuth.address', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='hostname', full_name='UploadAuth.hostname', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=792, serialized_end=839, ) _QUOTA = descriptor.Descriptor( name='Quota', full_name='Quota', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='maximumTracks', full_name='Quota.maximumTracks', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='availableTracks', full_name='Quota.availableTracks', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='totalTracks', full_name='Quota.totalTracks', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=841, serialized_end=917, ) _CLIENTSTATE = descriptor.Descriptor( name='ClientState', full_name='ClientState', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='address', full_name='ClientState.address', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=unicode("", "utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=919, serialized_end=949, ) _CLIENTSTATERESPONSE = descriptor.Descriptor( name='ClientStateResponse', full_name='ClientStateResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='u0', full_name='ClientStateResponse.u0', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='status', full_name='ClientStateResponse.status', index=1, 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, options=None), descriptor.FieldDescriptor( name='quota', full_name='ClientStateResponse.quota', index=2, number=8, 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, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=951, serialized_end=1032, ) _UPLOADAUTHRESPONSE = descriptor.Descriptor( name='UploadAuthResponse', full_name='UploadAuthResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ descriptor.FieldDescriptor( name='u0', full_name='UploadAuthResponse.u0', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='status', full_name='UploadAuthResponse.status', index=1, 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, options=None), descriptor.FieldDescriptor( name='u1', full_name='UploadAuthResponse.u1', index=2, number=11, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor( name='u2', full_name='UploadAuthResponse.u2', index=3, number=12, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, extension_ranges=[], serialized_start=1034, serialized_end=1115, ) _METADATAREQUEST.fields_by_name['tracks'].message_type = _TRACK _TRACKRESPONSE.fields_by_name['uploads'].message_type = _QUEUEDUPLOAD _METADATARESPONSE.fields_by_name['response'].message_type = _TRACKRESPONSE _METADATARESPONSE.fields_by_name['state'].message_type = _STATUS _CLIENTSTATERESPONSE.fields_by_name['status'].message_type = _STATUS _CLIENTSTATERESPONSE.fields_by_name['quota'].message_type = _QUOTA _UPLOADAUTHRESPONSE.fields_by_name['status'].message_type = _STATUS class Track(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _TRACK # @@protoc_insertion_point(class_scope:Track) class MetadataRequest(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _METADATAREQUEST # @@protoc_insertion_point(class_scope:MetadataRequest) class QueuedUpload(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _QUEUEDUPLOAD # @@protoc_insertion_point(class_scope:QueuedUpload) class Status(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _STATUS # @@protoc_insertion_point(class_scope:Status) class TrackResponse(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _TRACKRESPONSE # @@protoc_insertion_point(class_scope:TrackResponse) class MetadataResponse(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _METADATARESPONSE # @@protoc_insertion_point(class_scope:MetadataResponse) class UploadAuth(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _UPLOADAUTH # @@protoc_insertion_point(class_scope:UploadAuth) class Quota(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _QUOTA # @@protoc_insertion_point(class_scope:Quota) class ClientState(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _CLIENTSTATE # @@protoc_insertion_point(class_scope:ClientState) class ClientStateResponse(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _CLIENTSTATERESPONSE # @@protoc_insertion_point(class_scope:ClientStateResponse) class UploadAuthResponse(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _UPLOADAUTHRESPONSE # @@protoc_insertion_point(class_scope:UploadAuthResponse) # @@protoc_insertion_point(module_scope)
37.609687
2,401
0.715703
3,498
26,402
5.182104
0.074614
0.07635
0.064545
0.05958
0.75451
0.713245
0.662051
0.646715
0.645281
0.645281
0
0.054538
0.152034
26,402
701
2,402
37.663338
0.755137
0.026059
0
0.705512
1
0.001575
0.152691
0.101949
0
0
0
0
0
1
0
false
0
0.006299
0
0.058268
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3b5ebc48c31589e68720d58ebad1837a1abc4854
19,172
py
Python
src/Common/Constants.py
rpgauthier/ComputationalThematicAnalysisToolkit
b615cd92565dcc197f156c0b792fec6892ffe9a4
[ "MIT" ]
null
null
null
src/Common/Constants.py
rpgauthier/ComputationalThematicAnalysisToolkit
b615cd92565dcc197f156c0b792fec6892ffe9a4
[ "MIT" ]
24
2021-11-15T17:07:31.000Z
2022-02-09T22:38:50.000Z
src/Common/Constants.py
rpgauthier/ComputationalThematicAnalysisToolkit
b615cd92565dcc197f156c0b792fec6892ffe9a4
[ "MIT" ]
null
null
null
'''Constants for MachineThematicAnalysis Toolkit''' import sys import os import shutil import platform import wx #import wx.lib.agw.flatnotebook as FNB import External.wxPython.flatnotebook_fix as FNB CUR_VER = '0.8.11' #Variables to configure GUI FNB_STYLE = FNB.FNB_DEFAULT_STYLE|FNB.FNB_HIDE_ON_SINGLE_TAB|FNB.FNB_NO_X_BUTTON|FNB.FNB_FF2 DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' if getattr(sys, 'frozen', False): # this is a Pyinstaller bundle ROOT_PATH = sys._MEIPASS else: # normal python process ROOT_PATH = os.getcwd() FONTS_PATH = os.path.join(ROOT_PATH, 'Fonts') IMAGES_PATH = os.path.join(ROOT_PATH, 'Images') XSD_PATH = os.path.join(ROOT_PATH, 'External/XSD') SAVE_DATA_PATH = os.path.realpath(os.path.expanduser('~/Documents/ComputationalThematicAnalysisToolkit.nosync')) old_SAVE_DATA_PATH = os.path.realpath(os.path.expanduser('~/Documents/ComputationalThematicAnalysisToolkit')) if not os.path.exists(SAVE_DATA_PATH): if os.path.exists(old_SAVE_DATA_PATH): os.rename(old_SAVE_DATA_PATH, SAVE_DATA_PATH) else: os.makedirs(SAVE_DATA_PATH) if platform.system() == 'Windows': APP_DATA_PATH = os.path.realpath(os.path.expanduser('~/AppData/Local/ComputationalThematicAnalysisToolkit')) else: APP_DATA_PATH = os.path.realpath(os.path.expanduser('~/Library/ComputationalThematicAnalysisToolkit')) if not os.path.exists(APP_DATA_PATH): os.makedirs(APP_DATA_PATH) SAVED_WORKSPACES_PATH = os.path.realpath(os.path.join(SAVE_DATA_PATH, 'Saved_Workspaces')) if not os.path.exists(SAVED_WORKSPACES_PATH): os.makedirs(SAVED_WORKSPACES_PATH) DATA_PATH = os.path.realpath(os.path.join(SAVE_DATA_PATH, 'Data')) if not os.path.exists(DATA_PATH): old_DATA = os.path.realpath(os.path.join(APP_DATA_PATH, 'Data')) if os.path.exists(old_DATA): shutil.move(old_DATA, SAVE_DATA_PATH) else: os.makedirs(DATA_PATH) CURRENT_WORKSPACE_PATH = os.path.realpath(os.path.join(APP_DATA_PATH, 'Current_Workspace')) old_CURRENT_WORKSPACE = os.path.realpath(os.path.join(SAVE_DATA_PATH, 'Current_Workspace')) if not os.path.exists(CURRENT_WORKSPACE_PATH): if os.path.exists(old_CURRENT_WORKSPACE): shutil.move(old_CURRENT_WORKSPACE, APP_DATA_PATH) else: os.makedirs(CURRENT_WORKSPACE_PATH) AUTOSAVE_PATH = os.path.realpath(os.path.join(CURRENT_WORKSPACE_PATH, 'AutoSave')) LOG_PATH = os.path.realpath(os.path.join(APP_DATA_PATH, 'Logs')) old_LOG = os.path.realpath(os.path.join(SAVE_DATA_PATH, 'Logs')) if not os.path.exists(LOG_PATH): if os.path.exists(old_LOG): shutil.move(old_LOG, APP_DATA_PATH) else: os.makedirs(LOG_PATH) #Menu Options # removed to use built in id generator wx.ID_ANY #Module Specific Variables ##Filtering TOKEN_TEXT_IDX = 0 TOKEN_STEM_IDX = 1 TOKEN_LEMMA_IDX = 2 TOKEN_POS_IDX = 3 TOKEN_SPACY_STOPWORD_IDX = 4 TOKEN_TEXT_TFIDF_IDX = 5 TOKEN_STEM_TFIDF_IDX = 6 TOKEN_LEMMA_TFIDF_IDX = 7 TOKEN_ENTRIES = 'entries' TOKEN_WORDS = 'words' TOKEN_POS = 'pos' TOKEN_NUM_WORDS = 'num_of_words' TOKEN_PER_WORDS = 'per_of_words' TOKEN_NUM_DOCS = 'num_of_docs' TOKEN_PER_DOCS = 'per_of_docs' TOKEN_SPACY_STOPWORD = 'spacy_stopword' TOKEN_REMOVE_FLG = 'removed_flg' TOKEN_TFIDF = 'tfidf_range' FILTER_RULE_ANY = '<ANY>' FILTER_RULE_REMOVE = 'remove' FILTER_RULE_INCLUDE = 'include' FILTER_RULE_REMOVE_SPACY_AUTO_STOPWORDS = 'remove spacy auto stopwords' FILTER_RULE_INCLUDE_SPACY_AUTO_STOPWORDS = 'include spacy auto stopwords' FILTER_TFIDF_REMOVE = 'remove tokens where their tfidf is ' FILTER_TFIDF_INCLUDE = 'include tokens where their tfidf is ' FILTER_TFIDF_LOWER = ' in the lower ' FILTER_TFIDF_UPPER = ' in the upper ' ###Token Filters AVAILABLE_DATASET_LANGUAGES1 = ['eng-sm', 'fre-sm'] #removed eng-trf and fre-trf due to difficulties with preparing installations -- Sept 21, 2021 AVAILABLE_DATASET_LANGUAGES2 = ['English', 'French'] ###Usefulness NOT_SURE = "Not Sure" USEFUL = "Useful" NOT_USEFUL = "Not Useful" # dialogs TWITTER_DIALOG_SIZE = wx.Size(350, -1) OPTIONS_DIALOG_SIZE = wx.Size(350, -1) #definition of fields available for use from the retrievers available_fields = { ('Reddit', 'submission',): { 'id': { 'desc': "the unique Reddit Submission id (may not be unique across other sources/types", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'url': { 'desc': "a url link to the original source of the data", 'type': 'url', 'computation_fields_default': False, 'label_fields_default': True, }, 'created_utc': { 'desc': "The UTC time stamp of when the submission was created", 'type': 'UTC-timestamp', 'computation_fields_default': False, 'label_fields_default': True, }, 'title': { 'desc': "the raw title of the submission.", 'type': 'string', 'computation_fields_default': True, 'label_fields_default': True, }, 'selftext': { 'desc': "the raw text of the submission.", 'type': 'string', 'computation_fields_default': True, 'label_fields_default': False, }, 'author': { 'desc': "the account name of the poster", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'author_flair_css_class': { 'desc': "the CSS class f the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'author_flair_text': { 'desc': "the text of the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'num_comments': { 'desc': "the number of comments made under this submission (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'num_crossposts': { 'desc': "the number of crossposts of this submission (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'score': { 'desc': "the submission's score (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'subreddit': { 'desc': "the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'subreddit_id': { 'desc': "The unique id of the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, }, ('Reddit', 'comment',): { 'id': { 'desc': 'unique Reddit Comment id (may not be unique across other sources/types)', 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'url': { 'desc': "a url link to the original source of the data", 'type': 'url', 'computation_fields_default': False, 'label_fields_default': True, }, 'created_utc': { 'desc': "The UTC time stamp of when the comment was created", 'type': 'UTC-timestamp', 'computation_fields_default': False, 'label_fields_default': True, }, 'body': { 'desc': "the raw text of the comment.", 'type': 'string', 'computation_fields_default': True, 'label_fields_default': True, }, 'author': { 'desc': "the account name of the poster", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'author_flair_css_class': { 'desc': "the CSS class of the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'author_flair_text': { 'desc': "the text of the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'link_id': { 'desc': "A reference id that can link a comment to it's associated submission's id.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'parent_id': { 'desc': "A reference id for the item (a comment or submission) that this comment is a reply to", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'score': { 'desc': "the submission's score (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission_id':{ 'desc': 'the id of the submission that comment is a response to', 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'subreddit': { 'desc': "the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'subreddit_id': { 'desc': "The unique id of the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, }, ('Reddit', 'discussion',): { 'id': { 'desc': 'unique Reddit Comment id (may not be unique across other sources/types)', 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'url': { 'desc': "a url link to the original source of the data", 'type': 'url', 'computation_fields_default': False, 'label_fields_default': True, }, 'created_utc': { 'desc': "The UTC time stamp of when the comment was created", 'type': 'UTC-timestamp', 'computation_fields_default': False, 'label_fields_default': True, }, 'title': { 'desc': "the raw title of the discussion.", 'type': 'string', 'computation_fields_default': True, 'label_fields_default': True, }, 'text': { 'desc': "the raw text of the discussion.", 'type': 'string', 'computation_fields_default': True, 'label_fields_default': False, }, 'submission.author': { 'desc': "the account name of the poster", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.author_flair_css_class': { 'desc': "the CSS class f the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.author_flair_text': { 'desc': "the text of the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.created_utc': { 'desc': "The UTC time stamp of when the submission was created", 'type': 'UTC-timestamp', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.id': { 'desc': "the unique Reddit Submission id (may not be unique across other sources/types", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.num_comments': { 'desc': "the number of comments made under this submission (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.num_crossposts': { 'desc': "the number of crossposts of this submission (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.selftext': { 'desc': "the raw text of the submission.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.score': { 'desc': "the submission's score (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.subreddit': { 'desc': "the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.subreddit_id': { 'desc': "The unique id of the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'submission.title': { 'desc': "the raw title of the submission.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.author': { 'desc': "the account name of the poster", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.author_flair_css_class': { 'desc': "the CSS class of the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.author_flair_text': { 'desc': "the text of the author's flair. subreddit specific", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.body': { 'desc': "the raw text of the comment.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.created_utc': { 'desc': "The UTC time stamp of when the comment was created", 'type': 'UTC-timestamp', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.id': { 'desc': 'unique Reddit Comment id (may not be unique across other sources/types)', 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.link_id': { 'desc': "A reference id that can link a comment to it's associated submission's id.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.parent_id': { 'desc': "A reference id for the item (a comment or submission) that this comment is a reply to", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.score': { 'desc': "the submission's score (may be out of date unless updated from Reddit API)", 'type': 'integer', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.subreddit': { 'desc': "the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, 'comment.subreddit_id': { 'desc': "The unique id of the subreddit the comment is from.", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': False, }, }, ('Twitter', 'tweet',): { 'created_utc': { # not a field in tweet object; created using 'created_at' 'desc': "The UTC time stamp of when the tweet was posted.", 'type': 'UTC-timestamp', 'computation_fields_default': False, 'label_fields_default': True, }, 'url': { # not a field in tweet object; created using tweet 'id' 'desc': "a url link to the original tweet", 'type': 'url', 'computation_fields_default': False, 'label_fields_default': True, }, 'full_text': { 'desc': "The full text of this tweet.", 'type': "string", 'computation_fields_default': True, 'label_fields_default': True, }, 'text': { 'desc': "The text in the tweet, truncated to 140 characters.", 'type': "string", 'computation_fields_default': False, 'label_fields_default': False, }, }, ('CSV', 'documents',): { 'id': { 'desc': "unique id of the row's data", 'type': 'string', 'computation_fields_default': False, 'label_fields_default': True, }, 'url': { 'desc': "a url link to the original source of the row's data", 'type': 'url', 'computation_fields_default': False, 'label_fields_default': False, }, 'created_utc': { 'desc': "The UTC time stamp of when the row's data was created", 'type': 'UTC-timestamp', 'computation_fields_default': False, 'label_fields_default': False, }, } }
38.575453
146
0.573075
2,085
19,172
5.042206
0.117986
0.150861
0.176353
0.151717
0.794635
0.784933
0.749263
0.737373
0.727766
0.7037
0
0.002421
0.310453
19,172
496
147
38.653226
0.792814
0.028427
0
0.578158
0
0
0.452855
0.109666
0
0
0
0
0
1
0
false
0.002141
0.012848
0
0.012848
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
8e6f58d75f26add4efd1a1ca913400a65b65e8ba
62
py
Python
app/main/errors.py
AJowett/chatty
a23fa594d53ac4d0851d7ce44d3fa81836e379d1
[ "MIT" ]
null
null
null
app/main/errors.py
AJowett/chatty
a23fa594d53ac4d0851d7ce44d3fa81836e379d1
[ "MIT" ]
null
null
null
app/main/errors.py
AJowett/chatty
a23fa594d53ac4d0851d7ce44d3fa81836e379d1
[ "MIT" ]
null
null
null
from flask import render_template, request from . import main
20.666667
42
0.822581
9
62
5.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.145161
62
2
43
31
0.943396
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
8ebc8f2acab51140910ab8af9bec5bb0c1f48067
700
py
Python
tests/test_utils.py
kairosfuture/abacusevents
121215a6855f2e0371e557b5f0d1dd7f2f33e069
[ "MIT" ]
null
null
null
tests/test_utils.py
kairosfuture/abacusevents
121215a6855f2e0371e557b5f0d1dd7f2f33e069
[ "MIT" ]
null
null
null
tests/test_utils.py
kairosfuture/abacusevents
121215a6855f2e0371e557b5f0d1dd7f2f33e069
[ "MIT" ]
null
null
null
import os from abacusevents.utils import env, lowercase_first def test_env_is_short_for_os_dot_environ(): os.environ['FOO'] = 'BAR' assert env('FOO') == 'BAR' def test_env_lets_you_specify_a_default_value(): default = env('NOT_THERE', 'FOO') assert default == 'FOO' def test_env_wont_explode(): assert env('NOTHING') is None def test_lowercase_first(): assert lowercase_first('Ping') == 'ping' assert lowercase_first('') == '' assert lowercase_first('fOO') == 'fOO' assert lowercase_first(None) == '' assert lowercase_first(False) == '' assert lowercase_first([]) == '' assert lowercase_first([1]) == '' assert lowercase_first((1,)) == ''
24.137931
51
0.665714
89
700
4.910112
0.370787
0.320366
0.366133
0.199085
0.26087
0.183066
0
0
0
0
0
0.00349
0.181429
700
28
52
25
0.759162
0
0
0
0
0
0.068571
0
0
0
0
0
0.578947
1
0.210526
false
0
0.105263
0
0.315789
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
1
0
1
0
0
0
0
0
0
0
5
8ec5846ccf710a39df521d57cab6d18b4a25c956
68
py
Python
pywren_ibm_cloud/storage/backends/ibm_cos/__init__.py
gerardparis/pywren-ibm-cloud
ca69bed54f5bd5157bcda961b86dbfcfecf3c54a
[ "Apache-2.0" ]
158
2020-09-16T13:22:03.000Z
2022-03-28T20:01:31.000Z
pywren_ibm_cloud/storage/backends/ibm_cos/__init__.py
gerardparis/pywren-ibm-cloud
ca69bed54f5bd5157bcda961b86dbfcfecf3c54a
[ "Apache-2.0" ]
256
2018-05-20T13:01:51.000Z
2020-09-16T09:09:54.000Z
pywren_ibm_cloud/storage/backends/ibm_cos/__init__.py
gerardparis/pywren-ibm-cloud
ca69bed54f5bd5157bcda961b86dbfcfecf3c54a
[ "Apache-2.0" ]
48
2020-09-19T15:29:53.000Z
2022-03-23T17:08:24.000Z
from .ibm_cos import IBMCloudObjectStorageBackend as StorageBackend
34
67
0.897059
7
68
8.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.088235
68
1
68
68
0.967742
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
d903529b12c98aca3ff5d6845a7f6381cda45ac6
404
py
Python
controlpanel/controlpanel/ros_check/models.py
filesmuggler/acc_web_server
2497cbfdb08db30d4eb1ca842cee7c2f65ff7470
[ "MIT" ]
null
null
null
controlpanel/controlpanel/ros_check/models.py
filesmuggler/acc_web_server
2497cbfdb08db30d4eb1ca842cee7c2f65ff7470
[ "MIT" ]
null
null
null
controlpanel/controlpanel/ros_check/models.py
filesmuggler/acc_web_server
2497cbfdb08db30d4eb1ca842cee7c2f65ff7470
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Car(models.Model): car_name = models.CharField(max_length=50) car_hostname = models.CharField(max_length=50) car_state = models.CharField(max_length=50) def __str__(self): return self.car_name def get_hostname(self): return self.car_hostname def get_state(self): return self.car_state
22.444444
50
0.695545
57
404
4.666667
0.403509
0.169173
0.203008
0.270677
0.315789
0.218045
0
0
0
0
0
0.019048
0.220297
404
18
51
22.444444
0.825397
0.059406
0
0
0
0
0
0
0
0
0
0
0
1
0.272727
false
0
0.090909
0.272727
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
d916bdfd815b7553815cbe2979b5ff3c361b9fdb
42
py
Python
ARLO/environment/__init__.py
arlo-lib/ARLO
159669884044686e36e07bd1cc0948884ed7cc8d
[ "MIT" ]
null
null
null
ARLO/environment/__init__.py
arlo-lib/ARLO
159669884044686e36e07bd1cc0948884ed7cc8d
[ "MIT" ]
null
null
null
ARLO/environment/__init__.py
arlo-lib/ARLO
159669884044686e36e07bd1cc0948884ed7cc8d
[ "MIT" ]
null
null
null
from ARLO.environment.environment import *
42
42
0.857143
5
42
7.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.071429
42
1
42
42
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d98a64a68a68150c17a5ba9fa0b9485585e96dc4
35
py
Python
yolo/model_zoo/__init__.py
ioangatop/yolo
c65a72337369572bc07090f39123e2bf6ff5f4a3
[ "MIT" ]
1
2021-06-28T01:22:38.000Z
2021-06-28T01:22:38.000Z
yolo/model_zoo/__init__.py
ioangatop/yolo
c65a72337369572bc07090f39123e2bf6ff5f4a3
[ "MIT" ]
null
null
null
yolo/model_zoo/__init__.py
ioangatop/yolo
c65a72337369572bc07090f39123e2bf6ff5f4a3
[ "MIT" ]
null
null
null
from .model_zoo import load_weights
35
35
0.885714
6
35
4.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.085714
35
1
35
35
0.90625
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
d98b62aa0fdb706a6f4cb4c830afcb3e8f4fca20
282
py
Python
test_logger/demo.py
payalkutana/logging_logger
7dc7ccaee63e922b7c7f699a5d0b4e1317a27502
[ "MIT" ]
null
null
null
test_logger/demo.py
payalkutana/logging_logger
7dc7ccaee63e922b7c7f699a5d0b4e1317a27502
[ "MIT" ]
null
null
null
test_logger/demo.py
payalkutana/logging_logger
7dc7ccaee63e922b7c7f699a5d0b4e1317a27502
[ "MIT" ]
null
null
null
from logging_logger import loggerClass import logging loggerClass.WritetoScreen(loggerClass,logging.INFO,"testing...", '%(levelname)s:%(message)s') loggerClass.Writetofile(loggerClass,'sample.log',logging.WARNING,"testing...", '%(levelname)s:%(message)s')
31.333333
78
0.70922
29
282
6.862069
0.517241
0.160804
0.170854
0.241206
0.251256
0
0
0
0
0
0
0
0.12766
282
8
79
35.25
0.808943
0
0
0.333333
0
0
0.283688
0.177305
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d98be932a3e4d84d93b13cf5f54ee3801d2adc54
111
py
Python
LearnPython3TheHardWay/ex8.py
lanjing99/UsePython
19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4
[ "MIT" ]
null
null
null
LearnPython3TheHardWay/ex8.py
lanjing99/UsePython
19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4
[ "MIT" ]
null
null
null
LearnPython3TheHardWay/ex8.py
lanjing99/UsePython
19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4
[ "MIT" ]
null
null
null
formatter = "{} {} {} {}" print(formatter.format(1, 2, 3, 4)) print(formatter.format("a", "b", "c", "d", "r"))
27.75
48
0.522523
16
111
3.625
0.75
0.482759
0.689655
0
0
0
0
0
0
0
0
0.041667
0.135135
111
3
49
37
0.5625
0
0
0
0
0
0.144144
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
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
0
0
0
1
0
5
794e02a9abb8bfa43732422f20b7e7e3ffdaefeb
10,950
py
Python
bambinocampones/src/bambinocampones/website/migrations/0002_auto__add_field_galeria_foi_importante.py
ProfessionalIT/customers
3dbc1989bb3494fb6de7edad67dc59b7b0385ac3
[ "MIT" ]
null
null
null
bambinocampones/src/bambinocampones/website/migrations/0002_auto__add_field_galeria_foi_importante.py
ProfessionalIT/customers
3dbc1989bb3494fb6de7edad67dc59b7b0385ac3
[ "MIT" ]
1
2015-11-08T11:49:35.000Z
2015-11-08T11:49:43.000Z
bambinocampones/src/bambinocampones/website/migrations/0002_auto__add_field_galeria_foi_importante.py
ProfessionalIT/customers
3dbc1989bb3494fb6de7edad67dc59b7b0385ac3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Galeria.foi_importante' db.add_column(u'website_galeria', 'foi_importante', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) def backwards(self, orm): # Deleting field 'Galeria.foi_importante' db.delete_column(u'website_galeria', 'foi_importante') models = { u'website.calendario': { 'Meta': {'object_name': 'Calendario'}, 'data_agendamento': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 12, 4, 0, 0)'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}), 'tipo': ('django.db.models.fields.CharField', [], {'default': "u'E'", 'max_length': '1'}), 'titulo': ('django.db.models.fields.CharField', [], {'max_length': '200'}) }, u'website.cardapio': { 'Meta': {'object_name': 'Cardapio'}, 'ano': ('django.db.models.fields.CharField', [], {'default': "'2013'", 'max_length': '4'}), 'cardapio_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'mes': ('django.db.models.fields.CharField', [], {'default': "'12'", 'max_length': '2'}), 'tipo': ('django.db.models.fields.CharField', [], {'default': "u'1'", 'max_length': '1'}) }, u'website.conteudodownload': { 'Meta': {'object_name': 'ConteudoDownload'}, 'conteudo_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), 'descricao': ('django.db.models.fields.CharField', [], {'max_length': '200'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'miniatura': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}), 'tipo': ('django.db.models.fields.CharField', [], {'default': "u'1'", 'max_length': '1'}), 'titulo': ('django.db.models.fields.CharField', [], {'max_length': '200'}) }, u'website.depoimento': { 'Meta': {'object_name': 'Depoimento'}, 'autor': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'conteudo': ('django.db.models.fields.TextField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) }, u'website.galeria': { 'Meta': {'object_name': 'Galeria'}, 'ano': ('django.db.models.fields.CharField', [], {'default': "'2013'", 'max_length': '4'}), 'descricao': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'destaque': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'foi_importante': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'mes': ('django.db.models.fields.CharField', [], {'default': "'12'", 'max_length': '2'}), 'permite_comentario': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}), 'tipo': ('django.db.models.fields.CharField', [], {'default': "u'F'", 'max_length': '1'}), 'titulo': ('django.db.models.fields.CharField', [], {'max_length': '200'}) }, u'website.galeriaresource': { 'Meta': {'object_name': 'GaleriaResource'}, 'action_resource': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 'galeria': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['website.Galeria']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'upload_resource': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'url_resource': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}) }, u'website.materialescolar': { 'Meta': {'object_name': 'MaterialEscolar'}, 'anexo_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), 'ano': ('django.db.models.fields.CharField', [], {'default': "'2013'", 'max_length': '4'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'miniatura': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), 'servico': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['website.Servico']"}) }, u'website.menu': { 'Meta': {'object_name': 'Menu'}, 'endereco': ('django.db.models.fields.CharField', [], {'max_length': '200'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'menu_pai': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'Menu Pai'", 'null': 'True', 'to': u"orm['website.Menu']"}), 'nivel': ('django.db.models.fields.IntegerField', [], {}), 'ordem': ('django.db.models.fields.IntegerField', [], {}), 'pagina': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['website.Pagina']", 'null': 'True'}), 'palavras_chaves': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'rascunho': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}), 'titulo': ('django.db.models.fields.CharField', [], {'max_length': '200'}) }, u'website.pagina': { 'Meta': {'object_name': 'Pagina'}, 'conteudo': ('django.db.models.fields.TextField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'palavras_chaves': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'permite_comentario': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'rascunho': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}), 'titulo': ('django.db.models.fields.CharField', [], {'max_length': '200'}) }, u'website.parametro': { 'Meta': {'object_name': 'Parametro'}, u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'valor': ('django.db.models.fields.CharField', [], {'max_length': '200'}) }, u'website.professor': { 'Meta': {'object_name': 'Professor'}, u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'nome': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}) }, u'website.publicacao': { 'Meta': {'object_name': 'Publicacao'}, 'completa': ('django.db.models.fields.TextField', [], {}), 'data_hora': ('django.db.models.fields.DateTimeField', [], {}), 'data_publicacao': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'destaque': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'galeria': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['website.Galeria']", 'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'introducao': ('django.db.models.fields.TextField', [], {}), 'miniatura_publicacao': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), 'palavras_chaves': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'permite_comentario': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'rascunho': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}), 'tipos': ('django.db.models.fields.CharField', [], {'default': "u'1'", 'max_length': '1'}), 'titulo': ('django.db.models.fields.CharField', [], {'max_length': '200'}) }, u'website.recomendacao': { 'Meta': {'object_name': 'Recomendacao'}, 'acao_link': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 'descricao': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'destaque': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'miniatura': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), 'tipo': ('django.db.models.fields.CharField', [], {'default': "u'1'", 'max_length': '1'}) }, u'website.servico': { 'Meta': {'object_name': 'Servico'}, 'atividades_extras': ('django.db.models.fields.TextField', [], {}), 'atividades_incluidas': ('django.db.models.fields.TextField', [], {}), 'conteudo_programatico': ('django.db.models.fields.TextField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'observacoes': ('django.db.models.fields.TextField', [], {}), 'professor': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['website.Professor']"}), 'rotina_diaria': ('django.db.models.fields.TextField', [], {}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}), 'titulo': ('django.db.models.fields.CharField', [], {'max_length': '200'}) } } complete_apps = ['website']
69.303797
172
0.541918
1,096
10,950
5.312044
0.119526
0.127791
0.22123
0.316043
0.798179
0.721745
0.70371
0.696153
0.673136
0.645139
0
0.017536
0.218813
10,950
158
173
69.303797
0.663082
0.009041
0
0.367347
0
0
0.562903
0.319708
0
0
0
0
0
1
0.013605
false
0
0.047619
0
0.081633
0
0
0
0
null
0
1
1
0
1
1
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
7952609e9f72568f6207d4ca79537c3b28a117d4
203
py
Python
classy_start/paths.py
mfonism/django-classy-start
70b73e1a836c2ae4c3bae6f53846b07a30a81ac0
[ "MIT" ]
1
2022-01-20T18:48:46.000Z
2022-01-20T18:48:46.000Z
classy_start/paths.py
mfonism/django-classy-start
70b73e1a836c2ae4c3bae6f53846b07a30a81ac0
[ "MIT" ]
8
2020-10-05T15:27:07.000Z
2021-02-16T17:17:54.000Z
classy_start/paths.py
mfonism/django-classy-start
70b73e1a836c2ae4c3bae6f53846b07a30a81ac0
[ "MIT" ]
5
2020-10-05T18:11:44.000Z
2022-01-21T18:33:13.000Z
import pathlib TEMPLATES_DIR = pathlib.Path(__file__).resolve(strict=True).parent / 'conf' APP_TEMPLATES_DIR = TEMPLATES_DIR / 'app_template' PROJECT_TEMPLATES_DIR = TEMPLATES_DIR / 'project_template'
29
75
0.807882
26
203
5.807692
0.538462
0.397351
0.278146
0.317881
0
0
0
0
0
0
0
0
0.093596
203
6
76
33.833333
0.820652
0
0
0
0
0
0.157635
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
798f90e5f4234e1706d47ac52ae151b26363ed30
105
py
Python
autoapi/__init__.py
lhfriedman/sphinx-autoapi
efe815c1df16a616b40b44cb679fda4a4eb7895a
[ "MIT" ]
null
null
null
autoapi/__init__.py
lhfriedman/sphinx-autoapi
efe815c1df16a616b40b44cb679fda4a4eb7895a
[ "MIT" ]
1
2020-07-31T01:19:04.000Z
2020-07-31T01:19:04.000Z
autoapi/__init__.py
lhfriedman/sphinx-autoapi
efe815c1df16a616b40b44cb679fda4a4eb7895a
[ "MIT" ]
null
null
null
""" Sphinx AutoAPI """ from .extension import setup from ._version import __version__, __version_info__
15
51
0.780952
12
105
6
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.133333
105
6
52
17.5
0.791209
0.133333
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
79b9401f776d3b7758cf615a45ec455370cc2331
42
py
Python
tests/identifiers/__init__.py
jparsai/cvejob
8f9462a1ecdf1d4de877ac5f44e772239ffcb379
[ "Apache-2.0" ]
8
2019-09-25T14:45:28.000Z
2021-11-08T10:30:03.000Z
tests/identifiers/__init__.py
jparsai/cvejob
8f9462a1ecdf1d4de877ac5f44e772239ffcb379
[ "Apache-2.0" ]
113
2018-07-10T12:58:16.000Z
2020-12-09T22:33:15.000Z
tests/identifiers/__init__.py
jparsai/cvejob
8f9462a1ecdf1d4de877ac5f44e772239ffcb379
[ "Apache-2.0" ]
12
2018-07-10T11:00:02.000Z
2021-01-27T12:19:56.000Z
"""Tests for package name identifiers."""
21
41
0.714286
5
42
6
1
0
0
0
0
0
0
0
0
0
0
0
0.119048
42
1
42
42
0.810811
0.833333
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
79bf7da39552fc06aca988e7aec5e90f151e4f97
159
py
Python
cart/admin.py
shaongitt/boihut
d93c6b503dd7ad4f37dc572a6dec21f593bf7b35
[ "BSD-2-Clause" ]
null
null
null
cart/admin.py
shaongitt/boihut
d93c6b503dd7ad4f37dc572a6dec21f593bf7b35
[ "BSD-2-Clause" ]
null
null
null
cart/admin.py
shaongitt/boihut
d93c6b503dd7ad4f37dc572a6dec21f593bf7b35
[ "BSD-2-Clause" ]
null
null
null
from django.contrib import admin from .models import Cart,CartItems # Register your models here. admin.site.register(CartItems) admin.site.register(Cart)
26.5
35
0.792453
22
159
5.727273
0.545455
0.142857
0.269841
0
0
0
0
0
0
0
0
0
0.125786
159
5
36
31.8
0.906475
0.163522
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
8dbf72711729ecd397489eebb67c03ca4962e12f
182
py
Python
core/__init__.py
xmings/IdeaNote
a538d4bf012255a19583f9acc57576c44105283e
[ "Apache-2.0" ]
25
2019-11-13T03:35:34.000Z
2022-03-26T04:13:50.000Z
core/__init__.py
xmings/IdeaNote
a538d4bf012255a19583f9acc57576c44105283e
[ "Apache-2.0" ]
3
2019-11-04T06:23:35.000Z
2021-02-08T07:21:04.000Z
core/__init__.py
xmings/IdeaNote
a538d4bf012255a19583f9acc57576c44105283e
[ "Apache-2.0" ]
null
null
null
#!/bin/python # -*- coding: utf-8 -*- # @File : __init__.py # @Author: wangms # @Date : 2018/8/7 from flask import Blueprint core = Blueprint('core', __name__) from . import view
18.2
34
0.648352
25
182
4.4
0.8
0.236364
0
0
0
0
0
0
0
0
0
0.046667
0.175824
182
10
35
18.2
0.686667
0.489011
0
0
0
0
0.044944
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.666667
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
5
8dc7d59fdd262802a1ded4d3d7416e6bb94d267d
118
py
Python
Executor/Tasks/PostRun/__init__.py
EVOLVED-5G/ELCM
07d07a114b667e8c6915ee3ef125dd4864dd2247
[ "Apache-2.0" ]
1
2020-04-16T17:07:46.000Z
2020-04-16T17:07:46.000Z
Executor/Tasks/PostRun/__init__.py
EVOLVED-5G/ELCM
07d07a114b667e8c6915ee3ef125dd4864dd2247
[ "Apache-2.0" ]
3
2020-03-06T11:22:09.000Z
2020-03-06T11:22:10.000Z
Executor/Tasks/PostRun/__init__.py
EVOLVED-5G/ELCM
07d07a114b667e8c6915ee3ef125dd4864dd2247
[ "Apache-2.0" ]
1
2022-02-01T07:56:44.000Z
2022-02-01T07:56:44.000Z
from .decommission import Decommission from .release_resources import ReleaseResources from .farewell import Farewell
29.5
47
0.872881
13
118
7.846154
0.538462
0
0
0
0
0
0
0
0
0
0
0
0.101695
118
3
48
39.333333
0.962264
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
5c429e9d7bfee87526f60bb5e280566fb358a202
80
py
Python
elabjournal/elabjournal/Experiments.py
matthijsbrouwer/elabjournal-python
4063b01993f0bf17ea2857009c1bedc5ace8b87b
[ "Apache-2.0" ]
2
2021-06-29T11:17:27.000Z
2022-01-11T18:41:49.000Z
elabjournal/elabjournal/Experiments.py
matthijsbrouwer/elabjournal-python
4063b01993f0bf17ea2857009c1bedc5ace8b87b
[ "Apache-2.0" ]
null
null
null
elabjournal/elabjournal/Experiments.py
matthijsbrouwer/elabjournal-python
4063b01993f0bf17ea2857009c1bedc5ace8b87b
[ "Apache-2.0" ]
1
2019-06-06T13:23:11.000Z
2019-06-06T13:23:11.000Z
from .eLABJournalPager import * class Experiments(eLABJournalPager): pass
13.333333
36
0.775
7
80
8.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.1625
80
6
37
13.333333
0.925373
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
5
309c11fc57b0f92270c9e810c9427e1dc68d5961
38
py
Python
apis/resources/__init__.py
Fusemachines/fuse-python-training
939bf935646a60817b1da329791e376c7e59464b
[ "FSFAP" ]
null
null
null
apis/resources/__init__.py
Fusemachines/fuse-python-training
939bf935646a60817b1da329791e376c7e59464b
[ "FSFAP" ]
null
null
null
apis/resources/__init__.py
Fusemachines/fuse-python-training
939bf935646a60817b1da329791e376c7e59464b
[ "FSFAP" ]
null
null
null
from apis.resources.users import user
19
37
0.842105
6
38
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.105263
38
1
38
38
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
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
30b203119c6c5793b1d0fe751409e9c5ee26bbf6
53
py
Python
lib/__init__.py
jesseokeya/linkedin-scraper
6b9d5af5167c8c936db63a855a9885728efbfeb5
[ "MIT" ]
null
null
null
lib/__init__.py
jesseokeya/linkedin-scraper
6b9d5af5167c8c936db63a855a9885728efbfeb5
[ "MIT" ]
1
2020-01-04T19:33:58.000Z
2021-09-07T15:03:03.000Z
lib/__init__.py
jesseokeya/linkedin-scraper
6b9d5af5167c8c936db63a855a9885728efbfeb5
[ "MIT" ]
1
2021-12-02T06:51:46.000Z
2021-12-02T06:51:46.000Z
from .scrape import Scrape from .helper import Helper
26.5
26
0.830189
8
53
5.5
0.5
0
0
0
0
0
0
0
0
0
0
0
0.132075
53
2
27
26.5
0.956522
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
30df28d88d0e3028115d06d1db6c4ac57bd2c0df
185
py
Python
Google Kickstart/2019/Round C/circuit_board.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
2
2020-06-25T21:10:32.000Z
2020-12-10T06:53:45.000Z
Google Kickstart/2019/Round C/circuit_board.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
null
null
null
Google Kickstart/2019/Round C/circuit_board.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
3
2020-05-15T14:17:09.000Z
2021-07-25T13:18:20.000Z
for t in range(int(input())): r,c,k = map(int , input().split()) circuit_board = [] for i in range(r): circuit_board.append(list(map(int,input().split())))
26.428571
60
0.551351
28
185
3.571429
0.571429
0.24
0.22
0.32
0
0
0
0
0
0
0
0
0.248649
185
7
61
26.428571
0.719424
0
0
0
0
0
0
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
30e8e22ed734b9dbbb1ecdf7de1dcc755608c15e
40
py
Python
5.3_HANDLER/handler_module.py
pedroMoya/alaska_2_share
a5f958da45b97e8c8cdc0b868e4447dbc500c6f9
[ "MIT" ]
2
2020-06-02T18:39:45.000Z
2021-01-01T19:17:15.000Z
5.3_HANDLER/handler_module.py
pedroMoya/alaska_2_share
a5f958da45b97e8c8cdc0b868e4447dbc500c6f9
[ "MIT" ]
1
2021-01-01T19:17:08.000Z
2021-03-19T00:10:52.000Z
5.3_HANDLER/handler_module.py
pedroMoya/alaska_2_share
a5f958da45b97e8c8cdc0b868e4447dbc500c6f9
[ "MIT" ]
1
2021-01-01T19:17:17.000Z
2021-01-01T19:17:17.000Z
# handler module centralize the control
20
39
0.825
5
40
6.6
1
0
0
0
0
0
0
0
0
0
0
0
0.15
40
1
40
40
0.970588
0.925
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
a50155ac15b87a1b73c7f2ca4058bdf66488534d
1,323
py
Python
examples/cheb/example_dft.py
Hadrien-Montanelli/chebpy
c22f1f13b42b3c80f2e34be6e7136ef2d0277971
[ "MIT" ]
1
2020-12-02T10:17:26.000Z
2020-12-02T10:17:26.000Z
examples/cheb/example_dft.py
Hadrien-Montanelli/chebpy
c22f1f13b42b3c80f2e34be6e7136ef2d0277971
[ "MIT" ]
null
null
null
examples/cheb/example_dft.py
Hadrien-Montanelli/chebpy
c22f1f13b42b3c80f2e34be6e7136ef2d0277971
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 2 15:37:10 2020 Copyright 2020 by Hadrien Montanelli. """ # %% Imports. # Standard library imports: import numpy as np # Chebpy imports: from chebpy.cheb import chebpts, coeffs2vals, vals2coeffs # %% Transforms (1D) on [-1,1]. f = lambda x: np.exp(-10*x**2) n = 100 x = chebpts(n) error = coeffs2vals(vals2coeffs(f(x))) - f(x) print(f'Error (1D): {np.max(np.abs(error)):.2e}') # %% Transforms (1D) on [0,2]. f = lambda x: np.exp(-10*x**2) n = 100 x = chebpts(n, [0, 2]) error = coeffs2vals(vals2coeffs(f(x))) - f(x) print(f'Error (1D): {np.max(np.abs(error)):.2e}') # %% Transforms (2D) on [-1,1]x[-1,1]. f = lambda x, y: np.exp(-10*(x**2 + y**2)) n = 100 x = chebpts(n) y = chebpts(n) X, Y = np.meshgrid(x, y) values = f(X, Y) coeffs = vals2coeffs(vals2coeffs(values).T).T values2 = coeffs2vals(coeffs2vals(coeffs).T).T error = values2 - values print(f'Error (2D): {np.max(np.abs(error)):.2e}') # %% Transforms (2D) on [0,2]x[-1,0]. f = lambda x, y: np.exp(-10*(x**2 + y**2)) n = 100 x = chebpts(n, [0, 2]) y = chebpts(n, [-1, 0]) X, Y = np.meshgrid(x, y) values = f(X, Y) coeffs = vals2coeffs(vals2coeffs(values).T).T values2 = coeffs2vals(coeffs2vals(coeffs).T).T error = values2 - values print(f'Error (2D): {np.max(np.abs(error)):.2e}')
23.625
57
0.619803
238
1,323
3.445378
0.231092
0.019512
0.039024
0.039024
0.709756
0.704878
0.704878
0.704878
0.7
0.678049
0
0.081033
0.151172
1,323
56
58
23.625
0.649154
0.229781
0
0.875
0
0
0.155378
0.10757
0
0
0
0
0
1
0
false
0
0.0625
0
0.0625
0.125
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
ebc77323d31536c2b311a55342b7c92b4fa87b56
5,875
py
Python
tests/integration/test_nornsible_integration.py
PhillSimonds/nornsible
5be98f5bfa66410bc269fa239a53016b4a4ac65a
[ "MIT" ]
null
null
null
tests/integration/test_nornsible_integration.py
PhillSimonds/nornsible
5be98f5bfa66410bc269fa239a53016b4a4ac65a
[ "MIT" ]
null
null
null
tests/integration/test_nornsible_integration.py
PhillSimonds/nornsible
5be98f5bfa66410bc269fa239a53016b4a4ac65a
[ "MIT" ]
null
null
null
from pathlib import Path import sys from unittest.mock import patch from nornir import InitNornir import nornsible from nornsible import InitNornsible, nornsible_delegate, nornsible_task NORNSIBLE_DIR = nornsible.__file__ TEST_DIR = f"{Path(NORNSIBLE_DIR).parents[1]}/tests/" @nornsible_task def custom_task_example(task): return "Hello, world!" @nornsible_task def custom_task_example_2(task): return "Hello, world!" @nornsible_delegate def custom_task_example_3(task): return "Hello, world!" def test_nornsible_task_skip_task(): testargs = ["somescript", "-l", "localhost", "-s", "custom_task_example"] with patch.object(sys, "argv", testargs): nr = InitNornir( inventory={ "plugin": "nornir.plugins.inventory.simple.SimpleInventory", "options": { "host_file": f"{TEST_DIR}_test_nornir_inventory/hosts.yaml", "group_file": f"{TEST_DIR}_test_nornir_inventory/groups.yaml", }, }, logging={"enabled": False}, ) nr = InitNornsible(nr) task_result = nr.run(task=custom_task_example) assert set(task_result.keys()) == {"delegate", "localhost"} assert task_result["localhost"].result == "Task skipped!" assert task_result["delegate"].result == "Task skipped, delegate host!" def test_nornsible_task_skip_task_disable_delegate(): testargs = ["somescript", "-l", "localhost", "-s", "custom_task_example", "-d"] with patch.object(sys, "argv", testargs): nr = InitNornir( inventory={ "plugin": "nornir.plugins.inventory.simple.SimpleInventory", "options": { "host_file": f"{TEST_DIR}_test_nornir_inventory/hosts.yaml", "group_file": f"{TEST_DIR}_test_nornir_inventory/groups.yaml", }, }, logging={"enabled": False}, ) nr = InitNornsible(nr) task_result = nr.run(task=custom_task_example) assert set(task_result.keys()) == {"localhost"} assert task_result["localhost"].result == "Task skipped!" def test_nornsible_task_explicit_task(): testargs = ["somescript", "-l", "localhost", "-t", "custom_task_example_2"] with patch.object(sys, "argv", testargs): nr = InitNornir( inventory={ "plugin": "nornir.plugins.inventory.simple.SimpleInventory", "options": { "host_file": f"{TEST_DIR}_test_nornir_inventory/hosts.yaml", "group_file": f"{TEST_DIR}_test_nornir_inventory/groups.yaml", }, }, logging={"enabled": False}, ) nr = InitNornsible(nr) print(nr.inventory.hosts) tasks = [custom_task_example, custom_task_example_2] task_results = [] for task in tasks: task_results.append(nr.run(task=task)) assert task_results[0]["localhost"].result == "Task skipped!" assert task_results[1]["localhost"].result == "Hello, world!" assert task_results[0]["delegate"].result == "Task skipped, delegate host!" assert task_results[1]["delegate"].result == "Task skipped, delegate host!" def test_nornsible_task_no_tags(): testargs = ["somescript", "-l", "localhost"] with patch.object(sys, "argv", testargs): nr = InitNornir( inventory={ "plugin": "nornir.plugins.inventory.simple.SimpleInventory", "options": { "host_file": f"{TEST_DIR}_test_nornir_inventory/hosts.yaml", "group_file": f"{TEST_DIR}_test_nornir_inventory/groups.yaml", }, }, logging={"enabled": False}, ) nr = InitNornsible(nr) print(nr.inventory.hosts) tasks = [custom_task_example, custom_task_example_2] task_results = [] for task in tasks: task_results.append(nr.run(task=task)) assert task_results[0]["localhost"].result == "Hello, world!" assert task_results[1]["localhost"].result == "Hello, world!" def test_nornsible_delegate(): testargs = ["somescript", "-l", "localhost"] with patch.object(sys, "argv", testargs): nr = InitNornir( inventory={ "plugin": "nornir.plugins.inventory.simple.SimpleInventory", "options": { "host_file": f"{TEST_DIR}_test_nornir_inventory/hosts.yaml", "group_file": f"{TEST_DIR}_test_nornir_inventory/groups.yaml", }, }, logging={"enabled": False}, ) nr = InitNornsible(nr) print(nr.inventory.hosts) tasks = [custom_task_example_3] task_results = [] for task in tasks: task_results.append(nr.run(task=task)) assert task_results[0]["localhost"].result == "Task skipped, non-delegate host!" def test_nornsible_delegate_disable_delegate(): testargs = ["somescript", "-l", "localhost", "-d"] with patch.object(sys, "argv", testargs): nr = InitNornir( inventory={ "plugin": "nornir.plugins.inventory.simple.SimpleInventory", "options": { "host_file": f"{TEST_DIR}_test_nornir_inventory/hosts.yaml", "group_file": f"{TEST_DIR}_test_nornir_inventory/groups.yaml", }, }, logging={"enabled": False}, ) nr = InitNornsible(nr) print(nr.inventory.hosts) tasks = [custom_task_example_3] task_results = [] for task in tasks: task_results.append(nr.run(task=task)) assert task_results[0]["localhost"].result == "Task skipped, delegate host!"
36.042945
88
0.589787
616
5,875
5.375
0.118506
0.053156
0.071882
0.043491
0.89852
0.84476
0.782241
0.774086
0.68952
0.68952
0
0.003778
0.279149
5,875
162
89
36.265432
0.77804
0
0
0.639706
0
0
0.285787
0.147064
0
0
0
0
0.095588
1
0.066176
false
0
0.044118
0.022059
0.132353
0.029412
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
ebca2dfaedf3312d1fbafc3bbd62cb313012d5a5
129
py
Python
yatr/__init__.py
mbodenhamer/yatr
9ebc0de3e474e38d9d79effe3e9c0fec11053024
[ "MIT" ]
null
null
null
yatr/__init__.py
mbodenhamer/yatr
9ebc0de3e474e38d9d79effe3e9c0fec11053024
[ "MIT" ]
1
2021-03-31T18:51:21.000Z
2021-03-31T18:51:21.000Z
yatr/__init__.py
mbodenhamer/yatr
9ebc0de3e474e38d9d79effe3e9c0fec11053024
[ "MIT" ]
1
2017-12-13T13:30:29.000Z
2017-12-13T13:30:29.000Z
__version__ = '0.0.11b' from .base import * from .context import * from .task import * from .env import * from .parse import *
14.333333
23
0.689922
19
129
4.473684
0.526316
0.470588
0
0
0
0
0
0
0
0
0
0.038462
0.193798
129
8
24
16.125
0.778846
0
0
0
0
0
0.054688
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
ccdfefff2e5b0b2164f247904feff97a33210609
47
py
Python
src/week_5/evaluation/__init__.py
Gost2017/text-analytics-lecture
a51976ba7cf7a992af4c0fba52dc9eef57a8155b
[ "MIT" ]
2
2018-03-05T20:45:11.000Z
2019-03-17T02:59:57.000Z
src/week_5/evaluation/__init__.py
Gost2017/text-analytics-lecture
a51976ba7cf7a992af4c0fba52dc9eef57a8155b
[ "MIT" ]
null
null
null
src/week_5/evaluation/__init__.py
Gost2017/text-analytics-lecture
a51976ba7cf7a992af4c0fba52dc9eef57a8155b
[ "MIT" ]
8
2018-03-02T14:12:35.000Z
2018-04-21T10:31:25.000Z
''' Created on 15/03/2018 @author: pelejaf '''
9.4
21
0.638298
7
47
4.285714
1
0
0
0
0
0
0
0
0
0
0
0.2
0.148936
47
5
22
9.4
0.55
0.829787
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
692bcf4ca6a37b28d7cd78b37196366ac2f21606
115
py
Python
lib/extensions/inplace_abn_1/__init__.py
shampooma/openseg.pytorch
d1da408a1e870d52c058c359583bc098f7f3d9e2
[ "MIT" ]
2,671
2019-04-09T16:20:16.000Z
2022-03-31T19:21:29.000Z
lib/extensions/inplace_abn_1/__init__.py
shampooma/openseg.pytorch
d1da408a1e870d52c058c359583bc098f7f3d9e2
[ "MIT" ]
245
2019-05-02T05:10:55.000Z
2022-03-31T07:14:44.000Z
lib/extensions/inplace_abn_1/__init__.py
shampooma/openseg.pytorch
d1da408a1e870d52c058c359583bc098f7f3d9e2
[ "MIT" ]
730
2019-04-16T14:45:56.000Z
2022-03-31T08:59:22.000Z
from .bn import ABN, InPlaceABN, InPlaceABNSync from .functions import ACT_RELU, ACT_LEAKY_RELU, ACT_ELU, ACT_NONE
38.333333
66
0.826087
18
115
5
0.666667
0.155556
0
0
0
0
0
0
0
0
0
0
0.113043
115
2
67
57.5
0.882353
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
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
15e6039e8fc572eeaac3ad290d2bd1f836aa300b
183
py
Python
vega/modules/tensformers/__init__.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
724
2020-06-22T12:05:30.000Z
2022-03-31T07:10:54.000Z
vega/modules/tensformers/__init__.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
147
2020-06-30T13:34:46.000Z
2022-03-29T11:30:17.000Z
vega/modules/tensformers/__init__.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
160
2020-06-29T18:27:58.000Z
2022-03-23T08:42:21.000Z
from .embeddings import BertEmbeddings from .encoder import BertEncoder from .pooler import Pooler from .pertrained_hooks import pretrained_bert_hook, pretrained_bert_classifier_hook
36.6
83
0.879781
23
183
6.73913
0.565217
0.180645
0
0
0
0
0
0
0
0
0
0
0.092896
183
4
84
45.75
0.933735
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
c60d16dc84b1f51d0fe6d4f73e98b08bb5beed06
146
py
Python
VacationPy/api_keys.py
jagfinancial/python-api-challenge
3b15bdd8389dd208efc2fecce6a681ccde54ef6d
[ "ADSL" ]
null
null
null
VacationPy/api_keys.py
jagfinancial/python-api-challenge
3b15bdd8389dd208efc2fecce6a681ccde54ef6d
[ "ADSL" ]
null
null
null
VacationPy/api_keys.py
jagfinancial/python-api-challenge
3b15bdd8389dd208efc2fecce6a681ccde54ef6d
[ "ADSL" ]
null
null
null
# OpenWeatherMap API Key weather_api_key = "3796d9507516315ec2ebdc39473cc6ea" # Google API Key g_key = "AIzaSyDQ3DTH86ntlGML7QCVhKWSocZX8Cb4yBA"
24.333333
52
0.842466
13
146
9.230769
0.615385
0.15
0
0
0
0
0
0
0
0
0
0.206107
0.10274
146
5
53
29.2
0.709924
0.253425
0
0
0
0
0.669811
0.669811
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
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
c6285b947189b318c16d99d170a80d0888fc3b1c
6,485
py
Python
pvlib/test/test_tracking.py
dacoex/pvlib-python
38c0082f264a468015464aff1026a9ac864b4ed5
[ "BSD-3-Clause" ]
null
null
null
pvlib/test/test_tracking.py
dacoex/pvlib-python
38c0082f264a468015464aff1026a9ac864b4ed5
[ "BSD-3-Clause" ]
null
null
null
pvlib/test/test_tracking.py
dacoex/pvlib-python
38c0082f264a468015464aff1026a9ac864b4ed5
[ "BSD-3-Clause" ]
2
2017-03-08T18:38:05.000Z
2018-06-08T07:29:03.000Z
import logging pvl_logger = logging.getLogger('pvlib') import datetime import numpy as np import pandas as pd from nose.tools import raises, assert_almost_equals from nose.plugins.skip import SkipTest from pandas.util.testing import assert_frame_equal from pvlib.location import Location from pvlib import solarposition from pvlib import tracking def test_solar_noon(): apparent_zenith = pd.Series([10]) apparent_azimuth = pd.Series([180]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=0, max_angle=90, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 10, 'surface_azimuth': 90, 'surface_tilt': 0, 'tracker_theta': 0}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) def test_azimuth_north_south(): apparent_zenith = pd.Series([60]) apparent_azimuth = pd.Series([90]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=180, max_angle=90, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 0, 'surface_azimuth': 90, 'surface_tilt': 60, 'tracker_theta': -60}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=0, max_angle=90, backtrack=True, gcr=2.0/7.0) expect['tracker_theta'] *= -1 assert_frame_equal(expect, tracker_data) def test_max_angle(): apparent_zenith = pd.Series([60]) apparent_azimuth = pd.Series([90]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=0, max_angle=45, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 15, 'surface_azimuth': 90, 'surface_tilt': 45, 'tracker_theta': 45}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) def test_backtrack(): apparent_zenith = pd.Series([80]) apparent_azimuth = pd.Series([90]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=0, max_angle=90, backtrack=False, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 0, 'surface_azimuth': 90, 'surface_tilt': 80, 'tracker_theta': 80}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=0, max_angle=90, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 52.5716, 'surface_azimuth': 90, 'surface_tilt': 27.42833, 'tracker_theta': 27.4283}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) def test_axis_tilt(): apparent_zenith = pd.Series([30]) apparent_azimuth = pd.Series([135]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=30, axis_azimuth=180, max_angle=90, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 7.286245, 'surface_azimuth': 37.3427, 'surface_tilt': 35.98741, 'tracker_theta': -20.88121}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=30, axis_azimuth=0, max_angle=90, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 47.6632, 'surface_azimuth': 129.0303, 'surface_tilt': 42.5152, 'tracker_theta': 31.6655}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) def test_axis_azimuth(): apparent_zenith = pd.Series([30]) apparent_azimuth = pd.Series([90]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=90, max_angle=90, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 30, 'surface_azimuth': 180, 'surface_tilt': 0, 'tracker_theta': 0}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) apparent_zenith = pd.Series([30]) apparent_azimuth = pd.Series([180]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=90, max_angle=90, backtrack=True, gcr=2.0/7.0) expect = pd.DataFrame({'aoi': 0, 'surface_azimuth': 180, 'surface_tilt': 30, 'tracker_theta': 30}, index=[0], dtype=np.float64) assert_frame_equal(expect, tracker_data) @raises(ValueError) def test_index_mismatch(): apparent_zenith = pd.Series([30]) apparent_azimuth = pd.Series([90,180]) tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth, axis_tilt=0, axis_azimuth=90, max_angle=90, backtrack=True, gcr=2.0/7.0)
39.30303
81
0.517039
673
6,485
4.745914
0.138187
0.072323
0.055103
0.099875
0.785848
0.754227
0.754227
0.754227
0.741703
0.719474
0
0.069977
0.385197
6,485
165
82
39.30303
0.731126
0
0
0.632479
0
0
0.062442
0
0
0
0
0
0.102564
1
0.059829
false
0
0.08547
0
0.145299
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
c638b2c5e25cf3da6255a0d76be797621245e3cf
23
py
Python
deepnade/buml/Results/__init__.py
marinakiseleva/NADE
69ea890fad1e775dfff2db6dad4dd9d11b6a343e
[ "BSD-3-Clause" ]
null
null
null
deepnade/buml/Results/__init__.py
marinakiseleva/NADE
69ea890fad1e775dfff2db6dad4dd9d11b6a343e
[ "BSD-3-Clause" ]
null
null
null
deepnade/buml/Results/__init__.py
marinakiseleva/NADE
69ea890fad1e775dfff2db6dad4dd9d11b6a343e
[ "BSD-3-Clause" ]
1
2021-10-08T19:54:34.000Z
2021-10-08T19:54:34.000Z
from .Results import *
11.5
22
0.73913
3
23
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.173913
23
1
23
23
0.894737
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
c642cc7668f9eaa2a24f87fd2cd2fe18ccbe3844
8,988
py
Python
booksoai/oaipmh.py
scieloorg/books-oai
b0114f452c2bddb00ce6414a6926c57b548fb46a
[ "BSD-2-Clause" ]
1
2019-03-16T04:44:08.000Z
2019-03-16T04:44:08.000Z
booksoai/oaipmh.py
DalavanCloud/books-oai
b0114f452c2bddb00ce6414a6926c57b548fb46a
[ "BSD-2-Clause" ]
2
2016-06-06T18:04:31.000Z
2018-02-02T15:26:54.000Z
booksoai/oaipmh.py
DalavanCloud/books-oai
b0114f452c2bddb00ce6414a6926c57b548fb46a
[ "BSD-2-Clause" ]
2
2016-06-06T18:03:54.000Z
2019-03-16T04:43:56.000Z
from __future__ import unicode_literals import plumber from lxml import etree from datetime import datetime import pipeline class BadArgumentError(Exception): """Raised when a Verb receives wrong args.""" class CannotDisseminateFormatError(Exception): """Raised when metadata format is not supported""" class BadVerbError(Exception): """Raised when invalid verb is used""" class IDDoesNotExistError(Exception): """Raised when identifier does not exists""" class NoRecordsMatchError(Exception): """ Raised when all parameters combined result in empty list of records """ class BadResumptionTokenError(Exception): """Raised when invalid resumption token is used""" class IdentifyVerb(object): data = { 'repositoryName': 'SciELO Books', 'protocolVersion': '2.0', 'adminEmail': 'scielo.books@scielo.org', 'deletedRecord': 'persistent', 'granularity': 'YYYY-MM-DD' } allowed_args = set(('verb',)) def __init__(self, last_book, request_kwargs, base_url): if set(request_kwargs) != self.allowed_args: raise BadArgumentError() self.data['request'] = request_kwargs self.data['baseURL'] = base_url self.data['earliestDatestamp'] = last_book.get('updated', datetime.now().date().isoformat()) def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.IdentifyNodePipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class ListMetadataFormatsVerb(object): data = { 'formats': [ { 'prefix': 'oai_dc', 'schema': 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd', 'namespace': 'http://www.openarchives.org/OAI/2.0/oai_dc/' } ] } allowed_args = set(('identifier', 'verb')) def __init__(self, request_kwargs, base_url): diff = set(request_kwargs) - self.allowed_args if diff: raise BadArgumentError() self.data['request'] = request_kwargs self.data['baseURL'] = base_url def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.ListMetadataFormatsPipe(), pipeline.MetadataFormatPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class ListIdentifiersVerb(object): allowed_args = set(('from', 'until', 'set', 'resumptionToken', 'metadataPrefix', 'verb')) def __init__(self, books, request_kwargs, base_url): request_set = set(request_kwargs) diff = request_set - self.allowed_args if not 'resumptionToken' in request_set and not 'metadataPrefix' in request_set: raise BadArgumentError() if diff: raise BadArgumentError() self.data = { 'request': request_kwargs, 'baseURL': base_url, 'books': books, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.ListIdentifiersPipe(), pipeline.TearDownPipe() ) result = ppl.run([self.data]) return next(result) class ListSetsVerb(object): allowed_args = set(('resumptionToken', 'verb')) def __init__(self, books, request_kwargs, base_url): diff = set(request_kwargs) - self.allowed_args if diff: raise BadArgumentError() self.data = { 'request': request_kwargs, 'baseURL': base_url, 'books': books.distinct('publisher'), } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.ListSetsPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class GetRecordVerb(object): required_args = set(('identifier', 'metadataPrefix', 'verb')) def __init__(self, books, request_kwargs, base_url): if set(request_kwargs) != self.required_args: raise BadArgumentError() self.data = { 'request': request_kwargs, 'baseURL': base_url, 'books': books } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.GetRecordPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class ListRecordsVerb(object): allowed_args = set(('from', 'until', 'set', 'resumptionToken', 'metadataPrefix', 'verb')) def __init__(self, books, request_kwargs, base_url): request_set = set(request_kwargs) diff = request_set - self.allowed_args if not 'resumptionToken' in request_set and not 'metadataPrefix' in request_set: raise BadArgumentError() if diff: raise BadArgumentError() self.data = { 'request': request_kwargs, 'baseURL': base_url, 'books': books, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.ListRecordsPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class CannotDisseminateFormat(object): def __init__(self, request_kwargs, base_url): self.data = { 'request': request_kwargs, 'baseURL': base_url, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.MetadataFormatErrorPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class BadVerb(object): def __init__(self, request_kwargs, base_url): self.data = { 'request': request_kwargs, 'baseURL': base_url, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.BadVerbPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class IDDoesNotExist(object): def __init__(self, request_kwargs, base_url): self.data = { 'request': request_kwargs, 'baseURL': base_url, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.IdNotExistPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class NoRecordsMatch(object): def __init__(self, request_kwargs, base_url): self.data = { 'request': request_kwargs, 'baseURL': base_url, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.NoRecordsPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class BadArgument(object): def __init__(self, request_kwargs, base_url, books=None): self.data = { 'request': request_kwargs, 'baseURL': base_url, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.BadArgumentPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results) class BadResumptionToken(object): def __init__(self, request_kwargs, base_url, books=None): self.data = { 'request': request_kwargs, 'baseURL': base_url, } def __str__(self): ppl = plumber.Pipeline( pipeline.SetupPipe(), pipeline.ResponseDatePipe(), pipeline.RequestPipe(), pipeline.BadResumptionTokenPipe(), pipeline.TearDownPipe() ) results = ppl.run([self.data]) return next(results)
24.897507
100
0.576435
800
8,988
6.25125
0.17
0.077984
0.026395
0.04799
0.726655
0.726655
0.720456
0.718256
0.716657
0.687063
0
0.00097
0.311972
8,988
360
101
24.966667
0.80773
0.029929
0
0.662651
0
0
0.078165
0.002652
0
0
0
0
0
1
0.096386
false
0
0.02008
0
0.269076
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
c657d8bfb322dd5002f78a47fc6ad0b585ab1382
403
py
Python
packages/markblocks/markblocks/lex/listlexer.py
stattikcms/stattik
5c96d600d105461edb95a11d8050dee3c32edd1e
[ "MIT" ]
1
2021-11-05T06:24:28.000Z
2021-11-05T06:24:28.000Z
packages/markblocks/markblocks/lex/listlexer.py
stattikcms/stattik
5c96d600d105461edb95a11d8050dee3c32edd1e
[ "MIT" ]
null
null
null
packages/markblocks/markblocks/lex/listlexer.py
stattikcms/stattik
5c96d600d105461edb95a11d8050dee3c32edd1e
[ "MIT" ]
null
null
null
from .lexer import Lexer class ListLexer(Lexer): tokens = Lexer.tokens fingerprints = [ (r'(?P<UL>^\*( +)?)', 'UL'), (r'(?P<OL>^\d+.( +)?)', 'OL'), ] def __init__(self): super().__init__() @_(r'^\*( +)?') def UL(self, t): return t @_(r'^\d+.( +)?') def OL(self, t): return t @_(r'.') def SPAN(self, t): return t
18.318182
38
0.419355
47
403
3.361702
0.404255
0.094937
0.208861
0.227848
0.164557
0
0
0
0
0
0
0
0.330025
403
22
39
18.318182
0.585185
0
0
0.166667
0
0
0.141089
0
0
0
0
0
0
1
0.222222
false
0
0.055556
0.166667
0.611111
0.055556
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
d6848f01064221cf2643bf09ab3bba76151a40d4
205
py
Python
main/PluginDemos/connectivityTest/Simulation/connectivityTest.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/PluginDemos/connectivityTest/Simulation/connectivityTest.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/PluginDemos/connectivityTest/Simulation/connectivityTest.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
1
2021-02-26T21:50:29.000Z
2021-02-26T21:50:29.000Z
from cc3d import CompuCellSetup from connectivityTestSteppables import connectivityTestSteppable CompuCellSetup.register_steppable(steppable=connectivityTestSteppable(frequency=1)) CompuCellSetup.run()
25.625
83
0.887805
17
205
10.647059
0.647059
0
0
0
0
0
0
0
0
0
0
0.010417
0.063415
205
7
84
29.285714
0.932292
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d6859b005c6f17914c88f345695e794297b1e815
59
py
Python
models/genetic_algorithms/__init__.py
njellinas/ai-steroids
40e0013bdacb8bee1236305c1384f6b5ac8bd807
[ "MIT" ]
null
null
null
models/genetic_algorithms/__init__.py
njellinas/ai-steroids
40e0013bdacb8bee1236305c1384f6b5ac8bd807
[ "MIT" ]
null
null
null
models/genetic_algorithms/__init__.py
njellinas/ai-steroids
40e0013bdacb8bee1236305c1384f6b5ac8bd807
[ "MIT" ]
null
null
null
from models.genetic_algorithms.population import Population
59
59
0.915254
7
59
7.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.050847
59
1
59
59
0.946429
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
d6d4a59aaae6c52a8e517ab6fdf2ff853e934000
44
py
Python
python/testData/addImport/newFirstImportInBuiltinGroup/main.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/addImport/newFirstImportInBuiltinGroup/main.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/addImport/newFirstImportInBuiltinGroup/main.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
import sys import a print(datetime, sys, a)
11
23
0.75
8
44
4.125
0.625
0
0
0
0
0
0
0
0
0
0
0
0.159091
44
4
23
11
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0.333333
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
ba389c274378dda4739cb2b43943f78e0f632ed1
1,359
py
Python
src/pbn_api/migrations/0021_auto_20210808_1204.py
iplweb/django-bpp
85f183a99d8d5027ae4772efac1e4a9f21675849
[ "BSD-3-Clause" ]
1
2017-04-27T19:50:02.000Z
2017-04-27T19:50:02.000Z
src/pbn_api/migrations/0021_auto_20210808_1204.py
mpasternak/django-bpp
434338821d5ad1aaee598f6327151aba0af66f5e
[ "BSD-3-Clause" ]
41
2019-11-07T00:07:02.000Z
2022-02-27T22:09:39.000Z
src/pbn_api/migrations/0021_auto_20210808_1204.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 3.0.14 on 2021-08-08 10:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("pbn_api", "0020_przemapuj"), ] operations = [ migrations.AlterField( model_name="scientist", name="lastName", field=models.TextField(blank=True, db_index=True, null=True), ), migrations.AlterField( model_name="scientist", name="name", field=models.TextField(blank=True, db_index=True, null=True), ), migrations.AlterField( model_name="scientist", name="orcid", field=models.TextField(blank=True, db_index=True, null=True), ), migrations.AlterField( model_name="scientist", name="pbnId", field=models.TextField(blank=True, db_index=True, null=True), ), migrations.AlterField( model_name="scientist", name="polonUid", field=models.TextField(blank=True, db_index=True, null=True), ), migrations.AlterField( model_name="scientist", name="qualifications", field=models.TextField( blank=True, db_index=True, null=True, verbose_name="Tytuł" ), ), ]
29.543478
74
0.557763
133
1,359
5.586466
0.308271
0.161507
0.201884
0.234186
0.726783
0.726783
0.670256
0.670256
0.670256
0.670256
0
0.021739
0.323032
1,359
45
75
30.2
0.78587
0.033848
0
0.615385
1
0
0.094584
0
0
0
0
0
0
1
0
false
0
0.025641
0
0.102564
0
0
0
0
null
0
1
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ba461124d0a9ab2a2e0ef88850964f9e884cd6d4
1,471
py
Python
tests/test_application_support.py
sturmianseq/thundra-agent-python
4cee02d790eb7b8e4dea4e2e9dcd1f67533b1c56
[ "Apache-2.0" ]
22
2018-03-05T20:02:46.000Z
2021-04-09T12:00:18.000Z
tests/test_application_support.py
sturmianseq/thundra-agent-python
4cee02d790eb7b8e4dea4e2e9dcd1f67533b1c56
[ "Apache-2.0" ]
13
2018-03-26T07:57:57.000Z
2021-06-29T14:22:52.000Z
tests/test_application_support.py
thundra-io/thundra-agent-python
448e18c17d8730c381b2e2a773782cf80c5a7cfb
[ "Apache-2.0" ]
3
2021-08-07T14:19:23.000Z
2021-12-08T15:35:40.000Z
from thundra.application.application_info_provider import ApplicationInfoProvider from thundra.config import config_names from thundra.config.config_provider import ConfigProvider def test_if_can_get_integer_tag(): tag_name = 'integerField' (env_key, env_val) = (config_names.THUNDRA_APPLICATION_TAG_PREFIX + tag_name, 3773) ConfigProvider.set(env_key, str(env_val)) application_tags = ApplicationInfoProvider.parse_application_tags() assert application_tags[tag_name] == env_val def test_if_can_get_float_tag(): tag_name = 'floatField' (env_key, env_val) = (config_names.THUNDRA_APPLICATION_TAG_PREFIX + tag_name, 12.3221) ConfigProvider.set(env_key, str(env_val)) application_tags = ApplicationInfoProvider.parse_application_tags() assert application_tags[tag_name] == env_val def test_if_can_get_string_tag(): tag_name = 'stringField' (env_key, env_val) = (config_names.THUNDRA_APPLICATION_TAG_PREFIX + tag_name, 'fooBar') ConfigProvider.set(env_key, str(env_val)) application_tags = ApplicationInfoProvider.parse_application_tags() assert application_tags[tag_name] == env_val def test_if_can_get_bool_tag(): tag_name = 'boolField' (env_key, env_val) = (config_names.THUNDRA_APPLICATION_TAG_PREFIX + tag_name, True) ConfigProvider.set(env_key, str(env_val)) application_tags = ApplicationInfoProvider.parse_application_tags() assert application_tags[tag_name] == env_val
33.431818
91
0.78518
194
1,471
5.5
0.201031
0.078725
0.033739
0.044986
0.73477
0.720712
0.720712
0.720712
0.720712
0.720712
0
0.007819
0.130523
1,471
43
92
34.209302
0.826427
0
0
0.444444
0
0
0.032631
0
0
0
0
0
0.148148
1
0.148148
false
0
0.111111
0
0.259259
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
ba4e5a47df9a1c04c2352fe65ad51bdbf29bb5ea
42
py
Python
Blinkee/Utils/__init__.py
terenaa/is-blinkee-nearby
0ebf4d3007395ebe6f9283dd09ab325b8f361be2
[ "MIT" ]
1
2019-09-18T03:30:59.000Z
2019-09-18T03:30:59.000Z
Blinkee/Utils/__init__.py
terenaa/is-blinkee-nearby
0ebf4d3007395ebe6f9283dd09ab325b8f361be2
[ "MIT" ]
3
2018-08-27T11:55:36.000Z
2021-08-24T16:54:36.000Z
Blinkee/Utils/__init__.py
terenaa/is-blinkee-nearby
0ebf4d3007395ebe6f9283dd09ab325b8f361be2
[ "MIT" ]
null
null
null
from .Cache import * from .Utils import *
14
20
0.714286
6
42
5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.190476
42
2
21
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
baadf5b6a2a9d890b5b08db05c94ab43db51b053
154
py
Python
src/common/utils/__init__.py
JonasFrey96/RPOSE
7da77499ab777ce7ee37b731541982870da8d40b
[ "BSD-3-Clause" ]
null
null
null
src/common/utils/__init__.py
JonasFrey96/RPOSE
7da77499ab777ce7ee37b731541982870da8d40b
[ "BSD-3-Clause" ]
null
null
null
src/common/utils/__init__.py
JonasFrey96/RPOSE
7da77499ab777ce7ee37b731541982870da8d40b
[ "BSD-3-Clause" ]
null
null
null
from .loading import * from .utils_dict_list import * from .get_logger import get_neptune_logger, get_tensorboard_logger from .map_dict import Map,DotDict
38.5
66
0.844156
24
154
5.083333
0.5
0.163934
0
0
0
0
0
0
0
0
0
0
0.103896
154
4
67
38.5
0.884058
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
bac101b295130fa841be5de62c508bc47b701dd7
157
py
Python
coffee_machine/coffees/__init__.py
mpszumowski/Coffee-Machine
acab8b1b7769d856d5746257507529bcdc9ba7de
[ "MIT" ]
null
null
null
coffee_machine/coffees/__init__.py
mpszumowski/Coffee-Machine
acab8b1b7769d856d5746257507529bcdc9ba7de
[ "MIT" ]
null
null
null
coffee_machine/coffees/__init__.py
mpszumowski/Coffee-Machine
acab8b1b7769d856d5746257507529bcdc9ba7de
[ "MIT" ]
null
null
null
from .abc_coffee import AbcCoffeeProgram from .ingredients import Milk, Coffee from .programs import (Cappuccino, Doppio, Espresso, Latte, Lungo, Macchiato)
39.25
77
0.815287
19
157
6.684211
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.11465
157
3
78
52.333333
0.913669
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
240bde0f8131918a3473ed043729e630fcb5c13f
104
py
Python
kubed/client/__init__.py
joeblackwaslike/kubed
1ee62e269a53d70177330961dc52b9fe4e84b90d
[ "Apache-2.0" ]
null
null
null
kubed/client/__init__.py
joeblackwaslike/kubed
1ee62e269a53d70177330961dc52b9fe4e84b90d
[ "Apache-2.0" ]
null
null
null
kubed/client/__init__.py
joeblackwaslike/kubed
1ee62e269a53d70177330961dc52b9fe4e84b90d
[ "Apache-2.0" ]
null
null
null
from . import config, client, context from .client import APIClient from .context import ClientContext
20.8
37
0.807692
13
104
6.461538
0.538462
0
0
0
0
0
0
0
0
0
0
0
0.144231
104
4
38
26
0.94382
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
24211de62e5f7ff2f91d6b34c32a4b78c252bb72
284
py
Python
tools/replace_fs.py
Dezorian/esp-canary
8cb597120b53d64e56a41e723539c371012b50fe
[ "MIT" ]
20
2021-05-06T19:36:01.000Z
2022-03-16T18:30:28.000Z
tools/replace_fs.py
shafr/esp-honeypot
add1daf680d12cf45776f87da6a478ab3576c974
[ "MIT" ]
16
2021-05-06T19:11:34.000Z
2021-12-23T19:26:16.000Z
tools/replace_fs.py
Dezorian/esp-canary
8cb597120b53d64e56a41e723539c371012b50fe
[ "MIT" ]
3
2021-05-12T10:24:30.000Z
2021-12-22T00:10:01.000Z
Import("env") import platform if platform.system() == 'Windows': print("Replace MKSPIFFSTOOL with mklittlefs.exe") env.Replace (MKSPIFFSTOOL = "tools/mklittlefs.exe") else: print("Replace MKSPIFFSTOOL with mklittlefs") env.Replace (MKSPIFFSTOOL = "tools/mklittlefs")
31.555556
55
0.725352
31
284
6.645161
0.451613
0.368932
0.23301
0.271845
0.728155
0
0
0
0
0
0
0
0.144366
284
9
56
31.555556
0.847737
0
0
0
0
0
0.42807
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0.25
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
2457565434613978e65824abeb9173e30c73221a
480
py
Python
envpy/__init__.py
Combofoods/pyenv
8b33173e593054b8d46a8c3be99c44f7294c7069
[ "MIT" ]
1
2020-07-22T12:19:26.000Z
2020-07-22T12:19:26.000Z
envpy/__init__.py
Combofoods/pyenv
8b33173e593054b8d46a8c3be99c44f7294c7069
[ "MIT" ]
null
null
null
envpy/__init__.py
Combofoods/pyenv
8b33173e593054b8d46a8c3be99c44f7294c7069
[ "MIT" ]
null
null
null
import os from envpy.variables import Var as Variables from envpy.variables import __printenv__ def get_variables(readFile:bool=True, requiredFile:bool=False, readOS:bool=True, filepath:str=f'{os.getcwd()}', filename:str='.env', prefix:str=''): return Variables(readFile=readFile, requiredFile=requiredFile, readOS=readOS, filepath=filepath, filename=filename, prefix=prefix).get_all_variables() def printenv(variables, preat:bool=True): __printenv__(variables, preat)
43.636364
154
0.789583
62
480
5.935484
0.419355
0.065217
0.097826
0.130435
0
0
0
0
0
0
0
0
0.0875
480
11
155
43.636364
0.840183
0
0
0
0
0
0.035343
0
0
0
0
0
0
1
0.285714
false
0
0.428571
0.142857
0.857143
0.428571
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
1
0
5
24685b6b4438884df1658a8b24d9222661482d53
279
py
Python
pyaudio_fix.py
cyberboysumanjay/VoiceAssistant
a8dcfe6bf5fdbbdbfc50cd2a20f646d8844d4297
[ "MIT" ]
11
2018-09-23T10:15:40.000Z
2022-02-13T19:49:59.000Z
pyaudio_fix.py
ALBINPRAVEEN/Jarvis-Assistant
4269088a484ac57b5adb3417efb5b78c7a7d89ed
[ "FSFAP" ]
null
null
null
pyaudio_fix.py
ALBINPRAVEEN/Jarvis-Assistant
4269088a484ac57b5adb3417efb5b78c7a7d89ed
[ "FSFAP" ]
3
2020-06-28T02:47:43.000Z
2021-08-16T19:03:12.000Z
""" import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()) print(p.get_device_info_by_index(i)) """ import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()): info = p.get_device_info_by_index(i) print(info['index'], info['name'])
21.461538
40
0.698925
47
279
3.893617
0.319149
0.087432
0.218579
0.229508
0.830601
0.830601
0.830601
0.590164
0.590164
0.590164
0
0
0.139785
279
12
41
23.25
0.7625
0.408602
0
0
0
0
0.057325
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.2
0
0
0
null
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2469efb06c9e4b043a1091af06f2066f495a964d
4,847
py
Python
epytope/Data/pssms/arb/mat/A_0203_11.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
7
2021-02-01T18:11:28.000Z
2022-01-31T19:14:07.000Z
epytope/Data/pssms/arb/mat/A_0203_11.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
22
2021-01-02T15:25:23.000Z
2022-03-14T11:32:53.000Z
epytope/Data/pssms/arb/mat/A_0203_11.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
4
2021-05-28T08:50:38.000Z
2022-03-14T11:45:32.000Z
A_0203_11 = {0: {'A': -0.12570904708437197, 'C': -0.20260572185781892, 'E': -4.0, 'D': -4.0, 'G': -4.0, 'F': -4.0, 'I': 0.7830374415420228, 'H': -0.6847918068824875, 'K': -0.6847918068824875, 'M': 0.981018297402464, 'L': 1.1760718746127061, 'N': -0.09649609424570203, 'Q': 0.39410708558422325, 'P': -4.0, 'S': -0.20260572185781892, 'R': -0.4643452234664465, 'T': -0.20260572185781892, 'W': -4.0, 'V': 0.981018297402464, 'Y': -4.0}, 1: {'A': -0.3403513392977473, 'C': -0.5706629683616748, 'E': -0.8255548505683803, 'D': -0.8255548505683803, 'G': -4.0, 'F': -4.0, 'I': 0.9531395462189001, 'H': -4.0, 'K': -4.0, 'M': 0.6129250324406762, 'L': 1.228331821009925, 'N': -4.0, 'Q': -4.0, 'P': -4.0, 'S': -0.5706629683616748, 'R': -4.0, 'T': -0.562748417416651, 'W': -4.0, 'V': -0.33761786332302834, 'Y': -4.0}, 2: {'A': -4.0, 'C': -4.0, 'E': 0.23670505214784382, 'D': 0.23670505214784382, 'G': -4.0, 'F': -4.0, 'I': 0.42243027379318165, 'H': -1.1231934889064845, 'K': -1.1231934889064845, 'M': 0.42243027379318165, 'L': 0.49079465357298746, 'N': -0.6340925619710869, 'Q': -0.9864687962058627, 'P': 0.8737459206814067, 'S': -4.0, 'R': -1.2985424934801089, 'T': -4.0, 'W': -4.0, 'V': 0.42243027379318165, 'Y': -4.0}, 3: {'A': -4.0, 'C': -0.10268688515087193, 'E': 0.798625443205945, 'D': 0.04685544415564716, 'G': -0.8713665210100304, 'F': -0.11724471547541107, 'I': 0.5023433941416019, 'H': 0.1964127848099425, 'K': 0.1964127848099425, 'M': 0.5023433941416019, 'L': 0.8648526865940196, 'N': -1.246319293273537, 'Q': -1.246319293273537, 'P': -4.0, 'S': -0.225063321826744, 'R': 0.1964127848099425, 'T': -0.10268688515087193, 'W': -0.11724471547541107, 'V': 0.5023433941416019, 'Y': -0.11724471547541107}, 4: {'A': -0.15538479149430195, 'C': -0.5729222482329892, 'E': 0.5608828212675953, 'D': 0.4377951470419558, 'G': 0.9044127857344268, 'F': -4.0, 'I': -0.37532329845920753, 'H': 0.7629678170164823, 'K': 0.7629678170164823, 'M': -0.30615329374291206, 'L': -0.30615329374291206, 'N': 0.1902506596653246, 'Q': -0.02201461690735955, 'P': -4.0, 'S': -0.7926623896862102, 'R': 0.7629678170164823, 'T': -0.5729222482329892, 'W': -4.0, 'V': -0.30615329374291206, 'Y': -4.0}, 5: {'A': -4.0, 'C': 0.24400425857325767, 'E': -0.09482336309954434, 'D': 0.11453889603948189, 'G': -0.05773521834250697, 'F': -4.0, 'I': 0.9402027034114638, 'H': -0.17809486610864272, 'K': -0.17809486610864272, 'M': -0.13069486723141577, 'L': -1.0852448817585207, 'N': -4.0, 'Q': -4.0, 'P': -4.0, 'S': 0.24400425857325767, 'R': -0.17313599795719686, 'T': 0.24400425857325767, 'W': -4.0, 'V': -0.13069486723141577, 'Y': -4.0}, 6: {'A': -4.0, 'C': -0.23263505475693882, 'E': -0.139933797054501, 'D': -1.0294883184337862, 'G': 0.2745172870714848, 'F': -4.0, 'I': 0.002696009692144382, 'H': -4.0, 'K': -4.0, 'M': 0.002696009692144382, 'L': 0.20098566078545885, 'N': -4.0, 'Q': -4.0, 'P': -0.013076289259420854, 'S': -0.23263505475693882, 'R': -4.0, 'T': -0.5182826632227399, 'W': -4.0, 'V': 0.1886119940743905, 'Y': -4.0}, 7: {'A': -0.7959587403534084, 'C': -0.4056706424113438, 'E': 0.04508448172902091, 'D': 0.04508448172902091, 'G': 0.3178958696288293, 'F': -0.3919711008500978, 'I': 0.693568217814708, 'H': -0.22333454873323907, 'K': -0.22333454873323907, 'M': 0.693568217814708, 'L': 0.7163076440262162, 'N': -0.18296238410395974, 'Q': -0.18296238410395974, 'P': -4.0, 'S': -0.4056706424113438, 'R': -0.22333454873323907, 'T': 0.2038261916632583, 'W': -0.3919711008500978, 'V': 0.693568217814708, 'Y': -0.3919711008500978}, 8: {'A': -4.0, 'C': 0.26023555367482776, 'E': -0.3538520240116577, 'D': -0.23418903787985348, 'G': -4.0, 'F': -1.1226887683330944, 'I': 0.582578651051582, 'H': -0.1888189196560037, 'K': -0.1888189196560037, 'M': 0.582578651051582, 'L': 1.2978761471202371, 'N': 0.6545307662702273, 'Q': 0.3292391040113501, 'P': -4.0, 'S': 0.26023555367482776, 'R': -0.1888189196560037, 'T': 0.26023555367482776, 'W': -1.1226887683330944, 'V': 0.582578651051582, 'Y': -1.1226887683330944}, 9: {'A': 0.20062112019547046, 'C': -0.2854309411856969, 'E': -4.0, 'D': -4.0, 'G': -0.6046621948352506, 'F': -4.0, 'I': 0.7395851595080252, 'H': -0.5200214452987034, 'K': -0.5200214452987034, 'M': 0.3813834296984175, 'L': 0.24856066321801923, 'N': -0.7874703169589286, 'Q': -0.7874703169589286, 'P': -4.0, 'S': -0.2854309411856969, 'R': -0.5200214452987034, 'T': -0.404652124993784, 'W': -4.0, 'V': 0.18080996663942733, 'Y': -4.0}, 10: {'A': 0.3821540129505695, 'C': -4.0, 'E': -4.0, 'D': -4.0, 'G': -4.0, 'F': -1.3249184992500316, 'I': 0.7372045737079358, 'H': -1.2530000347896086, 'K': -1.2530000347896086, 'M': 1.1325335673883987, 'L': 0.015146957676202309, 'N': -4.0, 'Q': -4.0, 'P': -4.0, 'S': -4.0, 'R': -1.2530000347896086, 'T': -4.0, 'W': -1.3249184992500316, 'V': 1.5210080375139177, 'Y': -1.3267309428143914}, -1: {'slope': 0.11563050533541314, 'intercept': -0.058700970796826395}}
4,847
4,847
0.637095
681
4,847
4.531571
0.202643
0.042774
0.008749
0.011666
0.075178
0.033053
0.033053
0.028516
0.01685
0.01685
0
0.649431
0.094285
4,847
1
4,847
4,847
0.053531
0
0
0
0
0
0.048267
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
79ee257a6e81aff9dbeef481d3f2ffa679f4e55f
261
py
Python
reamber/bms/lists/notes/BMSNoteList.py
Bestfast/reamberPy
91b76ca6adf11fbe8b7cee7c186481776a4d7aaa
[ "MIT" ]
null
null
null
reamber/bms/lists/notes/BMSNoteList.py
Bestfast/reamberPy
91b76ca6adf11fbe8b7cee7c186481776a4d7aaa
[ "MIT" ]
null
null
null
reamber/bms/lists/notes/BMSNoteList.py
Bestfast/reamberPy
91b76ca6adf11fbe8b7cee7c186481776a4d7aaa
[ "MIT" ]
null
null
null
from abc import ABC from typing import List, Type from reamber.base.lists.notes.NoteList import NoteList class BMSNoteList(NoteList, ABC): def data(self) -> List[Type]: pass def samples(self) -> List[float]: return self.attribute('sample')
20.076923
54
0.708812
36
261
5.138889
0.611111
0.086486
0
0
0
0
0
0
0
0
0
0
0.183908
261
12
55
21.75
0.868545
0
0
0
0
0
0.023077
0
0
0
0
0
0
1
0.285714
false
0.142857
0.428571
0.142857
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
1
1
1
0
0
5
035fd4e11ff8cdfd3b51151077ef144b5f439568
108
py
Python
Python/basic/django/minimal/echo/views.py
caa06d9c/Python-examples
9d90b9a9adfc343f9fdfab814cfc2b05219d6920
[ "MIT" ]
5
2019-10-28T09:56:26.000Z
2021-09-03T04:51:18.000Z
Python/basic/django/minimal/echo/views.py
caa06d9c/Python-examples
9d90b9a9adfc343f9fdfab814cfc2b05219d6920
[ "MIT" ]
null
null
null
Python/basic/django/minimal/echo/views.py
caa06d9c/Python-examples
9d90b9a9adfc343f9fdfab814cfc2b05219d6920
[ "MIT" ]
4
2019-10-28T09:56:30.000Z
2021-09-03T04:51:23.000Z
from django.http import HttpResponse def index(request): return HttpResponse(request.get_full_path())
18
48
0.787037
14
108
5.928571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.12963
108
5
49
21.6
0.882979
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
0
0
0
5
302802899cbe877d306af7d92c456a506768688c
103
py
Python
utils/__init__.py
riven314/AL-MDN
5f843e2e7c99f3ae36e8139ec0d8aaa4a78d4962
[ "BSD-Source-Code" ]
59
2021-10-13T22:59:19.000Z
2022-03-26T20:44:47.000Z
utils/__init__.py
jwchoi384/AL-MDN
54aaae4405c69b33998e5b5306c7c645780d473c
[ "BSD-Source-Code" ]
10
2021-11-02T06:35:24.000Z
2022-03-26T21:08:06.000Z
utils/__init__.py
jwchoi384/AL-MDN
54aaae4405c69b33998e5b5306c7c645780d473c
[ "BSD-Source-Code" ]
9
2021-10-14T09:48:05.000Z
2022-03-27T06:04:32.000Z
# Originated from https://github.com/amdegroot/ssd.pytorch from .augmentations import SSDAugmentation
25.75
58
0.825243
12
103
7.083333
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.087379
103
3
59
34.333333
0.904255
0.543689
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
30325bbf9ed4d06063912ef3759ddd07cefbb4f5
133
py
Python
python/numba_chol.py
sevagh/cholesky
bf5404bdaab497409c517312d5a234c6a5ffe9cf
[ "BSD-3-Clause" ]
null
null
null
python/numba_chol.py
sevagh/cholesky
bf5404bdaab497409c517312d5a234c6a5ffe9cf
[ "BSD-3-Clause" ]
null
null
null
python/numba_chol.py
sevagh/cholesky
bf5404bdaab497409c517312d5a234c6a5ffe9cf
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from numba import jit @jit def cholesky(in_arr, out_arr, n): np.copyto(out_arr, np.linalg.cholesky(in_arr))
16.625
50
0.736842
25
133
3.76
0.6
0.212766
0.276596
0
0
0
0
0
0
0
0
0
0.157895
133
7
51
19
0.839286
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.6
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
30350c07d409b3ddee9b9e26e89145475e5ec90e
120
py
Python
tmp/admin.py
infiltratorXYZ/invoicer
9b3542040b0e8268b2f725eeee8b806f9ca61a6d
[ "MIT" ]
null
null
null
tmp/admin.py
infiltratorXYZ/invoicer
9b3542040b0e8268b2f725eeee8b806f9ca61a6d
[ "MIT" ]
null
null
null
tmp/admin.py
infiltratorXYZ/invoicer
9b3542040b0e8268b2f725eeee8b806f9ca61a6d
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Invoice # Register your models here. admin.site.register(Invoice)
20
32
0.808333
17
120
5.705882
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.125
120
5
33
24
0.92381
0.216667
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
304a63e43cefe3d1aae18e577a8dfda944354797
133
py
Python
Python/basic-py/exercise_13.py
nhutnamhcmus/code
22b528084ed234fcabca89cf1ba02a2c347007bc
[ "MIT" ]
1
2020-10-12T18:33:22.000Z
2020-10-12T18:33:22.000Z
Python/basic-py/exercise_13.py
nhutnamhcmus/code
22b528084ed234fcabca89cf1ba02a2c347007bc
[ "MIT" ]
null
null
null
Python/basic-py/exercise_13.py
nhutnamhcmus/code
22b528084ed234fcabca89cf1ba02a2c347007bc
[ "MIT" ]
null
null
null
def even_square_sum(list): even = [x * x for x in list if x % 2 == 0] return sum(even) print(even_square_sum([1, 2, 3, 4, 5]))
26.6
44
0.609023
28
133
2.75
0.607143
0.25974
0.337662
0
0
0
0
0
0
0
0
0.067961
0.225564
133
5
45
26.6
0.679612
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0.25
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
3071af0749c01686288f8589d2c98b2a1b6a707c
153
py
Python
modules/Export_To_File.py
Blackfoot50115/Password_Generator
2e99708fae5a3cc91702b68497e4520a558481b3
[ "MIT" ]
null
null
null
modules/Export_To_File.py
Blackfoot50115/Password_Generator
2e99708fae5a3cc91702b68497e4520a558481b3
[ "MIT" ]
7
2019-05-09T04:17:51.000Z
2019-05-16T00:38:55.000Z
modules/Export_To_File.py
Blackfoot50115/Password_Generator
2e99708fae5a3cc91702b68497e4520a558481b3
[ "MIT" ]
1
2019-05-07T12:15:55.000Z
2019-05-07T12:15:55.000Z
def append_file(password, file_path): password_file = open(file_path, "a+") password_file.write(password + "\r\n") password_file.close()
17
42
0.679739
21
153
4.666667
0.52381
0.489796
0
0
0
0
0
0
0
0
0
0
0.176471
153
8
43
19.125
0.777778
0
0
0
0
0
0.04
0
0
0
0
0
0
1
0.25
false
1
0
0
0.25
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
1
0
0
0
0
0
5
06315d61570f26c6f3e6abf1ddc7df8cd17de830
44
py
Python
20200428/src/doct/addd_test.py
vultar150/Pyprac
72fab30229ff632df8792eae17492f671e1d60e4
[ "Apache-2.0" ]
null
null
null
20200428/src/doct/addd_test.py
vultar150/Pyprac
72fab30229ff632df8792eae17492f671e1d60e4
[ "Apache-2.0" ]
null
null
null
20200428/src/doct/addd_test.py
vultar150/Pyprac
72fab30229ff632df8792eae17492f671e1d60e4
[ "Apache-2.0" ]
null
null
null
import doctest doctest.testfile("addd.rst")
14.666667
28
0.795455
6
44
5.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.068182
44
2
29
22
0.853659
0
0
0
0
0
0.181818
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
0647d34191beaa453acced9a85d7fac8926ac453
110
py
Python
pre_questionnaire/admin.py
AurelienNioche/ModelingMadeEasyApp
dbb738dda204906c5f4b7aeb9c71feea961a4cce
[ "MIT" ]
null
null
null
pre_questionnaire/admin.py
AurelienNioche/ModelingMadeEasyApp
dbb738dda204906c5f4b7aeb9c71feea961a4cce
[ "MIT" ]
null
null
null
pre_questionnaire/admin.py
AurelienNioche/ModelingMadeEasyApp
dbb738dda204906c5f4b7aeb9c71feea961a4cce
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import PreQuestionnaire admin.site.register(PreQuestionnaire)
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
0650fe2b4a8ec05a4f26bd56fccd6338468b7b46
913
py
Python
parc/instruction.py
kevinyuan/pydgin
9e5dea526a17b23929b2a1d24598154b42323073
[ "BSD-3-Clause" ]
159
2015-02-12T03:28:25.000Z
2022-02-24T22:40:35.000Z
parc/instruction.py
kevinyuan/pydgin
9e5dea526a17b23929b2a1d24598154b42323073
[ "BSD-3-Clause" ]
21
2015-01-31T23:47:26.000Z
2020-12-21T12:41:08.000Z
parc/instruction.py
kevinyuan/pydgin
9e5dea526a17b23929b2a1d24598154b42323073
[ "BSD-3-Clause" ]
40
2015-01-28T21:31:30.000Z
2022-01-25T12:50:23.000Z
#======================================================================= # instruction.py #======================================================================= from pydgin.utils import r_uint class Instruction( object ): def __init__( self, bits, str ): self.bits = r_uint( bits ) self.str = str @property def rd( self ): return (self.bits >> 11) & 0x1F @property def rt( self ): return (self.bits >> 16) & 0x1F @property def rs( self ): return (self.bits >> 21) & 0x1F @property def fd( self ): return (self.bits >> 6) & 0x1F @property def ft( self ): return (self.bits >> 16) & 0x1F @property def fs( self ): return (self.bits >> 11) & 0x1F @property def imm( self ): return self.bits & 0xFFFF @property def jtarg( self ): return self.bits & 0x3FFFFFF @property def shamt( self ): return (self.bits >> 6) & 0x1F
19.020833
72
0.496166
103
913
4.339806
0.320388
0.196868
0.281879
0.362416
0.416107
0.416107
0.313199
0.313199
0
0
0
0.041667
0.237678
913
47
73
19.425532
0.600575
0.171961
0
0.46875
0
0
0
0
0
0
0.057181
0
0
1
0.3125
false
0
0.03125
0.28125
0.65625
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
0655cb7f1c625d52133699a96d2f35fe1b202f17
13,279
py
Python
pyaccords/pysrc/ec2instanceinfo.py
MarouenMechtri/accords-platform-1
4f950fffd9fbbf911840cc5ad0fe5b5a331edf42
[ "Apache-2.0" ]
1
2015-02-28T21:25:54.000Z
2015-02-28T21:25:54.000Z
pyaccords/pysrc/ec2instanceinfo.py
MarouenMechtri/accords-platform-1
4f950fffd9fbbf911840cc5ad0fe5b5a331edf42
[ "Apache-2.0" ]
null
null
null
pyaccords/pysrc/ec2instanceinfo.py
MarouenMechtri/accords-platform-1
4f950fffd9fbbf911840cc5ad0fe5b5a331edf42
[ "Apache-2.0" ]
null
null
null
############################################################################## #copyright 2013, Hamid MEDJAHED (hmedjahed@prologue.fr) Prologue # #Licensed under the Apache License, Version 2.0 (the "License"); # #you may not use this file except in compliance with the License. # #You may obtain a copy of the License at # # # # http://www.apache.org/licenses/LICENSE-2.0 # # # #Unless required by applicable law or agreed to in writing, software # #distributed under the License is distributed on an "AS IS" BASIS, # #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # #See the License for the specific language governing permissions and # #limitations under the License. # ############################################################################## import HTMLParser data = ''' <table cellspacing="0" class="table table-bordered table-hover table-condensed" id="data"> <thead> <tr> <th class="name">Name</th> <th class="memory">Memory</th> <th class="computeunits"> <abbr title="One EC2 Compute Unit provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor.">Compute Units</abbr> </th> <th class="storage">Storage</th> <th class="architecture">Architecture</th> <th class="ioperf">I/O Performance</th> <th class="maxips"> <abbr title="Adding additional IPs requires launching the instance in a VPC.">Max IPs</abbr> </th> <th class="apiname">API Name</th> <th class="cost">Linux cost</th> <th class="cost">Windows cost</th> </tr> </thead> <tbody> <tr> <td class="name">M1 Small</td> <td class="memory"><span sort="1.7">1.70 GB</span></td> <td class="computeunits"><span sort="1">1</span></td> <td class="storage"><span sort="160">160 GB</span></td> <td class="architecture">32/64-bit</td> <td class="ioperf"><span sort="1">Moderate</span></td> <td class="maxips">8</td> <td class="apiname">m1.small</td> <td class="cost" hour_cost="0.060">$0.060 per hour</td> <td class="cost" hour_cost="0.115">$0.115 per hour</td> </tr> <tr> <td class="name">M1 Medium</td> <td class="memory"><span sort="3.75">3.75 GB</span></td> <td class="computeunits"><span sort="2">2</span></td> <td class="storage"><span sort="410">410 GB</span></td> <td class="architecture">32/64-bit</td> <td class="ioperf"><span sort="1">Moderate</span></td> <td class="maxips">12</td> <td class="apiname">m1.medium</td> <td class="cost" hour_cost="0.12">$0.12 per hour</td> <td class="cost" hour_cost="0.23">$0.23 per hour</td> </tr> <tr> <td class="name">M1 Large</td> <td class="memory"><span sort="7.5">7.50 GB</span></td> <td class="computeunits"><span sort="4">4</span></td> <td class="storage"><span sort="850">850 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="3">High</span></td> <td class="maxips">30</td> <td class="apiname">m1.large</td> <td class="cost" hour_cost="0.24">$0.24 per hour</td> <td class="cost" hour_cost="0.46">$0.46 per hour</td> </tr> <tr> <td class="name">M1 Extra Large</td> <td class="memory"><span sort="15">15.00 GB</span></td> <td class="computeunits"><span sort="8">8</span></td> <td class="storage"><span sort="1690">1690 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="3">High</span></td> <td class="maxips">60</td> <td class="apiname">m1.xlarge</td> <td class="cost" hour_cost="0.48">$0.48 per hour</td> <td class="cost" hour_cost="0.92">$0.92 per hour</td> </tr> <tr> <td class="name">Micro</td> <td class="memory"><span sort="0.6">0.60 GB</span></td> <td class="computeunits"><span sort="2">2</span></td> <td class="storage"><span sort="0">0 GB</span></td> <td class="architecture">32/64-bit</td> <td class="ioperf"><span sort="0">Low</span></td> <td class="maxips">1</td> <td class="apiname">t1.micro</td> <td class="cost" hour_cost="0.02">$0.02 per hour</td> <td class="cost" hour_cost="0.02">$0.02 per hour</td> </tr> <tr> <td class="name">High-Memory Extra Large</td> <td class="memory"><span sort="17.10">17.10 GB</span></td> <td class="computeunits"><span sort="6.5">6.5</span></td> <td class="storage"><span sort="420">420 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="1">Moderate</span></td> <td class="maxips">60</td> <td class="apiname">m2.xlarge</td> <td class="cost" hour_cost="0.41">$0.41 per hour</td> <td class="cost" hour_cost="0.57">$0.57 per hour</td> </tr> <tr> <td class="name">High-Memory Double Extra Large</td> <td class="memory"><span sort="34.2">34.20 GB</span></td> <td class="computeunits"><span sort="13">13</span></td> <td class="storage"><span sort="850">850 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="2">High</span></td> <td class="maxips">120</td> <td class="apiname">m2.2xlarge</td> <td class="cost" hour_cost="0.82">$0.82 per hour</td> <td class="cost" hour_cost="1.14">$1.14 per hour</td> </tr> <tr> <td class="name">High-Memory Quadruple Extra Large</td> <td class="memory"><span sort="68.4">68.40 GB</span></td> <td class="computeunits"><span sort="26">26</span></td> <td class="storage"><span sort="1690">1690 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="3">High</span></td> <td class="maxips">240</td> <td class="apiname">m2.4xlarge</td> <td class="cost" hour_cost="1.64">$1.64 per hour</td> <td class="cost" hour_cost="2.28">$2.28 per hour</td> </tr> <tr> <td class="name">M3 Extra Large</td> <td class="memory"><span sort="15">15.00 GB</span></td> <td class="computeunits"><span sort="13">13</span></td> <td class="storage"><span sort="0">0 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="1">Moderate</span></td> <td class="maxips">60</td> <td class="apiname">m3.xlarge</td> <td class="cost" hour_cost="0.50">$0.50 per hour</td> <td class="cost" hour_cost="0.98">$0.98 per hour</td> </tr> <tr> <td class="name">M3 Double Extra Large</td> <td class="memory"><span sort="30">30.00 GB</span></td> <td class="computeunits"><span sort="26">26</span></td> <td class="storage"><span sort="0">0 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="2">High</span></td> <td class="maxips">120</td> <td class="apiname">m3.2xlarge</td> <td class="cost" hour_cost="1.00">$1.00 per hour</td> <td class="cost" hour_cost="1.96">$1.96 per hour</td> </tr> <tr> <td class="name">High-CPU Medium</td> <td class="memory"><span sort="1.7">1.70 GB</span></td> <td class="computeunits"><span sort="5">5</span></td> <td class="storage"><span sort="350">350 GB</span></td> <td class="architecture">32_64-bit</td> <td class="ioperf"><span sort="1">Moderate</span></td> <td class="maxips">12</td> <td class="apiname">c1.medium</td> <td class="cost" hour_cost="0.145">$0.145 per hour</td> <td class="cost" hour_cost="0.285">$0.285 per hour</td> </tr> <tr> <td class="name">High-CPU Extra Large</td> <td class="memory"><span sort="7">7.00 GB</span></td> <td class="computeunits"><span sort="20">20</span></td> <td class="storage"><span sort="1690">1690 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="2">High</span></td> <td class="maxips">60</td> <td class="apiname">c1.xlarge</td> <td class="cost" hour_cost="0.58">$0.58 per hour</td> <td class="cost" hour_cost="1.14">$1.14 per hour</td> </tr> <tr> <td class="name">Cluster Compute Quadruple Extra Large</td> <td class="memory"><span sort="23">23.00 GB</span></td> <td class="computeunits"><span sort="33.5">33.5</span></td> <td class="storage"><span sort="1690">1690 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="4">Very High</sort></td> <td class="maxips">1</td> <td class="apiname">cc1.4xlarge</td> <td class="cost" hour_cost="1.30">$1.30 per hour</td> <td class="cost" hour_cost="1.61">$1.61 per hour</td> </tr> <tr> <td class="name">Cluster Compute Eight Extra Large</td> <td class="memory"><span sort="60.5">60.50 GB</span></td> <td class="computeunits"><span sort="88">88</span></td> <td class="storage"><span sort="3370">3370 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="4">Very High</sort></td> <td class="maxips">240</td> <td class="apiname">cc2.8xlarge</td> <td class="cost" hour_cost="2.40">$2.40 per hour</td> <td class="cost" hour_cost="2.97">$2.97 per hour</td> </tr> <tr> <td class="name">Cluster GPU Quadruple Extra Large</td> <td class="memory"><span sort="22">22.00 GB</span></td> <td class="computeunits"><span sort="33.5">33.5</span></td> <td class="storage"><span sort="1690">1690 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="4">Very High</sort></td> <td class="maxips">1</td> <td class="apiname">cg1.4xlarge</td> <td class="cost" hour_cost="2.10">$2.10 per hour</td> <td class="cost" hour_cost="2.60">$2.60 per hour</td> </tr> <tr> <td class="name">High I/O Quadruple Extra Large</td> <td class="memory"><span sort="60.5">60.50 GB</span></td> <td class="computeunits"><span sort="35">35</span></td> <td class="storage"><span sort="2048">2048 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="4">Very High</sort></td> <td class="maxips">1</td> <td class="apiname">hi1.4xlarge</td> <td class="cost" hour_cost="3.10">$3.10 per hour</td> <td class="cost" hour_cost="3.58">$3.58 per hour</td> </tr> <tr> <td class="name">High Storage Eight Extra Large</td> <td class="memory"><span sort="117.00">117.00 GB</span></td> <td class="computeunits"><span sort="35">35</span></td> <td class="storage"><span sort="49152">48 TB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="4">Very High</sort></td> <td class="maxips">1</td> <td class="apiname">hs1.8xlarge</td> <td class="cost" hour_cost="4.600">$4.600 per hour</td> <td class="cost" hour_cost="4.931">$4.931 per hour</td> </tr> <tr> <td class="name">High Memory Cluster Eight Extra Large</td> <td class="memory"><span sort="244.00">244.00 GB</span></td> <td class="computeunits"><span sort="88">88</span></td> <td class="storage"><span sort="240">240 GB</span></td> <td class="architecture">64-bit</td> <td class="ioperf"><span sort="4">Very High</sort></td> <td class="maxips">1</td> <td class="apiname">cr1.8xlarge</td> <td class="cost" hour_cost="3.500">$3.500 per hour</td> <td class="cost" hour_cost="3.831">$3.831 per hour</td> </tr> </tbody> </table> ''' class TableParser(HTMLParser.HTMLParser): def __init__(self): HTMLParser.HTMLParser.__init__(self) self.in_td = False self.flavors = [] def handle_starttag(self, tag, attrs): if tag == 'td': self.in_td = True def handle_data(self, data): if self.in_td: self.flavors.append(data) def handle_endtag(self, tag): self.in_td = False
48.112319
158
0.524889
1,910
13,279
3.62199
0.12356
0.182134
0.210755
0.124024
0.767707
0.754987
0.751662
0.706707
0.639202
0.484389
0
0.068898
0.264402
13,279
275
159
48.287273
0.639333
0.065216
0
0.490119
0
0.067194
0.967093
0.345314
0
0
0
0
0
1
0.01581
false
0
0.003953
0
0.023715
0
0
0
0
null
0
1
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
066b73292bddecff1f5b7768febdea7bae1b1c84
173
py
Python
tests/src/year2017/test_day05b.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
10
2017-12-11T17:54:52.000Z
2021-12-09T20:16:30.000Z
tests/src/year2017/test_day05b.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
260
2015-12-09T11:03:03.000Z
2021-12-12T14:32:23.000Z
tests/src/year2017/test_day05b.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
null
null
null
"""2017 - Day 5 Part 2: A Maze of Twisty Trampolines, All Alike tests.""" from src.year2017.day05b import solve def test_solve(): assert solve("0\n3\n0\n1\n-3") == 10
24.714286
73
0.676301
31
173
3.741935
0.935484
0
0
0
0
0
0
0
0
0
0
0.132867
0.17341
173
6
74
28.833333
0.678322
0.387283
0
0
0
0
0.14
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
5
068dc5e7fc605c5cd770756e1c906e8ce442fab3
110
py
Python
lab_01/ngrams.py
Tariod/security
2b544fdaa27760bd80879e3106cfb39dc986c73f
[ "MIT" ]
null
null
null
lab_01/ngrams.py
Tariod/security
2b544fdaa27760bd80879e3106cfb39dc986c73f
[ "MIT" ]
null
null
null
lab_01/ngrams.py
Tariod/security
2b544fdaa27760bd80879e3106cfb39dc986c73f
[ "MIT" ]
null
null
null
def ngrams(sequence, n): return list(zip(*[sequence[i:(len(sequence) - (n - 1) + i)] for i in range(n)]))
36.666667
84
0.6
19
110
3.473684
0.684211
0.272727
0
0
0
0
0
0
0
0
0
0.010989
0.172727
110
2
85
55
0.714286
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
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
2301362f160d7326e050b581a469859de16747d7
38,783
py
Python
carbondesign/tests/test_time_picker.py
dozymoe/django-carbondesign
34aed0cfdccfa90fcb5bf2bbd347229815f1417b
[ "MIT" ]
null
null
null
carbondesign/tests/test_time_picker.py
dozymoe/django-carbondesign
34aed0cfdccfa90fcb5bf2bbd347229815f1417b
[ "MIT" ]
null
null
null
carbondesign/tests/test_time_picker.py
dozymoe/django-carbondesign
34aed0cfdccfa90fcb5bf2bbd347229815f1417b
[ "MIT" ]
null
null
null
# pylint:disable=missing-module-docstring,missing-class-docstring,missing-function-docstring from .base import compare_template, SimpleTestCase class TimePickerTest(SimpleTestCase): maxDiff = None def test_rendered(self): template = """ {% load carbondesign %} {% TimePicker form.started_at %} """ expected = r""" <div class="bx--form-item"> <label for="id_started_at" class="bx--label"> Started at </label> <div class="bx--time-picker"> <div class="bx--time-picker__input"><input type="text" name="started_at" value="2022-02-03 01:02:03" class="bx--text-input bx--time-picker__input-field" pattern="(1[012]|[1-9]):[0-5][0-9](\\s)?" placeholder="hh:mm" maxlength="5" required id="id_started_at"></div> <div class="bx--time-picker__select bx--select"> <label for="select-ampm-id_started_at" class="bx--label bx--visually-hidden"> Select AM/PM </label> <select id="select-ampm-id_started_at" class="bx--select-input"> <option class="bx--select-option" value="AM">AM</option> <option class="bx--select-option" value="PM">PM</option> </select> <svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bx--select__arrow" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"> <path d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"></path> </svg> </div> <div class="bx--time-picker__select bx--select"> <label for="select-zone-id_started_at" class="bx--label bx--visually-hidden"> Select time zone </label> <select id="select-zone-id_started_at" class="bx--select-input"> <option class="bx--select-option" value="Africa/Abidjan">Africa/Abidjan</option> <option class="bx--select-option" value="Africa/Accra">Africa/Accra</option> <option class="bx--select-option" value="Africa/Addis_Ababa">Africa/Addis_Ababa</option> <option class="bx--select-option" value="Africa/Algiers">Africa/Algiers</option> <option class="bx--select-option" value="Africa/Asmara">Africa/Asmara</option> <option class="bx--select-option" value="Africa/Bamako">Africa/Bamako</option> <option class="bx--select-option" value="Africa/Bangui">Africa/Bangui</option> <option class="bx--select-option" value="Africa/Banjul">Africa/Banjul</option> <option class="bx--select-option" value="Africa/Bissau">Africa/Bissau</option> <option class="bx--select-option" value="Africa/Blantyre">Africa/Blantyre</option> <option class="bx--select-option" value="Africa/Brazzaville">Africa/Brazzaville</option> <option class="bx--select-option" value="Africa/Bujumbura">Africa/Bujumbura</option> <option class="bx--select-option" value="Africa/Cairo">Africa/Cairo</option> <option class="bx--select-option" value="Africa/Casablanca">Africa/Casablanca</option> <option class="bx--select-option" value="Africa/Ceuta">Africa/Ceuta</option> <option class="bx--select-option" value="Africa/Conakry">Africa/Conakry</option> <option class="bx--select-option" value="Africa/Dakar">Africa/Dakar</option> <option class="bx--select-option" value="Africa/Dar_es_Salaam">Africa/Dar_es_Salaam</option> <option class="bx--select-option" value="Africa/Djibouti">Africa/Djibouti</option> <option class="bx--select-option" value="Africa/Douala">Africa/Douala</option> <option class="bx--select-option" value="Africa/El_Aaiun">Africa/El_Aaiun</option> <option class="bx--select-option" value="Africa/Freetown">Africa/Freetown</option> <option class="bx--select-option" value="Africa/Gaborone">Africa/Gaborone</option> <option class="bx--select-option" value="Africa/Harare">Africa/Harare</option> <option class="bx--select-option" value="Africa/Johannesburg">Africa/Johannesburg</option> <option class="bx--select-option" value="Africa/Juba">Africa/Juba</option> <option class="bx--select-option" value="Africa/Kampala">Africa/Kampala</option> <option class="bx--select-option" value="Africa/Khartoum">Africa/Khartoum</option> <option class="bx--select-option" value="Africa/Kigali">Africa/Kigali</option> <option class="bx--select-option" value="Africa/Kinshasa">Africa/Kinshasa</option> <option class="bx--select-option" value="Africa/Lagos">Africa/Lagos</option> <option class="bx--select-option" value="Africa/Libreville">Africa/Libreville</option> <option class="bx--select-option" value="Africa/Lome">Africa/Lome</option> <option class="bx--select-option" value="Africa/Luanda">Africa/Luanda</option> <option class="bx--select-option" value="Africa/Lubumbashi">Africa/Lubumbashi</option> <option class="bx--select-option" value="Africa/Lusaka">Africa/Lusaka</option> <option class="bx--select-option" value="Africa/Malabo">Africa/Malabo</option> <option class="bx--select-option" value="Africa/Maputo">Africa/Maputo</option> <option class="bx--select-option" value="Africa/Maseru">Africa/Maseru</option> <option class="bx--select-option" value="Africa/Mbabane">Africa/Mbabane</option> <option class="bx--select-option" value="Africa/Mogadishu">Africa/Mogadishu</option> <option class="bx--select-option" value="Africa/Monrovia">Africa/Monrovia</option> <option class="bx--select-option" value="Africa/Nairobi">Africa/Nairobi</option> <option class="bx--select-option" value="Africa/Ndjamena">Africa/Ndjamena</option> <option class="bx--select-option" value="Africa/Niamey">Africa/Niamey</option> <option class="bx--select-option" value="Africa/Nouakchott">Africa/Nouakchott</option> <option class="bx--select-option" value="Africa/Ouagadougou">Africa/Ouagadougou</option> <option class="bx--select-option" value="Africa/Porto-Novo">Africa/Porto-Novo</option> <option class="bx--select-option" value="Africa/Sao_Tome">Africa/Sao_Tome</option> <option class="bx--select-option" value="Africa/Tripoli">Africa/Tripoli</option> <option class="bx--select-option" value="Africa/Tunis">Africa/Tunis</option> <option class="bx--select-option" value="Africa/Windhoek">Africa/Windhoek</option> <option class="bx--select-option" value="America/Adak">America/Adak</option> <option class="bx--select-option" value="America/Anchorage">America/Anchorage</option> <option class="bx--select-option" value="America/Anguilla">America/Anguilla</option> <option class="bx--select-option" value="America/Antigua">America/Antigua</option> <option class="bx--select-option" value="America/Araguaina">America/Araguaina</option> <option class="bx--select-option" value="America/Argentina/Buenos_Aires">America/Argentina/Buenos_Aires</option> <option class="bx--select-option" value="America/Argentina/Catamarca">America/Argentina/Catamarca</option> <option class="bx--select-option" value="America/Argentina/Cordoba">America/Argentina/Cordoba</option> <option class="bx--select-option" value="America/Argentina/Jujuy">America/Argentina/Jujuy</option> <option class="bx--select-option" value="America/Argentina/La_Rioja">America/Argentina/La_Rioja</option> <option class="bx--select-option" value="America/Argentina/Mendoza">America/Argentina/Mendoza</option> <option class="bx--select-option" value="America/Argentina/Rio_Gallegos">America/Argentina/Rio_Gallegos</option> <option class="bx--select-option" value="America/Argentina/Salta">America/Argentina/Salta</option> <option class="bx--select-option" value="America/Argentina/San_Juan">America/Argentina/San_Juan</option> <option class="bx--select-option" value="America/Argentina/San_Luis">America/Argentina/San_Luis</option> <option class="bx--select-option" value="America/Argentina/Tucuman">America/Argentina/Tucuman</option> <option class="bx--select-option" value="America/Argentina/Ushuaia">America/Argentina/Ushuaia</option> <option class="bx--select-option" value="America/Aruba">America/Aruba</option> <option class="bx--select-option" value="America/Asuncion">America/Asuncion</option> <option class="bx--select-option" value="America/Atikokan">America/Atikokan</option> <option class="bx--select-option" value="America/Bahia">America/Bahia</option> <option class="bx--select-option" value="America/Bahia_Banderas">America/Bahia_Banderas</option> <option class="bx--select-option" value="America/Barbados">America/Barbados</option> <option class="bx--select-option" value="America/Belem">America/Belem</option> <option class="bx--select-option" value="America/Belize">America/Belize</option> <option class="bx--select-option" value="America/Blanc-Sablon">America/Blanc-Sablon</option> <option class="bx--select-option" value="America/Boa_Vista">America/Boa_Vista</option> <option class="bx--select-option" value="America/Bogota">America/Bogota</option> <option class="bx--select-option" value="America/Boise">America/Boise</option> <option class="bx--select-option" value="America/Cambridge_Bay">America/Cambridge_Bay</option> <option class="bx--select-option" value="America/Campo_Grande">America/Campo_Grande</option> <option class="bx--select-option" value="America/Cancun">America/Cancun</option> <option class="bx--select-option" value="America/Caracas">America/Caracas</option> <option class="bx--select-option" value="America/Cayenne">America/Cayenne</option> <option class="bx--select-option" value="America/Cayman">America/Cayman</option> <option class="bx--select-option" value="America/Chicago">America/Chicago</option> <option class="bx--select-option" value="America/Chihuahua">America/Chihuahua</option> <option class="bx--select-option" value="America/Costa_Rica">America/Costa_Rica</option> <option class="bx--select-option" value="America/Creston">America/Creston</option> <option class="bx--select-option" value="America/Cuiaba">America/Cuiaba</option> <option class="bx--select-option" value="America/Curacao">America/Curacao</option> <option class="bx--select-option" value="America/Danmarkshavn">America/Danmarkshavn</option> <option class="bx--select-option" value="America/Dawson">America/Dawson</option> <option class="bx--select-option" value="America/Dawson_Creek">America/Dawson_Creek</option> <option class="bx--select-option" value="America/Denver">America/Denver</option> <option class="bx--select-option" value="America/Detroit">America/Detroit</option> <option class="bx--select-option" value="America/Dominica">America/Dominica</option> <option class="bx--select-option" value="America/Edmonton">America/Edmonton</option> <option class="bx--select-option" value="America/Eirunepe">America/Eirunepe</option> <option class="bx--select-option" value="America/El_Salvador">America/El_Salvador</option> <option class="bx--select-option" value="America/Fort_Nelson">America/Fort_Nelson</option> <option class="bx--select-option" value="America/Fortaleza">America/Fortaleza</option> <option class="bx--select-option" value="America/Glace_Bay">America/Glace_Bay</option> <option class="bx--select-option" value="America/Goose_Bay">America/Goose_Bay</option> <option class="bx--select-option" value="America/Grand_Turk">America/Grand_Turk</option> <option class="bx--select-option" value="America/Grenada">America/Grenada</option> <option class="bx--select-option" value="America/Guadeloupe">America/Guadeloupe</option> <option class="bx--select-option" value="America/Guatemala">America/Guatemala</option> <option class="bx--select-option" value="America/Guayaquil">America/Guayaquil</option> <option class="bx--select-option" value="America/Guyana">America/Guyana</option> <option class="bx--select-option" value="America/Halifax">America/Halifax</option> <option class="bx--select-option" value="America/Havana">America/Havana</option> <option class="bx--select-option" value="America/Hermosillo">America/Hermosillo</option> <option class="bx--select-option" value="America/Indiana/Indianapolis">America/Indiana/Indianapolis</option> <option class="bx--select-option" value="America/Indiana/Knox">America/Indiana/Knox</option> <option class="bx--select-option" value="America/Indiana/Marengo">America/Indiana/Marengo</option> <option class="bx--select-option" value="America/Indiana/Petersburg">America/Indiana/Petersburg</option> <option class="bx--select-option" value="America/Indiana/Tell_City">America/Indiana/Tell_City</option> <option class="bx--select-option" value="America/Indiana/Vevay">America/Indiana/Vevay</option> <option class="bx--select-option" value="America/Indiana/Vincennes">America/Indiana/Vincennes</option> <option class="bx--select-option" value="America/Indiana/Winamac">America/Indiana/Winamac</option> <option class="bx--select-option" value="America/Inuvik">America/Inuvik</option> <option class="bx--select-option" value="America/Iqaluit">America/Iqaluit</option> <option class="bx--select-option" value="America/Jamaica">America/Jamaica</option> <option class="bx--select-option" value="America/Juneau">America/Juneau</option> <option class="bx--select-option" value="America/Kentucky/Louisville">America/Kentucky/Louisville</option> <option class="bx--select-option" value="America/Kentucky/Monticello">America/Kentucky/Monticello</option> <option class="bx--select-option" value="America/Kralendijk">America/Kralendijk</option> <option class="bx--select-option" value="America/La_Paz">America/La_Paz</option> <option class="bx--select-option" value="America/Lima">America/Lima</option> <option class="bx--select-option" value="America/Los_Angeles">America/Los_Angeles</option> <option class="bx--select-option" value="America/Lower_Princes">America/Lower_Princes</option> <option class="bx--select-option" value="America/Maceio">America/Maceio</option> <option class="bx--select-option" value="America/Managua">America/Managua</option> <option class="bx--select-option" value="America/Manaus">America/Manaus</option> <option class="bx--select-option" value="America/Marigot">America/Marigot</option> <option class="bx--select-option" value="America/Martinique">America/Martinique</option> <option class="bx--select-option" value="America/Matamoros">America/Matamoros</option> <option class="bx--select-option" value="America/Mazatlan">America/Mazatlan</option> <option class="bx--select-option" value="America/Menominee">America/Menominee</option> <option class="bx--select-option" value="America/Merida">America/Merida</option> <option class="bx--select-option" value="America/Metlakatla">America/Metlakatla</option> <option class="bx--select-option" value="America/Mexico_City">America/Mexico_City</option> <option class="bx--select-option" value="America/Miquelon">America/Miquelon</option> <option class="bx--select-option" value="America/Moncton">America/Moncton</option> <option class="bx--select-option" value="America/Monterrey">America/Monterrey</option> <option class="bx--select-option" value="America/Montevideo">America/Montevideo</option> <option class="bx--select-option" value="America/Montserrat">America/Montserrat</option> <option class="bx--select-option" value="America/Nassau">America/Nassau</option> <option class="bx--select-option" value="America/New_York">America/New_York</option> <option class="bx--select-option" value="America/Nipigon">America/Nipigon</option> <option class="bx--select-option" value="America/Nome">America/Nome</option> <option class="bx--select-option" value="America/Noronha">America/Noronha</option> <option class="bx--select-option" value="America/North_Dakota/Beulah">America/North_Dakota/Beulah</option> <option class="bx--select-option" value="America/North_Dakota/Center">America/North_Dakota/Center</option> <option class="bx--select-option" value="America/North_Dakota/New_Salem">America/North_Dakota/New_Salem</option> <option class="bx--select-option" value="America/Nuuk">America/Nuuk</option> <option class="bx--select-option" value="America/Ojinaga">America/Ojinaga</option> <option class="bx--select-option" value="America/Panama">America/Panama</option> <option class="bx--select-option" value="America/Pangnirtung">America/Pangnirtung</option> <option class="bx--select-option" value="America/Paramaribo">America/Paramaribo</option> <option class="bx--select-option" value="America/Phoenix">America/Phoenix</option> <option class="bx--select-option" value="America/Port-au-Prince">America/Port-au-Prince</option> <option class="bx--select-option" value="America/Port_of_Spain">America/Port_of_Spain</option> <option class="bx--select-option" value="America/Porto_Velho">America/Porto_Velho</option> <option class="bx--select-option" value="America/Puerto_Rico">America/Puerto_Rico</option> <option class="bx--select-option" value="America/Punta_Arenas">America/Punta_Arenas</option> <option class="bx--select-option" value="America/Rainy_River">America/Rainy_River</option> <option class="bx--select-option" value="America/Rankin_Inlet">America/Rankin_Inlet</option> <option class="bx--select-option" value="America/Recife">America/Recife</option> <option class="bx--select-option" value="America/Regina">America/Regina</option> <option class="bx--select-option" value="America/Resolute">America/Resolute</option> <option class="bx--select-option" value="America/Rio_Branco">America/Rio_Branco</option> <option class="bx--select-option" value="America/Santarem">America/Santarem</option> <option class="bx--select-option" value="America/Santiago">America/Santiago</option> <option class="bx--select-option" value="America/Santo_Domingo">America/Santo_Domingo</option> <option class="bx--select-option" value="America/Sao_Paulo">America/Sao_Paulo</option> <option class="bx--select-option" value="America/Scoresbysund">America/Scoresbysund</option> <option class="bx--select-option" value="America/Sitka">America/Sitka</option> <option class="bx--select-option" value="America/St_Barthelemy">America/St_Barthelemy</option> <option class="bx--select-option" value="America/St_Johns">America/St_Johns</option> <option class="bx--select-option" value="America/St_Kitts">America/St_Kitts</option> <option class="bx--select-option" value="America/St_Lucia">America/St_Lucia</option> <option class="bx--select-option" value="America/St_Thomas">America/St_Thomas</option> <option class="bx--select-option" value="America/St_Vincent">America/St_Vincent</option> <option class="bx--select-option" value="America/Swift_Current">America/Swift_Current</option> <option class="bx--select-option" value="America/Tegucigalpa">America/Tegucigalpa</option> <option class="bx--select-option" value="America/Thule">America/Thule</option> <option class="bx--select-option" value="America/Thunder_Bay">America/Thunder_Bay</option> <option class="bx--select-option" value="America/Tijuana">America/Tijuana</option> <option class="bx--select-option" value="America/Toronto">America/Toronto</option> <option class="bx--select-option" value="America/Tortola">America/Tortola</option> <option class="bx--select-option" value="America/Vancouver">America/Vancouver</option> <option class="bx--select-option" value="America/Whitehorse">America/Whitehorse</option> <option class="bx--select-option" value="America/Winnipeg">America/Winnipeg</option> <option class="bx--select-option" value="America/Yakutat">America/Yakutat</option> <option class="bx--select-option" value="America/Yellowknife">America/Yellowknife</option> <option class="bx--select-option" value="Antarctica/Casey">Antarctica/Casey</option> <option class="bx--select-option" value="Antarctica/Davis">Antarctica/Davis</option> <option class="bx--select-option" value="Antarctica/DumontDUrville">Antarctica/DumontDUrville</option> <option class="bx--select-option" value="Antarctica/Macquarie">Antarctica/Macquarie</option> <option class="bx--select-option" value="Antarctica/Mawson">Antarctica/Mawson</option> <option class="bx--select-option" value="Antarctica/McMurdo">Antarctica/McMurdo</option> <option class="bx--select-option" value="Antarctica/Palmer">Antarctica/Palmer</option> <option class="bx--select-option" value="Antarctica/Rothera">Antarctica/Rothera</option> <option class="bx--select-option" value="Antarctica/Syowa">Antarctica/Syowa</option> <option class="bx--select-option" value="Antarctica/Troll">Antarctica/Troll</option> <option class="bx--select-option" value="Antarctica/Vostok">Antarctica/Vostok</option> <option class="bx--select-option" value="Arctic/Longyearbyen">Arctic/Longyearbyen</option> <option class="bx--select-option" value="Asia/Aden">Asia/Aden</option> <option class="bx--select-option" value="Asia/Almaty">Asia/Almaty</option> <option class="bx--select-option" value="Asia/Amman">Asia/Amman</option> <option class="bx--select-option" value="Asia/Anadyr">Asia/Anadyr</option> <option class="bx--select-option" value="Asia/Aqtau">Asia/Aqtau</option> <option class="bx--select-option" value="Asia/Aqtobe">Asia/Aqtobe</option> <option class="bx--select-option" value="Asia/Ashgabat">Asia/Ashgabat</option> <option class="bx--select-option" value="Asia/Atyrau">Asia/Atyrau</option> <option class="bx--select-option" value="Asia/Baghdad">Asia/Baghdad</option> <option class="bx--select-option" value="Asia/Bahrain">Asia/Bahrain</option> <option class="bx--select-option" value="Asia/Baku">Asia/Baku</option> <option class="bx--select-option" value="Asia/Bangkok">Asia/Bangkok</option> <option class="bx--select-option" value="Asia/Barnaul">Asia/Barnaul</option> <option class="bx--select-option" value="Asia/Beirut">Asia/Beirut</option> <option class="bx--select-option" value="Asia/Bishkek">Asia/Bishkek</option> <option class="bx--select-option" value="Asia/Brunei">Asia/Brunei</option> <option class="bx--select-option" value="Asia/Chita">Asia/Chita</option> <option class="bx--select-option" value="Asia/Choibalsan">Asia/Choibalsan</option> <option class="bx--select-option" value="Asia/Colombo">Asia/Colombo</option> <option class="bx--select-option" value="Asia/Damascus">Asia/Damascus</option> <option class="bx--select-option" value="Asia/Dhaka">Asia/Dhaka</option> <option class="bx--select-option" value="Asia/Dili">Asia/Dili</option> <option class="bx--select-option" value="Asia/Dubai">Asia/Dubai</option> <option class="bx--select-option" value="Asia/Dushanbe">Asia/Dushanbe</option> <option class="bx--select-option" value="Asia/Famagusta">Asia/Famagusta</option> <option class="bx--select-option" value="Asia/Gaza">Asia/Gaza</option> <option class="bx--select-option" value="Asia/Hebron">Asia/Hebron</option> <option class="bx--select-option" value="Asia/Ho_Chi_Minh">Asia/Ho_Chi_Minh</option> <option class="bx--select-option" value="Asia/Hong_Kong">Asia/Hong_Kong</option> <option class="bx--select-option" value="Asia/Hovd">Asia/Hovd</option> <option class="bx--select-option" value="Asia/Irkutsk">Asia/Irkutsk</option> <option class="bx--select-option" value="Asia/Jakarta">Asia/Jakarta</option> <option class="bx--select-option" value="Asia/Jayapura">Asia/Jayapura</option> <option class="bx--select-option" value="Asia/Jerusalem">Asia/Jerusalem</option> <option class="bx--select-option" value="Asia/Kabul">Asia/Kabul</option> <option class="bx--select-option" value="Asia/Kamchatka">Asia/Kamchatka</option> <option class="bx--select-option" value="Asia/Karachi">Asia/Karachi</option> <option class="bx--select-option" value="Asia/Kathmandu">Asia/Kathmandu</option> <option class="bx--select-option" value="Asia/Khandyga">Asia/Khandyga</option> <option class="bx--select-option" value="Asia/Kolkata">Asia/Kolkata</option> <option class="bx--select-option" value="Asia/Krasnoyarsk">Asia/Krasnoyarsk</option> <option class="bx--select-option" value="Asia/Kuala_Lumpur">Asia/Kuala_Lumpur</option> <option class="bx--select-option" value="Asia/Kuching">Asia/Kuching</option> <option class="bx--select-option" value="Asia/Kuwait">Asia/Kuwait</option> <option class="bx--select-option" value="Asia/Macau">Asia/Macau</option> <option class="bx--select-option" value="Asia/Magadan">Asia/Magadan</option> <option class="bx--select-option" value="Asia/Makassar">Asia/Makassar</option> <option class="bx--select-option" value="Asia/Manila">Asia/Manila</option> <option class="bx--select-option" value="Asia/Muscat">Asia/Muscat</option> <option class="bx--select-option" value="Asia/Nicosia">Asia/Nicosia</option> <option class="bx--select-option" value="Asia/Novokuznetsk">Asia/Novokuznetsk</option> <option class="bx--select-option" value="Asia/Novosibirsk">Asia/Novosibirsk</option> <option class="bx--select-option" value="Asia/Omsk">Asia/Omsk</option> <option class="bx--select-option" value="Asia/Oral">Asia/Oral</option> <option class="bx--select-option" value="Asia/Phnom_Penh">Asia/Phnom_Penh</option> <option class="bx--select-option" value="Asia/Pontianak">Asia/Pontianak</option> <option class="bx--select-option" value="Asia/Pyongyang">Asia/Pyongyang</option> <option class="bx--select-option" value="Asia/Qatar">Asia/Qatar</option> <option class="bx--select-option" value="Asia/Qostanay">Asia/Qostanay</option> <option class="bx--select-option" value="Asia/Qyzylorda">Asia/Qyzylorda</option> <option class="bx--select-option" value="Asia/Riyadh">Asia/Riyadh</option> <option class="bx--select-option" value="Asia/Sakhalin">Asia/Sakhalin</option> <option class="bx--select-option" value="Asia/Samarkand">Asia/Samarkand</option> <option class="bx--select-option" value="Asia/Seoul">Asia/Seoul</option> <option class="bx--select-option" value="Asia/Shanghai">Asia/Shanghai</option> <option class="bx--select-option" value="Asia/Singapore">Asia/Singapore</option> <option class="bx--select-option" value="Asia/Srednekolymsk">Asia/Srednekolymsk</option> <option class="bx--select-option" value="Asia/Taipei">Asia/Taipei</option> <option class="bx--select-option" value="Asia/Tashkent">Asia/Tashkent</option> <option class="bx--select-option" value="Asia/Tbilisi">Asia/Tbilisi</option> <option class="bx--select-option" value="Asia/Tehran">Asia/Tehran</option> <option class="bx--select-option" value="Asia/Thimphu">Asia/Thimphu</option> <option class="bx--select-option" value="Asia/Tokyo">Asia/Tokyo</option> <option class="bx--select-option" value="Asia/Tomsk">Asia/Tomsk</option> <option class="bx--select-option" value="Asia/Ulaanbaatar">Asia/Ulaanbaatar</option> <option class="bx--select-option" value="Asia/Urumqi">Asia/Urumqi</option> <option class="bx--select-option" value="Asia/Ust-Nera">Asia/Ust-Nera</option> <option class="bx--select-option" value="Asia/Vientiane">Asia/Vientiane</option> <option class="bx--select-option" value="Asia/Vladivostok">Asia/Vladivostok</option> <option class="bx--select-option" value="Asia/Yakutsk">Asia/Yakutsk</option> <option class="bx--select-option" value="Asia/Yangon">Asia/Yangon</option> <option class="bx--select-option" value="Asia/Yekaterinburg">Asia/Yekaterinburg</option> <option class="bx--select-option" value="Asia/Yerevan">Asia/Yerevan</option> <option class="bx--select-option" value="Atlantic/Azores">Atlantic/Azores</option> <option class="bx--select-option" value="Atlantic/Bermuda">Atlantic/Bermuda</option> <option class="bx--select-option" value="Atlantic/Canary">Atlantic/Canary</option> <option class="bx--select-option" value="Atlantic/Cape_Verde">Atlantic/Cape_Verde</option> <option class="bx--select-option" value="Atlantic/Faroe">Atlantic/Faroe</option> <option class="bx--select-option" value="Atlantic/Madeira">Atlantic/Madeira</option> <option class="bx--select-option" value="Atlantic/Reykjavik">Atlantic/Reykjavik</option> <option class="bx--select-option" value="Atlantic/South_Georgia">Atlantic/South_Georgia</option> <option class="bx--select-option" value="Atlantic/St_Helena">Atlantic/St_Helena</option> <option class="bx--select-option" value="Atlantic/Stanley">Atlantic/Stanley</option> <option class="bx--select-option" value="Australia/Adelaide">Australia/Adelaide</option> <option class="bx--select-option" value="Australia/Brisbane">Australia/Brisbane</option> <option class="bx--select-option" value="Australia/Broken_Hill">Australia/Broken_Hill</option> <option class="bx--select-option" value="Australia/Darwin">Australia/Darwin</option> <option class="bx--select-option" value="Australia/Eucla">Australia/Eucla</option> <option class="bx--select-option" value="Australia/Hobart">Australia/Hobart</option> <option class="bx--select-option" value="Australia/Lindeman">Australia/Lindeman</option> <option class="bx--select-option" value="Australia/Lord_Howe">Australia/Lord_Howe</option> <option class="bx--select-option" value="Australia/Melbourne">Australia/Melbourne</option> <option class="bx--select-option" value="Australia/Perth">Australia/Perth</option> <option class="bx--select-option" value="Australia/Sydney">Australia/Sydney</option> <option class="bx--select-option" value="Canada/Atlantic">Canada/Atlantic</option> <option class="bx--select-option" value="Canada/Central">Canada/Central</option> <option class="bx--select-option" value="Canada/Eastern">Canada/Eastern</option> <option class="bx--select-option" value="Canada/Mountain">Canada/Mountain</option> <option class="bx--select-option" value="Canada/Newfoundland">Canada/Newfoundland</option> <option class="bx--select-option" value="Canada/Pacific">Canada/Pacific</option> <option class="bx--select-option" value="Europe/Amsterdam">Europe/Amsterdam</option> <option class="bx--select-option" value="Europe/Andorra">Europe/Andorra</option> <option class="bx--select-option" value="Europe/Astrakhan">Europe/Astrakhan</option> <option class="bx--select-option" value="Europe/Athens">Europe/Athens</option> <option class="bx--select-option" value="Europe/Belgrade">Europe/Belgrade</option> <option class="bx--select-option" value="Europe/Berlin">Europe/Berlin</option> <option class="bx--select-option" value="Europe/Bratislava">Europe/Bratislava</option> <option class="bx--select-option" value="Europe/Brussels">Europe/Brussels</option> <option class="bx--select-option" value="Europe/Bucharest">Europe/Bucharest</option> <option class="bx--select-option" value="Europe/Budapest">Europe/Budapest</option> <option class="bx--select-option" value="Europe/Busingen">Europe/Busingen</option> <option class="bx--select-option" value="Europe/Chisinau">Europe/Chisinau</option> <option class="bx--select-option" value="Europe/Copenhagen">Europe/Copenhagen</option> <option class="bx--select-option" value="Europe/Dublin">Europe/Dublin</option> <option class="bx--select-option" value="Europe/Gibraltar">Europe/Gibraltar</option> <option class="bx--select-option" value="Europe/Guernsey">Europe/Guernsey</option> <option class="bx--select-option" value="Europe/Helsinki">Europe/Helsinki</option> <option class="bx--select-option" value="Europe/Isle_of_Man">Europe/Isle_of_Man</option> <option class="bx--select-option" value="Europe/Istanbul">Europe/Istanbul</option> <option class="bx--select-option" value="Europe/Jersey">Europe/Jersey</option> <option class="bx--select-option" value="Europe/Kaliningrad">Europe/Kaliningrad</option> <option class="bx--select-option" value="Europe/Kiev">Europe/Kiev</option> <option class="bx--select-option" value="Europe/Kirov">Europe/Kirov</option> <option class="bx--select-option" value="Europe/Lisbon">Europe/Lisbon</option> <option class="bx--select-option" value="Europe/Ljubljana">Europe/Ljubljana</option> <option class="bx--select-option" value="Europe/London">Europe/London</option> <option class="bx--select-option" value="Europe/Luxembourg">Europe/Luxembourg</option> <option class="bx--select-option" value="Europe/Madrid">Europe/Madrid</option> <option class="bx--select-option" value="Europe/Malta">Europe/Malta</option> <option class="bx--select-option" value="Europe/Mariehamn">Europe/Mariehamn</option> <option class="bx--select-option" value="Europe/Minsk">Europe/Minsk</option> <option class="bx--select-option" value="Europe/Monaco">Europe/Monaco</option> <option class="bx--select-option" value="Europe/Moscow">Europe/Moscow</option> <option class="bx--select-option" value="Europe/Oslo">Europe/Oslo</option> <option class="bx--select-option" value="Europe/Paris">Europe/Paris</option> <option class="bx--select-option" value="Europe/Podgorica">Europe/Podgorica</option> <option class="bx--select-option" value="Europe/Prague">Europe/Prague</option> <option class="bx--select-option" value="Europe/Riga">Europe/Riga</option> <option class="bx--select-option" value="Europe/Rome">Europe/Rome</option> <option class="bx--select-option" value="Europe/Samara">Europe/Samara</option> <option class="bx--select-option" value="Europe/San_Marino">Europe/San_Marino</option> <option class="bx--select-option" value="Europe/Sarajevo">Europe/Sarajevo</option> <option class="bx--select-option" value="Europe/Saratov">Europe/Saratov</option> <option class="bx--select-option" value="Europe/Simferopol">Europe/Simferopol</option> <option class="bx--select-option" value="Europe/Skopje">Europe/Skopje</option> <option class="bx--select-option" value="Europe/Sofia">Europe/Sofia</option> <option class="bx--select-option" value="Europe/Stockholm">Europe/Stockholm</option> <option class="bx--select-option" value="Europe/Tallinn">Europe/Tallinn</option> <option class="bx--select-option" value="Europe/Tirane">Europe/Tirane</option> <option class="bx--select-option" value="Europe/Ulyanovsk">Europe/Ulyanovsk</option> <option class="bx--select-option" value="Europe/Uzhgorod">Europe/Uzhgorod</option> <option class="bx--select-option" value="Europe/Vaduz">Europe/Vaduz</option> <option class="bx--select-option" value="Europe/Vatican">Europe/Vatican</option> <option class="bx--select-option" value="Europe/Vienna">Europe/Vienna</option> <option class="bx--select-option" value="Europe/Vilnius">Europe/Vilnius</option> <option class="bx--select-option" value="Europe/Volgograd">Europe/Volgograd</option> <option class="bx--select-option" value="Europe/Warsaw">Europe/Warsaw</option> <option class="bx--select-option" value="Europe/Zagreb">Europe/Zagreb</option> <option class="bx--select-option" value="Europe/Zaporozhye">Europe/Zaporozhye</option> <option class="bx--select-option" value="Europe/Zurich">Europe/Zurich</option> <option class="bx--select-option" value="GMT">GMT</option> <option class="bx--select-option" value="Indian/Antananarivo">Indian/Antananarivo</option> <option class="bx--select-option" value="Indian/Chagos">Indian/Chagos</option> <option class="bx--select-option" value="Indian/Christmas">Indian/Christmas</option> <option class="bx--select-option" value="Indian/Cocos">Indian/Cocos</option> <option class="bx--select-option" value="Indian/Comoro">Indian/Comoro</option> <option class="bx--select-option" value="Indian/Kerguelen">Indian/Kerguelen</option> <option class="bx--select-option" value="Indian/Mahe">Indian/Mahe</option> <option class="bx--select-option" value="Indian/Maldives">Indian/Maldives</option> <option class="bx--select-option" value="Indian/Mauritius">Indian/Mauritius</option> <option class="bx--select-option" value="Indian/Mayotte">Indian/Mayotte</option> <option class="bx--select-option" value="Indian/Reunion">Indian/Reunion</option> <option class="bx--select-option" value="Pacific/Apia">Pacific/Apia</option> <option class="bx--select-option" value="Pacific/Auckland">Pacific/Auckland</option> <option class="bx--select-option" value="Pacific/Bougainville">Pacific/Bougainville</option> <option class="bx--select-option" value="Pacific/Chatham">Pacific/Chatham</option> <option class="bx--select-option" value="Pacific/Chuuk">Pacific/Chuuk</option> <option class="bx--select-option" value="Pacific/Easter">Pacific/Easter</option> <option class="bx--select-option" value="Pacific/Efate">Pacific/Efate</option> <option class="bx--select-option" value="Pacific/Fakaofo">Pacific/Fakaofo</option> <option class="bx--select-option" value="Pacific/Fiji">Pacific/Fiji</option> <option class="bx--select-option" value="Pacific/Funafuti">Pacific/Funafuti</option> <option class="bx--select-option" value="Pacific/Galapagos">Pacific/Galapagos</option> <option class="bx--select-option" value="Pacific/Gambier">Pacific/Gambier</option> <option class="bx--select-option" value="Pacific/Guadalcanal">Pacific/Guadalcanal</option> <option class="bx--select-option" value="Pacific/Guam">Pacific/Guam</option> <option class="bx--select-option" value="Pacific/Honolulu">Pacific/Honolulu</option> <option class="bx--select-option" value="Pacific/Kanton">Pacific/Kanton</option> <option class="bx--select-option" value="Pacific/Kiritimati">Pacific/Kiritimati</option> <option class="bx--select-option" value="Pacific/Kosrae">Pacific/Kosrae</option> <option class="bx--select-option" value="Pacific/Kwajalein">Pacific/Kwajalein</option> <option class="bx--select-option" value="Pacific/Majuro">Pacific/Majuro</option> <option class="bx--select-option" value="Pacific/Marquesas">Pacific/Marquesas</option> <option class="bx--select-option" value="Pacific/Midway">Pacific/Midway</option> <option class="bx--select-option" value="Pacific/Nauru">Pacific/Nauru</option> <option class="bx--select-option" value="Pacific/Niue">Pacific/Niue</option> <option class="bx--select-option" value="Pacific/Norfolk">Pacific/Norfolk</option> <option class="bx--select-option" value="Pacific/Noumea">Pacific/Noumea</option> <option class="bx--select-option" value="Pacific/Pago_Pago">Pacific/Pago_Pago</option> <option class="bx--select-option" value="Pacific/Palau">Pacific/Palau</option> <option class="bx--select-option" value="Pacific/Pitcairn">Pacific/Pitcairn</option> <option class="bx--select-option" value="Pacific/Pohnpei">Pacific/Pohnpei</option> <option class="bx--select-option" value="Pacific/Port_Moresby">Pacific/Port_Moresby</option> <option class="bx--select-option" value="Pacific/Rarotonga">Pacific/Rarotonga</option> <option class="bx--select-option" value="Pacific/Saipan">Pacific/Saipan</option> <option class="bx--select-option" value="Pacific/Tahiti">Pacific/Tahiti</option> <option class="bx--select-option" value="Pacific/Tarawa">Pacific/Tarawa</option> <option class="bx--select-option" value="Pacific/Tongatapu">Pacific/Tongatapu</option> <option class="bx--select-option" value="Pacific/Wake">Pacific/Wake</option> <option class="bx--select-option" value="Pacific/Wallis">Pacific/Wallis</option> <option class="bx--select-option" value="US/Alaska">US/Alaska</option> <option class="bx--select-option" value="US/Arizona">US/Arizona</option> <option class="bx--select-option" value="US/Central">US/Central</option> <option class="bx--select-option" value="US/Eastern">US/Eastern</option> <option class="bx--select-option" value="US/Hawaii">US/Hawaii</option> <option class="bx--select-option" value="US/Mountain">US/Mountain</option> <option class="bx--select-option" value="US/Pacific">US/Pacific</option> <option class="bx--select-option" value="UTC">UTC</option> </select> <svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bx--select__arrow" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"> <path d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"></path> </svg> </div> </div> </div> """ rendered = compare_template(template, expected) self.assertEqual(*rendered)
78.98778
267
0.766083
5,324
38,783
5.551089
0.111007
0.107532
0.195743
0.283515
0.665832
0.663328
0.66255
0.657745
0.094505
0.033092
0
0.002555
0.041358
38,783
490
268
79.14898
0.792356
0.002321
0
0.051335
0
0.911704
0.992634
0.85348
0
0
0
0
0.002053
1
0.002053
false
0
0.002053
0
0.008214
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
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2302c030895d0f8454025d172c02962a378b1662
1,107
py
Python
setup.py
mansam/validator.py
22d31a0b78e645cf4ec9694cdfb4612977370c6d
[ "MIT" ]
87
2015-01-29T15:43:44.000Z
2022-03-09T07:04:16.000Z
setup.py
mansam/validator.py
22d31a0b78e645cf4ec9694cdfb4612977370c6d
[ "MIT" ]
25
2015-01-05T14:19:53.000Z
2021-03-05T17:20:03.000Z
setup.py
mansam/validator.py
22d31a0b78e645cf4ec9694cdfb4612977370c6d
[ "MIT" ]
32
2015-08-20T06:17:33.000Z
2021-11-09T19:16:38.000Z
from setuptools import setup setup( name='validator.py', version='1.3.0', author='Samuel "mansam" Lucidi', author_email="sam@samlucidi.com", packages=['validator'], url='https://github.com/mansam/validator.py', description='A library for appling schemas to data structures.', long_description=open('README.rst').read(), classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy" ], license='MIT' )
36.9
68
0.599819
117
1,107
5.65812
0.478632
0.344411
0.453172
0.353474
0.081571
0
0
0
0
0
0
0.029869
0.243902
1,107
29
69
38.172414
0.761051
0
0
0
0
0
0.638663
0
0
0
0
0
0
1
0
true
0
0.035714
0
0.035714
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
2321173b6cb9584852d15f26101b77960f964729
144
py
Python
fhwebscrapers/__init__.py
dantas5/FinanceHub
9691c9e10654c0608d1ca8c8798a5a26c227af87
[ "MIT" ]
null
null
null
fhwebscrapers/__init__.py
dantas5/FinanceHub
9691c9e10654c0608d1ca8c8798a5a26c227af87
[ "MIT" ]
null
null
null
fhwebscrapers/__init__.py
dantas5/FinanceHub
9691c9e10654c0608d1ca8c8798a5a26c227af87
[ "MIT" ]
null
null
null
from fhwebscrapers.B3derivatives.curvasb3 import ScraperB3 from fhwebscrapers.CETIP.getcetipdata import CETIP __all__ = ['ScraperB3', 'CETIP']
28.8
58
0.826389
15
144
7.666667
0.6
0.295652
0
0
0
0
0
0
0
0
0
0.030534
0.090278
144
4
59
36
0.847328
0
0
0
0
0
0.097222
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
88bd9440904e4e745ea46a859a598eeb2a22bf97
20
py
Python
python/testData/refactoring/changeSignature/nonDefaultAfterDefault1.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2018-12-29T09:53:39.000Z
2018-12-29T09:53:42.000Z
python/testData/refactoring/changeSignature/nonDefaultAfterDefault1.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/refactoring/changeSignature/nonDefaultAfterDefault1.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def foo(b=1): pass
10
13
0.6
5
20
2.4
1
0
0
0
0
0
0
0
0
0
0
0.0625
0.2
20
2
14
10
0.6875
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
88cc5b4b5dc736d6b8f2e83c34762ada5532c58b
200
py
Python
sdata_experiments/tension_test.py
lepy/sdata_experiments
84aa32ec497639a30d4f71c7fa9e463cf2d8f037
[ "MIT" ]
1
2020-12-21T18:28:00.000Z
2020-12-21T18:28:00.000Z
sdata_experiments/tension_test.py
lepy/sdata_experiments
84aa32ec497639a30d4f71c7fa9e463cf2d8f037
[ "MIT" ]
null
null
null
sdata_experiments/tension_test.py
lepy/sdata_experiments
84aa32ec497639a30d4f71c7fa9e463cf2d8f037
[ "MIT" ]
null
null
null
# -*-coding: utf-8-*- from sdata.experiments import Test class TensionTest(Test): """Tension test """ def __init__(self, name, **kwargs): Test.__init__(self, name=name, **kwargs)
22.222222
48
0.63
24
200
4.916667
0.666667
0.135593
0.20339
0
0
0
0
0
0
0
0
0.00625
0.2
200
9
48
22.222222
0.73125
0.195
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
88df286145e7e147b9e1130f9bc8b72465b90272
180
py
Python
mysite/iic/views.py
sandeepkeshav/iicj
c457fec176918af500699c8607f1d8cfc7543f1d
[ "MIT" ]
1
2020-11-25T17:02:25.000Z
2020-11-25T17:02:25.000Z
mysite/iic/views.py
sandeepkeshav/iicj
c457fec176918af500699c8607f1d8cfc7543f1d
[ "MIT" ]
null
null
null
mysite/iic/views.py
sandeepkeshav/iicj
c457fec176918af500699c8607f1d8cfc7543f1d
[ "MIT" ]
1
2020-11-25T17:01:33.000Z
2020-11-25T17:01:33.000Z
from __future__ import unicode_literals from django.shortcuts import render from django.http import HttpResponse def iichome(request): return render(request, 'iic/home.html')
25.714286
43
0.811111
24
180
5.875
0.708333
0.141844
0
0
0
0
0
0
0
0
0
0
0.122222
180
6
44
30
0.892405
0
0
0
0
0
0.072222
0
0
0
0
0
0
1
0.2
false
0
0.6
0.2
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
0
0
1
1
1
0
0
5
000efb3a697a68b72463aeb6cc6355689b2f13ed
102
py
Python
meld/plugins/move/main.py
dersal-dev/meld
bb746e8c5a2eec9f0aff5fbbfd698c6d43fa8e93
[ "MIT" ]
null
null
null
meld/plugins/move/main.py
dersal-dev/meld
bb746e8c5a2eec9f0aff5fbbfd698c6d43fa8e93
[ "MIT" ]
null
null
null
meld/plugins/move/main.py
dersal-dev/meld
bb746e8c5a2eec9f0aff5fbbfd698c6d43fa8e93
[ "MIT" ]
null
null
null
from meld import logger def main(): logger.info('Starting move operation') logger.info('Finished')
17
39
0.745098
14
102
5.428571
0.785714
0.263158
0
0
0
0
0
0
0
0
0
0
0.127451
102
6
40
17
0.853933
0
0
0
0
0
0.300971
0
0
0
0
0
0
1
0.25
true
0
0.25
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
1
1
0
0
0
0
0
0
5
00366e60b64cbced6f7219fc7522d549d4e96c74
48
py
Python
src/pyyam/yam/exceptions/ShardConfigException.py
dpquigl/YAM
bd30afd1e2e662e43da0c41de6bde814f9fae1cf
[ "Apache-2.0" ]
null
null
null
src/pyyam/yam/exceptions/ShardConfigException.py
dpquigl/YAM
bd30afd1e2e662e43da0c41de6bde814f9fae1cf
[ "Apache-2.0" ]
null
null
null
src/pyyam/yam/exceptions/ShardConfigException.py
dpquigl/YAM
bd30afd1e2e662e43da0c41de6bde814f9fae1cf
[ "Apache-2.0" ]
null
null
null
class ShardConfigException(ValueError): pass
24
39
0.8125
4
48
9.75
1
0
0
0
0
0
0
0
0
0
0
0
0.125
48
2
40
24
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
0046656ceee49a476e8e983594a595e1bad5bf96
27
py
Python
tpucolab/__init__.py
taomanwai/tpucolab
b822cc145987db96cfb0052dbb10934bedd005e6
[ "MIT" ]
1
2021-12-24T23:53:08.000Z
2021-12-24T23:53:08.000Z
tpucolab/__init__.py
taomanwai/tpucolab
b822cc145987db96cfb0052dbb10934bedd005e6
[ "MIT" ]
null
null
null
tpucolab/__init__.py
taomanwai/tpucolab
b822cc145987db96cfb0052dbb10934bedd005e6
[ "MIT" ]
2
2018-12-16T14:08:54.000Z
2019-05-28T14:41:59.000Z
from tpucolab.core import *
27
27
0.814815
4
27
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
27
1
27
27
0.916667
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
cc42acd8fcb3b2b7849649f0c10ba4fa44824a33
82
py
Python
utils/__init__.py
HerrYu123/deeplabv3
4f29d2bfb725a77b22fb04e1e0006ae742fa5d47
[ "MIT" ]
null
null
null
utils/__init__.py
HerrYu123/deeplabv3
4f29d2bfb725a77b22fb04e1e0006ae742fa5d47
[ "MIT" ]
null
null
null
utils/__init__.py
HerrYu123/deeplabv3
4f29d2bfb725a77b22fb04e1e0006ae742fa5d47
[ "MIT" ]
null
null
null
from .utils import add_weight_decay, AverageMeter, label_img_to_color, check_mkdir
82
82
0.878049
13
82
5.076923
1
0
0
0
0
0
0
0
0
0
0
0
0.073171
82
1
82
82
0.868421
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
ccb0eb936ec41c62e8c05807faa25bca2c7ad40d
48
py
Python
tests/extensions/artificial_intelligence/ai_model/__init__.py
chr0m1ng/blip-sdk-js
74f404a3ef048a100cc330f78a9751572e31fb0b
[ "MIT" ]
null
null
null
tests/extensions/artificial_intelligence/ai_model/__init__.py
chr0m1ng/blip-sdk-js
74f404a3ef048a100cc330f78a9751572e31fb0b
[ "MIT" ]
9
2021-05-27T21:08:23.000Z
2021-06-14T20:10:10.000Z
tests/extensions/artificial_intelligence/ai_model/__init__.py
chr0m1ng/blip-sdk-python
74f404a3ef048a100cc330f78a9751572e31fb0b
[ "MIT" ]
null
null
null
from .test_ai_model import TestAiModelExtension
24
47
0.895833
6
48
6.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
48
1
48
48
0.931818
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
ccbffdcc60fb438aee22b3f831c544750ef569d6
246
py
Python
minds/sections/__init__.py
Atherz97/minds-bot
965f44ba39ad816947e4bcba051a86fa1c5ee05c
[ "MIT" ]
3
2020-05-01T10:59:59.000Z
2022-01-18T01:40:34.000Z
minds/sections/__init__.py
Atherz97/minds-bot
965f44ba39ad816947e4bcba051a86fa1c5ee05c
[ "MIT" ]
null
null
null
minds/sections/__init__.py
Atherz97/minds-bot
965f44ba39ad816947e4bcba051a86fa1c5ee05c
[ "MIT" ]
null
null
null
from minds.sections.newsfeed import NewsfeedAPI from minds.sections.channel import ChannelAPI from minds.sections.notifications import NotificationsAPI from minds.sections.posting import PostingAPI from minds.sections.interact import InteractAPI
41
57
0.878049
30
246
7.2
0.466667
0.208333
0.393519
0
0
0
0
0
0
0
0
0
0.081301
246
5
58
49.2
0.955752
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
aeaa0a335119f48bebc88e35cf1698370503f3a0
259
py
Python
pyautofinance/common/strategies/usable_strategies/live_trading_test_strategy.py
webclinic017/PyAutoFinance
532cb1c5418dd9eeb07f2f08646170cde1fe0303
[ "MIT" ]
null
null
null
pyautofinance/common/strategies/usable_strategies/live_trading_test_strategy.py
webclinic017/PyAutoFinance
532cb1c5418dd9eeb07f2f08646170cde1fe0303
[ "MIT" ]
null
null
null
pyautofinance/common/strategies/usable_strategies/live_trading_test_strategy.py
webclinic017/PyAutoFinance
532cb1c5418dd9eeb07f2f08646170cde1fe0303
[ "MIT" ]
1
2022-02-24T09:18:13.000Z
2022-02-24T09:18:13.000Z
from pyautofinance.common.strategies.bracket_strategy import BracketStrategy class LiveTradingTestStrategy(BracketStrategy): def _open_long_condition(self) -> bool: return True def _open_short_condition(self) -> bool: return False
23.545455
76
0.760618
27
259
7.037037
0.740741
0.073684
0.178947
0.242105
0
0
0
0
0
0
0
0
0.177606
259
10
77
25.9
0.892019
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
1
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
aebb903fbc8412bafe91beffd2ed946df7885f12
132
py
Python
python/Numpy/np-arrays.py
cdrowley/hackerrank
cc5c925327cd3ce5b52c1614b814da75d42cca72
[ "MIT" ]
null
null
null
python/Numpy/np-arrays.py
cdrowley/hackerrank
cc5c925327cd3ce5b52c1614b814da75d42cca72
[ "MIT" ]
null
null
null
python/Numpy/np-arrays.py
cdrowley/hackerrank
cc5c925327cd3ce5b52c1614b814da75d42cca72
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/np-arrays/problem import numpy def arrays(arr): return numpy.array(arr, float)[::-1]
16.5
57
0.712121
19
132
4.947368
0.842105
0
0
0
0
0
0
0
0
0
0
0.008621
0.121212
132
7
58
18.857143
0.801724
0.416667
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
0
0
0
5
4e09007daa6d9ebbc5192124ce8ef2f0a488eb4d
7,130
py
Python
day24_mzn.py
galleon/adventofcode2021
2bf626821d8e2b2278c0009ef4f008433c3c3788
[ "MIT" ]
null
null
null
day24_mzn.py
galleon/adventofcode2021
2bf626821d8e2b2278c0009ef4f008433c3c3788
[ "MIT" ]
null
null
null
day24_mzn.py
galleon/adventofcode2021
2bf626821d8e2b2278c0009ef4f008433c3c3788
[ "MIT" ]
null
null
null
from ortools.linear_solver import pywraplp from ortools.sat.python import cp_model my_program = [ ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "1"], ["add", "x", "12"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "6"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "1"], ["add", "x", "10"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "6"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "1"], ["add", "x", "13"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "3"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "26"], ["add", "x", "-11"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "11"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "1"], ["add", "x", "13"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "9"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "26"], ["add", "x", "-1"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "3"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "1"], ["add", "x", "10"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "13"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "1"], ["add", "x", "11"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "6"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "26"], ["add", "x", "0"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "14"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "1"], ["add", "x", "10"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "10"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "26"], ["add", "x", "-5"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "12"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "26"], ["add", "x", "-16"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "10"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "26"], ["add", "x", "-7"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "11"], ["mul", "y", "x"], ["add", "z", "y"], ["inp", "w"], ["mul", "x", "0"], ["add", "x", "z"], ["mod", "x", "26"], ["div", "z", "26"], ["add", "x", "-11"], ["eql", "x", "w"], ["eql", "x", "0"], ["mul", "y", "0"], ["add", "y", "25"], ["mul", "y", "x"], ["add", "y", "1"], ["mul", "z", "y"], ["mul", "y", "0"], ["add", "y", "w"], ["add", "y", "15"], ["mul", "y", "x"], ["add", "z", "y"], ] def main(): registers = {r: r for r in "wxyz"} program = [] try: with open("inputs/2021/24_") as f: for line in f: program.append(line.split()) except: program = my_program # program = [] for i, inst in enumerate(program): # print(f"{registers} | {inst}") if inst[0] == "inp": print(f"constraint v[{i}] = d[{i//18}];") registers[inst[1]] = f"v[{i}]" continue op1, op2 = inst[1:] op2 = registers[op2] if op2 in registers else int(op2) if inst[0] == "add": print(f"constraint v[{i}] = {registers[op1]} + {op2};") elif inst[0] == "mul": print(f"constraint v[{i}] = {registers[op1]} * {op2};") elif inst[0] == "mod": print(f"constraint v[{i}] = {registers[op1]} mod {op2};") elif inst[0] == "div": print(f"constraint v[{i}] = {registers[op1]} div {op2};") elif inst[0] == "eql": print( f"constraint v[{i}] = if {registers[op1]} == {op2} then 1 else 0 endif;" ) else: assert False registers[op1] = f"v[{i}]" if __name__ == "__main__": main()
23.453947
88
0.274474
911
7,130
2.133919
0.084523
0.115226
0.072016
0.115226
0.752058
0.733539
0.728395
0.697531
0.697531
0.697531
0
0.046285
0.309116
7,130
303
89
23.531353
0.348356
0.006031
0
0.83045
0
0.00346
0.232355
0
0
0
0
0
0.00346
1
0.00346
false
0
0.00692
0
0.010381
0.020761
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5