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
2893e47c6587e2d171c143192e27f6d3602b25a6
163
py
Python
lewas/functools.py
lewas-lab/lewas
a4a05977c26cfebb3a6ee7025a63d2331ac1cac5
[ "MIT" ]
1
2018-06-21T17:48:37.000Z
2018-06-21T17:48:37.000Z
lewas/functools.py
lewas-lab/lewas
a4a05977c26cfebb3a6ee7025a63d2331ac1cac5
[ "MIT" ]
null
null
null
lewas/functools.py
lewas-lab/lewas
a4a05977c26cfebb3a6ee7025a63d2331ac1cac5
[ "MIT" ]
null
null
null
# see https://mathieularose.com/function-composition-in-python/ def compose(*functions): return reduce(lambda f, g: lambda x: f(g(x)), functions, lambda x: x)
40.75
73
0.717791
25
163
4.68
0.68
0.034188
0
0
0
0
0
0
0
0
0
0
0.122699
163
3
74
54.333333
0.818182
0.374233
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
6
9543295a426ef5c0af79e528fcc4f4c46610e03c
106
py
Python
nodebin/blueprints/apiv1/__init__.py
jxltom/nodebin
f7c60cf6ae8ed179340468ad03c65bcd0019daf6
[ "MIT" ]
null
null
null
nodebin/blueprints/apiv1/__init__.py
jxltom/nodebin
f7c60cf6ae8ed179340468ad03c65bcd0019daf6
[ "MIT" ]
1
2018-07-17T02:09:28.000Z
2018-07-17T02:09:28.000Z
nodebin/blueprints/apiv1/__init__.py
jxltom/nodebin
f7c60cf6ae8ed179340468ad03c65bcd0019daf6
[ "MIT" ]
1
2021-11-10T23:15:08.000Z
2021-11-10T23:15:08.000Z
from flask import Blueprint apiv1 = Blueprint('apiv1', __name__) from . import views from . import hooks
17.666667
36
0.764151
14
106
5.5
0.571429
0.363636
0
0
0
0
0
0
0
0
0
0.022472
0.160377
106
5
37
21.2
0.842697
0
0
0
0
0
0.04717
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
6
954b6388a8f4a8d8111a38ccad9be1869c9ec2cf
788
py
Python
iscontained.py
sanjioh/weird_tdd
b13f9c523f0c33e4b289de2114a3616bbea82d28
[ "MIT" ]
null
null
null
iscontained.py
sanjioh/weird_tdd
b13f9c523f0c33e4b289de2114a3616bbea82d28
[ "MIT" ]
null
null
null
iscontained.py
sanjioh/weird_tdd
b13f9c523f0c33e4b289de2114a3616bbea82d28
[ "MIT" ]
null
null
null
# coding: utf-8 def iscontained_step1(contained, container): return True iscontained = iscontained_step1 def iscontained_step2(contained, container): return contained == container iscontained = iscontained_step2 def iscontained_step3(contained, container): return contained == [] iscontained = iscontained_step3 def iscontained_step4(contained, container): return contained == [] or contained == container iscontained = iscontained_step4 def iscontained_step5(contained, container): return contained == [] or contained[0] in container iscontained = iscontained_step5 def iscontained_step6(contained, container): for item in contained: if item not in container: return False return True iscontained = iscontained_step6
17.511111
55
0.744924
83
788
6.927711
0.277108
0.250435
0.208696
0.229565
0.153043
0.153043
0
0
0
0
0
0.021875
0.187817
788
44
56
17.909091
0.876563
0.016497
0
0.095238
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0.238095
0.619048
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
9562d27ab3a75ab777840e0b827470323213471f
104,378
py
Python
lenv/lib/python3.6/site-packages/Crypto/SelfTest/Hash/test_vectors/keccak/ShortMsgKAT_512.txt.py
shrey-c/DataLeakageDjango
a827c5a09e5501921f9fb97b656755671238dd63
[ "BSD-3-Clause" ]
6
2020-05-03T12:03:21.000Z
2020-09-07T08:33:58.000Z
lenv/lib/python3.6/site-packages/Crypto/SelfTest/Hash/test_vectors/keccak/ShortMsgKAT_512.txt.py
shrey-c/DataLeakageDjango
a827c5a09e5501921f9fb97b656755671238dd63
[ "BSD-3-Clause" ]
3
2020-04-17T06:50:44.000Z
2022-01-13T02:16:48.000Z
lenv/lib/python3.6/site-packages/Crypto/SelfTest/Hash/test_vectors/keccak/ShortMsgKAT_512.txt.py
shrey-c/DataLeakageDjango
a827c5a09e5501921f9fb97b656755671238dd63
[ "BSD-3-Clause" ]
null
null
null
X XXXX XXXXXXXXX XXXX XXXXXXXXXXXXXXX XXXX XXXXXXXXXXXXXXXXXXXXXXX XXX X X XXX X XX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X X XXX X XX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X XX XXX X XXXX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X XX XXX X XXXXXX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X XX XXX X XXXXXXXX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XXXXXXXXXXXXXXXXXXXX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X XXXX XXX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
101.633885
516
0.975397
2,311
104,378
44.054522
0.112505
0.020116
0.329398
0.335625
0.356949
0.356949
0.356949
0.356949
0.002829
0.002829
0
0
0.024603
104,378
1,026
517
101.732943
1
0
0
0.672302
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
0
0
1
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
6
9566a6103bc02fb60c1e4383e36713c8ee0d38aa
93
py
Python
module_05/test_hello_word.py
IvanJL/2021_python_selenium
52ad0afa43664308437658966ec5d989a2db9c02
[ "Unlicense" ]
null
null
null
module_05/test_hello_word.py
IvanJL/2021_python_selenium
52ad0afa43664308437658966ec5d989a2db9c02
[ "Unlicense" ]
null
null
null
module_05/test_hello_word.py
IvanJL/2021_python_selenium
52ad0afa43664308437658966ec5d989a2db9c02
[ "Unlicense" ]
null
null
null
def test_one(): print("First tests case") def test_two(): print("SECOND TEST CASE")
15.5
29
0.645161
14
93
4.142857
0.642857
0.241379
0
0
0
0
0
0
0
0
0
0
0.204301
93
6
30
15.5
0.783784
0
0
0
0
0
0.344086
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
1
0
6
956be9797cc344529b3edc4ff573b43323f1fc56
22
py
Python
soccer_fw/models/neural/__init__.py
szkkteam/soccer_fw
998ee2dd2f11b86abafd44891f8eb869e038cb47
[ "MIT" ]
null
null
null
soccer_fw/models/neural/__init__.py
szkkteam/soccer_fw
998ee2dd2f11b86abafd44891f8eb869e038cb47
[ "MIT" ]
null
null
null
soccer_fw/models/neural/__init__.py
szkkteam/soccer_fw
998ee2dd2f11b86abafd44891f8eb869e038cb47
[ "MIT" ]
null
null
null
from .knn_mlp import *
22
22
0.772727
4
22
4
1
0
0
0
0
0
0
0
0
0
0
0
0.136364
22
1
22
22
0.842105
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
95a33c9c31fce2728ba6f71a09cf6e674ab58bb1
5,375
py
Python
synoptico/tests.py
eldarion/synoptico
742995f68f1ee8cbf58037bcaf91d77283f51833
[ "MIT" ]
4
2015-04-10T06:34:15.000Z
2019-12-14T14:40:00.000Z
synoptico/tests.py
eldarion/synoptico
742995f68f1ee8cbf58037bcaf91d77283f51833
[ "MIT" ]
null
null
null
synoptico/tests.py
eldarion/synoptico
742995f68f1ee8cbf58037bcaf91d77283f51833
[ "MIT" ]
null
null
null
from django.core.exceptions import ValidationError from django.test import TestCase from django.contrib.auth.models import User from .models import Project, Timeline, Event, TimelineMapping class ValidationTests(TestCase): def setUp(self): self.user = User.objects.create_user(username="jtauber") self.project = Project.objects.create(title="The Hobbit", created_by=self.user) def test_isbn_validation_error(self): with self.assertRaises(ValidationError): Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_BOOK, name="The Hobbit (Houghton Mifflin Seventieth Anniversary Edition)", identifier="notanisbn", created_by=self.user ) def test_isbn_validation_error_from_no_right_number_of_digits(self): with self.assertRaises(ValidationError): Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_BOOK, name="The Hobbit (Houghton Mifflin Seventieth Anniversary Edition)", identifier="132", created_by=self.user ) def test_isbn_validation_valid_with_10_digits(self): timeline = Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_BOOK, name="The Hobbit (Houghton Mifflin Seventieth Anniversary Edition)", identifier="0618968633", created_by=self.user ) self.assertEquals(timeline.pk, 1) def test_isbn_validation_valid_with_13_digits(self): timeline = Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_BOOK, name="The Hobbit (Houghton Mifflin Seventieth Anniversary Edition)", identifier="9780618968633", created_by=self.user ) self.assertEquals(timeline.pk, 1) def test_page_number_validation_error(self): timeline = Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_BOOK, name="The Hobbit (Houghton Mifflin Seventieth Anniversary Edition)", identifier="9780618968633", created_by=self.user ) event = Event.objects.create( project=self.project, description="Thorin inserts the key", created_by=self.user ) with self.assertRaises(ValidationError): TimelineMapping.objects.create( timeline=timeline, event=event, offset="notapage", created_by=self.user ) def test_page_number_validation_works(self): timeline = Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_BOOK, name="The Hobbit (Houghton Mifflin Seventieth Anniversary Edition)", identifier="9780618968633", created_by=self.user ) event = Event.objects.create( project=self.project, description="Thorin inserts the key", created_by=self.user ) mapping = TimelineMapping.objects.create( timeline=timeline, event=event, offset="194", created_by=self.user ) self.assertEquals(mapping.pk, 1) def test_timecode_validation_error(self): timeline = Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_MOVIE, name="The Hobbit: An Unexpected Journey", identifier="http://www.imdb.com/title/tt0903624/", created_by=self.user ) event = Event.objects.create( project=self.project, description="Thorin inserts the key", created_by=self.user ) with self.assertRaises(ValidationError): TimelineMapping.objects.create( timeline=timeline, event=event, offset="notatimecode", created_by=self.user ) def test_timecode_validation_works(self): timeline = Timeline.objects.create( project=self.project, media_type=Timeline.MEDIA_TYPE_MOVIE, name="The Hobbit: An Unexpected Journey", identifier="http://www.imdb.com/title/tt0903624/", created_by=self.user ) event = Event.objects.create( project=self.project, description="Thorin inserts the key", created_by=self.user ) mapping = TimelineMapping.objects.create( timeline=timeline, event=event, offset="00:30:15", created_by=self.user ) self.assertEquals(mapping.pk, 1) class OrderingTests(TestCase): fixtures = ["projects", "hobbit_timelines", "hobbit_mappings"] def setUp(self): self.user = User.objects.create_user(username="jtauber") def test_page_ordering(self): pages = [ x.offset.strip() for x in Timeline.objects.get(pk=1).events() ] self.assertEquals(pages, ["9", "40", "70", "102", "110", "137", "159", "194", "208", "248"])
35.130719
100
0.601302
540
5,375
5.827778
0.196296
0.0483
0.070226
0.091833
0.832221
0.825866
0.800445
0.800445
0.78837
0.733715
0
0.02957
0.307907
5,375
152
101
35.361842
0.816398
0
0
0.664179
0
0
0.142698
0
0
0
0
0
0.067164
1
0.08209
false
0
0.029851
0
0.134328
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
95a43631042c6880007b556158ce8f7fcf840333
34
py
Python
chatty_goose/pipeline/__init__.py
saileshnankani/chatty-goose
ef3a27119d6825a96ae85d1453d6b4eac4ed22b7
[ "Apache-2.0" ]
24
2021-03-08T09:53:59.000Z
2022-03-17T06:47:06.000Z
chatty_goose/pipeline/__init__.py
saileshnankani/chatty-goose
ef3a27119d6825a96ae85d1453d6b4eac4ed22b7
[ "Apache-2.0" ]
10
2021-03-08T13:35:54.000Z
2021-11-15T03:32:37.000Z
chatty_goose/pipeline/__init__.py
saileshnankani/chatty-goose
ef3a27119d6825a96ae85d1453d6b4eac4ed22b7
[ "Apache-2.0" ]
8
2021-03-03T00:37:18.000Z
2021-08-01T00:50:47.000Z
from .retrieval_pipeline import *
17
33
0.823529
4
34
6.75
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
34
1
34
34
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
2545250593202a8ccc16041da6b6f8ad2bcc4ca3
37
py
Python
test/tests/relative_import2.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:28:45.000Z
2020-02-06T14:28:45.000Z
test/tests/relative_import2.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
test/tests/relative_import2.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:29:00.000Z
2020-02-06T14:29:00.000Z
from relative_import2_pkg import foo
18.5
36
0.891892
6
37
5.166667
1
0
0
0
0
0
0
0
0
0
0
0.030303
0.108108
37
1
37
37
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
c27eaded503007c2b19dc56aa83318427399b41a
21
py
Python
pkg/strategy/__init__.py
skanehira1126/darts_app
f2dff7602d22abe64fc6655ff932ab8e6dea5e5e
[ "MIT" ]
1
2020-04-28T12:05:22.000Z
2020-04-28T12:05:22.000Z
pkg/strategy/__init__.py
skanehira1126/darts_app
f2dff7602d22abe64fc6655ff932ab8e6dea5e5e
[ "MIT" ]
null
null
null
pkg/strategy/__init__.py
skanehira1126/darts_app
f2dff7602d22abe64fc6655ff932ab8e6dea5e5e
[ "MIT" ]
null
null
null
from . import zeroone
21
21
0.809524
3
21
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
21
1
21
21
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
6c569e425a4f24d2489efc5745bf27166c3ef479
85
py
Python
reqlog/pages/reports/__init__.py
JFF-Bohdan/reqlog
a7ba7b6e12609d736b3cd8cd8bc2913d511848ee
[ "MIT" ]
null
null
null
reqlog/pages/reports/__init__.py
JFF-Bohdan/reqlog
a7ba7b6e12609d736b3cd8cd8bc2913d511848ee
[ "MIT" ]
null
null
null
reqlog/pages/reports/__init__.py
JFF-Bohdan/reqlog
a7ba7b6e12609d736b3cd8cd8bc2913d511848ee
[ "MIT" ]
null
null
null
from .page_all_requests import * # noqa from .page_request_details import * # noqa
42.5
43
0.764706
12
85
5.083333
0.666667
0.262295
0
0
0
0
0
0
0
0
0
0
0.164706
85
2
43
42.5
0.859155
0.105882
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
6c847bc1d60e1302ce073f86ff4b3dd35ee39bb7
7,841
py
Python
sdi_utils.py
erelsibm/sdi
4094079579a8fe52cd628bb755226aa8c3215e2e
[ "Apache-2.0" ]
null
null
null
sdi_utils.py
erelsibm/sdi
4094079579a8fe52cd628bb755226aa8c3215e2e
[ "Apache-2.0" ]
null
null
null
sdi_utils.py
erelsibm/sdi
4094079579a8fe52cd628bb755226aa8c3215e2e
[ "Apache-2.0" ]
null
null
null
from tempfile import NamedTemporaryFile import requests import json import pickle import numpy as np from io import StringIO import os def serializeObject(pythonObj): return pickle.dumps(pythonObj, pickle.HIGHEST_PROTOCOL) def deserializeObject(pickledObj): return pickle.loads(pickledObj) def serializeKerasModel(model): with NamedTemporaryFile() as f: model.save(f.name) f.seek(0) obj = f.read() return obj def deserializeKerasModel(obj): from keras.models import Model,load_model with NamedTemporaryFile(mode='wb') as f: f.write(obj) f.flush() model = load_model(f.name) return model def serializeNumpyArray(arr): with NamedTemporaryFile() as f: np.save(f, arr) f.seek(0) obj = f.read() f.close() return obj def serializeFile(path): with open(path, mode='rb') as f: obj = f.read() return obj def put_to_objectstore(credentials, object_name, my_data, binary=True, region='dallas'): print('my_data', len(my_data)) url1 = ''.join(['https://identity.open.softlayer.com', '/v3/auth/tokens']) data = {'auth': {'identity': {'methods': ['password'], 'password': {'user': {'name': credentials['username'],'domain': {'id': credentials['domain_id']}, 'password': credentials['password']}}}}} headers1 = {'Content-Type': 'application/json'} resp1 = requests.post(url=url1, data=json.dumps(data), headers=headers1) resp1_body = resp1.json() for e1 in resp1_body['token']['catalog']: if(e1['type']=='object-store'): for e2 in e1['endpoints']: if(e2['interface']=='public'and e2['region']==region): url2 = ''.join([e2['url'],'/', credentials['container'], '/', object_name]) s_subject_token = resp1.headers['x-subject-token'] headers_accept = 'application/octet-stream' if (binary) else 'application/json' headers2 = {'X-Auth-Token': s_subject_token, 'accept': headers_accept} resp2 = requests.put(url=url2, headers=headers2, data = my_data ) def get_from_objectstore(credentials, object_name, binary=True, region='dallas'): url1 = ''.join(['https://identity.open.softlayer.com', '/v3/auth/tokens']) data = {'auth': {'identity': {'methods': ['password'], 'password': {'user': {'name': credentials['username'],'domain': {'id': credentials['domain_id']}, 'password': credentials['password']}}}}} headers1 = {'Content-Type': 'application/json'} resp1 = requests.post(url=url1, data=json.dumps(data), headers=headers1) resp1_body = resp1.json() for e1 in resp1_body['token']['catalog']: if(e1['type']=='object-store'): for e2 in e1['endpoints']: if(e2['interface']=='public'and e2['region']==region): url2 = ''.join([e2['url'],'/', credentials['container'], '/', object_name]) s_subject_token = resp1.headers['x-subject-token'] headers_accept = 'application/octet-stream' if (binary) else 'application/json' headers2 = {'X-Auth-Token': s_subject_token, 'accept': headers_accept} resp2 = requests.get(url=url2, headers=headers2) res = resp2.content if (binary) else StringIO(resp2.text) return res def put_to_cloud_object_storage(api_key, full_object_path, my_data, auth_endpoint="https://iam.ng.bluemix.net/oidc/token", service_endpoint="https://s3-api.us-geo.objectstorage.softlayer.net"): print('my_data', len(my_data)) response=requests.post( url=auth_endpoint, headers={"Content-Type": "application/x-www-form-urlencoded"}, params={"grant_type":"urn:ibm:params:oauth:grant-type:apikey","apikey":api_key}, verify=True) access_token=response.json()["access_token"] response=requests.put( url=service_endpoint+"/"+full_object_path, headers={"Authorization": "bearer " + access_token}, data = my_data) return response def get_from_cloud_object_storage(api_key, full_object_path, auth_endpoint="https://iam.ng.bluemix.net/oidc/token", service_endpoint="https://s3-api.us-geo.objectstorage.softlayer.net"): response=requests.post( url=auth_endpoint, headers={"Content-Type": "application/x-www-form-urlencoded"}, params={"grant_type":"urn:ibm:params:oauth:grant-type:apikey","apikey":api_key}, verify=True) access_token=response.json()["access_token"] response=requests.get( url=service_endpoint+"/"+full_object_path, headers={"Authorization": "bearer " + access_token}, params=None, verify=True) return response.content # Make sure to install: ibm-cos-sdk # !pip install ibm-cos-sdk # https://github.com/IBM/ibm-cos-sdk-python def create_messagehub_producer(username, password, kafka_brokers_sasl = [], sasl_mechanism = 'PLAIN', security_protocol = 'SASL_SSL', value_serializer=lambda v: json.dumps(v).encode('utf-8')): import ssl from kafka import KafkaProducer from kafka.errors import KafkaError if (kafka_brokers_sasl == []): kafka_brokers_sasl = [ "kafka01-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka02-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka03-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka04-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka05-prod01.messagehub.services.us-south.bluemix.net:9093" ] # Create a new context using system defaults, disable all but TLS1.2 context = ssl.create_default_context() context.options &= ssl.OP_NO_TLSv1 context.options &= ssl.OP_NO_TLSv1_1 producer = KafkaProducer(bootstrap_servers = kafka_brokers_sasl, sasl_plain_username = username, sasl_plain_password = password, security_protocol = security_protocol, ssl_context = context, sasl_mechanism = sasl_mechanism, value_serializer=value_serializer) return producer def create_messagehub_consumer(username, password, kafka_brokers_sasl = [], sasl_mechanism = 'PLAIN', security_protocol = 'SASL_SSL', value_deserializer=lambda v: json.loads(v).encode('utf-8')): import ssl from kafka import KafkaConsumer from kafka.errors import KafkaError if (kafka_brokers_sasl == []): kafka_brokers_sasl = [ "kafka01-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka02-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka03-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka04-prod01.messagehub.services.us-south.bluemix.net:9093", "kafka05-prod01.messagehub.services.us-south.bluemix.net:9093" ] # Create a new context using system defaults, disable all but TLS1.2 context = ssl.create_default_context() context.options &= ssl.OP_NO_TLSv1 context.options &= ssl.OP_NO_TLSv1_1 consumer = KafkaConsumer(bootstrap_servers = kafka_brokers_sasl, sasl_plain_username = username, sasl_plain_password = password, security_protocol = security_protocol, ssl_context = context, sasl_mechanism = sasl_mechanism, value_deserializer=value_deserializer) return consumer
44.551136
197
0.627981
896
7,841
5.340402
0.22433
0.025078
0.050157
0.054336
0.741902
0.741902
0.721003
0.721003
0.70512
0.690491
0
0.023874
0.241423
7,841
175
198
44.805714
0.780599
0.029843
0
0.612676
0
0
0.22576
0.103934
0
0
0
0
0
1
0.084507
false
0.056338
0.098592
0.014085
0.260563
0.014085
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
1
0
0
0
0
0
6
665ef14072dc226c1b2fb681107ea12798e5429e
30
py
Python
mlflow/Exceptions/__init__.py
BBBBlarry/mlflow
e8f5b9450ba6d3b68fe0cbb530840c0a760d3b08
[ "MIT" ]
null
null
null
mlflow/Exceptions/__init__.py
BBBBlarry/mlflow
e8f5b9450ba6d3b68fe0cbb530840c0a760d3b08
[ "MIT" ]
null
null
null
mlflow/Exceptions/__init__.py
BBBBlarry/mlflow
e8f5b9450ba6d3b68fe0cbb530840c0a760d3b08
[ "MIT" ]
null
null
null
from graph_exceptions import *
30
30
0.866667
4
30
6.25
1
0
0
0
0
0
0
0
0
0
0
0
0.1
30
1
30
30
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
66a51f9efc90e29446e895123afb9bb0b0e968f6
33
py
Python
antalla/__init__.py
sambacha/antalla
241f49058e4295aa9f5bc62efe517388d9256520
[ "MIT" ]
9
2019-12-12T13:57:31.000Z
2021-08-13T15:51:13.000Z
antalla/__init__.py
sambacha/antalla
241f49058e4295aa9f5bc62efe517388d9256520
[ "MIT" ]
5
2021-09-17T09:14:55.000Z
2022-02-26T21:06:07.000Z
antalla/__init__.py
sambacha/antalla
241f49058e4295aa9f5bc62efe517388d9256520
[ "MIT" ]
3
2020-04-27T03:30:58.000Z
2020-09-07T00:08:59.000Z
from . import exchange_listeners
16.5
32
0.848485
4
33
6.75
1
0
0
0
0
0
0
0
0
0
0
0
0.121212
33
1
33
33
0.931034
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
66dd4eef9456a62cc010cac25bc6b4176a9b5194
4,290
py
Python
hangman.py
AlikanakelaKarwowski/hangman
eead293ba078b155dbc760a2b36e179dc80f3a44
[ "MIT" ]
1
2020-09-21T15:50:53.000Z
2020-09-21T15:50:53.000Z
hangman.py
AlikanakelaKarwowski/hangman
eead293ba078b155dbc760a2b36e179dc80f3a44
[ "MIT" ]
null
null
null
hangman.py
AlikanakelaKarwowski/hangman
eead293ba078b155dbc760a2b36e179dc80f3a44
[ "MIT" ]
null
null
null
from os import system, name def hang(number): switcher = { 0: hangman, 1: hangman_head, 2: hangman_body, 3: hangman_arm1, 4: hangman_arm2, 5: hangman_leg1, 6: hangman_leg2, 7: game_over } switch = switcher.get(number) return switch() def game_over(): print("Game Over") def hangman(): print(" __________", "\n | |", "\n | |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n _____________|_____", "\n ") def hangman_head(): print(" __________", "\n | |", "\n | |", "\n _/_\_ |", "\n |_| |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n |", "\n _____________|_____", "\n ") def hangman_body(): print(" __________", "\n | |", "\n | |", "\n _/_\_ |", "\n |_| |", "\n | |", "\n | |", "\n | |", "\n | |", "\n |", "\n |", "\n |", "\n _____________|_____", "\n ") def hangman_arm1(): print(" __________", "\n | |", "\n | |", "\n _/_\_ |", "\n |_| |", "\n | |", "\n ---| |", "\n | |", "\n | |", "\n |", "\n |", "\n |", "\n _____________|_____", "\n ") def hangman_arm2(): print(" __________", "\n | |", "\n | |", "\n _/_\_ |", "\n |_| |", "\n | |", "\n ---|--- |", "\n | |", "\n | |", "\n |", "\n |", "\n |", "\n _____________|_____", "\n ") def hangman_leg1(): print(" __________", "\n | |", "\n | |", "\n _/_\_ |", "\n |_| |", "\n | |", "\n ---|--- |", "\n | |", "\n | |", "\n / |", "\n / |", "\n |", "\n _____________|_____", "\n ") def hangman_leg2(): print(" __________", "\n | |", "\n | |", "\n _/_\_ |", "\n |_| |", "\n | |", "\n ---|--- |", "\n | |", "\n | |", "\n / \ |", "\n / \ |", "\n |", "\n _____________|_____", "\n ") # define our clear function def clear_screen(): if name == 'nt': _ = system('cls') # for mac and linux(here, os.name is 'posix') else: _ = system('clear')
28.791946
49
0.174126
186
4,290
2.741935
0.252688
0.329412
0.452941
0.54902
0.364706
0.364706
0.364706
0.364706
0.364706
0.364706
0
0.011503
0.675758
4,290
148
50
28.986486
0.35514
0.016084
0
0.769841
0
0
0.532243
0
0
0
0
0
0
1
0.079365
false
0
0.007937
0
0.095238
0.063492
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
1
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
6
dd067152854705afb710e739aaabbb5527dee4d9
211
py
Python
main/SteppableDemos/FastDiffusionSolver2DFE/diffusion_fast_box/Simulation/diffusion_fast_box.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteppableDemos/FastDiffusionSolver2DFE/diffusion_fast_box/Simulation/diffusion_fast_box.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteppableDemos/FastDiffusionSolver2DFE/diffusion_fast_box/Simulation/diffusion_fast_box.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 diffusion_fast_boxSteppables import diffusion_fast_boxSteppable CompuCellSetup.register_steppable(steppable=diffusion_fast_boxSteppable(frequency=1)) CompuCellSetup.run()
26.375
85
0.890995
23
211
7.869565
0.565217
0.21547
0.276243
0
0
0
0
0
0
0
0
0.010101
0.061611
211
7
86
30.142857
0.90404
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
06b96446df50b23fa4f6e27677197381f8c48371
48
py
Python
scripts/portal/106030600_east00.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/portal/106030600_east00.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/portal/106030600_east00.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
# 106030600 sm.warp(106030600, 3) sm.dispose()
9.6
21
0.708333
7
48
4.857143
0.714286
0
0
0
0
0
0
0
0
0
0
0.452381
0.125
48
4
22
12
0.357143
0.1875
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6
6623edac80b69145636dd53b86a1281328513720
18,721
py
Python
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/Languages/bg.py
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
217
2015-01-08T04:49:42.000Z
2022-03-27T10:11:58.000Z
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/Languages/bg.py
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
185
2015-05-03T13:26:31.000Z
2022-03-28T03:08:59.000Z
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/Languages/bg.py
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
133
2015-02-11T09:17:45.000Z
2022-03-31T07:28:54.000Z
apiAttachAvailable = u'\u0414\u043e\u0441\u0442\u044a\u043f\u0435\u043d \u0447\u0440\u0435\u0437 API' apiAttachNotAvailable = u'\u041d\u0435\u0434\u043e\u0441\u0442\u044a\u043f\u0435\u043d' apiAttachPendingAuthorization = u'\u0427\u0430\u043a\u0430 \u0441\u0435 \u043e\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f' apiAttachRefused = u'\u041e\u0442\u043a\u0430\u0437\u0430\u043d\u0430' apiAttachSuccess = u'\u0423\u0441\u043f\u0435\u0445' apiAttachUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' budDeletedFriend = u'\u0418\u0437\u0442\u0440\u0438\u0442 \u043e\u0442 \u0421\u043f\u0438\u0441\u044a\u043a\u0430 \u0441 \u043f\u0440\u0438\u044f\u0442\u0435\u043b\u0438' budFriend = u'\u041f\u0440\u0438\u044f\u0442\u0435\u043b' budNeverBeenFriend = u'\u041d\u0438\u043a\u043e\u0433\u0430 \u043d\u0435 \u0435 \u0431\u0438\u043b \u0432 \u0421\u043f\u0438\u0441\u044a\u043a\u0430 \u0441 \u043f\u0440\u0438\u044f\u0442\u0435\u043b\u0438' budPendingAuthorization = u'\u0427\u0430\u043a\u0430 \u0441\u0435 \u043e\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f' budUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' cfrBlockedByRecipient = u'\u041e\u0431\u0430\u0436\u0434\u0430\u043d\u0435\u0442\u043e \u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0430\u043d\u043e \u043e\u0442 \u043f\u0440\u0438\u0435\u043c\u0430\u0449\u0438\u044f' cfrMiscError = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430' cfrNoCommonCodec = u'\u041d\u044f\u043c\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449 \u043a\u043e\u0434\u0435\u043a' cfrNoProxyFound = u'\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u044a\u0440\u0432\u044a\u0440\u0438' cfrNotAuthorizedByRecipient = u'\u0422\u043e\u0437\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b \u043d\u0435 \u0435 \u043e\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0430\u043d \u043e\u0442 \u043f\u0440\u0438\u0435\u043c\u0430\u0449\u0438\u044f' cfrRecipientNotFriend = u'\u041f\u0440\u0438\u0435\u043c\u0430\u0449\u0438\u044f\u0442 \u043d\u0435 \u0435 \u043f\u0440\u0438\u044f\u0442\u0435\u043b' cfrRemoteDeviceError = u'\u041f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043e\u0442\u0434\u0430\u043b\u0435\u0447\u0435\u043d\u043e \u0437\u0432\u0443\u043a\u043e\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e' cfrSessionTerminated = u'\u041f\u0440\u0435\u043a\u0440\u0430\u0442\u0435\u043d\u0430 \u0441\u0435\u0441\u0438\u044f' cfrSoundIOError = u'\u0412\u0445\u043e\u0434\u043d\u043e/\u0438\u0437\u0445\u043e\u0434\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430 \u0441\u044a\u0441 \u0437\u0432\u0443\u043a\u0430' cfrSoundRecordingError = u'\u0413\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0430 \u043d\u0430 \u0437\u0432\u0443\u043a' cfrUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' cfrUserDoesNotExist = u'\u0410\u0431\u043e\u043d\u0430\u0442\u044a\u0442/\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u0438\u044f\u0442 \u043d\u043e\u043c\u0435\u0440 \u043d\u0435 \u0441\u044a\u0449\u0435\u0441\u0442\u0432\u0443\u0432\u0430' cfrUserIsOffline = u'\u0422\u043e\u0439/\u0442\u044f \u0435 \u0438\u0437\u0432\u044a\u043d \u043b\u0438\u043d\u0438\u044f.' chsAllCalls = u'\u0421\u0442\u0430\u0440 \u0434\u0438\u0430\u043b\u043e\u0433' chsDialog = u'\u0414\u0438\u0430\u043b\u043e\u0433' chsIncomingCalls = u'\u041c\u043d\u043e\u0437\u0438\u043d\u0430 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u043f\u0440\u0438\u0435\u043c\u0430\u0442' chsLegacyDialog = u'\u0421\u0442\u0430\u0440 \u0434\u0438\u0430\u043b\u043e\u0433' chsMissedCalls = u'\u0414\u0438\u0430\u043b\u043e\u0433' chsMultiNeedAccept = u'\u041c\u043d\u043e\u0437\u0438\u043d\u0430 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u043f\u0440\u0438\u0435\u043c\u0430\u0442' chsMultiSubscribed = u'\u041c\u043d\u043e\u0437\u0438\u043d\u0430 \u0441\u0430 \u0430\u0431\u043e\u043d\u0430\u0442\u0438' chsOutgoingCalls = u'\u041c\u043d\u043e\u0437\u0438\u043d\u0430 \u0441\u0430 \u0430\u0431\u043e\u043d\u0430\u0442\u0438' chsUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' chsUnsubscribed = u'\u041d\u0435 \u0435 \u0430\u0431\u043e\u043d\u0430\u0442' clsBusy = u'\u0417\u0430\u0435\u0442\u043e' clsCancelled = u'\u041f\u0440\u0435\u043a\u0440\u0430\u0442\u0435\u043d' clsEarlyMedia = u'\u0412\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u0435\u0434\u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0435\u043d \u0448\u0443\u043c (Early Media)' clsFailed = u'\u0417\u0430 \u0441\u044a\u0436\u0430\u043b\u0435\u043d\u0438\u0435, \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u044a\u0442 \u0441\u0435 \u0440\u0430\u0437\u043f\u0430\u0434\u043d\u0430!' clsFinished = u'\u041f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d' clsInProgress = u'\u0412 \u043f\u0440\u043e\u0446\u0435\u0441 \u043d\u0430 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440' clsLocalHold = u'\u041d\u0430 \u0438\u0437\u0447\u0430\u043a\u0432\u0430\u043d\u0435 \u043e\u0442 \u0432\u0430\u0448\u0430 \u0441\u0442\u0440\u0430\u043d\u0430' clsMissed = u'\u043f\u0440\u043e\u043f\u0443\u0441\u043d\u0430\u0442 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440' clsOnHold = u'\u0417\u0430\u0434\u044a\u0440\u0436\u0430\u043d\u0435' clsRefused = u'\u041e\u0442\u043a\u0430\u0437\u0430\u043d\u0430' clsRemoteHold = u'\u041d\u0430 \u0438\u0437\u0447\u0430\u043a\u0432\u0430\u043d\u0435 \u043e\u0442 \u043e\u0442\u0441\u0440\u0435\u0449\u043d\u0430\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0430' clsRinging = u'\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435' clsRouting = u'\u041f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0432\u0430\u043d\u0435' clsTransferred = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' clsTransferring = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' clsUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' clsUnplaced = u'\u041d\u0438\u043a\u043e\u0433\u0430 \u043d\u0435 \u0435 \u043f\u0440\u043e\u0432\u0435\u0436\u0434\u0430\u043d' clsVoicemailBufferingGreeting = u'\u0411\u0443\u0444\u0435\u0440\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u0430' clsVoicemailCancelled = u'\u0413\u043b\u0430\u0441\u043e\u0432\u0430\u0442\u0430 \u043f\u043e\u0449\u0430 \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430' clsVoicemailFailed = u'\u041f\u0440\u043e\u0432\u0430\u043b\u0435\u043d\u043e \u0433\u043b\u0430\u0441\u043e\u0432\u043e \u0441\u044a\u043e\u0431\u0449\u0435\u043d\u0438\u0435' clsVoicemailPlayingGreeting = u'\u0412\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043d\u0430 \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u0430' clsVoicemailRecording = u'\u0417\u0430\u043f\u0438\u0441 \u043d\u0430 \u0433\u043b\u0430\u0441\u043e\u0432\u043e \u0441\u044a\u043e\u0431\u0449\u0435\u043d\u0438\u0435' clsVoicemailSent = u'\u0413\u043b\u0430\u0441\u043e\u0432\u0430\u0442\u0430 \u043f\u043e\u0449\u0430 \u0438\u0437\u043f\u0440\u0430\u0442\u0435\u043d\u0430' clsVoicemailUploading = u'\u0413\u043b\u0430\u0441\u043e\u0432\u0430\u0442\u0430 \u043f\u043e\u0449\u0430 \u0441\u0435 \u043a\u0430\u0447\u0432\u0430' cltIncomingP2P = u'\u0412\u0445\u043e\u0434\u044f\u0449\u043e Peer-to-Peer \u043e\u0431\u0430\u0436\u0434\u0430\u043d\u0435' cltIncomingPSTN = u'\u0412\u0445\u043e\u0434\u044f\u0449\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e \u043e\u0431\u0430\u0436\u0434\u0430\u043d\u0435' cltOutgoingP2P = u'\u0418\u0437\u0445\u043e\u0434\u044f\u0449\u043e Peer-to-Peer \u043e\u0431\u0430\u0436\u0434\u0430\u043d\u0435' cltOutgoingPSTN = u'\u0418\u0437\u0445\u043e\u0434\u044f\u0449\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e \u043e\u0431\u0430\u0436\u0434\u0430\u043d\u0435' cltUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' cmeAddedMembers = u'\u0414\u043e\u0431\u0430\u0432\u0438 \u0447\u043b\u0435\u043d\u043e\u0432\u0435' cmeCreatedChatWith = u'\u0421\u044a\u0437\u0434\u0430\u0434\u0435 \u0447\u0430\u0442 \u0441\u044a\u0441' cmeEmoted = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' cmeLeft = u'\u041d\u0430\u043f\u0443\u0441\u043d\u0430' cmeSaid = u'\u041a\u0430\u0437\u0430' cmeSawMembers = u'\u0412\u0438\u0434\u044f \u0447\u043b\u0435\u043d\u043e\u0432\u0435' cmeSetTopic = u'\u0417\u0430\u0434\u0430\u0439 \u0442\u0435\u043c\u0430' cmeUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' cmsRead = u'\u041f\u0440\u043e\u0447\u0435\u0442\u0435\u043d\u043e' cmsReceived = u'\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043e' cmsSending = u'\u0418\u0437\u043f\u0440\u0430\u0449\u0430\u043d\u0435...' cmsSent = u'\u041f\u0440\u0430\u0442\u0435\u043d\u0430' cmsUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' conConnecting = u'\u0412 \u043f\u0440\u043e\u0446\u0435\u0441 \u043d\u0430 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435' conOffline = u'\u0418\u0437\u0432\u044a\u043d \u043b\u0438\u043d\u0438\u044f' conOnline = u'\u041d\u0430 \u043b\u0438\u043d\u0438\u044f' conPausing = u'\u041f\u0430\u0443\u0437\u0430' conUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' cusAway = u'\u041e\u0442\u0441\u044a\u0441\u0442\u0432\u0430\u0449' cusDoNotDisturb = u'\u041e\u0442\u043f\u043e\u0447\u0438\u0432\u0430\u0449' cusInvisible = u'\u0418\u043d\u043a\u043e\u0433\u043d\u0438\u0442\u043e' cusLoggedOut = u'\u0418\u0437\u0432\u044a\u043d \u043b\u0438\u043d\u0438\u044f' cusNotAvailable = u'\u041d\u0435\u0434\u043e\u0441\u0442\u044a\u043f\u0435\u043d' cusOffline = u'\u0418\u0437\u0432\u044a\u043d \u043b\u0438\u043d\u0438\u044f' cusOnline = u'\u041d\u0430 \u043b\u0438\u043d\u0438\u044f' cusSkypeMe = u'\u0421\u043a\u0430\u0439\u043f\u0432\u0430\u0449' cusUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' cvsBothEnabled = u'\u0418\u0437\u043f\u0440\u0430\u0449\u0430\u043d\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0432\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e' cvsNone = u'\u041d\u044f\u043c\u0430 \u0432\u0438\u0434\u0435\u043e' cvsReceiveEnabled = u'\u041f\u043e\u043b\u0443\u0447\u0430\u0432\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e' cvsSendEnabled = u'\u0418\u0437\u043f\u0440\u0430\u0449\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e' cvsUnknown = u'' grpAllFriends = u'\u0412\u0441\u0438\u0447\u043a\u0438 \u041f\u0440\u0438\u044f\u0442\u0435\u043b\u0438' grpAllUsers = u'\u0412\u0441\u0438\u0447\u043a\u0438 \u0430\u0431\u043e\u043d\u0430\u0442\u0438' grpCustomGroup = u'\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u0430' grpOnlineFriends = u'\u041f\u0440\u0438\u044f\u0442\u0435\u043b\u0438 \u043e\u043d\u043b\u0430\u0439\u043d' grpPendingAuthorizationFriends = u'\u0427\u0430\u043a\u0430 \u0441\u0435 \u043e\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f' grpProposedSharedGroup = u'Proposed Shared Group' grpRecentlyContactedUsers = u'\u0410\u0431\u043e\u043d\u0430\u0442\u0438, \u0441 \u043a\u043e\u0438\u0442\u043e \u0441\u043a\u043e\u0440\u043e \u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0435\u043d\u0430 \u0432\u0440\u044a\u0437\u043a\u0430' grpSharedGroup = u'Shared Group' grpSkypeFriends = u'Skype \u041f\u0440\u0438\u044f\u0442\u0435\u043b\u0438' grpSkypeOutFriends = u'SkypeOut \u041f\u0440\u0438\u044f\u0442\u0435\u043b\u0438' grpUngroupedFriends = u'\u041d\u0435\u0433\u0440\u0443\u043f\u0438\u0440\u0430\u043d\u0438 \u041f\u0440\u0438\u044f\u0442\u0435\u043b\u0438' grpUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' grpUsersAuthorizedByMe = u'\u041e\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0430\u043d\u0438 \u043e\u0442 \u043c\u0435\u043d' grpUsersBlockedByMe = u'\u0411\u043b\u043e\u043a\u0438\u0440\u0430\u043d\u0438 \u043e\u0442 \u043c\u0435\u043d' grpUsersWaitingMyAuthorization = u'\u0427\u0430\u043a\u0430\u0449\u0438 \u043c\u043e\u044f\u0442\u0430 \u043e\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f' leaAddDeclined = u'\u0414\u043e\u0431\u0430\u0432\u044f\u043d\u0435\u0442\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e' leaAddedNotAuthorized = u'\u0414\u043e\u0431\u044f\u0432\u0430\u043d\u0438\u044f\u0442 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043e\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0430\u043d' leaAdderNotFriend = u'\u0414\u043e\u0431\u0430\u0432\u044f\u0449\u0438\u044f\u0442 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0435 \u041f\u0440\u0438\u044f\u0442\u0435\u043b' leaUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' leaUnsubscribe = u'\u041d\u0435 \u0435 \u0430\u0431\u043e\u043d\u0430\u0442' leaUserIncapable = u'\u0410\u0431\u043e\u043d\u0430\u0442\u044a\u0442 \u043d\u044f\u043c\u0430 \u0432\u044a\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442 \u0437\u0430 \u0432\u0440\u044a\u0437\u043a\u0430' leaUserNotFound = u'\u0410\u0431\u043e\u043d\u0430\u0442\u044a\u0442 \u043d\u0435 \u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d' olsAway = u'\u041e\u0442\u0441\u044a\u0441\u0442\u0432\u0430\u0449' olsDoNotDisturb = u'\u041e\u0442\u043f\u043e\u0447\u0438\u0432\u0430\u0449' olsNotAvailable = u'\u041d\u0435\u0434\u043e\u0441\u0442\u044a\u043f\u0435\u043d' olsOffline = u'\u0418\u0437\u0432\u044a\u043d \u043b\u0438\u043d\u0438\u044f' olsOnline = u'\u041d\u0430 \u043b\u0438\u043d\u0438\u044f' olsSkypeMe = u'\u0421\u043a\u0430\u0439\u043f\u0432\u0430\u0449' olsSkypeOut = u'SkypeOut' olsUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' smsMessageStatusComposing = u'Composing' smsMessageStatusDelivered = u'Delivered' smsMessageStatusFailed = u'Failed' smsMessageStatusRead = u'Read' smsMessageStatusReceived = u'Received' smsMessageStatusSendingToServer = u'Sending to Server' smsMessageStatusSentToServer = u'Sent to Server' smsMessageStatusSomeTargetsFailed = u'Some Targets Failed' smsMessageStatusUnknown = u'Unknown' smsMessageTypeCCRequest = u'Confirmation Code Request' smsMessageTypeCCSubmit = u'Confirmation Code Submit' smsMessageTypeIncoming = u'Incoming' smsMessageTypeOutgoing = u'Outgoing' smsMessageTypeUnknown = u'Unknown' smsTargetStatusAcceptable = u'Acceptable' smsTargetStatusAnalyzing = u'Analyzing' smsTargetStatusDeliveryFailed = u'Delivery Failed' smsTargetStatusDeliveryPending = u'Delivery Pending' smsTargetStatusDeliverySuccessful = u'Delivery Successful' smsTargetStatusNotRoutable = u'Not Routable' smsTargetStatusUndefined = u'Undefined' smsTargetStatusUnknown = u'Unknown' usexFemale = u'\u0436\u0435\u043d\u0441\u043a\u0438' usexMale = u'\u043c\u044a\u0436\u043a\u0438' usexUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' vmrConnectError = u'\u0413\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e' vmrFileReadError = u'\u0413\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u0447\u0435\u0442\u0435\u043d\u0435 \u043d\u0430 \u0444\u0430\u0439\u043b\u0430' vmrFileWriteError = u'\u0413\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441 \u043d\u0430 \u0444\u0430\u0439\u043b\u0430' vmrMiscError = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430' vmrNoError = u'\u041d\u044f\u043c\u0430 \u0433\u0440\u0435\u0448\u043a\u0430' vmrNoPrivilege = u'\u041d\u044f\u043c\u0430 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u044f \u0437\u0430 \u0433\u043b\u0430\u0441\u043e\u0432\u0430 \u043f\u043e\u0449\u0430' vmrNoVoicemail = u'\u041d\u044f\u043c\u0430 \u0442\u0430\u043a\u0430\u0432\u0430 \u0433\u043b\u0430\u0441\u043e\u0432\u0430 \u043f\u043e\u0449\u0430' vmrPlaybackError = u'\u0413\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0432\u0430\u043d\u0435' vmrRecordingError = u'\u0413\u0440\u0435\u0448\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441' vmrUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' vmsBlank = u'\u041f\u0440\u0430\u0437\u043d\u0430' vmsBuffering = u'\u0411\u0443\u0444\u0435\u0440\u0438\u0440\u0430\u043d\u0435' vmsDeleting = u'\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435' vmsDownloading = u'\u0421\u0432\u0430\u043b\u044f\u043d\u0435' vmsFailed = u'\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u0430' vmsNotDownloaded = u'\u041d\u0435 \u0435 \u0441\u0432\u0430\u043b\u0435\u043d\u0430' vmsPlayed = u'\u041f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u043d\u0430' vmsPlaying = u'\u041f\u0440\u043e\u0441\u043b\u0443\u0448\u0432\u0430\u043d\u0435' vmsRecorded = u'\u0417\u0430\u043f\u0438\u0441\u0430\u043d\u0430' vmsRecording = u'\u0417\u0430\u043f\u0438\u0441 \u043d\u0430 \u0433\u043b\u0430\u0441\u043e\u0432\u043e \u0441\u044a\u043e\u0431\u0449\u0435\u043d\u0438\u0435' vmsUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' vmsUnplayed = u'\u041d\u0435 \u0435 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u043d\u0430' vmsUploaded = u'\u041a\u0430\u0447\u0435\u043d\u0430' vmsUploading = u'\u041a\u0430\u0447\u0432\u0430\u043d\u0435' vmtCustomGreeting = u'\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u043d \u043f\u043e\u0437\u0434\u0440\u0430\u0432' vmtDefaultGreeting = u'\u041f\u043e\u0437\u0434\u0440\u0430\u0432 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435' vmtIncoming = u'\u0432\u0445\u043e\u0434\u044f\u0449\u043e \u0433\u043b\u0430\u0441\u043e\u0432\u043e \u0441\u044a\u043e\u0431\u0449\u0435\u043d\u0438\u0435' vmtOutgoing = u'\u0418\u0437\u0445\u043e\u0434\u044f\u0449\u0430' vmtUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430' vssAvailable = u'\u0414\u043e\u0441\u0442\u044a\u043f\u0435\u043d' vssNotAvailable = u'\u041d\u0435\u0434\u043e\u0441\u0442\u044a\u043f\u0435\u043d' vssPaused = u'\u0412 \u043f\u0430\u0443\u0437\u0430' vssRejected = u'\u041e\u0442\u0445\u0432\u044a\u0440\u043b\u0435\u043d\u043e' vssRunning = u'\u041f\u0440\u043e\u0442\u0438\u0447\u0430' vssStarting = u'\u0417\u0430\u043f\u043e\u0447\u0432\u0430' vssStopping = u'\u041f\u0440\u0438\u043a\u043b\u044e\u0447\u0432\u0430' vssUnknown = u'\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430'
99.579787
268
0.793921
2,729
18,721
5.446317
0.098204
0.049788
0.024423
0.033641
0.624773
0.589719
0.561932
0.50259
0.457041
0.40732
0
0.477116
0.052294
18,721
187
269
100.112299
0.360613
0
0
0
0
0.406417
0.776465
0.69332
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
9fde67fb91abb7b7f56c2e169b8b828fe797150e
686
py
Python
happyplace/blog/views.py
RifatPiyal/HappyPlace
ee0be2595644fb67b7ebfb591b2ce2e28da06f7b
[ "MIT" ]
null
null
null
happyplace/blog/views.py
RifatPiyal/HappyPlace
ee0be2595644fb67b7ebfb591b2ce2e28da06f7b
[ "MIT" ]
3
2019-12-22T20:19:33.000Z
2019-12-22T20:20:36.000Z
happyplace/blog/views.py
RifatPiyal/HappyPlace
ee0be2595644fb67b7ebfb591b2ce2e28da06f7b
[ "MIT" ]
null
null
null
from django.shortcuts import render def home(request): return render(request, 'blog/index.html') def about(request): return render(request, 'blog/about.html') def contact(request): return render(request, 'blog/Contact.html') def FAQ(request): return render(request, 'blog/FAQ.html') def advice(request): return render(request, 'blog/advice.html') def login(request): return render(request, 'blog/login.html') def dashboard(request): return render(request, 'blog/dashboard.html') def c_dashboard(request): return render(request, 'blog/Cdashboard.html') def loginCounselor(request): return render(request, 'blog/loginCounselor.html')
18.052632
54
0.717201
87
686
5.643678
0.241379
0.238289
0.348269
0.476578
0.586558
0.158859
0
0
0
0
0
0
0.150146
686
37
55
18.540541
0.842196
0
0
0
0
0
0.22449
0.034985
0
0
0
0
0
1
0.473684
false
0
0.052632
0.473684
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
b04683d525df3195d599132a1139db55911a5dd5
36
py
Python
pylibs/dynomite/__init__.py
moonpolysoft/dynomite
a5618dcbe17b16cefdc9c567f27a1f4445aee005
[ "BSD-3-Clause" ]
64
2015-01-27T08:31:08.000Z
2022-01-01T20:41:26.000Z
pylibs/dynomite/__init__.py
jpellerin/dynomite
54bf80ae124bfef363fdd93468a6f8a6e154c37c
[ "BSD-3-Clause" ]
null
null
null
pylibs/dynomite/__init__.py
jpellerin/dynomite
54bf80ae124bfef363fdd93468a6f8a6e154c37c
[ "BSD-3-Clause" ]
15
2015-03-19T18:55:02.000Z
2018-11-27T15:34:09.000Z
from dynomite.client import Client
12
34
0.833333
5
36
6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
2
35
18
0.967742
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
b04a142280ffd3ad80e47af61544e0958a68e94d
26
py
Python
tests/__init__.py
Agitive/django-push-notifications
cb54770ee5703a51067939cee170a9d3e62d8701
[ "MIT" ]
3
2017-05-06T11:21:19.000Z
2018-01-10T22:38:30.000Z
netbox/secrets/tests/__init__.py
Cloudxtreme/netbox
96d6be36080052122105583436e841997a5476cc
[ "Apache-2.0" ]
1
2019-06-29T17:08:47.000Z
2019-06-29T17:08:47.000Z
netbox/secrets/tests/__init__.py
Cloudxtreme/netbox
96d6be36080052122105583436e841997a5476cc
[ "Apache-2.0" ]
4
2017-02-01T22:53:14.000Z
2017-06-22T18:05:03.000Z
from test_models import *
13
25
0.807692
4
26
5
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
26
1
26
26
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
b054d2181edf60e57273a8a13d577310b286f991
48
py
Python
cvh/__init__.py
AkshayHolkar/cvh
2d35c6f0745fda69564ae1a15d1cc6fa8b709a17
[ "MIT" ]
null
null
null
cvh/__init__.py
AkshayHolkar/cvh
2d35c6f0745fda69564ae1a15d1cc6fa8b709a17
[ "MIT" ]
null
null
null
cvh/__init__.py
AkshayHolkar/cvh
2d35c6f0745fda69564ae1a15d1cc6fa8b709a17
[ "MIT" ]
null
null
null
from cvh.HandTrackingModule import HandDetector
24
47
0.895833
5
48
8.6
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
48
1
48
48
0.977273
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
c66303705c749da77f9380bf71b76dddd5d82fae
265
py
Python
arekit/contrib/networks/core/params.py
nicolay-r/AREk
19c39ec0dc9a17464cade03b9c4da0c6d1d21191
[ "MIT" ]
18
2019-12-14T18:43:11.000Z
2022-03-21T05:55:36.000Z
arekit/contrib/networks/core/params.py
nicolay-r/AREk
19c39ec0dc9a17464cade03b9c4da0c6d1d21191
[ "MIT" ]
284
2020-08-08T20:52:44.000Z
2022-03-31T05:26:20.000Z
arekit/contrib/networks/core/params.py
nicolay-r/AREk
19c39ec0dc9a17464cade03b9c4da0c6d1d21191
[ "MIT" ]
1
2021-08-07T13:17:43.000Z
2021-08-07T13:17:43.000Z
from arekit.common.model.params import BaseModelParams class NeuralNetworkModelParams(BaseModelParams): def __init__(self, epochs_count): self.__epochs_count = epochs_count @property def EpochsCount(self): return self.__epochs_count
22.083333
54
0.750943
28
265
6.678571
0.607143
0.235294
0.240642
0
0
0
0
0
0
0
0
0
0.184906
265
11
55
24.090909
0.865741
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
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
1
0
0
0
1
1
0
0
6
c6923c23adbe4ee592c962ed05aa3c98359c7cfa
176
py
Python
src/bpp/tests/tests_legacy/test_reports/__init__.py
iplweb/django-bpp
85f183a99d8d5027ae4772efac1e4a9f21675849
[ "BSD-3-Clause" ]
1
2017-04-27T19:50:02.000Z
2017-04-27T19:50:02.000Z
src/bpp/tests/tests_legacy/test_reports/__init__.py
mpasternak/django-bpp
434338821d5ad1aaee598f6327151aba0af66f5e
[ "BSD-3-Clause" ]
41
2019-11-07T00:07:02.000Z
2022-02-27T22:09:39.000Z
src/bpp/tests/tests_legacy/test_reports/__init__.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- # #from .test_komisja_centralna import * #from .test_kronika_uczelni import * #from .test_opi2012 import * #from .test_raport_jednostek_2012 import *
25.142857
42
0.75
23
176
5.391304
0.608696
0.258065
0.33871
0
0
0
0
0
0
0
0
0.058442
0.125
176
6
43
29.333333
0.746753
0.926136
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
1
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
6
c6a388fdfce832af516df36b323f75fa41eed54b
59
py
Python
performance/driver/classes/observer/logstax/__init__.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
2
2018-02-27T18:21:21.000Z
2018-03-16T12:12:12.000Z
performance/driver/classes/observer/logstax/__init__.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
1
2018-06-25T07:14:41.000Z
2018-06-25T07:14:41.000Z
performance/driver/classes/observer/logstax/__init__.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
1
2020-06-25T10:37:21.000Z
2020-06-25T10:37:21.000Z
from .observer import LogStaxObserver, LogStaxMessageEvent
29.5
58
0.881356
5
59
10.4
1
0
0
0
0
0
0
0
0
0
0
0
0.084746
59
1
59
59
0.962963
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
c6ab6e3d35f52ccae1d178dad2dd93da2fac63ef
21
py
Python
one.py
akshaynagpal/data_science
a525ff87f737afa9a2abee27c506663f19396999
[ "MIT" ]
null
null
null
one.py
akshaynagpal/data_science
a525ff87f737afa9a2abee27c506663f19396999
[ "MIT" ]
null
null
null
one.py
akshaynagpal/data_science
a525ff87f737afa9a2abee27c506663f19396999
[ "MIT" ]
null
null
null
from pandas import *
10.5
20
0.761905
3
21
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.190476
21
1
21
21
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
1
0
0
6
05c456bc3f6a17a27b68abfd2686269253aa19d6
108
py
Python
config/default.py
hmrc/wristband-frontend
a2e9e0138dc5840215c8b17384deb5b70b540c1c
[ "Apache-2.0" ]
2
2016-04-06T11:29:29.000Z
2018-03-26T12:49:07.000Z
config/default.py
hmrc/wristband-frontend
a2e9e0138dc5840215c8b17384deb5b70b540c1c
[ "Apache-2.0" ]
1
2015-09-09T09:05:19.000Z
2015-09-09T09:05:19.000Z
config/default.py
hmrc/wristband-frontend
a2e9e0138dc5840215c8b17384deb5b70b540c1c
[ "Apache-2.0" ]
7
2015-10-28T18:56:47.000Z
2021-04-10T23:51:50.000Z
import os WTF_CSRF_ENABLED = False PASSWORD_RESET_MESSAGE = os.environ.get("PASSWORD_RESET_MESSAGE", None)
21.6
71
0.824074
16
108
5.1875
0.75
0.313253
0.481928
0
0
0
0
0
0
0
0
0
0.092593
108
4
72
27
0.846939
0
0
0
0
0
0.203704
0.203704
0
0
0
0
0
1
0
false
0.333333
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
6
05f0ed4cb664a576f80e612919c64c5c15b149dc
383
py
Python
rastervision/data/api.py
carderne/raster-vision
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
[ "Apache-2.0" ]
4
2019-03-11T12:38:15.000Z
2021-04-06T14:57:52.000Z
rastervision/data/api.py
carderne/raster-vision
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
[ "Apache-2.0" ]
null
null
null
rastervision/data/api.py
carderne/raster-vision
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
[ "Apache-2.0" ]
1
2020-04-27T15:21:53.000Z
2020-04-27T15:21:53.000Z
# flake8: noqa from rastervision.data.raster_source.api import * from rastervision.data.raster_transformer.api import * from rastervision.data.label_source.api import * from rastervision.data.label_store.api import * from rastervision.data.vector_source.api import * from rastervision.data.dataset_config import DatasetConfig from rastervision.data.scene_config import SceneConfig
34.818182
58
0.845953
51
383
6.215686
0.352941
0.353312
0.44164
0.394322
0.545741
0.454259
0
0
0
0
0
0.002857
0.086162
383
10
59
38.3
0.902857
0.031332
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
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
6
af1274f444e1543d83b4a4f751e49a382a372249
44
py
Python
opensenate/__init__.py
g0ulartleo/opendata-senado
091d060d55d49f844d192baa1c0aef1aa039f1c0
[ "MIT" ]
null
null
null
opensenate/__init__.py
g0ulartleo/opendata-senado
091d060d55d49f844d192baa1c0aef1aa039f1c0
[ "MIT" ]
null
null
null
opensenate/__init__.py
g0ulartleo/opendata-senado
091d060d55d49f844d192baa1c0aef1aa039f1c0
[ "MIT" ]
null
null
null
from .parliamentarians import SenatorClient
22
43
0.886364
4
44
9.75
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
44
1
44
44
0.975
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
af4c629133a0d65696ef7f10f65d9ac889519976
29
py
Python
messaging_components/brokers/artemis/__init__.py
fgiorgetti/qpid-dispatch-tests
164c609d28db87692eed53d5361aa1ee5c97375c
[ "Apache-2.0" ]
null
null
null
messaging_components/brokers/artemis/__init__.py
fgiorgetti/qpid-dispatch-tests
164c609d28db87692eed53d5361aa1ee5c97375c
[ "Apache-2.0" ]
null
null
null
messaging_components/brokers/artemis/__init__.py
fgiorgetti/qpid-dispatch-tests
164c609d28db87692eed53d5361aa1ee5c97375c
[ "Apache-2.0" ]
null
null
null
from .artemis import Artemis
14.5
28
0.827586
4
29
6
0.75
0
0
0
0
0
0
0
0
0
0
0
0.137931
29
1
29
29
0.96
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
af60216e7db089575aeb7287242ea1be9eb88e3e
96
py
Python
venv/lib/python3.8/site-packages/parso/__init__.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/parso/__init__.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/parso/__init__.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/43/ac/58/7ad9dff88c7e82f987d7be3d371c302446b66609f3c941072f0f564484
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.458333
0
96
1
96
96
0.4375
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
6
af639911152b571ad0bf298695f30bc73023d19c
30
py
Python
forecastio/__init__.py
vIiRuS/pisst.es
47c116417ab30a880f517b8208d0ecdbb74d0404
[ "Apache-2.0" ]
null
null
null
forecastio/__init__.py
vIiRuS/pisst.es
47c116417ab30a880f517b8208d0ecdbb74d0404
[ "Apache-2.0" ]
null
null
null
forecastio/__init__.py
vIiRuS/pisst.es
47c116417ab30a880f517b8208d0ecdbb74d0404
[ "Apache-2.0" ]
null
null
null
from api import load_forecast
15
29
0.866667
5
30
5
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
30
1
30
30
0.961538
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
af7025c9fb68c7da316f687b73567c7b1df8331f
24
py
Python
src/wrant/__init__.py
fran-mora/wrant
6dc5ed7e6744c2fbcb6b82f51fbebbaea230977b
[ "MIT" ]
null
null
null
src/wrant/__init__.py
fran-mora/wrant
6dc5ed7e6744c2fbcb6b82f51fbebbaea230977b
[ "MIT" ]
2
2018-04-15T11:50:01.000Z
2018-04-15T11:50:52.000Z
src/wrant/__init__.py
fm2g11/wrant
6dc5ed7e6744c2fbcb6b82f51fbebbaea230977b
[ "MIT" ]
null
null
null
from .wrant import Wrant
24
24
0.833333
4
24
5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.125
24
1
24
24
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
af76e4e71d4ce32c893683acec7abe7be9ebc1af
1,939
py
Python
statistic/migrations/0001_initial.py
OnGridSystems/RobotVeraWebApp
01cee658a3983fcaf128b40bb99c1a4272e90c07
[ "MIT" ]
11
2018-06-13T10:10:11.000Z
2021-06-05T08:23:43.000Z
statistic/migrations/0001_initial.py
OnGridSystems/RobotVeraWebApp
01cee658a3983fcaf128b40bb99c1a4272e90c07
[ "MIT" ]
5
2021-03-19T23:41:21.000Z
2022-03-12T00:37:18.000Z
statistic/migrations/0001_initial.py
OnGridSystems/RobotVeraWebApp
01cee658a3983fcaf128b40bb99c1a4272e90c07
[ "MIT" ]
5
2018-08-17T16:09:33.000Z
2021-06-06T05:32:10.000Z
# Generated by Django 2.0.4 on 2018-07-30 10:20 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='CvStatistic', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('role', models.CharField(max_length=25)), ('role_obj_id', models.PositiveIntegerField(blank=True, default=None, null=True)), ('obj_id', models.PositiveIntegerField()), ('ip', models.GenericIPAddressField()), ('session_id', models.CharField(max_length=32)), ('count', models.PositiveIntegerField(default=1)), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_updated', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': 'CV statistic', }, ), migrations.CreateModel( name='VacancyStatistic', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('role', models.CharField(max_length=25)), ('role_obj_id', models.PositiveIntegerField(blank=True, default=None, null=True)), ('obj_id', models.PositiveIntegerField()), ('ip', models.GenericIPAddressField()), ('session_id', models.CharField(max_length=32)), ('count', models.PositiveIntegerField(default=1)), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_updated', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name': 'Vacancy statistic', }, ), ]
39.571429
114
0.560083
176
1,939
6
0.357955
0.060606
0.068182
0.090909
0.774621
0.774621
0.774621
0.774621
0.774621
0.774621
0
0.018532
0.304281
1,939
48
115
40.395833
0.76427
0.023208
0
0.682927
1
0
0.112051
0
0
0
0
0
0
1
0
false
0
0.02439
0
0.121951
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
bb6c7bae6eefd5f5b8aa055bb5fae69784e1b287
47
py
Python
gym_tree/envs/__init__.py
mhun1/gym_tree
c24e9f4c959b7c44a75d47f69b3cba9cfd1a3fdc
[ "MIT" ]
null
null
null
gym_tree/envs/__init__.py
mhun1/gym_tree
c24e9f4c959b7c44a75d47f69b3cba9cfd1a3fdc
[ "MIT" ]
null
null
null
gym_tree/envs/__init__.py
mhun1/gym_tree
c24e9f4c959b7c44a75d47f69b3cba9cfd1a3fdc
[ "MIT" ]
null
null
null
from gym_tree.envs.tree_env import LearningEnv
23.5
46
0.87234
8
47
4.875
0.875
0
0
0
0
0
0
0
0
0
0
0
0.085106
47
1
47
47
0.906977
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
bba26a4d432452356dfa3935a73254e1453401ed
85
py
Python
__init__.py
FEEprojects/sensirionpycom
6a7fdcd614ca297024af0ccd42faef9f4797f25f
[ "MIT" ]
6
2019-08-07T13:56:43.000Z
2020-11-01T02:58:51.000Z
__init__.py
FEEprojects/sensirionpycom
6a7fdcd614ca297024af0ccd42faef9f4797f25f
[ "MIT" ]
78
2020-03-20T13:58:10.000Z
2021-07-29T08:24:57.000Z
__init__.py
FEEprojects/sensirionpycom
6a7fdcd614ca297024af0ccd42faef9f4797f25f
[ "MIT" ]
5
2019-08-08T10:23:35.000Z
2021-10-06T18:34:03.000Z
from sensirionpycom.sensirion import SensirionReading, Sensirion, SensirionException
42.5
84
0.894118
7
85
10.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.070588
85
1
85
85
0.962025
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
bba3906d58197b0fa98d7ffacc2b7c48c910824b
120
py
Python
api/admin.py
mark-barrett/RESTBroker
d9b0a3574d2970443fdf40c70ab9ceb8d72614f4
[ "MIT" ]
null
null
null
api/admin.py
mark-barrett/RESTBroker
d9b0a3574d2970443fdf40c70ab9ceb8d72614f4
[ "MIT" ]
null
null
null
api/admin.py
mark-barrett/RESTBroker
d9b0a3574d2970443fdf40c70ab9ceb8d72614f4
[ "MIT" ]
null
null
null
from django.contrib import admin from api.models import * admin.site.register(APIKey) admin.site.register(APIRequest)
17.142857
32
0.808333
17
120
5.705882
0.647059
0.226804
0.350515
0
0
0
0
0
0
0
0
0
0.1
120
6
33
20
0.898148
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
a5886f9c1b01a8b897758d0692fe3d5290d3febc
5,948
py
Python
tests/test_linops/test_linops_cases/kronecker_cases.py
fxbriol/probnum
7e0e94cf9146aaa2b730b02c6d75a022cd629b5c
[ "MIT" ]
1
2022-03-30T20:16:13.000Z
2022-03-30T20:16:13.000Z
tests/test_linops/test_linops_cases/kronecker_cases.py
fxbriol/probnum
7e0e94cf9146aaa2b730b02c6d75a022cd629b5c
[ "MIT" ]
null
null
null
tests/test_linops/test_linops_cases/kronecker_cases.py
fxbriol/probnum
7e0e94cf9146aaa2b730b02c6d75a022cd629b5c
[ "MIT" ]
null
null
null
import itertools from typing import Tuple, Union import numpy as np import pytest import pytest_cases import probnum as pn from probnum.problems.zoo.linalg import random_spd_matrix spd_matrices = ( pn.linops.Identity(shape=(1, 1)), np.array([[1.0, -2.0], [-2.0, 5.0]]), random_spd_matrix(np.random.default_rng(597), dim=9), ) @pytest.mark.parametrize( "A,B", [ (np.array([[2, -3.5], [12, 6.5]]), np.eye(3)), (np.array([[1, -2], [-2.2, 5]]), np.array([[1, -3], [0, -0.5]])), (np.array([[4, 1, 4], [2, 3, 2]]), np.array([[-1, 4], [2, 1]])), (np.array([[0.4, 2, 0.8], [-0.4, 0, -0.9]]), np.array([[1, 4]])), (np.array([[4, 1], [2, 3]]), np.array([[-1, 4], [2, 1]])), ( np.array([[0.4, 2, 0.8], [-0.4, 0, -0.9], [1, 0, 2]]), np.array([[1, 4, 0], [-3, -0.4, -100], [0.18, -2, 10]]), ), ( np.array([[0.4, 2, 0.8], [-0.4, 0, -0.9], [1, 0, 2]]), np.array([[1, 4, 0], [-3, -0.4, -100]]), ), ], ) def case_kronecker( A: np.ndarray, B: np.ndarray ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: linop = pn.linops.Kronecker(A, B) matrix = np.kron(A, B) return linop, matrix @pytest_cases.case(tags=["square", "singular"]) @pytest_cases.parametrize( "A,B", [ ( np.random.default_rng(78923 + m + n).uniform(0.9, 1.1, (m, n)), np.full((n, m), np.random.default_rng(25789 + m + n).uniform(0.9, 1.1)), ) for m, n in ((3, 4), (1, 8), (2, 3)) ], ) def case_kronecker_square_non_square_factors( A: np.ndarray, B: np.ndarray ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: linop = pn.linops.Kronecker(A, B) matrix = np.kron(A, B) return linop, matrix @pytest_cases.case(tags=["square", "symmetric", "positive-definite"]) @pytest_cases.parametrize("A,B", itertools.product(spd_matrices, spd_matrices)) def case_kronecker_positive_definite( A: Union[np.ndarray, pn.linops.LinearOperator], B: Union[np.ndarray, pn.linops.LinearOperator], ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: A = pn.linops.aslinop(A) A.is_symmetric = True B = pn.linops.aslinop(B) B.is_symmetric = True linop = pn.linops.Kronecker(A, B) matrix = np.kron(A.todense(), B.todense()) return linop, matrix @pytest.mark.parametrize( "A,B", [ (np.array([[1, -2], [-2.2, 5]]), np.array([[1, -3], [0, -0.5]])), (np.array([[4, 1], [2, 3]]), np.array([[-1, 4], [2, 1]])), ( np.array([[0.4, 2, 0.8], [-0.4, 0, -0.9], [1, 0, 2]]), np.array([[1, 4, 0], [-3, -0.4, -100], [0.18, -2, 10]]), ), ], ) @pytest_cases.case(tags=["symmetric_kronecker"]) def case_symmetric_kronecker( A: np.ndarray, B: np.ndarray ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: linop = pn.linops.SymmetricKronecker(A, B) matrix = (np.kron(A, B) + np.kron(B, A)) / 2 return linop, matrix @pytest_cases.case( tags=["symmetric_kronecker", "square", "symmetric", "positive-definite"] ) @pytest_cases.parametrize( "A,B", [ ( random_spd_matrix(np.random.default_rng(234789 + n), dim=n), random_spd_matrix(np.random.default_rng(347892 + n), dim=n), ) for n in [1, 2, 3, 6] ], ) def case_symmetric_kronecker_positive_definite( A: Union[np.ndarray, pn.linops.LinearOperator], B: Union[np.ndarray, pn.linops.LinearOperator], ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: A = pn.linops.aslinop(A) A.is_symmetric = True B = pn.linops.aslinop(B) B.is_symmetric = True linop = pn.linops.SymmetricKronecker(A, B) matrix = (np.kron(A.todense(), B.todense()) + np.kron(B.todense(), A.todense())) / 2 return linop, matrix @pytest.mark.parametrize( "A", [ np.array([[1, -2], [-2.2, 5]]), np.array([[1, -3], [0, -0.5]]), np.array([[4, 1], [2, 3]]), np.array([[-1, 4], [2, 1]]), np.array([[0.4, 2, 0.8], [-0.4, 0, -0.9], [1, 0, 2]]), np.array([[1, 4, 0], [-3, -0.4, -100], [0.18, -2, 10]]), ], ) @pytest_cases.case(tags=["symmetric_kronecker"]) def case_symmetric_kronecker_identical_factors( A: np.ndarray, ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: linop = pn.linops.SymmetricKronecker(A) matrix = np.kron(A, A) return linop, matrix @pytest_cases.case( tags=[ "symmetric_kronecker", "square", "symmetric", "positive-definite", ] ) @pytest_cases.parametrize("A", spd_matrices) def case_symmetric_kronecker_identical_factors_positive_definite( A: Union[np.ndarray, pn.linops.LinearOperator], ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: A = pn.linops.aslinop(A) A.is_symmetric = True linop = pn.linops.SymmetricKronecker(A) matrix = np.kron(A.todense(), A.todense()) return linop, matrix @pytest_cases.case(tags=["square"]) @pytest_cases.parametrize("num_blocks", [1, 2, 3]) @pytest_cases.parametrize("B", [np.array([[0.4, 2, 0.8], [-0.4, 0, -0.9], [1, 0, 2]])]) def case_identity_kronecker_square( num_blocks: int, B: Union[np.ndarray, pn.linops.LinearOperator] ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: linop = pn.linops.IdentityKronecker(num_blocks, B) matrix = np.kron(np.eye(num_blocks, dtype=linop.dtype), B) return linop, matrix @pytest_cases.case(tags=["square", "symmetric", "positive-definite"]) @pytest_cases.parametrize("num_blocks", [1, 2, 3]) @pytest_cases.parametrize("B", spd_matrices) def case_identity_kronecker_positive_definite( num_blocks: int, B: Union[np.ndarray, pn.linops.LinearOperator] ) -> Tuple[pn.linops.LinearOperator, np.ndarray]: B = pn.linops.aslinop(B) B.is_symmetric = True linop = pn.linops.IdentityKronecker(num_blocks, B) matrix = np.kron(np.eye(num_blocks, dtype=linop.dtype), B.todense()) return linop, matrix
29.74
88
0.589442
885
5,948
3.865537
0.094915
0.074832
0.037416
0.023677
0.832797
0.813797
0.797135
0.728442
0.716165
0.684595
0
0.055943
0.203598
5,948
199
89
29.889447
0.666244
0
0
0.533742
0
0
0.044217
0
0
0
0
0
0
1
0.055215
false
0
0.042945
0
0.153374
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
3c0c8347cc9ecc1d5af353b49d20e66076318b34
406
py
Python
tests/test_tokenization.py
aflueckiger/impresso-text-acquisition
ed8f0586ed6a4f7de94b1504b292570bce1f51c5
[ "MIT" ]
null
null
null
tests/test_tokenization.py
aflueckiger/impresso-text-acquisition
ed8f0586ed6a4f7de94b1504b292570bce1f51c5
[ "MIT" ]
null
null
null
tests/test_tokenization.py
aflueckiger/impresso-text-acquisition
ed8f0586ed6a4f7de94b1504b292570bce1f51c5
[ "MIT" ]
null
null
null
from text_importer.tokenization import insert_whitespace def test_insert_whitespace(): assert insert_whitespace("Lausanne", ",", None, "fr") is False assert insert_whitespace("(", "encore", None, "fr") is False assert insert_whitespace(".", "01", "52", "fr") is False assert insert_whitespace(",", "500", "000", "fr") is False assert insert_whitespace(",", "500", None, "fr") is True
40.6
66
0.67734
51
406
5.215686
0.411765
0.421053
0.413534
0.225564
0.518797
0.518797
0.518797
0
0
0
0
0.037901
0.155172
406
9
67
45.111111
0.737609
0
0
0
0
0
0.103448
0
0
0
0
0
0.714286
1
0.142857
true
0
0.142857
0
0.285714
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
6
3c5996b4355fd4371d51e2d1f65fd2ce4be6bc4f
103
py
Python
exoatlas/visualizations/panels/__init__.py
zkbt/exopop
5e8b9d391fe9e2d39c623d7ccd7eca8fd0f0f3f8
[ "MIT" ]
4
2020-06-24T16:38:27.000Z
2022-01-23T01:57:19.000Z
exoatlas/visualizations/panels/__init__.py
zkbt/exopop
5e8b9d391fe9e2d39c623d7ccd7eca8fd0f0f3f8
[ "MIT" ]
4
2018-09-20T23:12:30.000Z
2019-05-15T15:31:58.000Z
exoatlas/visualizations/panels/__init__.py
zkbt/exopop
5e8b9d391fe9e2d39c623d7ccd7eca8fd0f0f3f8
[ "MIT" ]
null
null
null
from .Panel import * from .BubblePanel import * from .ErrorPanel import * from .preset_panels import *
20.6
28
0.76699
13
103
6
0.538462
0.384615
0
0
0
0
0
0
0
0
0
0
0.15534
103
4
29
25.75
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
3c65fbe09c4b77a6ab0942bd0e0b7ce339728b2c
8,607
py
Python
test_output_handling.py
antonOO/vmware-openapi-generator-1
f06cf93a683969e6a6fb9560f2e0a029bb769e89
[ "MIT" ]
19
2018-12-07T18:54:25.000Z
2021-12-06T23:10:41.000Z
test_output_handling.py
antonOO/vmware-openapi-generator-1
f06cf93a683969e6a6fb9560f2e0a029bb769e89
[ "MIT" ]
27
2019-01-07T08:38:36.000Z
2021-04-28T15:52:51.000Z
test_output_handling.py
antonOO/vmware-openapi-generator-1
f06cf93a683969e6a6fb9560f2e0a029bb769e89
[ "MIT" ]
19
2018-12-07T06:47:53.000Z
2021-12-13T15:59:28.000Z
# Copyright 2020 VMware, Inc. # SPDX-License-Identifier: MIT import unittest from lib.file_output_handler import SpecificationDictsMerger class TestSpecificationDictsMerger(unittest.TestCase): def test_merge_api_rest_dicts(self): rest_path_dict = {"/rest/com/vmware/vcenter/ovf/library_item": {"post": { "tags": [ "ovf/library_item" ], "parameters": [ { "in": "body", "name": "request_body", "required": True, "schema": { "$ref": "#/definitions/com.vmware.vcenter.ovf.library_item_create" } } ], "responses": { 200: { "schema": { "$ref": "#/definitions/com.vmware.vcenter.ovf.library_item.create_resp" } }, 400: { "description": "if the specified virtual machine or virtual appliance is busy.", "schema": { "$ref": "#/definitions/com.vmware.vapi.std.errors.resource_busy_error" } }, 404: { "description": "if the virtual machine or virtual appliance specified by {@param.name source} does not exist.", "schema": { "$ref": "#/definitions/com.vmware.vapi.std.errors.not_found_error" } } }, "operationId": "create" } }, "/rest/com/vmware/vcenter/ovf/import_flag": { "get": { "tags": [ "ovf/import_flag" ], "summary": "Returns information about the import flags supported by the deployment platform. <p> The supported flags are: <dl> <dt>LAX</dt> <dd>Lax mode parsing of the OVF descriptor.</dd> </dl> <p> Future server versions might support additional flags.", "parameters": [ { "type": "string", "in": "query", "name": "rp", "description": "The identifier of resource pool target for retrieving the import flag(s).", "required": True } ], "responses": { 200: { "description": "A {@term list} of supported import flags.", "schema": { "$ref": "#/definitions/com.vmware.vcenter.ovf.import_flag.list_resp" } }, 404: { "description": "If the resource pool associated with {@param.name rp} does not exist.", "schema": { "$ref": "#/definitions/com.vmware.vapi.std.errors.not_found_error" } } }, "operationId": "list" } } } rest_type_dict = {"com.vmware.vcenter.ovf.import_flag.list_resp": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/com.vmware.vcenter.ovf.import_flag.info" } } }, "required": [ "value" ] }} # Use copies rather than references to the same dict api_path_dict = { "/api/com/vmware/vcenter/ovf/library_item": {"post": { "tags": [ "ovf/library_item" ], "parameters": [ { "in": "body", "name": "request_body", "required": True, "schema": { "$ref": "#/definitions/com.vmware.vcenter.ovf.library_item_create" } } ], "responses": { 200: { "schema": { "$ref": "#/definitions/com.vmware.vcenter.ovf.library_item.create_resp" } }, 400: { "description": "if the specified virtual machine or virtual appliance is busy.", "schema": { "$ref": "#/definitions/com.vmware.vapi.std.errors.resource_busy_error" } }, 404: { "description": "if the virtual machine or virtual appliance specified by {@param.name source} does not exist.", "schema": { "$ref": "#/definitions/com.vmware.vapi.std.errors.not_found_error" } } }, "operationId": "create" } }, "/api/com/vmware/vcenter/ovf/import_flag": { "get": { "tags": [ "ovf/import_flag" ], "summary": "Returns information about the import flags supported by the deployment platform. <p> The supported flags are: <dl> <dt>LAX</dt> <dd>Lax mode parsing of the OVF descriptor.</dd> </dl> <p> Future server versions might support additional flags.", "parameters": [ { "type": "string", "in": "query", "name": "rp", "description": "The identifier of resource pool target for retrieving the import flag(s).", "required": True } ], "responses": { 200: { "description": "A {@term list} of supported import flags.", "schema": { "$ref": "#/definitions/com.vmware.vcenter.ovf.import_flag.list_resp" } }, 404: { "description": "If the resource pool associated with {@param.name rp} does not exist.", "schema": { "$ref": "#/definitions/com.vmware.vapi.std.errors.not_found_error" } } }, "operationId": "list" } }, "/api/com/vmware/vcenter/ovf/export_flag": {} } api_type_dict = {"ComVmwareVcenterOvfImportFlag": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/com.vmware.vcenter.ovf.import_flag.info" } } }, "required": [ "value" ] }} rest_spec = {"vcenter": (dict(rest_path_dict), dict(rest_type_dict)), "appliance": ({}, {})} api_spec = {"vcenter": (dict(api_path_dict), dict(api_type_dict)), "cis": ({}, {})} merger = SpecificationDictsMerger(dict(rest_spec), dict(api_spec)) merged = merger.merge_api_rest_dicts() self.assertTrue("vcenter" in merged and "cis" in merged and "appliance" in merged) self.assertEqual(len(merged["vcenter"][0]), 5) self.assertEqual(len(merged["vcenter"][1]), 2) api_def_type = merged["vcenter"][0] \ .get("/api/com/vmware/vcenter/ovf/import_flag") \ .get("get") \ .get("responses") \ .get(200) \ .get("schema") \ .get("$ref") self.assertEqual(api_def_type, "#/definitions/com.vmware.vcenter.ovf.import_flag.list_resp") if __name__ == '__main__': unittest.main()
41.781553
275
0.396073
643
8,607
5.172628
0.22084
0.059531
0.076969
0.091401
0.808178
0.766987
0.766987
0.766987
0.744438
0.730006
0
0.009561
0.489601
8,607
205
276
41.985366
0.747553
0.012432
0
0.5625
0
0.010417
0.368762
0.137594
0
0
0
0
0.020833
1
0.005208
false
0
0.104167
0
0.114583
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
3c7e80b9d40ab532b60ede564800671439e0b420
129,730
py
Python
sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization from ._redis_management_client_enums import * class CheckNameAvailabilityParameters(msrest.serialization.Model): """Parameters body to pass for resource name availability check. All required parameters must be populated in order to send to Azure. :ivar name: Required. Resource name. :vartype name: str :ivar type: Required. Resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'. :vartype type: str """ _validation = { 'name': {'required': True}, 'type': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, *, name: str, type: str, **kwargs ): """ :keyword name: Required. Resource name. :paramtype name: str :keyword type: Required. Resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'. :paramtype type: str """ super(CheckNameAvailabilityParameters, self).__init__(**kwargs) self.name = name self.type = type class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. :vartype info: any """ _validation = { 'type': {'readonly': True}, 'info': {'readonly': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'info': {'key': 'info', 'type': 'object'}, } def __init__( self, **kwargs ): """ """ super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None class ErrorDetail(msrest.serialization.Model): """The error detail. Variables are only populated by the server, and will be ignored when sending a request. :ivar code: The error code. :vartype code: str :ivar message: The error message. :vartype message: str :ivar target: The error target. :vartype target: str :ivar details: The error details. :vartype details: list[~azure.mgmt.redis.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~azure.mgmt.redis.models.ErrorAdditionalInfo] """ _validation = { 'code': {'readonly': True}, 'message': {'readonly': True}, 'target': {'readonly': True}, 'details': {'readonly': True}, 'additional_info': {'readonly': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__( self, **kwargs ): """ """ super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None self.details = None self.additional_info = None class ErrorResponse(msrest.serialization.Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.redis.models.ErrorDetail """ _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, *, error: Optional["ErrorDetail"] = None, **kwargs ): """ :keyword error: The error object. :paramtype error: ~azure.mgmt.redis.models.ErrorDetail """ super(ErrorResponse, self).__init__(**kwargs) self.error = error class ExportRDBParameters(msrest.serialization.Model): """Parameters for Redis export operation. All required parameters must be populated in order to send to Azure. :ivar format: File format. :vartype format: str :ivar prefix: Required. Prefix to use for exported files. :vartype prefix: str :ivar container: Required. Container name to export to. :vartype container: str """ _validation = { 'prefix': {'required': True}, 'container': {'required': True}, } _attribute_map = { 'format': {'key': 'format', 'type': 'str'}, 'prefix': {'key': 'prefix', 'type': 'str'}, 'container': {'key': 'container', 'type': 'str'}, } def __init__( self, *, prefix: str, container: str, format: Optional[str] = None, **kwargs ): """ :keyword format: File format. :paramtype format: str :keyword prefix: Required. Prefix to use for exported files. :paramtype prefix: str :keyword container: Required. Container name to export to. :paramtype container: str """ super(ExportRDBParameters, self).__init__(**kwargs) self.format = format self.prefix = prefix self.container = container class ImportRDBParameters(msrest.serialization.Model): """Parameters for Redis import operation. All required parameters must be populated in order to send to Azure. :ivar format: File format. :vartype format: str :ivar files: Required. files to import. :vartype files: list[str] """ _validation = { 'files': {'required': True}, } _attribute_map = { 'format': {'key': 'format', 'type': 'str'}, 'files': {'key': 'files', 'type': '[str]'}, } def __init__( self, *, files: List[str], format: Optional[str] = None, **kwargs ): """ :keyword format: File format. :paramtype format: str :keyword files: Required. files to import. :paramtype files: list[str] """ super(ImportRDBParameters, self).__init__(**kwargs) self.format = format self.files = files class ManagedServiceIdentity(msrest.serialization.Model): """Managed service identity (system assigned and/or user assigned identities). Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar principal_id: The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. :vartype principal_id: str :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. :vartype tenant_id: str :ivar type: Required. Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned". :vartype type: str or ~azure.mgmt.redis.models.ManagedServiceIdentityType :ivar user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :vartype user_assigned_identities: dict[str, ~azure.mgmt.redis.models.UserAssignedIdentity] """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, 'type': {'required': True}, } _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, } def __init__( self, *, type: Union[str, "ManagedServiceIdentityType"], user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, **kwargs ): """ :keyword type: Required. Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned". :paramtype type: str or ~azure.mgmt.redis.models.ManagedServiceIdentityType :keyword user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :paramtype user_assigned_identities: dict[str, ~azure.mgmt.redis.models.UserAssignedIdentity] """ super(ManagedServiceIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None self.type = type self.user_assigned_identities = user_assigned_identities class NotificationListResponse(msrest.serialization.Model): """The response of listUpgradeNotifications. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of all notifications. :vartype value: list[~azure.mgmt.redis.models.UpgradeNotification] :ivar next_link: Link for next set of notifications. :vartype next_link: str """ _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[UpgradeNotification]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["UpgradeNotification"]] = None, **kwargs ): """ :keyword value: List of all notifications. :paramtype value: list[~azure.mgmt.redis.models.UpgradeNotification] """ super(NotificationListResponse, self).__init__(**kwargs) self.value = value self.next_link = None class Operation(msrest.serialization.Model): """REST API operation. :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str :ivar display: The object that describes the operation. :vartype display: ~azure.mgmt.redis.models.OperationDisplay """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, } def __init__( self, *, name: Optional[str] = None, display: Optional["OperationDisplay"] = None, **kwargs ): """ :keyword name: Operation name: {provider}/{resource}/{operation}. :paramtype name: str :keyword display: The object that describes the operation. :paramtype display: ~azure.mgmt.redis.models.OperationDisplay """ super(Operation, self).__init__(**kwargs) self.name = name self.display = display class OperationDisplay(msrest.serialization.Model): """The object that describes the operation. :ivar provider: Friendly name of the resource provider. :vartype provider: str :ivar operation: Operation type: read, write, delete, listKeys/action, etc. :vartype operation: str :ivar resource: Resource type on which the operation is performed. :vartype resource: str :ivar description: Friendly name of the operation. :vartype description: str """ _attribute_map = { 'provider': {'key': 'provider', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, } def __init__( self, *, provider: Optional[str] = None, operation: Optional[str] = None, resource: Optional[str] = None, description: Optional[str] = None, **kwargs ): """ :keyword provider: Friendly name of the resource provider. :paramtype provider: str :keyword operation: Operation type: read, write, delete, listKeys/action, etc. :paramtype operation: str :keyword resource: Resource type on which the operation is performed. :paramtype resource: str :keyword description: Friendly name of the operation. :paramtype description: str """ super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.operation = operation self.resource = resource self.description = description class OperationListResult(msrest.serialization.Model): """Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations supported by the resource provider. :vartype value: list[~azure.mgmt.redis.models.Operation] :ivar next_link: URL to get the next set of operation list results if there are any. :vartype next_link: str """ _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[Operation]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["Operation"]] = None, **kwargs ): """ :keyword value: List of operations supported by the resource provider. :paramtype value: list[~azure.mgmt.redis.models.Operation] """ super(OperationListResult, self).__init__(**kwargs) self.value = value self.next_link = None class PrivateEndpoint(msrest.serialization.Model): """The Private Endpoint resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ARM identifier for Private Endpoint. :vartype id: str """ _validation = { 'id': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, } def __init__( self, **kwargs ): """ """ super(PrivateEndpoint, self).__init__(**kwargs) self.id = None class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, **kwargs ): """ """ super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None class PrivateEndpointConnection(Resource): """The Private Endpoint Connection resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar private_endpoint: The resource of private end point. :vartype private_endpoint: ~azure.mgmt.redis.models.PrivateEndpoint :ivar private_link_service_connection_state: A collection of information about the state of the connection between service consumer and provider. :vartype private_link_service_connection_state: ~azure.mgmt.redis.models.PrivateLinkServiceConnectionState :ivar provisioning_state: The provisioning state of the private endpoint connection resource. Possible values include: "Succeeded", "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.redis.models.PrivateEndpointConnectionProvisioningState """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, *, private_endpoint: Optional["PrivateEndpoint"] = None, private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, **kwargs ): """ :keyword private_endpoint: The resource of private end point. :paramtype private_endpoint: ~azure.mgmt.redis.models.PrivateEndpoint :keyword private_link_service_connection_state: A collection of information about the state of the connection between service consumer and provider. :paramtype private_link_service_connection_state: ~azure.mgmt.redis.models.PrivateLinkServiceConnectionState """ super(PrivateEndpointConnection, self).__init__(**kwargs) self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state self.provisioning_state = None class PrivateEndpointConnectionListResult(msrest.serialization.Model): """List of private endpoint connection associated with the specified storage account. :ivar value: Array of private endpoint connections. :vartype value: list[~azure.mgmt.redis.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } def __init__( self, *, value: Optional[List["PrivateEndpointConnection"]] = None, **kwargs ): """ :keyword value: Array of private endpoint connections. :paramtype value: list[~azure.mgmt.redis.models.PrivateEndpointConnection] """ super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = value class PrivateLinkResource(Resource): """A private link resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar group_id: The private link resource group id. :vartype group_id: str :ivar required_members: The private link resource required member names. :vartype required_members: list[str] :ivar required_zone_names: The private link resource Private link DNS zone name. :vartype required_zone_names: list[str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'group_id': {'readonly': True}, 'required_members': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'group_id': {'key': 'properties.groupId', 'type': 'str'}, 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__( self, *, required_zone_names: Optional[List[str]] = None, **kwargs ): """ :keyword required_zone_names: The private link resource Private link DNS zone name. :paramtype required_zone_names: list[str] """ super(PrivateLinkResource, self).__init__(**kwargs) self.group_id = None self.required_members = None self.required_zone_names = required_zone_names class PrivateLinkResourceListResult(msrest.serialization.Model): """A list of private link resources. :ivar value: Array of private link resources. :vartype value: list[~azure.mgmt.redis.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } def __init__( self, *, value: Optional[List["PrivateLinkResource"]] = None, **kwargs ): """ :keyword value: Array of private link resources. :paramtype value: list[~azure.mgmt.redis.models.PrivateLinkResource] """ super(PrivateLinkResourceListResult, self).__init__(**kwargs) self.value = value class PrivateLinkServiceConnectionState(msrest.serialization.Model): """A collection of information about the state of the connection between service consumer and provider. :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: "Pending", "Approved", "Rejected". :vartype status: str or ~azure.mgmt.redis.models.PrivateEndpointServiceConnectionStatus :ivar description: The reason for approval/rejection of the connection. :vartype description: str :ivar actions_required: A message indicating if changes on the service provider require any updates on the consumer. :vartype actions_required: str """ _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, } def __init__( self, *, status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, description: Optional[str] = None, actions_required: Optional[str] = None, **kwargs ): """ :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: "Pending", "Approved", "Rejected". :paramtype status: str or ~azure.mgmt.redis.models.PrivateEndpointServiceConnectionStatus :keyword description: The reason for approval/rejection of the connection. :paramtype description: str :keyword actions_required: A message indicating if changes on the service provider require any updates on the consumer. :paramtype actions_required: str """ super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = status self.description = description self.actions_required = actions_required class ProxyResource(Resource): """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, **kwargs ): """ """ super(ProxyResource, self).__init__(**kwargs) class RedisAccessKeys(msrest.serialization.Model): """Redis cache access keys. Variables are only populated by the server, and will be ignored when sending a request. :ivar primary_key: The current primary key that clients can use to authenticate with Redis cache. :vartype primary_key: str :ivar secondary_key: The current secondary key that clients can use to authenticate with Redis cache. :vartype secondary_key: str """ _validation = { 'primary_key': {'readonly': True}, 'secondary_key': {'readonly': True}, } _attribute_map = { 'primary_key': {'key': 'primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, } def __init__( self, **kwargs ): """ """ super(RedisAccessKeys, self).__init__(**kwargs) self.primary_key = None self.secondary_key = None class RedisCommonProperties(msrest.serialization.Model): """Create/Update/Get common properties of the redis cache. :ivar redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :vartype redis_version: str :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :vartype enable_non_ssl_port: bool :ivar replicas_per_master: The number of replicas to be created per primary. :vartype replicas_per_master: int :ivar replicas_per_primary: The number of replicas to be created per primary. :vartype replicas_per_primary: int :ivar tenant_settings: A dictionary of tenant settings. :vartype tenant_settings: dict[str, str] :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. :vartype shard_count: int :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess """ _attribute_map = { 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, 'redis_version': {'key': 'redisVersion', 'type': 'str'}, 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, 'shard_count': {'key': 'shardCount', 'type': 'int'}, 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, } def __init__( self, *, redis_configuration: Optional["RedisCommonPropertiesRedisConfiguration"] = None, redis_version: Optional[str] = None, enable_non_ssl_port: Optional[bool] = False, replicas_per_master: Optional[int] = None, replicas_per_primary: Optional[int] = None, tenant_settings: Optional[Dict[str, str]] = None, shard_count: Optional[int] = None, minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", **kwargs ): """ :keyword redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :paramtype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :paramtype redis_version: str :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :paramtype enable_non_ssl_port: bool :keyword replicas_per_master: The number of replicas to be created per primary. :paramtype replicas_per_master: int :keyword replicas_per_primary: The number of replicas to be created per primary. :paramtype replicas_per_primary: int :keyword tenant_settings: A dictionary of tenant settings. :paramtype tenant_settings: dict[str, str] :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. :paramtype shard_count: int :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess """ super(RedisCommonProperties, self).__init__(**kwargs) self.redis_configuration = redis_configuration self.redis_version = redis_version self.enable_non_ssl_port = enable_non_ssl_port self.replicas_per_master = replicas_per_master self.replicas_per_primary = replicas_per_primary self.tenant_settings = tenant_settings self.shard_count = shard_count self.minimum_tls_version = minimum_tls_version self.public_network_access = public_network_access class RedisCommonPropertiesRedisConfiguration(msrest.serialization.Model): """All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. Variables are only populated by the server, and will be ignored when sending a request. :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. :vartype additional_properties: dict[str, any] :ivar rdb_backup_enabled: Specifies whether the rdb backup is enabled. :vartype rdb_backup_enabled: str :ivar rdb_backup_frequency: Specifies the frequency for creating rdb backup. :vartype rdb_backup_frequency: str :ivar rdb_backup_max_snapshot_count: Specifies the maximum number of snapshots for rdb backup. :vartype rdb_backup_max_snapshot_count: str :ivar rdb_storage_connection_string: The storage account connection string for storing rdb file. :vartype rdb_storage_connection_string: str :ivar aof_storage_connection_string0: First storage account connection string. :vartype aof_storage_connection_string0: str :ivar aof_storage_connection_string1: Second storage account connection string. :vartype aof_storage_connection_string1: str :ivar maxfragmentationmemory_reserved: Value in megabytes reserved for fragmentation per shard. :vartype maxfragmentationmemory_reserved: str :ivar maxmemory_policy: The eviction strategy used when your data won't fit within its memory limit. :vartype maxmemory_policy: str :ivar maxmemory_reserved: Value in megabytes reserved for non-cache usage per shard e.g. failover. :vartype maxmemory_reserved: str :ivar maxmemory_delta: Value in megabytes reserved for non-cache usage per shard e.g. failover. :vartype maxmemory_delta: str :ivar maxclients: The max clients config. :vartype maxclients: str :ivar preferred_data_archive_auth_method: Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS. :vartype preferred_data_archive_auth_method: str :ivar preferred_data_persistence_auth_method: Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS. :vartype preferred_data_persistence_auth_method: str """ _validation = { 'maxclients': {'readonly': True}, 'preferred_data_archive_auth_method': {'readonly': True}, 'preferred_data_persistence_auth_method': {'readonly': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'rdb_backup_enabled': {'key': 'rdb-backup-enabled', 'type': 'str'}, 'rdb_backup_frequency': {'key': 'rdb-backup-frequency', 'type': 'str'}, 'rdb_backup_max_snapshot_count': {'key': 'rdb-backup-max-snapshot-count', 'type': 'str'}, 'rdb_storage_connection_string': {'key': 'rdb-storage-connection-string', 'type': 'str'}, 'aof_storage_connection_string0': {'key': 'aof-storage-connection-string-0', 'type': 'str'}, 'aof_storage_connection_string1': {'key': 'aof-storage-connection-string-1', 'type': 'str'}, 'maxfragmentationmemory_reserved': {'key': 'maxfragmentationmemory-reserved', 'type': 'str'}, 'maxmemory_policy': {'key': 'maxmemory-policy', 'type': 'str'}, 'maxmemory_reserved': {'key': 'maxmemory-reserved', 'type': 'str'}, 'maxmemory_delta': {'key': 'maxmemory-delta', 'type': 'str'}, 'maxclients': {'key': 'maxclients', 'type': 'str'}, 'preferred_data_archive_auth_method': {'key': 'preferred-data-archive-auth-method', 'type': 'str'}, 'preferred_data_persistence_auth_method': {'key': 'preferred-data-persistence-auth-method', 'type': 'str'}, } def __init__( self, *, additional_properties: Optional[Dict[str, Any]] = None, rdb_backup_enabled: Optional[str] = None, rdb_backup_frequency: Optional[str] = None, rdb_backup_max_snapshot_count: Optional[str] = None, rdb_storage_connection_string: Optional[str] = None, aof_storage_connection_string0: Optional[str] = None, aof_storage_connection_string1: Optional[str] = None, maxfragmentationmemory_reserved: Optional[str] = None, maxmemory_policy: Optional[str] = None, maxmemory_reserved: Optional[str] = None, maxmemory_delta: Optional[str] = None, **kwargs ): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. :paramtype additional_properties: dict[str, any] :keyword rdb_backup_enabled: Specifies whether the rdb backup is enabled. :paramtype rdb_backup_enabled: str :keyword rdb_backup_frequency: Specifies the frequency for creating rdb backup. :paramtype rdb_backup_frequency: str :keyword rdb_backup_max_snapshot_count: Specifies the maximum number of snapshots for rdb backup. :paramtype rdb_backup_max_snapshot_count: str :keyword rdb_storage_connection_string: The storage account connection string for storing rdb file. :paramtype rdb_storage_connection_string: str :keyword aof_storage_connection_string0: First storage account connection string. :paramtype aof_storage_connection_string0: str :keyword aof_storage_connection_string1: Second storage account connection string. :paramtype aof_storage_connection_string1: str :keyword maxfragmentationmemory_reserved: Value in megabytes reserved for fragmentation per shard. :paramtype maxfragmentationmemory_reserved: str :keyword maxmemory_policy: The eviction strategy used when your data won't fit within its memory limit. :paramtype maxmemory_policy: str :keyword maxmemory_reserved: Value in megabytes reserved for non-cache usage per shard e.g. failover. :paramtype maxmemory_reserved: str :keyword maxmemory_delta: Value in megabytes reserved for non-cache usage per shard e.g. failover. :paramtype maxmemory_delta: str """ super(RedisCommonPropertiesRedisConfiguration, self).__init__(**kwargs) self.additional_properties = additional_properties self.rdb_backup_enabled = rdb_backup_enabled self.rdb_backup_frequency = rdb_backup_frequency self.rdb_backup_max_snapshot_count = rdb_backup_max_snapshot_count self.rdb_storage_connection_string = rdb_storage_connection_string self.aof_storage_connection_string0 = aof_storage_connection_string0 self.aof_storage_connection_string1 = aof_storage_connection_string1 self.maxfragmentationmemory_reserved = maxfragmentationmemory_reserved self.maxmemory_policy = maxmemory_policy self.maxmemory_reserved = maxmemory_reserved self.maxmemory_delta = maxmemory_delta self.maxclients = None self.preferred_data_archive_auth_method = None self.preferred_data_persistence_auth_method = None class RedisCreateParameters(msrest.serialization.Model): """Parameters supplied to the Create Redis operation. All required parameters must be populated in order to send to Azure. :ivar zones: A list of availability zones denoting where the resource needs to come from. :vartype zones: list[str] :ivar location: Required. The geo-location where the resource lives. :vartype location: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar identity: The identity of the resource. :vartype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity :ivar redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :vartype redis_version: str :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :vartype enable_non_ssl_port: bool :ivar replicas_per_master: The number of replicas to be created per primary. :vartype replicas_per_master: int :ivar replicas_per_primary: The number of replicas to be created per primary. :vartype replicas_per_primary: int :ivar tenant_settings: A dictionary of tenant settings. :vartype tenant_settings: dict[str, str] :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. :vartype shard_count: int :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: Required. The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :vartype subnet_id: str :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :vartype static_ip: str """ _validation = { 'location': {'required': True}, 'sku': {'required': True}, 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, } _attribute_map = { 'zones': {'key': 'zones', 'type': '[str]'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, 'replicas_per_primary': {'key': 'properties.replicasPerPrimary', 'type': 'int'}, 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, } def __init__( self, *, location: str, sku: "Sku", zones: Optional[List[str]] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["ManagedServiceIdentity"] = None, redis_configuration: Optional["RedisCommonPropertiesRedisConfiguration"] = None, redis_version: Optional[str] = None, enable_non_ssl_port: Optional[bool] = False, replicas_per_master: Optional[int] = None, replicas_per_primary: Optional[int] = None, tenant_settings: Optional[Dict[str, str]] = None, shard_count: Optional[int] = None, minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", subnet_id: Optional[str] = None, static_ip: Optional[str] = None, **kwargs ): """ :keyword zones: A list of availability zones denoting where the resource needs to come from. :paramtype zones: list[str] :keyword location: Required. The geo-location where the resource lives. :paramtype location: str :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] :keyword identity: The identity of the resource. :paramtype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity :keyword redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :paramtype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :paramtype redis_version: str :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :paramtype enable_non_ssl_port: bool :keyword replicas_per_master: The number of replicas to be created per primary. :paramtype replicas_per_master: int :keyword replicas_per_primary: The number of replicas to be created per primary. :paramtype replicas_per_primary: int :keyword tenant_settings: A dictionary of tenant settings. :paramtype tenant_settings: dict[str, str] :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. :paramtype shard_count: int :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: Required. The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :paramtype subnet_id: str :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :paramtype static_ip: str """ super(RedisCreateParameters, self).__init__(**kwargs) self.zones = zones self.location = location self.tags = tags self.identity = identity self.redis_configuration = redis_configuration self.redis_version = redis_version self.enable_non_ssl_port = enable_non_ssl_port self.replicas_per_master = replicas_per_master self.replicas_per_primary = replicas_per_primary self.tenant_settings = tenant_settings self.shard_count = shard_count self.minimum_tls_version = minimum_tls_version self.public_network_access = public_network_access self.sku = sku self.subnet_id = subnet_id self.static_ip = static_ip class RedisCreateProperties(RedisCommonProperties): """Properties supplied to Create Redis operation. All required parameters must be populated in order to send to Azure. :ivar redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :vartype redis_version: str :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :vartype enable_non_ssl_port: bool :ivar replicas_per_master: The number of replicas to be created per primary. :vartype replicas_per_master: int :ivar replicas_per_primary: The number of replicas to be created per primary. :vartype replicas_per_primary: int :ivar tenant_settings: A dictionary of tenant settings. :vartype tenant_settings: dict[str, str] :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. :vartype shard_count: int :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: Required. The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :vartype subnet_id: str :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :vartype static_ip: str """ _validation = { 'sku': {'required': True}, 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, } _attribute_map = { 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, 'redis_version': {'key': 'redisVersion', 'type': 'str'}, 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, 'shard_count': {'key': 'shardCount', 'type': 'int'}, 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'static_ip': {'key': 'staticIP', 'type': 'str'}, } def __init__( self, *, sku: "Sku", redis_configuration: Optional["RedisCommonPropertiesRedisConfiguration"] = None, redis_version: Optional[str] = None, enable_non_ssl_port: Optional[bool] = False, replicas_per_master: Optional[int] = None, replicas_per_primary: Optional[int] = None, tenant_settings: Optional[Dict[str, str]] = None, shard_count: Optional[int] = None, minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", subnet_id: Optional[str] = None, static_ip: Optional[str] = None, **kwargs ): """ :keyword redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :paramtype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :paramtype redis_version: str :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :paramtype enable_non_ssl_port: bool :keyword replicas_per_master: The number of replicas to be created per primary. :paramtype replicas_per_master: int :keyword replicas_per_primary: The number of replicas to be created per primary. :paramtype replicas_per_primary: int :keyword tenant_settings: A dictionary of tenant settings. :paramtype tenant_settings: dict[str, str] :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. :paramtype shard_count: int :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: Required. The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :paramtype subnet_id: str :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :paramtype static_ip: str """ super(RedisCreateProperties, self).__init__(redis_configuration=redis_configuration, redis_version=redis_version, enable_non_ssl_port=enable_non_ssl_port, replicas_per_master=replicas_per_master, replicas_per_primary=replicas_per_primary, tenant_settings=tenant_settings, shard_count=shard_count, minimum_tls_version=minimum_tls_version, public_network_access=public_network_access, **kwargs) self.sku = sku self.subnet_id = subnet_id self.static_ip = static_ip class RedisFirewallRule(ProxyResource): """A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar start_ip: Required. lowest IP address included in the range. :vartype start_ip: str :ivar end_ip: Required. highest IP address included in the range. :vartype end_ip: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'start_ip': {'required': True}, 'end_ip': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, } def __init__( self, *, start_ip: str, end_ip: str, **kwargs ): """ :keyword start_ip: Required. lowest IP address included in the range. :paramtype start_ip: str :keyword end_ip: Required. highest IP address included in the range. :paramtype end_ip: str """ super(RedisFirewallRule, self).__init__(**kwargs) self.start_ip = start_ip self.end_ip = end_ip class RedisFirewallRuleCreateParameters(RedisFirewallRule): """Parameters required for creating a firewall rule on redis cache. (Note, you can just use the FirewallRule type instead now.). Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar start_ip: Required. lowest IP address included in the range. :vartype start_ip: str :ivar end_ip: Required. highest IP address included in the range. :vartype end_ip: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'start_ip': {'required': True}, 'end_ip': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, } def __init__( self, *, start_ip: str, end_ip: str, **kwargs ): """ :keyword start_ip: Required. lowest IP address included in the range. :paramtype start_ip: str :keyword end_ip: Required. highest IP address included in the range. :paramtype end_ip: str """ super(RedisFirewallRuleCreateParameters, self).__init__(start_ip=start_ip, end_ip=end_ip, **kwargs) class RedisFirewallRuleListResult(msrest.serialization.Model): """The response of list firewall rules Redis operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Results of the list firewall rules operation. :vartype value: list[~azure.mgmt.redis.models.RedisFirewallRule] :ivar next_link: Link for next page of results. :vartype next_link: str """ _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[RedisFirewallRule]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["RedisFirewallRule"]] = None, **kwargs ): """ :keyword value: Results of the list firewall rules operation. :paramtype value: list[~azure.mgmt.redis.models.RedisFirewallRule] """ super(RedisFirewallRuleListResult, self).__init__(**kwargs) self.value = value self.next_link = None class RedisForceRebootResponse(msrest.serialization.Model): """Response to force reboot for Redis cache. Variables are only populated by the server, and will be ignored when sending a request. :ivar message: Status message. :vartype message: str """ _validation = { 'message': {'readonly': True}, } _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, } def __init__( self, **kwargs ): """ """ super(RedisForceRebootResponse, self).__init__(**kwargs) self.message = None class RedisInstanceDetails(msrest.serialization.Model): """Details of single instance of redis. Variables are only populated by the server, and will be ignored when sending a request. :ivar ssl_port: Redis instance SSL port. :vartype ssl_port: int :ivar non_ssl_port: If enableNonSslPort is true, provides Redis instance Non-SSL port. :vartype non_ssl_port: int :ivar zone: If the Cache uses availability zones, specifies availability zone where this instance is located. :vartype zone: str :ivar shard_id: If clustering is enabled, the Shard ID of Redis Instance. :vartype shard_id: int :ivar is_master: Specifies whether the instance is a primary node. :vartype is_master: bool :ivar is_primary: Specifies whether the instance is a primary node. :vartype is_primary: bool """ _validation = { 'ssl_port': {'readonly': True}, 'non_ssl_port': {'readonly': True}, 'zone': {'readonly': True}, 'shard_id': {'readonly': True}, 'is_master': {'readonly': True}, 'is_primary': {'readonly': True}, } _attribute_map = { 'ssl_port': {'key': 'sslPort', 'type': 'int'}, 'non_ssl_port': {'key': 'nonSslPort', 'type': 'int'}, 'zone': {'key': 'zone', 'type': 'str'}, 'shard_id': {'key': 'shardId', 'type': 'int'}, 'is_master': {'key': 'isMaster', 'type': 'bool'}, 'is_primary': {'key': 'isPrimary', 'type': 'bool'}, } def __init__( self, **kwargs ): """ """ super(RedisInstanceDetails, self).__init__(**kwargs) self.ssl_port = None self.non_ssl_port = None self.zone = None self.shard_id = None self.is_master = None self.is_primary = None class RedisLinkedServer(msrest.serialization.Model): """Linked server Id. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Linked server Id. :vartype id: str """ _validation = { 'id': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, } def __init__( self, **kwargs ): """ """ super(RedisLinkedServer, self).__init__(**kwargs) self.id = None class RedisLinkedServerCreateParameters(msrest.serialization.Model): """Parameter required for creating a linked server to redis cache. All required parameters must be populated in order to send to Azure. :ivar linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. :vartype linked_redis_cache_id: str :ivar linked_redis_cache_location: Required. Location of the linked redis cache. :vartype linked_redis_cache_location: str :ivar server_role: Required. Role of the linked server. Possible values include: "Primary", "Secondary". :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole """ _validation = { 'linked_redis_cache_id': {'required': True}, 'linked_redis_cache_location': {'required': True}, 'server_role': {'required': True}, } _attribute_map = { 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, } def __init__( self, *, linked_redis_cache_id: str, linked_redis_cache_location: str, server_role: Union[str, "ReplicationRole"], **kwargs ): """ :keyword linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. :paramtype linked_redis_cache_id: str :keyword linked_redis_cache_location: Required. Location of the linked redis cache. :paramtype linked_redis_cache_location: str :keyword server_role: Required. Role of the linked server. Possible values include: "Primary", "Secondary". :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole """ super(RedisLinkedServerCreateParameters, self).__init__(**kwargs) self.linked_redis_cache_id = linked_redis_cache_id self.linked_redis_cache_location = linked_redis_cache_location self.server_role = server_role class RedisLinkedServerCreateProperties(msrest.serialization.Model): """Create properties for a linked server. All required parameters must be populated in order to send to Azure. :ivar linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. :vartype linked_redis_cache_id: str :ivar linked_redis_cache_location: Required. Location of the linked redis cache. :vartype linked_redis_cache_location: str :ivar server_role: Required. Role of the linked server. Possible values include: "Primary", "Secondary". :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole """ _validation = { 'linked_redis_cache_id': {'required': True}, 'linked_redis_cache_location': {'required': True}, 'server_role': {'required': True}, } _attribute_map = { 'linked_redis_cache_id': {'key': 'linkedRedisCacheId', 'type': 'str'}, 'linked_redis_cache_location': {'key': 'linkedRedisCacheLocation', 'type': 'str'}, 'server_role': {'key': 'serverRole', 'type': 'str'}, } def __init__( self, *, linked_redis_cache_id: str, linked_redis_cache_location: str, server_role: Union[str, "ReplicationRole"], **kwargs ): """ :keyword linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. :paramtype linked_redis_cache_id: str :keyword linked_redis_cache_location: Required. Location of the linked redis cache. :paramtype linked_redis_cache_location: str :keyword server_role: Required. Role of the linked server. Possible values include: "Primary", "Secondary". :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole """ super(RedisLinkedServerCreateProperties, self).__init__(**kwargs) self.linked_redis_cache_id = linked_redis_cache_id self.linked_redis_cache_location = linked_redis_cache_location self.server_role = server_role class RedisLinkedServerProperties(RedisLinkedServerCreateProperties): """Properties of a linked server to be returned in get/put response. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. :vartype linked_redis_cache_id: str :ivar linked_redis_cache_location: Required. Location of the linked redis cache. :vartype linked_redis_cache_location: str :ivar server_role: Required. Role of the linked server. Possible values include: "Primary", "Secondary". :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole :ivar provisioning_state: Terminal state of the link between primary and secondary redis cache. :vartype provisioning_state: str """ _validation = { 'linked_redis_cache_id': {'required': True}, 'linked_redis_cache_location': {'required': True}, 'server_role': {'required': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'linked_redis_cache_id': {'key': 'linkedRedisCacheId', 'type': 'str'}, 'linked_redis_cache_location': {'key': 'linkedRedisCacheLocation', 'type': 'str'}, 'server_role': {'key': 'serverRole', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, linked_redis_cache_id: str, linked_redis_cache_location: str, server_role: Union[str, "ReplicationRole"], **kwargs ): """ :keyword linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. :paramtype linked_redis_cache_id: str :keyword linked_redis_cache_location: Required. Location of the linked redis cache. :paramtype linked_redis_cache_location: str :keyword server_role: Required. Role of the linked server. Possible values include: "Primary", "Secondary". :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole """ super(RedisLinkedServerProperties, self).__init__(linked_redis_cache_id=linked_redis_cache_id, linked_redis_cache_location=linked_redis_cache_location, server_role=server_role, **kwargs) self.provisioning_state = None class RedisLinkedServerWithProperties(ProxyResource): """Response to put/get linked server (with properties) for Redis cache. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar linked_redis_cache_id: Fully qualified resourceId of the linked redis cache. :vartype linked_redis_cache_id: str :ivar linked_redis_cache_location: Location of the linked redis cache. :vartype linked_redis_cache_location: str :ivar server_role: Role of the linked server. Possible values include: "Primary", "Secondary". :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole :ivar provisioning_state: Terminal state of the link between primary and secondary redis cache. :vartype provisioning_state: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, *, linked_redis_cache_id: Optional[str] = None, linked_redis_cache_location: Optional[str] = None, server_role: Optional[Union[str, "ReplicationRole"]] = None, **kwargs ): """ :keyword linked_redis_cache_id: Fully qualified resourceId of the linked redis cache. :paramtype linked_redis_cache_id: str :keyword linked_redis_cache_location: Location of the linked redis cache. :paramtype linked_redis_cache_location: str :keyword server_role: Role of the linked server. Possible values include: "Primary", "Secondary". :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole """ super(RedisLinkedServerWithProperties, self).__init__(**kwargs) self.linked_redis_cache_id = linked_redis_cache_id self.linked_redis_cache_location = linked_redis_cache_location self.server_role = server_role self.provisioning_state = None class RedisLinkedServerWithPropertiesList(msrest.serialization.Model): """List of linked servers (with properties) of a Redis cache. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of linked servers (with properties) of a Redis cache. :vartype value: list[~azure.mgmt.redis.models.RedisLinkedServerWithProperties] :ivar next_link: Link for next set. :vartype next_link: str """ _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[RedisLinkedServerWithProperties]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["RedisLinkedServerWithProperties"]] = None, **kwargs ): """ :keyword value: List of linked servers (with properties) of a Redis cache. :paramtype value: list[~azure.mgmt.redis.models.RedisLinkedServerWithProperties] """ super(RedisLinkedServerWithPropertiesList, self).__init__(**kwargs) self.value = value self.next_link = None class RedisListResult(msrest.serialization.Model): """The response of list Redis operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of Redis cache instances. :vartype value: list[~azure.mgmt.redis.models.RedisResource] :ivar next_link: Link for next page of results. :vartype next_link: str """ _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[RedisResource]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["RedisResource"]] = None, **kwargs ): """ :keyword value: List of Redis cache instances. :paramtype value: list[~azure.mgmt.redis.models.RedisResource] """ super(RedisListResult, self).__init__(**kwargs) self.value = value self.next_link = None class RedisPatchSchedule(ProxyResource): """Response to put/get patch schedules for Redis cache. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar schedule_entries: Required. List of patch schedules for a Redis cache. :vartype schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'schedule_entries': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'schedule_entries': {'key': 'properties.scheduleEntries', 'type': '[ScheduleEntry]'}, } def __init__( self, *, schedule_entries: List["ScheduleEntry"], **kwargs ): """ :keyword schedule_entries: Required. List of patch schedules for a Redis cache. :paramtype schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] """ super(RedisPatchSchedule, self).__init__(**kwargs) self.schedule_entries = schedule_entries class RedisPatchScheduleListResult(msrest.serialization.Model): """The response of list patch schedules Redis operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Results of the list patch schedules operation. :vartype value: list[~azure.mgmt.redis.models.RedisPatchSchedule] :ivar next_link: Link for next page of results. :vartype next_link: str """ _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[RedisPatchSchedule]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["RedisPatchSchedule"]] = None, **kwargs ): """ :keyword value: Results of the list patch schedules operation. :paramtype value: list[~azure.mgmt.redis.models.RedisPatchSchedule] """ super(RedisPatchScheduleListResult, self).__init__(**kwargs) self.value = value self.next_link = None class RedisProperties(RedisCreateProperties): """Properties of the redis cache. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :vartype redis_version: str :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :vartype enable_non_ssl_port: bool :ivar replicas_per_master: The number of replicas to be created per primary. :vartype replicas_per_master: int :ivar replicas_per_primary: The number of replicas to be created per primary. :vartype replicas_per_primary: int :ivar tenant_settings: A dictionary of tenant settings. :vartype tenant_settings: dict[str, str] :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. :vartype shard_count: int :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: Required. The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :vartype subnet_id: str :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :vartype static_ip: str :ivar provisioning_state: Redis instance provisioning status. Possible values include: "Creating", "Deleting", "Disabled", "Failed", "Linking", "Provisioning", "RecoveringScaleFailure", "Scaling", "Succeeded", "Unlinking", "Unprovisioning", "Updating". :vartype provisioning_state: str or ~azure.mgmt.redis.models.ProvisioningState :ivar host_name: Redis host name. :vartype host_name: str :ivar port: Redis non-SSL port. :vartype port: int :ivar ssl_port: Redis SSL port. :vartype ssl_port: int :ivar access_keys: The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache. :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys :ivar linked_servers: List of the linked servers associated with the cache. :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] :ivar instances: List of the Redis instances associated with the cache. :vartype instances: list[~azure.mgmt.redis.models.RedisInstanceDetails] :ivar private_endpoint_connections: List of private endpoint connection associated with the specified redis cache. :vartype private_endpoint_connections: list[~azure.mgmt.redis.models.PrivateEndpointConnection] """ _validation = { 'sku': {'required': True}, 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, 'provisioning_state': {'readonly': True}, 'host_name': {'readonly': True}, 'port': {'readonly': True}, 'ssl_port': {'readonly': True}, 'access_keys': {'readonly': True}, 'linked_servers': {'readonly': True}, 'instances': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, 'redis_version': {'key': 'redisVersion', 'type': 'str'}, 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, 'shard_count': {'key': 'shardCount', 'type': 'int'}, 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'static_ip': {'key': 'staticIP', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'host_name': {'key': 'hostName', 'type': 'str'}, 'port': {'key': 'port', 'type': 'int'}, 'ssl_port': {'key': 'sslPort', 'type': 'int'}, 'access_keys': {'key': 'accessKeys', 'type': 'RedisAccessKeys'}, 'linked_servers': {'key': 'linkedServers', 'type': '[RedisLinkedServer]'}, 'instances': {'key': 'instances', 'type': '[RedisInstanceDetails]'}, 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, } def __init__( self, *, sku: "Sku", redis_configuration: Optional["RedisCommonPropertiesRedisConfiguration"] = None, redis_version: Optional[str] = None, enable_non_ssl_port: Optional[bool] = False, replicas_per_master: Optional[int] = None, replicas_per_primary: Optional[int] = None, tenant_settings: Optional[Dict[str, str]] = None, shard_count: Optional[int] = None, minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", subnet_id: Optional[str] = None, static_ip: Optional[str] = None, **kwargs ): """ :keyword redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :paramtype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :paramtype redis_version: str :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :paramtype enable_non_ssl_port: bool :keyword replicas_per_master: The number of replicas to be created per primary. :paramtype replicas_per_master: int :keyword replicas_per_primary: The number of replicas to be created per primary. :paramtype replicas_per_primary: int :keyword tenant_settings: A dictionary of tenant settings. :paramtype tenant_settings: dict[str, str] :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. :paramtype shard_count: int :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: Required. The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :paramtype subnet_id: str :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :paramtype static_ip: str """ super(RedisProperties, self).__init__(redis_configuration=redis_configuration, redis_version=redis_version, enable_non_ssl_port=enable_non_ssl_port, replicas_per_master=replicas_per_master, replicas_per_primary=replicas_per_primary, tenant_settings=tenant_settings, shard_count=shard_count, minimum_tls_version=minimum_tls_version, public_network_access=public_network_access, sku=sku, subnet_id=subnet_id, static_ip=static_ip, **kwargs) self.provisioning_state = None self.host_name = None self.port = None self.ssl_port = None self.access_keys = None self.linked_servers = None self.instances = None self.private_endpoint_connections = None class RedisRebootParameters(msrest.serialization.Model): """Specifies which Redis node(s) to reboot. :ivar reboot_type: Which Redis node(s) to reboot. Depending on this value data loss is possible. Possible values include: "PrimaryNode", "SecondaryNode", "AllNodes". :vartype reboot_type: str or ~azure.mgmt.redis.models.RebootType :ivar shard_id: If clustering is enabled, the ID of the shard to be rebooted. :vartype shard_id: int :ivar ports: A list of redis instances to reboot, specified by per-instance SSL ports or non-SSL ports. :vartype ports: list[int] """ _attribute_map = { 'reboot_type': {'key': 'rebootType', 'type': 'str'}, 'shard_id': {'key': 'shardId', 'type': 'int'}, 'ports': {'key': 'ports', 'type': '[int]'}, } def __init__( self, *, reboot_type: Optional[Union[str, "RebootType"]] = None, shard_id: Optional[int] = None, ports: Optional[List[int]] = None, **kwargs ): """ :keyword reboot_type: Which Redis node(s) to reboot. Depending on this value data loss is possible. Possible values include: "PrimaryNode", "SecondaryNode", "AllNodes". :paramtype reboot_type: str or ~azure.mgmt.redis.models.RebootType :keyword shard_id: If clustering is enabled, the ID of the shard to be rebooted. :paramtype shard_id: int :keyword ports: A list of redis instances to reboot, specified by per-instance SSL ports or non-SSL ports. :paramtype ports: list[int] """ super(RedisRebootParameters, self).__init__(**kwargs) self.reboot_type = reboot_type self.shard_id = shard_id self.ports = ports class RedisRegenerateKeyParameters(msrest.serialization.Model): """Specifies which Redis access keys to reset. All required parameters must be populated in order to send to Azure. :ivar key_type: Required. The Redis access key to regenerate. Possible values include: "Primary", "Secondary". :vartype key_type: str or ~azure.mgmt.redis.models.RedisKeyType """ _validation = { 'key_type': {'required': True}, } _attribute_map = { 'key_type': {'key': 'keyType', 'type': 'str'}, } def __init__( self, *, key_type: Union[str, "RedisKeyType"], **kwargs ): """ :keyword key_type: Required. The Redis access key to regenerate. Possible values include: "Primary", "Secondary". :paramtype key_type: str or ~azure.mgmt.redis.models.RedisKeyType """ super(RedisRegenerateKeyParameters, self).__init__(**kwargs) self.key_type = key_type class TrackedResource(Resource): """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar location: Required. The geo-location where the resource lives. :vartype location: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, } def __init__( self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs ): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] :keyword location: Required. The geo-location where the resource lives. :paramtype location: str """ super(TrackedResource, self).__init__(**kwargs) self.tags = tags self.location = location class RedisResource(TrackedResource): """A single Redis item in List or Get Operation. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar location: Required. The geo-location where the resource lives. :vartype location: str :ivar zones: A list of availability zones denoting where the resource needs to come from. :vartype zones: list[str] :ivar identity: The identity of the resource. :vartype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity :ivar redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :vartype redis_version: str :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :vartype enable_non_ssl_port: bool :ivar replicas_per_master: The number of replicas to be created per primary. :vartype replicas_per_master: int :ivar replicas_per_primary: The number of replicas to be created per primary. :vartype replicas_per_primary: int :ivar tenant_settings: A dictionary of tenant settings. :vartype tenant_settings: dict[str, str] :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. :vartype shard_count: int :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: Required. The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :vartype subnet_id: str :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :vartype static_ip: str :ivar provisioning_state: Redis instance provisioning status. Possible values include: "Creating", "Deleting", "Disabled", "Failed", "Linking", "Provisioning", "RecoveringScaleFailure", "Scaling", "Succeeded", "Unlinking", "Unprovisioning", "Updating". :vartype provisioning_state: str or ~azure.mgmt.redis.models.ProvisioningState :ivar host_name: Redis host name. :vartype host_name: str :ivar port: Redis non-SSL port. :vartype port: int :ivar ssl_port: Redis SSL port. :vartype ssl_port: int :ivar access_keys: The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache. :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys :ivar linked_servers: List of the linked servers associated with the cache. :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] :ivar instances: List of the Redis instances associated with the cache. :vartype instances: list[~azure.mgmt.redis.models.RedisInstanceDetails] :ivar private_endpoint_connections: List of private endpoint connection associated with the specified redis cache. :vartype private_endpoint_connections: list[~azure.mgmt.redis.models.PrivateEndpointConnection] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, 'sku': {'required': True}, 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, 'provisioning_state': {'readonly': True}, 'host_name': {'readonly': True}, 'port': {'readonly': True}, 'ssl_port': {'readonly': True}, 'access_keys': {'readonly': True}, 'linked_servers': {'readonly': True}, 'instances': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[str]'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, 'replicas_per_primary': {'key': 'properties.replicasPerPrimary', 'type': 'int'}, 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'port': {'key': 'properties.port', 'type': 'int'}, 'ssl_port': {'key': 'properties.sslPort', 'type': 'int'}, 'access_keys': {'key': 'properties.accessKeys', 'type': 'RedisAccessKeys'}, 'linked_servers': {'key': 'properties.linkedServers', 'type': '[RedisLinkedServer]'}, 'instances': {'key': 'properties.instances', 'type': '[RedisInstanceDetails]'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, } def __init__( self, *, location: str, sku: "Sku", tags: Optional[Dict[str, str]] = None, zones: Optional[List[str]] = None, identity: Optional["ManagedServiceIdentity"] = None, redis_configuration: Optional["RedisCommonPropertiesRedisConfiguration"] = None, redis_version: Optional[str] = None, enable_non_ssl_port: Optional[bool] = False, replicas_per_master: Optional[int] = None, replicas_per_primary: Optional[int] = None, tenant_settings: Optional[Dict[str, str]] = None, shard_count: Optional[int] = None, minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", subnet_id: Optional[str] = None, static_ip: Optional[str] = None, **kwargs ): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] :keyword location: Required. The geo-location where the resource lives. :paramtype location: str :keyword zones: A list of availability zones denoting where the resource needs to come from. :paramtype zones: list[str] :keyword identity: The identity of the resource. :paramtype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity :keyword redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :paramtype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :paramtype redis_version: str :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :paramtype enable_non_ssl_port: bool :keyword replicas_per_master: The number of replicas to be created per primary. :paramtype replicas_per_master: int :keyword replicas_per_primary: The number of replicas to be created per primary. :paramtype replicas_per_primary: int :keyword tenant_settings: A dictionary of tenant settings. :paramtype tenant_settings: dict[str, str] :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. :paramtype shard_count: int :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: Required. The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. :paramtype subnet_id: str :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. :paramtype static_ip: str """ super(RedisResource, self).__init__(tags=tags, location=location, **kwargs) self.zones = zones self.identity = identity self.redis_configuration = redis_configuration self.redis_version = redis_version self.enable_non_ssl_port = enable_non_ssl_port self.replicas_per_master = replicas_per_master self.replicas_per_primary = replicas_per_primary self.tenant_settings = tenant_settings self.shard_count = shard_count self.minimum_tls_version = minimum_tls_version self.public_network_access = public_network_access self.sku = sku self.subnet_id = subnet_id self.static_ip = static_ip self.provisioning_state = None self.host_name = None self.port = None self.ssl_port = None self.access_keys = None self.linked_servers = None self.instances = None self.private_endpoint_connections = None class RedisUpdateParameters(msrest.serialization.Model): """Parameters supplied to the Update Redis operation. :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar identity: The identity of the resource. :vartype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity :ivar redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :vartype redis_version: str :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :vartype enable_non_ssl_port: bool :ivar replicas_per_master: The number of replicas to be created per primary. :vartype replicas_per_master: int :ivar replicas_per_primary: The number of replicas to be created per primary. :vartype replicas_per_primary: int :ivar tenant_settings: A dictionary of tenant settings. :vartype tenant_settings: dict[str, str] :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. :vartype shard_count: int :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, 'replicas_per_primary': {'key': 'properties.replicasPerPrimary', 'type': 'int'}, 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'sku': {'key': 'properties.sku', 'type': 'Sku'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, identity: Optional["ManagedServiceIdentity"] = None, redis_configuration: Optional["RedisCommonPropertiesRedisConfiguration"] = None, redis_version: Optional[str] = None, enable_non_ssl_port: Optional[bool] = False, replicas_per_master: Optional[int] = None, replicas_per_primary: Optional[int] = None, tenant_settings: Optional[Dict[str, str]] = None, shard_count: Optional[int] = None, minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", sku: Optional["Sku"] = None, **kwargs ): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] :keyword identity: The identity of the resource. :paramtype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity :keyword redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :paramtype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :paramtype redis_version: str :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :paramtype enable_non_ssl_port: bool :keyword replicas_per_master: The number of replicas to be created per primary. :paramtype replicas_per_master: int :keyword replicas_per_primary: The number of replicas to be created per primary. :paramtype replicas_per_primary: int :keyword tenant_settings: A dictionary of tenant settings. :paramtype tenant_settings: dict[str, str] :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. :paramtype shard_count: int :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku """ super(RedisUpdateParameters, self).__init__(**kwargs) self.tags = tags self.identity = identity self.redis_configuration = redis_configuration self.redis_version = redis_version self.enable_non_ssl_port = enable_non_ssl_port self.replicas_per_master = replicas_per_master self.replicas_per_primary = replicas_per_primary self.tenant_settings = tenant_settings self.shard_count = shard_count self.minimum_tls_version = minimum_tls_version self.public_network_access = public_network_access self.sku = sku class RedisUpdateProperties(RedisCommonProperties): """Patchable properties of the redis cache. :ivar redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :vartype redis_version: str :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :vartype enable_non_ssl_port: bool :ivar replicas_per_master: The number of replicas to be created per primary. :vartype replicas_per_master: int :ivar replicas_per_primary: The number of replicas to be created per primary. :vartype replicas_per_primary: int :ivar tenant_settings: A dictionary of tenant settings. :vartype tenant_settings: dict[str, str] :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. :vartype shard_count: int :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku """ _attribute_map = { 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, 'redis_version': {'key': 'redisVersion', 'type': 'str'}, 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, 'shard_count': {'key': 'shardCount', 'type': 'int'}, 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, } def __init__( self, *, redis_configuration: Optional["RedisCommonPropertiesRedisConfiguration"] = None, redis_version: Optional[str] = None, enable_non_ssl_port: Optional[bool] = False, replicas_per_master: Optional[int] = None, replicas_per_primary: Optional[int] = None, tenant_settings: Optional[Dict[str, str]] = None, shard_count: Optional[int] = None, minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", sku: Optional["Sku"] = None, **kwargs ): """ :keyword redis_configuration: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. :paramtype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). :paramtype redis_version: str :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. :paramtype enable_non_ssl_port: bool :keyword replicas_per_master: The number of replicas to be created per primary. :paramtype replicas_per_master: int :keyword replicas_per_primary: The number of replicas to be created per primary. :paramtype replicas_per_primary: int :keyword tenant_settings: A dictionary of tenant settings. :paramtype tenant_settings: dict[str, str] :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. :paramtype shard_count: int :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: "Enabled", "Disabled". Default value: "Enabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku """ super(RedisUpdateProperties, self).__init__(redis_configuration=redis_configuration, redis_version=redis_version, enable_non_ssl_port=enable_non_ssl_port, replicas_per_master=replicas_per_master, replicas_per_primary=replicas_per_primary, tenant_settings=tenant_settings, shard_count=shard_count, minimum_tls_version=minimum_tls_version, public_network_access=public_network_access, **kwargs) self.sku = sku class ScheduleEntry(msrest.serialization.Model): """Patch schedule entry for a Premium Redis Cache. All required parameters must be populated in order to send to Azure. :ivar day_of_week: Required. Day of the week when a cache can be patched. Possible values include: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Everyday", "Weekend". :vartype day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek :ivar start_hour_utc: Required. Start hour after which cache patching can start. :vartype start_hour_utc: int :ivar maintenance_window: ISO8601 timespan specifying how much time cache patching can take. :vartype maintenance_window: ~datetime.timedelta """ _validation = { 'day_of_week': {'required': True}, 'start_hour_utc': {'required': True}, } _attribute_map = { 'day_of_week': {'key': 'dayOfWeek', 'type': 'str'}, 'start_hour_utc': {'key': 'startHourUtc', 'type': 'int'}, 'maintenance_window': {'key': 'maintenanceWindow', 'type': 'duration'}, } def __init__( self, *, day_of_week: Union[str, "DayOfWeek"], start_hour_utc: int, maintenance_window: Optional[datetime.timedelta] = None, **kwargs ): """ :keyword day_of_week: Required. Day of the week when a cache can be patched. Possible values include: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Everyday", "Weekend". :paramtype day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek :keyword start_hour_utc: Required. Start hour after which cache patching can start. :paramtype start_hour_utc: int :keyword maintenance_window: ISO8601 timespan specifying how much time cache patching can take. :paramtype maintenance_window: ~datetime.timedelta """ super(ScheduleEntry, self).__init__(**kwargs) self.day_of_week = day_of_week self.start_hour_utc = start_hour_utc self.maintenance_window = maintenance_window class Sku(msrest.serialization.Model): """SKU parameters supplied to the create Redis operation. All required parameters must be populated in order to send to Azure. :ivar name: Required. The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium). Possible values include: "Basic", "Standard", "Premium". :vartype name: str or ~azure.mgmt.redis.models.SkuName :ivar family: Required. The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). Possible values include: "C", "P". :vartype family: str or ~azure.mgmt.redis.models.SkuFamily :ivar capacity: Required. The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). :vartype capacity: int """ _validation = { 'name': {'required': True}, 'family': {'required': True}, 'capacity': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, 'capacity': {'key': 'capacity', 'type': 'int'}, } def __init__( self, *, name: Union[str, "SkuName"], family: Union[str, "SkuFamily"], capacity: int, **kwargs ): """ :keyword name: Required. The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium). Possible values include: "Basic", "Standard", "Premium". :paramtype name: str or ~azure.mgmt.redis.models.SkuName :keyword family: Required. The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). Possible values include: "C", "P". :paramtype family: str or ~azure.mgmt.redis.models.SkuFamily :keyword capacity: Required. The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). :paramtype capacity: int """ super(Sku, self).__init__(**kwargs) self.name = name self.family = family self.capacity = capacity class UpgradeNotification(msrest.serialization.Model): """Properties of upgrade notification. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of upgrade notification. :vartype name: str :ivar timestamp: Timestamp when upgrade notification occurred. :vartype timestamp: ~datetime.datetime :ivar upsell_notification: Details about this upgrade notification. :vartype upsell_notification: dict[str, str] """ _validation = { 'name': {'readonly': True}, 'timestamp': {'readonly': True}, 'upsell_notification': {'readonly': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, 'upsell_notification': {'key': 'upsellNotification', 'type': '{str}'}, } def __init__( self, **kwargs ): """ """ super(UpgradeNotification, self).__init__(**kwargs) self.name = None self.timestamp = None self.upsell_notification = None class UserAssignedIdentity(msrest.serialization.Model): """User assigned identity properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar principal_id: The principal ID of the assigned identity. :vartype principal_id: str :ivar client_id: The client ID of the assigned identity. :vartype client_id: str """ _validation = { 'principal_id': {'readonly': True}, 'client_id': {'readonly': True}, } _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__( self, **kwargs ): """ """ super(UserAssignedIdentity, self).__init__(**kwargs) self.principal_id = None self.client_id = None
45.905874
445
0.674092
15,136
129,730
5.625991
0.040499
0.01455
0.020222
0.028889
0.837015
0.807657
0.787364
0.760002
0.742916
0.728225
0
0.00314
0.211986
129,730
2,825
446
45.922124
0.829843
0.550212
0
0.666941
0
0
0.256253
0.079949
0
0
0
0
0
1
0.040296
false
0
0.005757
0
0.158717
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
3c827c5aeedeef130bb395174abdc3324c33f62b
254
py
Python
RQ2_ros_implementation/turtlebot-runner/tactics/ee3/ee3.py
S2-group/msr-2021-robotics-green-architectural-tactics-replication-package
fc4a205b00abb0b096c472856002e440e73f2c5d
[ "MIT" ]
2
2021-03-26T17:29:27.000Z
2021-03-27T20:06:21.000Z
RQ2_ros_implementation/turtlebot-runner/tactics/ee3/ee3.py
S2-group/msr-2021-robotics-green-architectural-tactics-replication-package
fc4a205b00abb0b096c472856002e440e73f2c5d
[ "MIT" ]
null
null
null
RQ2_ros_implementation/turtlebot-runner/tactics/ee3/ee3.py
S2-group/msr-2021-robotics-green-architectural-tactics-replication-package
fc4a205b00abb0b096c472856002e440e73f2c5d
[ "MIT" ]
null
null
null
from tactics.ee3.EE3CameraController import CameraController class EE3: __camera_controller: CameraController def __init__(self): self.__camera_controller = CameraController() def exit(self): self.__camera_controller.exit()
25.4
60
0.748031
25
254
7.08
0.52
0.271186
0.361582
0.39548
0
0
0
0
0
0
0
0.014423
0.181102
254
10
61
25.4
0.836538
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.714286
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
6
b1ee0d605611f820ff72d5de9e55516a9d2c1002
2,107
py
Python
src/data_handling/DataClasses.py
marcopost-it/TaughtNet
3d5d15e6d16c5592aa36ee59867e322f0353fee9
[ "Apache-2.0" ]
null
null
null
src/data_handling/DataClasses.py
marcopost-it/TaughtNet
3d5d15e6d16c5592aa36ee59867e322f0353fee9
[ "Apache-2.0" ]
null
null
null
src/data_handling/DataClasses.py
marcopost-it/TaughtNet
3d5d15e6d16c5592aa36ee59867e322f0353fee9
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from enum import Enum from typing import Dict, List, Optional, Union, Tuple @dataclass class InputExample: """ A single training/test example for token classification. Args: guid: Unique id for the example. words: list. The words of the sequence. labels: (Optional) list. The labels for each word of the sequence. This should be specified for train and dev examples, but not for test examples. """ guid: str words: List[str] labels: Optional[List[str]] @dataclass class KGInputExample: """ A single training/test example for token classification. Args: guid: Unique id for the example. words: list. The words of the sequence. labels: (Optional) list. The labels for each word of the sequence. This should be specified for train and dev examples, but not for test examples. """ guid: str words: List[str] labels: Optional[List[str]] teachers_proba: Optional[List[List[float]]] @dataclass class InputFeatures: """ A single set of features of data. Property names are the same names as the corresponding inputs to a model. """ input_ids: List[int] attention_mask: List[int] token_type_ids: Optional[List[int]] = None label_ids: Optional[List[int]] = None @dataclass class KGInputFeatures: """ A single set of features of data. Property names are the same names as the corresponding inputs to a model. """ input_ids: List[int] attention_mask: List[int] token_type_ids: Optional[List[int]] = None label_ids: Optional[List[int]] = None teachers_proba: Optional[List[List[float]]] = None @dataclass class SequenceInputFeatures: """ A single set of features of data. Property names are the same names as the corresponding inputs to a model. """ input_ids: List[int] attention_mask: List[int] token_type_ids: Optional[List[int]] = None label_ids: Optional[List[int]] = None class Split(Enum): train = "train" dev = "dev" test = "test"
27.363636
89
0.675368
288
2,107
4.881944
0.246528
0.102418
0.064011
0.076814
0.802987
0.802987
0.754623
0.754623
0.754623
0.754623
0
0
0.239677
2,107
77
90
27.363636
0.877653
0.437114
0
0.621622
0
0
0.011331
0
0
0
0
0
0
1
0
false
0
0.081081
0
0.864865
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
593598ba4ef1ea9849e1dbdc1f79686e0a3b2531
2,367
py
Python
petstagram/main_app/forms.py
rashkov7/petstagram
1589da79acb37ffa07a56a3f7426bc76b9db12b0
[ "MIT" ]
null
null
null
petstagram/main_app/forms.py
rashkov7/petstagram
1589da79acb37ffa07a56a3f7426bc76b9db12b0
[ "MIT" ]
3
2022-03-22T21:29:56.000Z
2022-03-23T07:13:30.000Z
petstagram/main_app/forms.py
rashkov7/petstagram
1589da79acb37ffa07a56a3f7426bc76b9db12b0
[ "MIT" ]
null
null
null
from django import forms from django.core.exceptions import NON_FIELD_ERRORS from petstagram.main_app.models import Pet, PetPhoto class PetCreateForm(forms.ModelForm): class Meta: model = Pet exclude = ('user_profile',) error_messages = { NON_FIELD_ERRORS: { 'unique_together': "%(model_name)s's %(field_labels)s are not unique.", } } def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for _, field in self.fields.items(): if hasattr(field, 'class'): field.widget.attrs['class'] = 'form-control' field.widget.attrs.update({'class': 'form-control'}) class PhotoCreateForm(forms.ModelForm): class Meta: model = PetPhoto fields = '__all__' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for _, field in self.fields.items(): if hasattr(field, 'class'): field.widget.attrs['class'] = 'form-control' field.widget.attrs.update({'class': 'form-control'}) class PhotoEditForm(forms.ModelForm): class Meta: model = PetPhoto exclude = ('likes',) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for _, field in self.fields.items(): if hasattr(field, 'class'): field.widget.attrs['class'] = 'form-control' field.widget.attrs.update({'class': 'form-control'}) class PetEditForm(forms.ModelForm): class Meta: model = Pet exclude = ('user_profile',) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for _, field in self.fields.items(): if hasattr(field, 'class'): field.widget.attrs['class'] = 'form-control' field.widget.attrs.update({'class': 'form-control'}) class PetDeleteForm(forms.ModelForm): class Meta: model = Pet exclude = ('user_profile',) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for _, field in self.fields.items(): if hasattr(field, 'class'): field.widget.attrs['class'] = 'form-control' field.widget.attrs.update({'class': 'form-control', 'readonly': 'readonly'})
31.56
88
0.575412
252
2,367
5.162698
0.222222
0.076864
0.122982
0.088394
0.775557
0.775557
0.720215
0.720215
0.720215
0.682552
0
0
0.277567
2,367
74
89
31.986486
0.760819
0
0
0.724138
0
0
0.13646
0
0
0
0
0
0
1
0.086207
false
0
0.051724
0
0.310345
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
59475df3dcebc1b72c75e406df9b9ee262397fe3
4,222
py
Python
app/region/trainEcoRegion.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/region/trainEcoRegion.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/region/trainEcoRegion.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
2
2021-04-04T02:45:59.000Z
2022-03-19T09:41:39.000Z
from hydroDL import pathSMAP, master import os from hydroDL.data import dbCsv # train for each cont subsetLst = ['ecoRegion{0:0>2}_v2f1'.format(x) for x in range(1, 18)] caseLst = ['Forcing', 'Soilm'] # train a CONUS model cid = 1 for case in caseLst: if case == 'Forcing': varLst = dbCsv.varForcing else: varLst = dbCsv.varSoilM optData = master.default.update( master.default.optDataSMAP, rootDB=pathSMAP['DB_L3_NA'], subset='CONUSv2f1', tRange=[20150401, 20160401], varT=varLst) optModel = master.default.optLstm optLoss = master.default.optLossRMSE optTrain = master.default.optTrainSMAP out = os.path.join(pathSMAP['Out_L3_NA'], 'CONUSv2f1_' + case) masterDict = master.wrapMaster(out, optData, optModel, optLoss, optTrain) master.runTrain(masterDict, cudaID=cid % 3, screen=case) cid = cid + 1 # train for each region cid = 0 for k in range(len(subsetLst)): for case in caseLst: if case == 'Forcing': varLst = dbCsv.varForcing else: varLst = dbCsv.varSoilM optData = master.default.update( master.default.optDataSMAP, rootDB=pathSMAP['DB_L3_NA'], subset=subsetLst[k], tRange=[20150401, 20160401], varT=varLst) optModel = master.default.optLstm optLoss = master.default.optLossRMSE optTrain = master.default.optTrainSMAP out = os.path.join(pathSMAP['Out_L3_NA'], 'ecoRegion', subsetLst[k] + '_' + case) masterDict = master.wrapMaster(out, optData, optModel, optLoss, optTrain) # master.runTrain(masterDict, cudaID=cid % 3, screen=subsetLst[k]) cid = cid + 1 # master.train(masterDict) # retrain some models rtEcoLst = [1, 2, 5, 7, 8, 10, 13, 16, 17] rtCaseLst = [ 'Forcing', 'SoilM', 'SoilM', 'Forcing', 'SoilM', 'Forcing', 'Forcing', 'Forcing', 'SoilM' ] cid = 0 for kk in range(len(rtEcoLst)): k = rtEcoLst[kk] - 1 case = rtCaseLst[kk] optData = master.default.update( master.default.optDataSMAP, rootDB=pathSMAP['DB_L3_NA'], subset=subsetLst[k], tRange=[20150401, 20160401], varT=varLst) optModel = master.default.optLstm optLoss = master.default.optLossRMSE optTrain = master.default.optTrainSMAP out = os.path.join(pathSMAP['Out_L3_NA'], 'ecoRegion', subsetLst[k] + '_' + case) masterDict = master.wrapMaster(out, optData, optModel, optLoss, optTrain) master.runTrain(masterDict, cudaID=cid % 3, screen=subsetLst[k]) cid = cid + 1 # master.train(masterDict) # test ss = '' for k in range(len(subsetLst)): for case in caseLst: out = os.path.join(pathSMAP['Out_L3_NA'], 'ecoRegion', subsetLst[k] + '_' + case) try: master.test(out, tRange=[20160401, 20180401], subset=subsetLst[k]) except: ss = ss + 'ecoRegion ' + str(k) + ' case ' + case + '; ' # retrain some models # rtEcoLst = [1, 2, 5, 7, 8, 10, 13, 16, 17] # rtCaseLst = [ # 'Forcing', 'Soilm', 'Soilm', 'Forcing', 'Soilm', 'Forcing', 'Forcing', # 'Forcing', 'Soilm' # ] # rtEcoLst = [1, 4, 7, 16] # rtCaseLst = ['Soilm', 'Soilm', 'Soilm', 'Soilm'] # cid = 2 # for kk in range(len(rtEcoLst)): # k = rtEcoLst[kk] - 1 # case = rtCaseLst[kk] # if case == 'Forcing': # varLst = dbCsv.varForcing # else: # varLst = dbCsv.varSoilM # optData = master.default.update( # master.default.optDataSMAP, # rootDB=pathSMAP['DB_L3_NA'], # subset=subsetLst[k], # tRange=[20150401, 20160401], # varT=varLst) # optModel = master.default.optLstm # optLoss = master.default.optLossRMSE # optTrain = master.default.optTrainSMAP # out = os.path.join(pathSMAP['Out_L3_NA'], 'ecoRegion', # subsetLst[k] + '_' + case) # masterDict = master.wrapMaster(out, optData, optModel, optLoss, optTrain) # master.runTrain(masterDict, cudaID=cid % 3, screen=subsetLst[k]) # cid = cid + 1 # # master.train(masterDict)
34.325203
79
0.598532
478
4,222
5.236402
0.1841
0.103875
0.017978
0.025969
0.856972
0.856972
0.856972
0.856972
0.856972
0.856972
0
0.047051
0.26504
4,222
123
80
34.325203
0.759588
0.300095
0
0.675325
0
0
0.078559
0.007204
0
0
0
0
0
1
0
false
0
0.038961
0
0.038961
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
3ca98a0a2df90826517ba589a44a9ec5b4dea853
55
py
Python
10_How_To_Get_Document.py
MoYuStudio/MoYuEngine
7d9ab5c9cb268de0071e798a3288f0bbb651795e
[ "Apache-2.0" ]
2
2022-03-22T02:32:34.000Z
2022-03-22T02:32:43.000Z
10_How_To_Get_Document.py
MoYuStudio/MoYuEngine
7d9ab5c9cb268de0071e798a3288f0bbb651795e
[ "Apache-2.0" ]
null
null
null
10_How_To_Get_Document.py
MoYuStudio/MoYuEngine
7d9ab5c9cb268de0071e798a3288f0bbb651795e
[ "Apache-2.0" ]
null
null
null
import moyu_engine print(moyu_engine.Window.__doc__)
11
33
0.836364
8
55
5
0.75
0.5
0
0
0
0
0
0
0
0
0
0
0.090909
55
4
34
13.75
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
6
3cddb5843873c93712e1da4b04c228e1d7bccea7
6,857
py
Python
google/cloud/billing_budgets_v1beta1/proto/budget_service_pb2_grpc.py
dwsupplee/python-billingbudgets
bef9509b7f4cb6427ef4f0b27c57e0ba69694be7
[ "Apache-2.0" ]
1
2019-12-09T11:40:28.000Z
2019-12-09T11:40:28.000Z
google/cloud/billing_budgets_v1beta1/proto/budget_service_pb2_grpc.py
dwsupplee/python-billingbudgets
bef9509b7f4cb6427ef4f0b27c57e0ba69694be7
[ "Apache-2.0" ]
40
2019-07-16T10:04:48.000Z
2020-01-20T09:04:59.000Z
google/cloud/billing_budgets_v1beta1/proto/budget_service_pb2_grpc.py
dwsupplee/python-billingbudgets
bef9509b7f4cb6427ef4f0b27c57e0ba69694be7
[ "Apache-2.0" ]
2
2019-07-18T00:05:31.000Z
2019-11-27T14:17:22.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.billing_budgets_v1beta1.proto import ( budget_model_pb2 as google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2, ) from google.cloud.billing_budgets_v1beta1.proto import ( budget_service_pb2 as google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2, ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class BudgetServiceStub(object): """BudgetService stores Cloud Billing budgets, which define a budget plan and rules to execute as we track spend against that plan. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.CreateBudget = channel.unary_unary( "/google.cloud.billing.budgets.v1beta1.BudgetService/CreateBudget", request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.CreateBudgetRequest.SerializeToString, response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.FromString, ) self.UpdateBudget = channel.unary_unary( "/google.cloud.billing.budgets.v1beta1.BudgetService/UpdateBudget", request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.UpdateBudgetRequest.SerializeToString, response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.FromString, ) self.GetBudget = channel.unary_unary( "/google.cloud.billing.budgets.v1beta1.BudgetService/GetBudget", request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.GetBudgetRequest.SerializeToString, response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.FromString, ) self.ListBudgets = channel.unary_unary( "/google.cloud.billing.budgets.v1beta1.BudgetService/ListBudgets", request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsRequest.SerializeToString, response_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsResponse.FromString, ) self.DeleteBudget = channel.unary_unary( "/google.cloud.billing.budgets.v1beta1.BudgetService/DeleteBudget", request_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.DeleteBudgetRequest.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, ) class BudgetServiceServicer(object): """BudgetService stores Cloud Billing budgets, which define a budget plan and rules to execute as we track spend against that plan. """ def CreateBudget(self, request, context): """Creates a new budget. See <a href="https://cloud.google.com/billing/quotas">Quotas and limits</a> for more information on the limits of the number of budgets you can create. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateBudget(self, request, context): """Updates a budget and returns the updated budget. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetBudget(self, request, context): """Returns a budget. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListBudgets(self, request, context): """Returns a list of budgets for a billing account. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteBudget(self, request, context): """Deletes a budget. Returns successfully if already deleted. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def add_BudgetServiceServicer_to_server(servicer, server): rpc_method_handlers = { "CreateBudget": grpc.unary_unary_rpc_method_handler( servicer.CreateBudget, request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.CreateBudgetRequest.FromString, response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.SerializeToString, ), "UpdateBudget": grpc.unary_unary_rpc_method_handler( servicer.UpdateBudget, request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.UpdateBudgetRequest.FromString, response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.SerializeToString, ), "GetBudget": grpc.unary_unary_rpc_method_handler( servicer.GetBudget, request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.GetBudgetRequest.FromString, response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__model__pb2.Budget.SerializeToString, ), "ListBudgets": grpc.unary_unary_rpc_method_handler( servicer.ListBudgets, request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsRequest.FromString, response_serializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.ListBudgetsResponse.SerializeToString, ), "DeleteBudget": grpc.unary_unary_rpc_method_handler( servicer.DeleteBudget, request_deserializer=google_dot_cloud_dot_billing_dot_budgets__v1beta1_dot_proto_dot_budget__service__pb2.DeleteBudgetRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( "google.cloud.billing.budgets.v1beta1.BudgetService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,))
54.420635
155
0.774974
787
6,857
6.217281
0.144854
0.080114
0.057225
0.069487
0.791743
0.767832
0.752912
0.700593
0.700593
0.615573
0
0.014263
0.161587
6,857
125
156
54.856
0.836841
0.108211
0
0.318182
1
0
0.107983
0.060616
0
0
0
0
0
1
0.079545
false
0
0.045455
0
0.147727
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
3ce3ada8327aa430d15f4f442545a6d8e78db186
2,800
py
Python
transactions/migrations/0001_initial.py
Guilehm/expense-control-system
c0f8393497f54076cb15008f1bda9efc5081025b
[ "MIT" ]
1
2022-02-16T23:23:02.000Z
2022-02-16T23:23:02.000Z
transactions/migrations/0001_initial.py
guilehm/expense-control-system
c0f8393497f54076cb15008f1bda9efc5081025b
[ "MIT" ]
40
2018-07-01T15:49:05.000Z
2018-09-06T02:37:24.000Z
transactions/migrations/0001_initial.py
Guilehm/Expense-Control-System
c0f8393497f54076cb15008f1bda9efc5081025b
[ "MIT" ]
1
2019-05-05T13:43:55.000Z
2019-05-05T13:43:55.000Z
# Generated by Django 2.0.5 on 2018-05-10 01:18 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name='Expense', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=50)), ('description', models.TextField(blank=True, null=True)), ('value', models.DecimalField(decimal_places=2, max_digits=9)), ('due_date', models.DateField(db_index=True)), ('paid_out', models.BooleanField(default=False)), ('note', models.TextField(blank=True, null=True)), ('slug', models.SlugField()), ('date_added', models.DateTimeField(auto_now_add=True, db_index=True)), ('date_changed', models.DateTimeField(auto_now=True, db_index=True)), ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='expenses', to='core.Category')), ('tags', models.ManyToManyField(blank=True, related_name='expenses', to='core.Tag')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Revenue', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=50)), ('description', models.TextField(blank=True, null=True)), ('value', models.DecimalField(decimal_places=2, max_digits=9)), ('due_date', models.DateField(db_index=True)), ('received_out', models.BooleanField(default=False)), ('note', models.TextField(blank=True, null=True)), ('slug', models.SlugField()), ('date_added', models.DateTimeField(auto_now_add=True, db_index=True)), ('date_changed', models.DateTimeField(auto_now=True, db_index=True)), ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='revenues', to='core.Category')), ('tags', models.ManyToManyField(blank=True, related_name='revenues', to='core.Tag')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
50.909091
138
0.608214
300
2,800
5.516667
0.3
0.029003
0.039879
0.066465
0.8
0.780665
0.780665
0.780665
0.780665
0.780665
0
0.012766
0.244643
2,800
54
139
51.851852
0.76974
0.016071
0
0.595745
1
0
0.102434
0
0
0
0
0
0
1
0
false
0
0.06383
0
0.148936
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
a72782771fdbc7afe91fea9033dd0c72668b2af2
31
py
Python
affnine_deltaleaf/__init__.py
biswanathamz/affnine_delta_leaf
8c1e8736db81e9daaa5dbe46d1a67326c67ac679
[ "MIT" ]
4
2019-11-30T17:06:26.000Z
2021-02-05T04:02:03.000Z
affnine_deltaleaf/__init__.py
biswanathamz/affnine_delta_leaf
8c1e8736db81e9daaa5dbe46d1a67326c67ac679
[ "MIT" ]
null
null
null
affnine_deltaleaf/__init__.py
biswanathamz/affnine_delta_leaf
8c1e8736db81e9daaa5dbe46d1a67326c67ac679
[ "MIT" ]
2
2019-11-30T17:06:30.000Z
2020-01-07T14:19:50.000Z
from .afn_algo import deltaLeaf
31
31
0.870968
5
31
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.096774
31
1
31
31
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
5970a47153234df990d88b304545ab817759b02a
71
py
Python
pyronear/models/__init__.py
JoaoFdC/PyroNear
ca56316d5ad986789feace9dd913115596f6c2ca
[ "MIT" ]
null
null
null
pyronear/models/__init__.py
JoaoFdC/PyroNear
ca56316d5ad986789feace9dd913115596f6c2ca
[ "MIT" ]
null
null
null
pyronear/models/__init__.py
JoaoFdC/PyroNear
ca56316d5ad986789feace9dd913115596f6c2ca
[ "MIT" ]
null
null
null
from .resnet import * from .densenet import * from .mobilenet import *
17.75
24
0.746479
9
71
5.888889
0.555556
0.377358
0
0
0
0
0
0
0
0
0
0
0.169014
71
3
25
23.666667
0.898305
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
59a636b1f793010269f338f094cc5302efcf81a8
96
py
Python
venv/lib/python3.8/site-packages/debugpy/adapter/clients.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/debugpy/adapter/clients.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/debugpy/adapter/clients.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/45/c2/89/ad2a61d5929dffd2339f33635bbe9c0b6065cda6d2161117c47eb8c8ce
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.40625
0
96
1
96
96
0.489583
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
6
59b50771f03759a1ad11a0366b87c6ac4a44d5c3
6,389
py
Python
scripts/config.py
LevinRoman/MMORT
afdb4931b68d5679e9a8b9778c9ca7a2d6caf69c
[ "MIT" ]
null
null
null
scripts/config.py
LevinRoman/MMORT
afdb4931b68d5679e9a8b9778c9ca7a2d6caf69c
[ "MIT" ]
null
null
null
scripts/config.py
LevinRoman/MMORT
afdb4931b68d5679e9a8b9778c9ca7a2d6caf69c
[ "MIT" ]
null
null
null
import numpy as np configurations = {} #Experiment 1: Two modality, dosimetric difference def experiment_1(): """Config for Experiment 1: Two modality, dosimetric difference""" configurations = {} Alpha = np.array([0.35, 0.35]) Beta = np.array([0.175, 0.175]) Gamma = np.array([np.array([0.35, 0.35]), np.array([0.35, 0.35]), np.array([0.35, 0.35]), np.array([0.35, 0.35]), np.array([0.35, 0.35]) ]) Delta = np.array([np.array([0.07, 0.07]), np.array([0.07, 0.07]), np.array([0.175, 0.175]), np.array([0.175, 0.175]), np.array([0.175, 0.175]) ]) modality_names = np.array(['Aphoton', 'Aproton']) configurations['Alpha'] = Alpha configurations['Beta'] = Beta configurations['Gamma'] = Gamma configurations['Delta'] = Delta configurations['modality_names'] = modality_names return configurations #Experiment 2: photon IMRT objective using our code def experiment_2(N1, d): """Config for Experiment 2: This experiment should yield Tu-d as the objective where d is the target uniform dose per fraction""" configurations = {} Alpha = np.array([2*d/N1, 0.0]) Beta = np.array([-1/N1, 0.0]) Gamma = np.array([np.array([0.35, 0.0]), np.array([0.35, 0.0]), np.array([0.35, 0.0]), np.array([0.35, 0.0]), np.array([0.35, 0.0]) ]) Delta = np.array([np.array([0.07, 0.0]), np.array([0.07, 0.0]), np.array([0.175, 0.0]), np.array([0.175, 0.0]), np.array([0.175, 0.0]) ]) modality_names = np.array(['Aphoton', 'Aproton']) configurations['Alpha'] = Alpha configurations['Beta'] = Beta configurations['Gamma'] = Gamma configurations['Delta'] = Delta configurations['modality_names'] = modality_names return configurations #Experiment 3: proton IMRT objective using our code def experiment_3(N1, d): """Config for Experiment 3: This experiment should yield Tu-d as the objective where d is the target uniform dose per fraction and T is the second modality dose matrix""" configurations = {} Alpha = np.array([0.0, 2*d/N1]) Beta = np.array([0.0, -1/N1]) Gamma = np.array([np.array([0.0, 0.35]), np.array([0.0, 0.35]), np.array([0.0, 0.35]), np.array([0.0, 0.35]), np.array([0.0, 0.35]) ]) Delta = np.array([np.array([0.0, 0.07]), np.array([0.0, 0.07]), np.array([0.0, 0.175]), np.array([0.0, 0.175]), np.array([0.0, 0.175]) ]) modality_names = np.array(['Aphoton', 'Aproton']) configurations['Alpha'] = Alpha configurations['Beta'] = Beta configurations['Gamma'] = Gamma configurations['Delta'] = Delta configurations['modality_names'] = modality_names return configurations #tumor max dose (tmd) multi-modality experiment def experiment_tmd(): """Config for Experiment 1: Two modality, dosimetric difference""" configurations = {} Alpha = np.array([0.35, 0.35]) Beta = np.array([0.175, 0.175]) Gamma = np.array([np.array([0.35, 0.35]), np.array([0.35, 0.35]), np.array([0.35, 0.35]), np.array([0.35, 0.35]), np.array([0.35, 0.35]), np.array([0.35, 0.35]) ]) Delta = np.array([np.array([0.07, 0.07]), np.array([0.07, 0.07]), np.array([0.175, 0.175]), np.array([0.175, 0.175]), np.array([0.175, 0.175]), np.array([0.175, 0.175]) ]) modality_names = np.array(['Aphoton', 'Aproton']) configurations['Alpha'] = Alpha configurations['Beta'] = Beta configurations['Gamma'] = Gamma configurations['Delta'] = Delta configurations['modality_names'] = modality_names return configurations #tumor max dose (tmd) IMRT experiment def experiment_tmd_imrt(N1, d): """Config for Experiment 2: This experiment should yield Tu-d as the objective where d is the target uniform dose per fraction""" configurations = {} Alpha = np.array([2*d/N1, 0.0]) Beta = np.array([-1/N1, 0.0]) Gamma = np.array([np.array([0.35, 0.0]), np.array([0.35, 0.0]), np.array([0.35, 0.0]), np.array([0.35, 0.0]), np.array([0.35, 0.0]), np.array([0.35, 0.0]) ]) Delta = np.array([np.array([0.07, 0.0]), np.array([0.07, 0.0]), np.array([0.175, 0.0]), np.array([0.175, 0.0]), np.array([0.175, 0.0]), np.array([0.175, 0.0]) ]) modality_names = np.array(['Aphoton', 'Aproton']) configurations['Alpha'] = Alpha configurations['Beta'] = Beta configurations['Gamma'] = Gamma configurations['Delta'] = Delta configurations['modality_names'] = modality_names return configurations #MMORT configurations['Experiment_1'] = experiment_1() #IMRT experiments with different target dose configurations['Experiment_2'] = experiment_2(44.0, 81.0/44.0) configurations['Experiment_3'] = experiment_2(44.0, 85.0/44.0) configurations['Experiment_4'] = experiment_2(44.0, 60.0/44.0) configurations['Experiment_5'] = experiment_2(44.0, 100.0/44.0) #Try breaking the uniform dose: configurations['Experiment_6'] = experiment_2(44.0, 150.0/44.0) #Experiment with tumor max dose (tmd) configurations['tmd_experiment_1'] = experiment_tmd() #IMRT experiment with tumor max dose (tmd) configurations['tmd_imrt_experiment_1'] = experiment_tmd_imrt(44.0, 81.0/44.0) ################################################ #Experiments with u_max: configurations['mmort_photon_u_max'] = experiment_1() #IMRT with photon configurations['IMRT_photon_u_max'] = experiment_2(44.0, 81.0/44.0) #IMRT with proton configurations['IMRT_proton_u_max'] = experiment_3(44.0, 81.0/44.0) #######################################################
34.912568
121
0.54406
857
6,389
3.992999
0.086348
0.161601
0.140269
0.070134
0.831677
0.777615
0.758621
0.734366
0.692285
0.692285
0
0.102559
0.278134
6,389
183
122
34.912568
0.639419
0.152763
0
0.818182
0
0
0.075185
0.003987
0
0
0
0
0
1
0.037879
false
0
0.007576
0
0.083333
0
0
0
0
null
0
0
0
1
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
6
59c0325dbf053b69b338a68d572bb7c38cd6a59e
25
py
Python
turnovertools/adapters/__init__.py
morganwl/turnovertools
ea911853033ed5087b40852b5adc3b8f5d0a903d
[ "MIT" ]
null
null
null
turnovertools/adapters/__init__.py
morganwl/turnovertools
ea911853033ed5087b40852b5adc3b8f5d0a903d
[ "MIT" ]
3
2021-03-22T00:44:24.000Z
2021-06-26T19:32:31.000Z
turnovertools/adapters/__init__.py
morganwl/turnovertools
ea911853033ed5087b40852b5adc3b8f5d0a903d
[ "MIT" ]
null
null
null
from .ale import AvidLog
12.5
24
0.8
4
25
5
1
0
0
0
0
0
0
0
0
0
0
0
0.16
25
1
25
25
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
59d781843ccc6ec5389acb8a46d4423b5faa12df
31
py
Python
gnsentiment/__init__.py
lufergonn/gnsentiment
ffac0b03f9e3751b972885c72ae2dd8c71403eff
[ "MIT" ]
null
null
null
gnsentiment/__init__.py
lufergonn/gnsentiment
ffac0b03f9e3751b972885c72ae2dd8c71403eff
[ "MIT" ]
null
null
null
gnsentiment/__init__.py
lufergonn/gnsentiment
ffac0b03f9e3751b972885c72ae2dd8c71403eff
[ "MIT" ]
null
null
null
from gnsentiment.core import *
15.5
30
0.806452
4
31
6.25
1
0
0
0
0
0
0
0
0
0
0
0
0.129032
31
1
31
31
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
ab895c78e258d364a473b9886b12ff92728935f8
139
py
Python
common/__init__.py
ml4ai/tomcat-network-latency-test
be920be19e4e104a99f8fb4464173a3eb2540f89
[ "MIT" ]
null
null
null
common/__init__.py
ml4ai/tomcat-network-latency-test
be920be19e4e104a99f8fb4464173a3eb2540f89
[ "MIT" ]
null
null
null
common/__init__.py
ml4ai/tomcat-network-latency-test
be920be19e4e104a99f8fb4464173a3eb2540f89
[ "MIT" ]
null
null
null
from .get_terminal_command import get_terminal_command from .notify_ready import notify_ready from .wait_for_server import wait_for_server
34.75
54
0.892086
22
139
5.181818
0.454545
0.192982
0.315789
0
0
0
0
0
0
0
0
0
0.086331
139
3
55
46.333333
0.897638
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
abbd99de00d74356172efb6f6c8d26c1ba416a7d
7,433
py
Python
tests/unit/dht/test_contact.py
ttkopec/lbry
03415415ed397730e6f691f527f51b429a834ed5
[ "MIT" ]
null
null
null
tests/unit/dht/test_contact.py
ttkopec/lbry
03415415ed397730e6f691f527f51b429a834ed5
[ "MIT" ]
110
2018-11-26T05:41:35.000Z
2021-08-03T15:37:20.000Z
tests/unit/dht/test_contact.py
ttkopec/lbry
03415415ed397730e6f691f527f51b429a834ed5
[ "MIT" ]
1
2018-09-20T22:15:59.000Z
2018-09-20T22:15:59.000Z
from binascii import hexlify from twisted.internet import task from twisted.trial import unittest from lbrynet.core.utils import generate_id from lbrynet.dht.contact import ContactManager from lbrynet.dht import constants class ContactTest(unittest.TestCase): """ Basic tests case for boolean operators on the Contact class """ def setUp(self): self.contact_manager = ContactManager() self.node_ids = [generate_id(), generate_id(), generate_id()] make_contact = self.contact_manager.make_contact self.first_contact = make_contact(self.node_ids[1], '127.0.0.1', 1000, None, 1) self.second_contact = make_contact(self.node_ids[0], '192.168.0.1', 1000, None, 32) self.second_contact_second_reference = make_contact(self.node_ids[0], '192.168.0.1', 1000, None, 32) self.first_contact_different_values = make_contact(self.node_ids[1], '192.168.1.20', 1000, None, 50) def test_make_contact_error_cases(self): self.assertRaises( ValueError, self.contact_manager.make_contact, self.node_ids[1], '192.168.1.20', 100000, None) self.assertRaises( ValueError, self.contact_manager.make_contact, self.node_ids[1], '192.168.1.20.1', 1000, None) self.assertRaises( ValueError, self.contact_manager.make_contact, self.node_ids[1], 'this is not an ip', 1000, None) self.assertRaises( ValueError, self.contact_manager.make_contact, b'not valid node id', '192.168.1.20.1', 1000, None) def test_no_duplicate_contact_objects(self): self.assertTrue(self.second_contact is self.second_contact_second_reference) self.assertTrue(self.first_contact is not self.first_contact_different_values) def test_boolean(self): """ Test "equals" and "not equals" comparisons """ self.assertNotEqual( self.first_contact, self.contact_manager.make_contact( self.first_contact.id, self.first_contact.address, self.first_contact.port + 1, None, 32 ) ) self.assertNotEqual( self.first_contact, self.contact_manager.make_contact( self.first_contact.id, '193.168.1.1', self.first_contact.port, None, 32 ) ) self.assertNotEqual( self.first_contact, self.contact_manager.make_contact( generate_id(), self.first_contact.address, self.first_contact.port, None, 32 ) ) self.assertEqual(self.second_contact, self.second_contact_second_reference) def test_compact_ip(self): self.assertEqual(self.first_contact.compact_ip(), b'\x7f\x00\x00\x01') self.assertEqual(self.second_contact.compact_ip(), b'\xc0\xa8\x00\x01') def test_id_log(self): self.assertEqual(self.first_contact.log_id(False), hexlify(self.node_ids[1])) self.assertEqual(self.first_contact.log_id(True), hexlify(self.node_ids[1])[:8]) class TestContactLastReplied(unittest.TestCase): def setUp(self): self.clock = task.Clock() self.contact_manager = ContactManager(self.clock.seconds) self.contact = self.contact_manager.make_contact(generate_id(), "127.0.0.1", 4444, None) self.clock.advance(3600) self.assertTrue(self.contact.contact_is_good is None) def test_stale_replied_to_us(self): self.contact.update_last_replied() self.assertTrue(self.contact.contact_is_good is True) def test_stale_requested_from_us(self): self.contact.update_last_requested() self.assertTrue(self.contact.contact_is_good is None) def test_stale_then_fail(self): self.contact.update_last_failed() self.assertTrue(self.contact.contact_is_good is None) self.clock.advance(1) self.contact.update_last_failed() self.assertTrue(self.contact.contact_is_good is False) def test_good_turned_stale(self): self.contact.update_last_replied() self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(constants.checkRefreshInterval - 1) self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(1) self.assertTrue(self.contact.contact_is_good is None) def test_good_then_fail(self): self.contact.update_last_replied() self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(1) self.contact.update_last_failed() self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(59) self.assertTrue(self.contact.contact_is_good is True) self.contact.update_last_failed() self.assertTrue(self.contact.contact_is_good is False) for _ in range(7200): self.clock.advance(60) self.assertTrue(self.contact.contact_is_good is False) def test_good_then_fail_then_good(self): # it replies self.contact.update_last_replied() self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(1) # it fails twice in a row self.contact.update_last_failed() self.clock.advance(1) self.contact.update_last_failed() self.assertTrue(self.contact.contact_is_good is False) self.clock.advance(1) # it replies self.contact.update_last_replied() self.clock.advance(1) self.assertTrue(self.contact.contact_is_good is True) # it goes stale self.clock.advance(constants.checkRefreshInterval - 2) self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(1) self.assertTrue(self.contact.contact_is_good is None) class TestContactLastRequested(unittest.TestCase): def setUp(self): self.clock = task.Clock() self.contact_manager = ContactManager(self.clock.seconds) self.contact = self.contact_manager.make_contact(generate_id(), "127.0.0.1", 4444, None) self.clock.advance(1) self.contact.update_last_replied() self.clock.advance(3600) self.assertTrue(self.contact.contact_is_good is None) def test_previous_replied_then_requested(self): # it requests self.contact.update_last_requested() self.assertTrue(self.contact.contact_is_good is True) # it goes stale self.clock.advance(constants.checkRefreshInterval - 1) self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(1) self.assertTrue(self.contact.contact_is_good is None) def test_previous_replied_then_requested_then_failed(self): # it requests self.contact.update_last_requested() self.assertTrue(self.contact.contact_is_good is True) self.clock.advance(1) # it fails twice in a row self.contact.update_last_failed() self.clock.advance(1) self.contact.update_last_failed() self.assertTrue(self.contact.contact_is_good is False) self.clock.advance(1) # it requests self.contact.update_last_requested() self.clock.advance(1) self.assertTrue(self.contact.contact_is_good is False) # it goes stale self.clock.advance((constants.refreshTimeout / 4) - 2) self.assertTrue(self.contact.contact_is_good is False) self.clock.advance(1) self.assertTrue(self.contact.contact_is_good is False)
42.232955
110
0.690031
993
7,433
4.944612
0.123867
0.13442
0.106314
0.137475
0.828106
0.767821
0.752138
0.71609
0.696334
0.662118
0
0.033186
0.209471
7,433
175
111
42.474286
0.802417
0.034037
0
0.605839
1
0
0.024867
0
0
0
0
0
0.29927
1
0.116788
false
0
0.043796
0
0.182482
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
abc3e285dcf9fc26baedb9ce3340a53ba4356c38
22
py
Python
avalanche/benchmarks/datasets/cub200/__init__.py
PRISHIta123/avalanche
cf92e4e1b7135fedd04106a195eb1fb67b97c124
[ "MIT" ]
810
2018-10-08T15:49:05.000Z
2022-03-31T15:28:09.000Z
avalanche/benchmarks/datasets/cub200/__init__.py
PRISHIta123/avalanche
cf92e4e1b7135fedd04106a195eb1fb67b97c124
[ "MIT" ]
477
2021-03-01T17:50:51.000Z
2022-03-31T14:51:23.000Z
avalanche/benchmarks/datasets/cub200/__init__.py
PRISHIta123/avalanche
cf92e4e1b7135fedd04106a195eb1fb67b97c124
[ "MIT" ]
147
2018-10-08T15:49:18.000Z
2022-03-31T04:08:45.000Z
from .cub200 import *
11
21
0.727273
3
22
5.333333
1
0
0
0
0
0
0
0
0
0
0
0.166667
0.181818
22
1
22
22
0.722222
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
e61856fd757b7ea554e3b0e5f633a65035c6142d
29
py
Python
evoke/Page/__init__.py
howiemac/evoke5
430d6dfd719f8c88a4c3de2b735f8736187ff19b
[ "BSD-3-Clause" ]
null
null
null
evoke/Page/__init__.py
howiemac/evoke5
430d6dfd719f8c88a4c3de2b735f8736187ff19b
[ "BSD-3-Clause" ]
null
null
null
evoke/Page/__init__.py
howiemac/evoke5
430d6dfd719f8c88a4c3de2b735f8736187ff19b
[ "BSD-3-Clause" ]
null
null
null
from .Page import Page, html
14.5
28
0.758621
5
29
4.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.172414
29
1
29
29
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
1
0
0
6
e6485ad5e01a389e30e50965ab2bc06d6e8097b3
4,075
py
Python
deepclean_prod/nn/net.py
trivnguyen/deepclean_prod
f724508c0b2f1d7ff3106f55ae3a468547ab85c6
[ "MIT" ]
null
null
null
deepclean_prod/nn/net.py
trivnguyen/deepclean_prod
f724508c0b2f1d7ff3106f55ae3a468547ab85c6
[ "MIT" ]
null
null
null
deepclean_prod/nn/net.py
trivnguyen/deepclean_prod
f724508c0b2f1d7ff3106f55ae3a468547ab85c6
[ "MIT" ]
1
2021-11-03T10:15:58.000Z
2021-11-03T10:15:58.000Z
import torch.nn as nn # class DeepClean(nn.Module): # def __init__(self, in_channels): # super().__init__() # self.input_conv = nn.Sequential( # nn.Conv1d(in_channels, in_channels, kernel_size=7, stride=1, padding=3), # nn.BatchNorm1d(in_channels), # nn.Tanh() # ) # self.downsampler = nn.Sequential() # self.downsampler.add_module('CONV_1', nn.Conv1d(in_channels, 8, kernel_size=7, stride=2, padding=3)) # self.downsampler.add_module('BN_1', nn.BatchNorm1d(8)) # self.downsampler.add_module('TANH_1', nn.Tanh()) # self.downsampler.add_module('CONV_2', nn.Conv1d(8, 16, kernel_size=7, stride=2, padding=3)) # self.downsampler.add_module('BN_2', nn.BatchNorm1d(16)) # self.downsampler.add_module('TANH_2', nn.Tanh()) # self.downsampler.add_module('CONV_3', nn.Conv1d(16, 32, kernel_size=7, stride=2, padding=3)) # self.downsampler.add_module('BN_3', nn.BatchNorm1d(32)) # self.downsampler.add_module('TANH_3', nn.Tanh()) # self.downsampler.add_module('CONV_4', nn.Conv1d(32, 64, kernel_size=7, stride=2, padding=3)) # self.downsampler.add_module('BN_4', nn.BatchNorm1d(64)) # self.downsampler.add_module('TANH_4', nn.Tanh()) # self.upsampler = nn.Sequential() # self.upsampler.add_module( # 'CONVTRANS_1', nn.ConvTranspose1d(64, 32, kernel_size=7, stride=2, padding=3, output_padding=1)) # self.upsampler.add_module('BN_1', nn.BatchNorm1d(32)) # self.upsampler.add_module('TANH_1', nn.Tanh()) # self.upsampler.add_module( # 'CONVTRANS_2', nn.ConvTranspose1d(32, 16, kernel_size=7, stride=2, padding=3, output_padding=1)) # self.upsampler.add_module('BN_2', nn.BatchNorm1d(16)) # self.upsampler.add_module('TANH_2', nn.Tanh()) # self.upsampler.add_module( # 'CONVTRANS_3', nn.ConvTranspose1d(16, 8, kernel_size=7, stride=2, padding=3, output_padding=1)) # self.upsampler.add_module('BN_3', nn.BatchNorm1d(8)) # self.upsampler.add_module('TANH_3', nn.Tanh()) # self.upsampler.add_module( # 'CONVTRANS_4', nn.ConvTranspose1d(8,in_channels, kernel_size=7, stride=2, padding=3, output_padding=1)) # self.upsampler.add_module('BN_4', nn.BatchNorm1d(in_channels)) # self.upsampler.add_module('TANH_4', nn.Tanh()) # self.output_conv = nn.Conv1d(in_channels, 1, kernel_size=7, stride=1, padding=3) # def forward(self, x): # x = self.input_conv(x) # x = self.downsampler(x) # x = self.upsampler(x) # x = self.output_conv(x) # x = x.view(x.shape[0], -1) # return x class DeepClean(nn.Module): def __init__(self, in_channels): super().__init__() self.input_conv = nn.Sequential( nn.Conv1d(in_channels, in_channels, kernel_size=7, stride=1, padding=3), # nn.BatchNorm1d(in_channels), # nn.Tanh() ) self.downsampler = nn.Sequential() self.downsampler.add_module('CONV_1', nn.Conv1d(in_channels, 8, kernel_size=7, stride=2, padding=3)) # self.downsampler.add_module('BN_1', nn.BatchNorm1d(8)) # self.downsampler.add_module('TANH_1', nn.Tanh()) self.upsampler = nn.Sequential() self.upsampler.add_module( 'CONVTRANS_1', nn.ConvTranspose1d(8, in_channels, kernel_size=7, stride=2, padding=3, output_padding=1)) # self.upsampler.add_module('BN_1', nn.BatchNorm1d(in_channels)) # self.upsampler.add_module('TANH_1', nn.Tanh()) self.output_conv = nn.Conv1d(in_channels, 1, kernel_size=7, stride=1, padding=3) def forward(self, x): x = self.input_conv(x) x = self.downsampler(x) x = self.upsampler(x) x = self.output_conv(x) x = x.view(x.shape[0], -1) return x
45.786517
117
0.604908
544
4,075
4.3125
0.082721
0.11509
0.11509
0.153453
0.956948
0.930094
0.911765
0.803069
0.778346
0.725916
0
0.048177
0.246135
4,075
89
118
45.786517
0.715495
0.718282
0
0
0
0
0.015525
0
0
0
0
0
0
1
0.1
false
0
0.05
0
0.25
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
e65fbf90e6316ba92da1d713fa631aef56361bc6
98
py
Python
tests/test_importable.py
jack1142/quickpython
96ab4db027138db2c5babf41988f3782336b9135
[ "MIT" ]
115
2020-08-17T06:39:43.000Z
2022-01-24T16:09:53.000Z
tests/test_importable.py
jack1142/quickpython
96ab4db027138db2c5babf41988f3782336b9135
[ "MIT" ]
5
2020-11-21T10:42:02.000Z
2021-03-07T09:29:26.000Z
tests/test_importable.py
jack1142/quickpython
96ab4db027138db2c5babf41988f3782336b9135
[ "MIT" ]
5
2020-11-21T18:04:18.000Z
2021-03-06T17:49:45.000Z
"""A basic import test""" def test_can_import(): import quickpython assert quickpython
12.25
25
0.693878
12
98
5.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.214286
98
7
26
14
0.857143
0.193878
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.333333
true
0
0.666667
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
6
054bdc29009123da92f9bfe74ba407fbd13a0770
33
py
Python
app/component/__init__.py
Nathanlauga/football-python-flask-app
65e6ad31140514646342033dc5227be254fb998e
[ "MIT" ]
1
2021-01-02T07:16:53.000Z
2021-01-02T07:16:53.000Z
app/component/__init__.py
laelasbuch/football-python-flask-app
65e6ad31140514646342033dc5227be254fb998e
[ "MIT" ]
1
2021-06-02T00:40:37.000Z
2021-06-02T00:40:37.000Z
app/component/__init__.py
laelasbuch/football-python-flask-app
65e6ad31140514646342033dc5227be254fb998e
[ "MIT" ]
5
2019-11-16T09:21:30.000Z
2022-02-12T15:36:39.000Z
from .component import IndexForm
16.5
32
0.848485
4
33
7
1
0
0
0
0
0
0
0
0
0
0
0
0.121212
33
1
33
33
0.965517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
552945305d6141c9851dd8bc7647050a8db9b62e
89
py
Python
src/road_collisions_us/__init__.py
RobertLucey/road-collisions-us
8d1be0d4e3519dbd922721c0b751bd992871e41d
[ "Unlicense" ]
null
null
null
src/road_collisions_us/__init__.py
RobertLucey/road-collisions-us
8d1be0d4e3519dbd922721c0b751bd992871e41d
[ "Unlicense" ]
null
null
null
src/road_collisions_us/__init__.py
RobertLucey/road-collisions-us
8d1be0d4e3519dbd922721c0b751bd992871e41d
[ "Unlicense" ]
null
null
null
from road_collisions_us.download import ensure_data_downloaded ensure_data_downloaded()
22.25
62
0.898876
12
89
6.166667
0.75
0.27027
0.540541
0
0
0
0
0
0
0
0
0
0.067416
89
3
63
29.666667
0.891566
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
55344226189294de8d24b2ce036430db359401a4
21,597
py
Python
First Game.py
mdn117/First-Game
45e5948b4770226f64dbd847d25a6a207f12b8f9
[ "Apache-2.0" ]
null
null
null
First Game.py
mdn117/First-Game
45e5948b4770226f64dbd847d25a6a207f12b8f9
[ "Apache-2.0" ]
null
null
null
First Game.py
mdn117/First-Game
45e5948b4770226f64dbd847d25a6a207f12b8f9
[ "Apache-2.0" ]
null
null
null
#First Game: by Matthew Nicholson #Date last modified: 4/17/19 at 6:26 PM import pygame from math import floor import os pygame.init() screen_width = 1080 #width and height are standard resolution sizes for HD screen_height = 720 win = pygame.display.set_mode((screen_width, screen_height)) #sets the dimensions of the screen pygame.display.set_caption("First Game") bg = pygame.transform.scale((pygame.image.load('background.png')), (screen_width * 2, screen_height * 2)) #loads the background idle = pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-00.png')) clock = pygame.time.Clock() class player(object): def __init__(self, x, y, width, height): self.x = x #the players horizontal position self.y = y #the players vertical position self.width = width #the players horizontal size self.height = height #the players vertical size self.vel = 25 #the speed of the player when moving self.isJump = False #set to true if the player presses the jump button self.jumpCount = 10 self.left = False #set to true if player is moving left self.right = False #set to true if the player is moving right self.idle = True #set to false if the player moves or jumps or attacks self.didAttack = False #set to true if the player uses the attack button self.didJumpAndAttack = False #set to true if the player jumps then attacks self.attackDone = False #set to true if the attack animation finishes self.jumpAttackDone = False #set to true if the jump attack animation finishes self.walkCount = 0 self.idleCount = 0 self.jumpIter = 0 self.attackIter = 0 self.jumpAttackIter = 0 #from self.walkRight to self.leftAttack, #these are all of the sprite animations #for the player, each as a list that is #iterated through the main loop self.walkRight = [pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-00.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-01.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-02.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-03.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-04.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-05.png'))), (self.width, self.height))] self.walkLeft = [pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-00.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-01.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-02.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-03.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-04.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-run-05.png'))), True, False)), (self.width, self.height))] self.rightIdle = [pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-00.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-01.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-02.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-03.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-00.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-01.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-02.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-03.png'))), (self.width, self.height))] self.leftIdle = [pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-00.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-01.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-02.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-03.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-00.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-01.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-02.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-idle-2-03.png'))), True, False)), (self.width, self.height))] self.rightJump = [pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-00.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-01.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-02.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-02.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-03.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-03.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-00.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-00.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-01.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-01.png'))), (self.width, self.height))] self.leftJump = [pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-00.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-01.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-02.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-02.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-03.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-jump-03.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-00.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-00.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-01.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-fall-01.png'))), True, False)), (self.width, self.height))] self.rightAttack = [pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-02.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-03.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-04.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-05.png'))), (self.width, self.height))] self.leftAttack = [pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-02.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-03.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-04.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-attack2-05.png'))), True, False)), (self.width, self.height))] self.rightAirAttack = [pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-00.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-01.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-02.png'))), (self.width, self.height)), pygame.transform.scale((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-03.png'))), (self.width, self.height))] self.leftAirAttack = [pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-00.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-01.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-02.png'))), True, False)), (self.width, self.height)), pygame.transform.scale((pygame.transform.flip((pygame.image.load(os.path.join('Protagonist animation', 'adventurer-air-attack1-03.png'))), True, False)), (self.width, self.height))] def draw(self, win): if self.walkCount + 1 >= 24: self.walkCount = 0 if self.idleCount + 1 >= 64: self.idleCount = 0 if self.jumpIter + 1 >= 40: self.jumpIter = 0 if self.attackIter + 1 >= 8: self.attackDone = True self.attackIter = 0 self.idleCount = 40 self.walkCount = 0 if self.jumpAttackIter +1 >= 8: self.jumpAttackDone = True self.jumpAttackIter = 0 if not(self.idle): if self.left: if self.isJump: if self.didJumpAndAttack: if not(self.jumpAttackDone): win.blit(self.leftAirAttack[self.jumpAttackIter//2], (self.x,self.y)) self.jumpAttackIter += 1 else: win.blit(self.leftJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 else: win.blit(self.leftJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 else: if self.didAttack and not(self.attackDone): win.blit(self.leftAttack[self.attackIter//2], (self.x,self.y)) self.attackIter += 1 else: win.blit(self.walkLeft[self.walkCount//4], (self.x,self.y)) self.walkCount += 1 elif self.right: if self.isJump: if self.didJumpAndAttack: if not(self.jumpAttackDone): win.blit(self.rightAirAttack[self.jumpAttackIter//2], (self.x,self.y)) self.jumpAttackIter += 1 else: win.blit(self.rightJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 else: win.blit(self.rightJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 else: if self.didAttack and not(self.attackDone): win.blit(self.rightAttack[self.attackIter//2], (self.x,self.y)) self.attackIter += 1 else: win.blit(self.walkRight[self.walkCount//4], (self.x,self.y)) self.walkCount += 1 else: if self.didAttack and not(self.attackDone): if self.left: win.blit(self.leftAttack[self.attackIter//2], (self.x,self.y)) self.attackIter += 1 else: #self.right win.blit(self.rightAttack[self.attackIter//2], (self.x,self.y)) self.attackIter += 1 elif self.isJump: if self.left: if self.didJumpAndAttack: if not(self.jumpAttackDone): win.blit(self.leftAirAttack[self.jumpAttackIter//2], (self.x,self.y)) self.jumpAttackIter += 1 else: win.blit(self.leftJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 else: win.blit(self.leftJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 else: #self.right if self.didJumpAndAttack: if not(self.jumpAttackDone): win.blit(self.rightAirAttack[self.jumpAttackIter//2], (self.x,self.y)) self.jumpAttackIter += 1 else: win.blit(self.rightJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 else: win.blit(self.rightJump[self.jumpIter//4], (self.x,self.y)) self.jumpIter += 1 elif self.left: win.blit(self.leftIdle[self.idleCount//8], (self.x,self.y)) self.idleCount += 1 else: #self.right win.blit(self.rightIdle[self.idleCount//8], (self.x,self.y)) self.idleCount += 1 class enemy(object): def __init__(self, x, y, width, height): self.x = x self.y = y self.width = width self.height = height self.idle = pygame.transform.scale((pygame.image.load(os.path.join('Slime animation', 'slime-idle-0.png'))), (self.width, self.height)) def draw (self, win): win.blit(self.idle, (self.x,self.y)) def redrawGameWindow(): win.blit(bg,(0,floor(-((25/27) * screen_height)))) man.draw(win) slime.draw(win) pygame.display.update() #main loop man = player(((1/96) * screen_width), ((20/27) * screen_height), floor(((5/32) * screen_width)), floor(((37/180) * screen_height))) slime = enemy(1400, 875, 192, 150) run = True while run: clock.tick(60) for event in pygame.event.get(): if event.type == pygame.QUIT: run = False keys = pygame.key.get_pressed() if keys[pygame.K_LEFT] and man.x > man.vel: if man.didAttack and not(man.attackDone): man.walkCount = 0 else: man.x -= man.vel man.left = True man.right = False man.idle = False elif keys[pygame.K_RIGHT] and man.x < screen_width - man.width - man.vel: if man.didAttack and not(man.attackDone): man.walkCount = 0 else: man.x += man.vel man.right = True man.left = False man.idle = False else: man.idle = True man.walkCount = 0 if not(man.isJump): if keys[pygame.K_UP]: man.isJump = True else: if not(man.didJumpAndAttack): if keys[pygame.K_SPACE] and keys[pygame.K_LEFT] and man.x > man.vel: man.left = True man.right = False man.didJumpAndAttack = True man.jumpAttackDone = False elif keys[pygame.K_SPACE] and keys[pygame.K_RIGHT] and man.x < screen_width - man.width - man.vel: man.right = True man.left = False man.didJumpAndAttack = True man.jumpAttackDone = False elif keys[pygame.K_SPACE] and (not(keys[pygame.K_LEFT]) or not(keys[pygame.K_RIGHT])): man.didJumpAndAttack = True man.jumpAttackDone = False else: if man.jumpAttackDone: man.didJumpAndAttack = False man.didAttack = False else: man.didAttack = False if man.jumpCount >= -10: neg = 1 if man.jumpCount < 0: neg = -1 man.y -= (man.jumpCount ** 2) * 0.5 * neg man.jumpCount -= 1 else: man.isJump = False man.didJumpAndAttack = False man.jumpAttackDone = True man.jumpCount = 10 if not(man.didAttack): if keys[pygame.K_SPACE]: man.didAttack = True man.attackDone = False else: if man.attackDone: man.didAttack = False redrawGameWindow() pygame.quit()
70.348534
212
0.584989
2,514
21,597
5.011535
0.07319
0.116676
0.079768
0.136201
0.814192
0.803476
0.793793
0.775935
0.765616
0.747282
0
0.018452
0.26976
21,597
306
213
70.578431
0.78042
0.040283
0
0.501832
0
0
0.143859
0.074234
0
0
0
0
0
1
0.018315
false
0
0.010989
0
0.03663
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
5575a65a974c2d9197bc107c3b92dc2f9873f84d
65
py
Python
nhlscraperpy/scrapers/game.py
mvais/nhlscraperpy
5f7b72ea165f258ed19fcdc597a2ba8047dcd47e
[ "MIT" ]
null
null
null
nhlscraperpy/scrapers/game.py
mvais/nhlscraperpy
5f7b72ea165f258ed19fcdc597a2ba8047dcd47e
[ "MIT" ]
null
null
null
nhlscraperpy/scrapers/game.py
mvais/nhlscraperpy
5f7b72ea165f258ed19fcdc597a2ba8047dcd47e
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup def scrape_game(id): return None
16.25
29
0.8
10
65
5.1
1
0
0
0
0
0
0
0
0
0
0
0.018182
0.153846
65
4
30
16.25
0.909091
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
1
0
0
6
5583a70dcea9c24cc1d070111ee28211ea175b96
43
py
Python
xdl/platforms/modular_wheel/__init__.py
mcrav/xdl
c120a1cf50a9b668a79b118700930eb3d60a9298
[ "MIT" ]
null
null
null
xdl/platforms/modular_wheel/__init__.py
mcrav/xdl
c120a1cf50a9b668a79b118700930eb3d60a9298
[ "MIT" ]
null
null
null
xdl/platforms/modular_wheel/__init__.py
mcrav/xdl
c120a1cf50a9b668a79b118700930eb3d60a9298
[ "MIT" ]
null
null
null
from .platform import ModularWheelPlatform
21.5
42
0.883721
4
43
9.5
1
0
0
0
0
0
0
0
0
0
0
0
0.093023
43
1
43
43
0.974359
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
559dbe3d5cc1dd349b159bebb757f512a4cd056a
92
py
Python
CodeWars/7 Kyu/Slope of a Line.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Slope of a Line.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Slope of a Line.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
def getSlope(p1, p2): return None if p1[0] == p2[0] else (p2[1] - p1[1])/(p2[0] - p1[0])
46
70
0.532609
20
92
2.45
0.5
0.122449
0
0
0
0
0
0
0
0
0
0.189189
0.195652
92
2
70
46
0.472973
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
e9ceb1d9e15f1d0ff4185aaa98e0bac31612ebe5
146
py
Python
accounts/models.py
powerticket/heroku
d214a3758efbf185e4a533f8373033ed558209dd
[ "MIT" ]
null
null
null
accounts/models.py
powerticket/heroku
d214a3758efbf185e4a533f8373033ed558209dd
[ "MIT" ]
4
2020-10-20T15:13:32.000Z
2021-02-24T09:04:49.000Z
accounts/models.py
powerticket/heroku
d214a3758efbf185e4a533f8373033ed558209dd
[ "MIT" ]
null
null
null
from django.contrib.auth.models import AbstractUser from django.db import models # Create your models here. class MyUser(AbstractUser): pass
20.857143
51
0.794521
20
146
5.8
0.7
0.172414
0
0
0
0
0
0
0
0
0
0
0.143836
146
7
52
20.857143
0.928
0.164384
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
6
7567fdb6856974e52c74a8d1b6ba40150d784fdd
74,405
py
Python
venv/Model/ReportModule.py
florianbeyer/maptor
8fd899dd3123484fd83b7aa74a007edc8879dba6
[ "MIT" ]
1
2022-03-15T13:35:26.000Z
2022-03-15T13:35:26.000Z
venv/Model/ReportModule.py
florianbeyer/maptor
8fd899dd3123484fd83b7aa74a007edc8879dba6
[ "MIT" ]
9
2021-01-30T16:55:50.000Z
2022-03-12T00:54:37.000Z
venv/Model/ReportModule.py
florianbeyer/maptor
8fd899dd3123484fd83b7aa74a007edc8879dba6
[ "MIT" ]
1
2020-12-21T02:24:46.000Z
2020-12-21T02:24:46.000Z
try: import sys,logging from reportlab.pdfgen import canvas from reportlab.platypus import Table,TableStyle from reportlab.lib import colors from reportlab.lib.pagesizes import A4 from reportlab.graphics import renderPDF from svglib.svglib import svg2rlg from io import BytesIO from datetime import date import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import numpy as np from reportlab.platypus.tables import Table import seaborn as sns import os import pandas as pd from sklearn.cross_decomposition import PLSRegression from sklearn.metrics import mean_squared_error, r2_score from sklearn.model_selection import cross_val_predict from sklearn import preprocessing # sys.path.append(r"F:\Work\Maptor\venv\HelpingModel") from PLSR_SSS_Helper import PLSR_SSS_Helper from RFHelper import RFHelper from osgeo import gdal, ogr, gdal_array # I/O image data import numpy as np # math and array handling import matplotlib.pyplot as plt # plot figures import pandas as pd # handling large data as table sheets from joblib import dump, load from operator import itemgetter from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_squared_error, r2_score from sklearn.model_selection import cross_val_predict except Exception as e: print('Can not import files:' + str(e)) input("Press Enter to exit!") sys.exit(0) class ReportModule(): def build_doc(self,path,mode): try: doc = canvas.Canvas(path) doc.setLineWidth(.3) doc.setFont('Helvetica-Bold', 16) doc.drawString(30, 810, mode) doc.setFont('Helvetica', 12) doc.drawString(30, 793, 'Software Maptor v1.4') doc.drawString(30, 779, "Developer: Florian Beyer & Qasim Usmani") doc.drawString(30, 765, 'Support: florian.beyer@uni-rostock.de') today = date.today() doc.drawString(30, 751, "Date: " + str(today)) doc.drawString(30, 737, '') doc.line(20, 735, 570, 735) return doc except ValueError as e: logging.error("Exception occurred", exc_info=True) print(e) def Clf_prepare_report(self,doc,img,roi,importance,table_M,trees,ob_score,class_prediction,ValidationData,attribute,dir_path): try: os.mkdir(dir_path+"/Graphs") path = dir_path + "/Graphs/" fig = plt.figure(figsize=(6, 6)) plt.subplot(221) plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) plt.title('RS Image - first band') plt.subplot(222) plt.imshow(class_prediction, cmap=plt.cm.Spectral) plt.title('Classification result') plt.subplot(223) plt.imshow(roi, cmap=plt.cm.Spectral) plt.title('Training Data') plt.subplot(224) plt.imshow(ValidationData, cmap=plt.cm.Spectral) plt.title('Validation Data') imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 30, 210) fig.clf() plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) plt.title('RS Image - first band') plt.savefig(path + "'RS_Image.png", dpi=300) plt.clf() plt.imshow(class_prediction, cmap=plt.cm.Spectral) plt.title('Classification result') plt.savefig(path + "Classification_result.png", dpi=300) plt.clf() plt.imshow(roi, cmap=plt.cm.Spectral) plt.title('Training Data') plt.savefig(path + "Training_Data.png", dpi=300) plt.clf() plt.imshow(ValidationData, cmap=plt.cm.Spectral) plt.title('Validation Data') plt.savefig(path + "Validation_Data.png", dpi=300) plt.clf() doc.showPage() # doc.line(20, 810, 570, 810) # doc.setLineWidth(.3) # doc.setFont('Helvetica-Bold', 14) # doc.drawString(30, 790, 'Section 1: General Information and Training') # doc.drawString(30, 770, "Section 2: Validation") # doc.line(20, 750, 570, 750) n_samples = (roi > 0).sum() # doc.drawString(30, 730, "Section :1") doc.setFont('Helvetica', 12) doc.drawString(30, 710, 'Image Extent: ' + str(img.shape[0]) + " x " + str(img.shape[1])) doc.drawString(30, 690, 'Number of Bands: ' + str(len(importance))) doc.drawString(30, 670, 'Field Name (shape file) of your classes: ' + attribute) doc.drawString(30, 650, 'Random Forest Training: ') doc.drawString(30, 630, 'Number of Trees: ' + str(trees)) doc.drawString(30, 610, 'Number of training Pixel: ' + str(n_samples)) # What are our classification labels? labels = np.unique(roi[roi > 0]) # print('Number of classes :'+ labels.size) doc.drawString(30, 590, 'Number of classes :' + str(labels.size)) doc.drawString(30, 570, 'Out-Of-Bag prediction of accuracy: ' + str(ob_score)) # doc.showPage() X = img[roi > 0, :] y = roi[roi > 0] data = ["Band","Importance"] data= [(k, v) for k, v in importance.items()] data2 = data[:] # dummy = [['00', '01'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['00', '01'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['00', '01'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['00', '01'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['20', '21'], # ['10', '11'], # ['20', '21'], # ['30', '31'], # ['20', '21'], # ['20', '21'], # ['20', '21']] # # data.extend(dummy) data2.sort(key=lambda x: x[1], reverse=True) data.insert(0, ("Band", "Importance")) data2.insert(0, ("Band", "Importance")) fig = plt.figure(figsize=(6, 6)) sns.heatmap(table_M, annot=True, cmap="BuPu", fmt='g') #plt.show() imgdata = BytesIO() fig.savefig(path+"pred_acc_training.png") fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) doc.setFont('Helvetica-Bold', 14) doc.drawString(30,520,"Convolution matrix (prediction accuracy of the training data):") renderPDF.draw(drawing, doc, 30, 30) doc.showPage() doc.drawString(30, 700, "Band importance (left: ordered by band number | right: ordered by importance):") if (len(data) > 21): chunks = (self.chunks(data, 20)) ordered_chunks = (self.chunks(data2, 20)) iterationNumer = 0 for unorder, ordered in zip(chunks, ordered_chunks): if iterationNumer != 0: unorder.insert(0, ("Band", "Importance")) ordered.insert(0, ("Band", "Importance")) unordered_table = Table(unorder) ordered_table = Table(ordered) unordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) ordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) unordered_table.wrapOn(doc, 60, 200) unordered_table.drawOn(doc, 60, 200) ordered_table.wrapOn(doc, 280, 200) ordered_table.drawOn(doc, 280, 200) # else: # unordered_table.wrapOn(doc, 60, 400) # unordered_table.drawOn(doc, 60, 400) # # ordered_table.wrapOn(doc, 280, 400) # ordered_table.drawOn(doc, 280, 400) columns = [""] ordered_table = Table(columns) unordered_table = Table(columns) doc.showPage() iterationNumer += 1 else: table = Table(data) table2 = Table(data2) table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table2.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table.wrapOn(doc, 60, 400) table.drawOn(doc, 60, 400) table2.wrapOn(doc, 280, 400) table2.drawOn(doc, 280, 400) doc.showPage() #print(trees) #print(table) #print(importance) return doc except ValueError as e: logging.error("Exception occurred", exc_info=True) print(e) def Clf_prepare_section3(self,doc,X_v,y_v,convolution_mat,df_sum_mat,score,roi_v,model_path,Image_savePath,dir_path): try: #print(Image_savePath+"here.................!!") dir_path +="/Graphs/" n_samples = (roi_v > 0).sum() #print("Number of validation Pixels: "+ str(n_samples)) doc.setFont('Helvetica-Bold', 12) doc.drawString(30, 780, "Number of validation Pixels: "+ str(n_samples)) doc.setFont('Helvetica-Bold', 12) #print(score) doc.drawString(30, 760, str(score)) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 720, "Convolution matrix (prediction accuracy of the validation data") convolution_mat.index = convolution_mat.index.rename('truth') convolution_mat.columns = convolution_mat.columns.rename('predict') del convolution_mat['All'] convolution_mat = convolution_mat.drop('All', axis=0) fig = plt.figure(figsize=(6, 5)) sns.heatmap(convolution_mat, annot=True, cmap="BuPu", fmt='g') # plt.show() imgdata = BytesIO() fig.savefig(dir_path + "pred_acc_validation.png") fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 40, 300) fig.clf() df_sum_mat = df_sum_mat.round(3) accuracy = df_sum_mat.iloc[-3:] df_sum_mat = df_sum_mat.head(-3) r, c = df_sum_mat.shape seq = list(range(1, r+1)) df_sum_mat.insert(0,"band",seq) data = np.array(df_sum_mat).tolist() data.insert(0,("class","precision","recall","f1-score","support")) t1 = Table(data) t1.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) doc.showPage() doc.drawString(30, 760,"Precision, recall, F-measure and support for each class:") t1.wrapOn(doc, 30, 500) t1.drawOn(doc, 90, 500) # acc_col_name = ['accuracy','macro avg','weighted avg'] # accuracy.insert(0,".",acc_col_name) # acc_data = np.array(accuracy).tolist() # t2 = Table(acc_data) # # t2.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), # ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) # t2.wrapOn(doc, 30, 100) # t2.drawOn(doc, 330, 100) doc.setFont('Helvetica', 8) doc.drawString(20, 370, "Image Saved to Path: "+Image_savePath) # if model_path!="/": # doc.drawString(30, 20, "Model Saved to Path: Model not Save") # else: doc.drawString(20, 350, "Model Saved to Path:"+ model_path) return doc except ValueError as e: logging.error("Exception occurred", exc_info=True) print(e) def make_rf_reg_report(self,doc,img,RFHelper,dir_path): # Display images try: os.mkdir(dir_path + "/Graphs") path = dir_path + "/Graphs/" width, height = A4 print("here........."+RFHelper.reportpath) print(RFHelper.prediction_map) print(RFHelper.modelsavepath) print(RFHelper.img_path) print(RFHelper.train_data) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 700,"DIRECTORIES:") doc.setFont('Helvetica', 7) doc.drawString(30, 680, "Remote Sensing Image: " + RFHelper.img_path) doc.drawString(30, 660, "Shape file: " + RFHelper.train_data) doc.drawString(30, 640, "Report Save Path: "+ RFHelper.reportpath) doc.drawString(30, 620, "Regression image saved to: " +RFHelper.prediction_map) if RFHelper.modelsavepath !='/': doc.drawString(30, 600, "Model saved to: "+RFHelper.modelsavepath) else: doc.drawString(30, 600, "Model saved to: Model not saved") doc.line(20, 580, 570, 580) if img.shape[0] > img.shape[1]: fig = plt.figure(figsize=(5, 4)) plt.subplot(121) print(img.shape) plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) roi_positions = np.where(RFHelper.training > 0) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('first RS band and sample points', fontsize=8) plt.title('RS image - first band') imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 160) fig.clf() plt.close(fig) fig = plt.figure(figsize=(5, 4)) plt.imshow(RFHelper.prediction, cmap=plt.cm.Spectral) plt.title('Prediction') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 400, 160) fig.clf() plt.close(fig) doc.showPage() if img.shape[0]<= img.shape[1]: fig = plt.figure(figsize=(5, 4)) plt.subplot(121) print(img.shape) plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) roi_positions = np.where(RFHelper.training > 0) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('first RS band and sample points', fontsize=8) imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 360) # else: # renderPDF.draw(drawing, doc, 50, 250) fig.clf() plt.close(fig) fig = plt.figure(figsize=(5, 4)) plt.imshow(RFHelper.prediction, cmap=plt.cm.Spectral) plt.title('Prediction') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 70, 60) fig.clf() plt.close(fig) doc.showPage() plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) roi_positions = np.where(RFHelper.training > 0) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('first RS band and sample points', fontsize=8) plt.savefig(path + "RS image-first_band.png", dpi=300) plt.clf() # plt.imshow(RFHelper.training, cmap=plt.cm.Spectral) # data = roi && cmap = plt.cm.Spectral # plt.title('Training Image') # plt.savefig(path + "Training_Image.png", dpi=300) # plt.clf() plt.imshow(RFHelper.prediction, cmap=plt.cm.Spectral) plt.title('Prediction') plt.savefig(path + "Prediction.png", dpi=300) plt.clf() # doc.line(20,800, 570, 800) # doc.setLineWidth(.3) # doc.setFont('Helvetica-Bold', 14) # doc.drawString(30, 780, 'Section 1: General Information and Training') # doc.drawString(30, 765, "Section 2: Validation") # doc.line(20, 750, 570, 750) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 730, 'Section 1:') doc.setFont('Helvetica', 14) doc.drawString(30, 710,"Image extent: "+RFHelper.helper.imageExtent + "(Rows x Columns)") doc.drawString(30, 690, "Number of Bands: "+ str(RFHelper.helper.BandNumber)) doc.drawString(30, 670, "Field name (shape file) of your classes: "+RFHelper.helper.FieldName) doc.setFont('Helvetica', 14) doc.drawString(30,650," Random Forrest Training") doc.setFont('Helvetica', 14) doc.drawString(30, 630, " Number of Tress: "+ str(RFHelper.helper.TreesNo)) doc.drawString(30, 610, " Number of samples: "+ str(RFHelper.helper.SampleNo)) doc.drawString(30, 590, " Split size for Test: "+str(RFHelper.helper.SplitSize)) doc.drawString(30, 570, " Training samples: "+str(RFHelper.helper.TrainingSample)) doc.drawString(30, 550, " Test sample: "+str(RFHelper.helper.TestSample)) doc.drawString(30, 530, "Co efficient of determination R^2 of the prediction : "+RFHelper.helper.Coeff) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 510, "left: ordered by band number| right: ordered by importance ") data = ["Band", "Importance"] data = [(k, v) for k, v in RFHelper.helper.BandImportance.items()] # dummy = [('Band',1.33),('Band',5),('Band',4),('Band',2),('Band',6),('Band',8),('Band',43),('Band',3),('Band',113),('Band',233),('Band',13),('Band',133)] # data.extend(dummy) data2 = data[:] data2.sort(key=lambda x: x[1], reverse=True) data.insert(0, ("Band", "Importance")) data2.insert(0, ("Band", "Importance")) datalen = len(data) print((datalen)) if(len(data)>21): chunks = (self.chunks(data,20)) ordered_chunks = (self.chunks(data2, 20)) iterationNumer = 0 for unorder,ordered in zip(chunks,ordered_chunks): if iterationNumer != 0: unorder.insert(0, ("Band", "Importance")) ordered.insert(0, ("Band", "Importance")) unordered_table = Table(unorder) ordered_table = Table(ordered) unordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) ordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) if iterationNumer == 0: unordered_table.wrapOn(doc, 60, 100) unordered_table.drawOn(doc, 60, 100) ordered_table.wrapOn(doc, 280, 100) ordered_table.drawOn(doc,280, 100) else: unordered_table.wrapOn(doc, 60, 400) unordered_table.drawOn(doc, 60, 400) ordered_table.wrapOn(doc, 280, 400) ordered_table.drawOn(doc, 280, 400) columns = [""] ordered_table = Table(columns) unordered_table = Table(columns) doc.showPage() iterationNumer += 1 else: table = Table(data) table2 = Table(data2) table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table2.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table.wrapOn(doc, 0,0) table.drawOn(doc, 60, 100) table2.wrapOn(doc, 60, 100) table2.drawOn(doc, 280, 100) doc.showPage() doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 790, 'Section 2:') doc.setFont('Helvetica', 14) doc.drawString(30, 770, "n of the data: " + str(RFHelper.helper.n_testdata)) doc.drawString(30, 750, "Mean of the Variable : " + str(RFHelper.helper.meanvariable)) doc.drawString(30, 730, "Standard Deviation of the Variable: " + str(round(RFHelper.helper.stdDev,2))) doc.drawString(30, 710, "----------------------------------------") doc.setFont('Helvetica', 14) doc.drawString(30, 670, " Mean Absolute Error : " + str(round(RFHelper.helper.absError,2))) doc.drawString(30, 650, " Mean Squared Error:" + str(round(RFHelper.helper.meanSqError,2))) doc.drawString(30, 630, " RMSE:" + str(round(RFHelper.helper.RMSE,2))) x = str(round(RFHelper.helper.MAPE,2)) doc.drawString(30, 600, " Mean absoulute percentage error(MAPE)/ Accuracy :" + x + " %") doc.drawString(30, 560, "----------------------------------------") doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 540, "Co efficient of determination R^2 of the prediction : " + str(round(RFHelper.helper.coeffR,2))) fig, ax = plt.subplots() ax.scatter(RFHelper.helper.testlabels, RFHelper.helper.pred_test_ds) ax.plot([RFHelper.helper.testlabels.min(), RFHelper.helper.testlabels.max()], [RFHelper.helper.testlabels.min(), RFHelper.helper.testlabels.max()], 'k--', lw=1) ax.set_xlabel('Measured') ax.set_ylabel('Predicted') imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) plt.savefig(path + "r2_Prediction.png", dpi=300) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 30, 110) fig.clf() plt.close(fig) return doc except ValueError as e: logging.error("Exception occurred", exc_info=True) print(e) def make_plsr_sss_report(self, doc, img, dir_path, PLSR_SSS_Helper): # self, doc, img, TrainingData, X, mse, msemin, component, y, y_c, y_cv, attribute, importance, prediction, dir_path, reportpath, prediction_map, modelsavepath, img_path, trn_path try: # reportparameters = PLSR_SSS_Helper() # reportparameters = helpermodel print(PLSR_SSS_Helper) print(type(PLSR_SSS_Helper)) os.mkdir(dir_path + "/Graphs") path = dir_path + "/Graphs/" width, height = A4 doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 705, "DIRECTORIES:") doc.setFont('Helvetica', 10) doc.drawString(30, 680, "Remote Sensing Image: " + str(PLSR_SSS_Helper.img_path)) doc.drawString(30, 660, "Shape file: " + str(PLSR_SSS_Helper.tran_path)) doc.drawString(30, 640, "Report Save Path: " + str(PLSR_SSS_Helper.reportpath)) doc.drawString(30, 620, "Regression image saved to: " + str(PLSR_SSS_Helper.prediction_map)) # if modelsavepath != '/': doc.drawString(30, 600, "Model saved to: " + str(PLSR_SSS_Helper.modelsavepath)) # else: # doc.drawString(30, 600, "Model saved to: Model not saved") doc.line(20, 580, 570, 580) mask = np.copy(img[:, :, 0]) mask[mask > 0.0] = 1.0 # all actual pixels have a value of 1.0 # plt.imshow(mask) prediction_ = PLSR_SSS_Helper.prediction * mask if img.shape[0] > img.shape[1]: fig = plt.figure(figsize=(5, 4)) plt.subplot(121) plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) roi_positions = np.where(PLSR_SSS_Helper.train_data > 0) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('first RS band and sample points', fontsize=8) plt.subplot(122) plt.imshow(prediction_, cmap=plt.cm.Spectral, vmin=PLSR_SSS_Helper.y.min(), vmax=PLSR_SSS_Helper.y.max()) plt.title('Prediction: ' + PLSR_SSS_Helper.attribute, fontsize=8) plt.colorbar() imgdata = BytesIO() plt.savefig(path + "RS image-first_band.png", dpi=300) fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 160) fig.clf() plt.close(fig) doc.showPage() if img.shape[0] <= img.shape[1]: fig = plt.figure(figsize=(5, 4)) plt.subplot(121) plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) roi_positions = np.where(PLSR_SSS_Helper.train_data > 0) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('first RS band and sample points') plt.subplot(122) plt.imshow(prediction_, cmap=plt.cm.Spectral, vmin=PLSR_SSS_Helper.y.min(), vmax=PLSR_SSS_Helper.y.max()) plt.title('Prediction') plt.colorbar() imgdata = BytesIO() plt.savefig(path + "RS image-first_band.png", dpi=300) fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 100, 160) fig.clf() plt.close(fig) doc.showPage() n_samples = (PLSR_SSS_Helper.train_data > 0).sum() # doc.drawString(30, 720, 'We have {n} training samples'.format(n=n_samples)) # Subset the image dataset with the training image = X # Mask the classes on the training dataset = y # These will have n_samples rows features = pd.DataFrame(PLSR_SSS_Helper.X) band_names = [] for i in range(PLSR_SSS_Helper.X.shape[1]): # for i in range(0,2500): nband = "Band_" + str(i + 1) band_names.append(nband) features.columns = band_names print(features.shape) doc.line(20, 810, 570, 810) doc.setLineWidth(.3) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 785, 'Section : General Information and Training') doc.line(20, 770, 570, 770) doc.setFont('Helvetica', 10) doc.drawString(30, 700, 'The Image Extend: ' + str(img.shape[0]) + " x " + str(img.shape[1]) + " (Rows x Columns)") doc.drawString(30, 680, 'The number of bands is: ' + str(features.shape[1])) # doc.drawString(30, 680,'The shape of our features is: '+str(features.shape)) doc.drawString(30, 660, 'Selected Attribute: ' + str(PLSR_SSS_Helper.attribute)) doc.drawString(30, 640, 'The number of Sample is: ' + str(features.shape[0])) doc.drawString(30, 620, '---------------------------------------------------------') # features['value'] = PLSR_SSS_Helper.y features.head() # Labels are the values we want to predict labels = np.array(features['value']) # Remove the labels from the features # axis 1 refers to the columns features = features.drop('value', axis=1) # Saving feature names for later use feature_list = list(features.columns) # Convert to numpy array features = np.array(features) # doc.drawString(30, 620, 'Training Features Shape: ' + str(features.shape)) # doc.drawString(30, 600, 'Training Labels Shape: ' + str(labels.shape)) # return [doc, labels, features] # # doc.showPage() suggested_comp = PLSR_SSS_Helper.msemin + 1 print("Suggested number of components: ", suggested_comp) doc.drawString(30, 560, "Selected number of PLS components: " + str(suggested_comp)) fig = plt.figure(figsize=(5, 4)) with plt.style.context(('ggplot')): plt.plot(PLSR_SSS_Helper.component, np.array(PLSR_SSS_Helper.mse), '-v', color='blue', mfc='blue') plt.plot(PLSR_SSS_Helper.component[PLSR_SSS_Helper.msemin], np.array(PLSR_SSS_Helper.mse)[PLSR_SSS_Helper.msemin], 'P', ms=10, mfc='red') plt.xlabel('Number of PLS components') plt.ylabel('MSE') plt.title('PLSR MSE vs. Components') plt.xlim(left=-1) plt.savefig(path + "PLSR MSE vs. Components.png", dpi=300) # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 150) fig.clf() plt.close(fig) doc.showPage() score_c = r2_score(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y_c) score_cv = r2_score(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y_cv) # Calculate mean squared error for calibration and cross validation mse_c = mean_squared_error(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y_c) mse_cv = mean_squared_error(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y_cv) # print("2 HERE!!!!!! mse_cv"+str(mse_cv)) print('R2 calib: %5.3f' % score_c) doc.drawString(30, 730, 'R2 of the training: %5.3f' % score_c) print('R2 LOOCV: %5.3f' % score_cv) doc.drawString(30, 710, 'R2 LOOCV: %5.3f' % score_cv) print('MSE calib: %5.3f' % mse_c) doc.drawString(30, 690, 'MSE of the training: %5.3f' % mse_c) print('MSE LOOCV: %5.3f' % mse_cv) doc.drawString(30, 670, 'MSE LOOCV: %5.3f' % mse_cv) imp = {} for i in range(features.shape[1]): print('Band {}: {}'.format(i + 1, round(PLSR_SSS_Helper.importance[i], 2))) imp['Band{}'.format(i + 1)] = round(PLSR_SSS_Helper.importance[i], 2) data = [(k, v) for k, v in imp.items()] # dummy = [('Band',1.33),('Band',5),('Band',4),('Band',2),('Band',6),('Band',8),('Band',43),('Band',3),('Band',113),('Band',233),('Band',13),('Band',133)] # data.extend(dummy) data2 = data[:] data2.sort(key=lambda x: x[1], reverse=True) data.insert(0, ("Band", "Importance")) data2.insert(0, ("Band", "Importance")) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 510, "Band importance (left: ordered by band number | right: ordered by importance):") doc.setFont('Helvetica', 10) if (len(data) > 21): chunks = (self.chunks(data, 20)) ordered_chunks = (self.chunks(data2, 20)) iterationNumer = 0 for unorder, ordered in zip(chunks, ordered_chunks): if iterationNumer != 0: unorder.insert(0, ("Band", "Importance")) ordered.insert(0, ("Band", "Importance")) unordered_table = Table(unorder) ordered_table = Table(ordered) unordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) ordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) if iterationNumer == 0: unordered_table.wrapOn(doc, 60, 100) unordered_table.drawOn(doc, 60, 100) ordered_table.wrapOn(doc, 280, 100) ordered_table.drawOn(doc, 280, 100) else: unordered_table.wrapOn(doc, 60, 400) unordered_table.drawOn(doc, 60, 400) ordered_table.wrapOn(doc, 280, 400) ordered_table.drawOn(doc, 280, 400) columns = [""] ordered_table = Table(columns) unordered_table = Table(columns) doc.showPage() iterationNumer += 1 else: table = Table(data) table2 = Table(data2) table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table2.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table.wrapOn(doc, 0, 0) table.drawOn(doc, 60, 100) table2.wrapOn(doc, 60, 100) table2.drawOn(doc, 280, 100) doc.showPage() doc.line(20, 810, 570, 810) doc.setLineWidth(.3) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 785, 'Section : Validation') doc.line(20, 770, 570, 770) z = np.polyfit(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y_c, 1) with plt.style.context(('ggplot')): fig, ax = plt.subplots(figsize=(5, 5)) ax.scatter(PLSR_SSS_Helper.y_c, PLSR_SSS_Helper.y, c='red', edgecolors='k') # Plot the best fit line ax.plot(np.polyval(z, PLSR_SSS_Helper.y), PLSR_SSS_Helper.y, c='blue', linewidth=1) # Plot the ideal 1:1 line ax.plot(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y, color='green', linewidth=1) plt.title('$R^{2}$ (CV): ' + str(score_cv)) plt.xlabel('Predicted') plt.ylabel('Measured') plt.legend(['best fit line', 'ideal 1:1 line', 'samples']) imgdata = BytesIO() plt.savefig(path + "R2CV", dpi=300) fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 300) fig.clf() plt.close(fig) # In[16]: # Calculate the absolute errors errors = abs(PLSR_SSS_Helper.y - PLSR_SSS_Helper.y_cv) # Print out the mean absolute error (mae) # Print out the mean absolute error (mae) doc.setFont('Helvetica', 10) doc.drawString(30, 270, '----------------------------') print('-------------') print('n of the test data: {}'.format(len(labels))) doc.drawString(30, 250, 'n of the test data: ' + str((len(labels)))) print('Mean of the variable: {:.2f}'.format(np.mean(labels))) doc.drawString(30, 230, 'Mean of the Samples: ' + str(round((np.mean(labels)), 2))) print('Standard deviation of the variable: {:.2f}'.format(np.std(labels))) doc.drawString(30, 210, 'Standard deviation of the Samples: ' + str(round(np.std(labels), 2))) print('-------------') doc.drawString(30, 190, '----------------------------') print('Mean Absolute Error: {:.2f}'.format(np.mean(errors))) doc.drawString(30, 170, 'MAE: ' + str(round(np.mean(errors), 2))) print('Mean squared error: {:.2f}'.format(mse_cv)) doc.drawString(30, 150, 'MSE: ' + str(round(mse_cv, 2))) print('RMSE: {:.2f}'.format(np.sqrt(mse_cv))) doc.drawString(30, 130, 'RMSE: ' + str(round(np.sqrt(mse_cv), 2))) RPD = np.std(labels) / np.sqrt(mse_cv) print('RPD: {:.2f} | How often does RMSE of Prediction fit in the Standard Deviation of the samples'.format( RPD)) doc.drawString(30, 110, 'RPD: ' + str( round(RPD, 2)) + "| How often does RMSE of Prediction fit in the Standard Deviation of the samples") mape = 100 * (errors / labels) # Calculate and display accuracy accuracy = 100 - np.mean(mape) print('mean absolute percentage error (MAPE): {:.2f} %'.format(np.mean(mape))) doc.drawString(30, 90, 'Mean Absolute Percentage Error (MAPE): ' + str(round(np.mean(mape), 2)) + " %") print('accuracy (100 % - mape): {:.2f} %'.format(accuracy)) doc.drawString(30, 70, 'Accuracy (100 % - MAPE): ' + str(round(accuracy, 2)) + " %") print('-------------') doc.drawString(30, 50, '----------------------------') # The coefficient of determination: 1 is perfect prediction print('Coefficient of determination r²: {:.2f}'.format(r2_score(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y_cv))) doc.drawString(30, 30, 'Coefficient of determination r²: ' + str(round(r2_score(PLSR_SSS_Helper.y, PLSR_SSS_Helper.y_cv), 2))) # return doc except ValueError as e: logging.error("Exception occurred", exc_info=True) print(e) def make_plsr_lds_report(self,doc,dir_path,PLSR_LDS_Helper): os.mkdir(dir_path+"/Graphs") path = dir_path +"/Graphs/" doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 705, "DIRECTORIES:") doc.setFont('Helvetica', 10) doc.drawString(30, 680, "Remote Sensing Image: " + str(PLSR_LDS_Helper.img_path)) doc.drawString(30, 660, "Shape file: " + str(PLSR_LDS_Helper.tran_path)) doc.drawString(30, 640, "Report Save Path: " + str(PLSR_LDS_Helper.reportpath)) doc.drawString(30, 620, "Regression image saved to: " + str(PLSR_LDS_Helper.prediction_map)) # if modelsavepath != '/': doc.drawString(30, 600, "Model saved to: " + str(PLSR_LDS_Helper.modelsavepath)) doc.line(20, 580, 570, 580) mask = np.copy(PLSR_LDS_Helper.img[:, :, 0]) mask[mask > 0.0] = 1.0 # all actual pixels have a value of 1.0 prediction_ = PLSR_LDS_Helper.prediction * mask if PLSR_LDS_Helper.img.shape[0] > PLSR_LDS_Helper.img.shape[1]: fig = plt.figure(figsize=(5, 4)) plt.subplot(121) print(PLSR_LDS_Helper.img.shape) plt.imshow(PLSR_LDS_Helper.img[:, :, 0], cmap=plt.cm.Greys_r) roi_positions = np.where(PLSR_LDS_Helper.train_data > 0) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('RS image - first band') # plt.subplot(122) # plt.imshow(PLSR_LDS_Helper.train_data, cmap=plt.cm.Spectral) # data = roi && cmap = plt.cm.Spectral # plt.title('Training Image') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 160) # else: # renderPDF.draw(drawing, doc, 50, 250) fig.clf() plt.close(fig) fig = plt.figure(figsize=(5, 4)) plt.imshow(PLSR_LDS_Helper.prediction, cmap=plt.cm.Spectral) plt.colorbar() plt.title('Prediction') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 400, 160) fig.clf() plt.close(fig) doc.showPage() if PLSR_LDS_Helper.img.shape[0] <= PLSR_LDS_Helper.img.shape[1]: fig = plt.figure(figsize=(5, 4)) plt.subplot(121) print(PLSR_LDS_Helper.img.shape) plt.imshow(PLSR_LDS_Helper.img[:, :, 0], cmap=plt.cm.Greys_r) roi_positions = np.where(PLSR_LDS_Helper.train_data > 0) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('RS image - first band') # plt.subplot(122) # plt.imshow(PLSR_LDS_Helper.train_data, cmap=plt.cm.Spectral) # data = roi && cmap = plt.cm.Spectral # plt.title('Training Image') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 160) # else: # renderPDF.draw(drawing, doc, 50, 250) fig.clf() plt.close(fig) fig = plt.figure(figsize=(5, 4)) plt.imshow(PLSR_LDS_Helper.prediction, cmap=plt.cm.Spectral) plt.colorbar() plt.title('Prediction') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 100, 160) fig.clf() plt.close(fig) doc.showPage() roi_positions = np.where(PLSR_LDS_Helper.train_data > 0) plt.imshow(PLSR_LDS_Helper.img[:, :, 0], cmap=plt.cm.Greys_r) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('RS image - first band') plt.savefig(path + "RS image-first_band.png", dpi=300) plt.clf() # plt.imshow(PLSR_LDS_Helper.train_data, cmap=plt.cm.Spectral) # data = roi && cmap = plt.cm.Spectral # plt.title('Training Image') # plt.savefig(path + "Training_Image.png", dpi=300) # plt.clf() plt.imshow(PLSR_LDS_Helper.prediction, cmap=plt.cm.Spectral) plt.colorbar() plt.title('Prediction') plt.savefig(path + "Prediction.png", dpi=300) plt.clf() n_samples = (PLSR_LDS_Helper.train_data > 0).sum() print( 'We have {n} training samples'.format(n=n_samples)) # Subset the image dataset with the training image = X print('The shape of our features is:', PLSR_LDS_Helper.features.shape) print('The number of Spectra is:', PLSR_LDS_Helper.features.shape[0]) print('The number of bands is:', PLSR_LDS_Helper.features.shape[1]) doc.line(20, 810, 570, 810) doc.setLineWidth(.3) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 785, 'Section : General Information and Training') doc.line(20, 770, 570, 770) doc.setFont('Helvetica', 10) doc.drawString(30, 700, 'The Image Extend: ' + str(PLSR_LDS_Helper.img.shape[0]) + " x " + str(PLSR_LDS_Helper.img.shape[1]) + " (Rows x Columns)") doc.drawString(30, 680, 'The number of bands is: ' + str(PLSR_LDS_Helper.features.shape[1])) # doc.drawString(30, 680,'The shape of our features is: '+str(features.shape)) doc.drawString(30, 660, 'Selected Attribute: ' + str(PLSR_LDS_Helper.attribute)) doc.drawString(30, 640, 'The number of Sample is: ' + str(PLSR_LDS_Helper.features.shape[0])) doc.drawString(30, 620, '---------------------------------------------------------') # from sklearn import preprocessing # # min_max_scaler = preprocessing.MinMaxScaler() # # xscaled = min_max_scaler.fit_transform(features) # features_ = pd.DataFrame(xscaled) # # features_.transpose().plot(figsize=(20, 7)) # plt.legend(bbox_to_anchor=(0.1, -0.1), loc='upper left', ncol=7) # plt.title('Reference Spectra') # plt.plot() # # print('Training Features Shape:', PLSR_LDS_Helper.train_features.shape) print('Training Labels Shape:', PLSR_LDS_Helper.train_labels.shape) print('Testing Features Shape:', PLSR_LDS_Helper.test_features.shape) print('Testing Labels Shape:', PLSR_LDS_Helper.test_labels.shape) # msemin = np.argmin(PLSR_LDS_Helper.mse) suggested_comp = msemin + 1 print("Suggested number of components: ", suggested_comp) fig = plt.figure(figsize=(5, 4)) with plt.style.context(('ggplot')): plt.plot(PLSR_LDS_Helper.component, np.array(PLSR_LDS_Helper.mse), '-v', color='blue', mfc='blue') plt.plot(PLSR_LDS_Helper.component[msemin], np.array(PLSR_LDS_Helper.mse)[msemin], 'P', ms=10, mfc='red') plt.xlabel('Number of PLS components') plt.ylabel('MSE') plt.title('PLSR MSE vs. Components') plt.xlim(left=-1) plt.savefig(path + "PLSR MSE vs. Components.png", dpi=300) # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 150) fig.clf() plt.close(fig) doc.showPage() # print(sorted_imp) imp = {} for i in range(PLSR_LDS_Helper.features.shape[1]): print('Band {}: {}'.format(i + 1, round(PLSR_LDS_Helper.importance[i], 2))) imp['Band{}'.format(i + 1)] = round(PLSR_LDS_Helper.importance[i], 2) data = [(k, v) for k, v in imp.items()] # dummy = [('Band',1.33),('Band',5),('Band',4),('Band',2),('Band',6),('Band',8),('Band',43),('Band',3),('Band',113),('Band',233),('Band',13),('Band',133)] # data.extend(dummy) data2 = data[:] data2.sort(key=lambda x: x[1], reverse=True) data.insert(0, ("Band", "Importance")) data2.insert(0, ("Band", "Importance")) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 710, "Band importance (left: ordered by band number | right: ordered by importance):") doc.setFont('Helvetica', 10) if (len(data) > 21): chunks = (self.chunks(data, 20)) ordered_chunks = (self.chunks(data2, 20)) iterationNumer = 0 for unorder, ordered in zip(chunks, ordered_chunks): if iterationNumer != 0: unorder.insert(0, ("Band", "Importance")) ordered.insert(0, ("Band", "Importance")) unordered_table = Table(unorder) ordered_table = Table(ordered) unordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) ordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) if iterationNumer == 0: unordered_table.wrapOn(doc, 60, 100) unordered_table.drawOn(doc, 60, 100) ordered_table.wrapOn(doc, 280, 100) ordered_table.drawOn(doc, 280, 100) else: unordered_table.wrapOn(doc, 60, 400) unordered_table.drawOn(doc, 60, 400) ordered_table.wrapOn(doc, 280, 400) ordered_table.drawOn(doc, 280, 400) columns = [""] ordered_table = Table(columns) unordered_table = Table(columns) doc.showPage() iterationNumer += 1 else: table = Table(data) table2 = Table(data2) table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table2.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table.wrapOn(doc, 0, 0) table.drawOn(doc, 60, 100) table2.wrapOn(doc, 60, 100) table2.drawOn(doc, 280, 100) doc.showPage() # errors = abs(PLSR_LDS_Helper.predictions_test_ds - PLSR_LDS_Helper.test_labels) # Print out the mean absolute error (mae) # Print out the mean absolute error (mae) print('-------------') print('n of the test data: {}'.format(len(PLSR_LDS_Helper.test_labels))) print('Mean of the variable: {:.2f}'.format(np.mean(PLSR_LDS_Helper.labels))) print('Standard deviation of the variable: {:.2f}'.format(np.std(PLSR_LDS_Helper.labels))) print('-------------') print('Mean Absolute Error: {:.2f}'.format(np.mean(errors))) mse = mean_squared_error(PLSR_LDS_Helper.test_labels, PLSR_LDS_Helper.predictions_test_ds) print('Mean squared error: '+ str(round(mse,2))) print('RMSE: '+str(round(np.sqrt(mse),2))) # mape = 100 * (errors / PLSR_LDS_Helper.test_labels) # Calculate and display accuracy accuracy = 100 - np.mean(mape) print('mean absolute percentage error (MAPE) / Accuracy: {:.2f}'.format(accuracy), '%.') print('-------------') # The coefficient of determination: 1 is perfect prediction print('Coefficient of determination r²: {:.2f}'.format(r2_score(PLSR_LDS_Helper.test_labels, PLSR_LDS_Helper.predictions_test_ds))) # # doc.drawString(30, 785, 'n of the test data: {}'.format(len(PLSR_LDS_Helper.test_labels))) doc.drawString(30, 765,'Mean of the variable: {:.2f}'.format(np.mean(PLSR_LDS_Helper.labels))) doc.drawString(30, 745,'Standard deviation of the variable: {:.2f}'.format(np.std(PLSR_LDS_Helper.labels))) doc.drawString(30, 735,'------------------------------------------------------') doc.drawString(30, 715,'Mean Absolute Error: {:.2f}'.format(np.mean(errors))) mse = mean_squared_error(PLSR_LDS_Helper.test_labels, PLSR_LDS_Helper.predictions_test_ds) doc.drawString(30, 685,'Mean squared error: {:.2f}'.format(mse)) doc.drawString(30, 670,'RMSE: {:.2f}'.format(np.sqrt(mse))) mape = 100 * (errors / PLSR_LDS_Helper.test_labels) # Calculate and display accuracy accuracy = 100 - np.mean(mape) doc.drawString(30, 655,"mean absolute percentage error (MAPE) / Accuracy: "+ str(round(accuracy,2))+" %") doc.drawString(30, 640,'----------------------------------------------------') fig, ax = plt.subplots(figsize=(5,5)) ax.scatter(PLSR_LDS_Helper.test_labels, PLSR_LDS_Helper.predictions_test_ds) ax.plot([PLSR_LDS_Helper.test_labels.min(), PLSR_LDS_Helper.test_labels.max()], [PLSR_LDS_Helper.test_labels.min(), PLSR_LDS_Helper.test_labels.max()], 'k--', lw=1) ax.set_xlabel('Measured') ax.set_ylabel('Predicted') imgdata = BytesIO() plt.savefig(path + "R2CV", dpi=300) fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 240) fig.clf() plt.close(fig) # mask = np.copy(img[:, :, 0]) # mask[mask > 0.0] = 1.0 # all actual pixels have a value of 1.0 # plot mask # plt.imshow(mask) # mask classification an plot # prediction_ = prediction * mask # # plt.subplot(121) # plt.imshow(prediction, cmap=plt.cm.Spectral, vmax=prediction.mean() + prediction.std() * 2, # vmin=prediction.mean() - prediction.std() * 2) # plt.title('prediction unmasked') # # plt.subplot(122) # plt.imshow(prediction_, cmap=plt.cm.Spectral, vmax=prediction_.mean() + prediction_.std() * 2, # vmin=prediction_.mean() - prediction_.std() * 2) # plt.title('prediction masked') # # plt.show() # # # plt.subplot(121) # plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) # plt.title('RS image - first band') # # plt.subplot(122) # plt.imshow(prediction, cmap=plt.cm.Spectral, vmax=prediction_.mean() + prediction_.std() * 2, # vmin=prediction_.mean() - prediction_.std() * 2) # plt.colorbar() # # plt.title('Prediction') # # plt.show() # return doc def make_rfr_sss_report(self,doc,reportpath,dir_path,train_data,prediction_map,modelsavepath,img_path,TrainingData,img,attributes,prediction, y_c, y_cv, RFR): try: os.mkdir(dir_path + "/Graphs") path = dir_path + "/Graphs/" width, height = A4 # print("here........."+reportpath) print(prediction_map) print(modelsavepath) print(img_path) print(train_data) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 700,"DIRECTORIES:") doc.setFont('Helvetica', 7) doc.drawString(30, 680, "Remote Sensing Image: " + img_path) doc.drawString(30, 660, "Shape file: " + train_data) doc.drawString(30, 640, "Report Save Path: "+ reportpath) doc.drawString(30, 620, "Regression image saved to: " + prediction_map) if modelsavepath !='/': doc.drawString(30, 600, "Model saved to: "+modelsavepath) else: doc.drawString(30, 600, "Model saved to: Model not saved") doc.line(20, 580, 570, 580) n_samples = (TrainingData > 0).sum() print('We have {n} training samples'.format( n=n_samples)) # Subset the image dataset with the training image = X roi_positions = np.where(TrainingData > 0) if img.shape[0] > img.shape[1]: fig = plt.figure(figsize=(5, 4)) plt.subplot(121) print(img.shape) plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('RS image - first band') # plt.subplot(122) # plt.imshow(TrainingData, cmap=plt.cm.Spectral) # data = roi && cmap = plt.cm.Spectral # plt.title('Training Image') # #plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 160) # else: # renderPDF.draw(drawing, doc, 50, 250) fig.clf() plt.close(fig) fig = plt.figure(figsize=(5, 4)) plt.imshow(prediction, cmap=plt.cm.Spectral) plt.colorbar() plt.title('Prediction') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 400, 160) fig.clf() plt.close(fig) doc.showPage() if img.shape[0]<= img.shape[1]: fig = plt.figure(figsize=(6, 4)) plt.subplot(121) print(img.shape) plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('RS image - first band') # plt.subplot(122) # plt.imshow(TrainingData, cmap=plt.cm.Spectral) # data = roi && cmap = plt.cm.Spectral # plt.title('Training Image') # #plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 50, 360) # else: # renderPDF.draw(drawing, doc, 50, 250) fig.clf() plt.close(fig) fig = plt.figure(figsize=(5, 4)) plt.imshow(prediction, cmap=plt.cm.Spectral) plt.colorbar() plt.title('Prediction') # plt.show() imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 70, 60) fig.clf() plt.close(fig) doc.showPage() plt.imshow(img[:, :, 0], cmap=plt.cm.Greys_r) plt.scatter(roi_positions[1], roi_positions[0], marker='x', c='r') plt.title('RS image - first band') plt.savefig(path + "RS image-first_band.png", dpi=300) plt.clf() plt.imshow(TrainingData, cmap=plt.cm.Spectral) # data = roi && cmap = plt.cm.Spectral plt.title('Training Image') plt.savefig(path + "Training_Image.png", dpi=300) plt.clf() plt.imshow(prediction, cmap=plt.cm.Spectral) plt.colorbar() plt.title('Prediction') plt.savefig(path + "Prediction.png", dpi=300) plt.clf() settings_sns = {'axes.facecolor': 'white', 'axes.edgecolor': '0', 'axes.grid': True, 'axes.axisbelow': True, 'axes.labelcolor': '.15', 'figure.facecolor': 'white', 'grid.color': '.8', 'grid.linestyle': '--', 'text.color': '0', 'xtick.color': '0', 'ytick.color': '0', 'xtick.direction': 'in', 'ytick.direction': 'in', 'lines.solid_capstyle': 'round', 'patch.edgecolor': 'w', 'patch.force_edgecolor': True, 'image.cmap': 'Greys', 'font.family': ['serif'], 'font.sans-serif': ['Arial', 'Liberation Sans', 'DejaVu Sans', 'Bitstream Vera Sans', 'sans-serif'], 'xtick.bottom': True, 'xtick.top': True, 'ytick.left': True, 'ytick.right': True, 'axes.spines.left': True, 'axes.spines.bottom': True, 'axes.spines.right': True, 'axes.spines.top': True} X = img[TrainingData > 0, :] y = TrainingData[TrainingData > 0] features = pd.DataFrame(X) band_names = [] for i in range(X.shape[1]): # for i in range(0,2500): nband = "Band_" + str(i + 1) band_names.append(nband) # print("*******************") # print(band_names) # print("*******************") features.columns = band_names print('The shape of our features is:', features.shape) print('The number of Spectra is:', features.shape[0]) print('The number of bands is:', features.shape[1]) features['value'] = y # min_max_scaler = preprocessing.MinMaxScaler() # # xscaled = min_max_scaler.fit_transform(features) # features_ = pd.DataFrame(xscaled) # # features_.transpose().plot(figsize=(20, 7)) # plt.legend(bbox_to_anchor=(0.1, -0.1), loc='upper left', ncol=7) # plt.title('Reference Spectra') # plt.plot() # # # # In[10]: # Labels are the values we want to predict labels = np.array(features['value']) # Remove the labels from the features # axis 1 refers to the columns features = features.drop('value', axis=1) # Saving feature names for later use feature_list = list(features.columns) # Convert to numpy array features = np.array(features) print('Training Features Shape: ', features.shape) print('Training Labels Shape: ', labels.shape) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 730, 'Section 1:') doc.setFont('Helvetica', 14) doc.drawString(30, 710, "Image extent: " + str(img.shape[0]) +" x "+ str(img.shape[1]) + " (Rows x Columns)") doc.drawString(30, 690, "Number of Bands: " + str(features.shape[1])) doc.drawString(30, 670, "Field name (shape file) of your classes: " + attributes) doc.setFont('Helvetica', 14) doc.drawString(30, 650, " Random Forrest Training") doc.setFont('Helvetica', 14) doc.drawString(30, 630, " Number of Tress: " ) doc.drawString(30, 610, " Number of samples: " + str(n_samples)) #doc.drawString(30, 590, " Split size for Test: " + str(RFHelper.helper.SplitSize)) #doc.drawString(30, 570, " Training samples: " + str(labels.shape[0])) #doc.drawString(30, 550, " Test sample: " + str(RFHelper.helper.TestSample)) #doc.drawString(30, 530, "Co efficient of determination R^2 of the prediction : " + RFHelper.helper.Coeff) doc.setFont('Helvetica-Bold', 14) doc.drawString(30, 510, "left: ordered by band number| right: ordered by importance ") imp = {} for i in range(len(RFR.feature_importances_)): importance = round(RFR.feature_importances_[i] * 100, 2) print('Band {}: {}'.format(i + 1, importance)) imp['Band{}'.format(i + 1)] = importance data = [(k, v) for k, v in imp.items()] data2 = data[:] data2.sort(key=lambda x: x[1], reverse=True) data.insert(0, ("Band", "Importance")) data2.insert(0, ("Band", "Importance")) doc.setFont('Helvetica', 10) if (len(data) > 21): chunks = (self.chunks(data, 20)) ordered_chunks = (self.chunks(data2, 20)) iterationNumer = 0 for unorder, ordered in zip(chunks, ordered_chunks): if iterationNumer != 0: unorder.insert(0, ("Band", "Importance")) ordered.insert(0, ("Band", "Importance")) unordered_table = Table(unorder) ordered_table = Table(ordered) unordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) ordered_table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) if iterationNumer == 0: unordered_table.wrapOn(doc, 60, 100) unordered_table.drawOn(doc, 60, 100) ordered_table.wrapOn(doc, 280, 100) ordered_table.drawOn(doc, 280, 100) else: unordered_table.wrapOn(doc, 60, 400) unordered_table.drawOn(doc, 60, 400) ordered_table.wrapOn(doc, 280, 400) ordered_table.drawOn(doc, 280, 400) columns = [""] ordered_table = Table(columns) unordered_table = Table(columns) doc.showPage() iterationNumer += 1 else: table = Table(data) table2 = Table(data2) table.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table2.setStyle(TableStyle([("BOX", (0, 0), (-1, -1), 0.25, colors.black), ('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black)])) table.wrapOn(doc, 0, 0) table.drawOn(doc, 60, 100) table2.wrapOn(doc, 60, 100) table2.drawOn(doc, 280, 100) doc.showPage() score_c = r2_score(y, y_c) score_cv = r2_score(y, y_cv) mse_c = mean_squared_error(y, y_c) mse_cv = mean_squared_error(y, y_cv) errors = abs(y_cv - labels) # Print out the mean absolute error (mae) # Print out the mean absolute error (mae) print('-------------') print('n of the test data: {}'.format(len(labels))) print('Mean of the variable: {:.2f}'.format(np.mean(labels))) print('Standard deviation of the variable: {:.2f}'.format(np.std(labels))) print('-------------') print('Mean Absolute Error: {:.2f}'.format(np.mean(errors))) mse = mean_squared_error(labels, y_cv) print('Mean squared error: {:.2f}'.format(mse)) print('RMSE: {:.2f}'.format(np.sqrt(mse))) print( 'RPD: {:.2f} | How often does RMSE of Prediction fit in the Standard Deviation of the samples'.format( np.std(labels) / np.sqrt(mse))) doc.drawString(30, 770, "n of the data: " + str(len(labels))) doc.drawString(30, 750, "Mean of the Variable : " + str(np.mean(labels))) doc.drawString(30, 730, "Standard Deviation of the Variable: " + str(round(np.std(labels), 2))) doc.drawString(30, 710, "----------------------------------------") doc.setFont('Helvetica', 14) doc.drawString(30, 670, " Mean Absolute Error : " + str(round(np.mean(errors), 2))) doc.drawString(30, 650, " Mean Squared Error:" + str(round(mse, 2))) doc.drawString(30, 630, " RMSE:" + str(round(np.sqrt(mse), 2))) doc.drawString(30, 600, 'RPD:'+ str(round(np.std(labels) / np.sqrt(mse),2))) doc.setFont('Helvetica', 10) doc.drawString(30, 580,'How often does RMSE of Prediction fit in the Standard Deviation of the samples') doc.drawString(30, 560, "----------------------------------------") mape = 100 * (errors / labels) # Calculate and display accuracy accuracy = 100 - np.mean(mape) print('mean absolute percentage error (MAPE) / Accuracy: {:.2f}'.format(accuracy), '%.') print('-------------') doc.setFont('Helvetica', 14) doc.drawString(30, 530,'mean absolute percentage error (MAPE) / Accuracy:'+ str(round(accuracy,2))+ ' %.') # The coefficient of determination: 1 is perfect prediction print('Coefficient of determination r²: {:.2f}'.format(r2_score(labels, y_cv))) doc.drawString(30, 510,'Coefficient of determination r²: '+ str(round(r2_score(labels, y_cv),2))) ''' To put our predictions in perspective, we can calculate an accuracy using the mean average percentage error subtracted from 100 %. ''' # Calculate mean absolute percentage error (MAPE) print('R2 calib: %5.3f' % score_c) print('R2 LOOCV: %5.3f' % score_cv) print('MSE calib: %5.3f' % mse_c) print('MSE LOOCV: %5.3f' % mse_cv) # In[12]: # # Plot regression and figures of merit rangey = max(y) - min(y) rangex = max(y_c) - min(y_c) # Fit a line to the CV vs response z = np.polyfit(y, y_c, 1) with plt.style.context(('ggplot')): sns.set(rc=settings_sns, font_scale=1.0) fig, ax = plt.subplots(figsize=(7, 5)) ax.scatter(y_c, y, c='red', edgecolors='k') # Plot the best fit line ax.plot(np.polyval(z, y), y, c='blue', linewidth=1) # Plot the ideal 1:1 line ax.plot(y, y, color='green', linewidth=1) plt.title(attributes) plt.xlabel('predicted') plt.ylabel('observed') plt.legend(['regression \nr$^{2}$ (CV): ' + str(round(score_cv, 2)), '1:1 line', 'samples']) imgdata = BytesIO() fig.savefig(imgdata, format='svg', bbox_inches='tight', pad_inches=0) plt.savefig(path + "r2_Prediction.png", dpi=300) imgdata.seek(0) # rewind the data drawing = svg2rlg(imgdata) renderPDF.draw(drawing, doc, 30, 70) fig.clf() plt.close(fig) # return doc except ValueError as e: print(e) def chunks(self,lst, n): return [lst[i:i + n] for i in range(0, len(lst), n)]
43.741917
187
0.512425
8,463
74,405
4.415574
0.071724
0.051834
0.059006
0.00471
0.824748
0.78996
0.760711
0.738634
0.717921
0.693998
0
0.057626
0.340905
74,405
1,700
188
43.767647
0.704384
0.126107
0
0.669964
0
0
0.135907
0.00902
0
0
0
0
0
1
0.007194
false
0
0.063849
0.000899
0.079137
0.080036
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
759268858439efc82b914933e670f5255e4ba7ec
63
py
Python
utils/__init__.py
Tiamat-Tech/ZAQ-code
e7e9f55791e36c6784d58c356d3ced76a7583369
[ "MIT" ]
55
2021-03-30T01:30:46.000Z
2022-03-30T03:05:25.000Z
utils/__init__.py
Tiamat-Tech/ZAQ-code
e7e9f55791e36c6784d58c356d3ced76a7583369
[ "MIT" ]
8
2021-04-23T07:59:20.000Z
2021-06-04T14:28:24.000Z
utils/__init__.py
Tiamat-Tech/ZAQ-code
e7e9f55791e36c6784d58c356d3ced76a7583369
[ "MIT" ]
13
2021-04-08T03:15:47.000Z
2022-03-18T08:39:12.000Z
from .loss import * from . import misc from . import visualizer
21
24
0.761905
9
63
5.333333
0.555556
0.416667
0
0
0
0
0
0
0
0
0
0
0.174603
63
3
24
21
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
7598cb4d560c120c6dc251a42bd76ee8f67a914e
149
py
Python
medal/models/__init__.py
JaniceLC/O-MedAL
c0e1cc3db0005a4b88edbeb2c077e5e46621945d
[ "MIT" ]
13
2019-08-29T06:04:15.000Z
2021-02-23T03:49:38.000Z
medal/models/__init__.py
JaniceLC/O-MedAL
c0e1cc3db0005a4b88edbeb2c077e5e46621945d
[ "MIT" ]
1
2019-11-05T08:02:23.000Z
2019-11-05T09:03:30.000Z
medal/models/__init__.py
JaniceLC/O-MedAL
c0e1cc3db0005a4b88edbeb2c077e5e46621945d
[ "MIT" ]
11
2019-10-13T23:12:41.000Z
2021-05-06T14:22:21.000Z
from .inception import InceptionV3BinaryClassifier from .squeezenet import SqueezeNetBinaryClassifier from .resnet18 import Resnet18BinaryClassifier
37.25
50
0.899329
12
149
11.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0.036496
0.080537
149
3
51
49.666667
0.941606
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
75aabd1c603ddb338a814daa8437226eab511826
333
py
Python
features/extraction/lib/__init__.py
bayesimpact/readmission-risk
5b0f6c93826601e2dbb9c8c276e92801772e17c4
[ "Apache-2.0" ]
19
2016-10-06T18:10:36.000Z
2018-04-04T02:30:09.000Z
features/extraction/lib/__init__.py
BeaconLabs/readmission-risk
5b0f6c93826601e2dbb9c8c276e92801772e17c4
[ "Apache-2.0" ]
2
2017-10-26T19:22:58.000Z
2017-11-16T07:44:58.000Z
features/extraction/lib/__init__.py
bayesimpact/readmission-risk
5b0f6c93826601e2dbb9c8c276e92801772e17c4
[ "Apache-2.0" ]
9
2016-11-15T14:13:20.000Z
2021-12-19T20:27:58.000Z
""" Helper methods and classes, organized by category. Some are specific to this project, others are more general (e.g. databuilder.py is used with modifications throughout different Bayes projects). TODO: Separate this out into general utility methods/classes and sutter-specific stuff. """ from __future__ import absolute_import
33.3
87
0.804805
47
333
5.595745
0.829787
0
0
0
0
0
0
0
0
0
0
0
0.138138
333
9
88
37
0.916376
0.855856
0
0
0
0
0
0
0
0
0
0.111111
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
1
0
0
6
75c293f148372f5eff803450c78fb78000cc268d
35
py
Python
spinesTS/pipeline/__init__.py
BirchKwok/spinesTS
b88ec333f41f58979e0570177d1fdc364d976056
[ "Apache-2.0" ]
2
2021-08-15T09:29:37.000Z
2022-03-10T13:56:13.000Z
spinesTS/pipeline/__init__.py
BirchKwok/spinesTS
b88ec333f41f58979e0570177d1fdc364d976056
[ "Apache-2.0" ]
null
null
null
spinesTS/pipeline/__init__.py
BirchKwok/spinesTS
b88ec333f41f58979e0570177d1fdc364d976056
[ "Apache-2.0" ]
null
null
null
from ._pipeline import Pipeline
11.666667
32
0.771429
4
35
6.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.2
35
2
33
17.5
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
75c7fa6ddf60415d6fc6e4d53494a03dda06a234
118
py
Python
shoppon/db/sqlalchemy/versions/001_init.py
shoppon/Python-learning
50b68785b6b3b78a7deba3f452fa9c0fad218e9b
[ "MIT" ]
null
null
null
shoppon/db/sqlalchemy/versions/001_init.py
shoppon/Python-learning
50b68785b6b3b78a7deba3f452fa9c0fad218e9b
[ "MIT" ]
null
null
null
shoppon/db/sqlalchemy/versions/001_init.py
shoppon/Python-learning
50b68785b6b3b78a7deba3f452fa9c0fad218e9b
[ "MIT" ]
null
null
null
from sqlalchemy import Integer from sqlalchemy import Table def upgrade(migrate_engine): Table('fake', Integer())
23.6
30
0.779661
15
118
6.066667
0.666667
0.307692
0.43956
0
0
0
0
0
0
0
0
0
0.135593
118
5
31
23.6
0.892157
0
0
0
0
0
0.033613
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
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
1
0
0
1
0
0
0
0
6
75f51b46f750aaeca5a585973aa3bb8c2ca8f19f
450
py
Python
regresspy/loss.py
roman1117459/regress_py_package
393f804a653858fc66f620cd50ee022b43fb5d90
[ "MIT" ]
1
2021-08-15T20:27:20.000Z
2021-08-15T20:27:20.000Z
regresspy/loss.py
roman1117459/regress_py_package
393f804a653858fc66f620cd50ee022b43fb5d90
[ "MIT" ]
null
null
null
regresspy/loss.py
roman1117459/regress_py_package
393f804a653858fc66f620cd50ee022b43fb5d90
[ "MIT" ]
2
2021-08-18T14:44:39.000Z
2021-08-22T04:24:44.000Z
import numpy as np from numpy import ndarray def mae(pred: ndarray, label: ndarray) -> ndarray: return np.mean(np.abs(label - pred)) def sse(pred: ndarray, label: ndarray) -> ndarray: return np.sum(np.power((label - pred), 2)) def mse(pred: ndarray, label: ndarray) -> ndarray: return np.mean(np.power((label - pred), 2)) def rmse(pred: ndarray, label: ndarray) -> ndarray: return np.sqrt(np.mean(np.power((label - pred), 2)))
25
56
0.666667
69
450
4.347826
0.289855
0.146667
0.213333
0.306667
0.75
0.75
0.673333
0.293333
0.293333
0
0
0.008065
0.173333
450
18
56
25
0.798387
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
0
0
0
null
0
1
1
0
1
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
6
75f8010aa51a5b01978256adeef78df9b5f3ef2c
42
py
Python
c42_csr2postman/models/__init__.py
42c-presales/42c-report-scan-to-postman
1d9a4965d54d2fd28944367894896f2ace9c74e9
[ "Apache-2.0" ]
1
2021-12-30T21:20:35.000Z
2021-12-30T21:20:35.000Z
c42_csr2postman/models/__init__.py
42c-presales/42c-report-scan-to-postman
1d9a4965d54d2fd28944367894896f2ace9c74e9
[ "Apache-2.0" ]
null
null
null
c42_csr2postman/models/__init__.py
42c-presales/42c-report-scan-to-postman
1d9a4965d54d2fd28944367894896f2ace9c74e9
[ "Apache-2.0" ]
null
null
null
from .csr import * from .postman import *
14
22
0.714286
6
42
5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.190476
42
2
23
21
0.882353
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
75fd08c544f319e7a6fc21965862c37e24234f66
41
py
Python
__init__.py
Bejjox/BejjoLib
ba0e595d40b49a025ef37ca3122c7b25d1a7ecca
[ "MIT" ]
1
2020-07-14T17:09:19.000Z
2020-07-14T17:09:19.000Z
__init__.py
Bejjox/BejjoLib
ba0e595d40b49a025ef37ca3122c7b25d1a7ecca
[ "MIT" ]
1
2020-11-01T15:24:36.000Z
2020-11-01T15:25:09.000Z
__init__.py
Bejjox/BejjoLib
ba0e595d40b49a025ef37ca3122c7b25d1a7ecca
[ "MIT" ]
1
2020-07-14T17:09:31.000Z
2020-07-14T17:09:31.000Z
from .randm import * from .num2w import *
20.5
20
0.731707
6
41
5
0.666667
0
0
0
0
0
0
0
0
0
0
0.029412
0.170732
41
2
21
20.5
0.852941
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
f9b45cd6d53ca724fb43e8156ddb45327693663b
12,447
py
Python
vimfiles/bundle/vim-python/submodules/pylint/tests/checkers/unittest_deprecated.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
463
2015-01-15T08:17:42.000Z
2022-03-28T15:10:20.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/checkers/unittest_deprecated.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
52
2015-01-06T02:43:59.000Z
2022-03-14T11:15:21.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/checkers/unittest_deprecated.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
249
2015-01-07T22:49:49.000Z
2022-03-18T02:32:06.000Z
import astroid from pylint.checkers import BaseChecker, DeprecatedMixin from pylint.interfaces import UNDEFINED, IAstroidChecker from pylint.testutils import CheckerTestCase, Message class _DeprecatedChecker(DeprecatedMixin, BaseChecker): __implements__ = (IAstroidChecker,) name = "deprecated" def deprecated_methods(self): return {"deprecated_func", ".Deprecated.deprecated_method"} def deprecated_modules(self): return {"deprecated_module"} def deprecated_arguments(self, method): if method == "myfunction1": # def myfunction1(arg1, deprecated_arg1='spam') return ((1, "deprecated_arg1"),) if method == "myfunction2": # def myfunction2(arg1, deprecated_arg1, arg2='foo', deprecated_arg2='spam')) return ((1, "deprecated_arg1"), (3, "deprecated_arg2")) if method == "myfunction3": # def myfunction1(arg1, *, deprecated_arg1='spam') return ((None, "deprecated_arg1"),) if method == ".MyClass.mymethod1": # def mymethod1(self, arg1, deprecated_arg1=None) return ((1, "deprecated_arg1"),) if method == ".MyClass.mymethod2": # def mymethod2(self, arg1, deprecated_arg1='bar', arg2='foo', deprecated_arg2='spam')) return ((1, "deprecated_arg1"), (3, "deprecated_arg2")) if method == ".MyClass.mymethod3": # def mymethod1(self, arg1, *, deprecated_arg1=None) return ((None, "deprecated_arg1"),) return () class TestDeprecatedChecker(CheckerTestCase): CHECKER_CLASS = _DeprecatedChecker def test_deprecated_function(self): # Tests detecting deprecated function node = astroid.extract_node( """ def deprecated_func(): pass deprecated_func() """ ) with self.assertAddsMessages( Message( msg_id="deprecated-method", args=("deprecated_func",), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_deprecated_method(self): # Tests detecting deprecated method node = astroid.extract_node( """ class Deprecated: def deprecated_method(): pass d = Deprecated() d.deprecated_method() """ ) with self.assertAddsMessages( Message( msg_id="deprecated-method", args=("deprecated_method",), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_no_message(self): # Tests not raising error when no deprecated functions/methods are present. node = astroid.extract_node( """ class MyClass: def mymethod(): pass MyClass().mymethod() def myfunc(): pass myfunc() """ ) with self.assertNoMessages(): self.checker.visit_call(node) def test_function_deprecated_arg(self): # Tests raising error when calling function with deprecated argument node = astroid.extract_node( """ def myfunction1(arg1, deprecated_arg1='spam'): pass myfunction1(None, 'deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "myfunction1"), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_function_deprecated_kwarg(self): # Tests raising error when calling function with deprecated keyword argument node = astroid.extract_node( """ def myfunction1(arg1, deprecated_arg1='spam'): pass myfunction1(None, deprecated_arg1='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "myfunction1"), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_function_deprecated_not_used(self): # Tests raising error when calling function without deprecated argument node = astroid.extract_node( """ def myfunction1(arg1, deprecated_arg1='spam'): pass myfunction1(None) """ ) with self.assertNoMessages(): self.checker.visit_call(node) def test_function_deprecated_kwarg_only(self): # Tests raising error when calling function with deprecated keyword only argument node = astroid.extract_node( """ def myfunction3(arg1, *, deprecated_arg1='spam'): pass myfunction3(None, deprecated_arg1='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "myfunction3"), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_method_deprecated_arg(self): # Tests raising error when calling method with deprecated argument node = astroid.extract_node( """ class MyClass: def mymethod1(self, arg1, deprecated_arg1): pass MyClass().mymethod1(None, 'deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "mymethod1"), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_method_deprecated_kwarg(self): # Tests raising error when calling method with deprecated keyword argument node = astroid.extract_node( """ class MyClass: def mymethod1(self, arg1, deprecated_arg1): pass MyClass().mymethod1(None, deprecated_arg1='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "mymethod1"), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_method_deprecated_not_used(self): # Tests raising error when calling method without deprecated argument node = astroid.extract_node( """ class MyClass: def mymethod1(self, arg1, deprecated_arg1): pass MyClass().mymethod1(None) """ ) with self.assertNoMessages(): self.checker.visit_call(node) def test_method_deprecated_kwarg_only(self): # Tests raising error when calling method with deprecated keyword only argument node = astroid.extract_node( """ class MyClass: def mymethod3(self, arg1, *, deprecated_arg1): pass MyClass().mymethod3(None, deprecated_arg1='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "mymethod3"), node=node, confidence=UNDEFINED, ) ): self.checker.visit_call(node) def test_function_deprecated_arg_kwargs(self): # Tests raising error when calling function with deprecated argument # and keyword argument node = astroid.extract_node( """ def myfunction2(arg1, deprecated_arg1, arg2='foo', deprecated_arg2='spam'): pass myfunction2(None, 'deprecated', deprecated_arg2='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "myfunction2"), node=node, confidence=UNDEFINED, ), Message( msg_id="deprecated-argument", args=("deprecated_arg2", "myfunction2"), node=node, confidence=UNDEFINED, ), ): self.checker.visit_call(node) def test_function_deprecated_kwarg_kwarg(self): # Tests raising error when calling function with deprecated keyword arguments node = astroid.extract_node( """ def myfunction2(arg1, deprecated_arg1, arg2='foo', deprecated_arg2='spam'): pass myfunction2(None, deprecated_arg1='deprecated', deprecated_arg2='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "myfunction2"), node=node, confidence=UNDEFINED, ), Message( msg_id="deprecated-argument", args=("deprecated_arg2", "myfunction2"), node=node, confidence=UNDEFINED, ), ): self.checker.visit_call(node) def test_method_deprecated_arg_kwargs(self): # Tests raising error when calling method with deprecated argument # and keyword argument node = astroid.extract_node( """ class MyClass: def mymethod2(self, arg1, deprecated_arg1, arg2='foo', deprecated_arg2='spam'): pass MyClass().mymethod2(None, 'deprecated', deprecated_arg2='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "mymethod2"), node=node, confidence=UNDEFINED, ), Message( msg_id="deprecated-argument", args=("deprecated_arg2", "mymethod2"), node=node, confidence=UNDEFINED, ), ): self.checker.visit_call(node) def test_method_deprecated_kwarg_kwarg(self): # Tests raising error when calling method with deprecated keyword arguments node = astroid.extract_node( """ class MyClass: def mymethod2(self, arg1, deprecated_arg1, arg2='foo', deprecated_arg2='spam'): pass MyClass().mymethod2(None, deprecated_arg1='deprecated', deprecated_arg2='deprecated') """ ) with self.assertAddsMessages( Message( msg_id="deprecated-argument", args=("deprecated_arg1", "mymethod2"), node=node, confidence=UNDEFINED, ), Message( msg_id="deprecated-argument", args=("deprecated_arg2", "mymethod2"), node=node, confidence=UNDEFINED, ), ): self.checker.visit_call(node) def test_deprecated_module(self): # Tests detecting deprecated module node = astroid.extract_node( """ import deprecated_module """ ) with self.assertAddsMessages( Message( msg_id="deprecated-module", args="deprecated_module", node=node, confidence=UNDEFINED, ) ): self.checker.visit_import(node) def test_deprecated_module_from(self): # Tests detecting deprecated module node = astroid.extract_node( """ from deprecated_module import myfunction """ ) with self.assertAddsMessages( Message( msg_id="deprecated-module", args="deprecated_module", node=node, confidence=UNDEFINED, ) ): self.checker.visit_importfrom(node)
31.511392
99
0.545433
1,059
12,447
6.235127
0.07932
0.08481
0.049069
0.059973
0.842799
0.820536
0.802968
0.780403
0.762078
0.719976
0
0.017103
0.361131
12,447
394
100
31.591371
0.813255
0.11786
0
0.696581
0
0
0.123173
0.003475
0
0
0
0
0.07265
1
0.08547
false
0
0.025641
0.008547
0.17094
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
f9e36b3582bece605a4bf6bf2d22ee6b8cb26b24
131
py
Python
pisat/actuator/bd62xx.py
jjj999/pisat
be96cfcd4a68ece14cb5f8745ab138e3931eb761
[ "MIT" ]
1
2020-09-23T08:23:47.000Z
2020-09-23T08:23:47.000Z
pisat/actuator/bd62xx.py
jjj999/pisat
be96cfcd4a68ece14cb5f8745ab138e3931eb761
[ "MIT" ]
4
2020-07-01T06:31:05.000Z
2021-05-04T05:53:01.000Z
pisat/actuator/bd62xx.py
jjj999/pisat
be96cfcd4a68ece14cb5f8745ab138e3931eb761
[ "MIT" ]
2
2020-07-01T06:08:00.000Z
2020-09-20T00:52:43.000Z
from pisat.actuator.pwm_dc_motor_driver import PWMDCMotorDriver class BD62xx(PWMDCMotorDriver): # same architecture pass
18.714286
63
0.801527
15
131
6.8
0.933333
0
0
0
0
0
0
0
0
0
0
0.018018
0.152672
131
7
64
18.714286
0.900901
0.129771
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
6
ddb38390d1e476abbcf87350996444ec403cd61e
3,467
py
Python
tests/unit/test_participation.py
EricSchles/crime-data-api
fdc2ec3a151d2c76d43b1dd3bebe56e34aa58757
[ "CC0-1.0" ]
51
2016-09-16T00:37:56.000Z
2022-01-22T03:48:24.000Z
tests/unit/test_participation.py
harrisj/crime-data-api
9b49b5cc3cd8309dda888f49356ee5168c43851a
[ "CC0-1.0" ]
605
2016-09-15T19:16:49.000Z
2018-01-18T20:46:39.000Z
tests/unit/test_participation.py
harrisj/crime-data-api
9b49b5cc3cd8309dda888f49356ee5168c43851a
[ "CC0-1.0" ]
12
2018-01-18T21:15:34.000Z
2022-02-17T10:09:40.000Z
from crime_data.common.newmodels import (AgencyParticipation, ParticipationRate) import pytest class TestAgencyParticipation: def test_for_agency_not_reporting(self, app): q = AgencyParticipation.query q = q.filter(AgencyParticipation.year == 2014) q = q.filter(AgencyParticipation.agency_id == 17380).one() assert q.reported == 0 assert q.months_reported == 0 assert q.nibrs_reported == 0 assert q.nibrs_months_reported == 0 def test_for_agency_covered_by_another(self, app): q = AgencyParticipation.query q = q.filter(AgencyParticipation.year == 2014) q = q.filter(AgencyParticipation.agency_id == 17391).one() assert q.reported == 0 assert q.months_reported == 0 assert q.nibrs_reported == 0 assert q.nibrs_months_reported == 0 assert q.covered == 1 assert q.participated == 1 assert q.nibrs_participated == 1 def test_for_agency_in_nibrs_month(self, app): q = AgencyParticipation.query q = q.filter(AgencyParticipation.year == 2014) q = q.filter(AgencyParticipation.agency_id == 17381).one() assert q.reported == 1 assert q.months_reported == 12 assert q.nibrs_reported == 1 assert q.nibrs_months_reported == 12 def test_for_agency_not_in_nibrs_month(self, app): q = AgencyParticipation.query q = q.filter(AgencyParticipation.year == 2014) q = q.filter(AgencyParticipation.agency_id == 17427).one() assert q.reported == 1 assert q.months_reported == 12 assert q.nibrs_reported == 0 assert q.nibrs_months_reported == 0 class TestParticipationRate: def test_for_state_in_year(self, app): q = ParticipationRate.query q = q.filter(ParticipationRate.year == 2014) q = q.filter(ParticipationRate.state_id == 44).one() assert q.year == 2014 assert q.state_id == 44 assert q.total_agencies == 62 assert q.participating_agencies == 54 assert q.participation_rate == pytest.approx(0.870967742) assert q.nibrs_participating_agencies == 52 assert q.nibrs_participation_rate == pytest.approx(0.838709677) def test_for_county_in_year(self, app): pass q = ParticipationRate.query q = q.filter(ParticipationRate.year == 2014) q = q.filter(ParticipationRate.state_id == 44).one() assert q.year == 2014 assert q.state_id == 44 assert q.total_agencies == 62 assert q.participating_agencies == 54 assert q.participation_rate == pytest.approx(0.870967742) assert q.nibrs_participating_agencies == 52 assert q.nibrs_participation_rate == pytest.approx(0.838709677) def test_for_year(self, app): q = ParticipationRate.query q = q.filter(ParticipationRate.year == 2014) q = q.filter(ParticipationRate.state_id == None) q = q.filter(ParticipationRate.county_id == None).one() assert q.year == 2014 assert q.state_id is None assert q.total_agencies == 64 assert q.participating_agencies == 54 assert q.participation_rate == pytest.approx(0.84375) assert q.nibrs_participating_agencies == 52 assert q.nibrs_participation_rate == pytest.approx(0.8125) assert q.total_population == 12142430 assert q.participating_population == 1055173
40.788235
80
0.660802
429
3,467
5.149184
0.156177
0.133092
0.054323
0.097782
0.794477
0.762336
0.762336
0.762336
0.762336
0.74785
0
0.066565
0.246034
3,467
84
81
41.27381
0.7785
0
0
0.618421
0
0
0
0
0
0
0
0
0.552632
1
0.092105
false
0.013158
0.026316
0
0.144737
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
1
0
0
0
0
0
0
0
0
0
6
ddc163a2dcc61e3e0e8971991c5d27ad2b68f5f7
33
py
Python
masonite/queues/__init__.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
masonite/queues/__init__.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
masonite/queues/__init__.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
from .Queueable import Queueable
16.5
32
0.848485
4
33
7
0.75
0
0
0
0
0
0
0
0
0
0
0
0.121212
33
1
33
33
0.965517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
ddf729de7d9f59cf3648567f7cae677abc84b410
5,939
py
Python
centers.py
abhinavrk/Circle-Detection
6471966cd2e2b891ca850ed2023e8fbab6f2dff8
[ "MIT" ]
null
null
null
centers.py
abhinavrk/Circle-Detection
6471966cd2e2b891ca850ed2023e8fbab6f2dff8
[ "MIT" ]
null
null
null
centers.py
abhinavrk/Circle-Detection
6471966cd2e2b891ca850ed2023e8fbab6f2dff8
[ "MIT" ]
null
null
null
import os import numpy as np import scipy.optimize as opt import scipy.spatial.distance as d import matplotlib.pyplot as plt ''' Fit to graph ignoring and considering edge effects Also calculate goodness of fit and store in Results.txt ''' def logistic(x, mu, s, A): return A*(1/4.0/s) * np.cosh((x-mu)/2.0/s)**(-2) def boltzmann(x,a, A): return A*(2.0/np.pi)**0.5 * (x**2 * np.exp(-x**2/2.0/(a**2)))/a**3 def gumbel(x, mu,b, A): z = (x-mu)/b return A*np.exp(-1.0*(z + np.exp(-z)))/b def hist_data(array, block): hist, bins = np.histogram(array, bins=block) width = 0.7 * (bins[1] - bins[0]) center = (bins[:-1] + bins[1:]) / 2 return center, hist def runner(pathb, pathg, pathl, file, counter): log_init = (53.7873757895, 20.3443103825, 6140956.95601) bltz_init = (37.5461720445, 5133049.50192) limit_x = limit_y = 140 position = np.loadtxt(file, delimiter = ' ') x = position[:,0] y = position[:,1] c = d.pdist(position) xvals, yvals = hist_data(c, 50) # Get histogram data # Cure Fit Logistic popt_log, pcov_log = opt.curve_fit(logistic, xvals, yvals, p0 = log_init) y_log = logistic(xvals, popt_log[0], popt_log[1], popt_log[2]) y_log_avg = np.sum(y_log)/float(len(y)) SSreg_log = np.sum((y_log_avg - y_log)**2) SStot_log = np.sum((y_log_avg - yvals)**2) R2_log = SSreg_log/float(SStot_log) plt.plot(xvals, yvals) plt.plot(xvals, y_log) plt.title('Logistic Fit Graph - R^2 is {0}'.format(R2_log)) plt.xlabel('$l$ (in units radius)') plt.ylabel('Frequency') plt.savefig(pathl + 'Logistic{0}.png'.format(counter)) # plt.show() # Cure Fit Boltzman popt_b, pcov_b = opt.curve_fit(boltzmann, xvals, yvals, p0= bltz_init) y_b = boltzmann(xvals, popt_b[0], popt_b[1]) y_b_avg = np.sum(y_b)/float(len(y)) SSreg_b = np.sum((y_b_avg - y_b)**2) SStot_b = np.sum((y_b_avg - yvals)**2) R2_b = SSreg_b/float(SStot_b) plt.close() plt.plot(xvals, yvals) plt.plot(xvals, y_log) plt.title('Boltzmann Fit Graph - R^2 is {0}'.format(R2_b)) plt.xlabel('$l$ (in units radius)') plt.ylabel('Frequency') plt.savefig(pathb+'Boltzmann{0}.png'.format(counter)) # Cure Fit Gumbel popt_g, pcov_g = opt.curve_fit(gumbel, xvals, yvals , p0 = log_init) y_g = gumbel(xvals, popt_g[0], popt_g[1], popt_g[2]) y_g_avg = np.sum(y_g)/float(len(y)) SSreg_g = np.sum((y_g_avg - y_g)**2) SStot_g = np.sum((y_g_avg - yvals)**2) R2_g = SSreg_g/float(SStot_g) plt.close() plt.plot(xvals, yvals) plt.plot(xvals, y_g) plt.title('Gumbel Fit Graph - R^2 is {0}'.format(R2_g)) plt.xlabel('$l$ (in units radius)') plt.ylabel('Frequency') plt.savefig(pathg + 'Gumbel{0}.png'.format(counter)) plt.close() return R2_b, R2_log, R2_g def runnermod(pathb, pathg, pathl, file, counter): log_init = (53.7873757895, 20.3443103825, 6140956.95601) bltz_init = (37.5461720445, 5133049.50192) limit_x = limit_y = 140 position = np.loadtxt(file, delimiter = ' ') x = position[:,0] y = position[:,1] c = d.pdist(position) xvals, yvals = hist_data(c, 50) # Get histogram data # Cure Fit Logistic popt_log, pcov_log = opt.curve_fit(logistic, xvals[xvals<95], yvals[xvals<95], p0 = log_init) y_log = logistic(xvals, popt_log[0], popt_log[1], popt_log[2]) y_log_avg = np.sum(y_log)/float(len(y)) SSreg_log = np.sum((y_log_avg - y_log)**2) SStot_log = np.sum((y_log_avg - yvals)**2) R2_log = SSreg_log/float(SStot_log) plt.plot(xvals, yvals) plt.plot(xvals, y_log) plt.title('Logistic Fit Graph - R^2 is {0}'.format(R2_log)) plt.xlabel('$l$ (in units radius)') plt.ylabel('Frequency') plt.savefig(pathl + 'Logistic_mod{0}.png'.format(counter)) # plt.show() # Cure Fit Boltzman popt_b, pcov_b = opt.curve_fit(boltzmann, xvals[xvals<95], yvals[xvals<95], p0= bltz_init) y_b = boltzmann(xvals, popt_b[0], popt_b[1]) y_b_avg = np.sum(y_b)/float(len(y)) SSreg_b = np.sum((y_b_avg - y_b)**2) SStot_b = np.sum((y_b_avg - yvals)**2) R2_b = SSreg_b/float(SStot_b) plt.close() plt.plot(xvals, yvals) plt.plot(xvals, y_log) plt.title('Boltzmann Fit Graph - R^2 is {0}'.format(R2_b)) plt.xlabel('$l$ (in units radius)') plt.ylabel('Frequency') plt.savefig(pathb+'Boltzmann_mod{0}.png'.format(counter)) # Cure Fit Gumbel popt_g, pcov_g = opt.curve_fit(gumbel, xvals[xvals<95], yvals[xvals<95] , p0 = log_init) y_g = gumbel(xvals, popt_g[0], popt_g[1], popt_g[2]) y_g_avg = np.sum(y_g)/float(len(y)) SSreg_g = np.sum((y_g_avg - y_g)**2) SStot_g = np.sum((y_g_avg - yvals)**2) R2_g = SSreg_g/float(SStot_g) plt.close() plt.plot(xvals, yvals) plt.plot(xvals, y_g) plt.title('Gumbel Fit Graph - R^2 is {0}'.format(R2_g)) plt.xlabel('$l$ (in units radius)') plt.ylabel('Frequency') plt.savefig(pathg + 'Gumbel_mod{0}.png'.format(counter)) plt.close() return R2_b, R2_log, R2_g a = os.listdir("C:\Users\Abhinav\Desktop\AdvPhyLab\checkin3\AdvPhyLab") pathy = "C:\\Users\\Abhinav\\Desktop\\AdvPhyLab\\checkin3\\pure_data_analysis\\" bpath = "C:\\Users\\Abhinav\\Desktop\\AdvPhyLab\\checkin3\\pure_data_analysis\\Boltzmann\\" lpath = "C:\\Users\\Abhinav\\Desktop\\AdvPhyLab\\checkin3\\pure_data_analysis\\Logistic\\" gpath = "C:\\Users\\Abhinav\\Desktop\\AdvPhyLab\\checkin3\\pure_data_analysis\\Gumbel\\" filenames = [] for name in a: if '_centers' in name: filenames.append(name) bolt = [] loggy = [] gummy = [] boltm = [] loggym = [] gummym = [] l = 0 for filename in filenames: R2_b, R2_log, R2_g = runner(bpath, gpath, lpath, pathy+ filename, l) R2_bm, R2_logm, R2_gm = runnermod(bpath, gpath, lpath, pathy+ filename, l) bolt.append(R2_b) loggy.append(R2_log) gummy.append(R2_g) boltm.append(R2_bm) loggym.append(R2_logm) gummym.append(R2_gm) l+=1 f = file("Results.txt", 'a') np.savetxt(f, [bolt, loggy, gummy, boltm, loggym, gummym]) def avg(arr): return sum(arr)/float(len(arr)) print 'Boltz: ', avg(bolt),'Logist: ', avg(loggy),'Gumbel: ', avg(gummy) print 'Boltz_mod: ', avg(boltm),'Logist_mod: ', avg(loggym),'Gumbel_mod: ', avg(gummym)
28.970732
95
0.678565
1,066
5,939
3.611632
0.146341
0.023377
0.028052
0.014026
0.774026
0.773247
0.725455
0.720519
0.720519
0.665455
0
0.050653
0.135713
5,939
204
96
29.112745
0.699396
0.027446
0
0.571429
0
0
0.160411
0.064093
0
0
0
0
0
0
null
null
0
0.034014
null
null
0.013605
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
1
0
0
0
0
0
0
0
0
6
fb01d0fb61d7cbc6850d32b784441fe7c5ba9d5b
42,016
py
Python
tests/models/test_dataset.py
foobarbecue/pyDataverse
b0f73e95a498412e15f26c02e17de3c049c7efb8
[ "MIT" ]
21
2020-12-29T18:19:26.000Z
2022-03-19T15:19:01.000Z
tests/models/test_dataset.py
foobarbecue/pyDataverse
b0f73e95a498412e15f26c02e17de3c049c7efb8
[ "MIT" ]
92
2020-12-09T15:36:59.000Z
2022-03-22T21:16:10.000Z
tests/models/test_dataset.py
foobarbecue/pyDataverse
b0f73e95a498412e15f26c02e17de3c049c7efb8
[ "MIT" ]
19
2019-05-06T18:46:05.000Z
2020-12-07T20:54:52.000Z
"""Dataset data model tests.""" import json import os import platform import pytest from pyDataverse.models import Dataset from ..conftest import test_config def read_file(filename, mode="r"): """Read in a file. Parameters ---------- filename : str Filename with full path. mode : str Read mode of file. Defaults to `r`. See more at https://docs.python.org/3.5/library/functions.html#open Returns ------- str Returns data as string. """ with open(filename, mode) as f: return f.read() def write_json(filename, data, mode="w", encoding="utf-8"): """Write data to a json file. Parameters ---------- filename : str Filename with full path. data : dict Data to be written in the json file. mode : str Write mode of file. Defaults to `w`. See more at https://docs.python.org/3/library/functions.html#open """ with open(filename, mode, encoding=encoding) as f: json.dump(data, f, indent=2) def data_object(): """Get Dataset object. Returns ------- pydataverse.models.Dataset :class:`Dataset` object. """ return Dataset() def dict_flat_set_min(): """Get flat dict for set() of minimum Dataset. Returns ------- dict Flat dict with minimum Dataset data. """ return { "title": "Darwin's Finches", "author": [{"authorName": "Finch, Fiona", "authorAffiliation": "Birds Inc."}], "datasetContact": [ { "datasetContactEmail": "finch@mailinator.com", "datasetContactName": "Finch, Fiona", } ], "dsDescription": [ { "dsDescriptionValue": "Darwin's finches (also known as the Galápagos finches) are a group of about fifteen species of passerine birds." } ], "subject": ["Medicine, Health and Life Sciences"], "citation_displayName": "Citation Metadata", } def dict_flat_set_full(): """Get flat dict for set() of full Dataset. Returns ------- dict Flat dict with full Dataset data. """ return { "license": "CC0", "termsOfUse": "CC0 Waiver", "termsOfAccess": "Terms of Access", "fileAccessRequest": True, "protocol": "doi", "authority": "10.11587", "identifier": "6AQBYW", "citation_displayName": "Citation Metadata", "title": "Replication Data for: Title", "subtitle": "Subtitle", "alternativeTitle": "Alternative Title", "alternativeURL": "http://AlternativeURL.org", "otherId": [ {"otherIdAgency": "OtherIDAgency1", "otherIdValue": "OtherIDIdentifier1"} ], "author": [ { "authorName": "LastAuthor1, FirstAuthor1", "authorAffiliation": "AuthorAffiliation1", "authorIdentifierScheme": "ORCID", "authorIdentifier": "AuthorIdentifier1", } ], "datasetContact": [ { "datasetContactName": "LastContact1, FirstContact1", "datasetContactAffiliation": "ContactAffiliation1", "datasetContactEmail": "ContactEmail1@mailinator.com", } ], "dsDescription": [ { "dsDescriptionValue": "DescriptionText2", "dsDescriptionDate": "1000-02-02", } ], "subject": [ "Agricultural Sciences", "Business and Management", "Engineering", "Law", ], "keyword": [ { "keywordValue": "KeywordTerm1", "keywordVocabulary": "KeywordVocabulary1", "keywordVocabularyURI": "http://KeywordVocabularyURL1.org", } ], "topicClassification": [ { "topicClassValue": "Topic Class Value1", "topicClassVocab": "Topic Classification Vocabulary", "topicClassVocabURI": "https://topic.class/vocab/uri", } ], "publication": [ { "publicationCitation": "RelatedPublicationCitation1", "publicationIDType": "ark", "publicationIDNumber": "RelatedPublicationIDNumber1", "publicationURL": "http://RelatedPublicationURL1.org", } ], "notesText": "Notes1", "producer": [ { "producerName": "LastProducer1, FirstProducer1", "producerAffiliation": "ProducerAffiliation1", "producerAbbreviation": "ProducerAbbreviation1", "producerURL": "http://ProducerURL1.org", "producerLogoURL": "http://ProducerLogoURL1.org", } ], "productionDate": "1003-01-01", "productionPlace": "ProductionPlace", "contributor": [ { "contributorType": "Data Collector", "contributorName": "LastContributor1, FirstContributor1", } ], "grantNumber": [ { "grantNumberAgency": "GrantInformationGrantAgency1", "grantNumberValue": "GrantInformationGrantNumber1", } ], "distributor": [ { "distributorName": "LastDistributor1, FirstDistributor1", "distributorAffiliation": "DistributorAffiliation1", "distributorAbbreviation": "DistributorAbbreviation1", "distributorURL": "http://DistributorURL1.org", "distributorLogoURL": "http://DistributorLogoURL1.org", } ], "distributionDate": "1004-01-01", "depositor": "LastDepositor, FirstDepositor", "dateOfDeposit": "1002-01-01", "timePeriodCovered": [ { "timePeriodCoveredStart": "1005-01-01", "timePeriodCoveredEnd": "1005-01-02", } ], "dateOfCollection": [ {"dateOfCollectionStart": "1006-01-01", "dateOfCollectionEnd": "1006-01-01"} ], "kindOfData": ["KindOfData1", "KindOfData2"], "language": ["German"], "series": { "seriesName": "SeriesName", "seriesInformation": "SeriesInformation", }, "software": [ {"softwareName": "SoftwareName1", "softwareVersion": "SoftwareVersion1"} ], "relatedMaterial": ["RelatedMaterial1", "RelatedMaterial2"], "relatedDatasets": ["RelatedDatasets1", "RelatedDatasets2"], "otherReferences": ["OtherReferences1", "OtherReferences2"], "dataSources": ["DataSources1", "DataSources2"], "originOfSources": "OriginOfSources", "characteristicOfSources": "CharacteristicOfSourcesNoted", "accessToSources": "DocumentationAndAccessToSources", "geospatial_displayName": "Geospatial Metadata", "geographicCoverage": [ { "country": "Afghanistan", "state": "GeographicCoverageStateProvince1", "city": "GeographicCoverageCity1", "otherGeographicCoverage": "GeographicCoverageOther1", } ], "geographicUnit": ["GeographicUnit1", "GeographicUnit2"], "geographicBoundingBox": [ { "westLongitude": "10", "eastLongitude": "20", "northLongitude": "30", "southLongitude": "40", } ], "socialscience_displayName": "Social Science and Humanities Metadata", "unitOfAnalysis": ["UnitOfAnalysis1", "UnitOfAnalysis2"], "universe": ["Universe1", "Universe2"], "timeMethod": "TimeMethod", "dataCollector": "LastDataCollector1, FirstDataCollector1", "collectorTraining": "CollectorTraining", "frequencyOfDataCollection": "Frequency", "samplingProcedure": "SamplingProcedure", "targetSampleSize": { "targetSampleActualSize": "100", "targetSampleSizeFormula": "TargetSampleSizeFormula", }, "deviationsFromSampleDesign": "MajorDeviationsForSampleDesign", "collectionMode": "CollectionMode", "researchInstrument": "TypeOfResearchInstrument", "dataCollectionSituation": "CharacteristicsOfDataCollectionSituation", "actionsToMinimizeLoss": "ActionsToMinimizeLosses", "controlOperations": "ControlOperations", "weighting": "Weighting", "cleaningOperations": "CleaningOperations", "datasetLevelErrorNotes": "StudyLevelErrorNotes", "responseRate": "ResponseRate", "samplingErrorEstimates": "EstimatesOfSamplingError", "otherDataAppraisal": "OtherFormsOfDataAppraisal", "socialScienceNotes": { "socialScienceNotesType": "NotesType", "socialScienceNotesSubject": "NotesSubject", "socialScienceNotesText": "NotesText", }, "journal_displayName": "Journal Metadata", "journalVolumeIssue": [ { "journalVolume": "JournalVolume1", "journalIssue": "JournalIssue1", "journalPubDate": "1008-01-01", } ], "journalArticleType": "abstract", } def object_data_init(): """Get dictionary for Dataset with initial attributes. Returns ------- dict Dictionary of init data attributes set. """ return { "_Dataset_default_json_format": "dataverse_upload", "_Dataset_default_json_schema_filename": test_config[ "dataset_upload_schema_filename" ], "_Dataset_allowed_json_formats": [ "dataverse_upload", "dataverse_download", "dspace", "custom", ], "_Dataset_json_dataverse_upload_attr": json_dataverse_upload_attr(), "_internal_attributes": [], } def object_data_min(): """Get dictionary for Dataset with minimum attributes. Returns ------- pyDataverse.Dataset :class:`Dataset` with minimum attributes set. """ return { "title": "Darwin's Finches", "author": [{"authorName": "Finch, Fiona", "authorAffiliation": "Birds Inc."}], "datasetContact": [ { "datasetContactEmail": "finch@mailinator.com", "datasetContactName": "Finch, Fiona", } ], "dsDescription": [ { "dsDescriptionValue": "Darwin's finches (also known as the Galápagos finches) are a group of about fifteen species of passerine birds." } ], "subject": ["Medicine, Health and Life Sciences"], "citation_displayName": "Citation Metadata", } def object_data_full(): """Get dictionary for Dataset with full attributes. Returns ------- pyDataverse.Dataset :class:`Dataset` with full attributes set. """ return { "license": "CC0", "termsOfUse": "CC0 Waiver", "termsOfAccess": "Terms of Access", "fileAccessRequest": True, "protocol": "doi", "authority": "10.11587", "identifier": "6AQBYW", "citation_displayName": "Citation Metadata", "title": "Replication Data for: Title", "subtitle": "Subtitle", "alternativeTitle": "Alternative Title", "alternativeURL": "http://AlternativeURL.org", "otherId": [ {"otherIdAgency": "OtherIDAgency1", "otherIdValue": "OtherIDIdentifier1"} ], "author": [ { "authorName": "LastAuthor1, FirstAuthor1", "authorAffiliation": "AuthorAffiliation1", "authorIdentifierScheme": "ORCID", "authorIdentifier": "AuthorIdentifier1", } ], "datasetContact": [ { "datasetContactName": "LastContact1, FirstContact1", "datasetContactAffiliation": "ContactAffiliation1", "datasetContactEmail": "ContactEmail1@mailinator.com", } ], "dsDescription": [ { "dsDescriptionValue": "DescriptionText2", "dsDescriptionDate": "1000-02-02", } ], "subject": [ "Agricultural Sciences", "Business and Management", "Engineering", "Law", ], "keyword": [ { "keywordValue": "KeywordTerm1", "keywordVocabulary": "KeywordVocabulary1", "keywordVocabularyURI": "http://KeywordVocabularyURL1.org", } ], "topicClassification": [ { "topicClassValue": "Topic Class Value1", "topicClassVocab": "Topic Classification Vocabulary", "topicClassVocabURI": "https://topic.class/vocab/uri", } ], "publication": [ { "publicationCitation": "RelatedPublicationCitation1", "publicationIDType": "ark", "publicationIDNumber": "RelatedPublicationIDNumber1", "publicationURL": "http://RelatedPublicationURL1.org", } ], "notesText": "Notes1", "producer": [ { "producerName": "LastProducer1, FirstProducer1", "producerAffiliation": "ProducerAffiliation1", "producerAbbreviation": "ProducerAbbreviation1", "producerURL": "http://ProducerURL1.org", "producerLogoURL": "http://ProducerLogoURL1.org", } ], "productionDate": "1003-01-01", "productionPlace": "ProductionPlace", "contributor": [ { "contributorType": "Data Collector", "contributorName": "LastContributor1, FirstContributor1", } ], "grantNumber": [ { "grantNumberAgency": "GrantInformationGrantAgency1", "grantNumberValue": "GrantInformationGrantNumber1", } ], "distributor": [ { "distributorName": "LastDistributor1, FirstDistributor1", "distributorAffiliation": "DistributorAffiliation1", "distributorAbbreviation": "DistributorAbbreviation1", "distributorURL": "http://DistributorURL1.org", "distributorLogoURL": "http://DistributorLogoURL1.org", } ], "distributionDate": "1004-01-01", "depositor": "LastDepositor, FirstDepositor", "dateOfDeposit": "1002-01-01", "timePeriodCovered": [ { "timePeriodCoveredStart": "1005-01-01", "timePeriodCoveredEnd": "1005-01-02", } ], "dateOfCollection": [ {"dateOfCollectionStart": "1006-01-01", "dateOfCollectionEnd": "1006-01-01"} ], "kindOfData": ["KindOfData1", "KindOfData2"], "language": ["German"], "series": { "seriesName": "SeriesName", "seriesInformation": "SeriesInformation", }, "software": [ {"softwareName": "SoftwareName1", "softwareVersion": "SoftwareVersion1"} ], "relatedMaterial": ["RelatedMaterial1", "RelatedMaterial2"], "relatedDatasets": ["RelatedDatasets1", "RelatedDatasets2"], "otherReferences": ["OtherReferences1", "OtherReferences2"], "dataSources": ["DataSources1", "DataSources2"], "originOfSources": "OriginOfSources", "characteristicOfSources": "CharacteristicOfSourcesNoted", "accessToSources": "DocumentationAndAccessToSources", "geospatial_displayName": "Geospatial Metadata", "geographicCoverage": [ { "country": "Afghanistan", "state": "GeographicCoverageStateProvince1", "city": "GeographicCoverageCity1", "otherGeographicCoverage": "GeographicCoverageOther1", } ], "geographicUnit": ["GeographicUnit1", "GeographicUnit2"], "geographicBoundingBox": [ { "westLongitude": "10", "eastLongitude": "20", "northLongitude": "30", "southLongitude": "40", } ], "socialscience_displayName": "Social Science and Humanities Metadata", "unitOfAnalysis": ["UnitOfAnalysis1", "UnitOfAnalysis2"], "universe": ["Universe1", "Universe2"], "timeMethod": "TimeMethod", "dataCollector": "LastDataCollector1, FirstDataCollector1", "collectorTraining": "CollectorTraining", "frequencyOfDataCollection": "Frequency", "samplingProcedure": "SamplingProcedure", "targetSampleSize": { "targetSampleActualSize": "100", "targetSampleSizeFormula": "TargetSampleSizeFormula", }, "deviationsFromSampleDesign": "MajorDeviationsForSampleDesign", "collectionMode": "CollectionMode", "researchInstrument": "TypeOfResearchInstrument", "dataCollectionSituation": "CharacteristicsOfDataCollectionSituation", "actionsToMinimizeLoss": "ActionsToMinimizeLosses", "controlOperations": "ControlOperations", "weighting": "Weighting", "cleaningOperations": "CleaningOperations", "datasetLevelErrorNotes": "StudyLevelErrorNotes", "responseRate": "ResponseRate", "samplingErrorEstimates": "EstimatesOfSamplingError", "otherDataAppraisal": "OtherFormsOfDataAppraisal", "socialScienceNotes": { "socialScienceNotesType": "NotesType", "socialScienceNotesSubject": "NotesSubject", "socialScienceNotesText": "NotesText", }, "journal_displayName": "Journal Metadata", "journalVolumeIssue": [ { "journalVolume": "JournalVolume1", "journalIssue": "JournalIssue1", "journalPubDate": "1008-01-01", } ], "journalArticleType": "abstract", } def dict_flat_get_min(): """Get flat dict for :func:`get` with minimum data of Dataset. Returns ------- dict Minimum Dataset dictionary returned by :func:`get`. """ return { "title": "Darwin's Finches", "author": [{"authorName": "Finch, Fiona", "authorAffiliation": "Birds Inc."}], "datasetContact": [ { "datasetContactEmail": "finch@mailinator.com", "datasetContactName": "Finch, Fiona", } ], "dsDescription": [ { "dsDescriptionValue": "Darwin's finches (also known as the Galápagos finches) are a group of about fifteen species of passerine birds." }, ], "subject": ["Medicine, Health and Life Sciences"], "citation_displayName": "Citation Metadata", } def dict_flat_get_full(): """Get flat dict for :func:`get` of full data of Dataset. Returns ------- dict Full Datafile dictionary returned by :func:`get`. """ return { "license": "CC0", "termsOfUse": "CC0 Waiver", "termsOfAccess": "Terms of Access", "fileAccessRequest": True, "protocol": "doi", "authority": "10.11587", "identifier": "6AQBYW", "title": "Replication Data for: Title", "subtitle": "Subtitle", "alternativeTitle": "Alternative Title", "alternativeURL": "http://AlternativeURL.org", "otherId": [ {"otherIdAgency": "OtherIDAgency1", "otherIdValue": "OtherIDIdentifier1"} ], "author": [ { "authorName": "LastAuthor1, FirstAuthor1", "authorAffiliation": "AuthorAffiliation1", "authorIdentifierScheme": "ORCID", "authorIdentifier": "AuthorIdentifier1", } ], "datasetContact": [ { "datasetContactName": "LastContact1, FirstContact1", "datasetContactAffiliation": "ContactAffiliation1", "datasetContactEmail": "ContactEmail1@mailinator.com", } ], "dsDescription": [ { "dsDescriptionValue": "DescriptionText2", "dsDescriptionDate": "1000-02-02", } ], "subject": [ "Agricultural Sciences", "Business and Management", "Engineering", "Law", ], "keyword": [ { "keywordValue": "KeywordTerm1", "keywordVocabulary": "KeywordVocabulary1", "keywordVocabularyURI": "http://KeywordVocabularyURL1.org", } ], "topicClassification": [ { "topicClassValue": "Topic Class Value1", "topicClassVocab": "Topic Classification Vocabulary", "topicClassVocabURI": "https://topic.class/vocab/uri", } ], "publication": [ { "publicationCitation": "RelatedPublicationCitation1", "publicationIDType": "ark", "publicationIDNumber": "RelatedPublicationIDNumber1", "publicationURL": "http://RelatedPublicationURL1.org", } ], "notesText": "Notes1", "producer": [ { "producerName": "LastProducer1, FirstProducer1", "producerAffiliation": "ProducerAffiliation1", "producerAbbreviation": "ProducerAbbreviation1", "producerURL": "http://ProducerURL1.org", "producerLogoURL": "http://ProducerLogoURL1.org", } ], "productionDate": "1003-01-01", "productionPlace": "ProductionPlace", "contributor": [ { "contributorType": "Data Collector", "contributorName": "LastContributor1, FirstContributor1", } ], "grantNumber": [ { "grantNumberAgency": "GrantInformationGrantAgency1", "grantNumberValue": "GrantInformationGrantNumber1", } ], "distributor": [ { "distributorName": "LastDistributor1, FirstDistributor1", "distributorAffiliation": "DistributorAffiliation1", "distributorAbbreviation": "DistributorAbbreviation1", "distributorURL": "http://DistributorURL1.org", "distributorLogoURL": "http://DistributorLogoURL1.org", } ], "distributionDate": "1004-01-01", "depositor": "LastDepositor, FirstDepositor", "dateOfDeposit": "1002-01-01", "timePeriodCovered": [ { "timePeriodCoveredStart": "1005-01-01", "timePeriodCoveredEnd": "1005-01-02", } ], "dateOfCollection": [ {"dateOfCollectionStart": "1006-01-01", "dateOfCollectionEnd": "1006-01-01"} ], "kindOfData": ["KindOfData1", "KindOfData2"], "language": ["German"], "series": { "seriesName": "SeriesName", "seriesInformation": "SeriesInformation", }, "software": [ {"softwareName": "SoftwareName1", "softwareVersion": "SoftwareVersion1"} ], "relatedMaterial": ["RelatedMaterial1", "RelatedMaterial2"], "relatedDatasets": ["RelatedDatasets1", "RelatedDatasets2"], "otherReferences": ["OtherReferences1", "OtherReferences2"], "dataSources": ["DataSources1", "DataSources2"], "originOfSources": "OriginOfSources", "characteristicOfSources": "CharacteristicOfSourcesNoted", "accessToSources": "DocumentationAndAccessToSources", "geospatial_displayName": "Geospatial Metadata", "geographicCoverage": [ { "country": "Afghanistan", "state": "GeographicCoverageStateProvince1", "city": "GeographicCoverageCity1", "otherGeographicCoverage": "GeographicCoverageOther1", } ], "geographicUnit": ["GeographicUnit1", "GeographicUnit2"], "geographicBoundingBox": [ { "westLongitude": "10", "eastLongitude": "20", "northLongitude": "30", "southLongitude": "40", } ], "socialscience_displayName": "Social Science and Humanities Metadata", "unitOfAnalysis": ["UnitOfAnalysis1", "UnitOfAnalysis2"], "universe": ["Universe1", "Universe2"], "timeMethod": "TimeMethod", "dataCollector": "LastDataCollector1, FirstDataCollector1", "collectorTraining": "CollectorTraining", "frequencyOfDataCollection": "Frequency", "samplingProcedure": "SamplingProcedure", "targetSampleSize": { "targetSampleActualSize": "100", "targetSampleSizeFormula": "TargetSampleSizeFormula", }, "deviationsFromSampleDesign": "MajorDeviationsForSampleDesign", "collectionMode": "CollectionMode", "researchInstrument": "TypeOfResearchInstrument", "dataCollectionSituation": "CharacteristicsOfDataCollectionSituation", "actionsToMinimizeLoss": "ActionsToMinimizeLosses", "controlOperations": "ControlOperations", "weighting": "Weighting", "cleaningOperations": "CleaningOperations", "datasetLevelErrorNotes": "StudyLevelErrorNotes", "responseRate": "ResponseRate", "samplingErrorEstimates": "EstimatesOfSamplingError", "otherDataAppraisal": "OtherFormsOfDataAppraisal", "socialScienceNotes": { "socialScienceNotesType": "NotesType", "socialScienceNotesSubject": "NotesSubject", "socialScienceNotesText": "NotesText", }, "journal_displayName": "Journal Metadata", "journalVolumeIssue": [ { "journalVolume": "JournalVolume1", "journalIssue": "JournalIssue1", "journalPubDate": "1008-01-01", } ], "journalArticleType": "abstract", "citation_displayName": "Citation Metadata", } def json_upload_min(): """Get JSON string of minimum Dataset. Returns ------- str JSON string. """ return read_file(test_config["dataset_upload_min_filename"]) def json_upload_full(): """Get JSON string of full Dataset. Returns ------- str JSON string. """ return read_file(test_config["dataset_upload_full_filename"]) def json_dataverse_upload_attr(): """List of attributes import or export in format `dataverse_upload`. Returns ------- list List of attributes, which will be used for import and export. """ return [ "license", "termsOfUse", "termsOfAccess", "fileAccessRequest", "protocol", "authority", "identifier", "citation_displayName", "title", "subtitle", "alternativeTitle", "alternativeURL", "otherId", "author", "datasetContact", "dsDescription", "subject", "keyword", "topicClassification", "publication", "notesText", "producer", "productionDate", "productionPlace", "contributor", "grantNumber", "distributor", "distributionDate", "depositor", "dateOfDeposit", "timePeriodCovered", "dateOfCollection", "kindOfData", "language", "series", "software", "relatedMaterial", "relatedDatasets", "otherReferences", "dataSources", "originOfSources", "characteristicOfSources", "accessToSources", "geospatial_displayName", "geographicCoverage", "geographicUnit", "geographicBoundingBox", "socialscience_displayName", "unitOfAnalysis", "universe", "timeMethod", "dataCollector", "collectorTraining", "frequencyOfDataCollection", "samplingProcedure", "targetSampleSize", "deviationsFromSampleDesign", "collectionMode", "researchInstrument", "dataCollectionSituation", "actionsToMinimizeLoss", "controlOperations", "weighting", "cleaningOperations", "datasetLevelErrorNotes", "responseRate", "samplingErrorEstimates", "otherDataAppraisal", "socialScienceNotes", "journal_displayName", "journalVolumeIssue", "journalArticleType", ] def json_dataverse_upload_required_attr(): """List of attributes required for `dataverse_upload` JSON. Returns ------- list List of attributes, which will be used for import and export. """ return ["title", "author", "datasetContact", "dsDescription", "subject"] class TestDatasetGeneric(object): """Generic tests for Dataset().""" def test_dataset_set_and_get_valid(self): """Test Dataset.get() with valid data.""" data = [ ((dict_flat_set_min(), object_data_min()), dict_flat_get_min()), ((dict_flat_set_full(), object_data_full()), dict_flat_get_full()), (({}, {}), {}), ] pdv = data_object() pdv.set(dict_flat_set_min()) assert isinstance(pdv.get(), dict) for input, data_eval in data: pdv = data_object() pdv.set(input[0]) data = pdv.get() for key, val in data_eval.items(): assert data[key] == input[1][key] == data_eval[key] assert len(data) == len(input[1]) == len(data_eval) def test_dataset_set_invalid(self): """Test Dataset.set() with invalid data.""" # invalid data for data in test_config["invalid_set_types"]: with pytest.raises(AssertionError): pdv = data_object() pdv.set(data) def test_dataset_validate_json_valid(self): """Test Dataset.validate_json() with valid data.""" data = [ ((dict_flat_set_min(), {}), True), ((dict_flat_set_full(), {}), True), ((dict_flat_set_min(), {"data_format": "dataverse_upload"}), True), ( ( dict_flat_set_min(), { "data_format": "dataverse_upload", "filename_schema": test_config[ "dataset_upload_schema_filename" ], }, ), True, ), ( ( dict_flat_set_min(), {"filename_schema": test_config["dataset_upload_schema_filename"]}, ), True, ), ] for input, data_eval in data: pdv = data_object() pdv.set(input[0]) assert pdv.validate_json() == data_eval class TestDatasetSpecific(object): """Specific tests for Dataset().""" def test_dataset_from_json_valid(self): """Test Dataset.from_json() with valid data.""" data = [ (({json_upload_min()}, {}), object_data_min()), (({json_upload_full()}, {}), object_data_full()), ( ({json_upload_min()}, {"data_format": "dataverse_upload"}), object_data_min(), ), (({json_upload_min()}, {"validate": False}), object_data_min()), ( ({json_upload_min()}, {"filename_schema": "", "validate": False},), object_data_min(), ), ( ({json_upload_min()}, {"filename_schema": "wrong", "validate": False},), object_data_min(), ), ( ( {json_upload_min()}, { "filename_schema": test_config[ "dataset_upload_schema_filename" ], "validate": True, }, ), object_data_min(), ), ] for input, data_eval in data: pdv = data_object() args = input[0] kwargs = input[1] pdv.from_json(*args, **kwargs) for key, val in data_eval.items(): assert getattr(pdv, key) == data_eval[key] assert len(pdv.__dict__) - len(object_data_init()) == len(data_eval) def test_dataset_to_json_valid(self): """Test Dataset.json() with valid data.""" data = [ ((dict_flat_set_min(), {}), json.loads(json_upload_min())), ((dict_flat_set_full(), {}), json.loads(json_upload_full())), ( (dict_flat_set_min(), {"data_format": "dataverse_upload"}), json.loads(json_upload_min()), ), ( (dict_flat_set_min(), {"validate": False}), json.loads(json_upload_min()), ), ( (dict_flat_set_min(), {"filename_schema": "", "validate": False},), json.loads(json_upload_min()), ), ( (dict_flat_set_min(), {"filename_schema": "wrong", "validate": False},), json.loads(json_upload_min()), ), ( ( dict_flat_set_min(), { "filename_schema": test_config[ "dataset_upload_schema_filename" ], "validate": True, }, ), json.loads(json_upload_min()), ), ] pdv = data_object() pdv.set(dict_flat_set_min()) assert isinstance(pdv.json(), str) # TODO: recursevily test values of lists and dicts for input, data_eval in data: pdv = data_object() pdv.set(input[0]) kwargs = input[1] data = json.loads(pdv.json(**kwargs)) assert data assert isinstance(data, dict) assert len(data) == len(data_eval) assert len(data["datasetVersion"]["metadataBlocks"]["citation"]) == len( data_eval["datasetVersion"]["metadataBlocks"]["citation"] ) assert len( data["datasetVersion"]["metadataBlocks"]["citation"]["fields"] ) == len( data_eval["datasetVersion"]["metadataBlocks"]["citation"]["fields"] ) def test_dataset_init_valid(self): """Test Dataset.__init__() with valid data.""" # specific data = [ (Dataset(), {}), (Dataset(dict_flat_set_min()), object_data_min()), (Dataset(dict_flat_set_full()), object_data_full()), (Dataset({}), {}), ] for pdv, data_eval in data: for key, val in data_eval.items(): assert getattr(pdv, key) == data_eval[key] assert len(pdv.__dict__) - len(object_data_init()) == len(data_eval) def test_dataset_init_invalid(self): """Test Dataset.init() with invalid data.""" pdv = Dataset() # invalid data for data in test_config["invalid_set_types"]: with pytest.raises(AssertionError): pdv.set(data) def test_dataset_from_json_invalid(self): """Test Dataset.from_json() with invalid data.""" # invalid data for data in test_config["invalid_json_data_types"]: with pytest.raises(AssertionError): pdv = data_object() pdv.from_json(data, validate=False) if int(platform.python_version_tuple()[1]) >= 5: for json_string in test_config["invalid_json_strings"]: with pytest.raises(json.decoder.JSONDecodeError): pdv = data_object() pdv.from_json(json_string, validate=False) else: for json_string in test_config["invalid_json_strings"]: with pytest.raises(ValueError): pdv = data_object() pdv.from_json(json_string, validate=False) # invalid `filename_schema` for filename_schema in test_config["invalid_filename_strings"]: with pytest.raises(FileNotFoundError): pdv = data_object() pdv.from_json(json_upload_min(), filename_schema=filename_schema) for filename_schema in test_config["invalid_filename_types"]: with pytest.raises(AssertionError): pdv = data_object() pdv.from_json(json_upload_min(), filename_schema=filename_schema) # invalid `data_format` for data_format in ( test_config["invalid_data_format_types"] + test_config["invalid_data_format_strings"] ): with pytest.raises(AssertionError): pdv = data_object() pdv.from_json( json_upload_min(), data_format=data_format, validate=False ) # invalid `validate` for validate in test_config["invalid_validate_types"]: with pytest.raises(AssertionError): pdv = data_object() pdv.from_json(json_upload_min(), validate=validate) def test_dataset_to_json_invalid(self): """Test Dataset.json() with non-valid data.""" # invalid `filename_schema` for filename_schema in test_config["invalid_filename_strings"]: with pytest.raises(FileNotFoundError): obj = data_object() obj.json(filename_schema=filename_schema) for filename_schema in test_config["invalid_filename_types"]: with pytest.raises(AssertionError): pdv = data_object() pdv.json(filename_schema=filename_schema) # invalid `data_format` for data_format in ( test_config["invalid_data_format_types"] + test_config["invalid_data_format_strings"] ): with pytest.raises(AssertionError): pdv = data_object() pdv.set(dict_flat_set_min()) pdv.json(data_format=data_format, validate=False) # invalid `validate` for validate in test_config["invalid_validate_types"]: with pytest.raises(AssertionError): pdv = data_object() pdv.set(dict_flat_set_min()) pdv.json(validate=validate) def test_dataset_validate_json_invalid(self): """Test Dataset.validate_json() with non-valid data.""" # invalid `filename_schema` for filename_schema in test_config["invalid_filename_strings"]: with pytest.raises(FileNotFoundError): pdv = data_object() pdv.set(dict_flat_set_min()) pdv.validate_json(filename_schema=filename_schema) for filename_schema in test_config["invalid_filename_types"]: with pytest.raises(AssertionError): pdv = data_object() pdv.set(dict_flat_set_min()) pdv.validate_json(filename_schema=filename_schema) if not os.environ.get("TRAVIS"): class TestDatasetSpecificTravisNot(object): """Generic tests for Dataset(), not running on Travis (no file-write permissions).""" def test_dataset_to_json_from_json_valid(self): """Test Dataset to JSON from JSON with valid data.""" data = [ (dict_flat_set_min(), {}), (dict_flat_set_full(), {}), (dict_flat_set_min(), {"data_format": "dataverse_upload"}), (dict_flat_set_min(), {"validate": False}), (dict_flat_set_min(), {"filename_schema": "wrong", "validate": False},), ( dict_flat_set_min(), { "filename_schema": test_config[ "dataset_upload_schema_filename" ], "validate": True, }, ), ] for data_set, kwargs_from in data: kwargs = {} pdv_start = data_object() pdv_start.set(data_set) if "validate" in kwargs_from: if not kwargs_from["validate"]: kwargs = {"validate": False} write_json( test_config["dataset_json_output_filename"], json.loads(pdv_start.json(**kwargs)), ) pdv_end = data_object() kwargs = kwargs_from pdv_end.from_json( read_file(test_config["dataset_json_output_filename"]), **kwargs ) for key, val in pdv_end.get().items(): assert getattr(pdv_start, key) == getattr(pdv_end, key) assert len(pdv_start.__dict__) == len(pdv_end.__dict__,)
34.89701
151
0.54296
2,882
42,016
7.734212
0.148855
0.012921
0.014805
0.015074
0.845671
0.816689
0.778107
0.769134
0.757784
0.737236
0
0.016945
0.33423
42,016
1,203
152
34.926018
0.779895
0.066927
0
0.64526
0
0.003058
0.410886
0.105035
0
0
0
0.000831
0.026504
1
0.025484
false
0.003058
0.006116
0
0.04791
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
348e11bbb68f9db68d064e65e4141b61d5eda118
178
py
Python
exampleapp/api/views.py
martinpeck/flask-api-starter
0599c492f3baca8c0db3a771746e4b99907b2d2f
[ "MIT" ]
null
null
null
exampleapp/api/views.py
martinpeck/flask-api-starter
0599c492f3baca8c0db3a771746e4b99907b2d2f
[ "MIT" ]
1
2021-04-20T20:00:34.000Z
2021-04-20T20:00:34.000Z
exampleapp/api/views.py
martinpeck/flask-api-starter
0599c492f3baca8c0db3a771746e4b99907b2d2f
[ "MIT" ]
null
null
null
from . import api @api.route('/', methods=['GET']) def index(): return {'hello': 'world'} @api.route('/test', methods=['GET']) def test(): return {'hello': 'testing'}
16.181818
36
0.573034
22
178
4.636364
0.590909
0.156863
0.254902
0
0
0
0
0
0
0
0
0
0.162921
178
11
37
16.181818
0.684564
0
0
0
0
0
0.189944
0
0
0
0
0
0
1
0.285714
true
0
0.142857
0.285714
0.714286
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
6
55117faf6b8f7038e6f017bf75c3131581f305ce
19,805
py
Python
tests/schrodinger/test_glide.py
jharrymoore/Icolos
c60cc00c34208ab7011d41d52a74651763673e7a
[ "Apache-2.0" ]
11
2022-01-30T14:36:13.000Z
2022-03-22T09:40:57.000Z
tests/schrodinger/test_glide.py
jharrymoore/Icolos
c60cc00c34208ab7011d41d52a74651763673e7a
[ "Apache-2.0" ]
2
2022-03-23T07:56:49.000Z
2022-03-24T12:01:42.000Z
tests/schrodinger/test_glide.py
jharrymoore/Icolos
c60cc00c34208ab7011d41d52a74651763673e7a
[ "Apache-2.0" ]
8
2022-01-28T10:32:31.000Z
2022-03-22T09:40:59.000Z
import os import time import unittest from icolos.core.workflow_steps.schrodinger.glide import StepGlide from icolos.utils.enums.step_enums import StepBaseEnum, TokenGuardEnum, StepGlideEnum from icolos.utils.enums.program_parameters import GlideEnum from tests.tests_paths import ( PATHS_1UYD, PATHS_EXAMPLEDATA, get_1UYD_ligands_as_Compounds, ) from icolos.utils.general.files_paths import attach_root_path _SBE = StepBaseEnum _SGE = StepGlideEnum() _EE = GlideEnum() _TE = TokenGuardEnum() class Test_Glide(unittest.TestCase): @classmethod def setUpClass(cls): cls._test_dir = attach_root_path("tests/junk/Glide") if not os.path.isdir(cls._test_dir): os.makedirs(cls._test_dir) def setUp(self): self._1UYD_compounds = get_1UYD_ligands_as_Compounds( abs_path=PATHS_1UYD.LIGANDS ) self.receptor_path = PATHS_1UYD.GRID_PATH self.receptor_constraints_path = PATHS_1UYD.GRID_CONSTRAINTS_PATH @classmethod def tearDownClass(cls): pass def test_Glide_run(self): step_conf = { _SBE.STEPID: "01_glide", _SBE.STEP_TYPE: _SBE.STEP_GLIDE, _SBE.EXEC: { _SBE.EXEC_PREFIXEXECUTION: "module load schrodinger/2021-2-js-aws", _SBE.EXEC_PARALLELIZATION: { _SBE.EXEC_PARALLELIZATION_CORES: 4, _SBE.EXEC_PARALLELIZATION_MAXLENSUBLIST: 2, }, _SBE.EXEC_FAILUREPOLICY: {_SBE.EXEC_FAILUREPOLICY_NTRIES: 1}, }, _SBE.SETTINGS: { _SBE.SETTINGS_ARGUMENTS: { _SBE.SETTINGS_ARGUMENTS_FLAGS: [], _SBE.SETTINGS_ARGUMENTS_PARAMETERS: {_EE.GLIDE_HOST: "cpu-only"}, }, _SBE.SETTINGS_ADDITIONAL: { _SGE.CONFIGURATION: { _EE.GLIDE_AMIDE_MODE: "trans", _EE.GLIDE_EXPANDED_SAMPLING: "True", _EE.GLIDE_GRIDFILE: [self.receptor_path], _EE.GLIDE_NENHANCED_SAMPLING: "1", _EE.GLIDE_POSE_OUTTYPE: _EE.GLIDE_POSE_OUTTYPE_LIGANDLIB, _EE.GLIDE_POSES_PER_LIG: "3", _EE.GLIDE_POSTDOCK_NPOSE: "25", _EE.GLIDE_POSTDOCKSTRAIN: "True", _EE.GLIDE_PRECISION: "SP", _EE.GLIDE_REWARD_INTRA_HBONDS: "True", } }, }, } glide_step = StepGlide(**step_conf) glide_step.data.compounds = self._1UYD_compounds glide_step.execute() self.assertEqual(len(glide_step.get_compounds()), 15) self.assertEqual(len(glide_step.get_compounds()[0][0].get_conformers()), 3) self.assertListEqual( list( glide_step.get_compounds()[0][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-1.5198, 11.3439, 24.0245], ) self.assertListEqual( list( glide_step.get_compounds()[14][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-2.1655, 12.4809, 24.137], ) self.assertEqual( glide_step.get_compounds()[0][0][0] .get_molecule() .GetProp(_SBE.ANNOTATION_TAG_DOCKING_SCORE), "-8.4349", ) self.assertEqual( glide_step.get_compounds()[0][0][1] .get_molecule() .GetProp(_SBE.ANNOTATION_TAG_DOCKING_SCORE), "-7.83118", ) self.assertEqual( glide_step.get_compounds()[0][0][2] .get_molecule() .GetProp(_SBE.ANNOTATION_TAG_DOCKING_SCORE), "-6.0089", ) # check SDF write-out out_path = os.path.join(self._test_dir, "glide_docked.sdf") glide_step.write_conformers(out_path) stat_inf = os.stat(out_path) self.assertGreater(stat_inf.st_size, 209000) def test_Glide_run_parallelization_1core_singleton(self): step_conf = { _SBE.STEPID: "01_glide", _SBE.STEP_TYPE: _SBE.STEP_GLIDE, _SBE.EXEC: { _SBE.EXEC_PREFIXEXECUTION: "module load schrodinger/2021-2-js-aws", _SBE.EXEC_PARALLELIZATION: { _SBE.EXEC_PARALLELIZATION_CORES: 1, _SBE.EXEC_PARALLELIZATION_MAXLENSUBLIST: 1, }, _SBE.EXEC_FAILUREPOLICY: {_SBE.EXEC_FAILUREPOLICY_NTRIES: 1}, }, _SBE.SETTINGS: { _SBE.SETTINGS_ARGUMENTS: { _SBE.SETTINGS_ARGUMENTS_FLAGS: [], _SBE.SETTINGS_ARGUMENTS_PARAMETERS: {_EE.GLIDE_HOST: "cpu-only"}, }, _SBE.SETTINGS_ADDITIONAL: { _SGE.CONFIGURATION: { _EE.GLIDE_AMIDE_MODE: "trans", _EE.GLIDE_EXPANDED_SAMPLING: "True", _EE.GLIDE_GRIDFILE: [self.receptor_path], _EE.GLIDE_NENHANCED_SAMPLING: "1", _EE.GLIDE_POSE_OUTTYPE: _EE.GLIDE_POSE_OUTTYPE_LIGANDLIB, _EE.GLIDE_POSES_PER_LIG: "3", _EE.GLIDE_POSTDOCK_NPOSE: "25", _EE.GLIDE_POSTDOCKSTRAIN: "True", _EE.GLIDE_PRECISION: "SP", _EE.GLIDE_REWARD_INTRA_HBONDS: "True", } }, }, } compounds = self._1UYD_compounds[:3] glide_step = StepGlide(**step_conf) glide_step.data.compounds = compounds # execute on one core and put all in one list time_difference = time.time() glide_step.execute() time_difference = time.time() - time_difference self.assertGreater(time_difference, 100) self.assertGreater(325, time_difference) self.assertEqual(len(glide_step.get_compounds()), 3) self.assertEqual(len(glide_step.get_compounds()[0][0].get_conformers()), 3) self.assertListEqual( list( glide_step.get_compounds()[0][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-1.5198, 11.3439, 24.0245], ) # check SDF write-out out_path = os.path.join( self._test_dir, "glide_docked_single_core_singleton_list.sdf" ) glide_step.write_conformers(out_path) stat_inf = os.stat(out_path) self.assertGreater(stat_inf.st_size, 50500) def test_Glide_run_1_core(self): step_conf = { _SBE.STEPID: "01_glide", _SBE.STEP_TYPE: _SBE.STEP_GLIDE, _SBE.EXEC: { _SBE.EXEC_PREFIXEXECUTION: "module load schrodinger/2021-2-js-aws", _SBE.EXEC_PARALLELIZATION: {_SBE.EXEC_PARALLELIZATION_CORES: 1}, _SBE.EXEC_FAILUREPOLICY: {_SBE.EXEC_FAILUREPOLICY_NTRIES: 1}, }, _SBE.SETTINGS: { _SBE.SETTINGS_ARGUMENTS: { _SBE.SETTINGS_ARGUMENTS_FLAGS: [], _SBE.SETTINGS_ARGUMENTS_PARAMETERS: {_EE.GLIDE_HOST: "cpu-only"}, }, _SBE.SETTINGS_ADDITIONAL: { _SGE.CONFIGURATION: { _EE.GLIDE_AMIDE_MODE: "trans", _EE.GLIDE_EXPANDED_SAMPLING: "True", _EE.GLIDE_GRIDFILE: [self.receptor_path], _EE.GLIDE_NENHANCED_SAMPLING: "1", _EE.GLIDE_POSE_OUTTYPE: _EE.GLIDE_POSE_OUTTYPE_LIGANDLIB, _EE.GLIDE_POSES_PER_LIG: "3", _EE.GLIDE_POSTDOCK_NPOSE: "25", _EE.GLIDE_POSTDOCKSTRAIN: "True", _EE.GLIDE_PRECISION: "SP", _EE.GLIDE_REWARD_INTRA_HBONDS: "True", } }, }, } compounds = self._1UYD_compounds[:3] glide_step = StepGlide(**step_conf) glide_step.data.compounds = compounds # execute on one core and put all in one list time_difference = time.time() glide_step.execute() time_difference = time.time() - time_difference self.assertGreater(325, time_difference) self.assertEqual(len(glide_step.get_compounds()), 3) self.assertEqual(len(glide_step.get_compounds()[0][0].get_conformers()), 3) self.assertListEqual( list( glide_step.get_compounds()[0][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-1.5198, 11.3439, 24.0245], ) # check SDF write-out out_path = os.path.join( self._test_dir, "glide_docked_merged_list_3compounds.sdf" ) glide_step.write_conformers(out_path) stat_inf = os.stat(out_path) self.assertGreater(stat_inf.st_size, 50500) def test_Glide_run_parallelization_4cores(self): step_conf = { _SBE.STEPID: "01_glide", _SBE.STEP_TYPE: _SBE.STEP_GLIDE, _SBE.EXEC: { _SBE.EXEC_PREFIXEXECUTION: "module load schrodinger/2021-2-js-aws", _SBE.EXEC_PARALLELIZATION: {_SBE.EXEC_PARALLELIZATION_CORES: 4}, _SBE.EXEC_FAILUREPOLICY: {_SBE.EXEC_FAILUREPOLICY_NTRIES: 1}, }, _SBE.SETTINGS: { _SBE.SETTINGS_ARGUMENTS: { _SBE.SETTINGS_ARGUMENTS_FLAGS: [], _SBE.SETTINGS_ARGUMENTS_PARAMETERS: {_EE.GLIDE_HOST: "cpu-only"}, }, _SBE.SETTINGS_ADDITIONAL: { _SGE.CONFIGURATION: { _EE.GLIDE_AMIDE_MODE: "trans", _EE.GLIDE_EXPANDED_SAMPLING: "True", _EE.GLIDE_GRIDFILE: [self.receptor_path], _EE.GLIDE_NENHANCED_SAMPLING: "1", _EE.GLIDE_POSE_OUTTYPE: _EE.GLIDE_POSE_OUTTYPE_LIGANDLIB, _EE.GLIDE_POSES_PER_LIG: "3", _EE.GLIDE_POSTDOCK_NPOSE: "25", _EE.GLIDE_POSTDOCKSTRAIN: "True", _EE.GLIDE_PRECISION: "SP", _EE.GLIDE_REWARD_INTRA_HBONDS: "True", } }, }, } compounds = self._1UYD_compounds[:3] glide_step = StepGlide(**step_conf) glide_step.data.compounds = compounds # execute and put all in one list time_difference = time.time() glide_step.execute() time_difference = time.time() - time_difference self.assertGreater(150, time_difference) self.assertEqual(len(glide_step.get_compounds()), 3) self.assertEqual(len(glide_step.get_compounds()[0][0].get_conformers()), 3) self.assertListEqual( list( glide_step.get_compounds()[0][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-1.5198, 11.3439, 24.0245], ) # check SDF write-out out_path = os.path.join( self._test_dir, "glide_docked_parallelized_3compounds.sdf" ) glide_step.write_conformers(out_path) stat_inf = os.stat(out_path) self.assertGreater(stat_inf.st_size, 50500) def test_Glide_run_parallelization_4cores_in_file_usage(self): step_conf = { _SBE.STEPID: "01_glide", _SBE.STEP_TYPE: _SBE.STEP_GLIDE, _SBE.EXEC: { _SBE.EXEC_PREFIXEXECUTION: "module load schrodinger/2021-2-js-aws", _SBE.EXEC_PARALLELIZATION: {_SBE.EXEC_PARALLELIZATION_CORES: 4}, _SBE.EXEC_FAILUREPOLICY: {_SBE.EXEC_FAILUREPOLICY_NTRIES: 1}, }, _SBE.SETTINGS: { _SBE.SETTINGS_ARGUMENTS: { _SBE.SETTINGS_ARGUMENTS_FLAGS: [], _SBE.SETTINGS_ARGUMENTS_PARAMETERS: {_EE.GLIDE_HOST: "cpu-only"}, }, _SBE.SETTINGS_ADDITIONAL: { _SGE.CONFIGURATION: { _EE.GLIDE_AMIDE_MODE: "trans", _EE.GLIDE_EXPANDED_SAMPLING: "True", _EE.GLIDE_GRIDFILE: [self.receptor_constraints_path], _EE.GLIDE_NENHANCED_SAMPLING: "1", _EE.GLIDE_POSE_OUTTYPE: _EE.GLIDE_POSE_OUTTYPE_LIGANDLIB, _EE.GLIDE_POSES_PER_LIG: "3", _EE.GLIDE_POSTDOCK_NPOSE: "25", _EE.GLIDE_POSTDOCKSTRAIN: "True", _EE.GLIDE_PRECISION: "SP", _EE.GLIDE_REWARD_INTRA_HBONDS: "True", }, _SGE.MAESTRO_IN_FILE: { _SGE.MAESTRO_IN_FILE_PATH: PATHS_EXAMPLEDATA.GLIDE_EXAMPLE_IN }, }, }, } compounds = self._1UYD_compounds[:3] glide_step = StepGlide(**step_conf) glide_step.data.compounds = compounds glide_step.execute() # execute on one core and put all in one list self.assertEqual(len(glide_step.get_compounds()), 3) self.assertEqual(len(glide_step.get_compounds()[0][0].get_conformers()), 3) # would be [-2.5618, 10.8202, 25.2644] without constraints self.assertListEqual( list( glide_step.get_compounds()[0][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [3.1229, 4.5141, 24.8603], ) # check SDF write-out out_path = os.path.join( self._test_dir, "glide_docked_parallelized_3compounds.sdf" ) glide_step.write_conformers(out_path) stat_inf = os.stat(out_path) self.assertGreater(stat_inf.st_size, 50500) def test_Glide_run_parallelization_4cores_ensemble_docking(self): step_conf = { _SBE.STEPID: "01_glide", _SBE.STEP_TYPE: _SBE.STEP_GLIDE, _SBE.EXEC: { _SBE.EXEC_PREFIXEXECUTION: "module load schrodinger/2021-2-js-aws", _SBE.EXEC_PARALLELIZATION: {_SBE.EXEC_PARALLELIZATION_CORES: 4}, _SBE.EXEC_FAILUREPOLICY: {_SBE.EXEC_FAILUREPOLICY_NTRIES: 1}, }, _SBE.SETTINGS: { _SBE.SETTINGS_ARGUMENTS: { _SBE.SETTINGS_ARGUMENTS_FLAGS: [], _SBE.SETTINGS_ARGUMENTS_PARAMETERS: {_EE.GLIDE_HOST: "cpu-only"}, }, _SBE.SETTINGS_ADDITIONAL: { _SGE.CONFIGURATION: { _EE.GLIDE_AMIDE_MODE: "trans", _EE.GLIDE_EXPANDED_SAMPLING: "True", _EE.GLIDE_GRIDFILE: [ self.receptor_constraints_path, self.receptor_path, ], _EE.GLIDE_NENHANCED_SAMPLING: "1", _EE.GLIDE_POSE_OUTTYPE: _EE.GLIDE_POSE_OUTTYPE_LIGANDLIB, _EE.GLIDE_POSES_PER_LIG: "3", _EE.GLIDE_POSTDOCK_NPOSE: "25", _EE.GLIDE_POSTDOCKSTRAIN: "True", _EE.GLIDE_PRECISION: "SP", _EE.GLIDE_REWARD_INTRA_HBONDS: "True", }, _SBE.GRID_IDS: ["mygrid1", "mygrid2"], }, }, } compounds = self._1UYD_compounds[:3] glide_step = StepGlide(**step_conf) glide_step.data.compounds = compounds # execute on one core and put all in one list glide_step.execute() self.assertEqual(len(glide_step.get_compounds()), 3) self.assertEqual(len(glide_step.get_compounds()[0][0].get_conformers()), 6) self.assertListEqual( list( glide_step.get_compounds()[0][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-1.5198, 11.3439, 24.0245], ) self.assertListEqual( list( glide_step.get_compounds()[0][0][5] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-1.6072, 10.8798, 24.1289], ) self.assertListEqual( ["mygrid2", "mygrid2", "mygrid1", "mygrid1", "mygrid1", "mygrid2"], [ comp.get_molecule().GetProp(_SBE.ANNOTATION_GRID_ID) for comp in list(glide_step.get_compounds()[0][0]) ], ) # check SDF write-out out_path = os.path.join( self._test_dir, "glide_docked_parallelized_ensemble_docking.sdf" ) glide_step.write_conformers(out_path) stat_inf = os.stat(out_path) self.assertGreater(stat_inf.st_size, 80000) def test_Glide_run_parallelization_poseviewer(self): step_conf = { _SBE.STEPID: "01_glide", _SBE.STEP_TYPE: _SBE.STEP_GLIDE, _SBE.EXEC: { _SBE.EXEC_PREFIXEXECUTION: "module load schrodinger/2021-2-js-aws", _SBE.EXEC_PARALLELIZATION: {_SBE.EXEC_PARALLELIZATION_CORES: 4}, _SBE.EXEC_FAILUREPOLICY: {_SBE.EXEC_FAILUREPOLICY_NTRIES: 1}, }, _SBE.SETTINGS: { _SBE.SETTINGS_ARGUMENTS: { _SBE.SETTINGS_ARGUMENTS_FLAGS: [], _SBE.SETTINGS_ARGUMENTS_PARAMETERS: {_EE.GLIDE_HOST: "cpu-only"}, }, _SBE.SETTINGS_ADDITIONAL: { _SGE.CONFIGURATION: { _EE.GLIDE_AMIDE_MODE: "trans", _EE.GLIDE_EXPANDED_SAMPLING: "True", _EE.GLIDE_GRIDFILE: [self.receptor_path], _EE.GLIDE_NENHANCED_SAMPLING: "1", _EE.GLIDE_POSE_OUTTYPE: _EE.GLIDE_POSE_OUTTYPE_POSEVIEWER, _EE.GLIDE_POSES_PER_LIG: "3", _EE.GLIDE_POSTDOCK_NPOSE: "25", _EE.GLIDE_POSTDOCKSTRAIN: "True", _EE.GLIDE_PRECISION: "SP", _EE.GLIDE_REWARD_INTRA_HBONDS: "True", } }, }, } compounds = self._1UYD_compounds[:3] glide_step = StepGlide(**step_conf) glide_step.data.compounds = compounds # execute on one core and put all in one list glide_step.execute() self.assertEqual(len(glide_step.get_compounds()), 3) self.assertEqual(len(glide_step.get_compounds()[0][0].get_conformers()), 3) self.assertListEqual( list( glide_step.get_compounds()[0][0][0] .get_molecule() .GetConformer(0) .GetPositions()[0] ), [-1.5198, 11.3439, 24.0245], ) # check SDF write-out out_path = os.path.join( self._test_dir, "glide_docked_parallelized_3compounds_pv.sdf" ) glide_step.write_conformers(out_path) stat_inf = os.stat(out_path) self.assertGreater(stat_inf.st_size, 50500)
38.757339
85
0.536834
1,962
19,805
5.006626
0.102956
0.05986
0.032984
0.057722
0.875191
0.860837
0.860837
0.85422
0.828057
0.819403
0
0.035646
0.365413
19,805
510
86
38.833333
0.745942
0.022621
0
0.691796
0
0
0.046169
0.022025
0
0
0
0
0.084257
1
0.022173
false
0.002217
0.017738
0
0.042129
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
9b3e9d455874392b39b9a8a367b09175a4b23264
21,059
py
Python
input_generation.py
bobelly/MA_MLforKIMMDY
33839e004d4303d85095144a33d1f7d28bfa9c19
[ "MIT" ]
null
null
null
input_generation.py
bobelly/MA_MLforKIMMDY
33839e004d4303d85095144a33d1f7d28bfa9c19
[ "MIT" ]
null
null
null
input_generation.py
bobelly/MA_MLforKIMMDY
33839e004d4303d85095144a33d1f7d28bfa9c19
[ "MIT" ]
1
2021-10-18T07:26:46.000Z
2021-10-18T07:26:46.000Z
from numpy.core.numeric import outer import tensorflow as tf import os import numpy as np import kgcnn from kgcnn.utils.adj import coordinates_to_distancematrix,define_adjacency_from_distance, distance_to_gauss_basis, get_angle_indices, sort_edge_indices from kgcnn.utils.data import save_pickle_file,load_pickle_file, ragged_tensor_from_nested_numpy from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from ase.io import read from utils import get_distance def generate_input_data(input_dir, output_dir): """ Generates nodes, edges, coordinates and distances lists from .pdb files Args: input_dir (str): direction for the .pdb files output_dir (str): output direction """ search_path = input_dir filelist = [f for f in os.listdir(search_path) if os.path.isfile(os.path.join(search_path, f))] base_list = [x.split(".")[0].split("_")[0] + "_" + x.split(".")[0].split("_")[1] for x in filelist] base_set = sorted(set(base_list)) all_nodes = [] all_edges = [] all_labels = [] all_atoms = [] for x in base_set: mol1 = read(search_path+x+"_1.pdb") an1 = mol1.get_atomic_numbers() n_1 = mol1.get_global_number_of_atoms() pos1 = mol1.positions mol2 = read(search_path+x+"_2.pdb") n_2 = mol2.get_global_number_of_atoms() an2 = mol2.get_atomic_numbers() pos2 = mol2.positions nodes1 = np.concatenate((np.array([0]),an1),axis=0) edges1 = np.concatenate((np.array([pos2[0]]),pos1),axis=0) nodes2 = np.concatenate((np.array([0]),an2),axis=0) edges2 = np.concatenate((np.array([pos1[0]]),pos2),axis=0) arr = np.load(search_path+x+".npz", allow_pickle=True) arr = np.expand_dims(arr[arr.files[0]], axis=0)[0] if 'e_max' in arr and 'e_00' in arr and 'e_10' in arr: lab1 = arr['e_max'] - arr['e_00'] lab2 = arr['e_max'] - arr['e_10'] all_labels.append(lab1) all_labels.append(lab2) all_nodes.append(nodes1) all_nodes.append(nodes2) all_edges.append(edges1) all_edges.append(edges2) all_atoms.append(n_1) all_atoms.append(n_2) dist = [coordinates_to_distancematrix(x) for x in all_edges] adj = [define_adjacency_from_distance(x,max_distance=8, max_neighbours=25)[0] for x in dist] edge_indices = [define_adjacency_from_distance(x,max_distance=8, max_neighbours=25)[1] for x in dist] edge_dist = [distance_to_gauss_basis(dist[i][adj[i]], bins=40, distance=8, sigma=0.4) for i in range(len(adj))] save_pickle_file(all_edges, output_dir + "cr_coord.pickle") save_pickle_file(all_nodes, output_dir + "cr_nodes.pickle",) save_pickle_file(edge_dist, output_dir + "cr_edges.pickle",) save_pickle_file(edge_indices, output_dir + "cr_indices.pickle") np.save(output_dir + "cr_atoms.npy", all_atoms) np.save(output_dir + "cr_labels.npy",all_labels) def generate_input_data_cutoff(input_dir, output_dir, cutoff_dist): """ Generates nodes, edges, coordinates and distances lists from .pdb files with a cutoff distance Args: input_dir (str): direction for the .pdb files output_dir (str): output direction cutoff_dist (int): distance for cutoff (in Angsroem) """ search_path = input_dir filelist = [f for f in os.listdir(search_path) if os.path.isfile(os.path.join(search_path, f))] base_list = [x.split(".")[0].split("_")[0] + "_" + x.split(".")[0].split("_")[1] for x in filelist] base_set = sorted(set(base_list)) threshold = cutoff_dist all_nodes = [] all_edges = [] all_labels = [] all_atoms = [] all_nodes_high = [] all_edges_high = [] all_labels_high = [] all_atoms_high = [] for x in base_set: mol1 = read(search_path+x+"_1.pdb") an1 = mol1.get_atomic_numbers() pos1 = mol1.positions n_1 = mol1.get_global_number_of_atoms() mol2 = read(search_path+x+"_2.pdb") an2 = mol2.get_atomic_numbers() pos2 = mol2.positions n_2 = mol2.get_global_number_of_atoms() nodes1 = np.concatenate((np.array([0]),an1),axis=0) edges1 = np.concatenate((np.array([pos2[0]]),pos1),axis=0) nodes2 = np.concatenate((np.array([0]),an2),axis=0) edges2 = np.concatenate((np.array([pos1[0]]),pos2),axis=0) dist = get_distance(edges1[0,:], edges2[0,:]) arr = np.load(search_path+x+".npz", allow_pickle=True) arr = np.expand_dims(arr[arr.files[0]], axis=0)[0] if 'e_max' in arr and 'e_00' in arr and 'e_10' in arr: lab1 = arr['e_max'] - arr['e_00'] lab2 = arr['e_max'] - arr['e_10'] if dist < threshold: all_labels.append(lab1) all_labels.append(lab2) all_nodes.append(nodes1) all_nodes.append(nodes2) all_edges.append(edges1) all_edges.append(edges2) all_atoms.append(n_1) all_atoms.append(n_2) else: all_nodes_high.append(nodes1) all_nodes_high.append(nodes2) all_labels_high.append(lab1) all_labels_high.append(lab2) all_edges_high.append(edges1) all_edges_high.append(edges2) all_atoms_high.append(n_1) all_atoms_high.append(n_2) dist = [coordinates_to_distancematrix(x) for x in all_edges] adj = [define_adjacency_from_distance(x,max_distance=3, max_neighbours=25)[0] for x in dist] edge_indices = [define_adjacency_from_distance(x,max_distance=3, max_neighbours=25)[1] for x in dist] edge_dist = [distance_to_gauss_basis(dist[i][adj[i]], bins=40, distance=8, sigma=0.4) for i in range(len(adj))] dist = [coordinates_to_distancematrix(x) for x in all_edges_high] adj = [define_adjacency_from_distance(x,max_distance=3, max_neighbours=25)[0] for x in dist] edge_indices_high = [define_adjacency_from_distance(x,max_distance=3, max_neighbours=25)[1] for x in dist] edge_dist_high = [distance_to_gauss_basis(dist[i][adj[i]], bins=40, distance=8, sigma=0.4) for i in range(len(adj))] save_pickle_file(all_edges, output_dir+str(cutoff_dist)+"_low_cr_coord.pickle") save_pickle_file(all_nodes, output_dir+str(cutoff_dist)+"_low_cr_nodes.pickle",) save_pickle_file(edge_dist, output_dir+str(cutoff_dist)+"_low_cr_edges.pickle",) save_pickle_file(edge_indices, output_dir+str(cutoff_dist)+"_low_cr_indices.pickle") np.save(output_dir+str(cutoff_dist)+"_low_cr_labels.npy",all_labels) np.save(output_dir+str(cutoff_dist)+"_low_cr_atoms.npy",all_atoms) save_pickle_file(all_edges_high, output_dir+str(cutoff_dist)+"_high_cr_coord.pickle") save_pickle_file(all_nodes_high, output_dir+str(cutoff_dist)+"_high_cr_nodes.pickle",) save_pickle_file(edge_dist_high, output_dir+str(cutoff_dist)+"_high_cr_edges.pickle",) save_pickle_file(edge_indices_high, output_dir+str(cutoff_dist)+"_high_cr_indices.pickle") np.save(output_dir+str(cutoff_dist)+"_high_cr_labels.npy",all_labels_high) np.save(output_dir+str(cutoff_dist)+"_high_cr_atoms.npy",all_atoms_high) def painn_dataset(input_dir, split_size): """Creates PaiNN graph input Args: input_dir (str): input direction with files created using generate_input_data function split_size (int): test size Return: xtrain (ragged tensor): training data xtest (ragged tensor): test data xval (ragged tensor): validation data ytrain (ragged tensor): training labels ytest (ragged tensor): test labels yval (ragged tensor): validation labels scaler: scaler config for later rescaling of the data """ # load Dataset y_data = np.expand_dims(np.load(input_dir+"cr_labels.npy"),axis=-1) nodes = load_pickle_file(input_dir+"cr_nodes.pickle") coord = load_pickle_file(input_dir+"cr_coord.pickle") equivariant = [np.zeros((len(x), 128, 3)) for x in nodes] dist = [coordinates_to_distancematrix(x) for x in coord] edge_indices = [define_adjacency_from_distance(x, max_distance=5, max_neighbours=25)[1] for x in dist] edge_indices = [x if x[0,1]==1 else sort_edge_indices(np.concatenate([np.array([[0, 1], [1,0]]), x], axis=0)) for x in edge_indices] del dist # Frees some memory # Should check again the data function to ensure that radical and hydrogen are on top an edge between them exists. radical_node_index = [np.array([[0, 1]]) for _ in edge_indices] radical_edge_index = [np.array([[0]]) for _ in radical_node_index] scaler = StandardScaler(copy=True) labels = scaler.fit_transform(y_data) # Train Test split labels_new, labels_val, nodes_new, nodes_val, equi_new, equi_val, coord_new, coord_val, \ edge_indices_new, edge_indices_val, radical_node_index_new, radical_node_index_val, radical_edge_index_new, radical_edge_index_val= train_test_split(labels, nodes, equivariant, coord, edge_indices, radical_node_index, radical_edge_index, test_size=split_size) del labels, nodes, equivariant, coord, edge_indices, radical_node_index , radical_edge_index, # Train Test split labels_train, labels_test, nodes_train, nodes_test, equi_train, equi_test, coord_train, coord_test, \ edge_indices_train, edge_indices_test, radical_node_index_train, radical_node_index_test, radical_edge_index_train, \ radical_edge_index_test= train_test_split( labels_new, nodes_new, equi_new, coord_new, edge_indices_new, radical_node_index_new, radical_edge_index_new, test_size=split_size) del labels_new, nodes_new, equi_new, coord_new, edge_indices_new # Convert to tf.RaggedTensor or tf.tensor # a copy of the data is generated by ragged_tensor_from_nested_numpy() nodes_train, equi_train, coord_train, edge_indices_train, radical_node_index_train, radical_edge_index_train = ragged_tensor_from_nested_numpy( nodes_train), ragged_tensor_from_nested_numpy(equi_train), ragged_tensor_from_nested_numpy(coord_train), ragged_tensor_from_nested_numpy( edge_indices_train), ragged_tensor_from_nested_numpy(radical_node_index_train), ragged_tensor_from_nested_numpy(radical_edge_index_train) nodes_test, equi_test, coord_test, edge_indices_test, radical_node_index_test, radical_edge_index_test = ragged_tensor_from_nested_numpy( nodes_test), ragged_tensor_from_nested_numpy(equi_test), ragged_tensor_from_nested_numpy(coord_test), ragged_tensor_from_nested_numpy( edge_indices_test), ragged_tensor_from_nested_numpy(radical_node_index_test), ragged_tensor_from_nested_numpy(radical_edge_index_test) nodes_val, equi_val, coord_val, edge_indices_val, radical_node_index_val, radical_edge_index_val = ragged_tensor_from_nested_numpy( nodes_val), ragged_tensor_from_nested_numpy(equi_val), ragged_tensor_from_nested_numpy(coord_val), ragged_tensor_from_nested_numpy( edge_indices_val), ragged_tensor_from_nested_numpy(radical_node_index_val), ragged_tensor_from_nested_numpy(radical_edge_index_val) # Define input and output data xtrain = nodes_train, equi_train, coord_train, edge_indices_train, radical_node_index_train, radical_edge_index_train xtest = nodes_test, equi_test, coord_test, edge_indices_test, radical_node_index_test, radical_edge_index_test ytrain = labels_train ytest = labels_test xval = nodes_val, equi_val, coord_val, edge_indices_val, radical_node_index_val, radical_edge_index_val yval = labels_val return(xtrain, xtest, xval, ytrain, ytest, yval, scaler) def schnet_dataset(input_dir, split_size): """ Creates Schnet graph input Args: input_dir (str): input direction with files created using generate_input_data function split_size (int): test size Return: xtrain (ragged tensor): training data xtest (ragged tensor): test data xval (ragged tensor): validation data ytrain (ragged tensor): training labels ytest (ragged tensor): test labels yval (ragged tensor): validation labels scaler: scaler config for later rescaling of the data """ y_data = np.expand_dims(np.load(input_dir+"cr_labels.npy"),axis=-1) nodes = load_pickle_file(input_dir+'cr_nodes.pickle') edges = load_pickle_file(input_dir+"cr_edges.pickle") edge_indices = load_pickle_file(input_dir+"cr_indices.pickle") radical_node_index = [np.expand_dims(x[0],axis=0) for x in edge_indices] radical_edge_index = [np.array([[0]]) for _ in radical_node_index] scaler = StandardScaler(copy=True) labels = scaler.fit_transform(y_data) # Train Test split labels_train, labels_test, nodes_train, nodes_test, edges_train, edges_test, edge_indices_train, edge_indices_test, \ radical_node_index_train, radical_node_index_test, radical_edge_index_train, radical_edge_index_test = train_test_split( labels, nodes, edges, edge_indices, radical_node_index, radical_edge_index, test_size=split_size) del labels, nodes, edges, edge_indices, radical_node_index, radical_edge_index # Free memory after split, if possible # Convert to tf.RaggedTensor or tf.tensor # a copy of the data is generated by ragged_tensor_from_nested_numpy() nodes_train, edges_train, edge_indices_train, radical_node_index_train, radical_edge_index_train = ragged_tensor_from_nested_numpy( nodes_train), ragged_tensor_from_nested_numpy(edges_train), ragged_tensor_from_nested_numpy( edge_indices_train), ragged_tensor_from_nested_numpy(radical_node_index_train), ragged_tensor_from_nested_numpy(radical_edge_index_train) nodes_test, edges_test, edge_indices_test, radical_node_index_test, radical_edge_index_test = ragged_tensor_from_nested_numpy( nodes_test), ragged_tensor_from_nested_numpy(edges_test), ragged_tensor_from_nested_numpy( edge_indices_test), ragged_tensor_from_nested_numpy(radical_node_index_test), ragged_tensor_from_nested_numpy(radical_edge_index_test) # Define input and output data xtrain = nodes_train, edges_train, edge_indices_train, radical_node_index_train, radical_edge_index_train xval = nodes_test, edges_test, edge_indices_test, radical_node_index_test, radical_edge_index_test ytrain = labels_train yval = labels_test return(xtrain,xval,ytrain,yval,scaler) def megnet_dataset(input_dir, split_size): """ Creates MegNet graph input Args: input_dir (str): input direction with files created using generate_input_data function split_size (int): test size Return: xtrain (ragged tensor): training data xtest (ragged tensor): test data xval (ragged tensor): validation data ytrain (ragged tensor): training labels ytest (ragged tensor): test labels yval (ragged tensor): validation labels scaler: scaler config for later rescaling of the data """ y_data = np.expand_dims(np.load(input_dir+"cr_labels.npy"),axis=-1) nodes = load_pickle_file(input_dir+"cr_nodes.pickle") edges = load_pickle_file(input_dir+"cr_edges.pickle") edge_indices = load_pickle_file(input_dir+"cr_indices.pickle") atoms = np.expand_dims(np.load(input_dir+"cr_atoms.npy"), axis=-1) radical_node_index = [np.array([[0, 1]]) for _ in edge_indices] radical_edge_index = [np.array([[0]]) for _ in radical_node_index] scaler = StandardScaler(copy=True) labels = scaler.fit_transform(y_data) # Train Test split labels_train, labels_test, nodes_train, nodes_test, edges_train, edges_test, edge_indices_train, edge_indices_test, \ atoms_train, atoms_test, radical_node_index_train, radical_node_index_test, radical_edge_index_train, \ radical_edge_index_test = train_test_split( labels, nodes, edges, edge_indices, atoms, radical_node_index, radical_edge_index, test_size=split_size) del labels, nodes, edges, edge_indices, atoms, radical_node_index, radical_edge_index # Free memory after split, if possible # Convert to tf.RaggedTensor or tf.tensor # a copy of the data is generated by ragged_tensor_from_nested_numpy() nodes_train, edges_train, edge_indices_train, atoms_train, radical_node_index_train, radical_edge_index_train = ragged_tensor_from_nested_numpy( nodes_train), ragged_tensor_from_nested_numpy(edges_train), ragged_tensor_from_nested_numpy( edge_indices_train), tf.constant(atoms_train), ragged_tensor_from_nested_numpy( radical_node_index_train), ragged_tensor_from_nested_numpy(radical_edge_index_train) nodes_test, edges_test, edge_indices_test, atoms_test, radical_node_index_test, radical_edge_index_test = ragged_tensor_from_nested_numpy( nodes_test), ragged_tensor_from_nested_numpy(edges_test), ragged_tensor_from_nested_numpy( edge_indices_test), tf.constant(atoms_test), ragged_tensor_from_nested_numpy( radical_node_index_test), ragged_tensor_from_nested_numpy(radical_edge_index_test) # Define input and output data xtrain = nodes_train, edges_train, edge_indices_train, atoms_train, radical_node_index_train, radical_edge_index_train xval = nodes_test, edges_test, edge_indices_test, atoms_test, radical_node_index_test, radical_edge_index_test ytrain = labels_train yval = labels_test return(xtrain,xval,ytrain,yval,scaler) def dimenet_dataset(input_dir, split_size): """ Creates DimeNet++ graph input Args: input_dir (str): input direction with files created using generate_input_data function split_size (int): test size Return: xtrain (ragged tensor): training data xtest (ragged tensor): test data xval (ragged tensor): validation data ytrain (ragged tensor): training labels ytest (ragged tensor): test labels yval (ragged tensor): validation labels scaler: scaler config for later rescaling of the data """ y_data = np.expand_dims(np.load(input_dir+"cr_labels.npy"), axis=-1) nodes = load_pickle_file(input_dir+"cr_nodes.pickle") coord = load_pickle_file(input_dir+"cr_coord.pickle") dist = [coordinates_to_distancematrix(x) for x in coord] edge_indices = [define_adjacency_from_distance(x, max_distance=5, max_neighbours=25)[1] for x in dist] edge_indices = [x if x[0,1]==1 else sort_edge_indices(np.concatenate([np.array([[0, 1], [1,0]]), x], axis=0)) for x in edge_indices] angle_indices = [get_angle_indices(x, is_sorted=True)[2] for x in edge_indices] del dist # Frees some memory radical_node_index = [np.array([[0, 1]]) for _ in edge_indices] # für Kohlenstoff radical_edge_index = [np.array([[0]]) for _ in radical_node_index] scaler = StandardScaler(copy=True) labels = scaler.fit_transform(y_data) # Train Test split labels_train, labels_test, nodes_train, nodes_test, coord_train, coord_test, edge_indices_train, edge_indices_test, \ angle_indices_train, angle_indices_test, \ radical_node_index_train, radical_node_index_test, radical_edge_index_train, radical_edge_index_test = train_test_split( labels, nodes, coord, edge_indices, angle_indices, radical_node_index, radical_edge_index, test_size=split_size) del labels, nodes, coord, edge_indices, angle_indices, radical_node_index, radical_edge_index # Free memory after split, if possible # Convert to tf.RaggedTensor or tf.tensor # a copy of the data is generated by ragged_tensor_from_nested_numpy() nodes_train, coord_train, edge_indices_train, angle_indices_train, radical_node_index_train, radical_edge_index_train = ragged_tensor_from_nested_numpy( nodes_train), ragged_tensor_from_nested_numpy(coord_train), ragged_tensor_from_nested_numpy( edge_indices_train), ragged_tensor_from_nested_numpy(angle_indices_train), ragged_tensor_from_nested_numpy( radical_node_index_train), ragged_tensor_from_nested_numpy(radical_edge_index_train) nodes_test, coord_test, edge_indices_test, angle_indices_test, radical_node_index_test, radical_edge_index_test = ragged_tensor_from_nested_numpy( nodes_test), ragged_tensor_from_nested_numpy(coord_test), ragged_tensor_from_nested_numpy( edge_indices_test), ragged_tensor_from_nested_numpy(angle_indices_test), ragged_tensor_from_nested_numpy( radical_node_index_test), ragged_tensor_from_nested_numpy(radical_edge_index_test) # Define input and output data xtrain = nodes_train, coord_train, edge_indices_train, angle_indices_train, radical_node_index_train, radical_edge_index_train xval = nodes_test, coord_test, edge_indices_test, angle_indices_test, radical_node_index_test, radical_edge_index_test ytrain = labels_train yval = labels_test return(xtrain,xval,ytrain,yval,scaler)
53.04534
164
0.735363
3,112
21,059
4.579692
0.066838
0.066517
0.061746
0.0849
0.903873
0.883315
0.864791
0.846197
0.801993
0.79652
0
0.012349
0.173275
21,059
396
165
53.179293
0.806261
0.154091
0
0.548387
0
0
0.03709
0.006172
0
0
0
0
0
1
0.024194
false
0
0.044355
0
0.068548
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
9b66594e6489bb03a311a2f1256d7548d19797f9
31
py
Python
pandas_datareaders_unofficial/__init__.py
movermeyer/pandas_datareaders_unofficial
458dcf473d070cd7686d53d4a9b479cbe0ab9218
[ "BSD-3-Clause" ]
18
2015-02-05T01:42:51.000Z
2020-12-27T19:24:25.000Z
pandas_datareaders_unofficial/__init__.py
movermeyer/pandas_datareaders_unofficial
458dcf473d070cd7686d53d4a9b479cbe0ab9218
[ "BSD-3-Clause" ]
1
2015-01-12T11:08:02.000Z
2015-01-13T09:14:47.000Z
pandas_datareaders_unofficial/__init__.py
femtotrader/pandas_datareaders
458dcf473d070cd7686d53d4a9b479cbe0ab9218
[ "BSD-3-Clause" ]
13
2015-09-10T19:39:51.000Z
2022-01-06T17:08:35.000Z
from .module import DataReader
15.5
30
0.83871
4
31
6.5
1
0
0
0
0
0
0
0
0
0
0
0
0.129032
31
1
31
31
0.962963
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
9b7d5afdb94d1a03ffbdf2fd4aee7458048629b9
142
py
Python
python/illusionist/utils.py
ocefpaf/illusionist
fc4db24230a5ed6f5756df3aacef344fe12fabf3
[ "Apache-2.0" ]
9
2020-06-11T17:09:17.000Z
2021-11-16T13:44:05.000Z
python/illusionist/utils.py
ocefpaf/illusionist
fc4db24230a5ed6f5756df3aacef344fe12fabf3
[ "Apache-2.0" ]
2
2020-08-30T19:58:30.000Z
2021-09-29T02:08:55.000Z
python/illusionist/utils.py
ocefpaf/illusionist
fc4db24230a5ed6f5756df3aacef344fe12fabf3
[ "Apache-2.0" ]
1
2021-09-30T17:20:32.000Z
2021-09-30T17:20:32.000Z
import inspect def get_source(code): """ Return the source code for a module or function """ return inspect.getsource(code)
15.777778
51
0.669014
19
142
4.947368
0.736842
0.212766
0
0
0
0
0
0
0
0
0
0
0.246479
142
8
52
17.75
0.878505
0.330986
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
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
1
0
0
1
0
1
0
0
6
9b9c1ed6fa1ee853bff99d7125bb0a457cf8f15d
983
py
Python
algopy/fft/fft.py
arthus701/algopy
1e2430f803289bbaed6bbdff6c28f98d7767835c
[ "Unlicense" ]
54
2015-03-05T13:38:08.000Z
2021-11-29T11:54:48.000Z
algopy/fft/fft.py
arthus701/algopy
1e2430f803289bbaed6bbdff6c28f98d7767835c
[ "Unlicense" ]
7
2016-04-06T11:25:00.000Z
2020-11-09T13:53:20.000Z
algopy/fft/fft.py
arthus701/algopy
1e2430f803289bbaed6bbdff6c28f98d7767835c
[ "Unlicense" ]
13
2015-01-17T17:05:56.000Z
2021-08-05T01:13:16.000Z
import string import numpy import numpy.linalg import scipy.linalg from algopy import UTPM, Function def fft(a, n=None, axis=-1): """ equivalent to numpy.fft.fft(a, n=None, axis=-1) """ if isinstance(a, UTPM): return UTPM.fft(a, n=n, axis=axis) elif isinstance(a, Function): return Function.fft(a, n=n, axis=axis) elif isinstance(a, numpy.ndarray): return numpy.fft.fft(a, n=n, axis=axis) else: raise NotImplementedError('don\'t know what to do with this instance') def ifft(a, n=None, axis=-1): """ equivalent to numpy.fft.ifft(a, n=None, axis=-1) """ if isinstance(a, UTPM): return UTPM.ifft(a, n=n, axis=axis) elif isinstance(a, Function): return Function.ifft(a, n=n, axis=axis) elif isinstance(a, numpy.ndarray): return numpy.fft.ifft(a, n=n, axis=axis) else: raise NotImplementedError('don\'t know what to do with this instance')
20.914894
78
0.61648
149
983
4.067114
0.234899
0.033003
0.029703
0.069307
0.849835
0.849835
0.815182
0.815182
0.815182
0.689769
0
0.005413
0.24822
983
46
79
21.369565
0.814614
0.099695
0
0.434783
0
0
0.009501
0
0
0
0
0
0
1
0.086957
false
0
0.217391
0
0.565217
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
32d110b3404a920bff8d2ae094508eeb7f47ef45
201
py
Python
pandas/io/json/__init__.py
vimalromeo/pandas
7c14e4f14aff216be558bf5d4d2d00b4838c2360
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
venv/lib/python3.7/site-packages/pandas/io/json/__init__.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
venv/lib/python3.7/site-packages/pandas/io/json/__init__.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
from .json import to_json, read_json, loads, dumps # noqa from .normalize import json_normalize # noqa from .table_schema import build_table_schema # noqa del json, normalize, table_schema # noqa
33.5
58
0.781095
30
201
5
0.433333
0.22
0.2
0
0
0
0
0
0
0
0
0
0.159204
201
5
59
40.2
0.887574
0.094527
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
32e5510f024ecf93e131c4faaaa3be6ac3aaf937
202
py
Python
kirppu_project/test/test_doctests.py
Glowieh/kirppu
95f3e98c594ca7f02ed4ec311da3e558d76ea5b3
[ "MIT" ]
null
null
null
kirppu_project/test/test_doctests.py
Glowieh/kirppu
95f3e98c594ca7f02ed4ec311da3e558d76ea5b3
[ "MIT" ]
null
null
null
kirppu_project/test/test_doctests.py
Glowieh/kirppu
95f3e98c594ca7f02ed4ec311da3e558d76ea5b3
[ "MIT" ]
null
null
null
import doctest from kirppu import util, models def load_tests(loader, tests, ignore): tests.addTests(doctest.DocTestSuite(util)) tests.addTests(doctest.DocTestSuite(models)) return tests
20.2
48
0.762376
25
202
6.12
0.56
0.169935
0.261438
0.418301
0
0
0
0
0
0
0
0
0.148515
202
9
49
22.444444
0.889535
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
6
fd3aa799c6d64745f6c9ba6713857b876d9ada36
43
py
Python
pycroaktools/shapes/__init__.py
20centcroak/PyCroakTools
7bef42ad394636a65a4011cf63e22c40f412df8e
[ "MIT" ]
null
null
null
pycroaktools/shapes/__init__.py
20centcroak/PyCroakTools
7bef42ad394636a65a4011cf63e22c40f412df8e
[ "MIT" ]
null
null
null
pycroaktools/shapes/__init__.py
20centcroak/PyCroakTools
7bef42ad394636a65a4011cf63e22c40f412df8e
[ "MIT" ]
null
null
null
from pycroaktools.shapes.shape import Shape
43
43
0.883721
6
43
6.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.069767
43
1
43
43
0.95
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
fd65438a8775fda19321cc0703c605934afa08ec
17,492
py
Python
pybind/slxos/v17r_2_00/cpu_state/all_partition/cpu_allpart_util/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/cpu_state/all_partition/cpu_allpart_util/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/cpu_state/all_partition/cpu_allpart_util/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from decimal import Decimal from bitarray import bitarray import __builtin__ class cpu_allpart_util(PybindBase): """ This class was auto-generated by the PythonClass plugin for PYANG from YANG module brocade-RAS-operational - based on the path /cpu-state/all-partition/cpu-allpart-util. Each member element of the container is represented as a class variable - with a specific YANG type. YANG Description: CPU utilization percentage of the blade MM/LC """ __slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_rest_name', '_extmethods', '__cpu_blade_name','__cpu_util_current','__cpu_util_user','__cpu_util_kernel','__cpu_util_iowait',) _yang_name = 'cpu-allpart-util' _rest_name = 'cpu-allpart-util' _pybind_generated_by = 'container' def __init__(self, *args, **kwargs): path_helper_ = kwargs.pop("path_helper", None) if path_helper_ is False: self._path_helper = False elif path_helper_ is not None and isinstance(path_helper_, xpathhelper.YANGPathHelper): self._path_helper = path_helper_ elif hasattr(self, "_parent"): path_helper_ = getattr(self._parent, "_path_helper", False) self._path_helper = path_helper_ else: self._path_helper = False extmethods = kwargs.pop("extmethods", None) if extmethods is False: self._extmethods = False elif extmethods is not None and isinstance(extmethods, dict): self._extmethods = extmethods elif hasattr(self, "_parent"): extmethods = getattr(self._parent, "_extmethods", None) self._extmethods = extmethods else: self._extmethods = False self.__cpu_util_user = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-user", rest_name="cpu-util-user", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) self.__cpu_util_iowait = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-iowait", rest_name="cpu-util-iowait", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) self.__cpu_blade_name = YANGDynClass(base=unicode, is_leaf=True, yang_name="cpu-blade-name", rest_name="cpu-blade-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='string', is_config=False) self.__cpu_util_kernel = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-kernel", rest_name="cpu-util-kernel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) self.__cpu_util_current = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-current", rest_name="cpu-util-current", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) load = kwargs.pop("load", None) if args: if len(args) > 1: raise TypeError("cannot create a YANG container with >1 argument") all_attr = True for e in self._pyangbind_elements: if not hasattr(args[0], e): all_attr = False break if not all_attr: raise ValueError("Supplied object did not have the correct attributes") for e in self._pyangbind_elements: nobj = getattr(args[0], e) if nobj._changed() is False: continue setmethod = getattr(self, "_set_%s" % e) if load is None: setmethod(getattr(args[0], e)) else: setmethod(getattr(args[0], e), load=load) def _path(self): if hasattr(self, "_parent"): return self._parent._path()+[self._yang_name] else: return [u'cpu-state', u'all-partition', u'cpu-allpart-util'] def _rest_path(self): if hasattr(self, "_parent"): if self._rest_name: return self._parent._rest_path()+[self._rest_name] else: return self._parent._rest_path() else: return [u'cpu-state', u'all-partition', u'cpu-allpart-util'] def _get_cpu_blade_name(self): """ Getter method for cpu_blade_name, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_blade_name (string) YANG Description: MM/LC name """ return self.__cpu_blade_name def _set_cpu_blade_name(self, v, load=False): """ Setter method for cpu_blade_name, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_blade_name (string) If this variable is read-only (config: false) in the source YANG file, then _set_cpu_blade_name is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_cpu_blade_name() directly. YANG Description: MM/LC name """ parent = getattr(self, "_parent", None) if parent is not None and load is False: raise AttributeError("Cannot set keys directly when" + " within an instantiated list") if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="cpu-blade-name", rest_name="cpu-blade-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='string', is_config=False) except (TypeError, ValueError): raise ValueError({ 'error-string': """cpu_blade_name must be of a type compatible with string""", 'defined-type': "string", 'generated-type': """YANGDynClass(base=unicode, is_leaf=True, yang_name="cpu-blade-name", rest_name="cpu-blade-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='string', is_config=False)""", }) self.__cpu_blade_name = t if hasattr(self, '_set'): self._set() def _unset_cpu_blade_name(self): self.__cpu_blade_name = YANGDynClass(base=unicode, is_leaf=True, yang_name="cpu-blade-name", rest_name="cpu-blade-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='string', is_config=False) def _get_cpu_util_current(self): """ Getter method for cpu_util_current, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_current (decimal64) YANG Description: Current Total CPU utilization """ return self.__cpu_util_current def _set_cpu_util_current(self, v, load=False): """ Setter method for cpu_util_current, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_current (decimal64) If this variable is read-only (config: false) in the source YANG file, then _set_cpu_util_current is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_cpu_util_current() directly. YANG Description: Current Total CPU utilization """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-current", rest_name="cpu-util-current", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) except (TypeError, ValueError): raise ValueError({ 'error-string': """cpu_util_current must be of a type compatible with decimal64""", 'defined-type': "decimal64", 'generated-type': """YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-current", rest_name="cpu-util-current", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False)""", }) self.__cpu_util_current = t if hasattr(self, '_set'): self._set() def _unset_cpu_util_current(self): self.__cpu_util_current = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-current", rest_name="cpu-util-current", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) def _get_cpu_util_user(self): """ Getter method for cpu_util_user, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_user (decimal64) YANG Description: Current CPU utilization by user process """ return self.__cpu_util_user def _set_cpu_util_user(self, v, load=False): """ Setter method for cpu_util_user, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_user (decimal64) If this variable is read-only (config: false) in the source YANG file, then _set_cpu_util_user is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_cpu_util_user() directly. YANG Description: Current CPU utilization by user process """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-user", rest_name="cpu-util-user", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) except (TypeError, ValueError): raise ValueError({ 'error-string': """cpu_util_user must be of a type compatible with decimal64""", 'defined-type': "decimal64", 'generated-type': """YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-user", rest_name="cpu-util-user", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False)""", }) self.__cpu_util_user = t if hasattr(self, '_set'): self._set() def _unset_cpu_util_user(self): self.__cpu_util_user = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-user", rest_name="cpu-util-user", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) def _get_cpu_util_kernel(self): """ Getter method for cpu_util_kernel, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_kernel (decimal64) YANG Description: Current CPU utilization by kernel processes """ return self.__cpu_util_kernel def _set_cpu_util_kernel(self, v, load=False): """ Setter method for cpu_util_kernel, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_kernel (decimal64) If this variable is read-only (config: false) in the source YANG file, then _set_cpu_util_kernel is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_cpu_util_kernel() directly. YANG Description: Current CPU utilization by kernel processes """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-kernel", rest_name="cpu-util-kernel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) except (TypeError, ValueError): raise ValueError({ 'error-string': """cpu_util_kernel must be of a type compatible with decimal64""", 'defined-type': "decimal64", 'generated-type': """YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-kernel", rest_name="cpu-util-kernel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False)""", }) self.__cpu_util_kernel = t if hasattr(self, '_set'): self._set() def _unset_cpu_util_kernel(self): self.__cpu_util_kernel = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-kernel", rest_name="cpu-util-kernel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) def _get_cpu_util_iowait(self): """ Getter method for cpu_util_iowait, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_iowait (decimal64) YANG Description: Current CPU utilization in iowait """ return self.__cpu_util_iowait def _set_cpu_util_iowait(self, v, load=False): """ Setter method for cpu_util_iowait, mapped from YANG variable /cpu_state/all_partition/cpu_allpart_util/cpu_util_iowait (decimal64) If this variable is read-only (config: false) in the source YANG file, then _set_cpu_util_iowait is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_cpu_util_iowait() directly. YANG Description: Current CPU utilization in iowait """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-iowait", rest_name="cpu-util-iowait", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) except (TypeError, ValueError): raise ValueError({ 'error-string': """cpu_util_iowait must be of a type compatible with decimal64""", 'defined-type': "decimal64", 'generated-type': """YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-iowait", rest_name="cpu-util-iowait", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False)""", }) self.__cpu_util_iowait = t if hasattr(self, '_set'): self._set() def _unset_cpu_util_iowait(self): self.__cpu_util_iowait = YANGDynClass(base=RestrictedPrecisionDecimalType(precision=2), is_leaf=True, yang_name="cpu-util-iowait", rest_name="cpu-util-iowait", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-RAS-operational', defining_module='brocade-RAS-operational', yang_type='decimal64', is_config=False) cpu_blade_name = __builtin__.property(_get_cpu_blade_name) cpu_util_current = __builtin__.property(_get_cpu_util_current) cpu_util_user = __builtin__.property(_get_cpu_util_user) cpu_util_kernel = __builtin__.property(_get_cpu_util_kernel) cpu_util_iowait = __builtin__.property(_get_cpu_util_iowait) _pyangbind_elements = {'cpu_blade_name': cpu_blade_name, 'cpu_util_current': cpu_util_current, 'cpu_util_user': cpu_util_user, 'cpu_util_kernel': cpu_util_kernel, 'cpu_util_iowait': cpu_util_iowait, }
60.317241
406
0.7496
2,386
17,492
5.201593
0.076697
0.060914
0.049633
0.045685
0.827331
0.795907
0.766578
0.751027
0.721779
0.715333
0
0.005698
0.137206
17,492
289
407
60.525952
0.816658
0.191173
0
0.44186
0
0.02907
0.32768
0.175244
0
0
0
0
0
1
0.104651
false
0
0.046512
0
0.273256
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
b5dc76ec5329df41516a006dcd2c897b0b60a3e9
9,324
py
Python
tests/test_main.py
WIPACrepo/publication-web-db
f5d77f43c89377449f4fbe952f6b1dcfc458c91a
[ "MIT" ]
null
null
null
tests/test_main.py
WIPACrepo/publication-web-db
f5d77f43c89377449f4fbe952f6b1dcfc458c91a
[ "MIT" ]
16
2020-09-26T00:49:56.000Z
2021-09-09T19:03:42.000Z
tests/test_main.py
WIPACrepo/publication-web-db
f5d77f43c89377449f4fbe952f6b1dcfc458c91a
[ "MIT" ]
null
null
null
import asyncio import pytest from rest_tools.client import AsyncSession from bs4 import BeautifulSoup from pubs.utils import nowstr, add_pub from .util import port, mongo_client, server async def get_pubs(*args, **kwargs): s = AsyncSession(retries=0) r = await asyncio.wrap_future(s.get(*args, **kwargs)) r.raise_for_status() soup = BeautifulSoup(r.content, 'html.parser') return soup.select('.publication') @pytest.mark.asyncio async def test_no_pubs(server): db, url = server pubs = await get_pubs(url) assert pubs == [] @pytest.mark.asyncio async def test_single_pub(server): db, url = server await add_pub(db, title='Test Title', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) pubs = await get_pubs(url) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title' assert pubs[0].select('.author')[0].string == 'auth' assert pubs[0].select('.project')[0].string == 'IceCube' @pytest.mark.asyncio async def test_multiple_pubs(server): db, url = server await add_pub(db, title='Test Title', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title3', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) pubs = await get_pubs(url) assert len(pubs) == 3 # order by reversed date assert pubs[0].select('.title')[0].string == 'Test Title3' assert pubs[1].select('.title')[0].string == 'Test Title2' assert pubs[2].select('.title')[0].string == 'Test Title' @pytest.mark.asyncio async def test_project(server): db, url = server await add_pub(db, title='Test Title', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['hawc']) pubs = await get_pubs(url, params={'projects': 'hawc'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title2' assert pubs[0].select('.project')[0].string == 'HAWC' @pytest.mark.asyncio async def test_multi_project(server): db, url = server await add_pub(db, title='Test Title', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['hawc']) await add_pub(db, title='Test Title3', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube','hawc']) pubs = await get_pubs(url, params={'projects': ['hawc', 'icecube']}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title3' assert set(x.string for x in pubs[0].select('.project')) == set(['HAWC', 'IceCube']) @pytest.mark.asyncio async def test_hide_projects(server): db, url = server await add_pub(db, title='Test Title', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['hawc']) pubs = await get_pubs(url, params={'projects': 'hawc', 'hide_projects': True}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title2' assert pubs[0].select('.project') == [] pubs = await get_pubs(url, params={'projects': 'hawc', 'hide_projects': 'false'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title2' assert pubs[0].select('.project') != [] @pytest.mark.asyncio async def test_dates(server): db, url = server await add_pub(db, title='Test Title1', authors=['auth'], pub_type="journal", citation="TestJournal", date='2020-01-02', downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth'], pub_type="journal", citation="TestJournal", date='2020-02-03', downloads=[], projects=['icecube']) await add_pub(db, title='Test Title3', authors=['auth'], pub_type="journal", citation="TestJournal", date='2020-03-04', downloads=[], projects=['icecube']) pubs = await get_pubs(url, params={'start_date': '2020-02-02'}) assert len(pubs) == 2 # order by reversed date assert pubs[0].select('.title')[0].string == 'Test Title3' assert pubs[1].select('.title')[0].string == 'Test Title2' pubs = await get_pubs(url, params={'end_date': '2020-02-02'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title1' pubs = await get_pubs(url, params={'start_date': '2020-02-01', 'end_date': '2020-03-01'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title2' pubs = await get_pubs(url, params={'start_date': '2020-04-01'}) assert len(pubs) == 0 pubs = await get_pubs(url, params={'end_date': '2019-04-01'}) assert len(pubs) == 0 @pytest.mark.asyncio async def test_types(server): db, url = server await add_pub(db, title='Test Title1', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth'], pub_type="proceeding", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title3', authors=['auth'], pub_type="thesis", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) pubs = await get_pubs(url, params={'type': 'journal'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title1' pubs = await get_pubs(url, params={'type': 'proceeding'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title2' pubs = await get_pubs(url, params={'type': 'thesis'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title3' pubs = await get_pubs(url, params={'type': ['journal','thesis']}) assert len(pubs) == 2 assert pubs[0].select('.title')[0].string == 'Test Title3' assert pubs[1].select('.title')[0].string == 'Test Title1' @pytest.mark.asyncio async def test_title(server): db, url = server await add_pub(db, title='Test Title1', authors=['auth'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth'], pub_type="proceeding", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title3', authors=['auth'], pub_type="thesis", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) pubs = await get_pubs(url, params={'search': 'title1'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title1' @pytest.mark.asyncio async def test_authors(server): db, url = server await add_pub(db, title='Test Title1', authors=['auth1'], pub_type="journal", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title2', authors=['auth2'], pub_type="proceeding", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) await add_pub(db, title='Test Title3', authors=['auth1', 'auth3'], pub_type="thesis", citation="TestJournal", date=nowstr(), downloads=[], projects=['icecube']) pubs = await get_pubs(url, params={'authors': 'auth1'}) assert len(pubs) == 2 assert pubs[0].select('.title')[0].string == 'Test Title3' assert pubs[1].select('.title')[0].string == 'Test Title1' pubs = await get_pubs(url, params={'authors': 'auth2'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title2' pubs = await get_pubs(url, params={'authors': 'auth3'}) assert len(pubs) == 1 assert pubs[0].select('.title')[0].string == 'Test Title3' pubs = await get_pubs(url, params={'authors': 'auth4'}) assert len(pubs) == 0
38.37037
93
0.600064
1,144
9,324
4.805944
0.086538
0.050928
0.046017
0.054383
0.891779
0.887232
0.838669
0.80793
0.795016
0.778647
0
0.026634
0.21879
9,324
242
94
38.528926
0.728171
0.004826
0
0.685083
0
0
0.186934
0
0
0
0
0
0.270718
1
0
false
0
0.033149
0
0.038674
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
bd4904f3bd644736f99a726d29ede081e7185019
120
py
Python
input_string_to_list.py
esltech/python_class
d75483005848b9b6aed86f124efc0cd254322bc5
[ "MIT" ]
null
null
null
input_string_to_list.py
esltech/python_class
d75483005848b9b6aed86f124efc0cd254322bc5
[ "MIT" ]
null
null
null
input_string_to_list.py
esltech/python_class
d75483005848b9b6aed86f124efc0cd254322bc5
[ "MIT" ]
null
null
null
inp=input("Please enter a string:") print("Converting to a list:",list(inp)) print("Converting to a tuple:",tuple(inp))
30
42
0.716667
20
120
4.3
0.55
0.348837
0.395349
0.418605
0
0
0
0
0
0
0
0
0.1
120
4
42
30
0.796296
0
0
0
0
0
0.53719
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
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
1
0
6
1fe37ea5879d3ee303383857c01ed3818e4d582a
26
py
Python
cana/thermal/__init__.py
cana-asteroids/cana
afb7b0155cda8578c487d43a1a665f8823486633
[ "MIT" ]
6
2019-11-24T16:30:40.000Z
2021-08-23T19:29:43.000Z
cana/thermal/__init__.py
cana-asteroids/cana
afb7b0155cda8578c487d43a1a665f8823486633
[ "MIT" ]
1
2020-06-18T17:23:24.000Z
2021-09-08T16:51:50.000Z
cana/thermal/__init__.py
depra/cana
95a3af2f72195befcb6bf7a65eb4fecbfdf52f5b
[ "MIT" ]
null
null
null
from .models import NEATM
13
25
0.807692
4
26
5.25
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
26
1
26
26
0.954545
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
9501b8eebcd5346ae69a7015fc096dbf0179926d
20
py
Python
copypastor/src/__init__.py
Venomen/copypastor
add35e6b4ea17632c2b678a629d541b74b55ff0e
[ "MIT" ]
null
null
null
copypastor/src/__init__.py
Venomen/copypastor
add35e6b4ea17632c2b678a629d541b74b55ff0e
[ "MIT" ]
null
null
null
copypastor/src/__init__.py
Venomen/copypastor
add35e6b4ea17632c2b678a629d541b74b55ff0e
[ "MIT" ]
null
null
null
from ..src import *
10
19
0.65
3
20
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.2
20
1
20
20
0.8125
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
951aa30369427169a8c0ac19a420215235b87995
32
py
Python
aos_sw_api/mac_table/__init__.py
KennethSoelberg/AOS-Switch
a5a2c54917bbb69fab044bf0b313bcf795642d30
[ "MIT" ]
null
null
null
aos_sw_api/mac_table/__init__.py
KennethSoelberg/AOS-Switch
a5a2c54917bbb69fab044bf0b313bcf795642d30
[ "MIT" ]
1
2020-12-24T15:36:56.000Z
2021-01-28T23:19:57.000Z
aos_sw_api/mac_table/__init__.py
KennethSoelberg/AOS-Switch
a5a2c54917bbb69fab044bf0b313bcf795642d30
[ "MIT" ]
1
2021-02-16T23:26:28.000Z
2021-02-16T23:26:28.000Z
from ._mac_table import MacTable
32
32
0.875
5
32
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.09375
32
1
32
32
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1f12718fca2ed6668acb76840c9652c627ee675c
30
py
Python
src/__init__.py
dhimmel/hetmech
4c7dc77054a02d7da4c30c2a9b0eca391cf5b6b5
[ "BSD-3-Clause" ]
10
2017-08-20T17:12:57.000Z
2019-03-26T21:42:28.000Z
src/__init__.py
greenelab/hetmech
ca460f70a247ef456c930c7e64df24f59dc2b338
[ "BSD-3-Clause" ]
121
2017-03-16T19:20:31.000Z
2021-01-21T16:15:55.000Z
src/__init__.py
dhimmel/hetmech
4c7dc77054a02d7da4c30c2a9b0eca391cf5b6b5
[ "BSD-3-Clause" ]
7
2017-03-27T23:02:11.000Z
2019-03-27T15:47:52.000Z
from .utils import get_config
15
29
0.833333
5
30
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
30
1
30
30
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1f214606cbdbe99f441e16c2f79d050ac7ff0a67
183
py
Python
PyWeiboSpy/exceptions.py
veikai/PyWeiboSpy
cf9aebeba9102052f2ecbdbed3662d1c71933775
[ "Apache-2.0" ]
1
2020-10-24T15:38:03.000Z
2020-10-24T15:38:03.000Z
PyWeiboSpy/exceptions.py
veikai/PyWeiboSpy
cf9aebeba9102052f2ecbdbed3662d1c71933775
[ "Apache-2.0" ]
null
null
null
PyWeiboSpy/exceptions.py
veikai/PyWeiboSpy
cf9aebeba9102052f2ecbdbed3662d1c71933775
[ "Apache-2.0" ]
null
null
null
class SpyError(Exception): def __init__(self, error): super().__init__(error) class LoginError(SpyError): def __init__(self, error): super().__init__(error)
20.333333
31
0.661202
20
183
5.25
0.45
0.133333
0.209524
0.304762
0.571429
0.571429
0.571429
0
0
0
0
0
0.20765
183
8
32
22.875
0.724138
0
0
0.666667
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
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
1
0
0
0
0
1
0
0
6