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
973dc22dcea57170eb016b66956523d869b11b62
144
py
Python
docs/00.Python/demo_Chapter10/privateVariable.py
wan230114-dev/PythonNote
180e0908a647d22baf1354153c87da8c0cd67548
[ "Apache-2.0" ]
2
2020-04-09T05:56:23.000Z
2021-03-25T18:42:36.000Z
docs/00.Python/demo_Chapter10/privateVariable.py
wan230114-dev/PythonNote
180e0908a647d22baf1354153c87da8c0cd67548
[ "Apache-2.0" ]
22
2020-04-09T06:09:14.000Z
2021-01-06T01:05:32.000Z
docs/00.Python/demo_Chapter10/privateVariable.py
wan230114-dev/PythonNote
180e0908a647d22baf1354153c87da8c0cd67548
[ "Apache-2.0" ]
6
2020-03-09T07:19:21.000Z
2021-01-05T23:23:42.000Z
print("主程序中:", dir()) from privateVariable_pkg import aaa print("主程序中:", dir()) # import privateVariable_pkg # print(dir(privateVariable_pkg))
20.571429
35
0.75
18
144
5.833333
0.444444
0.514286
0.228571
0
0
0
0
0
0
0
0
0
0.097222
144
6
36
24
0.807692
0.402778
0
0.666667
0
0
0.120482
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.666667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
7
9767d57d6b9c27fa857fad7d3b3f01563409b573
3,671
py
Python
myproject/core/tests/test_views_person.py
rg3915/django-example
67e82767a748f9ab1ae23079f2b34b86ce77cf06
[ "MIT" ]
2
2015-10-24T10:50:36.000Z
2019-02-05T18:31:30.000Z
myproject/core/tests/test_views_person.py
rg3915/django-example
67e82767a748f9ab1ae23079f2b34b86ce77cf06
[ "MIT" ]
null
null
null
myproject/core/tests/test_views_person.py
rg3915/django-example
67e82767a748f9ab1ae23079f2b34b86ce77cf06
[ "MIT" ]
2
2018-06-27T14:28:27.000Z
2019-02-03T17:36:18.000Z
from django.test import TestCase from django.core.urlresolvers import reverse as r class PersonTest(TestCase): def setUp(self): self.resp = self.client.get(r('person_add')) def test_get(self): 'GET /person/add/ must return status code 200.' self.assertEqual(200, self.resp.status_code) def test_template(self): 'Response should be a rendered template.' self.assertTemplateUsed( self.resp, 'core/person/person_create_form.html') def test_html(self): 'Html must contain input controls.' self.assertContains(self.resp, '<form') self.assertContains(self.resp, '<input', 8) self.assertContains(self.resp, 'type="text"', 4) self.assertContains(self.resp, 'type="email"') self.assertContains(self.resp, 'type="submit"') def test_csrf(self): 'Html must contain csrf token.' self.assertContains(self.resp, 'csrfmiddlewaretoken') # Não precisa deste teste em CreateView? # def test_has_form(self): # 'Context must have the person form.' # form = self.resp.context['form'] # self.assertIsInstance(form, PersonForm) class OccupationTest(TestCase): def setUp(self): self.resp = self.client.get(r('occupation_add')) def test_get(self): 'GET /occupation/add/ must return status code 200.' self.assertEqual(200, self.resp.status_code) def test_template(self): 'Response should be a rendered template.' self.assertTemplateUsed( self.resp, 'core/person/occupation_create_form.html') def test_html(self): 'Html must contain input controls.' self.assertContains(self.resp, '<form') self.assertContains(self.resp, '<input', 2) self.assertContains(self.resp, 'type="text"', 1) self.assertContains(self.resp, 'type="submit"') def test_csrf(self): 'Html must contain csrf token.' self.assertContains(self.resp, 'csrfmiddlewaretoken') class AddressTest(TestCase): def setUp(self): self.resp = self.client.get(r('address_add')) def test_get(self): 'GET /address/add/ must return status code 200.' self.assertEqual(200, self.resp.status_code) def test_template(self): 'Response should be a rendered template.' self.assertTemplateUsed( self.resp, 'core/person/address_create_form.html') def test_html(self): 'Html must contain input controls.' self.assertContains(self.resp, '<form') self.assertContains(self.resp, '<input', 7) self.assertContains(self.resp, 'type="text"', 5) self.assertContains(self.resp, 'type="submit"') def test_csrf(self): 'Html must contain csrf token.' self.assertContains(self.resp, 'csrfmiddlewaretoken') class PhoneTest(TestCase): def setUp(self): self.resp = self.client.get(r('phone_add')) def test_get(self): 'GET /phone/add/ must return status code 200.' self.assertEqual(200, self.resp.status_code) def test_template(self): 'Response should be a rendered template.' self.assertTemplateUsed( self.resp, 'core/person/phone_create_form.html') def test_html(self): 'Html must contain input controls.' self.assertContains(self.resp, '<form') self.assertContains(self.resp, '<input', 2) self.assertContains(self.resp, 'type="text"', 1) self.assertContains(self.resp, 'type="submit"') def test_csrf(self): 'Html must contain csrf token.' self.assertContains(self.resp, 'csrfmiddlewaretoken')
32.201754
65
0.64887
445
3,671
5.276404
0.159551
0.115843
0.196763
0.232538
0.850085
0.837308
0.774276
0.774276
0.774276
0.774276
0
0.011291
0.228003
3,671
113
66
32.486726
0.817219
0.2152
0
0.708861
0
0
0.288506
0.041379
0
0
0
0
0.367089
1
0.253165
false
0
0.025316
0
0.329114
0
0
0
0
null
0
1
1
1
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
1
0
0
0
0
0
0
0
10
9776a953f9f653f74b9fb8df2a704a4330047c05
214,598
py
Python
DARKspam_2/darkspam.py
Alpha-Demon404/RE-14
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
39
2020-02-26T09:44:36.000Z
2022-03-23T00:18:25.000Z
DARKspam_2/darkspam.py
B4BY-DG/reverse-enginnering
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
15
2020-05-14T10:07:26.000Z
2022-01-06T02:55:32.000Z
DARKspam_2/darkspam.py
B4BY-DG/reverse-enginnering
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
41
2020-03-16T22:36:38.000Z
2022-03-17T14:47:19.000Z
#Encrypted By xNot_Found #Github : https://github.com/hatakecnk/ #Do Not Edit The Script To Avoid Errors import marshal, zlib exec(marshal.loads(zlib.decompress('x\x9c\xb4wc\x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\xe0\x11\x89\x11\xed\xdcuw\xadT\xaf\xcd!y\xbbq7\x93\x01Z\x9c\xa1\x02k\xe0\xa6\xe2\xc3[\xa4rN\xb3\xb9\xf6\x04H\xf0\x9f\xee\x00\x03x\xd5\xc4\xae\x94\xbd\xe7= >\x81\xc9B\x8dO\xa9S`q\x88\x87\x81\xa49%(\xce\xd0\xa4\x9e\xc5\xb0\xd8\x9aa\xdc?\xa2*\t\n\x04Q,\x86\x9f\x9e*\xf7\x90y3<&\xad\xd9\x84\xa5ul\xf6a\x97\x87\xc4\xa5WQ\x975\x91\xce\xfe<7\x94\xa1V\xb0+\x90t\xf4\xa1oL\x7f\xb4\x81r\xc7!g\x04K\x138\xc1\x1c\x86[\xd8\xedNI\x8e\x98\x85\x88T\x89A*T\xf8\xa7\'\x91\xe7\xcd\xf8\xcf \x08Qepj\x1e\xaa\x07\x8f\xb5\xf2h\x92\xbct\x8az\xcc3\x14\x8f/\x15Vmo\xfbL\xbe\xd5\x84\x11\x8d\x89K\x97\x86\xc4k\xb6\xae\x10\x87Oh<O\xe8\xe9\xc5\xd8\'\x969\xe1\x086\xa5g\x94\xd4\x94\xec\'Q\x9bF\x97\x98A\xd4\x95s\x01\xcbA\xde\x05\xad\x82\xd9\xc9\x89\x13%Fx\xd0\xad\x12-\x8f\x01\xf2\x1fY\xa6\xb6-n\xa5@\x98+\xd5\x14R\xd9"S\xea\xb3\xe7$\xe2\xbc\xc2sIC\xfe[\xf3\x07\x11\xa5\x82\xd4\xda\xccJ\x19[j{\xab\xf8s\xf6\x0bt\xfcn\x03\x97m\xec\x90u\xfb\x16\xfaA\x1deH~\x1bD\x9f\x86T&\xad\x1b\x8c0WVa\xe7\x07\x17\xbaq0P,r\x90\xce/\xf9z\'\xef\x14?\xe1H\x89\xbe|\x1c\x11T\xbc(\xa2Q"\xa1\xac\xb1\x8f\xc6\xfcnl\x8a\x88E\x10\xea~\x85JX\xd1!\xfeep\xb4/\xf7\x8c\x01\x17Ka>\xdd\x10\x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d!\x83h/\x00\x11\x81g;:\xc7H\xdc\xa5\xea\x91\xd0\xfa\xd8,\xabl\x7f\x93\x82\x1c\xa5\x9a\xec\x8a\x83i\x9e\x14i\xe3wK\xaa\xbf1=\x03\x9b8\xf8\x13*\x88\x8b\xff]]\x98e\xde\'\x1ew\x99:\xb9y\x02\xf4\x17to\xac)\xb6\xf4/i\x93\xecF\xb4\xec\xf30x|5\xd8\xf6\xc1\x8f\xb1\xd0[De\x16\xcd\xb6Pd\x03\x04\xeb\xc2[\xfd\xec\xa8\xab\xe8\xc33\x8c\x82\x8c\x9c\x96\x14!\x9b\xfc\xc3\xe9s$\x86\xa4\x12-\x9f\x8e\xf2\xe7ik\xf3\\\xa3\xab)\xbb\x0b35\xe0\xef\x1e\xdc\xf2}\xb36\x84g\xe9\xb9\x10o\xb5DO\x00\xc5\x1c[\xb1\xfc\xdc==BKk\xa3\xe7\xeeb\x90^\xcb\x97;\xb4\x17\xb0\x7f\x91;\xad"\xd5bc\xe3s\x93d0Z\x9f.\xe1|\xe2xrJ\xa1[\xa1k\x93\x0b\xe5.\xacP\x88\x15s:(\xb5\x04]\x15 \x81\x19\x11\xb1\x87T\xf2;\x19\x91\xd7\x85\xae\x83-C\x19\xfd\x81o|\xeeX\x8cx\x97e\xb5\x80G\x1bP[\x8f\xad\xa3\x02\x95\x92\x06\x13\xc4;\x95X\x9e\x87_\xd2\xa7k\nO\xd4\xb4\x98?\x7f\x93\x08\x06\x99\xa2"K^L\xb3E\xb8os\xaa\xfe\x98\x03\xa4P\xbe\xfd0\x93\xca\x8a<\x15\x1fN\xac\x15\'\xa09\x96XI\x80\x80!@H\x1f\x0e|\xac\x06\xe2*\nk\xd7\xd9\x90\x14\x93\xdf_\x05x\xd4\x15\xf7\x0bA\x17b0\x95\xe9y\x92\xc6\xb2Q{&e\xea\x06\xd0\xff\xe8Ei\x00\x03&\x0c\x17\xa5\x05\xa7\x84\x90\x9d\xeb2\xe8\xf8\x02l\x05TOA\xd0\x1b\xa9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6\x84\x12\x86\xcd\xa1\x8e\xecoaW-,\xa5\x06\xa95I\x118n\xf4\xe4\x80\x0f\xf8D#^\x1a\x954\xf6Y\x93\\\xb0\xaf\x95\x16\xb6\x88\xce\xff\x01\x08@\xf7\xbf-\x9b\xdf\xb4\xc2E\x84M\x14\x16\x00\x08@\xf7\xbf\xbb\x84g\xb4*\x84>P\x98\xb0\xd18`=\xe2F\xeb\xd2\xb4\x19\x91\x8b\x8d\x0e\xb6\xb3\xef\x1511\xf9\xbe2\xb6\x02\n\x8e\xdb/\xa6i\xb60\xc8\x1a\x95_a\xfa\x07:\x93f\x08\xf0\x0e\xfc\xafB\xd9\xee\xde\xbd\x95\xbdg!\xc1\x0b\xee\xc8Df\xc7\x0bQ\x14\xb0h;\xb6\xee\xe2^B\xe1\x84VNu\x03\xd6]\xfe9T$\t\x11\x88\x89\xe5\x8e&\xde\x96T$\x84\x86}\xfe\xca\xff\x01\x03@\xfc\xbf\x8d\xabp\xf1\x06c\x9a\x82\xed\xa1\x00\x03@\xfc\xbf\xc60\xba]\t\xa5\xad\xcf\x01\xaci\xb6\xc3]\xda\xd2\x03\xca\x83\n?\x95\x87\xdeG\xcfR\xd1\xa0d\x83|3d1!\xfd\xdb\x04\x1c\x1e\xe0\xbb\x15f\x00\xb2M\xdf(\xc8/\x84u\xfe\x13\xcb\x0ehJ\xe7k\xfe{y,4\x1d\x0e\xaf\xaaI\x80\xaaK*\xf8\xcebO\xf7\x86#\x01n\x05o\xda>\xc9\x82\xb2\xe6\xc9_Zms"M\xee\xc3C\x1bU\xd5Z\xeb\x8dK|\xfd\xffE\xc4=\x84W\xa20\xdd\x02\xde\xb1m\xdb\xb6\xb9\xbbc\xdb\xb6m\x9b\x1d;\xe9\xd8\xb6mtl\xdb\xb6s\xff\xf3M\xee\xa0\x06\xef\xa8\xeaY\xb35\xa9\x9eT\xbe\xb4H\xb2S\xeak\x80\x98p{/\x1c(\x85\xfd\xf9WX\x15\xd1\x15U;\xbe^\x80R1t\x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a\xba\xc7\xb6\xc4\xa2\xb3X\xf6\xcf\n\x9a/\xc2.=\x86>"O\xb0P\xc4,;\xfa\xa4.\x04A2u]FV\x04M\xda0\xac0a\t\x04\x07vz\xe4+\xb5\xddU&u\xfai\xf5\x94\x13\xc5oYAE\xd9\xd4D\x84\x01\xbbu\xcf\xa9\xe3NfU\x92\xa4\xabY\x97\x99S\x1au\x81\xf2u*\xb1\x85\xc9\x93\xb0\xe2\xef\x9de\xa2\xc9\xaf1o\xf7\x1e\x8c\xc5\xa4\xc2}\x1f\x8bX\xd3\xb0\xedKDzp\xe4p\x7f\x1dH\x0e\xd1\xea\xc4J\\\xa3Eh\n\xe6K\x96.\xef\x071\x1d\x03\x00xH\xbf\x85\xd4\xf5\n\x9d\xc0 |\x94-\xdf_\x94\xd9\xec\xce\xa6{d\xab\xed\x97\x17\x85\xe5\xa4\xd17<\x1d[\x98\xa4\xa5]\x87\x11\x92\x14\x80\x99\xbfZ\xe0\xbe\x825\xb3n\xeaR\x12$\x9bI\xd8\xad\xff\xf6\x94\xa3\r\x83\x0f\xda\x05)\'gr8\xb31{\x14H\xfc\xef?9\x01\xd6\xc0St&\x07x\x0f\x15B\x9e\t\x9c0RK:l\x97\x0e\xe2\x14\x0fIg\x92a\xb71\xb8OFM\xa2\x019\xe8^(\x97\x9d\xca\xd7,\xa1\xe8\x99E\x12\xc8\x88\r\xb4\x03\xa1\x9b\xe4\x11E\xc8\x03\xde\x94 \x8dL\x8efOH\xe1\x96G\x8e\x7f\x05\x91V(\x04|/\xf4\xba\xcc\xa4\x85\xca\xcb\xfej\xdb\xa9\xdcR,\x06m4\'\x08+\xe1\xd2\x87\xdc\x8b\x924\x0bx\x9b\xf8\x00<\x10\x9bF5\xff\x16\x05b\xd4\xac`\xf0[\x9d\xd6\xee\xbf\x18$\xe2\xb5\x17\x8b\xc2yu\x87\x0f*\x9eC\xa6\xeejN@\x94i\xe4\x8f\xa9\xbd\x1a\xb9\x14(\xe7\xc3\xae\xed\xfb\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by\x85\x14\xe1+!\xbf\xa8)\xa4\x0cT\xc26\xf55\xebDQ\xe3\x0b\xc7\xf09+\xfdI\xf6<\xdf\xbfL\x0f\x03\x01\x01\xe1\n\xff\x9f\xd8\x998\xbbX\x99\x00]\xff\xc7\xf0\x02Z\xffr\x85\xfd\x0f\x80\x0e&f.\xaeH\xff\x91\x99\xb9\xa9\x83\x9d\xa3\xb3\xb9\x8b\x0b\xfd\x7f\x1d\xc4\xff\x8a\x0b\xd4\xffL-]\x11\xfe+Bv\x0efn@\xf3\x1f0\xff\xdf\'\x80\\@\x91\xa4\xfc?_\xf2\xff\x00\xc7\x98r\xeb')))
42,919.6
214,472
0.734685
49,370
214,598
3.187401
0.156836
0.000445
0.000572
0.000534
0.000394
0.000394
0.000394
0.000394
0.000394
0
0
0.230854
0.00137
214,598
5
214,472
42,919.6
0.503439
0.000461
0
0
1
89
0.663105
0.661277
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
0
0
0
0
1
1
1
1
null
0
0
0
0
0
0
1
0
1
0
0
0
0
10
977a17ea20f82c95851653b451acffe6e999767f
50,080
py
Python
pyzk/test.py
amanat-juwel/laravel-student-attendance-system
3d39f6d04e7a676b908d7ad79d1213db0411e980
[ "MIT" ]
null
null
null
pyzk/test.py
amanat-juwel/laravel-student-attendance-system
3d39f6d04e7a676b908d7ad79d1213db0411e980
[ "MIT" ]
null
null
null
pyzk/test.py
amanat-juwel/laravel-student-attendance-system
3d39f6d04e7a676b908d7ad79d1213db0411e980
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # # -*- coding: utf-8 -*- import sys import os import unittest import codecs from mock import patch, Mock, MagicMock mock_socket = MagicMock(name='zk.socket') sys.modules['zk.socket'] = mock_socket from zk import ZK, const from zk.base import ZK_helper from zk.user import User from zk.finger import Finger from zk.attendance import Attendance from zk.exception import ZKErrorResponse, ZKNetworkError try: unittest.TestCase.assertRaisesRegex except AttributeError: unittest.TestCase.assertRaisesRegex = unittest.TestCase.assertRaisesRegexp def dump(obj, nested_level=0, output=sys.stdout): spacing = ' ' if type(obj) == dict: print >> output, '%s{' % ((nested_level) * spacing) for k, v in obj.items(): if hasattr(v, '__iter__'): print >> output, '%s%s:' % ((nested_level + 1) * spacing, k) dump(v, nested_level + 1, output) else: print >> output, '%s%s: %s' % ((nested_level + 1) * spacing, k, v) print >> output, '%s}' % (nested_level * spacing) elif type(obj) == list: print >> output, '%s[' % ((nested_level) * spacing) for v in obj: if hasattr(v, '__iter__'): dump(v, nested_level + 1, output) else: print >> output, '%s%s' % ((nested_level + 1) * spacing, v) print >> output, '%s]' % ((nested_level) * spacing) else: print >> output, '%s%s' % (nested_level * spacing, obj) class PYZKTest(unittest.TestCase): def setup(self): pass def tearDown(self): pass @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_no_ping(self,helper, socket): """ what if ping doesn't response """ helper.return_value.test_ping.return_value = False #no ping simulated #begin zk = ZK('192.168.1.201') helper.assert_called_with('192.168.1.201', 4370) # called correctly self.assertRaisesRegex(ZKNetworkError, "can't reach device", zk.connect) @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_correct_ping(self,helper, socket): """ what if ping is ok """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 1 # helper tcp ok socket.return_value.recv.return_value = b'' #begin zk = ZK('192.168.1.201') helper.assert_called_with('192.168.1.201', 4370) # called correctly self.assertRaisesRegex(ZKNetworkError, "unpack requires", zk.connect) # no data...? @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_invalid(self, helper, socket): """ Basic tcp invalid """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.return_value = b'Invalid tcp data' #begin zk = ZK('192.168.1.201') helper.assert_called_with('192.168.1.201', 4370) # called correctly self.assertRaisesRegex(ZKNetworkError, "TCP packet invalid", zk.connect) @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_connect(self, helper, socket): """ Basic connection test """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.return_value = codecs.decode('5050827d08000000d007fffc2ffb0000','hex') # tcp CMD_ACK_OK #begin zk = ZK('192.168.1.201') # already tested conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) conn.disconnect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e903e6002ffb0100', 'hex')) @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_force_udp_connect(self, helper, socket): """ Force UDP connection test """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.return_value = codecs.decode('d007fffc2ffb0000','hex') # tcp CMD_ACK_OK #begin zk = ZK('192.168.1.201', force_udp=True) conn = zk.connect() socket.return_value.sendto.assert_called_with(codecs.decode('e80317fc00000000', 'hex'), ('192.168.1.201', 4370)) conn.disconnect() socket.return_value.sendto.assert_called_with(codecs.decode('e903e6002ffb0100', 'hex'), ('192.168.1.201', 4370)) @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_udp_connect(self, helper, socket): """ Basic auto UDP connection test """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 1 # helper tcp nope socket.return_value.recv.return_value = codecs.decode('d007fffc2ffb0000','hex') # tcp CMD_ACK_OK #begin zk = ZK('192.168.1.201') conn = zk.connect() socket.return_value.sendto.assert_called_with(codecs.decode('e80317fc00000000', 'hex'), ('192.168.1.201', 4370)) conn.disconnect() socket.return_value.sendto.assert_called_with(codecs.decode('e903e6002ffb0100', 'hex'), ('192.168.1.201', 4370)) @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_unauth(self, helper, socket): """ Basic unauth test """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d5075bb2cf450000', 'hex'), # tcp CMD_UNAUTH codecs.decode('5050827d08000000d5075ab2cf450100', 'hex') # tcp CMD_UNAUTH ] #begin zk = ZK('192.168.1.201', password=12) self.assertRaisesRegex(ZKErrorResponse, "Unauthenticated", zk.connect) socket.return_value.send.assert_called_with(codecs.decode('5050827d0c0000004e044e2ccf450100614d323c', 'hex')) # try with password 12 @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_auth(self, helper, socket): """ Basic auth test """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d5075bb2cf450000', 'hex'), # tcp CMD_UNAUTH codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d08000000d00745b2cf451b00', 'hex') # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201', password=45) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d0c0000004e044db0cf45010061c9323c', 'hex')) #auth with pass 45 conn.disconnect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e90345b6cf450200', 'hex')) #exit @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_get_size(self, helper, socket): """ can read sizes? """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d64000000d007a3159663130000000000000000000000000000000000070000000000000006000000000000005d020000000000000f0c0000000000000100000000000000b80b000010270000a0860100b20b00000927000043840100000000000000', 'hex'), #sizes codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201') # already tested conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) conn.read_sizes() socket.return_value.send.assert_called_with(codecs.decode('5050827d080000003200fcb9cf450200', 'hex')) conn.disconnect() self.assertEqual(conn.users, 7, "missed user data %s" % conn.users) self.assertEqual(conn.fingers, 6, "missed finger data %s" % conn.fingers) self.assertEqual(conn.records, 605, "missed record data %s" % conn.records) self.assertEqual(conn.users_cap, 10000, "missed user cap %s" % conn.users_cap) self.assertEqual(conn.fingers_cap, 3000, "missed finger cap %s" % conn.fingers_cap) self.assertEqual(conn.rec_cap, 100000, "missed record cap %s" % conn.rec_cap) @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_get_users_small_data(self, helper, socket): """ can get empty? """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d64000000d007a3159663130000000000000000000000000000000000070000000000000006000000000000005d020000000000000f0c0000000000000100000000000000b80b000010270000a0860100b20b00000927000043840100000000000000', 'hex'), #sizes codecs.decode('5050827d04020000dd05942c96631500f801000001000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003830380000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003832310000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833350000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833310000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833320000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003836000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000383432000000000000000000000000000000000000000000','hex'), #DATA directly(not ok) codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response #codecs.decode('5050827d08000000d00745b2cf451b00', 'hex') # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201' ) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) users = conn.get_users() socket.return_value.send.assert_called_with(codecs.decode('5050827d13000000df053ca6cf4514000109000500000000000000', 'hex')) #get users self.assertEqual(len(users), 7, "incorrect size %s" % len(users)) #assert one user usu = users[3] self.assertIsInstance(usu.uid, int, "uid should be int() %s" % type(usu.uid)) if sys.version_info >= (3, 0): self.assertIsInstance(usu.user_id, (str, bytes), "user_id should be str() or bytes() %s" % type(usu.user_id)) else: self.assertIsInstance(usu.user_id, (str, unicode), "user_id should be str() or unicode() %s" % type(usu.user_id)) self.assertEqual(usu.uid, 4, "incorrect uid %s" % usu.uid) self.assertEqual(usu.user_id, "831", "incorrect user_id %s" % usu.user_id) self.assertEqual(usu.name, "NN-831", "incorrect uid %s" % usu.name) # generated conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_get_users_broken_data(self, helper, socket): """ test case for K20 """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d007d7d758200000','hex'), #ACK Ok codecs.decode('5050827d58000000d0074c49582013000000000000000000000000000000000002000000000000000000000000000000000000000000000007000000000000000000000000000000f4010000f401000050c30000f4010000f201000050c30000','hex'),#Sizes codecs.decode('5050827d9c000000dd053c87582015009000000001000000000000000000006366756c616e6f0000000000000000000000000000000000000000000000000000000000003130303030316c70000000000000000000000000000000000200000000000000000000726d656e67616e6f0000000000000000000000000000000000','hex'),#DATA112 codecs.decode('000000000000000000000000323232323232636200000000000000000000000000000000','hex'), #extra data 36 #codecs.decode('','hex'), # codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # CMD_ACK_OK for get_users TODO: generate proper sequenced response codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # CMD_ACK_OK for free_data TODO: generate proper sequenced response codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # CMD_ACK_OK for exit TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201') #, verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) users = conn.get_users() #print (users) #debug socket.return_value.send.assert_called_with(codecs.decode('5050827d13000000df05b3cb582014000109000500000000000000', 'hex')) #get users self.assertEqual(len(users), 2, "incorrect size %s" % len(users)) #assert one user usu = users[1] self.assertIsInstance(usu.uid, int, "uid should be int() %s" % type(usu.uid)) if sys.version_info >= (3, 0): self.assertIsInstance(usu.user_id, (str, bytes), "user_id should be str() or bytes() %s" % type(usu.user_id)) else: self.assertIsInstance(usu.user_id, (str, unicode), "user_id should be str() or unicode() %s" % type(usu.user_id)) self.assertEqual(usu.uid, 2, "incorrect uid %s" % usu.uid) self.assertEqual(usu.user_id, "222222cb", "incorrect user_id %s" % usu.user_id) self.assertEqual(usu.name, "rmengano", "incorrect uid %s" % usu.name) # check test case conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_get_users_broken_tcp(self, helper, socket): """ tst case for https://github.com/fananimi/pyzk/pull/18#issuecomment-406250746 """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d09000000d007babb5c3c100009', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d58000000d007292c5c3c13000000000000000000000000000000000046000000000000004600000000000000990c0000000000001a010000000000000600000006000000f4010000f401000050c30000ae010000ae010000b7b60000', 'hex'), #sizes codecs.decode('5050827d15000000d007a7625c3c150000b4130000b4130000cdef2300','hex'), #PREPARE_BUFFER -> OK 5044 codecs.decode('5050827d10000000dc050da65c3c1600b4130000f0030000', 'hex'), # read_buffer -> Prepare_data 5044 codecs.decode('5050827df8030000dd05d05800001600b013000001000e35313437393833004a6573757353616c646976617200000000000000000000000000000001000000000000000035313437393833000000000000000000000000000000000002000e33343934383636004e69657665734c6f70657a00000000000000000000000000000000000100000000000000003334393438363600000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003337333139333600000000000000000000000000', 'hex'), # DATA 1016 -8 (util 216) codecs.decode('0000000100000000000000003734383433330000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003433333939353800000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003333373335313100000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003337373535363100000000000000000000000000000000000b000000', 'hex'), # raw data 256 codecs.decode('0000000004000e00000000000000000000000000000000000000000000000000000000000000000000000001000000000000000032333338323035000000000000000000000000000000000005000e000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000333632363439300000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000313838343633340000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000', 'hex'), #raw data 256 codecs.decode('00000000000000000000000000000000000000000000000000000000000000000000000100000000000000003131313336333200000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003130353233383900000000000000000000000000000000000d00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003135333538333600000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000100000000', 'hex'), #raw data 256 codecs.decode('000000003933313637300000000000000000000000000000', 'hex'), #raw data 24 codecs.decode('5050827df8030000dd0520b601001600000000000f00003334323931343800000000000000000000000000000000000000000000000000000000000100000000000000003334323931343800000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003139303636393700000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003139333831333500000000000000000000000000', 'hex'), # DATA 1016 -8 (util216 codecs.decode('00000000120000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000393231303537000000000000000000000000000000000000130000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000333634383739340000000000000000000000000000000000140000323831353732000000000000000000000000000000000000000000000000000000000000010000000000000000323831353732000000000000000000000000000000000000150000000000000000000000000000000000000000000000000000000000000000000000', 'hex'), #raw data 256 codecs.decode('00000001000000000000000031383133323236000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000035393037353800000000000000000000000000000000000017000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000031363933373232000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000033363430323131000000000000000000000000000000000019000000', 'hex'), #raw data 256 codecs.decode('00000000000000000000000000000000000000000000000000000000000000000000000100000000000000003331303733390000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003433353430393400000000000000000000000000000000001b00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003338303736333200000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000100000000', 'hex'), #raw data 256 codecs.decode('000000003231333938313700000000000000000000000000', 'hex'), #raw data 24 codecs.decode('5050827df8030000dd059a2102001600000000001d00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003333383738313900000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003439353634363800000000000000000000000000000000001f00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003832343030300000000000000000000000000000', 'hex'), #DATA 1016 -8 (util 216) codecs.decode('00000000200000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000333937373437370000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000343435383038340000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000343430353130390000000000000000000000000000000000230000000000000000000000000000000000000000000000000000000000000000000000', 'hex'), #raw data 256 codecs.decode('00000001000000000000000033353732363931000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000033363336333832000000000000000000000000000000000025000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000033333232353432000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000039393437303800000000000000000000000000000000000027000000', 'hex'), #raw data 256 codecs.decode('00000000000000000000000000000000000000000000000000000000000000000000000100000000000000003836333539380000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003338383736383000000000000000000000000000000000002900000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003739393434350000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000000000000000000100000000', 'hex'), # raw data 256 codecs.decode('000000003532313136340000000000000000000000000000', 'hex'), # raw data 24 codecs.decode('5050827df8030000dd053da903001600000000002b00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003439373033323400000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000000000', 'hex'), # DATA 1016 -8 (util 112) codecs.decode('0000000100000000000000003134363732353100000000000000000000000000000000002d000e32363635373336006d61726368756b0000000000000000000000000000000000000000000100000000000000003236363537333600000000000000000000000000', 'hex'), # raw data 104 codecs.decode('000000002e00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003136383133353200000000000000000000000000000000002f000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000034393633363732000000000000000000000000000000000030000000', 'hex'), # raw data 152 codecs.decode('00000000000000000000000000000000000000000000000000000000000000000000000100000000000000003337363137373100000000000000000000000000000000003100000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003231353939353100000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003136393734323700000000000000000000000000000000003300000000000000000000000000000000000000000000000000000000000000000000000000000100000000', 'hex'), # raw data 256 codecs.decode('0000000033373336323437000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000031323930313635000000000000000000000000000000000035000000000000000000000000000000000000000000000000000000', 'hex'), # raw data 128 codecs.decode('0000000000000000000000010000000000000000333236333636330000000000000000000000000000000000360000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000393031353036000000000000000000000000000000000000370000000000000000000000', 'hex'), # raw data 128 codecs.decode('0000000000000000000000000000000000000000000000000000000100000000000000003238313732393300000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003437303630333800000000000000000000000000', 'hex'), # raw data 128 codecs.decode('5050827df8030000dd05037d04001600000000003900000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003136343731353600000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000000000000', 'hex'), # DATA 1016 -8 (util 112) codecs.decode('0000000100000000000000003530313435310000000000000000000000000000000000003b00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003534363236373300000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003533363730310000000000000000000000000000000000003d00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003435383033303700000000000000000000000000000000003e000000', 'hex'), # raw data 256 codecs.decode('00000000000000000000000000000000000000000000000000000000000000000000000100000000000000003136333835333200000000000000000000000000000000003f000e3336323634313900000000000000000000000000000000000000000000000000000000000100000000000000003336323634313900000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003233323331383500000000000000000000000000000000004100000000000000000000000000000000000000000000000000000000000000000000000000000100000000', 'hex'), # raw data 256 codecs.decode('0000000035323930373337000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000033393839303636000000000000000000000000000000000043000000000000000000000000000000000000000000000000000000', 'hex'), # raw data 128 codecs.decode('0000000000000000000000010000000000000000343033323930390000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000323034363338380000000000000000000000000000000000450000000000000000000000', 'hex'), # raw data 128 codecs.decode('0000000000000000000000000000000000000000000000000000000100000000000000003733383730330000000000000000000000000000000000004600000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000003239313836333600000000000000000000000000', 'hex'), # raw data 128 codecs.decode('5050827d0c000000dd0507fa0500160000000000', 'hex'), # DATA 12-8 (util 4 ok) and ACK OK!!! codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # CMD_ACK_OK for get_users TODO: generate proper sequenced response codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # CMD_ACK_OK for free_data TODO: generate proper sequenced response codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # CMD_ACK_OK for exit TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201') # , verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) users = conn.get_users() #print (users) #debug socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000de05aebd5c3c1700', 'hex')) #get users self.assertEqual(len(users), 70, "incorrect size %s" % len(users)) #assert one user usu = users[1] self.assertIsInstance(usu.uid, int, "uid should be int() %s" % type(usu.uid)) if sys.version_info >= (3, 0): self.assertIsInstance(usu.user_id, (str, bytes), "user_id should be str() or bytes() %s" % type(usu.user_id)) else: self.assertIsInstance(usu.user_id, (str, unicode), "user_id should be str() or unicode() %s" % type(usu.user_id)) self.assertEqual(usu.uid, 2, "incorrect uid %s" % usu.uid) self.assertEqual(usu.user_id, "3494866", "incorrect user_id %s" % usu.user_id) self.assertEqual(usu.name, "NievesLopez", "incorrect uid %s" % usu.name) # check test case conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def _test_tcp_get_template(self, helper, socket): """ can get empty? """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d15000000d007acf93064160000941d0000941d0000b400be00', 'hex'), # ack ok with size 7572 codecs.decode('5050827d10000000dc05477830641700941d000000000100', 'hex'), #prepare data codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response #codecs.decode('5050827d08000000d00745b2cf451b00', 'hex') # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201', verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) templates = conn.get_templates() self.assertEqual(len(templates), 6, "incorrect size %s" % len(templates)) #assert one user usu = users[3] self.assertIsInstance(usu.uid, int, "uid should be int() %s" % type(usu.uid)) if sys.version_info >= (3, 0): self.assertIsInstance(usu.user_id, (str, bytes), "user_id should be str() or bytes() %s" % type(usu.user_id)) else: self.assertIsInstance(usu.user_id, (str, unicode), "user_id should be str() or unicode() %s" % type(usu.user_id)) self.assertEqual(usu.uid, 4, "incorrect uid %s" % usu.uid) self.assertEqual(usu.user_id, "831", "incorrect user_id %s" % usu.user_id) self.assertEqual(usu.name, "NN-831", "incorrect uid %s" % usu.name) # generated conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def _test_tcp_get_template_1(self, helper, socket): """ cchekc correct template 1 """ helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d10000000dc055558d0983200dc040000f0030000', 'hex'), # tcp PREPARE_DATA 1244 codecs.decode('5050827df8030000dd0500f4000032004d9853533231000004dbda0408050709ced000001cda69010000008406316adb0c0012062900d000aad221001600390caf001cdbb106240031007e033bdb3b00e9067700850083d42b004300c503f40043dbd6037b005000460ea7db5900910f90009f0012d5e7005c00970a5f006ddb', 'hex'), # DATA (tcp 1016, actual 112?) codecs.decode('930fa1009a00560f86db9d00820e86006f007dd3f400ab00a60fcd01b7dbb00b4b00bd0079083adbc00045035d000600c1df7300cc0039049e00dddb380e8c00da00e30dd8dbdc00220e130027004dd9f500e3009d0a6a00e9db26090001ef00ea03c5dbf0002306', 'hex'), #raw data 104 codecs.decode('d000380028d83400ff00430f6200fbdba70dfb0002016203c5db0201a5044b00c10132d4de0006019f080a000cdab70541000f01fe0f19db1901c902e600dc0198d839002f01360ed80037dabd04d4003301520104da38014f01a100830196d5f5004b015c0411005cdacd03bc67ab8d162b48ad18f7fec7448e448387afa1a3', 'hex'), # raw 128 codecs.decode('062b37ca3cf9f53c8087f9150926e03335df1b71aedbd0f2', 'hex'), # raw 24 codecs.decode('b40da90541168df1551f70fc15b51bf26d7d4501bf12915e6485fd966f0ba2072728987dc1018a12ab105ec7aa003508fef08a49b923f3e85e42edf5ea861bd1600d23151787fc78d522f38431883e809f0e4dd2008ecd8ed97670035acf0c763503f27c37ec76d982806986c6016bf952d01e0673820570a87e1a236005ad81', 'hex'), # raw 128 codecs.decode('7d8734949952bb929d81e5fdbcf99ca0c4886d8c65098c0e9aa6ac81e103c684607951d03b0ce9f0cd785885ad27d4f61bfc5de8bc7411de8d8f5910c518e004e9229304f90f9a891395912680ebc6f4c57fd3fceeb684f7c18ba78107fc2e16073e89f6d6b67fbb', 'hex'), # raw 104 codecs.decode('fb11e2feb3effd0e5391c61da77176359f7e4d8a0ff3090a01204501c76a19af07002b003ac0042300dbab0113c2fa07c56e02cbc32bc10400a1c31349df0008102d2a04c5120c9b8904008f0810fb0404c20f3a6407006fd709fbecfe0400041529f60304fd1931fb0b006ede0c391bc1c0c0460e00a3210b1a34c2ffffc3fd', 'hex'), # raw 128 codecs.decode('980f04832806404a5bc1940505da86292d0f0056f600f925', 'hex'), # raw 24 codecs.decode('5c43c243ff06c5733a5d85c7080040473f3d31dd01774d8983c4c000778982750b009459d551c426c3c0170900929b17fba3fc780800376135fefbe0ff1100396aed3b3146265ac0c1ffff15c5357232fffdc0fdc03f3bc141914514003f85e738fdfa2441ff5cc0ff45951504ec7ee9c0fac1fc053dc424c0554affc103c5f8', 'hex'), # raw 128 codecs.decode('94f2fd0e00668b06eac1f9b3c3fdc2fd08008388f3ef460a00869e13a56079cf013fb82d22c394c2c619c3c33ac45304c527e19d4d0c008aab1305c0fa1aff6050110083687dc713c396c0c2c1c104c1c6b10f0072b54cc14d83c519c1760e0055b9f8c1f8187486', 'hex'), # raw 104 codecs.decode('750d00797ff0fdee593bc1090086781657267f11004cc1375050827df4000000dd0548b10100320038ffc024c2fec4c1c18c05c4fad0013ec54051c2879d00cb56521cc2c204c50fc2e62506008eca1a05fec5250d0072d23dc344c2c45cc10a008bd31a3afefa1a92c0080034e68642c45d0d005bdd376707c08da002008ede', 'hex'), # raw 128 codecs.decode('24ffc100e405213306002de78637c4de011de846ff98c100', 'hex'), # raw 24 codecs.decode('07283b590300fef3f5f800da10f5494b031000071819061035084365650b14900834c0c1c4c104c1c5a302100e1134c1c01045c83c8806110e2185c22edd11082424fec006ff02cb052834c3c073c910d4eb965b3833ff0bc582cce18d876a051106f337f826c00410013d2b05c200ca003f4cfeff03d56454ccc101', 'hex'), # raw 124 codecs.decode('5050827d08000000d007fcf701003200', 'hex'), # tcp CMD_ACK_OK #codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201', verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) template = conn.get_user_template(14, 1) self.assertEqual(template.size, 1243, "incorrect size %s" % template.size) self.assertEqual(template.mark, "4d98535332310000...feff03d56454ccc1", "incorrect mark %s" % template.mark) self.assertEqual(template.uid, 14, "incorrect uid %s" % template.uid) conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_get_template_1f(self, helper, socket): """ cchekc correct template 1 fixed""" helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d10000000dc055558d0983200dc040000f0030000', 'hex'), # tcp PREPARE_DATA 1244 codecs.decode('5050827df8030000dd0500f4000032004d9853533231000004dbda0408050709ced000001cda69010000008406316adb0c0012062900d000aad221001600390caf001cdbb106240031007e033bdb3b00e9067700850083d42b004300c503f40043dbd6037b005000460ea7db5900910f90009f0012d5e7005c00970a5f006ddb930fa1009a00560f86db9d00820e86006f007dd3f400ab00a60fcd01b7dbb00b4b00bd0079083adbc00045035d000600c1df7300cc0039049e00dddb380e8c00da00e30dd8dbdc00220e130027004dd9f500e3009d0a6a00e9db26090001ef00ea03c5dbf0002306', 'hex'), # DATA (tcp 1016, actual 112 +104 codecs.decode('d000380028d83400ff00430f6200fbdba70dfb0002016203c5db0201a5044b00c10132d4de0006019f080a000cdab70541000f01fe0f19db1901c902e600dc0198d839002f01360ed80037dabd04d4003301520104da38014f01a100830196d5f5004b015c0411005cdacd03bc67ab8d162b48ad18f7fec7448e448387afa1a3062b37ca3cf9f53c8087f9150926e03335df1b71aedbd0f2', 'hex'), # raw 128 + 24 codecs.decode('b40da90541168df1551f70fc15b51bf26d7d4501bf12915e6485fd966f0ba2072728987dc1018a12ab105ec7aa003508fef08a49b923f3e85e42edf5ea861bd1600d23151787fc78d522f38431883e809f0e4dd2008ecd8ed97670035acf0c763503f27c37ec76d982806986c6016bf952d01e0673820570a87e1a236005ad817d8734949952bb929d81e5fdbcf99ca0c4886d8c65098c0e9aa6ac81e103c684607951d03b0ce9f0cd785885ad27d4f61bfc5de8bc7411de8d8f5910c518e004e9229304f90f9a891395912680ebc6f4c57fd3fceeb684f7c18ba78107fc2e16073e89f6d6b67fbb', 'hex'), # raw 128 +104 codecs.decode('fb11e2feb3effd0e5391c61da77176359f7e4d8a0ff3090a01204501c76a19af07002b003ac0042300dbab0113c2fa07c56e02cbc32bc10400a1c31349df0008102d2a04c5120c9b8904008f0810fb0404c20f3a6407006fd709fbecfe0400041529f60304fd1931fb0b006ede0c391bc1c0c0460e00a3210b1a34c2ffffc3fd980f04832806404a5bc1940505da86292d0f0056f600f925', 'hex'), # raw 128 +24 codecs.decode('5c43c243ff06c5733a5d85c7080040473f3d31dd01774d8983c4c000778982750b009459d551c426c3c0170900929b17fba3fc780800376135fefbe0ff1100396aed3b3146265ac0c1ffff15c5357232fffdc0fdc03f3bc141914514003f85e738fdfa2441ff5cc0ff45951504ec7ee9c0fac1fc053dc424c0554affc103c5f894f2fd0e00668b06eac1f9b3c3fdc2fd08008388f3ef460a00869e13a56079cf013fb82d22c394c2c619c3c33ac45304c527e19d4d0c008aab1305c0fa1aff6050110083687dc713c396c0c2c1c104c1c6b10f0072b54cc14d83c519c1760e0055b9f8c1f8187486', 'hex'), # raw 128 +104 codecs.decode('750d00797ff0fdee593bc1090086781657267f11004cc137', 'hex'), # raw 24? codecs.decode('5050827df4000000dd0548b10100320038ffc024c2fec4c1c18c05c4fad0013ec54051c2879d00cb56521cc2c204c50fc2e62506008eca1a05fec5250d0072d23dc344c2c45cc10a008bd31a3afefa1a92c0080034e68642c45d0d005bdd376707c08da002008ede24ffc100e405213306002de78637c4de011de846ff98c100', 'hex'), # raw 128-24 (104) +24 codecs.decode('07283b590300fef3f5f800da10f5494b031000071819061035084365650b14900834c0c1c4c104c1c5a302100e1134c1c01045c83c8806110e2185c22edd11082424fec006ff02cb052834c3c073c910d4eb965b3833ff0bc582cce18d876a051106f337f826c00410013d2b05c200ca003f4cfeff03d56454ccc101', 'hex'), # raw 124 codecs.decode('5050827d08000000d007fcf701003200', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201') #, verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) template = conn.get_user_template(14, 1) self.assertEqual(template.size, 1243, "incorrect size %s" % template.size) self.assertEqual(template.mark, b"4d98535332310000...feff03d56454ccc1", "incorrect mark %s" % template.mark) self.assertEqual(template.uid, 14, "incorrect uid %s" % template.uid) conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_get_template_2f(self, helper, socket): """ cchekc correct template 2 fixed""" helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d10000000dc053b59d0983500f3030000f0030000', 'hex'), # tcp PREPARE_DATA 1011 codecs.decode('5050827df8030000dd056855000035004ab153533231000003f2f10408050709ced000001bf36901000000831f256cf23e00740f4c008900f2f879005500fe0fe3005bf2d30a60005c00a00f32f26600580a2700ad00e3fd98007500800f000082f21a0f68008300300e5bf28d00570930004b00dafd4c009a00dd090900a8f2270f8600ad008a0b1ff2b000480f4400730040fc5400b800430f4400c6f2370ab100ca00f30ecbf2cb002f0f4a001300c7fdaa00e400b50c4300e6f2b706bf00ea00f90668f2f2002e0dad003000b7f7cf00f600350cbe0008f31f0dd0000c017101cbf20f019c01', 'hex'), # DATA (tcp 1016, actual 112 +104 codecs.decode('5e00d4012dfdda001301a408e00019f3400c12002201fc0c4ff2570193096d0092018dfc3c7a62107e85688f818ff39a358ef99acb0fee06d47da2e2116a7c77f102a57bd1890a6a598b5ee2db0a0f64a384b28da105f29ca7eff9a137194560847d1565aa827ffc69705ffa8189f19f1f9ca10abbf2160f791a6e0dd8af0f723e062b6e84000a997780c100f6684b8016188780d7f44d0a', 'hex'), # raw 128 + 24 codecs.decode('5083790fd0fa1a089ef44b807572db9b0900d9795083397a8780ca0161091489ae7b7c134278a6004c00b68bcf80e9f98982509a0e01dbf02e6a441a21138a70ddeaf1f9b16a8f1025f2ceef74f369094b70b2fb3a176bb339f9860f6459f304bb679757b3fca891ba733c4c6444c72032f303131c9705004b3079bc0600a03a89c405fdc03205004b456254c6006fb276c20a00a94343c2fc30779505001b4f862804f27d51faff31c2cd007fa50141c12f1800085a9431c181c4fe83c10674c33275300600245c89fcc0ad07005b5c6b88040503a96267c1830700e9695d30c1c2510a0031ae57', 'hex'), # raw 128 +104 codecs.decode('5fa47a04007c7574510f039e80f0fd3bfefe9d55c3fa01c7841746ff06fa1ff2ee8ea07e787e0689c133c1c3c0c2ffc004c1fcae07005990578c040d03dc9350c0c4376a3a8623f2f29ea2c17c67b0928330726b6a83ff08c582afa8c5c3c3c1c3fec300895f0efdfd2809000bae21be5afd0c001cb68c59c20dc3fefda205004fb8150cfbc1030089bbffc30ef245bc467bc07404c288fd', 'hex'), # raw 128 +24 codecs.decode('0155bd46786445c3c130c0040091c52938c320f305c8a4c1ff7b05c08a63c3c2c1c2c3c13ac1c132c1ffc2c0c0c205c3c336050084c9306ec100b13f352c0700cacdf56b72f611f61a2d1605d5ef41a4fec0f818004c17c63e0dfef9c0fdfffe3b3649a0fac00c004ada856a6464c20b006cf83145c1c032c23d04109804d57617e28f07a0fe3bff3bfbfe0afc2ac0fdc138c01095f91bc543281101cbb0c19758fe9282c3c26270737997c1c0c2c0c204c70be27f0f2084c5fc070913ad1731c2c1c37b0125130c1ba958c049ff4e9bc6529262c1c290c2076ac2ed11e718a9554b068bc730b196', 'hex'), # raw 128 +104 codecs.decode('c2c1c2c1077dfc830210074929c1c910c5af81c0c1ffc2fe', 'hex'), # raw 24? codecs.decode('5050827d0b000000dd054ba201003500a05701', 'hex'), # raw 43-24 (104) codecs.decode('5050827d08000000d007fcf701003200', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201')#, verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) template = conn.get_user_template(14, 1) self.assertEqual(template.size, 1010, "incorrect size %s" % template.size) self.assertEqual(template.mark, b"4ab1535332310000...81c0c1ffc2fea057", "incorrect mark %s" % template.mark) self.assertEqual(template.uid, 14, "incorrect uid %s" % template.uid) conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_live_connect(self, helper, socket): """ check live_capture 12 bytes""" helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d64000000d007a3159663130000000000000000000000000000000000070000000000000006000000000000005d020000000000000f0c0000000000000100000000000000b80b000010270000a0860100b20b00000927000043840100000000000000', 'hex'), #sizes codecs.decode('5050827d04020000dd05942c96631500f801000001000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003830380000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003832310000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833350000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833310000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833320000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003836000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000383432000000000000000000000000000000000000000000','hex'), #DATA directly(not ok) codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response codecs.decode('5050827d10000000dc053b59d0983500f401ae4301000000f19449000000120c07130906', 'hex'), # tcp PREPARE_DATA 1011 codecs.decode('5050827df8030000f401ae4301000000f19449000000120c07130906', 'hex'), # reg_event! codecs.decode('5050827d08000000d007fcf701003200', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201')#, verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) for att in conn.live_capture(): #print att conn.end_live_capture = True self.assertEqual(att.user_id, "4822257", "incorrect user_id %s" % att.user_id) conn.disconnect() @patch('zk.base.socket') @patch('zk.base.ZK_helper') def test_tcp_live_connect_small(self, helper, socket): """ check live_capture 32 bytes""" helper.return_value.test_ping.return_value = True # ping simulated helper.return_value.test_tcp.return_value = 0 # helper tcp ok socket.return_value.recv.side_effect = [ codecs.decode('5050827d08000000d0075fb2cf450100', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d64000000d007a3159663130000000000000000000000000000000000070000000000000006000000000000005d020000000000000f0c0000000000000100000000000000b80b000010270000a0860100b20b00000927000043840100000000000000', 'hex'), #sizes codecs.decode('5050827d04020000dd05942c96631500f801000001000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003830380000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003832310000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833350000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833310000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003833320000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003836000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000383432000000000000000000000000000000000000000000','hex'), #DATA directly(not ok) codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response codecs.decode('5050827d10000000dc053b59d0983500f401ae4301000000f19449000000120c07130906', 'hex'), # tcp PREPARE_DATA 1011 codecs.decode('5050827df8030000f401ae43010000003131343030363400000000000000000000000000000000000f00120b1d0c3703', 'hex'), # reg_event! codecs.decode('5050827d08000000d007fcf701003200', 'hex'), # tcp CMD_ACK_OK codecs.decode('5050827d08000000d00745b2cf451b00', 'hex'), # tcp random CMD_ACK_OK TODO: generate proper sequenced response ] #begin zk = ZK('192.168.1.201')#, verbose=True) conn = zk.connect() socket.return_value.send.assert_called_with(codecs.decode('5050827d08000000e80317fc00000000', 'hex')) for att in conn.live_capture(): #print att conn.end_live_capture = True self.assertEqual(att.user_id, "1140064", "incorrect user_id %s" % att.user_id) conn.disconnect() if __name__ == '__main__': unittest.main()
98.196078
1,107
0.800978
3,383
50,080
11.712977
0.099616
0.044215
0.017161
0.018549
0.479521
0.471495
0.44906
0.436063
0.430763
0.424757
0
0.518666
0.12492
50,080
509
1,108
98.388998
0.385519
0.090695
0
0.582547
0
0
0.605839
0.548159
0
1
0
0.001965
0.181604
1
0.049528
false
0.009434
0.025943
0
0.07783
0.018868
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
7
978012f7001f62997ca4a87c8b56c83fbab37423
139
py
Python
Python/Minha_Biblioteca/criar_menu/clientes.py
Brun0C/projeto_python
ac544bfeb27447e820e4e2b0bd936de00d8b3348
[ "MIT" ]
null
null
null
Python/Minha_Biblioteca/criar_menu/clientes.py
Brun0C/projeto_python
ac544bfeb27447e820e4e2b0bd936de00d8b3348
[ "MIT" ]
null
null
null
Python/Minha_Biblioteca/criar_menu/clientes.py
Brun0C/projeto_python
ac544bfeb27447e820e4e2b0bd936de00d8b3348
[ "MIT" ]
null
null
null
def cadastrar_cliente(): print('Operação realizada com sucesso') def listar_clientes(): print('Operação realizada com sucesso')
17.375
43
0.733813
16
139
6.25
0.625
0.26
0.44
0.5
0.64
0
0
0
0
0
0
0
0.165468
139
7
44
19.857143
0.862069
0
0
0.5
0
0
0.434783
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
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
1
1
0
0
0
0
1
0
8
c10f66fe953a31fbdb5b635638ba1cf969c9886e
349,023
py
Python
pyidf/unitary_equipment.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
19
2015-12-08T23:33:51.000Z
2022-01-31T04:41:10.000Z
pyidf/unitary_equipment.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
2
2019-10-04T10:57:00.000Z
2021-10-01T06:46:17.000Z
pyidf/unitary_equipment.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
7
2015-11-04T02:25:01.000Z
2021-12-08T03:14:28.000Z
""" Data objects in group "Unitary Equipment" """ from collections import OrderedDict import logging from pyidf.helper import DataObject logger = logging.getLogger("pyidf") logger.addHandler(logging.NullHandler()) class AirLoopHvacUnitarySystem(DataObject): """ Corresponds to IDD object `AirLoopHVAC:UnitarySystem` AirloopHVAC:UnitarySystem is a generic HVAC system type that allows any configuration of coils and/or fan. This object is a replacement of other AirloopHVAC objects. This object can be used in outdoor air systems, outdoor air units, air loops, and as zone equipment if desired. """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'control type', {'name': u'Control Type', 'pyname': u'control_type', 'default': u'Load', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Load', u'SetPoint'], 'autocalculatable': False, 'type': 'alpha'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'dehumidification control type', {'name': u'Dehumidification Control Type', 'pyname': u'dehumidification_control_type', 'default': u'None', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'Multimode', u'CoolReheat'], 'autocalculatable': False, 'type': 'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'air inlet node name', {'name': u'Air Inlet Node Name', 'pyname': u'air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air outlet node name', {'name': u'Air Outlet Node Name', 'pyname': u'air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply fan object type', {'name': u'Supply Fan Object Type', 'pyname': u'supply_fan_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume', u'Fan:VariableVolume', u'Fan:ComponentModel'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply fan name', {'name': u'Supply Fan Name', 'pyname': u'supply_fan_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'fan placement', {'name': u'Fan Placement', 'pyname': u'fan_placement', 'required-field': False, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Coil:Heating:DX:SingleSpeed', u'Coil:Heating:DX:MultiSpeed', u'Coil:Heating:DX:VariableSpeed', u'Coil:Heating:WaterToAirHeatPump:ParameterEstimation', u'Coil:Heating:WaterToAirHeatPump:EquationFit', u'Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit', u'Coil:Heating:Gas', u'Coil:Heating:Gas:MultiStage', u'Coil:Heating:Electric', u'Coil:Heating:Electric:MultiStage', u'Coil:Heating:Water', u'Coil:Heating:Steam', u'Coil:Heating:Desuperheater', u'Coil:UserDefined'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'dx heating coil sizing ratio', {'name': u'DX Heating Coil Sizing Ratio', 'pyname': u'dx_heating_coil_sizing_ratio', 'default': 1.0, 'minimum>': 0.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real'}), (u'cooling coil object type', {'name': u'Cooling Coil Object Type', 'pyname': u'cooling_coil_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Coil:Cooling:DX:SingleSpeed', u'Coil:Cooling:DX:TwoSpeed', u'Coil:Cooling:DX:MultiSpeed', u'Coil:Cooling:DX:VariableSpeed', u'Coil:Cooling:DX:TwoStageWithHumidityControlMode', u'Coil:Cooling:DX:SingleSpeed:ThermalStorage', u'CoilSystem:Cooling:DX:HeatExchangerAssisted', u'Coil:Cooling:WaterToAirHeatPump:ParameterEstimation', u'Coil:Cooling:WaterToAirHeatPump:EquationFit', u'Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit', u'Coil:Cooling:Water', u'Coil:Cooling:Water:DetailedGeometry', u'CoilSystem:Cooling:Water:HeatExchangerAssisted', u'Coil:UserDefined'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling coil name', {'name': u'Cooling Coil Name', 'pyname': u'cooling_coil_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'use doas dx cooling coil', {'name': u'Use DOAS DX Cooling Coil', 'pyname': u'use_doas_dx_cooling_coil', 'default': u'No', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Yes', u'No'], 'autocalculatable': False, 'type': 'alpha'}), (u'doas dx cooling coil leaving minimum air temperature', {'name': u'DOAS DX Cooling Coil Leaving Minimum Air Temperature', 'pyname': u'doas_dx_cooling_coil_leaving_minimum_air_temperature', 'default': 2.0, 'maximum': 7.2, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'latent load control', {'name': u'Latent Load Control', 'pyname': u'latent_load_control', 'default': u'SensibleOnlyLoadControl', 'required-field': False, 'autosizable': False, 'accepted-values': [u'SensibleOnlyLoadControl', u'LatentOnlyLoadControl', u'LatentWithSensibleLoadControl', u'LatentOrSensibleLoadControl'], 'autocalculatable': False, 'type': 'alpha'}), (u'supplemental heating coil object type', {'name': u'Supplemental Heating Coil Object Type', 'pyname': u'supplemental_heating_coil_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Desuperheater', u'Coil:Heating:Water', u'Coil:Heating:Steam', u'Coil:UserDefined'], 'autocalculatable': False, 'type': 'alpha'}), (u'supplemental heating coil name', {'name': u'Supplemental Heating Coil Name', 'pyname': u'supplemental_heating_coil_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'cooling supply air flow rate method', {'name': u'Cooling Supply Air Flow Rate Method', 'pyname': u'cooling_supply_air_flow_rate_method', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'SupplyAirFlowRate', u'FlowPerFloorArea', u'FractionOfAutosizedCoolingValue', u'FlowPerCoolingCapacity'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling supply air flow rate', {'name': u'Cooling Supply Air Flow Rate', 'pyname': u'cooling_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'cooling supply air flow rate per floor area', {'name': u'Cooling Supply Air Flow Rate Per Floor Area', 'pyname': u'cooling_supply_air_flow_rate_per_floor_area', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s-m2'}), (u'cooling fraction of autosized cooling supply air flow rate', {'name': u'Cooling Fraction of Autosized Cooling Supply Air Flow Rate', 'pyname': u'cooling_fraction_of_autosized_cooling_supply_air_flow_rate', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real'}), (u'cooling supply air flow rate per unit of capacity', {'name': u'Cooling Supply Air Flow Rate Per Unit of Capacity', 'pyname': u'cooling_supply_air_flow_rate_per_unit_of_capacity', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s-W'}), (u'heating supply air flow rate method', {'name': u'Heating Supply Air Flow Rate Method', 'pyname': u'heating_supply_air_flow_rate_method', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'SupplyAirFlowRate', u'FlowPerFloorArea', u'FractionOfAutosizedHeatingValue', u'FlowPerHeatingCapacity'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating supply air flow rate', {'name': u'Heating Supply Air Flow Rate', 'pyname': u'heating_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating supply air flow rate per floor area', {'name': u'Heating Supply Air Flow Rate Per Floor Area', 'pyname': u'heating_supply_air_flow_rate_per_floor_area', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s-m2'}), (u'heating fraction of autosized heating supply air flow rate', {'name': u'Heating Fraction of Autosized Heating Supply Air Flow Rate', 'pyname': u'heating_fraction_of_autosized_heating_supply_air_flow_rate', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real'}), (u'heating supply air flow rate per unit of capacity', {'name': u'Heating Supply Air Flow Rate Per Unit of Capacity', 'pyname': u'heating_supply_air_flow_rate_per_unit_of_capacity', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s-W'}), (u'no load supply air flow rate method', {'name': u'No Load Supply Air Flow Rate Method', 'pyname': u'no_load_supply_air_flow_rate_method', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'SupplyAirFlowRate', u'FlowPerFloorArea', u'FractionOfAutosizedCoolingValue', u'FractionOfAutosizedHeatingValue', u'FlowPerCoolingCapacity', u'FlowPerHeatingCapacity'], 'autocalculatable': False, 'type': 'alpha'}), (u'no load supply air flow rate', {'name': u'No Load Supply Air Flow Rate', 'pyname': u'no_load_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'no load supply air flow rate per floor area', {'name': u'No Load Supply Air Flow Rate Per Floor Area', 'pyname': u'no_load_supply_air_flow_rate_per_floor_area', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s-m2'}), (u'no load fraction of autosized cooling supply air flow rate', {'name': u'No Load Fraction of Autosized Cooling Supply Air Flow Rate', 'pyname': u'no_load_fraction_of_autosized_cooling_supply_air_flow_rate', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real'}), (u'no load fraction of autosized heating supply air flow rate', {'name': u'No Load Fraction of Autosized Heating Supply Air Flow Rate', 'pyname': u'no_load_fraction_of_autosized_heating_supply_air_flow_rate', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real'}), (u'no load supply air flow rate per unit of capacity during cooling operation', {'name': u'No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation', 'pyname': u'no_load_supply_air_flow_rate_per_unit_of_capacity_during_cooling_operation', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s-W'}), (u'no load supply air flow rate per unit of capacity during heating operation', {'name': u'No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation', 'pyname': u'no_load_supply_air_flow_rate_per_unit_of_capacity_during_heating_operation', 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s-W'}), (u'maximum supply air temperature', {'name': u'Maximum Supply Air Temperature', 'pyname': u'maximum_supply_air_temperature', 'default': 80.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'maximum outdoor dry-bulb temperature for supplemental heater operation', {'name': u'Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation', 'pyname': u'maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation', 'default': 21.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'outdoor dry-bulb temperature sensor node name', {'name': u'Outdoor Dry-Bulb Temperature Sensor Node Name', 'pyname': u'outdoor_drybulb_temperature_sensor_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'maximum cycling rate', {'name': u'Maximum Cycling Rate', 'pyname': u'maximum_cycling_rate', 'default': 2.5, 'maximum': 5.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'cycles/hr'}), (u'heat pump time constant', {'name': u'Heat Pump Time Constant', 'pyname': u'heat_pump_time_constant', 'default': 60.0, 'maximum': 500.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u's'}), (u'fraction of on-cycle power use', {'name': u'Fraction of On-Cycle Power Use', 'pyname': u'fraction_of_oncycle_power_use', 'default': 0.01, 'maximum': 0.05, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real'}), (u'heat pump fan delay time', {'name': u'Heat Pump Fan Delay Time', 'pyname': u'heat_pump_fan_delay_time', 'default': 60.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u's'}), (u'ancillary on-cycle electric power', {'name': u'Ancillary On-Cycle Electric Power', 'pyname': u'ancillary_oncycle_electric_power', 'default': 0.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'W'}), (u'ancillary off-cycle electric power', {'name': u'Ancillary Off-Cycle Electric Power', 'pyname': u'ancillary_offcycle_electric_power', 'default': 0.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'W'}), (u'design heat recovery water flow rate', {'name': u'Design Heat Recovery Water Flow Rate', 'pyname': u'design_heat_recovery_water_flow_rate', 'default': 0.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'maximum temperature for heat recovery', {'name': u'Maximum Temperature for Heat Recovery', 'pyname': u'maximum_temperature_for_heat_recovery', 'default': 80.0, 'maximum': 100.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'heat recovery water inlet node name', {'name': u'Heat Recovery Water Inlet Node Name', 'pyname': u'heat_recovery_water_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'heat recovery water outlet node name', {'name': u'Heat Recovery Water Outlet Node Name', 'pyname': u'heat_recovery_water_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'design specification multispeed object type', {'name': u'Design Specification Multispeed Object Type', 'pyname': u'design_specification_multispeed_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'UnitarySystemPerformance:Multispeed'], 'autocalculatable': False, 'type': 'alpha'}), (u'design specification multispeed object name', {'name': u'Design Specification Multispeed Object Name', 'pyname': u'design_specification_multispeed_object_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 14, 'name': u'AirLoopHVAC:UnitarySystem', 'pyname': u'AirLoopHvacUnitarySystem', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` | Unique name for the Unitary System. Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def control_type(self): """field `Control Type` | Load control requires a Controlling Zone name. | SetPoint control requires set points at coil outlet node. | Default value: Load Args: value (str): value for IDD Field `Control Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `control_type` or None if not set """ return self["Control Type"] @control_type.setter def control_type(self, value="Load"): """Corresponds to IDD field `Control Type`""" self["Control Type"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` | Used only for Load based control | Zone name where thermostat is located. Required when Control Type = Load. Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def dehumidification_control_type(self): """field `Dehumidification Control Type` | None = meet sensible load only | Multimode = activate enhanced dehumidification mode | as needed and meet sensible load. Valid only with | cooling coil type CoilSystem:Cooling:DX:HeatExchangerAssisted. | This control mode allows the heat exchanger to be turned | on and off based on the zone dehumidification requirements. | A ZoneControl:Humidistat object is also required. | CoolReheat = cool beyond the dry-bulb setpoint. | as required to meet the humidity setpoint. Valid with all | cooling coil types. When a heat exchanger assisted cooling | coil is used, the heat exchanger is locked on at all times. | A ZoneControl:Humidistat object is also required. | Default value: None Args: value (str): value for IDD Field `Dehumidification Control Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `dehumidification_control_type` or None if not set """ return self["Dehumidification Control Type"] @dehumidification_control_type.setter def dehumidification_control_type(self, value="None"): """Corresponds to IDD field `Dehumidification Control Type`""" self["Dehumidification Control Type"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. | A schedule value greater than zero (usually 1 is used) indicates that the unit is | available to operate as needed. A value less than or equal to zero (usually zero | is used) denotes that the unit must be off. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def air_inlet_node_name(self): """field `Air Inlet Node Name` | Enter the node name used as the inlet air node for the unitary system. Args: value (str): value for IDD Field `Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_inlet_node_name` or None if not set """ return self["Air Inlet Node Name"] @air_inlet_node_name.setter def air_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Inlet Node Name`""" self["Air Inlet Node Name"] = value @property def air_outlet_node_name(self): """field `Air Outlet Node Name` | Enter the node name used as the outlet air node for the unitary system. Args: value (str): value for IDD Field `Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_outlet_node_name` or None if not set """ return self["Air Outlet Node Name"] @air_outlet_node_name.setter def air_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Outlet Node Name`""" self["Air Outlet Node Name"] = value @property def supply_fan_object_type(self): """field `Supply Fan Object Type` | Enter the type of supply air fan if included in the unitary system. | Fan:ConstantVolume only works with continuous fan operating mode (i.e. supply | air fan operating mode schedule values greater than 0). | Specify a Fan:OnOff object when the Supply Air Fan Operating Mode Schedule Name | input field above is left blank. | Specify a Fan:VariableVolume when modeling VAV systems which used setpoint based control | if the fan is included in the unitary system object. | The ComponentModel fan type may be substituted for the ConstantVolume or VariableVolume | fan types when more detailed fan modeling is required. | The variable or constant volume fan may be specified on the branch instead of contained | within the unitary system object (i.e., this field may be blank for certain configurations). Args: value (str): value for IDD Field `Supply Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_object_type` or None if not set """ return self["Supply Fan Object Type"] @supply_fan_object_type.setter def supply_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Fan Object Type`""" self["Supply Fan Object Type"] = value @property def supply_fan_name(self): """field `Supply Fan Name` | Enter the name of the supply air fan if included in the unitary system. Args: value (str): value for IDD Field `Supply Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_name` or None if not set """ return self["Supply Fan Name"] @supply_fan_name.setter def supply_fan_name(self, value=None): """Corresponds to IDD field `Supply Fan Name`""" self["Supply Fan Name"] = value @property def fan_placement(self): """field `Fan Placement` | Enter the type of supply air fan if included in the unitary system. Args: value (str): value for IDD Field `Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `fan_placement` or None if not set """ return self["Fan Placement"] @fan_placement.setter def fan_placement(self, value=None): """Corresponds to IDD field `Fan Placement`""" self["Fan Placement"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | A fan operating mode schedule value of 0 indicates cycling fan mode (supply air | fan cycles on and off in tandem with the cooling or heating coil). | Any other schedule value indicates continuous fan mode (supply air fan operates | continuously regardless of cooling or heating coil operation). Provide a schedule | with non-zero values when high humidity control is specified. | Leaving this schedule name blank will default to constant fan mode for the | entire simulation period. | This field is not used when set point based control is used where a set point | controls the coil (i.e., model assumes constant fan mode operation). Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | Enter the type of heating coil if included in the unitary system. Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` | Enter the name of the heating coil if included in the unitary system. Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value @property def dx_heating_coil_sizing_ratio(self): """field `DX Heating Coil Sizing Ratio` | Used to adjust heat pump heating capacity with respect to DX cooling capacity | used only for heat pump configurations (i.e., a DX cooling and DX heating coil is used). | Default value: 1.0 Args: value (float): value for IDD Field `DX Heating Coil Sizing Ratio` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `dx_heating_coil_sizing_ratio` or None if not set """ return self["DX Heating Coil Sizing Ratio"] @dx_heating_coil_sizing_ratio.setter def dx_heating_coil_sizing_ratio(self, value=1.0): """Corresponds to IDD field `DX Heating Coil Sizing Ratio`""" self["DX Heating Coil Sizing Ratio"] = value @property def cooling_coil_object_type(self): """field `Cooling Coil Object Type` | Enter the type of cooling coil if included in the unitary system. Args: value (str): value for IDD Field `Cooling Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_object_type` or None if not set """ return self["Cooling Coil Object Type"] @cooling_coil_object_type.setter def cooling_coil_object_type(self, value=None): """Corresponds to IDD field `Cooling Coil Object Type`""" self["Cooling Coil Object Type"] = value @property def cooling_coil_name(self): """field `Cooling Coil Name` | Enter the name of the cooling coil if included in the unitary system. Args: value (str): value for IDD Field `Cooling Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_name` or None if not set """ return self["Cooling Coil Name"] @cooling_coil_name.setter def cooling_coil_name(self, value=None): """Corresponds to IDD field `Cooling Coil Name`""" self["Cooling Coil Name"] = value @property def use_doas_dx_cooling_coil(self): """field `Use DOAS DX Cooling Coil` | If Yes, the DX cooling coil runs as 100% DOAS DX coil. | If No, the DX cooling coil runs as a regular DX coil. | If left blank the default is regular dx coil. | Default value: No Args: value (str): value for IDD Field `Use DOAS DX Cooling Coil` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `use_doas_dx_cooling_coil` or None if not set """ return self["Use DOAS DX Cooling Coil"] @use_doas_dx_cooling_coil.setter def use_doas_dx_cooling_coil(self, value="No"): """Corresponds to IDD field `Use DOAS DX Cooling Coil`""" self["Use DOAS DX Cooling Coil"] = value @property def doas_dx_cooling_coil_leaving_minimum_air_temperature(self): """field `DOAS DX Cooling Coil Leaving Minimum Air Temperature` | DX cooling coil leaving minimum air temperature defines the minimum DOAS DX cooling coil | leaving air temperature that should be maintained to avoid frost formation. This input | field is optional and only used along with the input field above. | Units: C | Default value: 2.0 | value <= 7.2 Args: value (float): value for IDD Field `DOAS DX Cooling Coil Leaving Minimum Air Temperature` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `doas_dx_cooling_coil_leaving_minimum_air_temperature` or None if not set """ return self["DOAS DX Cooling Coil Leaving Minimum Air Temperature"] @doas_dx_cooling_coil_leaving_minimum_air_temperature.setter def doas_dx_cooling_coil_leaving_minimum_air_temperature(self, value=2.0): """Corresponds to IDD field `DOAS DX Cooling Coil Leaving Minimum Air Temperature`""" self["DOAS DX Cooling Coil Leaving Minimum Air Temperature"] = value @property def latent_load_control(self): """field `Latent Load Control` | SensibleOnlyLoadControl is selected when thermostat control is used. | LatentOnlyLoadControl is selected when humidistat control is used. | LatentWithSensibleLoadControl is selected when thermostat control is used and | dehumidification is required only when a sensible load exists. | LatentOrSensibleLoadControl is selected when thermostat control is used and | dehumidification is required any time the humidistat set point is exceeded. | Default value: SensibleOnlyLoadControl Args: value (str): value for IDD Field `Latent Load Control` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `latent_load_control` or None if not set """ return self["Latent Load Control"] @latent_load_control.setter def latent_load_control(self, value="SensibleOnlyLoadControl"): """Corresponds to IDD field `Latent Load Control`""" self["Latent Load Control"] = value @property def supplemental_heating_coil_object_type(self): """field `Supplemental Heating Coil Object Type` | Enter the type of supplemental heating coil if included in the unitary system. | Only required if dehumidification control type is "CoolReheat". Args: value (str): value for IDD Field `Supplemental Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_object_type` or None if not set """ return self["Supplemental Heating Coil Object Type"] @supplemental_heating_coil_object_type.setter def supplemental_heating_coil_object_type(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Object Type`""" self["Supplemental Heating Coil Object Type"] = value @property def supplemental_heating_coil_name(self): """field `Supplemental Heating Coil Name` | Enter the name of the supplemental heating coil if included in the unitary system. | Only required if dehumidification control type is "CoolReheat". Args: value (str): value for IDD Field `Supplemental Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_name` or None if not set """ return self["Supplemental Heating Coil Name"] @supplemental_heating_coil_name.setter def supplemental_heating_coil_name(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Name`""" self["Supplemental Heating Coil Name"] = value @property def cooling_supply_air_flow_rate_method(self): """field `Cooling Supply Air Flow Rate Method` | Enter the method used to determine the cooling supply air volume flow rate. | None is used when a cooling coil is not included in the unitary system or this field may be blank. | SupplyAirFlowRate is selected when the magnitude of the supply air volume is used. | FlowPerFloorArea is selected when the supply air volume flow rate is based on total floor area | served by the unitary system. | FractionOfAutosizedCoolingValue is selected when the supply air volume is a fraction of the | value determined by the simulation. | FlowPerCoolingCapacity is selected when the supply air volume is a fraction of the cooling | capacity as determined by the simulation. Args: value (str): value for IDD Field `Cooling Supply Air Flow Rate Method` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_supply_air_flow_rate_method` or None if not set """ return self["Cooling Supply Air Flow Rate Method"] @cooling_supply_air_flow_rate_method.setter def cooling_supply_air_flow_rate_method(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate Method`""" self["Cooling Supply Air Flow Rate Method"] = value @property def cooling_supply_air_flow_rate(self): """field `Cooling Supply Air Flow Rate` | Enter the magnitude of the supply air volume flow rate during cooling operation. | Required field when Cooling Supply Air Flow Rate Method is SupplyAirFlowRate. | This field may be blank if a cooling coil is not included in the unitary system. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_supply_air_flow_rate` or None if not set """ return self["Cooling Supply Air Flow Rate"] @cooling_supply_air_flow_rate.setter def cooling_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate`""" self["Cooling Supply Air Flow Rate"] = value @property def cooling_supply_air_flow_rate_per_floor_area(self): """field `Cooling Supply Air Flow Rate Per Floor Area` | Enter the supply air volume flow rate per total floor area fraction. | Required field when Cooling Supply Air Flow Rate Method is FlowPerFloorArea. | This field may be blank if a cooling coil is not included in the unitary system. | Units: m3/s-m2 Args: value (float): value for IDD Field `Cooling Supply Air Flow Rate Per Floor Area` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `cooling_supply_air_flow_rate_per_floor_area` or None if not set """ return self["Cooling Supply Air Flow Rate Per Floor Area"] @cooling_supply_air_flow_rate_per_floor_area.setter def cooling_supply_air_flow_rate_per_floor_area(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate Per Floor Area`""" self["Cooling Supply Air Flow Rate Per Floor Area"] = value @property def cooling_fraction_of_autosized_cooling_supply_air_flow_rate(self): """field `Cooling Fraction of Autosized Cooling Supply Air Flow Rate` | Enter the supply air volume flow rate as a fraction of the cooling supply air flow rate. | Required field when Cooling Supply Air Flow Rate Method is FractionOfAutosizedCoolingValue. | This field may be blank if a cooling coil is not included in the unitary system. Args: value (float): value for IDD Field `Cooling Fraction of Autosized Cooling Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `cooling_fraction_of_autosized_cooling_supply_air_flow_rate` or None if not set """ return self[ "Cooling Fraction of Autosized Cooling Supply Air Flow Rate"] @cooling_fraction_of_autosized_cooling_supply_air_flow_rate.setter def cooling_fraction_of_autosized_cooling_supply_air_flow_rate( self, value=None): """Corresponds to IDD field `Cooling Fraction of Autosized Cooling Supply Air Flow Rate`""" self[ "Cooling Fraction of Autosized Cooling Supply Air Flow Rate"] = value @property def cooling_supply_air_flow_rate_per_unit_of_capacity(self): """field `Cooling Supply Air Flow Rate Per Unit of Capacity` | Enter the supply air volume flow rate as a fraction of the cooling capacity. | Required field when Cooling Supply Air Flow Rate Method is FlowPerCoolingCapacity. | This field may be blank if a cooling coil is not included in the unitary system. | Units: m3/s-W Args: value (float): value for IDD Field `Cooling Supply Air Flow Rate Per Unit of Capacity` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `cooling_supply_air_flow_rate_per_unit_of_capacity` or None if not set """ return self["Cooling Supply Air Flow Rate Per Unit of Capacity"] @cooling_supply_air_flow_rate_per_unit_of_capacity.setter def cooling_supply_air_flow_rate_per_unit_of_capacity(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate Per Unit of Capacity`""" self["Cooling Supply Air Flow Rate Per Unit of Capacity"] = value @property def heating_supply_air_flow_rate_method(self): """field `Heating Supply Air Flow Rate Method` | Enter the method used to determine the heating supply air volume flow rate. | None is used when a heating coil is not included in the unitary system or this field may be blank. | SupplyAirFlowRate is selected when the magnitude of the supply air volume is used. | FlowPerFloorArea is selected when the supply air volume flow rate is based on total floor area | served by the unitary system. | FractionOfAutosizedHeatingValue is selected when the supply air volume is a fraction of the | value determined by the simulation. | FlowPerHeatingCapacity is selected when the supply air volume is a fraction of the heating | capacity as determined by the simulation. Args: value (str): value for IDD Field `Heating Supply Air Flow Rate Method` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_supply_air_flow_rate_method` or None if not set """ return self["Heating Supply Air Flow Rate Method"] @heating_supply_air_flow_rate_method.setter def heating_supply_air_flow_rate_method(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate Method`""" self["Heating Supply Air Flow Rate Method"] = value @property def heating_supply_air_flow_rate(self): """field `Heating Supply Air Flow Rate` | Enter the magnitude of the supply air volume flow rate during heating operation. | Required field when Heating Supply Air Flow Rate Method is SupplyAirFlowRate. | This field may be blank if a heating coil is not included in the unitary system. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_supply_air_flow_rate` or None if not set """ return self["Heating Supply Air Flow Rate"] @heating_supply_air_flow_rate.setter def heating_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate`""" self["Heating Supply Air Flow Rate"] = value @property def heating_supply_air_flow_rate_per_floor_area(self): """field `Heating Supply Air Flow Rate Per Floor Area` | Enter the supply air volume flow rate per total floor area fraction. | Required field when Heating Supply Air Flow Rate Method is FlowPerFloorArea. | This field may be blank if a heating coil is not included in the unitary system. | Units: m3/s-m2 Args: value (float): value for IDD Field `Heating Supply Air Flow Rate Per Floor Area` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heating_supply_air_flow_rate_per_floor_area` or None if not set """ return self["Heating Supply Air Flow Rate Per Floor Area"] @heating_supply_air_flow_rate_per_floor_area.setter def heating_supply_air_flow_rate_per_floor_area(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate Per Floor Area`""" self["Heating Supply Air Flow Rate Per Floor Area"] = value @property def heating_fraction_of_autosized_heating_supply_air_flow_rate(self): """field `Heating Fraction of Autosized Heating Supply Air Flow Rate` | Enter the supply air volume flow rate as a fraction of the heating supply air flow rate. | Required field when Heating Supply Air Flow Rate Method is FractionOfAutosizedHeatingValue. | This field may be blank if a heating coil is not included in the unitary system. Args: value (float): value for IDD Field `Heating Fraction of Autosized Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heating_fraction_of_autosized_heating_supply_air_flow_rate` or None if not set """ return self[ "Heating Fraction of Autosized Heating Supply Air Flow Rate"] @heating_fraction_of_autosized_heating_supply_air_flow_rate.setter def heating_fraction_of_autosized_heating_supply_air_flow_rate( self, value=None): """Corresponds to IDD field `Heating Fraction of Autosized Heating Supply Air Flow Rate`""" self[ "Heating Fraction of Autosized Heating Supply Air Flow Rate"] = value @property def heating_supply_air_flow_rate_per_unit_of_capacity(self): """field `Heating Supply Air Flow Rate Per Unit of Capacity` | Enter the supply air volume flow rate as a fraction of the heating capacity. | Required field when Heating Supply Air Flow Rate Method is FlowPerHeatingCapacity. | This field may be blank if a heating coil is not included in the unitary system. | Units: m3/s-W Args: value (float): value for IDD Field `Heating Supply Air Flow Rate Per Unit of Capacity` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heating_supply_air_flow_rate_per_unit_of_capacity` or None if not set """ return self["Heating Supply Air Flow Rate Per Unit of Capacity"] @heating_supply_air_flow_rate_per_unit_of_capacity.setter def heating_supply_air_flow_rate_per_unit_of_capacity(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate Per Unit of Capacity`""" self["Heating Supply Air Flow Rate Per Unit of Capacity"] = value @property def no_load_supply_air_flow_rate_method(self): """field `No Load Supply Air Flow Rate Method` | Enter the method used to determine the supply air volume flow rate when no cooling or heating is required. | None is used when a cooling and heating coil is not included in the unitary system or this field may be blank. | SupplyAirFlowRate is selected when the magnitude of the supply air volume is used. | FlowPerFloorArea is selected when the supply air volume flow rate is based on total floor area | served by the unitary system. | FractionOfAutosizedCoolingValue is selected when the supply air volume is a fraction of the | cooling value determined by the simulation. | FractionOfAutosizedHeatingValue is selected when the supply air volume is a fraction of the | heating value determined by the simulation. | FlowPerCoolingCapacity is selected when the supply air volume is a fraction of the cooling | capacity as determined by the simulation. | FlowPerHeatingCapacity is selected when the supply air volume is a fraction of the heating | capacity as determined by the simulation. Args: value (str): value for IDD Field `No Load Supply Air Flow Rate Method` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `no_load_supply_air_flow_rate_method` or None if not set """ return self["No Load Supply Air Flow Rate Method"] @no_load_supply_air_flow_rate_method.setter def no_load_supply_air_flow_rate_method(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate Method`""" self["No Load Supply Air Flow Rate Method"] = value @property def no_load_supply_air_flow_rate(self): """field `No Load Supply Air Flow Rate` | Enter the magnitude of the supply air volume flow rate during when no cooling or heating is required. | Required field when No Load Supply Air Flow Rate Method is SupplyAirFlowRate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `No Load Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `no_load_supply_air_flow_rate` or None if not set """ return self["No Load Supply Air Flow Rate"] @no_load_supply_air_flow_rate.setter def no_load_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate`""" self["No Load Supply Air Flow Rate"] = value @property def no_load_supply_air_flow_rate_per_floor_area(self): """field `No Load Supply Air Flow Rate Per Floor Area` | Enter the supply air volume flow rate per total floor area fraction. | Required field when No Load Supply Air Flow Rate Method is FlowPerFloorArea. | Units: m3/s-m2 Args: value (float): value for IDD Field `No Load Supply Air Flow Rate Per Floor Area` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `no_load_supply_air_flow_rate_per_floor_area` or None if not set """ return self["No Load Supply Air Flow Rate Per Floor Area"] @no_load_supply_air_flow_rate_per_floor_area.setter def no_load_supply_air_flow_rate_per_floor_area(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate Per Floor Area`""" self["No Load Supply Air Flow Rate Per Floor Area"] = value @property def no_load_fraction_of_autosized_cooling_supply_air_flow_rate(self): """field `No Load Fraction of Autosized Cooling Supply Air Flow Rate` | Enter the supply air volume flow rate as a fraction of the cooling supply air flow rate. | Required field when No Load Supply Air Flow Rate Method is FractionOfAutosizedCoolingValue. Args: value (float): value for IDD Field `No Load Fraction of Autosized Cooling Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `no_load_fraction_of_autosized_cooling_supply_air_flow_rate` or None if not set """ return self[ "No Load Fraction of Autosized Cooling Supply Air Flow Rate"] @no_load_fraction_of_autosized_cooling_supply_air_flow_rate.setter def no_load_fraction_of_autosized_cooling_supply_air_flow_rate( self, value=None): """Corresponds to IDD field `No Load Fraction of Autosized Cooling Supply Air Flow Rate`""" self[ "No Load Fraction of Autosized Cooling Supply Air Flow Rate"] = value @property def no_load_fraction_of_autosized_heating_supply_air_flow_rate(self): """field `No Load Fraction of Autosized Heating Supply Air Flow Rate` | Enter the supply air volume flow rate as a fraction of the heating supply air flow rate. | Required field when No Load Supply Air Flow Rate Method is FractionOfAutosizedHeatingValue. Args: value (float): value for IDD Field `No Load Fraction of Autosized Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `no_load_fraction_of_autosized_heating_supply_air_flow_rate` or None if not set """ return self[ "No Load Fraction of Autosized Heating Supply Air Flow Rate"] @no_load_fraction_of_autosized_heating_supply_air_flow_rate.setter def no_load_fraction_of_autosized_heating_supply_air_flow_rate( self, value=None): """Corresponds to IDD field `No Load Fraction of Autosized Heating Supply Air Flow Rate`""" self[ "No Load Fraction of Autosized Heating Supply Air Flow Rate"] = value @property def no_load_supply_air_flow_rate_per_unit_of_capacity_during_cooling_operation( self): """field `No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation` | Enter the supply air volume flow rate as a fraction of the cooling capacity. | Required field when No Load Supply Air Flow Rate Method is FlowPerCoolingCapacity. | Units: m3/s-W Args: value (float): value for IDD Field `No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `no_load_supply_air_flow_rate_per_unit_of_capacity_during_cooling_operation` or None if not set """ return self[ "No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation"] @no_load_supply_air_flow_rate_per_unit_of_capacity_during_cooling_operation.setter def no_load_supply_air_flow_rate_per_unit_of_capacity_during_cooling_operation( self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation`""" self[ "No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation"] = value @property def no_load_supply_air_flow_rate_per_unit_of_capacity_during_heating_operation( self): """field `No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation` | Enter the supply air volume flow rate as a fraction of the heating capacity. | Required field when No Load Supply Air Flow Rate Method is FlowPerHeatingCapacity. | Units: m3/s-W Args: value (float): value for IDD Field `No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `no_load_supply_air_flow_rate_per_unit_of_capacity_during_heating_operation` or None if not set """ return self[ "No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation"] @no_load_supply_air_flow_rate_per_unit_of_capacity_during_heating_operation.setter def no_load_supply_air_flow_rate_per_unit_of_capacity_during_heating_operation( self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation`""" self[ "No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation"] = value @property def maximum_supply_air_temperature(self): """field `Maximum Supply Air Temperature` | Enter the maximum supply air temperature leaving the heating coil. | Units: C | Default value: 80.0 Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature` or None if not set """ return self["Maximum Supply Air Temperature"] @maximum_supply_air_temperature.setter def maximum_supply_air_temperature(self, value=80.0): """Corresponds to IDD field `Maximum Supply Air Temperature`""" self["Maximum Supply Air Temperature"] = value @property def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self): """field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` | Enter the maximum outdoor dry-bulb temperature for supplemental heater operation. | Units: C | Default value: 21.0 Args: value (float): value for IDD Field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation` or None if not set """ return self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] @maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation.setter def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self, value=21.0): """ Corresponds to IDD field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` """ self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] = value @property def outdoor_drybulb_temperature_sensor_node_name(self): """field `Outdoor Dry-Bulb Temperature Sensor Node Name` | If this field is blank, outdoor temperature from the weather file is used. | If this field is not blank, the node name specified determines the outdoor temperature used | for controlling supplemental heater operation. Args: value (str): value for IDD Field `Outdoor Dry-Bulb Temperature Sensor Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `outdoor_drybulb_temperature_sensor_node_name` or None if not set """ return self["Outdoor Dry-Bulb Temperature Sensor Node Name"] @outdoor_drybulb_temperature_sensor_node_name.setter def outdoor_drybulb_temperature_sensor_node_name(self, value=None): """ Corresponds to IDD field `Outdoor Dry-Bulb Temperature Sensor Node Name` """ self["Outdoor Dry-Bulb Temperature Sensor Node Name"] = value @property def maximum_cycling_rate(self): """field `Maximum Cycling Rate` | Used only for water source heat pump. | The maximum on-off cycling rate for the compressor. | Suggested value is 2.5 for a typical heat pump. | Units: cycles/hr | Default value: 2.5 | value <= 5.0 Args: value (float): value for IDD Field `Maximum Cycling Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_cycling_rate` or None if not set """ return self["Maximum Cycling Rate"] @maximum_cycling_rate.setter def maximum_cycling_rate(self, value=2.5): """Corresponds to IDD field `Maximum Cycling Rate`""" self["Maximum Cycling Rate"] = value @property def heat_pump_time_constant(self): """field `Heat Pump Time Constant` | Used only for water source heat pump. | Time constant for the cooling coil's capacity to reach steady state after startup. | Suggested value is 60 for a typical heat pump. | Units: s | Default value: 60.0 | value <= 500.0 Args: value (float): value for IDD Field `Heat Pump Time Constant` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heat_pump_time_constant` or None if not set """ return self["Heat Pump Time Constant"] @heat_pump_time_constant.setter def heat_pump_time_constant(self, value=60.0): """Corresponds to IDD field `Heat Pump Time Constant`""" self["Heat Pump Time Constant"] = value @property def fraction_of_oncycle_power_use(self): """field `Fraction of On-Cycle Power Use` | Used only for water source heat pump. | The fraction of on-cycle power use to adjust the part load fraction based on | the off-cycle power consumption due to crankcase heaters, controls, fans, and etc. | Suggested value is 0.01 for a typical heat pump. | Default value: 0.01 | value <= 0.05 Args: value (float): value for IDD Field `Fraction of On-Cycle Power Use` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `fraction_of_oncycle_power_use` or None if not set """ return self["Fraction of On-Cycle Power Use"] @fraction_of_oncycle_power_use.setter def fraction_of_oncycle_power_use(self, value=0.01): """ Corresponds to IDD field `Fraction of On-Cycle Power Use` """ self["Fraction of On-Cycle Power Use"] = value @property def heat_pump_fan_delay_time(self): """field `Heat Pump Fan Delay Time` | Used only for water source heat pump. | Programmed time delay for heat pump fan to shut off after compressor cycle off. | Only required when fan operating mode is cycling. | Enter 0 when fan operating mode is continuous. | Units: s | Default value: 60.0 Args: value (float): value for IDD Field `Heat Pump Fan Delay Time` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heat_pump_fan_delay_time` or None if not set """ return self["Heat Pump Fan Delay Time"] @heat_pump_fan_delay_time.setter def heat_pump_fan_delay_time(self, value=60.0): """Corresponds to IDD field `Heat Pump Fan Delay Time`""" self["Heat Pump Fan Delay Time"] = value @property def ancillary_oncycle_electric_power(self): """field `Ancillary On-Cycle Electric Power` | Enter the value of ancillary electric power for controls or other devices consumed during the on cycle. | Units: W Args: value (float): value for IDD Field `Ancillary On-Cycle Electric Power` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `ancillary_oncycle_electric_power` or None if not set """ return self["Ancillary On-Cycle Electric Power"] @ancillary_oncycle_electric_power.setter def ancillary_oncycle_electric_power(self, value=None): """ Corresponds to IDD field `Ancillary On-Cycle Electric Power` """ self["Ancillary On-Cycle Electric Power"] = value @property def ancillary_offcycle_electric_power(self): """field `Ancillary Off-Cycle Electric Power` | Enter the value of ancillary electric power for controls or other devices consumed during the off cycle. | Units: W Args: value (float): value for IDD Field `Ancillary Off-Cycle Electric Power` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `ancillary_offcycle_electric_power` or None if not set """ return self["Ancillary Off-Cycle Electric Power"] @ancillary_offcycle_electric_power.setter def ancillary_offcycle_electric_power(self, value=None): """ Corresponds to IDD field `Ancillary Off-Cycle Electric Power` """ self["Ancillary Off-Cycle Electric Power"] = value @property def design_heat_recovery_water_flow_rate(self): """field `Design Heat Recovery Water Flow Rate` | If non-zero, then the heat recovery inlet and outlet node names must be entered. | Used for heat recovery to an EnergyPlus plant loop. | Units: m3/s Args: value (float): value for IDD Field `Design Heat Recovery Water Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `design_heat_recovery_water_flow_rate` or None if not set """ return self["Design Heat Recovery Water Flow Rate"] @design_heat_recovery_water_flow_rate.setter def design_heat_recovery_water_flow_rate(self, value=None): """Corresponds to IDD field `Design Heat Recovery Water Flow Rate`""" self["Design Heat Recovery Water Flow Rate"] = value @property def maximum_temperature_for_heat_recovery(self): """field `Maximum Temperature for Heat Recovery` | Enter the maximum heat recovery inlet temperature allowed for heat recovery. | Units: C | Default value: 80.0 | value <= 100.0 Args: value (float): value for IDD Field `Maximum Temperature for Heat Recovery` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_temperature_for_heat_recovery` or None if not set """ return self["Maximum Temperature for Heat Recovery"] @maximum_temperature_for_heat_recovery.setter def maximum_temperature_for_heat_recovery(self, value=80.0): """Corresponds to IDD field `Maximum Temperature for Heat Recovery`""" self["Maximum Temperature for Heat Recovery"] = value @property def heat_recovery_water_inlet_node_name(self): """field `Heat Recovery Water Inlet Node Name` | Enter the name of the heat recovery water inlet node if plant water loop connections are present. Args: value (str): value for IDD Field `Heat Recovery Water Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heat_recovery_water_inlet_node_name` or None if not set """ return self["Heat Recovery Water Inlet Node Name"] @heat_recovery_water_inlet_node_name.setter def heat_recovery_water_inlet_node_name(self, value=None): """Corresponds to IDD field `Heat Recovery Water Inlet Node Name`""" self["Heat Recovery Water Inlet Node Name"] = value @property def heat_recovery_water_outlet_node_name(self): """field `Heat Recovery Water Outlet Node Name` | Enter the name of the heat recovery water outlet node if plant water loop connections are present. Args: value (str): value for IDD Field `Heat Recovery Water Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heat_recovery_water_outlet_node_name` or None if not set """ return self["Heat Recovery Water Outlet Node Name"] @heat_recovery_water_outlet_node_name.setter def heat_recovery_water_outlet_node_name(self, value=None): """Corresponds to IDD field `Heat Recovery Water Outlet Node Name`""" self["Heat Recovery Water Outlet Node Name"] = value @property def design_specification_multispeed_object_type(self): """field `Design Specification Multispeed Object Type` | Enter the type of performance specification object used to describe the multispeed coil. Args: value (str): value for IDD Field `Design Specification Multispeed Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `design_specification_multispeed_object_type` or None if not set """ return self["Design Specification Multispeed Object Type"] @design_specification_multispeed_object_type.setter def design_specification_multispeed_object_type(self, value=None): """Corresponds to IDD field `Design Specification Multispeed Object Type`""" self["Design Specification Multispeed Object Type"] = value @property def design_specification_multispeed_object_name(self): """field `Design Specification Multispeed Object Name` | Enter the name of the performance specification object used to describe the multispeed coil. Args: value (str): value for IDD Field `Design Specification Multispeed Object Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `design_specification_multispeed_object_name` or None if not set """ return self["Design Specification Multispeed Object Name"] @design_specification_multispeed_object_name.setter def design_specification_multispeed_object_name(self, value=None): """Corresponds to IDD field `Design Specification Multispeed Object Name`""" self["Design Specification Multispeed Object Name"] = value class UnitarySystemPerformanceMultispeed(DataObject): """ Corresponds to IDD object `UnitarySystemPerformance:Multispeed` The UnitarySystemPerformance object is used to specify the air flow ratio at each operating speed. This object is primarily used for multispeed DX and water coils to allow operation at alternate flow rates different from those specified in the coil object. """ _schema = {'extensible-fields': OrderedDict([(u'heating speed 1 supply air flow ratio', {'name': u'Heating Speed 1 Supply Air Flow Ratio', 'pyname': u'heating_speed_1_supply_air_flow_ratio', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real'}), (u'cooling speed 1 supply air flow ratio', {'name': u'Cooling Speed 1 Supply Air Flow Ratio', 'pyname': u'cooling_speed_1_supply_air_flow_ratio', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real'})]), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': 'alpha'}), (u'number of speeds for heating', {'name': u'Number of Speeds for Heating', 'pyname': u'number_of_speeds_for_heating', 'maximum': 10, 'required-field': True, 'autosizable': False, 'minimum': 0, 'autocalculatable': False, 'type': u'integer'}), (u'number of speeds for cooling', {'name': u'Number of Speeds for Cooling', 'pyname': u'number_of_speeds_for_cooling', 'maximum': 10, 'required-field': True, 'autosizable': False, 'minimum': 0, 'autocalculatable': False, 'type': u'integer'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 0, 'name': u'UnitarySystemPerformance:Multispeed', 'pyname': u'UnitarySystemPerformanceMultispeed', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def number_of_speeds_for_heating(self): """field `Number of Speeds for Heating` | Used only for Multi speed coils | Enter the number of the following sets of data for air flow rates. | value <= 10 Args: value (int): value for IDD Field `Number of Speeds for Heating` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_speeds_for_heating` or None if not set """ return self["Number of Speeds for Heating"] @number_of_speeds_for_heating.setter def number_of_speeds_for_heating(self, value=None): """Corresponds to IDD field `Number of Speeds for Heating`""" self["Number of Speeds for Heating"] = value @property def number_of_speeds_for_cooling(self): """field `Number of Speeds for Cooling` | Used only for Multi speed coils | Enter the number of the following sets of data for air flow rates. | value <= 10 Args: value (int): value for IDD Field `Number of Speeds for Cooling` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_speeds_for_cooling` or None if not set """ return self["Number of Speeds for Cooling"] @number_of_speeds_for_cooling.setter def number_of_speeds_for_cooling(self, value=None): """Corresponds to IDD field `Number of Speeds for Cooling`""" self["Number of Speeds for Cooling"] = value def add_extensible(self, heating_speed_1_supply_air_flow_ratio=None, cooling_speed_1_supply_air_flow_ratio=None, ): """Add values for extensible fields. Args: heating_speed_1_supply_air_flow_ratio (float or "Autosize"): value for IDD Field `Heating Speed 1 Supply Air Flow Ratio` if `value` is None it will not be checked against the specification and is assumed to be a missing value cooling_speed_1_supply_air_flow_ratio (float or "Autosize"): value for IDD Field `Cooling Speed 1 Supply Air Flow Ratio` if `value` is None it will not be checked against the specification and is assumed to be a missing value """ vals = [] heating_speed_1_supply_air_flow_ratio = self.check_value( "Heating Speed 1 Supply Air Flow Ratio", heating_speed_1_supply_air_flow_ratio) vals.append(heating_speed_1_supply_air_flow_ratio) cooling_speed_1_supply_air_flow_ratio = self.check_value( "Cooling Speed 1 Supply Air Flow Ratio", cooling_speed_1_supply_air_flow_ratio) vals.append(cooling_speed_1_supply_air_flow_ratio) self._extdata.append(vals) @property def extensibles(self): """Get list of all extensibles.""" return self._extdata @extensibles.setter def extensibles(self, extensibles): """Replaces extensible fields with `extensibles` Args: extensibles (list): nested list of extensible values """ self._extdata = [] for ext in extensibles: self.add_extensible(*ext) class AirLoopHvacUnitaryFurnaceHeatOnly(DataObject): """ Corresponds to IDD object `AirLoopHVAC:Unitary:Furnace:HeatOnly` Unitary system, heating-only with constant volume supply fan (continuous or cycling) and heating coil (gas, electric, hot water, or steam). Identical to AirLoopHVAC:UnitaryHeatOnly. """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'furnace air inlet node name', {'name': u'Furnace Air Inlet Node Name', 'pyname': u'furnace_air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'furnace air outlet node name', {'name': u'Furnace Air Outlet Node Name', 'pyname': u'furnace_air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'maximum supply air temperature', {'name': u'Maximum Supply Air Temperature', 'pyname': u'maximum_supply_air_temperature', 'default': 80.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'heating supply air flow rate', {'name': u'Heating Supply Air Flow Rate', 'pyname': u'heating_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply fan object type', {'name': u'Supply Fan Object Type', 'pyname': u'supply_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply fan name', {'name': u'Supply Fan Name', 'pyname': u'supply_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'fan placement', {'name': u'Fan Placement', 'pyname': u'fan_placement', 'default': u'BlowThrough', 'required-field': False, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 13, 'name': u'AirLoopHVAC:Unitary:Furnace:HeatOnly', 'pyname': u'AirLoopHvacUnitaryFurnaceHeatOnly', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def furnace_air_inlet_node_name(self): """field `Furnace Air Inlet Node Name` Args: value (str): value for IDD Field `Furnace Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `furnace_air_inlet_node_name` or None if not set """ return self["Furnace Air Inlet Node Name"] @furnace_air_inlet_node_name.setter def furnace_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Furnace Air Inlet Node Name`""" self["Furnace Air Inlet Node Name"] = value @property def furnace_air_outlet_node_name(self): """field `Furnace Air Outlet Node Name` Args: value (str): value for IDD Field `Furnace Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `furnace_air_outlet_node_name` or None if not set """ return self["Furnace Air Outlet Node Name"] @furnace_air_outlet_node_name.setter def furnace_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Furnace Air Outlet Node Name`""" self["Furnace Air Outlet Node Name"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | A fan operating mode schedule value of 0 indicates cycling fan mode (supply air | fan cycles on and off in tandem with the heating coil). | Any other schedule value indicates continuous fan mode (supply air fan operates | continuously regardless of heating coil operation). | Leaving this schedule name blank will default to cycling fan mode for the | entire simulation period. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def maximum_supply_air_temperature(self): """field `Maximum Supply Air Temperature` | Units: C | Default value: 80.0 Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature` or None if not set """ return self["Maximum Supply Air Temperature"] @maximum_supply_air_temperature.setter def maximum_supply_air_temperature(self, value=80.0): """Corresponds to IDD field `Maximum Supply Air Temperature`""" self["Maximum Supply Air Temperature"] = value @property def heating_supply_air_flow_rate(self): """field `Heating Supply Air Flow Rate` | This value should be > 0 and <= than the fan air flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_supply_air_flow_rate` or None if not set """ return self["Heating Supply Air Flow Rate"] @heating_supply_air_flow_rate.setter def heating_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate`""" self["Heating Supply Air Flow Rate"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def supply_fan_object_type(self): """field `Supply Fan Object Type` | Fan:ConstantVolume only works with continuous fan operating mode (i.e. fan | operating mode schedule values are greater than 0). Args: value (str): value for IDD Field `Supply Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_object_type` or None if not set """ return self["Supply Fan Object Type"] @supply_fan_object_type.setter def supply_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Fan Object Type`""" self["Supply Fan Object Type"] = value @property def supply_fan_name(self): """field `Supply Fan Name` Args: value (str): value for IDD Field `Supply Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_name` or None if not set """ return self["Supply Fan Name"] @supply_fan_name.setter def supply_fan_name(self, value=None): """Corresponds to IDD field `Supply Fan Name`""" self["Supply Fan Name"] = value @property def fan_placement(self): """field `Fan Placement` | Default value: BlowThrough Args: value (str): value for IDD Field `Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `fan_placement` or None if not set """ return self["Fan Placement"] @fan_placement.setter def fan_placement(self, value="BlowThrough"): """Corresponds to IDD field `Fan Placement`""" self["Fan Placement"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value class AirLoopHvacUnitaryFurnaceHeatCool(DataObject): """ Corresponds to IDD object `AirLoopHVAC:Unitary:Furnace:HeatCool` Unitary system, heating and cooling with constant volume supply fan (continuous or cycling), direct expansion (DX) cooling coil, heating coil (gas, electric, hot water, or steam), and optional reheat coil for dehumidification control. Identical to AirLoopHVAC:UnitaryHeatCool. """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'furnace air inlet node name', {'name': u'Furnace Air Inlet Node Name', 'pyname': u'furnace_air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'furnace air outlet node name', {'name': u'Furnace Air Outlet Node Name', 'pyname': u'furnace_air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'maximum supply air temperature', {'name': u'Maximum Supply Air Temperature', 'pyname': u'maximum_supply_air_temperature', 'default': 80.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'cooling supply air flow rate', {'name': u'Cooling Supply Air Flow Rate', 'pyname': u'cooling_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating supply air flow rate', {'name': u'Heating Supply Air Flow Rate', 'pyname': u'heating_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'no load supply air flow rate', {'name': u'No Load Supply Air Flow Rate', 'pyname': u'no_load_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply fan object type', {'name': u'Supply Fan Object Type', 'pyname': u'supply_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply fan name', {'name': u'Supply Fan Name', 'pyname': u'supply_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'fan placement', {'name': u'Fan Placement', 'pyname': u'fan_placement', 'default': u'BlowThrough', 'required-field': False, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'cooling coil object type', {'name': u'Cooling Coil Object Type', 'pyname': u'cooling_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Cooling:DX:SingleSpeed', u'CoilSystem:Cooling:DX:HeatExchangerAssisted'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling coil name', {'name': u'Cooling Coil Name', 'pyname': u'cooling_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'dehumidification control type', {'name': u'Dehumidification Control Type', 'pyname': u'dehumidification_control_type', 'default': u'None', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'Multimode', u'CoolReheat'], 'autocalculatable': False, 'type': 'alpha'}), (u'reheat coil object type', {'name': u'Reheat Coil Object Type', 'pyname': u'reheat_coil_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Desuperheater', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'reheat coil name', {'name': u'Reheat Coil Name', 'pyname': u'reheat_coil_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 17, 'name': u'AirLoopHVAC:Unitary:Furnace:HeatCool', 'pyname': u'AirLoopHvacUnitaryFurnaceHeatCool', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. | A schedule value greater than zero (usually 1 is used) indicates that the unit is | available to operate as needed. A value less than or equal to zero (usually zero | is used) denotes that the unit must be off. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def furnace_air_inlet_node_name(self): """field `Furnace Air Inlet Node Name` Args: value (str): value for IDD Field `Furnace Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `furnace_air_inlet_node_name` or None if not set """ return self["Furnace Air Inlet Node Name"] @furnace_air_inlet_node_name.setter def furnace_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Furnace Air Inlet Node Name`""" self["Furnace Air Inlet Node Name"] = value @property def furnace_air_outlet_node_name(self): """field `Furnace Air Outlet Node Name` Args: value (str): value for IDD Field `Furnace Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `furnace_air_outlet_node_name` or None if not set """ return self["Furnace Air Outlet Node Name"] @furnace_air_outlet_node_name.setter def furnace_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Furnace Air Outlet Node Name`""" self["Furnace Air Outlet Node Name"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | A fan operating mode schedule value of 0 indicates cycling fan mode (supply air | fan cycles on and off in tandem with the cooling or heating coil). | Any other schedule value indicates continuous fan mode (supply air fan operates | continuously regardless of cooling or heating coil operation). Provide a schedule | with non-zero values when high humidity control is specified. | Leaving this schedule name blank will default to cycling fan mode for the | entire simulation period. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def maximum_supply_air_temperature(self): """field `Maximum Supply Air Temperature` | Units: C | Default value: 80.0 Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature` or None if not set """ return self["Maximum Supply Air Temperature"] @maximum_supply_air_temperature.setter def maximum_supply_air_temperature(self, value=80.0): """Corresponds to IDD field `Maximum Supply Air Temperature`""" self["Maximum Supply Air Temperature"] = value @property def cooling_supply_air_flow_rate(self): """field `Cooling Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_supply_air_flow_rate` or None if not set """ return self["Cooling Supply Air Flow Rate"] @cooling_supply_air_flow_rate.setter def cooling_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate`""" self["Cooling Supply Air Flow Rate"] = value @property def heating_supply_air_flow_rate(self): """field `Heating Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow fate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_supply_air_flow_rate` or None if not set """ return self["Heating Supply Air Flow Rate"] @heating_supply_air_flow_rate.setter def heating_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate`""" self["Heating Supply Air Flow Rate"] = value @property def no_load_supply_air_flow_rate(self): """field `No Load Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Only used when fan operating mode is continuous (disregarded for cycling fan mode). | This air flow rate is used when no heating or cooling is required (i.e., the DX coil | compressor and heating coil are off). If this field is left blank or zero, the supply | air flow rate from the previous on cycle (either cooling or heating) is used. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `No Load Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `no_load_supply_air_flow_rate` or None if not set """ return self["No Load Supply Air Flow Rate"] @no_load_supply_air_flow_rate.setter def no_load_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate`""" self["No Load Supply Air Flow Rate"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def supply_fan_object_type(self): """field `Supply Fan Object Type` | Fan:ConstantVolume only works with continuous fan operating mode (i.e. supply | air fan operating mode schedule values not equal to 0). Args: value (str): value for IDD Field `Supply Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_object_type` or None if not set """ return self["Supply Fan Object Type"] @supply_fan_object_type.setter def supply_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Fan Object Type`""" self["Supply Fan Object Type"] = value @property def supply_fan_name(self): """field `Supply Fan Name` Args: value (str): value for IDD Field `Supply Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_name` or None if not set """ return self["Supply Fan Name"] @supply_fan_name.setter def supply_fan_name(self, value=None): """Corresponds to IDD field `Supply Fan Name`""" self["Supply Fan Name"] = value @property def fan_placement(self): """field `Fan Placement` | Default value: BlowThrough Args: value (str): value for IDD Field `Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `fan_placement` or None if not set """ return self["Fan Placement"] @fan_placement.setter def fan_placement(self, value="BlowThrough"): """Corresponds to IDD field `Fan Placement`""" self["Fan Placement"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value @property def cooling_coil_object_type(self): """field `Cooling Coil Object Type` | Only works with DX cooling coil types Args: value (str): value for IDD Field `Cooling Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_object_type` or None if not set """ return self["Cooling Coil Object Type"] @cooling_coil_object_type.setter def cooling_coil_object_type(self, value=None): """Corresponds to IDD field `Cooling Coil Object Type`""" self["Cooling Coil Object Type"] = value @property def cooling_coil_name(self): """field `Cooling Coil Name` Args: value (str): value for IDD Field `Cooling Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_name` or None if not set """ return self["Cooling Coil Name"] @cooling_coil_name.setter def cooling_coil_name(self, value=None): """Corresponds to IDD field `Cooling Coil Name`""" self["Cooling Coil Name"] = value @property def dehumidification_control_type(self): """field `Dehumidification Control Type` | None = meet sensible load only | Multimode = activate enhanced dehumidification mode | as needed and meet sensible load. Valid only with | cooling coil type CoilSystem:Cooling:DX:HeatExchangerAssisted. | This control mode allows the heat exchanger to be turned | on and off based on the zone dehumidification requirements. | A ZoneControl:Humidistat object is also required. | CoolReheat = cool beyond the dry-bulb setpoint. | as required to meet the humidity setpoint. Valid with all | cooling coil types. When a heat exchanger assisted cooling | coil is used, the heat exchanger is locked on at all times. | A ZoneControl:Humidistat object is also required. | Default value: None Args: value (str): value for IDD Field `Dehumidification Control Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `dehumidification_control_type` or None if not set """ return self["Dehumidification Control Type"] @dehumidification_control_type.setter def dehumidification_control_type(self, value="None"): """Corresponds to IDD field `Dehumidification Control Type`""" self["Dehumidification Control Type"] = value @property def reheat_coil_object_type(self): """field `Reheat Coil Object Type` | Only required if dehumidification control type is "CoolReheat" | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Reheat Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `reheat_coil_object_type` or None if not set """ return self["Reheat Coil Object Type"] @reheat_coil_object_type.setter def reheat_coil_object_type(self, value=None): """Corresponds to IDD field `Reheat Coil Object Type`""" self["Reheat Coil Object Type"] = value @property def reheat_coil_name(self): """field `Reheat Coil Name` | Only required if dehumidification control type is "CoolReheat" Args: value (str): value for IDD Field `Reheat Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `reheat_coil_name` or None if not set """ return self["Reheat Coil Name"] @reheat_coil_name.setter def reheat_coil_name(self, value=None): """Corresponds to IDD field `Reheat Coil Name`""" self["Reheat Coil Name"] = value class AirLoopHvacUnitaryHeatOnly(DataObject): """ Corresponds to IDD object `AirLoopHVAC:UnitaryHeatOnly` Unitary system, heating-only with constant volume supply fan (continuous or cycling) and heating coil (gas, electric, hot water, or steam). Identical to AirLoopHVAC:Unitary:Furnace:HeatOnly. """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'unitary system air inlet node name', {'name': u'Unitary System Air Inlet Node Name', 'pyname': u'unitary_system_air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'unitary system air outlet node name', {'name': u'Unitary System Air Outlet Node Name', 'pyname': u'unitary_system_air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'maximum supply air temperature', {'name': u'Maximum Supply Air Temperature', 'pyname': u'maximum_supply_air_temperature', 'default': 80.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'heating supply air flow rate', {'name': u'Heating Supply Air Flow Rate', 'pyname': u'heating_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply fan object type', {'name': u'Supply Fan Object Type', 'pyname': u'supply_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply fan name', {'name': u'Supply Fan Name', 'pyname': u'supply_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'fan placement', {'name': u'Fan Placement', 'pyname': u'fan_placement', 'default': u'BlowThrough', 'required-field': False, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 13, 'name': u'AirLoopHVAC:UnitaryHeatOnly', 'pyname': u'AirLoopHvacUnitaryHeatOnly', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def unitary_system_air_inlet_node_name(self): """field `Unitary System Air Inlet Node Name` Args: value (str): value for IDD Field `Unitary System Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `unitary_system_air_inlet_node_name` or None if not set """ return self["Unitary System Air Inlet Node Name"] @unitary_system_air_inlet_node_name.setter def unitary_system_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Unitary System Air Inlet Node Name`""" self["Unitary System Air Inlet Node Name"] = value @property def unitary_system_air_outlet_node_name(self): """field `Unitary System Air Outlet Node Name` Args: value (str): value for IDD Field `Unitary System Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `unitary_system_air_outlet_node_name` or None if not set """ return self["Unitary System Air Outlet Node Name"] @unitary_system_air_outlet_node_name.setter def unitary_system_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Unitary System Air Outlet Node Name`""" self["Unitary System Air Outlet Node Name"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | A fan operating mode schedule value of 0 indicates cycling fan mode (supply air | fan cycles on and off in tandem with the heating coil). | Any other schedule value indicates continuous fan mode (supply air fan operates | continuously regardless of heating coil operation). | Leaving this schedule name blank will default to cycling fan mode for the | entire simulation period. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def maximum_supply_air_temperature(self): """field `Maximum Supply Air Temperature` | Units: C | Default value: 80.0 Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature` or None if not set """ return self["Maximum Supply Air Temperature"] @maximum_supply_air_temperature.setter def maximum_supply_air_temperature(self, value=80.0): """Corresponds to IDD field `Maximum Supply Air Temperature`""" self["Maximum Supply Air Temperature"] = value @property def heating_supply_air_flow_rate(self): """field `Heating Supply Air Flow Rate` | This value should be > 0 and <= than the fan air flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_supply_air_flow_rate` or None if not set """ return self["Heating Supply Air Flow Rate"] @heating_supply_air_flow_rate.setter def heating_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate`""" self["Heating Supply Air Flow Rate"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def supply_fan_object_type(self): """field `Supply Fan Object Type` | Fan:ConstantVolume only works with continuous fan operating mode (i.e. fan | operating mode schedule values are greater than 0). Args: value (str): value for IDD Field `Supply Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_object_type` or None if not set """ return self["Supply Fan Object Type"] @supply_fan_object_type.setter def supply_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Fan Object Type`""" self["Supply Fan Object Type"] = value @property def supply_fan_name(self): """field `Supply Fan Name` Args: value (str): value for IDD Field `Supply Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_name` or None if not set """ return self["Supply Fan Name"] @supply_fan_name.setter def supply_fan_name(self, value=None): """Corresponds to IDD field `Supply Fan Name`""" self["Supply Fan Name"] = value @property def fan_placement(self): """field `Fan Placement` | Default value: BlowThrough Args: value (str): value for IDD Field `Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `fan_placement` or None if not set """ return self["Fan Placement"] @fan_placement.setter def fan_placement(self, value="BlowThrough"): """Corresponds to IDD field `Fan Placement`""" self["Fan Placement"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value class AirLoopHvacUnitaryHeatCool(DataObject): """ Corresponds to IDD object `AirLoopHVAC:UnitaryHeatCool` Unitary system, heating and cooling with constant volume supply fan (continuous or cycling), direct expansion (DX) cooling coil, heating coil (gas, electric, hot water, or steam), and optional reheat coil for dehumidification control. Identical to AirLoopHVAC:Unitary:Furnace:HeatCool. """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'unitary system air inlet node name', {'name': u'Unitary System Air Inlet Node Name', 'pyname': u'unitary_system_air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'unitary system air outlet node name', {'name': u'Unitary System Air Outlet Node Name', 'pyname': u'unitary_system_air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'maximum supply air temperature', {'name': u'Maximum Supply Air Temperature', 'pyname': u'maximum_supply_air_temperature', 'default': 80.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'cooling supply air flow rate', {'name': u'Cooling Supply Air Flow Rate', 'pyname': u'cooling_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating supply air flow rate', {'name': u'Heating Supply Air Flow Rate', 'pyname': u'heating_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'no load supply air flow rate', {'name': u'No Load Supply Air Flow Rate', 'pyname': u'no_load_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply fan object type', {'name': u'Supply Fan Object Type', 'pyname': u'supply_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply fan name', {'name': u'Supply Fan Name', 'pyname': u'supply_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'fan placement', {'name': u'Fan Placement', 'pyname': u'fan_placement', 'default': u'BlowThrough', 'required-field': False, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'cooling coil object type', {'name': u'Cooling Coil Object Type', 'pyname': u'cooling_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Cooling:DX:SingleSpeed', u'Coil:Cooling:DX:VariableSpeed', u'CoilSystem:Cooling:DX:HeatExchangerAssisted'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling coil name', {'name': u'Cooling Coil Name', 'pyname': u'cooling_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'dehumidification control type', {'name': u'Dehumidification Control Type', 'pyname': u'dehumidification_control_type', 'default': u'None', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'Multimode', u'CoolReheat'], 'autocalculatable': False, 'type': 'alpha'}), (u'reheat coil object type', {'name': u'Reheat Coil Object Type', 'pyname': u'reheat_coil_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Desuperheater', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'reheat coil name', {'name': u'Reheat Coil Name', 'pyname': u'reheat_coil_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 17, 'name': u'AirLoopHVAC:UnitaryHeatCool', 'pyname': u'AirLoopHvacUnitaryHeatCool', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def unitary_system_air_inlet_node_name(self): """field `Unitary System Air Inlet Node Name` Args: value (str): value for IDD Field `Unitary System Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `unitary_system_air_inlet_node_name` or None if not set """ return self["Unitary System Air Inlet Node Name"] @unitary_system_air_inlet_node_name.setter def unitary_system_air_inlet_node_name(self, value=None): """Corresponds to IDD field `Unitary System Air Inlet Node Name`""" self["Unitary System Air Inlet Node Name"] = value @property def unitary_system_air_outlet_node_name(self): """field `Unitary System Air Outlet Node Name` Args: value (str): value for IDD Field `Unitary System Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `unitary_system_air_outlet_node_name` or None if not set """ return self["Unitary System Air Outlet Node Name"] @unitary_system_air_outlet_node_name.setter def unitary_system_air_outlet_node_name(self, value=None): """Corresponds to IDD field `Unitary System Air Outlet Node Name`""" self["Unitary System Air Outlet Node Name"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | A fan operating mode schedule value of 0 indicates cycling fan mode (supply air | fan cycles on and off in tandem with the cooling or heating coil). | Any other schedule value indicates continuous fan mode (supply air fan operates | continuously regardless of cooling or heating coil operation). Provide a schedule | with non-zero values when high humidity control is specified. | Leaving this schedule name blank will default to cycling fan mode for the | entire simulation period. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def maximum_supply_air_temperature(self): """field `Maximum Supply Air Temperature` | Units: C | Default value: 80.0 Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature` or None if not set """ return self["Maximum Supply Air Temperature"] @maximum_supply_air_temperature.setter def maximum_supply_air_temperature(self, value=80.0): """Corresponds to IDD field `Maximum Supply Air Temperature`""" self["Maximum Supply Air Temperature"] = value @property def cooling_supply_air_flow_rate(self): """field `Cooling Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_supply_air_flow_rate` or None if not set """ return self["Cooling Supply Air Flow Rate"] @cooling_supply_air_flow_rate.setter def cooling_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate`""" self["Cooling Supply Air Flow Rate"] = value @property def heating_supply_air_flow_rate(self): """field `Heating Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_supply_air_flow_rate` or None if not set """ return self["Heating Supply Air Flow Rate"] @heating_supply_air_flow_rate.setter def heating_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate`""" self["Heating Supply Air Flow Rate"] = value @property def no_load_supply_air_flow_rate(self): """field `No Load Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Only used when fan operating mode is continuous (disregarded for cycling fan mode). | This air flow rate is used when no heating or cooling is required (i.e., the DX coil | compressor and heating coil are off). If this field is left blank or zero, the supply | air flow rate from the previous on cycle (either cooling or heating) is used. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `No Load Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `no_load_supply_air_flow_rate` or None if not set """ return self["No Load Supply Air Flow Rate"] @no_load_supply_air_flow_rate.setter def no_load_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate`""" self["No Load Supply Air Flow Rate"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def supply_fan_object_type(self): """field `Supply Fan Object Type` | Fan:ConstantVolume only works with continuous fan operating mode (i.e. supply | air fan operating mode schedule values not equal to 0). Args: value (str): value for IDD Field `Supply Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_object_type` or None if not set """ return self["Supply Fan Object Type"] @supply_fan_object_type.setter def supply_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Fan Object Type`""" self["Supply Fan Object Type"] = value @property def supply_fan_name(self): """field `Supply Fan Name` Args: value (str): value for IDD Field `Supply Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_fan_name` or None if not set """ return self["Supply Fan Name"] @supply_fan_name.setter def supply_fan_name(self, value=None): """Corresponds to IDD field `Supply Fan Name`""" self["Supply Fan Name"] = value @property def fan_placement(self): """field `Fan Placement` | Default value: BlowThrough Args: value (str): value for IDD Field `Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `fan_placement` or None if not set """ return self["Fan Placement"] @fan_placement.setter def fan_placement(self, value="BlowThrough"): """Corresponds to IDD field `Fan Placement`""" self["Fan Placement"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value @property def cooling_coil_object_type(self): """field `Cooling Coil Object Type` | Only works with DX cooling coil types or | Coil:Cooling:DX:VariableSpeed. Args: value (str): value for IDD Field `Cooling Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_object_type` or None if not set """ return self["Cooling Coil Object Type"] @cooling_coil_object_type.setter def cooling_coil_object_type(self, value=None): """Corresponds to IDD field `Cooling Coil Object Type`""" self["Cooling Coil Object Type"] = value @property def cooling_coil_name(self): """field `Cooling Coil Name` Args: value (str): value for IDD Field `Cooling Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_name` or None if not set """ return self["Cooling Coil Name"] @cooling_coil_name.setter def cooling_coil_name(self, value=None): """Corresponds to IDD field `Cooling Coil Name`""" self["Cooling Coil Name"] = value @property def dehumidification_control_type(self): """field `Dehumidification Control Type` | None = meet sensible load only | Multimode = activate enhanced dehumidification mode | as needed and meet sensible load. Valid only with | cooling coil type CoilSystem:Cooling:DX:HeatExchangerAssisted. | This control mode allows the heat exchanger to be turned | on and off based on the zone dehumidification requirements. | A ZoneControl:Humidistat object is also required. | CoolReheat = cool beyond the dry-bulb setpoint. | as required to meet the humidity setpoint. Valid with all | cooling coil types. When a heat exchanger assisted Cooling | coil is used, the heat exchanger is locked on at all times. | A ZoneControl:Humidistat object is also required. | Default value: None Args: value (str): value for IDD Field `Dehumidification Control Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `dehumidification_control_type` or None if not set """ return self["Dehumidification Control Type"] @dehumidification_control_type.setter def dehumidification_control_type(self, value="None"): """Corresponds to IDD field `Dehumidification Control Type`""" self["Dehumidification Control Type"] = value @property def reheat_coil_object_type(self): """field `Reheat Coil Object Type` | Only required if dehumidification control type is "CoolReheat" | works with gas, electric, desuperheating, hot water and steam heating coils Args: value (str): value for IDD Field `Reheat Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `reheat_coil_object_type` or None if not set """ return self["Reheat Coil Object Type"] @reheat_coil_object_type.setter def reheat_coil_object_type(self, value=None): """Corresponds to IDD field `Reheat Coil Object Type`""" self["Reheat Coil Object Type"] = value @property def reheat_coil_name(self): """field `Reheat Coil Name` | Only required if dehumidification control type is "CoolReheat" Args: value (str): value for IDD Field `Reheat Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `reheat_coil_name` or None if not set """ return self["Reheat Coil Name"] @reheat_coil_name.setter def reheat_coil_name(self, value=None): """Corresponds to IDD field `Reheat Coil Name`""" self["Reheat Coil Name"] = value class AirLoopHvacUnitaryHeatPumpAirToAir(DataObject): """ Corresponds to IDD object `AirLoopHVAC:UnitaryHeatPump:AirToAir` Unitary heat pump system, heating and cooling, single-speed with supply fan, direct expansion (DX) cooling coil, DX heating coil (air-to-air heat pump), and supplemental heating coil (gas, electric, hot water, or steam). """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'air inlet node name', {'name': u'Air Inlet Node Name', 'pyname': u'air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air outlet node name', {'name': u'Air Outlet Node Name', 'pyname': u'air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'cooling supply air flow rate', {'name': u'Cooling Supply Air Flow Rate', 'pyname': u'cooling_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating supply air flow rate', {'name': u'Heating Supply Air Flow Rate', 'pyname': u'heating_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'no load supply air flow rate', {'name': u'No Load Supply Air Flow Rate', 'pyname': u'no_load_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply air fan object type', {'name': u'Supply Air Fan Object Type', 'pyname': u'supply_air_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan name', {'name': u'Supply Air Fan Name', 'pyname': u'supply_air_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:DX:SingleSpeed', u'Coil:Heating:DX:VariableSpeed'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'cooling coil object type', {'name': u'Cooling Coil Object Type', 'pyname': u'cooling_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Cooling:DX:SingleSpeed', u'Coil:Cooling:DX:VariableSpeed', u'CoilSystem:Cooling:DX:HeatExchangerAssisted'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling coil name', {'name': u'Cooling Coil Name', 'pyname': u'cooling_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supplemental heating coil object type', {'name': u'Supplemental Heating Coil Object Type', 'pyname': u'supplemental_heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'supplemental heating coil name', {'name': u'Supplemental Heating Coil Name', 'pyname': u'supplemental_heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'maximum supply air temperature from supplemental heater', {'name': u'Maximum Supply Air Temperature from Supplemental Heater', 'pyname': u'maximum_supply_air_temperature_from_supplemental_heater', 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'maximum outdoor dry-bulb temperature for supplemental heater operation', {'name': u'Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation', 'pyname': u'maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation', 'default': 21.0, 'maximum': 21.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'fan placement', {'name': u'Fan Placement', 'pyname': u'fan_placement', 'default': u'BlowThrough', 'required-field': False, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'dehumidification control type', {'name': u'Dehumidification Control Type', 'pyname': u'dehumidification_control_type', 'default': u'None', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'Multimode', u'CoolReheat'], 'autocalculatable': False, 'type': 'alpha'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 19, 'name': u'AirLoopHVAC:UnitaryHeatPump:AirToAir', 'pyname': u'AirLoopHvacUnitaryHeatPumpAirToAir', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. | A schedule value greater than zero (usually 1 is used) indicates that the unit is | available to operate as needed. A value less than or equal to zero (usually zero | is used) denotes that the unit must be off. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def air_inlet_node_name(self): """field `Air Inlet Node Name` Args: value (str): value for IDD Field `Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_inlet_node_name` or None if not set """ return self["Air Inlet Node Name"] @air_inlet_node_name.setter def air_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Inlet Node Name`""" self["Air Inlet Node Name"] = value @property def air_outlet_node_name(self): """field `Air Outlet Node Name` Args: value (str): value for IDD Field `Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_outlet_node_name` or None if not set """ return self["Air Outlet Node Name"] @air_outlet_node_name.setter def air_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Outlet Node Name`""" self["Air Outlet Node Name"] = value @property def cooling_supply_air_flow_rate(self): """field `Cooling Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_supply_air_flow_rate` or None if not set """ return self["Cooling Supply Air Flow Rate"] @cooling_supply_air_flow_rate.setter def cooling_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate`""" self["Cooling Supply Air Flow Rate"] = value @property def heating_supply_air_flow_rate(self): """field `Heating Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_supply_air_flow_rate` or None if not set """ return self["Heating Supply Air Flow Rate"] @heating_supply_air_flow_rate.setter def heating_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate`""" self["Heating Supply Air Flow Rate"] = value @property def no_load_supply_air_flow_rate(self): """field `No Load Supply Air Flow Rate` | Must be less than or equal to the fan's maximum flow rate. | Only used when fan operating mode is continuous (disregarded for cycling fan mode). | This air flow rate is used when no heating or cooling is required (i.e., the DX coil | compressor and supplemental heating coil are off). If this field is left blank or zero, | the supply air flow rate from the previous on cycle (either cooling or heating) is used. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `No Load Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `no_load_supply_air_flow_rate` or None if not set """ return self["No Load Supply Air Flow Rate"] @no_load_supply_air_flow_rate.setter def no_load_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate`""" self["No Load Supply Air Flow Rate"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def supply_air_fan_object_type(self): """field `Supply Air Fan Object Type` | Fan:ConstantVolume only works with continuous fan operating mode (i.e. fan | operating mode schedule values are greater than 0 or the fan operating mode | schedule name field is left blank). Args: value (str): value for IDD Field `Supply Air Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_object_type` or None if not set """ return self["Supply Air Fan Object Type"] @supply_air_fan_object_type.setter def supply_air_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Air Fan Object Type`""" self["Supply Air Fan Object Type"] = value @property def supply_air_fan_name(self): """field `Supply Air Fan Name` | Needs to match in the fan object Args: value (str): value for IDD Field `Supply Air Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_name` or None if not set """ return self["Supply Air Fan Name"] @supply_air_fan_name.setter def supply_air_fan_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Name`""" self["Supply Air Fan Name"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | Only works with Coil:Heating:DX:SingleSpeed or | Coil:Heating:DX:VariableSpeed Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` | Needs to match in the DX heating coil object Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value @property def cooling_coil_object_type(self): """field `Cooling Coil Object Type` | Only works with Coil:Cooling:DX:SingleSpeed or | CoilSystem:Cooling:DX:HeatExchangerAssisted or | Coil:Cooling:DX:VariableSpeed Args: value (str): value for IDD Field `Cooling Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_object_type` or None if not set """ return self["Cooling Coil Object Type"] @cooling_coil_object_type.setter def cooling_coil_object_type(self, value=None): """Corresponds to IDD field `Cooling Coil Object Type`""" self["Cooling Coil Object Type"] = value @property def cooling_coil_name(self): """field `Cooling Coil Name` | Needs to match in the DX cooling coil object Args: value (str): value for IDD Field `Cooling Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_name` or None if not set """ return self["Cooling Coil Name"] @cooling_coil_name.setter def cooling_coil_name(self, value=None): """Corresponds to IDD field `Cooling Coil Name`""" self["Cooling Coil Name"] = value @property def supplemental_heating_coil_object_type(self): """field `Supplemental Heating Coil Object Type` | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Supplemental Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_object_type` or None if not set """ return self["Supplemental Heating Coil Object Type"] @supplemental_heating_coil_object_type.setter def supplemental_heating_coil_object_type(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Object Type`""" self["Supplemental Heating Coil Object Type"] = value @property def supplemental_heating_coil_name(self): """field `Supplemental Heating Coil Name` | Needs to match in the supplemental heating coil object Args: value (str): value for IDD Field `Supplemental Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_name` or None if not set """ return self["Supplemental Heating Coil Name"] @supplemental_heating_coil_name.setter def supplemental_heating_coil_name(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Name`""" self["Supplemental Heating Coil Name"] = value @property def maximum_supply_air_temperature_from_supplemental_heater(self): """field `Maximum Supply Air Temperature from Supplemental Heater` | Units: C Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature from Supplemental Heater` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature_from_supplemental_heater` or None if not set """ return self["Maximum Supply Air Temperature from Supplemental Heater"] @maximum_supply_air_temperature_from_supplemental_heater.setter def maximum_supply_air_temperature_from_supplemental_heater( self, value=None): """Corresponds to IDD field `Maximum Supply Air Temperature from Supplemental Heater`""" self["Maximum Supply Air Temperature from Supplemental Heater"] = value @property def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self): """field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` | Units: C | Default value: 21.0 | value <= 21.0 Args: value (float): value for IDD Field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation` or None if not set """ return self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] @maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation.setter def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self, value=21.0): """ Corresponds to IDD field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` """ self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] = value @property def fan_placement(self): """field `Fan Placement` | Default value: BlowThrough Args: value (str): value for IDD Field `Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `fan_placement` or None if not set """ return self["Fan Placement"] @fan_placement.setter def fan_placement(self, value="BlowThrough"): """Corresponds to IDD field `Fan Placement`""" self["Fan Placement"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | A fan operating mode schedule value of 0 indicates cycling fan mode (supply air | fan cycles on and off in tandem with the cooling or heating coil). | Any other schedule value indicates continuous fan mode (supply air fan operates | continuously regardless of cooling or heating coil operation). | Leaving this schedule name blank will default to cycling fan mode for the | entire simulation period. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def dehumidification_control_type(self): """field `Dehumidification Control Type` | None = meet sensible load only | Multimode = activate enhanced dehumidification mode | as needed and meet sensible load. Valid only with | cooling coil type CoilSystem:Cooling:DX:HeatExchangerAssisted. | This control mode allows the heat exchanger to be turned | on and off based on the zone dehumidification requirements. | A ZoneControl:Humidistat object is also required. | CoolReheat = cool beyond the dry-bulb setpoint. | as required to meet the humidity setpoint. Valid with all | cooling coil types. When a heat exchanger assisted Cooling | coil is used, the heat exchanger is locked on at all times. | A ZoneControl:Humidistat object is also required. | Default value: None Args: value (str): value for IDD Field `Dehumidification Control Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `dehumidification_control_type` or None if not set """ return self["Dehumidification Control Type"] @dehumidification_control_type.setter def dehumidification_control_type(self, value="None"): """Corresponds to IDD field `Dehumidification Control Type`""" self["Dehumidification Control Type"] = value class AirLoopHvacUnitaryHeatPumpWaterToAir(DataObject): """ Corresponds to IDD object `AirLoopHVAC:UnitaryHeatPump:WaterToAir` Unitary heat pump system, heating and cooling, single-speed with constant volume supply fan (continuous or cycling), direct expansion (DX) cooling coil, DX heating coil (water-to-air heat pump), and supplemental heating coil (gas, electric, hot water, or steam). """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'air inlet node name', {'name': u'Air Inlet Node Name', 'pyname': u'air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air outlet node name', {'name': u'Air Outlet Node Name', 'pyname': u'air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'supply air flow rate', {'name': u'Supply Air Flow Rate', 'pyname': u'supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply air fan object type', {'name': u'Supply Air Fan Object Type', 'pyname': u'supply_air_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan name', {'name': u'Supply Air Fan Name', 'pyname': u'supply_air_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:WaterToAirHeatPump:ParameterEstimation', u'Coil:Heating:WaterToAirHeatPump:EquationFit', u'Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'heating convergence', {'name': u'Heating Convergence', 'pyname': u'heating_convergence', 'default': 0.001, 'minimum>': 0.0, 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'real'}), (u'cooling coil object type', {'name': u'Cooling Coil Object Type', 'pyname': u'cooling_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Cooling:WaterToAirHeatPump:ParameterEstimation', u'Coil:Cooling:WaterToAirHeatPump:EquationFit', u'Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling coil name', {'name': u'Cooling Coil Name', 'pyname': u'cooling_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'cooling convergence', {'name': u'Cooling Convergence', 'pyname': u'cooling_convergence', 'default': 0.001, 'minimum>': 0.0, 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'real'}), (u'maximum cycling rate', {'name': u'Maximum Cycling Rate', 'pyname': u'maximum_cycling_rate', 'default': 2.5, 'maximum': 5.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'cycles/hr'}), (u'heat pump time constant', {'name': u'Heat Pump Time Constant', 'pyname': u'heat_pump_time_constant', 'default': 60.0, 'maximum': 500.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u's'}), (u'fraction of on-cycle power use', {'name': u'Fraction of On-Cycle Power Use', 'pyname': u'fraction_of_oncycle_power_use', 'default': 0.01, 'maximum': 0.05, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': 'real'}), (u'heat pump fan delay time', {'name': u'Heat Pump Fan Delay Time', 'pyname': u'heat_pump_fan_delay_time', 'default': 60.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': 'real', 'unit': u's'}), (u'supplemental heating coil object type', {'name': u'Supplemental Heating Coil Object Type', 'pyname': u'supplemental_heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'supplemental heating coil name', {'name': u'Supplemental Heating Coil Name', 'pyname': u'supplemental_heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'maximum supply air temperature from supplemental heater', {'name': u'Maximum Supply Air Temperature from Supplemental Heater', 'pyname': u'maximum_supply_air_temperature_from_supplemental_heater', 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'maximum outdoor dry-bulb temperature for supplemental heater operation', {'name': u'Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation', 'pyname': u'maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation', 'default': 21.0, 'maximum': 21.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'outdoor dry-bulb temperature sensor node name', {'name': u'Outdoor Dry-Bulb Temperature Sensor Node Name', 'pyname': u'outdoor_drybulb_temperature_sensor_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'fan placement', {'name': u'Fan Placement', 'pyname': u'fan_placement', 'default': u'BlowThrough', 'required-field': False, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'dehumidification control type', {'name': u'Dehumidification Control Type', 'pyname': u'dehumidification_control_type', 'default': u'None', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'CoolReheat'], 'autocalculatable': False, 'type': 'alpha'}), (u'heat pump coil water flow mode', {'name': u'Heat Pump Coil Water Flow Mode', 'pyname': u'heat_pump_coil_water_flow_mode', 'default': u'Cycling', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Constant', u'Cycling', u'ConstantOnDemand'], 'autocalculatable': False, 'type': 'alpha'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 25, 'name': u'AirLoopHVAC:UnitaryHeatPump:WaterToAir', 'pyname': u'AirLoopHvacUnitaryHeatPumpWaterToAir', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def air_inlet_node_name(self): """field `Air Inlet Node Name` Args: value (str): value for IDD Field `Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_inlet_node_name` or None if not set """ return self["Air Inlet Node Name"] @air_inlet_node_name.setter def air_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Inlet Node Name`""" self["Air Inlet Node Name"] = value @property def air_outlet_node_name(self): """field `Air Outlet Node Name` Args: value (str): value for IDD Field `Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_outlet_node_name` or None if not set """ return self["Air Outlet Node Name"] @air_outlet_node_name.setter def air_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Outlet Node Name`""" self["Air Outlet Node Name"] = value @property def supply_air_flow_rate(self): """field `Supply Air Flow Rate` | This value should be > 0 and <= than the fan air flow rate. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `supply_air_flow_rate` or None if not set """ return self["Supply Air Flow Rate"] @supply_air_flow_rate.setter def supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Supply Air Flow Rate`""" self["Supply Air Flow Rate"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def supply_air_fan_object_type(self): """field `Supply Air Fan Object Type` | Only works with On/Off Fan Args: value (str): value for IDD Field `Supply Air Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_object_type` or None if not set """ return self["Supply Air Fan Object Type"] @supply_air_fan_object_type.setter def supply_air_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Air Fan Object Type`""" self["Supply Air Fan Object Type"] = value @property def supply_air_fan_name(self): """field `Supply Air Fan Name` | Needs to match Fan:OnOff object Args: value (str): value for IDD Field `Supply Air Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_name` or None if not set """ return self["Supply Air Fan Name"] @supply_air_fan_name.setter def supply_air_fan_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Name`""" self["Supply Air Fan Name"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` | Needs to match in the water-to-air heat pump heating coil object Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value @property def heating_convergence(self): """field `Heating Convergence` | Default value: 0.001 Args: value (float): value for IDD Field `Heating Convergence` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heating_convergence` or None if not set """ return self["Heating Convergence"] @heating_convergence.setter def heating_convergence(self, value=0.001): """Corresponds to IDD field `Heating Convergence`""" self["Heating Convergence"] = value @property def cooling_coil_object_type(self): """field `Cooling Coil Object Type` Args: value (str): value for IDD Field `Cooling Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_object_type` or None if not set """ return self["Cooling Coil Object Type"] @cooling_coil_object_type.setter def cooling_coil_object_type(self, value=None): """Corresponds to IDD field `Cooling Coil Object Type`""" self["Cooling Coil Object Type"] = value @property def cooling_coil_name(self): """field `Cooling Coil Name` | Needs to match in the water-to-air heat pump cooling coil object Args: value (str): value for IDD Field `Cooling Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_name` or None if not set """ return self["Cooling Coil Name"] @cooling_coil_name.setter def cooling_coil_name(self, value=None): """Corresponds to IDD field `Cooling Coil Name`""" self["Cooling Coil Name"] = value @property def cooling_convergence(self): """field `Cooling Convergence` | Default value: 0.001 Args: value (float): value for IDD Field `Cooling Convergence` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `cooling_convergence` or None if not set """ return self["Cooling Convergence"] @cooling_convergence.setter def cooling_convergence(self, value=0.001): """Corresponds to IDD field `Cooling Convergence`""" self["Cooling Convergence"] = value @property def maximum_cycling_rate(self): """field `Maximum Cycling Rate` | The maximum on-off cycling rate for the compressor | Suggested value is 2.5 for a typical heat pump | Units: cycles/hr | Default value: 2.5 | value <= 5.0 Args: value (float): value for IDD Field `Maximum Cycling Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_cycling_rate` or None if not set """ return self["Maximum Cycling Rate"] @maximum_cycling_rate.setter def maximum_cycling_rate(self, value=2.5): """Corresponds to IDD field `Maximum Cycling Rate`""" self["Maximum Cycling Rate"] = value @property def heat_pump_time_constant(self): """field `Heat Pump Time Constant` | Time constant for the cooling coil's capacity to reach steady state after startup | Suggested value is 60 for a typical heat pump | Units: s | Default value: 60.0 | value <= 500.0 Args: value (float): value for IDD Field `Heat Pump Time Constant` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heat_pump_time_constant` or None if not set """ return self["Heat Pump Time Constant"] @heat_pump_time_constant.setter def heat_pump_time_constant(self, value=60.0): """Corresponds to IDD field `Heat Pump Time Constant`""" self["Heat Pump Time Constant"] = value @property def fraction_of_oncycle_power_use(self): """field `Fraction of On-Cycle Power Use` | The fraction of on-cycle power use to adjust the part load fraction based on | the off-cycle power consumption due to crankcase heaters, controls, fans, and etc. | Suggested value is 0.01 for a typical heat pump | Default value: 0.01 | value <= 0.05 Args: value (float): value for IDD Field `Fraction of On-Cycle Power Use` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `fraction_of_oncycle_power_use` or None if not set """ return self["Fraction of On-Cycle Power Use"] @fraction_of_oncycle_power_use.setter def fraction_of_oncycle_power_use(self, value=0.01): """ Corresponds to IDD field `Fraction of On-Cycle Power Use` """ self["Fraction of On-Cycle Power Use"] = value @property def heat_pump_fan_delay_time(self): """field `Heat Pump Fan Delay Time` | Programmed time delay for heat pump fan to shut off after compressor cycle off. | Only required when fan operating mode is cycling | Enter 0 when fan operating mode is continuous | Units: s | Default value: 60.0 Args: value (float): value for IDD Field `Heat Pump Fan Delay Time` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `heat_pump_fan_delay_time` or None if not set """ return self["Heat Pump Fan Delay Time"] @heat_pump_fan_delay_time.setter def heat_pump_fan_delay_time(self, value=60.0): """Corresponds to IDD field `Heat Pump Fan Delay Time`""" self["Heat Pump Fan Delay Time"] = value @property def supplemental_heating_coil_object_type(self): """field `Supplemental Heating Coil Object Type` | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Supplemental Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_object_type` or None if not set """ return self["Supplemental Heating Coil Object Type"] @supplemental_heating_coil_object_type.setter def supplemental_heating_coil_object_type(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Object Type`""" self["Supplemental Heating Coil Object Type"] = value @property def supplemental_heating_coil_name(self): """field `Supplemental Heating Coil Name` | Needs to match in the supplemental heating coil object Args: value (str): value for IDD Field `Supplemental Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_name` or None if not set """ return self["Supplemental Heating Coil Name"] @supplemental_heating_coil_name.setter def supplemental_heating_coil_name(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Name`""" self["Supplemental Heating Coil Name"] = value @property def maximum_supply_air_temperature_from_supplemental_heater(self): """field `Maximum Supply Air Temperature from Supplemental Heater` | Units: C Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature from Supplemental Heater` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature_from_supplemental_heater` or None if not set """ return self["Maximum Supply Air Temperature from Supplemental Heater"] @maximum_supply_air_temperature_from_supplemental_heater.setter def maximum_supply_air_temperature_from_supplemental_heater( self, value=None): """Corresponds to IDD field `Maximum Supply Air Temperature from Supplemental Heater`""" self["Maximum Supply Air Temperature from Supplemental Heater"] = value @property def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self): """field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` | Units: C | Default value: 21.0 | value <= 21.0 Args: value (float): value for IDD Field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation` or None if not set """ return self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] @maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation.setter def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self, value=21.0): """ Corresponds to IDD field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` """ self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] = value @property def outdoor_drybulb_temperature_sensor_node_name(self): """field `Outdoor Dry-Bulb Temperature Sensor Node Name` Args: value (str): value for IDD Field `Outdoor Dry-Bulb Temperature Sensor Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `outdoor_drybulb_temperature_sensor_node_name` or None if not set """ return self["Outdoor Dry-Bulb Temperature Sensor Node Name"] @outdoor_drybulb_temperature_sensor_node_name.setter def outdoor_drybulb_temperature_sensor_node_name(self, value=None): """ Corresponds to IDD field `Outdoor Dry-Bulb Temperature Sensor Node Name` """ self["Outdoor Dry-Bulb Temperature Sensor Node Name"] = value @property def fan_placement(self): """field `Fan Placement` | Default value: BlowThrough Args: value (str): value for IDD Field `Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `fan_placement` or None if not set """ return self["Fan Placement"] @fan_placement.setter def fan_placement(self, value="BlowThrough"): """Corresponds to IDD field `Fan Placement`""" self["Fan Placement"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | Enter the name of a schedule that controls fan operation. Schedule values of 0 denote | cycling fan operation (fan cycles with cooling or heating coil). Schedule values greater | than 0 denote constant fan operation (fan runs continually regardless of coil operation). | The fan operating mode defaults to cycling fan operation if this field is left blank. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def dehumidification_control_type(self): """field `Dehumidification Control Type` | None = meet sensible load only | CoolReheat = cool beyond the dry-bulb setpoint. | as required to meet the humidity setpoint. Valid only with | Coil:Cooling:WaterToAirHeatPump:EquationFit or | Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit | Default value: None Args: value (str): value for IDD Field `Dehumidification Control Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `dehumidification_control_type` or None if not set """ return self["Dehumidification Control Type"] @dehumidification_control_type.setter def dehumidification_control_type(self, value="None"): """Corresponds to IDD field `Dehumidification Control Type`""" self["Dehumidification Control Type"] = value @property def heat_pump_coil_water_flow_mode(self): """field `Heat Pump Coil Water Flow Mode` | used only when the heat pump coils are of the type WaterToAirHeatPump:EquationFit | Constant results in 100% water flow regardless of compressor PLR | Cycling results in water flow that matches compressor PLR | ConstantOnDemand results in 100% water flow whenever the coil is on, but is 0% whenever the coil has no load | Default value: Cycling Args: value (str): value for IDD Field `Heat Pump Coil Water Flow Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heat_pump_coil_water_flow_mode` or None if not set """ return self["Heat Pump Coil Water Flow Mode"] @heat_pump_coil_water_flow_mode.setter def heat_pump_coil_water_flow_mode(self, value="Cycling"): """Corresponds to IDD field `Heat Pump Coil Water Flow Mode`""" self["Heat Pump Coil Water Flow Mode"] = value class AirLoopHvacUnitaryHeatCoolVavchangeoverBypass(DataObject): """ Corresponds to IDD object `AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass` Unitary system, heating and cooling with constant volume supply fan (continuous or cycling), direct expansion (DX) cooling coil, heating coil (gas, electric, hot water, steam, or DX air-to-air heat pump) and bypass damper for variable volume flow to terminal units. Used with AirTerminal:SingleDuct:VAV:HeatAndCool:Reheat or AirTerminal:SingleDuct:VAV:HeatAndCool:NoReheat. """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'cooling supply air flow rate', {'name': u'Cooling Supply Air Flow Rate', 'pyname': u'cooling_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating supply air flow rate', {'name': u'Heating Supply Air Flow Rate', 'pyname': u'heating_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'no load supply air flow rate', {'name': u'No Load Supply Air Flow Rate', 'pyname': u'no_load_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'cooling outdoor air flow rate', {'name': u'Cooling Outdoor Air Flow Rate', 'pyname': u'cooling_outdoor_air_flow_rate', 'required-field': True, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating outdoor air flow rate', {'name': u'Heating Outdoor Air Flow Rate', 'pyname': u'heating_outdoor_air_flow_rate', 'required-field': True, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'no load outdoor air flow rate', {'name': u'No Load Outdoor Air Flow Rate', 'pyname': u'no_load_outdoor_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'outdoor air flow rate multiplier schedule name', {'name': u'Outdoor Air Flow Rate Multiplier Schedule Name', 'pyname': u'outdoor_air_flow_rate_multiplier_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'air inlet node name', {'name': u'Air Inlet Node Name', 'pyname': u'air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'bypass duct mixer node name', {'name': u'Bypass Duct Mixer Node Name', 'pyname': u'bypass_duct_mixer_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'bypass duct splitter node name', {'name': u'Bypass Duct Splitter Node Name', 'pyname': u'bypass_duct_splitter_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air outlet node name', {'name': u'Air Outlet Node Name', 'pyname': u'air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'outdoor air mixer object type', {'name': u'Outdoor Air Mixer Object Type', 'pyname': u'outdoor_air_mixer_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'OutdoorAir:Mixer'], 'autocalculatable': False, 'type': 'alpha'}), (u'outdoor air mixer name', {'name': u'Outdoor Air Mixer Name', 'pyname': u'outdoor_air_mixer_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply air fan object type', {'name': u'Supply Air Fan Object Type', 'pyname': u'supply_air_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan name', {'name': u'Supply Air Fan Name', 'pyname': u'supply_air_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply air fan placement', {'name': u'Supply Air Fan Placement', 'pyname': u'supply_air_fan_placement', 'required-field': True, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'cooling coil object type', {'name': u'Cooling Coil Object Type', 'pyname': u'cooling_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Cooling:DX:SingleSpeed', u'CoilSystem:Cooling:DX:HeatExchangerAssisted', u'Coil:Cooling:DX:TwoStageWithHumidityControlMode'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling coil name', {'name': u'Cooling Coil Name', 'pyname': u'cooling_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:DX:SingleSpeed', u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'priority control mode', {'name': u'Priority Control Mode', 'pyname': u'priority_control_mode', 'default': u'ZonePriority', 'required-field': False, 'autosizable': False, 'accepted-values': [u'CoolingPriority', u'HeatingPriority', u'ZonePriority'], 'autocalculatable': False, 'type': 'alpha'}), (u'minimum outlet air temperature during cooling operation', {'name': u'Minimum Outlet Air Temperature During Cooling Operation', 'pyname': u'minimum_outlet_air_temperature_during_cooling_operation', 'default': 8.0, 'minimum>': 0.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'maximum outlet air temperature during heating operation', {'name': u'Maximum Outlet Air Temperature During Heating Operation', 'pyname': u'maximum_outlet_air_temperature_during_heating_operation', 'default': 50.0, 'minimum>': 0.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'dehumidification control type', {'name': u'Dehumidification Control Type', 'pyname': u'dehumidification_control_type', 'default': u'None', 'required-field': False, 'autosizable': False, 'accepted-values': [u'None', u'Multimode', u'CoolReheat'], 'autocalculatable': False, 'type': 'alpha'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 23, 'name': u'AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass', 'pyname': u'AirLoopHvacUnitaryHeatCoolVavchangeoverBypass', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` | Enter a unique name for this unitary system. Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. | Enter the availability schedule name. Schedule values of zero denote system | is Off. Non-zero schedule values denote system is available to operate. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def cooling_supply_air_flow_rate(self): """field `Cooling Supply Air Flow Rate` | Enter the system air flow rate during cooling | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_supply_air_flow_rate` or None if not set """ return self["Cooling Supply Air Flow Rate"] @cooling_supply_air_flow_rate.setter def cooling_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Supply Air Flow Rate`""" self["Cooling Supply Air Flow Rate"] = value @property def heating_supply_air_flow_rate(self): """field `Heating Supply Air Flow Rate` | Enter the system air flow rate during heating | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_supply_air_flow_rate` or None if not set """ return self["Heating Supply Air Flow Rate"] @heating_supply_air_flow_rate.setter def heating_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Supply Air Flow Rate`""" self["Heating Supply Air Flow Rate"] = value @property def no_load_supply_air_flow_rate(self): """field `No Load Supply Air Flow Rate` | Only used when the supply air fan operating mode is continuous (see field | Supply air fan operating mode schedule name). This system air flow rate | is used when no heating or cooling is required and the coils are off. | If this field is left blank or zero, the system air flow rate from the | previous on cycle (either cooling or heating) is used. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `No Load Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `no_load_supply_air_flow_rate` or None if not set """ return self["No Load Supply Air Flow Rate"] @no_load_supply_air_flow_rate.setter def no_load_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate`""" self["No Load Supply Air Flow Rate"] = value @property def cooling_outdoor_air_flow_rate(self): """field `Cooling Outdoor Air Flow Rate` | Enter the outdoor air flow rate during | cooling operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Outdoor Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_outdoor_air_flow_rate` or None if not set """ return self["Cooling Outdoor Air Flow Rate"] @cooling_outdoor_air_flow_rate.setter def cooling_outdoor_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Outdoor Air Flow Rate`""" self["Cooling Outdoor Air Flow Rate"] = value @property def heating_outdoor_air_flow_rate(self): """field `Heating Outdoor Air Flow Rate` | Enter the outdoor air flow rate during | heating operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Outdoor Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_outdoor_air_flow_rate` or None if not set """ return self["Heating Outdoor Air Flow Rate"] @heating_outdoor_air_flow_rate.setter def heating_outdoor_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Outdoor Air Flow Rate`""" self["Heating Outdoor Air Flow Rate"] = value @property def no_load_outdoor_air_flow_rate(self): """field `No Load Outdoor Air Flow Rate` | Only used when the supply air fan operating mode is continuous (see field | Supply air fan operating mode schedule name). This outdoor air flow rate | is used when no heating or cooling is required and the coils are off. | If this field is left blank or zero, the outdoor air flow rate from the previous on cycle | (either cooling or heating) is used. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `No Load Outdoor Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `no_load_outdoor_air_flow_rate` or None if not set """ return self["No Load Outdoor Air Flow Rate"] @no_load_outdoor_air_flow_rate.setter def no_load_outdoor_air_flow_rate(self, value=None): """Corresponds to IDD field `No Load Outdoor Air Flow Rate`""" self["No Load Outdoor Air Flow Rate"] = value @property def outdoor_air_flow_rate_multiplier_schedule_name(self): """field `Outdoor Air Flow Rate Multiplier Schedule Name` | Enter the name of a schedule that contains multipliers for the outdoor air | flow rates. Schedule values must be from 0 to 1. | If field is left blank, model assumes multiplier is 1 for the entire simulation period. Args: value (str): value for IDD Field `Outdoor Air Flow Rate Multiplier Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `outdoor_air_flow_rate_multiplier_schedule_name` or None if not set """ return self["Outdoor Air Flow Rate Multiplier Schedule Name"] @outdoor_air_flow_rate_multiplier_schedule_name.setter def outdoor_air_flow_rate_multiplier_schedule_name(self, value=None): """Corresponds to IDD field `Outdoor Air Flow Rate Multiplier Schedule Name`""" self["Outdoor Air Flow Rate Multiplier Schedule Name"] = value @property def air_inlet_node_name(self): """field `Air Inlet Node Name` | Enter the name of the unitary system's air inlet node. Args: value (str): value for IDD Field `Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_inlet_node_name` or None if not set """ return self["Air Inlet Node Name"] @air_inlet_node_name.setter def air_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Inlet Node Name`""" self["Air Inlet Node Name"] = value @property def bypass_duct_mixer_node_name(self): """field `Bypass Duct Mixer Node Name` | Enter the name of the bypass duct mixer node. This name should be the name | of the return air node for the outdoor air mixer associated with this system. | This node name must be different from the air inlet node name. Args: value (str): value for IDD Field `Bypass Duct Mixer Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `bypass_duct_mixer_node_name` or None if not set """ return self["Bypass Duct Mixer Node Name"] @bypass_duct_mixer_node_name.setter def bypass_duct_mixer_node_name(self, value=None): """Corresponds to IDD field `Bypass Duct Mixer Node Name`""" self["Bypass Duct Mixer Node Name"] = value @property def bypass_duct_splitter_node_name(self): """field `Bypass Duct Splitter Node Name` | Enter the name of the bypass duct splitter node. | This splitter air node is the outlet node of the last component in this unitary | system. For blow through fan placement, the splitter air node is the outlet | node of the heating coil. For draw through fan placement, the splitter node | is the outlet node of the supply air fan. Args: value (str): value for IDD Field `Bypass Duct Splitter Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `bypass_duct_splitter_node_name` or None if not set """ return self["Bypass Duct Splitter Node Name"] @bypass_duct_splitter_node_name.setter def bypass_duct_splitter_node_name(self, value=None): """Corresponds to IDD field `Bypass Duct Splitter Node Name`""" self["Bypass Duct Splitter Node Name"] = value @property def air_outlet_node_name(self): """field `Air Outlet Node Name` | Enter the name of the unitary system's air outlet node. Args: value (str): value for IDD Field `Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_outlet_node_name` or None if not set """ return self["Air Outlet Node Name"] @air_outlet_node_name.setter def air_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Outlet Node Name`""" self["Air Outlet Node Name"] = value @property def outdoor_air_mixer_object_type(self): """field `Outdoor Air Mixer Object Type` | currently only one type OutdoorAir:Mixer object is available. Args: value (str): value for IDD Field `Outdoor Air Mixer Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `outdoor_air_mixer_object_type` or None if not set """ return self["Outdoor Air Mixer Object Type"] @outdoor_air_mixer_object_type.setter def outdoor_air_mixer_object_type(self, value=None): """Corresponds to IDD field `Outdoor Air Mixer Object Type`""" self["Outdoor Air Mixer Object Type"] = value @property def outdoor_air_mixer_name(self): """field `Outdoor Air Mixer Name` | Enter the name of the outdoor air mixer used with this unitary system. Args: value (str): value for IDD Field `Outdoor Air Mixer Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `outdoor_air_mixer_name` or None if not set """ return self["Outdoor Air Mixer Name"] @outdoor_air_mixer_name.setter def outdoor_air_mixer_name(self, value=None): """Corresponds to IDD field `Outdoor Air Mixer Name`""" self["Outdoor Air Mixer Name"] = value @property def supply_air_fan_object_type(self): """field `Supply Air Fan Object Type` | Specify the type of supply air fan used in this unitary system. Args: value (str): value for IDD Field `Supply Air Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_object_type` or None if not set """ return self["Supply Air Fan Object Type"] @supply_air_fan_object_type.setter def supply_air_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Air Fan Object Type`""" self["Supply Air Fan Object Type"] = value @property def supply_air_fan_name(self): """field `Supply Air Fan Name` | Enter the name of the supply air fan used in this unitary system. Args: value (str): value for IDD Field `Supply Air Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_name` or None if not set """ return self["Supply Air Fan Name"] @supply_air_fan_name.setter def supply_air_fan_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Name`""" self["Supply Air Fan Name"] = value @property def supply_air_fan_placement(self): """field `Supply Air Fan Placement` | Specify supply air fan placement as either blow through or draw through. | BlowThrough means the supply air fan is located before the cooling | coil. DrawThrough means the supply air fan is located after the heating coil. Args: value (str): value for IDD Field `Supply Air Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_placement` or None if not set """ return self["Supply Air Fan Placement"] @supply_air_fan_placement.setter def supply_air_fan_placement(self, value=None): """Corresponds to IDD field `Supply Air Fan Placement`""" self["Supply Air Fan Placement"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | Enter the name of a schedule to control the supply air fan. Schedule Name values of zero | mean that the supply air fan will cycle off if there is no cooling or heating load | in any of the zones being served by this system. Non-zero schedule values mean | that the supply air fan will operate continuously even if there is no cooling or | heating load in any of the zones being served. If this field is left blank, | the supply air fan will operate continuously for the entire simulation period. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def cooling_coil_object_type(self): """field `Cooling Coil Object Type` | Specify the type of cooling coil used in this unitary system. Args: value (str): value for IDD Field `Cooling Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_object_type` or None if not set """ return self["Cooling Coil Object Type"] @cooling_coil_object_type.setter def cooling_coil_object_type(self, value=None): """Corresponds to IDD field `Cooling Coil Object Type`""" self["Cooling Coil Object Type"] = value @property def cooling_coil_name(self): """field `Cooling Coil Name` | Enter the name of the cooling coil used in this unitary system. Args: value (str): value for IDD Field `Cooling Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_name` or None if not set """ return self["Cooling Coil Name"] @cooling_coil_name.setter def cooling_coil_name(self, value=None): """Corresponds to IDD field `Cooling Coil Name`""" self["Cooling Coil Name"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | works with DX, gas, electric, hot water and steam heating coils | Specify the type of heating coil used in this unitary system. Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` | Enter the name of the heating coil used in this unitary system. Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value @property def priority_control_mode(self): """field `Priority Control Mode` | CoolingPriority = system provides cooling if any zone requires cooling. | HeatingPriority = system provides heating if any zone requires heating. | ZonePriority = system controlled based on the total number of zones | requiring cooling or heating (highest number of zones | in cooling or heating determines the system's operating mode). | Default value: ZonePriority Args: value (str): value for IDD Field `Priority Control Mode` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `priority_control_mode` or None if not set """ return self["Priority Control Mode"] @priority_control_mode.setter def priority_control_mode(self, value="ZonePriority"): """Corresponds to IDD field `Priority Control Mode`""" self["Priority Control Mode"] = value @property def minimum_outlet_air_temperature_during_cooling_operation(self): """field `Minimum Outlet Air Temperature During Cooling Operation` | Specify the minimum outlet air temperature allowed for this unitary system | during cooling operation. This value should be less than the maximum outlet | air temperature during heating operation. | Units: C | Default value: 8.0 Args: value (float): value for IDD Field `Minimum Outlet Air Temperature During Cooling Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `minimum_outlet_air_temperature_during_cooling_operation` or None if not set """ return self["Minimum Outlet Air Temperature During Cooling Operation"] @minimum_outlet_air_temperature_during_cooling_operation.setter def minimum_outlet_air_temperature_during_cooling_operation( self, value=8.0): """Corresponds to IDD field `Minimum Outlet Air Temperature During Cooling Operation`""" self["Minimum Outlet Air Temperature During Cooling Operation"] = value @property def maximum_outlet_air_temperature_during_heating_operation(self): """field `Maximum Outlet Air Temperature During Heating Operation` | Specify the maximum outlet air temperature allowed for this unitary system | during heating operation. This value should be greater than the minimum outlet | air temperature during cooling operation. | Units: C | Default value: 50.0 Args: value (float): value for IDD Field `Maximum Outlet Air Temperature During Heating Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_outlet_air_temperature_during_heating_operation` or None if not set """ return self["Maximum Outlet Air Temperature During Heating Operation"] @maximum_outlet_air_temperature_during_heating_operation.setter def maximum_outlet_air_temperature_during_heating_operation( self, value=50.0): """Corresponds to IDD field `Maximum Outlet Air Temperature During Heating Operation`""" self["Maximum Outlet Air Temperature During Heating Operation"] = value @property def dehumidification_control_type(self): """field `Dehumidification Control Type` | None = meet sensible load only. | Multimode = activate enhanced dehumidification mode | as needed and meet sensible load. Valid only with | Coil:Cooling:DX:TwoStageWithHumidityControlMode. | CoolReheat = cool beyond the Dry-Bulb temperature setpoint | as required to meet the humidity setpoint. Valid only with | Coil:Cooling:DX:TwoStageWithHumidityControlMode. | For all dehumidification controls, the max humidity setpoint | on this unitary system's air outlet node is used. | This must be set using ZoneControl:Humidistat and | SetpointManager:SingleZone:Humidity:Maximum, | SetpointManager:MultiZone:Humidity:Maximum or | SetpointManager:MultiZone:MaximumHumidity:Average objects. | Default value: None Args: value (str): value for IDD Field `Dehumidification Control Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `dehumidification_control_type` or None if not set """ return self["Dehumidification Control Type"] @dehumidification_control_type.setter def dehumidification_control_type(self, value="None"): """Corresponds to IDD field `Dehumidification Control Type`""" self["Dehumidification Control Type"] = value class AirLoopHvacUnitaryHeatPumpAirToAirMultiSpeed(DataObject): """ Corresponds to IDD object `AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed` Unitary system, heating and cooling, multi-speed with constant volume supply fan (continuous or cycling), direct expansion (DX) cooling coil, heating coil (DX air-to-air heat pump, gas, electric, hot water, or steam), and supplemental heating coil (gas, electric, hot water, or steam). """ _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'availability schedule name', {'name': u'Availability Schedule Name', 'pyname': u'availability_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'air inlet node name', {'name': u'Air Inlet Node Name', 'pyname': u'air_inlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'air outlet node name', {'name': u'Air Outlet Node Name', 'pyname': u'air_outlet_node_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'controlling zone or thermostat location', {'name': u'Controlling Zone or Thermostat Location', 'pyname': u'controlling_zone_or_thermostat_location', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply air fan object type', {'name': u'Supply Air Fan Object Type', 'pyname': u'supply_air_fan_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Fan:OnOff', u'Fan:ConstantVolume'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan name', {'name': u'Supply Air Fan Name', 'pyname': u'supply_air_fan_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supply air fan placement', {'name': u'Supply Air Fan Placement', 'pyname': u'supply_air_fan_placement', 'required-field': True, 'autosizable': False, 'accepted-values': [u'BlowThrough', u'DrawThrough'], 'autocalculatable': False, 'type': 'alpha'}), (u'supply air fan operating mode schedule name', {'name': u'Supply Air Fan Operating Mode Schedule Name', 'pyname': u'supply_air_fan_operating_mode_schedule_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'heating coil object type', {'name': u'Heating Coil Object Type', 'pyname': u'heating_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Heating:DX:MultiSpeed', u'Coil:Heating:Electric:MultiStage', u'Coil:Heating:Gas:MultiStage', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'heating coil name', {'name': u'Heating Coil Name', 'pyname': u'heating_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'minimum outdoor dry-bulb temperature for compressor operation', {'name': u'Minimum Outdoor Dry-Bulb Temperature for Compressor Operation', 'pyname': u'minimum_outdoor_drybulb_temperature_for_compressor_operation', 'default': -8.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'cooling coil object type', {'name': u'Cooling Coil Object Type', 'pyname': u'cooling_coil_object_type', 'required-field': True, 'autosizable': False, 'accepted-values': [u'Coil:Cooling:DX:MultiSpeed'], 'autocalculatable': False, 'type': 'alpha'}), (u'cooling coil name', {'name': u'Cooling Coil Name', 'pyname': u'cooling_coil_name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'supplemental heating coil object type', {'name': u'Supplemental Heating Coil Object Type', 'pyname': u'supplemental_heating_coil_object_type', 'required-field': False, 'autosizable': False, 'accepted-values': [u'Coil:Heating:Gas', u'Coil:Heating:Electric', u'Coil:Heating:Water', u'Coil:Heating:Steam'], 'autocalculatable': False, 'type': 'alpha'}), (u'supplemental heating coil name', {'name': u'Supplemental Heating Coil Name', 'pyname': u'supplemental_heating_coil_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'object-list'}), (u'maximum supply air temperature from supplemental heater', {'name': u'Maximum Supply Air Temperature from Supplemental Heater', 'pyname': u'maximum_supply_air_temperature_from_supplemental_heater', 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'maximum outdoor dry-bulb temperature for supplemental heater operation', {'name': u'Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation', 'pyname': u'maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation', 'default': 21.0, 'maximum': 21.0, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'C'}), (u'auxiliary on-cycle electric power', {'name': u'Auxiliary On-Cycle Electric Power', 'pyname': u'auxiliary_oncycle_electric_power', 'default': 0.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'W'}), (u'auxiliary off-cycle electric power', {'name': u'Auxiliary Off-Cycle Electric Power', 'pyname': u'auxiliary_offcycle_electric_power', 'default': 0.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'W'}), (u'design heat recovery water flow rate', {'name': u'Design Heat Recovery Water Flow Rate', 'pyname': u'design_heat_recovery_water_flow_rate', 'default': 0.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'maximum temperature for heat recovery', {'name': u'Maximum Temperature for Heat Recovery', 'pyname': u'maximum_temperature_for_heat_recovery', 'default': 80.0, 'maximum': 100.0, 'required-field': False, 'autosizable': False, 'minimum': 0.0, 'autocalculatable': False, 'type': 'real', 'unit': u'C'}), (u'heat recovery water inlet node name', {'name': u'Heat Recovery Water Inlet Node Name', 'pyname': u'heat_recovery_water_inlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'heat recovery water outlet node name', {'name': u'Heat Recovery Water Outlet Node Name', 'pyname': u'heat_recovery_water_outlet_node_name', 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'node'}), (u'no load supply air flow rate', {'name': u'No Load Supply Air Flow Rate', 'pyname': u'no_load_supply_air_flow_rate', 'required-field': False, 'autosizable': True, 'minimum': 0.0, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'number of speeds for heating', {'name': u'Number of Speeds for Heating', 'pyname': u'number_of_speeds_for_heating', 'maximum': 4, 'required-field': True, 'autosizable': False, 'minimum': 1, 'autocalculatable': False, 'type': u'integer'}), (u'number of speeds for cooling', {'name': u'Number of Speeds for Cooling', 'pyname': u'number_of_speeds_for_cooling', 'maximum': 4, 'required-field': True, 'autosizable': False, 'minimum': 2, 'autocalculatable': False, 'type': u'integer'}), (u'heating speed 1 supply air flow rate', {'name': u'Heating Speed 1 Supply Air Flow Rate', 'pyname': u'heating_speed_1_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating speed 2 supply air flow rate', {'name': u'Heating Speed 2 Supply Air Flow Rate', 'pyname': u'heating_speed_2_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating speed 3 supply air flow rate', {'name': u'Heating Speed 3 Supply Air Flow Rate', 'pyname': u'heating_speed_3_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'heating speed 4 supply air flow rate', {'name': u'Heating Speed 4 Supply Air Flow Rate', 'pyname': u'heating_speed_4_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'cooling speed 1 supply air flow rate', {'name': u'Cooling Speed 1 Supply Air Flow Rate', 'pyname': u'cooling_speed_1_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'cooling speed 2 supply air flow rate', {'name': u'Cooling Speed 2 Supply Air Flow Rate', 'pyname': u'cooling_speed_2_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': True, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'cooling speed 3 supply air flow rate', {'name': u'Cooling Speed 3 Supply Air Flow Rate', 'pyname': u'cooling_speed_3_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'}), (u'cooling speed 4 supply air flow rate', {'name': u'Cooling Speed 4 Supply Air Flow Rate', 'pyname': u'cooling_speed_4_supply_air_flow_rate', 'minimum>': 0.0, 'required-field': False, 'autosizable': True, 'autocalculatable': False, 'type': u'real', 'unit': u'm3/s'})]), 'format': None, 'group': u'Unitary Equipment', 'min-fields': 31, 'name': u'AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed', 'pyname': u'AirLoopHvacUnitaryHeatPumpAirToAirMultiSpeed', 'required-object': False, 'unique-object': False} @property def name(self): """field `Name` Args: value (str): value for IDD Field `Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `name` or None if not set """ return self["Name"] @name.setter def name(self, value=None): """Corresponds to IDD field `Name`""" self["Name"] = value @property def availability_schedule_name(self): """field `Availability Schedule Name` | Availability schedule name for this system. Schedule value > 0 means the system is available. | If this field is blank, the system is always available. Args: value (str): value for IDD Field `Availability Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `availability_schedule_name` or None if not set """ return self["Availability Schedule Name"] @availability_schedule_name.setter def availability_schedule_name(self, value=None): """Corresponds to IDD field `Availability Schedule Name`""" self["Availability Schedule Name"] = value @property def air_inlet_node_name(self): """field `Air Inlet Node Name` Args: value (str): value for IDD Field `Air Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_inlet_node_name` or None if not set """ return self["Air Inlet Node Name"] @air_inlet_node_name.setter def air_inlet_node_name(self, value=None): """Corresponds to IDD field `Air Inlet Node Name`""" self["Air Inlet Node Name"] = value @property def air_outlet_node_name(self): """field `Air Outlet Node Name` Args: value (str): value for IDD Field `Air Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `air_outlet_node_name` or None if not set """ return self["Air Outlet Node Name"] @air_outlet_node_name.setter def air_outlet_node_name(self, value=None): """Corresponds to IDD field `Air Outlet Node Name`""" self["Air Outlet Node Name"] = value @property def controlling_zone_or_thermostat_location(self): """field `Controlling Zone or Thermostat Location` Args: value (str): value for IDD Field `Controlling Zone or Thermostat Location` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `controlling_zone_or_thermostat_location` or None if not set """ return self["Controlling Zone or Thermostat Location"] @controlling_zone_or_thermostat_location.setter def controlling_zone_or_thermostat_location(self, value=None): """Corresponds to IDD field `Controlling Zone or Thermostat Location`""" self["Controlling Zone or Thermostat Location"] = value @property def supply_air_fan_object_type(self): """field `Supply Air Fan Object Type` | Select the type of supply air fan used in this unitary system. Args: value (str): value for IDD Field `Supply Air Fan Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_object_type` or None if not set """ return self["Supply Air Fan Object Type"] @supply_air_fan_object_type.setter def supply_air_fan_object_type(self, value=None): """Corresponds to IDD field `Supply Air Fan Object Type`""" self["Supply Air Fan Object Type"] = value @property def supply_air_fan_name(self): """field `Supply Air Fan Name` | Enter the name of the supply air fan used in this unitary system. Args: value (str): value for IDD Field `Supply Air Fan Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_name` or None if not set """ return self["Supply Air Fan Name"] @supply_air_fan_name.setter def supply_air_fan_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Name`""" self["Supply Air Fan Name"] = value @property def supply_air_fan_placement(self): """field `Supply Air Fan Placement` | Select supply air fan placement as either BlowThrough or DrawThrough. | BlowThrough means the supply air fan is located before the cooling | coil. DrawThrough means the supply air fan is located after the heating coil | but before the optional supplemental heating coil. Args: value (str): value for IDD Field `Supply Air Fan Placement` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_placement` or None if not set """ return self["Supply Air Fan Placement"] @supply_air_fan_placement.setter def supply_air_fan_placement(self, value=None): """Corresponds to IDD field `Supply Air Fan Placement`""" self["Supply Air Fan Placement"] = value @property def supply_air_fan_operating_mode_schedule_name(self): """field `Supply Air Fan Operating Mode Schedule Name` | Enter the name of a schedule to control the supply air fan. Schedule values of zero | mean that the supply air fan will cycle off if there is no cooling or heating load | in the control zone. Non-zero schedule values mean that the supply air fan | will operate continuously even if there is no cooling or heating load | in the control zone. If this field is left blank, the supply air fan will | operate continuously for the entire simulation period. Args: value (str): value for IDD Field `Supply Air Fan Operating Mode Schedule Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supply_air_fan_operating_mode_schedule_name` or None if not set """ return self["Supply Air Fan Operating Mode Schedule Name"] @supply_air_fan_operating_mode_schedule_name.setter def supply_air_fan_operating_mode_schedule_name(self, value=None): """Corresponds to IDD field `Supply Air Fan Operating Mode Schedule Name`""" self["Supply Air Fan Operating Mode Schedule Name"] = value @property def heating_coil_object_type(self): """field `Heating Coil Object Type` | Multi Speed DX, Electric, Gas, and Single speed Water and Steam coils Args: value (str): value for IDD Field `Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_object_type` or None if not set """ return self["Heating Coil Object Type"] @heating_coil_object_type.setter def heating_coil_object_type(self, value=None): """Corresponds to IDD field `Heating Coil Object Type`""" self["Heating Coil Object Type"] = value @property def heating_coil_name(self): """field `Heating Coil Name` Args: value (str): value for IDD Field `Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heating_coil_name` or None if not set """ return self["Heating Coil Name"] @heating_coil_name.setter def heating_coil_name(self, value=None): """Corresponds to IDD field `Heating Coil Name`""" self["Heating Coil Name"] = value @property def minimum_outdoor_drybulb_temperature_for_compressor_operation(self): """field `Minimum Outdoor Dry-Bulb Temperature for Compressor Operation` | Needs to match the corresponding minimum outdoor temperature defined | in the DX heating coil object. | Units: C | Default value: -8.0 Args: value (float): value for IDD Field `Minimum Outdoor Dry-Bulb Temperature for Compressor Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `minimum_outdoor_drybulb_temperature_for_compressor_operation` or None if not set """ return self[ "Minimum Outdoor Dry-Bulb Temperature for Compressor Operation"] @minimum_outdoor_drybulb_temperature_for_compressor_operation.setter def minimum_outdoor_drybulb_temperature_for_compressor_operation( self, value=- 8.0): """ Corresponds to IDD field `Minimum Outdoor Dry-Bulb Temperature for Compressor Operation` """ self[ "Minimum Outdoor Dry-Bulb Temperature for Compressor Operation"] = value @property def cooling_coil_object_type(self): """field `Cooling Coil Object Type` | Only works with Coil:Cooling:DX:MultiSpeed Args: value (str): value for IDD Field `Cooling Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_object_type` or None if not set """ return self["Cooling Coil Object Type"] @cooling_coil_object_type.setter def cooling_coil_object_type(self, value=None): """Corresponds to IDD field `Cooling Coil Object Type`""" self["Cooling Coil Object Type"] = value @property def cooling_coil_name(self): """field `Cooling Coil Name` | Needs to match in the DX Cooling Coil object Args: value (str): value for IDD Field `Cooling Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `cooling_coil_name` or None if not set """ return self["Cooling Coil Name"] @cooling_coil_name.setter def cooling_coil_name(self, value=None): """Corresponds to IDD field `Cooling Coil Name`""" self["Cooling Coil Name"] = value @property def supplemental_heating_coil_object_type(self): """field `Supplemental Heating Coil Object Type` | works with gas, electric, hot water and steam heating coils Args: value (str): value for IDD Field `Supplemental Heating Coil Object Type` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_object_type` or None if not set """ return self["Supplemental Heating Coil Object Type"] @supplemental_heating_coil_object_type.setter def supplemental_heating_coil_object_type(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Object Type`""" self["Supplemental Heating Coil Object Type"] = value @property def supplemental_heating_coil_name(self): """field `Supplemental Heating Coil Name` | Needs to match in the supplemental heating coil object Args: value (str): value for IDD Field `Supplemental Heating Coil Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `supplemental_heating_coil_name` or None if not set """ return self["Supplemental Heating Coil Name"] @supplemental_heating_coil_name.setter def supplemental_heating_coil_name(self, value=None): """Corresponds to IDD field `Supplemental Heating Coil Name`""" self["Supplemental Heating Coil Name"] = value @property def maximum_supply_air_temperature_from_supplemental_heater(self): """field `Maximum Supply Air Temperature from Supplemental Heater` | Units: C Args: value (float or "Autosize"): value for IDD Field `Maximum Supply Air Temperature from Supplemental Heater` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `maximum_supply_air_temperature_from_supplemental_heater` or None if not set """ return self["Maximum Supply Air Temperature from Supplemental Heater"] @maximum_supply_air_temperature_from_supplemental_heater.setter def maximum_supply_air_temperature_from_supplemental_heater( self, value=None): """Corresponds to IDD field `Maximum Supply Air Temperature from Supplemental Heater`""" self["Maximum Supply Air Temperature from Supplemental Heater"] = value @property def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self): """field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` | Units: C | Default value: 21.0 | value <= 21.0 Args: value (float): value for IDD Field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation` or None if not set """ return self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] @maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation.setter def maximum_outdoor_drybulb_temperature_for_supplemental_heater_operation( self, value=21.0): """ Corresponds to IDD field `Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation` """ self[ "Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation"] = value @property def auxiliary_oncycle_electric_power(self): """field `Auxiliary On-Cycle Electric Power` | Units: W Args: value (float): value for IDD Field `Auxiliary On-Cycle Electric Power` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `auxiliary_oncycle_electric_power` or None if not set """ return self["Auxiliary On-Cycle Electric Power"] @auxiliary_oncycle_electric_power.setter def auxiliary_oncycle_electric_power(self, value=None): """ Corresponds to IDD field `Auxiliary On-Cycle Electric Power` """ self["Auxiliary On-Cycle Electric Power"] = value @property def auxiliary_offcycle_electric_power(self): """field `Auxiliary Off-Cycle Electric Power` | Units: W Args: value (float): value for IDD Field `Auxiliary Off-Cycle Electric Power` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `auxiliary_offcycle_electric_power` or None if not set """ return self["Auxiliary Off-Cycle Electric Power"] @auxiliary_offcycle_electric_power.setter def auxiliary_offcycle_electric_power(self, value=None): """ Corresponds to IDD field `Auxiliary Off-Cycle Electric Power` """ self["Auxiliary Off-Cycle Electric Power"] = value @property def design_heat_recovery_water_flow_rate(self): """field `Design Heat Recovery Water Flow Rate` | If non-zero, then the heat recovery inlet and outlet node names must be entered. | Used for heat recovery to an EnergyPlus plant loop. | Units: m3/s Args: value (float): value for IDD Field `Design Heat Recovery Water Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `design_heat_recovery_water_flow_rate` or None if not set """ return self["Design Heat Recovery Water Flow Rate"] @design_heat_recovery_water_flow_rate.setter def design_heat_recovery_water_flow_rate(self, value=None): """Corresponds to IDD field `Design Heat Recovery Water Flow Rate`""" self["Design Heat Recovery Water Flow Rate"] = value @property def maximum_temperature_for_heat_recovery(self): """field `Maximum Temperature for Heat Recovery` | Units: C | Default value: 80.0 | value <= 100.0 Args: value (float): value for IDD Field `Maximum Temperature for Heat Recovery` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_temperature_for_heat_recovery` or None if not set """ return self["Maximum Temperature for Heat Recovery"] @maximum_temperature_for_heat_recovery.setter def maximum_temperature_for_heat_recovery(self, value=80.0): """Corresponds to IDD field `Maximum Temperature for Heat Recovery`""" self["Maximum Temperature for Heat Recovery"] = value @property def heat_recovery_water_inlet_node_name(self): """field `Heat Recovery Water Inlet Node Name` Args: value (str): value for IDD Field `Heat Recovery Water Inlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heat_recovery_water_inlet_node_name` or None if not set """ return self["Heat Recovery Water Inlet Node Name"] @heat_recovery_water_inlet_node_name.setter def heat_recovery_water_inlet_node_name(self, value=None): """Corresponds to IDD field `Heat Recovery Water Inlet Node Name`""" self["Heat Recovery Water Inlet Node Name"] = value @property def heat_recovery_water_outlet_node_name(self): """field `Heat Recovery Water Outlet Node Name` Args: value (str): value for IDD Field `Heat Recovery Water Outlet Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `heat_recovery_water_outlet_node_name` or None if not set """ return self["Heat Recovery Water Outlet Node Name"] @heat_recovery_water_outlet_node_name.setter def heat_recovery_water_outlet_node_name(self, value=None): """Corresponds to IDD field `Heat Recovery Water Outlet Node Name`""" self["Heat Recovery Water Outlet Node Name"] = value @property def no_load_supply_air_flow_rate(self): """field `No Load Supply Air Flow Rate` | Only used when the supply air fan operating mode is continuous (see field | Supply Air Fan Operating Mode Schedule Name). This air flow rate | is used when no heating or cooling is required and the coils are off. | If this field is left blank or zero, the supply air flow rate from the | previous on cycle (either cooling or heating) is used. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `No Load Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `no_load_supply_air_flow_rate` or None if not set """ return self["No Load Supply Air Flow Rate"] @no_load_supply_air_flow_rate.setter def no_load_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `No Load Supply Air Flow Rate`""" self["No Load Supply Air Flow Rate"] = value @property def number_of_speeds_for_heating(self): """field `Number of Speeds for Heating` | Enter the number of the following sets of data for air flow rates. | If Heating Coil Object Type is Coil:Heating:Water or Coil:Heating:Steam, | this field should be 1. | value >= 1 | value <= 4 Args: value (int): value for IDD Field `Number of Speeds for Heating` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_speeds_for_heating` or None if not set """ return self["Number of Speeds for Heating"] @number_of_speeds_for_heating.setter def number_of_speeds_for_heating(self, value=None): """Corresponds to IDD field `Number of Speeds for Heating`""" self["Number of Speeds for Heating"] = value @property def number_of_speeds_for_cooling(self): """field `Number of Speeds for Cooling` | Enter the number of the following sets of data for air flow rates. | value >= 2 | value <= 4 Args: value (int): value for IDD Field `Number of Speeds for Cooling` Raises: ValueError: if `value` is not a valid value Returns: int: the value of `number_of_speeds_for_cooling` or None if not set """ return self["Number of Speeds for Cooling"] @number_of_speeds_for_cooling.setter def number_of_speeds_for_cooling(self, value=None): """Corresponds to IDD field `Number of Speeds for Cooling`""" self["Number of Speeds for Cooling"] = value @property def heating_speed_1_supply_air_flow_rate(self): """field `Heating Speed 1 Supply Air Flow Rate` | Enter the operating supply air flow rate during heating | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Speed 1 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_speed_1_supply_air_flow_rate` or None if not set """ return self["Heating Speed 1 Supply Air Flow Rate"] @heating_speed_1_supply_air_flow_rate.setter def heating_speed_1_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Speed 1 Supply Air Flow Rate`""" self["Heating Speed 1 Supply Air Flow Rate"] = value @property def heating_speed_2_supply_air_flow_rate(self): """field `Heating Speed 2 Supply Air Flow Rate` | Enter the operating supply air flow rate during heating | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Speed 2 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_speed_2_supply_air_flow_rate` or None if not set """ return self["Heating Speed 2 Supply Air Flow Rate"] @heating_speed_2_supply_air_flow_rate.setter def heating_speed_2_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Speed 2 Supply Air Flow Rate`""" self["Heating Speed 2 Supply Air Flow Rate"] = value @property def heating_speed_3_supply_air_flow_rate(self): """field `Heating Speed 3 Supply Air Flow Rate` | Enter the operating supply air flow rate during heating | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Speed 3 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_speed_3_supply_air_flow_rate` or None if not set """ return self["Heating Speed 3 Supply Air Flow Rate"] @heating_speed_3_supply_air_flow_rate.setter def heating_speed_3_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Speed 3 Supply Air Flow Rate`""" self["Heating Speed 3 Supply Air Flow Rate"] = value @property def heating_speed_4_supply_air_flow_rate(self): """field `Heating Speed 4 Supply Air Flow Rate` | Enter the operating supply air flow rate during heating | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Heating Speed 4 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `heating_speed_4_supply_air_flow_rate` or None if not set """ return self["Heating Speed 4 Supply Air Flow Rate"] @heating_speed_4_supply_air_flow_rate.setter def heating_speed_4_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Heating Speed 4 Supply Air Flow Rate`""" self["Heating Speed 4 Supply Air Flow Rate"] = value @property def cooling_speed_1_supply_air_flow_rate(self): """field `Cooling Speed 1 Supply Air Flow Rate` | Enter the operating supply air flow rate during cooling | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Speed 1 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_speed_1_supply_air_flow_rate` or None if not set """ return self["Cooling Speed 1 Supply Air Flow Rate"] @cooling_speed_1_supply_air_flow_rate.setter def cooling_speed_1_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Speed 1 Supply Air Flow Rate`""" self["Cooling Speed 1 Supply Air Flow Rate"] = value @property def cooling_speed_2_supply_air_flow_rate(self): """field `Cooling Speed 2 Supply Air Flow Rate` | Enter the operating supply air flow rate during cooling | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Speed 2 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_speed_2_supply_air_flow_rate` or None if not set """ return self["Cooling Speed 2 Supply Air Flow Rate"] @cooling_speed_2_supply_air_flow_rate.setter def cooling_speed_2_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Speed 2 Supply Air Flow Rate`""" self["Cooling Speed 2 Supply Air Flow Rate"] = value @property def cooling_speed_3_supply_air_flow_rate(self): """field `Cooling Speed 3 Supply Air Flow Rate` | Enter the operating supply air flow rate during cooling | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Speed 3 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_speed_3_supply_air_flow_rate` or None if not set """ return self["Cooling Speed 3 Supply Air Flow Rate"] @cooling_speed_3_supply_air_flow_rate.setter def cooling_speed_3_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Speed 3 Supply Air Flow Rate`""" self["Cooling Speed 3 Supply Air Flow Rate"] = value @property def cooling_speed_4_supply_air_flow_rate(self): """field `Cooling Speed 4 Supply Air Flow Rate` | Enter the operating supply air flow rate during cooling | operation or specify autosize. | Units: m3/s Args: value (float or "Autosize"): value for IDD Field `Cooling Speed 4 Supply Air Flow Rate` Raises: ValueError: if `value` is not a valid value Returns: float or "Autosize": the value of `cooling_speed_4_supply_air_flow_rate` or None if not set """ return self["Cooling Speed 4 Supply Air Flow Rate"] @cooling_speed_4_supply_air_flow_rate.setter def cooling_speed_4_supply_air_flow_rate(self, value=None): """Corresponds to IDD field `Cooling Speed 4 Supply Air Flow Rate`""" self["Cooling Speed 4 Supply Air Flow Rate"] = value
43.373058
132
0.503606
34,684
349,023
4.941645
0.014185
0.049464
0.037545
0.051775
0.954713
0.944485
0.927134
0.907577
0.883679
0.865026
0
0.003644
0.422895
349,023
8,046
133
43.378449
0.847282
0.320228
0
0.855157
0
0
0.261645
0.041611
0
0
0
0
0
1
0.12983
false
0.005282
0.000834
0
0.201001
0
0
0
0
null
0
0
0
1
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
7
c13c4ad752ea38065f8a315cec7a6c7583421134
299
py
Python
extensions/.stubs/clrclasses/System/Net/Mime/__init__.py
vicwjb/Pycad
7391cd694b7a91ad9f9964ec95833c1081bc1f84
[ "MIT" ]
1
2020-03-25T03:27:24.000Z
2020-03-25T03:27:24.000Z
extensions/.stubs/clrclasses/System/Net/Mime/__init__.py
vicwjb/Pycad
7391cd694b7a91ad9f9964ec95833c1081bc1f84
[ "MIT" ]
null
null
null
extensions/.stubs/clrclasses/System/Net/Mime/__init__.py
vicwjb/Pycad
7391cd694b7a91ad9f9964ec95833c1081bc1f84
[ "MIT" ]
null
null
null
from __clrclasses__.System.Net.Mime import ContentDisposition from __clrclasses__.System.Net.Mime import ContentType from __clrclasses__.System.Net.Mime import DispositionTypeNames from __clrclasses__.System.Net.Mime import MediaTypeNames from __clrclasses__.System.Net.Mime import TransferEncoding
49.833333
63
0.882943
35
299
6.971429
0.314286
0.286885
0.409836
0.471311
0.67623
0.67623
0
0
0
0
0
0
0.06689
299
5
64
59.8
0.874552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
c1b00f367b6e4cf51b7807f6bcc4af5fb0526ae0
7,643
py
Python
tests/test_testlink.py
kman0/pytest-testlink
8a69f4288172b42f20e3585b400cc92e3d0fc9c9
[ "MIT" ]
1
2020-12-03T06:45:53.000Z
2020-12-03T06:45:53.000Z
tests/test_testlink.py
manojklm/pytest-testlink
8a69f4288172b42f20e3585b400cc92e3d0fc9c9
[ "MIT" ]
null
null
null
tests/test_testlink.py
manojklm/pytest-testlink
8a69f4288172b42f20e3585b400cc92e3d0fc9c9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function pytest_plugins = "pytester" import os import sys import time import pytest from pytest_testlink import TLINK DEMO_XMLRPC = "http://demo.testlink.org/latest/lib/api/xmlrpc/v1/xmlrpc.php" DEMO_APIKEY = "583e35fa07bd59e81048640f5cee1897" def init_ini(testdir): testdir.tmpdir.ensure("pytest.ini").write("""[pytest] testlink_file=testlink.ini""") def init_pass(testdir): testdir.makepyfile(""" import pytest def test_pass(): assert 1 """) def init_tests(testdir): testdir.makepyfile(""" import pytest def test_1(): assert 1 def test_2(): assert 0 def test_3(): pytest.skip() @pytest.mark.xfail def test_4(): assert 0 @pytest.mark.xfail def test_5(): assert 1 """) def init_testlink(testdir): testdir.tmpdir.ensure("testlink.ini").write(""" [testlink-conf] xmlrpc_url=""" + DEMO_XMLRPC + """ api_key=""" + DEMO_APIKEY + """ project=TS test_plan=Automation build_name=1 [testlink-maps] ts-1=tests/test_testlink.py::test_1 ts-2=tests/test_testlink.py::test_2 ts-3=tests/test_testlink.py::test_3 ts-4=tests/test_testlink.py::test_4 ts-5=tests/test_testlink.py::test_5 """ ) # # Tests def test_no_testlink(testdir): init_pass(testdir) result = testdir.runpytest('--no-testlink', testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*testlink: disabled by --no-testlink*") def test_no_configure_print(testdir): init_pass(testdir) result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random(r'*testlink: "testlink_file" key was not found in [pytest? section*') def test_testlink_file_not_found(testdir): init_ini(testdir) init_pass(testdir) result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*FileNotFoundError: testlink_file: testlink.ini*") result.stdout.fnmatch_lines_random("*1 passed*") result = testdir.runpytest('--testlink-exit-on-error', testdir.tmpdir) # result.stdout.fnmatch_lines_random("*testlink: exit on failure enabled!*") assert result.ret == 3 result.stderr.fnmatch_lines_random("*FileNotFoundError: testlink_file: testlink.ini*") result.stderr.fnmatch_lines_random("*INTERNALERROR*") def test_testlink_conf_section_not_found(testdir): init_ini(testdir) init_pass(testdir) testdir.tmpdir.ensure("testlink.ini").write("""[pytest]""") result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*1 passed*") result.stdout.fnmatch_lines_random('*section "testlink-conf" not found in ini file: testlink.ini*') result = testdir.runpytest('--testlink-exit-on-error', testdir.tmpdir) # result.stdout.fnmatch_lines_random("*testlink: exit on failure enabled!*") assert result.ret == 3 result.stderr.fnmatch_lines_random('*section "testlink-conf" not found in ini file: testlink.ini*') result.stderr.fnmatch_lines_random("*INTERNALERROR*") def test_testlink_maps_section_not_found(testdir): init_ini(testdir) init_pass(testdir) testdir.tmpdir.ensure("testlink.ini").write("""[testlink-conf]""") result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*1 passed*") result.stdout.fnmatch_lines_random('*section "testlink-maps" not found in ini file: testlink.ini*') @pytest.mark.parametrize(argnames="data", argvalues=TLINK.ini_required_keys) def test_testlink_missing_key(testdir, data): init_ini(testdir) init_pass(testdir) keys = set(TLINK.ini_required_keys) keys.remove(data) testdir.tmpdir.ensure("testlink.ini").write("""[testlink-conf]\n%s""" % ('\n'.join(k+"=dummy" for k in keys))) print(open("testlink.ini").read()) result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*Missing testlink ini keys: {'%s'}*" % data) result = testdir.runpytest('--testlink-exit-on-error', testdir.tmpdir) assert result.ret == 3 result.stderr.fnmatch_lines_random("*INTERNALERROR*") result.stderr.fnmatch_lines_random("*Missing testlink ini keys: {'%s'}*" % data) def test_ini_map_one_test(testdir): init_ini(testdir) init_pass(testdir) testdir.tmpdir.ensure("testlink.ini").write("""[testlink-conf]\n%s""" % ('\n'.join(k+"=dummy" for k in TLINK.ini_required_keys)) + """\n[testlink-maps] test-1=tests/test_testlink.py::test_ini_map """) result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*1 passed*") def test_ini_map_duplicate_keys(testdir): init_ini(testdir) init_pass(testdir) testdir.tmpdir.ensure("testlink.ini").write("""[testlink-conf]\n%s""" % ('\n'.join(k+"=dummy" for k in TLINK.ini_required_keys)) + """\n[testlink-maps] test-1=tests/test_testlink.py::test_ini_map test-1=tests/test_testlink.py::test_ini_map """) result = testdir.runpytest(testdir.tmpdir) assert result.ret == 3 result.stderr.fnmatch_lines_random("*configparser.DuplicateOptionError*") result.stderr.fnmatch_lines_random("*option 'test-1' in section 'testlink-maps' already exists*") def test_ini_map_duplicate_nodes(testdir): init_ini(testdir) init_pass(testdir) testdir.tmpdir.ensure("testlink.ini").write("""[testlink-conf]\n%s""" % ('\n'.join(k+"=dummy" for k in TLINK.ini_required_keys)) + """\n[testlink-maps] test-1=tests/test_testlink.py::test_ini_map test-2=tests/test_testlink.py::test_ini_map """) result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*Duplicate node ids in testlink maps: ['tests/test_testlink.py::test_ini_map'*") result = testdir.runpytest('--testlink-exit-on-error', testdir.tmpdir) assert result.ret == 3 result.stderr.fnmatch_lines_random("*INTERNALERROR*") result.stderr.fnmatch_lines_random("*Duplicate node ids in testlink maps:*") def test_ini_map_no_nodes(testdir): init_ini(testdir) init_pass(testdir) testdir.tmpdir.ensure("testlink.ini").write("""[testlink-conf]\n%s""" % ('\n'.join(k+"=dummy" for k in TLINK.ini_required_keys)) + """\n[testlink-maps]""") result = testdir.runpytest(testdir.tmpdir) assert result.ret == 0 result.stdout.fnmatch_lines_random("*No nodes found*") result = testdir.runpytest('--testlink-exit-on-error', testdir.tmpdir) assert result.ret == 3 result.stderr.fnmatch_lines_random("*INTERNALERROR*") result.stderr.fnmatch_lines_random("*No nodes found!*") def test_1(testdir): init_ini(testdir) def test_2(): assert 0 def test_3(): pytest.skip() @pytest.mark.xfail def test_4(): assert 0 @pytest.mark.xfail def test_5(): assert 1
34.427928
120
0.642156
946
7,643
4.994715
0.120507
0.066032
0.099048
0.071111
0.801058
0.770794
0.747513
0.714074
0.707513
0.652275
0
0.013138
0.223211
7,643
221
121
34.58371
0.782719
0.023289
0
0.493671
0
0.006329
0.280959
0.063323
0
0
0
0
0.14557
1
0.120253
false
0.101266
0.050633
0
0.170886
0.018987
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
1
0
0
0
0
0
7
c1d8bf4f9e4db6f16fbef1deb576b8fb2f47307b
3,509
py
Python
tests/integrated_recognizers/de/test_de_date_recognizer.py
openredact/pii-identifier
97eaef56d6de59718501095d631a0fb49700e45a
[ "MIT" ]
14
2020-07-31T18:45:29.000Z
2022-02-21T13:24:00.000Z
tests/integrated_recognizers/de/test_de_date_recognizer.py
openredact/pii-identifier
97eaef56d6de59718501095d631a0fb49700e45a
[ "MIT" ]
7
2020-07-31T06:17:21.000Z
2021-05-23T08:40:24.000Z
tests/integrated_recognizers/de/test_de_date_recognizer.py
openredact/pii-identifier
97eaef56d6de59718501095d631a0fb49700e45a
[ "MIT" ]
1
2020-09-30T01:42:57.000Z
2020-09-30T01:42:57.000Z
import pytest from nerwhal.integrated_recognizers.de.de_date_recognizer import DeDateRecognizer @pytest.fixture(scope="module") def backend(setup_backend): recognizer = DeDateRecognizer backend = setup_backend(recognizer.BACKEND, language="de") backend.register_recognizer(recognizer) return backend # DIN 1355-1 def test_current_1355_1(backend, embed): text = "Der 25.06.1999 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_future_1355_1(backend, embed): text = "Der 25.12.2978 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_historic_1355_1(backend, embed): text = "Der 25.12.768 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_abbreviated_1355_1(backend, embed): text = "Der 5.12.74 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_1355_1_invalid_month(backend, embed): text = "Der 24.13.1999 ist ein zufälliges Datum." ents = backend.run(text) assert len(ents) == 0 def test_1355_1_invalid_day(backend, embed): text = "Der 35.12.1999 ist ein zufälliges Datum." ents = backend.run(text) assert len(ents) == 0 # DIN 5008 def test_current_5008(backend, embed): text = "Der 1999-06-25 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_future_5008(backend, embed): text = "Der 2978-12-25 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_5008_invalid_month(backend, embed): text = "Der 1999-13-25 ist ein zufälliges Datum." ents = backend.run(text) assert len(ents) == 0 def test_5008_invalid_day(backend, embed): text = "Der 1999-12-35 ist ein zufälliges Datum." ents = backend.run(text) assert len(ents) == 0 # Written out def test_current_written_out(backend, embed): text = "Der 25. Juni 1999 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_future_written_out(backend, embed): text = "Der 25. Dezember 2978 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_historic_written_out(backend, embed): text = "Der 25. Dezember 768 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_abbreviated_written_out(backend, embed): text = "Der 5. Dez. 74 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "Der DATE ist ein zufälliges Datum." def test_with_day_written_out(backend, embed): text = "Montag, 5. Dez. 74 ist ein zufälliges Datum." ents = backend.run(text) assert embed(text, ents) == "DATE ist ein zufälliges Datum." def test_written_out_invalid_month(backend, embed): text = "Der 24. Foobar 1999 ist ein zufälliges Datum." ents = backend.run(text) assert len(ents) == 0 def test_written_out_invalid_day(backend, embed): text = "Der 35. Dezember 1999 ist ein zufälliges Datum." ents = backend.run(text) assert len(ents) == 0
28.528455
81
0.700484
518
3,509
4.629344
0.119691
0.105088
0.186822
0.245204
0.842369
0.794412
0.747289
0.656797
0.600917
0.600917
0
0.060713
0.192647
3,509
122
82
28.762295
0.78574
0.008834
0
0.434211
0
0
0.312608
0
0
0
0
0
0.223684
1
0.236842
false
0
0.026316
0
0.276316
0
0
0
0
null
0
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
e7573f288c7425285b4c1b69dd60f3c650f5ff4d
17,849
py
Python
parser/team19/BDTytus/AST/Expresiones.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
parser/team19/BDTytus/AST/Expresiones.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
parser/team19/BDTytus/AST/Expresiones.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
import AST.Nodo as Node from TablaSimbolos.Tipos import * from Errores.Nodo_Error import * class Aritmetica(Node.Nodo): def __init__(self, Exp1, Exp2, op, fila, col): self.Exp1 = Exp1 self.Exp2 = Exp2 self.op = op self.fila = fila self.columna = col def analizar(self, TS, Errores): tipo1 = self.Exp1.analizar(TS, Errores) tipo2 = self.Exp2.analizar(TS, Errores) if self.op == '+': if ( tipo1 == TIPO_DATOS.INT or tipo1 == TIPO_DATOS.CHAR or tipo1 == TIPO_DATOS.FLOAT or tipo1 == TIPO_DATOS.DOUBLE) and ( tipo2 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.INT or tipo2 == TIPO_DATOS.FLOAT or tipo2 == TIPO_DATOS.DOUBLE): if tipo1 == TIPO_DATOS.INT and tipo2 == TIPO_DATOS.INT: return TIPO_DATOS.FLOAT elif tipo1 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.CHAR: return TIPO_DATOS.INT return TIPO_DATOS.FLOAT else: return TIPO_DATOS.CHAR elif self.op == '-' or self.op == '*': if ( tipo1 == TIPO_DATOS.INT or tipo1 == TIPO_DATOS.CHAR or tipo1 == TIPO_DATOS.FLOAT or tipo1 == TIPO_DATOS.DOUBLE) and ( tipo2 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.INT or tipo2 == TIPO_DATOS.FLOAT or tipo2 == TIPO_DATOS.DOUBLE): if tipo1 == TIPO_DATOS.INT and tipo2 == TIPO_DATOS.INT: return TIPO_DATOS.INT elif tipo1 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.CHAR: return TIPO_DATOS.INT return TIPO_DATOS.FLOAT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operacion entre " + str(tipo1.name) + ' ' + self.op + ' ' + str(tipo2.name), self.fila, self.columna)) return TIPO_DATOS.ERROR elif self.op == '/': if ( tipo1 == TIPO_DATOS.INT or tipo1 == TIPO_DATOS.CHAR or tipo1 == TIPO_DATOS.FLOAT or tipo1 == TIPO_DATOS.DOUBLE) and ( tipo2 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.INT or tipo2 == TIPO_DATOS.FLOAT or tipo2 == TIPO_DATOS.DOUBLE): return TIPO_DATOS.FLOAT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operacion entre " + str(tipo1.nombre) + ' ' + self.op + ' ' + str(tipo2.nombre), self.fila, self.columna)) return TIPO_DATOS.ERROR elif self.op == '%': if (tipo1 == TIPO_DATOS.INT or tipo1 == TIPO_DATOS.CHAR) and ( tipo2 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.INT): return TIPO_DATOS.INT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operacion entre " + str(tipo1.nombre) + ' ' + self.op + ' ' + str(tipo2.nombre), self.fila, self.columna)) return TIPO_DATOS.ERROR def getC3D(self, TS): codigo = "" codigo += self.Exp1.getC3D(TS) codigo += self.Exp2.getC3D(TS) temp = TS.getTemp() self.temporal = temp codigo += TS.make3d(temp, self.Exp1.temporal, self.op, self.Exp2.temporal) return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) if self.Exp1 is not None: self.Exp1.graficarasc(nombrehijo, grafica) grafica.node('NodeE1' + str(id(self)), label=(str(self.op))) grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) if self.Exp2 is not None: self.Exp2.graficarasc(nombrehijo, grafica) class Relacional(Node.Nodo): def __init__(self, Exp1, Exp2, op, fila, col): self.Exp1 = Exp1 self.Exp2 = Exp2 self.op = op self.fila = fila self.columna = col def analizar(self, TS, Errores): tipo1 = self.Exp1.analizar(TS, Errores) tipo2 = self.Exp2.analizar(TS, Errores) if ( tipo1 == TIPO_DATOS.STRING or tipo1 == TIPO_DATOS.INT or tipo1 == TIPO_DATOS.CHAR or tipo1 == TIPO_DATOS.FLOAT or tipo1 == TIPO_DATOS.DOUBLE) and ( tipo2 == TIPO_DATOS.STRING or tipo2 == TIPO_DATOS.INT or tipo2 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.FLOAT or tipo2 == TIPO_DATOS.DOUBLE): return TIPO_DATOS.INT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operacion entre " + str(tipo1) + ' ' + self.op + ' ' + str(tipo2), self.fila, self.columna)) return TIPO_DATOS.ERROR def getC3D(self, TS): codigo = "" codigo += self.Exp1.getC3D(TS) codigo += self.Exp2.getC3D(TS) temp = TS.getTemp() self.temporal = temp codigo += TS.make3d(temp, self.Exp1.temporal, self.op, self.Exp2.temporal) return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) if self.Exp1 is not None: self.Exp1.graficarasc(nombrehijo, grafica) grafica.node('NodeE1' + str(id(self)), label=(str(self.op))) grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) if self.Exp2 is not None: self.Exp2.graficarasc(nombrehijo, grafica) class primitivo(Node.Nodo): def __init__(self, Valor, fila, col, tipo): self.fila = fila self.columna = col self.valor = Valor self.temporal = "" if tipo == "decimal": self.tipo = TIPO_DATOS.FLOAT elif tipo == "entero": self.tipo = TIPO_DATOS.INT elif tipo == "char": self.tipo = TIPO_DATOS.CHAR elif tipo == "string": self.tipo = TIPO_DATOS.STRING def analizar(self, TS, Errores): return self.tipo def getC3D(self, TS): if self.tipo == TIPO_DATOS.CHAR: self.temporal = '\'' + str(self.valor) + '\'' elif self.tipo == TIPO_DATOS.STRING: self.temporal = '\"' + str(self.valor) + '\"' else: self.temporal = str(self.valor) return "" def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) grafica.node('NodeV' + str(id(self)), label=(str(self.valor))) grafica.edge(nombrehijo, 'NodeV' + str(id(self))) class variable(Node.Nodo): def __init__(self, nombre, fila, col): self.fila = fila self.columna = col self.nombre = nombre self.temporal = "" def analizar(self, TS, Errores): simbolo = TS.obtener(self.nombre) if simbolo is None: Errores.insertar( Nodo_Error("Semantico", "No existe variable " + self.nombre, self.fila, self.columna)) return TIPO_DATOS.ERROR return simbolo.tipo def getC3D(self, TS): codigo = "" simbolo = TS.obtener(self.nombre) self.temporal = simbolo.posicion return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) grafica.node('NodeI' + str(id(self)), label=(str(self.nombre))) grafica.edge(nombrehijo, 'NodeI' + str(id(self))) class bitabit(Node.Nodo): def __init__(self, Exp1, Exp2, op, fila, col): self.fila = fila self.columna = col self.Exp1 = Exp1 self.Exp2 = Exp2 self.op = op self.temporal = "" def analizar(self, TS, Errores): tipo1 = self.Exp1.analizar(TS, Errores) tipo2 = self.Exp2.analizar(TS, Errores) if ( tipo1 == TIPO_DATOS.INT or tipo1 == TIPO_DATOS.CHAR) and ( tipo2 == TIPO_DATOS.INT or tipo2 == TIPO_DATOS.CHAR): return TIPO_DATOS.INT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operacion entre " + str(tipo1.nombre) + ' ' + self.op + ' ' + str(tipo2.nombre), self.fila, self.columna)) return TIPO_DATOS.ERROR def getC3D(self, TS): codigo = "" codigo += self.Exp1.getC3D(TS) codigo += self.Exp2.getC3D(TS) temp = TS.getTemp() self.temporal = temp codigo += TS.make3d(temp, self.Exp1.temporal, self.op, self.Exp2.temporal) return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) if self.Exp1 is not None: self.Exp1.graficarasc(nombrehijo, grafica) grafica.node('NodeE1' + str(id(self)), label=(str(self.op))) grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) if self.Exp2 is not None: self.Exp2.graficarasc(nombrehijo, grafica) class logica(Node.Nodo): def __init__(self, Exp1, Exp2, op, fila, col): self.fila = fila self.columna = col self.Exp1 = Exp1 self.Exp2 = Exp2 self.op = op def analizar(self, TS, Errores): tipo1 = self.Exp1.analizar(TS, Errores) tipo2 = self.Exp2.analizar(TS, Errores) if ( tipo1 == TIPO_DATOS.INT or tipo1 == TIPO_DATOS.CHAR or tipo1 == TIPO_DATOS.FLOAT or tipo1 == TIPO_DATOS.DOUBLE) and ( tipo2 == TIPO_DATOS.INT or tipo2 == TIPO_DATOS.CHAR or tipo2 == TIPO_DATOS.FLOAT or tipo2 == TIPO_DATOS.DOUBLE): return TIPO_DATOS.INT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operacion entre " + str(tipo1.nombre) + ' ' + self.op + ' ' + str(tipo2.nombre), self.fila, self.columna)) return TIPO_DATOS.ERROR def getC3D(self, TS): codigo = "" codigo += self.Exp1.getC3D(TS) codigo += self.Exp2.getC3D(TS) temp = TS.getTemp() self.temporal = temp codigo += TS.make3d(temp, self.Exp1.temporal, self.op, self.Exp2.temporal) return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) if self.Exp1 is not None: self.Exp1.graficarasc(nombrehijo, grafica) grafica.node('NodeE1' + str(id(self)), label=(str(self.op))) grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) if self.Exp2 is not None: self.Exp2.graficarasc(nombrehijo, grafica) class incremento(Node.Nodo): def __init__(self, Exp1, op, primero, fila, col): self.fila = fila self.columna = col self.Exp1 = Exp1 self.primero = primero self.op = op def analizar(self, TS, Errores): tipo = self.Exp1.analizar(TS, Errores) if tipo == TIPO_DATOS.INT or tipo == TIPO_DATOS.CHAR or tipo == TIPO_DATOS.FLOAT or tipo == TIPO_DATOS.DOUBLE: return tipo else: Errores.insertar( Nodo_Error("Semantico", "No es posible incremento/decremento", self.fila, self.columna)) return TIPO_DATOS.ERROR def getC3D(self, TS): codigo = "" if self.op == '++': operador = '+' else: operador = '-' if self.primero: codigo += self.Exp1.getC3D(TS) temporal = self.Exp1.temporal codigo += TS.make3d(temporal, temporal, operador, 1) self.temporal = temporal return codigo else: codigo += self.Exp1.getC3D(TS) temporal = self.Exp1.temporal temporal2 = TS.getTemp() codigo += temporal2 + '=' + temporal + ';\n' codigo += TS.make3d(temporal, temporal, operador, 1) self.temporal = temporal2 return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) if self.primero: grafica.node('NodeE1' + str(id(self)), label=(str(self.op))) grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) self.Exp1.graficarasc(nombrehijo, grafica) else: self.Exp1.graficarasc(nombrehijo, grafica) grafica.node('NodeE1' + str(id(self)), label=(str(self.op))) grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) class unario(Node.Nodo): def __init__(self, Exp, op, fila, col): self.fila = fila self.columna = col self.Exp = Exp self.op = op def analizar(self, TS, Errores): tipo = self.Exp.analizar(TS, Errores) if self.op == '~': if tipo == TIPO_DATOS.INT or tipo == TIPO_DATOS.CHAR: return TIPO_DATOS.INT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operador unario " + self.op + ' con tipo de dato ' + str(tipo.nombre), self.fila, self.columna)) return TIPO_DATOS.ERROR else: if tipo == TIPO_DATOS.INT or tipo == TIPO_DATOS.CHAR or tipo == TIPO_DATOS.DOUBLE or tipo == TIPO_DATOS.FLOAT: return TIPO_DATOS.INT else: Errores.insertar( Nodo_Error("Semantico", "No es posible operador unario " + self.op + ' con tipo de dato ' + str(tipo.nombre), self.fila, self.columna)) return TIPO_DATOS.ERROR def getC3D(self, TS): codigo = "" codigo += self.Exp.getC3D(TS) temp = TS.getTemp() self.temporal = temp codigo += self.temporal + ' = ' + str(self.op) + ' ' + self.Exp.temporal + '; \n' return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) grafica.edge(padre, nombrehijo) grafica.node('NodeE1' + str(id(self)), label=(str(self.op))) grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) if self.Exp is not None: self.Exp.graficarasc(nombrehijo, grafica) class ternario(Node.Nodo): def __init__(self, Cond, Exp1, Exp2, fila, col): self.fila = fila self.columna = col self.Cond = Cond self.Exp1 = Exp1 self.Exp2 = Exp2 def analizar(self, TS, Errores): tipo = self.analizar(TS, Errores) if not ( tipo == TIPO_DATOS.INT or tipo == TIPO_DATOS.CHAR or tipo == TIPO_DATOS.DOUBLE or tipo == TIPO_DATOS.FLOAT): Errores.insertar( Nodo_Error("Semantico", "La el tipo de condicion no es valido en ternario ", self.fila, self.columna)) return TIPO_DATOS.ERROR tipo2 = self.Exp1.analizar(TS, Errores) tipo3 = self.Exp2.analizar(TS, Errores) if tipo == TIPO_DATOS.ERROR or tipo2 == TIPO_DATOS.ERROR or tipo3 == TIPO_DATOS.ERROR: return TIPO_DATOS.ERROR def getC3D(self, TS): codigo = "" V = TS.getEtq() F = TS.getEtq() S = TS.getEtq() self.temporal = TS.getTemp() codigo += self.Cond.getC3D(TS) codigo += 'if (' + str(self.Cond.temporal) + ') goto ' + V + ';\n' codigo += 'goto ' + F + ';\n' codigo += V + ':\n' codigo += self.Exp1.getC3D(TS) codigo += self.temporal + '=' + str(self.Exp1.temporal) + ';\n' codigo += 'goto ' + S + ';\n' codigo += F + ':\n' codigo += self.Exp1.getC3D(TS) codigo += self.temporal + '=' + str(self.Exp1.temporal) + ';\n' codigo += 'goto ' + S + ';\n' codigo += S + ':\n' return codigo def graficarasc(self, padre, grafica): nombrehijo = 'Node' + str(id(self)) grafica.node(nombrehijo, label=('Exp')) self.Cond.graficarasc(nombrehijo, grafica) grafica.node('NodeE1' + str(id(self)), label="?") grafica.edge(nombrehijo, 'NodeE1' + str(id(self))) self.Exp1.graficarasc(nombrehijo, grafica) grafica.node('NodeE2' + str(id(self)), label=":") grafica.edge(nombrehijo, 'NodeE2' + str(id(self))) self.Exp2.graficarasc(nombrehijo, grafica) class casteo(Node.Nodo): def __init__(self, Cast, Exp, fila, col): self.fila = fila self.columna = col self.Exp = Exp self.cast = Cast def analizar(self, TS, Errores): self.Exp.analizar(TS, Errores) if self.cast == "char": self.tipo = TIPO_DATOS.CHAR elif self.cast == "int": self.tipo = TIPO_DATOS.INT elif self.cast == "float": self.tipo = TIPO_DATOS.FLOAT def getC3D(self, TS): codigo = "" codigo += self.Exp.getC3D(TS) temp = TS.getTemp() codigo += temp + '= (' + self.cast + ')' + self.Exp.temporal + ';\n' self.temporal = temp return codigo; def graficarasc(self, padre, grafica): pass class sizeof(Node.Nodo): def __init__(self, Exp, fila, col): self.fila = fila self.columna = col self.Exp = Exp def analizar(self, TS, Errores): return def getC3D(self, TS): self.temporal = "3" return "" def graficarasc(self, padre, grafica): return
37.576842
163
0.557958
2,116
17,849
4.628072
0.051985
0.101093
0.040437
0.03431
0.879812
0.826611
0.789441
0.752272
0.747983
0.704483
0
0.018538
0.316993
17,849
474
164
37.656118
0.784759
0
0
0.735941
0
0
0.046445
0.001177
0
0
0
0
0
1
0.107579
false
0.002445
0.007335
0.007335
0.246944
0
0
0
0
null
0
0
0
1
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
7
e7672f046e74a5182ce8cade5578978f8ade0ff4
335
py
Python
logPage/forms.py
Mariga123/carpool
f7330634ace2718c2347694b207b9dd49ef6538f
[ "MIT" ]
null
null
null
logPage/forms.py
Mariga123/carpool
f7330634ace2718c2347694b207b9dd49ef6538f
[ "MIT" ]
null
null
null
logPage/forms.py
Mariga123/carpool
f7330634ace2718c2347694b207b9dd49ef6538f
[ "MIT" ]
null
null
null
from django import forms # class NameForm(forms.Form): # userId = models.CharField(max_length = 200 , label = 'userId') # passWd = models.CharField(max_length = 200 , label = 'passWd') # firstName = models.CharField(max_length = 200 , label = 'firstName') # lastName = models.CharField(max_length = 200 , label = 'lastName')
33.5
71
0.695522
40
335
5.725
0.425
0.262009
0.31441
0.419214
0.558952
0.558952
0
0
0
0
0
0.043165
0.170149
335
9
72
37.222222
0.780576
0.883582
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
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
e7691867e109ed5489811d0b6e7581f56fc09dfd
145
py
Python
nnet/loss/__init__.py
trip2eee/nnet
08c435a7b40aa0b41eb64875b39d3705cf9cffdd
[ "MIT" ]
3
2021-12-31T10:59:54.000Z
2022-01-14T11:17:28.000Z
nnet/loss/__init__.py
trip2eee/nnet
08c435a7b40aa0b41eb64875b39d3705cf9cffdd
[ "MIT" ]
null
null
null
nnet/loss/__init__.py
trip2eee/nnet
08c435a7b40aa0b41eb64875b39d3705cf9cffdd
[ "MIT" ]
null
null
null
from nnet.loss.loss import Loss from nnet.loss.celoss import CELoss from nnet.loss.bceloss import BCELoss from nnet.loss.mseloss import MSELoss
24.166667
37
0.827586
24
145
5
0.291667
0.266667
0.4
0
0
0
0
0
0
0
0
0
0.117241
145
5
38
29
0.9375
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
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
7
e7c69f57088ea46fd5d25d78233c8d761697afb4
3,027
py
Python
pyaz/sshkey/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/sshkey/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/sshkey/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
''' Manage ssh public key with vm ''' from .. pyaz_utils import _call_az def list(resource_group=None): ''' List all of the SSH public keys. Optional Parameters: - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` ''' return _call_az("az sshkey list", locals()) def show(name, resource_group): ''' Retrieve information about an SSH public key. Required Parameters: - name -- The name of the SSH public key. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` ''' return _call_az("az sshkey show", locals()) def create(name, resource_group, location=None, public_key=None, tags=None): ''' Create a new SSH public key resource. Required Parameters: - name -- The name of the SSH public key. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` Optional Parameters: - location -- Location. Values from: `az account list-locations`. You can configure the default location using `az configure --defaults location=<location>`. - public_key -- SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. - tags -- space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags. ''' return _call_az("az sshkey create", locals()) def update(name, resource_group, public_key=None, tags=None): ''' Update an SSH public key resource. Required Parameters: - name -- The name of the SSH public key. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` Optional Parameters: - public_key -- SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. - tags -- space-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags. ''' return _call_az("az sshkey update", locals()) def delete(name, resource_group, yes=None): ''' Delete an SSH public key. Required Parameters: - name -- The name of the SSH public key. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` Optional Parameters: - yes -- Do not prompt for confirmation. ''' return _call_az("az sshkey delete", locals())
42.633803
366
0.708622
430
3,027
4.925581
0.213953
0.080737
0.062323
0.050992
0.779981
0.738905
0.738905
0.738905
0.738905
0.738905
0
0.003313
0.20218
3,027
70
367
43.242857
0.873706
0.756194
0
0
0
0
0.135231
0
0
0
0
0
0
1
0.454545
false
0
0.090909
0
1
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
7
e7c7b967728d7e2d70121e71c0f9ca23ee32ae4d
43
py
Python
denguefever_tw/dengue_linebot/denguebot_fsm/__init__.py
NCKU-CCS/line_bot_server
954ac77640466f625cc52c2ca8bacd37e87517a3
[ "MIT" ]
3
2016-12-31T15:06:44.000Z
2017-10-14T16:25:02.000Z
denguefever_tw/dengue_linebot/denguebot_fsm/__init__.py
NCKU-CCS/line_bot_server
954ac77640466f625cc52c2ca8bacd37e87517a3
[ "MIT" ]
8
2017-06-02T14:21:59.000Z
2021-06-09T17:41:54.000Z
denguefever_tw/dengue_linebot/denguebot_fsm/__init__.py
NCKU-CCS/line_bot_server
954ac77640466f625cc52c2ca8bacd37e87517a3
[ "MIT" ]
3
2017-05-26T06:32:59.000Z
2017-07-18T01:27:03.000Z
from .denguebotfsm import generate_fsm_cls
21.5
42
0.883721
6
43
6
1
0
0
0
0
0
0
0
0
0
0
0
0.093023
43
1
43
43
0.923077
0
0
0
1
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
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
99d0f3e3c093d852a38f97dcaf11e93807acad50
36
py
Python
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/81_como_criar_modulos/outro.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/81_como_criar_modulos/outro.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/81_como_criar_modulos/outro.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
def fala_oi(): return 'Pedro'
7.2
18
0.583333
5
36
4
1
0
0
0
0
0
0
0
0
0
0
0
0.277778
36
4
19
9
0.769231
0
0
0
0
0
0.147059
0
0
0
0
0
0
1
0.5
true
0
0
0.5
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
1
1
0
0
1
1
0
0
7
822fb7e39b96d62ead8a1254e15eec06321564bb
1,585
py
Python
tests/test_resource_user_item.py
zgoda/wk-backend
e58bbc1a23cc93d3cf5e259f30653fac36a5fa00
[ "BSD-3-Clause" ]
null
null
null
tests/test_resource_user_item.py
zgoda/wk-backend
e58bbc1a23cc93d3cf5e259f30653fac36a5fa00
[ "BSD-3-Clause" ]
6
2021-11-03T00:55:06.000Z
2022-03-02T00:39:30.000Z
tests/test_resource_user_item.py
zgoda/wk-backend
e58bbc1a23cc93d3cf5e259f30653fac36a5fa00
[ "BSD-3-Clause" ]
null
null
null
from flask import url_for def test_user_modify(client, login, user_factory): email = "test@example.com" password = "pass" name = "test name" user_factory(email=email, password=password, name=name) tokens = login(client, email, password) headers = {"X-CSRF-TOKEN": tokens.csrf_access_token} url = url_for("api.user_item", email=email) data = {"name": "My Fancy Name"} rv = client.patch(url, json=data, headers=headers) assert rv.status_code == 200 assert rv.json["user"]["name"] == data["name"] def test_user_modify_fail_notfound(client, login, user_factory): email = "test@example.com" another_email = "another@example.com" password = "pass" user_factory(email=email, password=password) tokens = login(client, email, password) headers = {"X-CSRF-TOKEN": tokens.csrf_access_token} url = url_for("api.user_item", email=another_email) data = {"name": "My Fancy Name"} rv = client.patch(url, json=data, headers=headers) assert rv.status_code == 404 def test_user_modify_fail_notallowed(client, login, user_factory): email = "test@example.com" another_email = "another@example.com" password = "pass" user_factory(email=email, password=password) user_factory(email=another_email, password=password) tokens = login(client, email, password) headers = {"X-CSRF-TOKEN": tokens.csrf_access_token} url = url_for("api.user_item", email=another_email) data = {"name": "My Fancy Name"} rv = client.patch(url, json=data, headers=headers) assert rv.status_code == 403
36.860465
66
0.692744
217
1,585
4.884793
0.193548
0.072642
0.10566
0.048113
0.860377
0.820755
0.785849
0.785849
0.74717
0.74717
0
0.00687
0.173502
1,585
42
67
37.738095
0.80229
0
0
0.666667
0
0
0.154574
0
0
0
0
0
0.111111
1
0.083333
false
0.277778
0.027778
0
0.111111
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
1
0
0
0
0
0
7
8232d78ff558c33d975d96c8a8ba6f10b564042b
139,770
py
Python
projects/src/main/python/CodeJam/Y12R5P1/kmod/generated_py_3eefd069353841ada4d18bf604bdf2b7.py
DynamicCodeSearch/CodeSeer
ee985ece7691691585952eb88565f0e08bdc9113
[ "MIT" ]
5
2020-04-05T18:04:13.000Z
2021-04-13T20:34:19.000Z
projects/src/main/python/CodeJam/Y12R5P1/kmod/generated_py_3eefd069353841ada4d18bf604bdf2b7.py
DynamicCodeSearch/CodeSeer
ee985ece7691691585952eb88565f0e08bdc9113
[ "MIT" ]
1
2020-04-29T21:42:26.000Z
2020-05-01T23:45:45.000Z
projects/src/main/python/CodeJam/Y12R5P1/kmod/generated_py_3eefd069353841ada4d18bf604bdf2b7.py
DynamicCodeSearch/CodeSeer
ee985ece7691691585952eb88565f0e08bdc9113
[ "MIT" ]
3
2020-01-27T16:02:14.000Z
2021-02-08T13:25:15.000Z
import sys sys.path.append('/home/george2/Raise/ProgramRepair/CodeSeer/projects/src/main/python') from CodeJam.Y12R5P1.kmod.a import * def func_6f7a60ff95a5430cafffcf8cc1a232b0(idx1, idx2, l, p): if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 def func_0cf0b423eb914d7e8bc26be000f755f7(idx1, idx2, l, p): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 def func_df3a048727c24f62aed20af55c603a80(f, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) return l def func_b4018aba03484b56860b5f35535384fa(f, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) return n def func_e7e9ae566f58421aa45e501fd9404fde(f, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) return f def func_ce91211b89d04caaa9b05e53aff5c115(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split()) return f def func_2b6d6caa74cb4ced8630993da85da329(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split()) return p def func_74db6412983d4e2e8d1c33b22ab0170a(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split()) return l def func_b3e56949a51141e79079fdb7f3e2e199(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n) return f def func_b3aaa706be8d492db06bec0564a2ee07(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n) return p def func_bf7127e3ed9244878b80b7661042ca53(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n) return l def func_6f1f94700b3441c1a20447c8ad92abd8(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n) return n def func_e86f6c9957a14be78ad33b627f5cd001(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) return l def func_975f1823fa12444c9b34d79a411bfc37(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) return p def func_78663e6b4b3b4ce4a3414ccc69ef30ae(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) return n def func_1fb1767d42df42e0bd87a89d96c8f2f1(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) return n def func_d97619ea782b4ea7a7f8abcd5208f494(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) return idx def func_bcdeaebc766745119e90c50c12ceb8db(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) return l def func_fd7c77c7ebfd446bad535b27a084bc92(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) return p def func_a5e434966dd1494fa4ba3df6cd9c0bc1(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp) return p def func_dbfe90a40b5444cab94e6a360aea660d(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp) return n def func_038716315e984118b64ea930897a336f(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp) return idx def func_467893eeb9fe4ea28478c789fa325a73(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp) return l def func_dd42025f12be4fe6a4a364593e63474a(idx, l, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return l def func_6cf0a201a2004cf99632d2a2f3ad2d4a(idx, l, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return idx def func_189823bf50ca422a9e8faedfacc97ea0(idx, l, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return _t def func_7b7011a47ad54cd4bb32f241fd9d15a1(idx, l, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return p def func_7160e54ae0f244f394638e3628aa7c10(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_b5cda45188714ce298557627fd161aeb(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_1e959ff85ba641c2894bc1bd23167556(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_4c633eeecf834542ae18fda6e5857f28(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_f77f6af4492c48bc9d39fe9788e9039b(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_4588ef8a638947ac93adf7f3b233ec4d(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_38d608ec286040fdad5b1df8dc11e50b(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_09ccbcfbbe6346dcadcf358b39cea97b(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) return n def func_8136661a6f0849cc84ed59b9ce9731ba(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) return l def func_bc6c37838dce4392ae30bf7594cea009(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) return f def func_269d916836394357962cbdff39dcc866(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) return p def func_a5bba859598142569c9f08cb6436b9dd(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return l def func_db1b1c3cc2754e70a8181e31d8f3eb7e(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return f def func_b247a53362f04d27ab1d603bfb1f09b0(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return n def func_8b58dbe7976243528a7db6dc031b07f0(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return p def func_651216ed8e4d4d75b2efbede421dd8d3(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return l def func_43109bc1bbb24af886725bb73b30cecf(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return p def func_61120cfc9a5d4d58b11e73c5f17e0f37(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return f def func_3564baa698a14bfe864ded98405dd2a9(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return n def func_a7b980422cfa456e90cdde9ae3a3bc34(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) return idx def func_75c643f6d7be45f0a09d4a4a9a9d4742(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) return p def func_745f164856774bb48a7025f73906fc2a(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) return n def func_4bdf00b6ea4943b083f7cf95adfd827d(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) return l def func_68633a7dd7e5437fa0efc234ffa85a1a(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return n def func_3a8012b47a0d4cdb8c076f2674c0ce96(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return l def func_791f8043777244a5a57497b04344c706(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return p def func_d292949f4629439ab4d5ca9e7a6e9551(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return idx def func_060f1d867b8f4cc49cfa6f5bcfd1512b(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return _t def func_d3f6a0edfc9a41b1a568e3bf86c30db2(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return n def func_7412d089188b49b8a195868e6c7cc0a0(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return l def func_9f559a3d8bcb47ee98f4937cb04b65a1(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return idx def func_e60941f702d1438d9d43bf5d12e9dd6a(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return p def func_a6b295b547ab42d898615f4693af25a4(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_50dae65c298c4884a5fcb06176a54e0c(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_18c558105f394bf5be0d30346ce06c5e(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_cbcf1257dc6041e6b742680a7e654504(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_6fb3bac52ba84a03b9ba57bcaf71f86c(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_cce8807b409b4e869282ffed8df7961d(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_fc8b2875b0aa468b9eb55febb32ac828(idx, l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_a4f05726f5054ea188b1d4b774dbd3f5(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return f def func_04894ebca30446a69d969034e7e88a00(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return p def func_7dbb02fc38344a969a09a8eee17793f2(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return l def func_33e68e0ea1624dda82099d13d1ff8823(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n) return n def func_ebfa5f10a92c4b58b837b1ac372dd0bb(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return n def func_5453cf70c29a4201a711ab0c99d4f3e7(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return p def func_77983b0c2cdb494286792f5159c6028c(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return l def func_8a686ff9e17244a39d3103eb09c64d58(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return f def func_e90c5e3ba6a0410b91010d0a1a453a48(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return p def func_f76d536cbf9b4187996734a21709f1c0(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return l def func_028625557ec542a28e8ea01ef29990d6(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return idx def func_af386ef647a848d3ba5b9e8bff3cc00c(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return n def func_a357be89685c4e0a91556584de5a77f5(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return f def func_937a52a7e4fc4ed6bdc75580bf298966(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return idx def func_bf733f31d02f46f7a973c5e2bb5ee91d(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return n def func_5ff61c293bff49c0ae205945213c78c2(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return l def func_cf45ed5e5c41479eaa4e6f4e588fd430(l, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return p def func_cd3f27c0a13143ec82aef99bd520572a(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return _t def func_876c5b8f97ad4e5888d948ed030ae829(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return n def func_ecf428ea8aab46b3bccd7da84517160c(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return l def func_3386ab41d23e4b7088678031a56111af(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return idx def func_0f9096ccda314f97801224489279c366(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return p def func_b6325d480a2747b9a79d45a89b48f2a8(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_3b43249a86b349439c590bd2b1e8ad77(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_799ea175e73b40498ded9edb55549c3f(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_035a5d0764164c22b2448988e84cfa78(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_776da4d9f6eb44a8aea7e6505128e04b(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_b807b30007704917adea19bb0753c488(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_3bf341908bd14a959af36035da0fbdc7(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_1a6295e682494d4abb9fda675af8198a(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return l def func_578b991fc8764e69afcc7591b7cf8485(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return p def func_0bc362fb278b4359b6b4d3b4d4095e5a(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return f def func_10c4586faf5540ef9eb3049533bf3ab2(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) return n def func_6f4b0092e2f044a2ad6982205b028fd0(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return p def func_72804d678cb648db87d8e6b4533cc377(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return n def func_f721096e85a342aca4561e754c0089b4(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return f def func_dabca126d0954c7097e2cf62bafee4e8(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return l def func_fbd032e5050c46e68e66a81e71129dba(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return idx def func_a6b0503503404e658a1adc54d292b349(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return f def func_c5d008eba6ca43ee8200c1bacdbbbf42(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return n def func_d5ff4d78e61147f7b53fc16bc77c9fbf(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return idx def func_4a1590f22b6e4814a563cd32a5c814ac(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return p def func_9df8f9ed52d145d89394a0b29ceae3b7(l, f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return l def func_b6b08a2af8ef4a2999aa132f310438b4(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return _t def func_af7d0718ad884c29b431817971cdf215(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return p def func_2fa4f9ab4bac46339f4fb2a263729057(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return l def func_c2af2dfc068942da84a18f2cc18bc451(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return idx def func_1b9abd6b0b304c1b9c994ea933c487b0(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return n def func_1860b4ab903b4fbe8414042179bad657(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_14dd1509a7b04eaabd2c3e1639411638(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_12e43e0c93b1485ebd8b3eae308531dc(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_84ccb66cb91c4d61b336fb440dabb1ec(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_d6df52c0938448f2bb874eaa2b41c635(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_1257c6987a7246cb80beeac346468fe5(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_4e6ad0344ade4ae7877e7f80fc7f22ad(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_909b52d81c7f411bb361b89400cb66c5(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return idx def func_b0821209987843f2a4ac86f2b26d041d(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return p def func_fbf2eefbebc24823957d6de7fefe0933(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return l def func_71beba829061492082db93187a67f53b(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return n def func_ec271d1a0ed94738ae2cbadef36ef071(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) return f def func_dcfe90c969584e909e286a3c6342a330(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return l def func_69a00f03814e4d4db6ca0498e997fb18(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return p def func_2698fcf1462f46a79a9c4c4f3fa39c09(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return f def func_2b994cfde08848c6ba04bf8d0db18dd1(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return n def func_ae586fb49dfa430c8f2e33066070498b(f, n): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return idx def func_c40c57bdeff243a0bd08e0e62cf0ace4(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return n def func_fe7aae797ff4407da202a829b717d641(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return idx def func_4168139cbbba4a8aaa5e861d4c6e1909(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return f def func_3294af1ebd2b431bbadf23bf6c8c9ec9(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return l def func_9fd2e0939f364538abb16e2139baf9bd(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return p def func_4ae0e52b2b6247a3ab5d6e4105a6f3b7(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return _t def func_7e0d58620f0240d78074177178f27531(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_1ba18f86207b4a52bd34bb01a098fbf8(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_180fc8665cf34ebb964951983125ed44(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_172e9042ddfa47b899ddf04a65805a4c(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_a02fccb11c664d7aa214044184bc8613(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_5d4c595179e543958d8824f4c193f377(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_7ebe45197a4f402f97e60c466fadb0ca(l, n, p, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_cb479cb7bd224b42a2eaefe35d31fc25(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return l def func_ffe12f16789b4896affd0a951ab4170c(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return f def func_d77ce19309cb47508507a016df4a3dbb(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return n def func_5165c1531ea84003add0c7e64112cd5f(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return p def func_8fb112e1b2704a59b5c6d37e82659954(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp) return idx def func_f8b81336d4964c7db2fd94c3bf01b212(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return f def func_fec89a827ffb458eb39aad7cfe5342ee(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return n def func_8283d0391e874b63bc84e270c1bdfc29(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return _t def func_f5d39d0c08334371bd203f46813b85db(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return l def func_0bbdfd647bac4cf98545fc80a2baec47(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return p def func_b7945cde5fd147278a1af0e8ed7ee739(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return idx def func_902960d714e5456da9c0cf1009a5a648(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_a1621435f57b40498f633c7cb8ecab43(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_56dfc59aca1f4703926673bdc6ed7abf(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_c7c95c3456724096922c466472813271(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_8b512f0fe125478bbab5e448d1f7a93b(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_e8334c58eff14baaaee8dbd07ea52381(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_8a5dee05ef894109bfb578383d793801(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_5341a42b1f8249fd958d79ef95b292b3(l, f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return f def func_0f34f636d50543888226ae8bb47e2c44(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return n def func_66093292a3344133bea469b7315eedd2(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return idx def func_cc3fdd7fc3d54ca18cba35ca5634e37f(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return _t def func_7e1820e4f1af4139b1aafbd193e755ed(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return f def func_78350f7fbcd34ccd97811f6552334279(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return l def func_d30d7ecb5d7843419f677287d832c1b2(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) return p def func_6bfce8340b76408ba3fbbebf4ed60c4d(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_44db3e6d85aa4aa0bea269758fc1e235(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_3286ec290f424adaa09c339ba3d2063f(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_015dcf35780348d2a9a266e32b648c2c(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_05e15176604847979133fcb1a8fea6ca(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_c643e1f8da7f4a9b955c9c836574a610(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return f def func_15400335d4d249a3b5601898402feb03(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_124dc76f65de4170b0bcb2d6dd1656ae(f, n, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_13e27a6057fc4db38afe9fa8294dca0d(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_d77ab0db60f848bea206f4af0fd9df79(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return f def func_1209b5638d0249e5b359b86c964b49e9(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_d6d28988f5ef412983139f12a2391bb8(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_bc438553c9434d95b520e4f07241cac4(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_6be6dd8c6bfa4a2e8e86fa55e8db48cf(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_799ffc9a76014feca93153cf45492c82(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_2c4e0c5e3f8b4498b0c22ddec3fe8830(f, _t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split())(len(l) == n)(len(p) == n) idx = range(n) idx.sort(cmp=cmp)('Case #%d:' % (_t + 1)) for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_03ccfe1a45c14303aab26279e5a087d1(l, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) return f def func_3fcb23bfa97941f391deeca3206ef28a(l, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) return t def func_0f2f1d1999074a10888dc0f940ea3b5d(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_719998d060074ac3a0242ae24ac5cac4(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_20943c27564e4ec991d2e92df10faeaf(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_6a4204540a4245559d882722d8671f6f(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return t def func_eb412b3d1ba34742b28cf48ad3d63fb4(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_2cb80b317ea444c985d9b5b2e4713885(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return f def func_24368e21f9534b1bb3a1149d3226cb0c(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_30e13bb299264702991a726318fd0f71(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_659d7dfd42b4419d9565a8e101429fb2(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_5ad499a7e5084a27877e828d497b6514(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return p def func_c0842300a5494e5b9c5438eb523a9f00(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return _i def func_7df71f63bde04a6582e501df252f42ac(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return _t def func_d3853f59084640e3bf44c28e5288c050(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return l def func_332799381c4f4d61bf584ab145e8c878(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return n def func_6d7e267fb1f746debd5d52aec3f811e2(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return t def func_c2b5aae19bc346c7a8c62924b5140fe5(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return idx def func_f28d65dfcc8c45b49ea0c7e86c99703a(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return f def func_69368393ad4f479d80d75c1cbaa5b1ea(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return ix def func_f2f172c923e34a9f9c94d7de2d7e53e9(_i, l, ix, f, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix f.close() return ix def func_72b197b3adef47a9a89da790a6b8df3d(_i, l, ix, f, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix f.close() return f def func_b814cafa70e346d98a0eff8122d3d34c(_i, l, ix, f, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix f.close() return _i def func_7e1de85e9df0437a916cf259b1e84914(_i, l, ix, f, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix f.close() return l def func_439795d75ee245dfa263433c9be83aaf(_i, l, ix, f, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix f.close() return p def func_9d87efa77880484f9988813f211a3467(_i, l, ix, f, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix f.close() return n def func_07f99c1341434b3493e4f5d00bf1c55b(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_a8202435de414d64a65156c28c7c8347(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_6e183becd4b54e499b6e5e2bd0489e42(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return f def func_0dc5057bd0ee490ab58b44481d63ece5(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_2f0fb2f9f66f43868f3082d375fa0ec4(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_8d9af47573524d8ba199b9614459c2aa(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_e14806f99b09421db16a2ae0f73a3edc(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_c3b3cd68177443acad8d6d1f5187653b(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_91c679e6e35e45239577bb63b4e43a2d(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return t def func_75b8a4c968fc4471b0f5495a1a6b54d4(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return p def func_524d6dbab056473bb41647e973cd4da1(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return idx def func_8770e306a4544c1f828881334bb821d6(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return _t def func_4dafd8a8b7414070b7acc88170132096(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return l def func_72b93e27adfb49a5aec96024f453d95e(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return n def func_a3002c794d4247e6a03296cb8843bfc6(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return t def func_e4566d4ad3294c6c9812e728e295d27c(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return _i def func_1c14feee7f474d629e1626d35296d64c(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return f def func_1dd83b42af21402eae02974be8421214(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return ix def func_94a6288ba7be44d8ae7af5d7e7b7cd5d(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return t def func_48f07d6ded244a4586c06f7a83a3601c(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return l def func_53cc00a4807d4d91a0e43ed2ea06f820(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return p def func_81f0e9e87cb74c929b7f5367516d393d(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return ix def func_908ddd02fdea44e7a951c63cc2035678(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return idx def func_5c885276585a43d191c6c545b66924fc(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return _t def func_f96dd4ba043b44f4ae17c0301c1e9ce1(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return n def func_6204a68aaded4429955305f954e99a0a(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return f def func_82d3d843d78f488cb5bb0986633cac50(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return _i def func_3cf0adf9413a4e0289820f5ba5ed59c9(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return f def func_12b667d2b07f46788b95cf34df1e960d(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return _t def func_2d8bf803214c494c854153df4a090342(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return _i def func_6df2282e28c7454a90a392d744361ba6(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return idx def func_844800436b934eb486ff9fbb47c19c1b(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return l def func_645b924f56eb4335a602fe4de4d593e7(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return t def func_d889c4aa0d5543a7a46a7fbe32e9e98c(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return n def func_b4da8167ceff4df8a572e1c831d4f5f1(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return p def func_737622a22738460c93026f1008068b6b(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix return ix def func_1a4cde10fe9d4b06b10d714f837bdff2(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return _t def func_9890ed1c9cb24fec8554ba2cb9f25b1f(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return n def func_56e1a51faaab426083263f6c462f1220(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return _i def func_7b15e886fc9c4ffe809f94e91dbe72fe(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return idx def func_eec35fe0017440f3be64f9dc349c1b5d(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return t def func_01ba2346c3aa4e82b257646375217cff(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return ix def func_834776f47a0a434d8030755156983193(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return f def func_1999d52abc8a4467bc512bf6d89d5102(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return l def func_473d158e367547b79149699329d10eb8(f): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return p def func_b64a8b343f0c4a3bb08eea3133d9e128(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return idx def func_09e393aee66246b4966ad8db4d60947f(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return ix def func_042ccd2d0e444068b4b268c1cd194807(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return l def func_d6319031ba9d44bd8a057fe4deed201b(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return _t def func_b8d32ea8204743a4bd888914cfb46325(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return f def func_d35ee87bbd61450a9f1acd7a038d2382(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return t def func_077fddbeb1084e9d8f2daf07bbd65cc8(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return p def func_841ff7fc6de84595807ba5b10f55065b(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return n def func_24e15b3c93d54c36bab8ba719d563fbd(): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 f = open('codejam/test_files/Y12R5P1/A.in') t = int(f.readline()) for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix if _i != n - 1: print ix, else: print ix f.close() return _i def func_19e1161b36284337bea05d4cb0abef5a(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return l def func_c214b178a8f84449ac41899ce936df6c(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return n def func_baeeb6ebcbec4be18b25fd7db8d61c27(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return t def func_7d8282287db34f42bd67f0b0465d56ee(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return f def func_23d192593ba84dd9a921805d7fe02d9b(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return p def func_a0c45844a960429fa35ab850d9591bf8(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _i def func_fed6d7e19a14429e9b812236d9d6aac3(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return _t def func_175c68b9ab914dcb8518565f5905ebf5(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return idx def func_8e163476f03c4f40aeca16c53ef5f418(f, t): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 for _t in xrange(t): n = int(f.readline()) l = map(int, f.readline().split()) p = map(int, f.readline().split()) assert len(l) == n assert len(p) == n idx = range(n) idx.sort(cmp=cmp) print 'Case #%d:' % (_t + 1), for _i, ix in enumerate(idx): if _i != n - 1: print ix, else: print ix return ix def func_964d2743bb444b28af4c8dcd6c2dbe85(_i, l, ix, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix return _i def func_8a3f9e2ca6604f13929e2cabd50097e1(_i, l, ix, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix return p def func_cc3a06cf130f40a89dd443170c7e42fa(_i, l, ix, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix return n def func_d636e107dc9240bc80002d88b19e6d14(_i, l, ix, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix return ix def func_8bd399474fe84f1588c7707209b60caf(_i, l, ix, n, p): def cmp(idx1, idx2): if p[idx1] * l[idx2] > p[idx2] * l[idx1]: return -1 if p[idx1] * l[idx2] < p[idx2] * l[idx1]: return 1 return idx1 - idx2 if _i != n - 1: print ix, else: print ix return l
26.218346
86
0.478965
19,899
139,770
3.31092
0.016735
0.045079
0.05918
0.067634
0.862486
0.862486
0.862486
0.862486
0.862486
0.862
0
0.11283
0.36437
139,770
5,330
87
26.223265
0.628757
0
0
0.937278
0
0
0.018309
0.006911
0
0
0
0
0.036032
0
null
null
0
0.000445
null
null
0.109208
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
0
0
0
8
824181423809e06d738018b26f0645d03cb19e25
49
py
Python
examples/dwf/__init__.py
useblocks/dwf
debfb79cecfa57310627c78c4e5c68e21f7c7b6f
[ "CC-BY-4.0" ]
6
2017-11-24T08:47:06.000Z
2021-06-25T12:02:06.000Z
examples/dwf/__init__.py
useblocks/dwf
debfb79cecfa57310627c78c4e5c68e21f7c7b6f
[ "CC-BY-4.0" ]
null
null
null
examples/dwf/__init__.py
useblocks/dwf
debfb79cecfa57310627c78c4e5c68e21f7c7b6f
[ "CC-BY-4.0" ]
null
null
null
from .dwf import Dwf from .dwf import Frustration
24.5
28
0.816327
8
49
5
0.5
0.35
0.65
0
0
0
0
0
0
0
0
0
0.142857
49
2
28
24.5
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
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
8
4132dfcbc794091a46363f841d03fa3fc7757762
161
py
Python
sdc/tests/tests_perf/__init__.py
sklam/sdc
36340f991c9354e626dea6d3511f3f81d09448aa
[ "BSD-2-Clause" ]
null
null
null
sdc/tests/tests_perf/__init__.py
sklam/sdc
36340f991c9354e626dea6d3511f3f81d09448aa
[ "BSD-2-Clause" ]
null
null
null
sdc/tests/tests_perf/__init__.py
sklam/sdc
36340f991c9354e626dea6d3511f3f81d09448aa
[ "BSD-2-Clause" ]
null
null
null
from sdc.tests.tests_perf.test_perf_unicode import * from sdc.tests.tests_perf.test_perf_series_str import * from sdc.tests.tests_perf.test_perf_series import *
40.25
55
0.850932
28
161
4.535714
0.321429
0.165354
0.283465
0.401575
0.874016
0.874016
0.874016
0.645669
0.645669
0
0
0
0.074534
161
3
56
53.666667
0.852349
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
1
1
1
1
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
10
68e41ba2012a9dfd36b15c1f2fe78a29438f38b5
165
py
Python
pwnlib/encoders/i386/__init__.py
tkmikan/pwntools
1238fc359eb72313d3f82849b2effdb7063ab429
[ "MIT" ]
8,966
2015-01-02T11:58:14.000Z
2022-03-31T21:19:56.000Z
pwnlib/encoders/i386/__init__.py
tkmikan/pwntools
1238fc359eb72313d3f82849b2effdb7063ab429
[ "MIT" ]
1,401
2015-01-01T00:56:22.000Z
2022-03-31T16:19:53.000Z
pwnlib/encoders/i386/__init__.py
tkmikan/pwntools
1238fc359eb72313d3f82849b2effdb7063ab429
[ "MIT" ]
1,844
2015-01-07T04:38:06.000Z
2022-03-30T03:54:46.000Z
from __future__ import absolute_import from pwnlib.encoders.i386 import ascii_shellcode from pwnlib.encoders.i386 import delta from pwnlib.encoders.i386 import xor
27.5
48
0.860606
24
165
5.666667
0.458333
0.220588
0.397059
0.485294
0.617647
0
0
0
0
0
0
0.060811
0.10303
165
5
49
33
0.858108
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
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
6b99d703117c125b67ee7ab24c0fbe5e8ffa533a
11,992
py
Python
tw_cooking_game_puzzle/role_master_builder.py
tatsubori/visual-hints-textworld-rl
a2b4818f46bed10d08f1a0747ac548e6419f0b46
[ "Apache-2.0" ]
4
2020-10-09T16:21:48.000Z
2021-01-06T17:41:04.000Z
tw_cooking_game_puzzle/role_master_builder.py
tatsubori/visual-hints-textworld-rl
a2b4818f46bed10d08f1a0747ac548e6419f0b46
[ "Apache-2.0" ]
1
2022-02-26T03:29:39.000Z
2022-02-26T03:29:39.000Z
tw_cooking_game_puzzle/role_master_builder.py
tatsubori/visual-hints-textworld-rl
a2b4818f46bed10d08f1a0747ac548e6419f0b46
[ "Apache-2.0" ]
4
2020-10-20T05:17:02.000Z
2022-02-26T03:29:27.000Z
def write_clue(name_file, way, rooms_dict: dict, dict_game_goals: dict, dict_rooms_numbers: dict, death_room: str, name_type=["literal", 'random_numbers', 'room_importance']): ''' write a txt file for that will be used by the game master class :param death_room: if there is a death_room :param name_file: the name of the file :param way: a table that gives the way between the cooking place and the room where is the hint :param rooms_dict:dictionary of the rooms see 'def build_dict_rooms' in cooking_map_builder :param dict_game_goals: a dictionary with the main goals and place of important elements for the game see( def build_dict_game_goals) in cooking_map_builder :param dict_rooms_numbers: a dictionary with the number of each room in the mode 'random_numbers' see( def draw_map) in cooking_map_builder :param name_type: three possibilities 'literal' : the true name of the room (eg. kitchen, bedroom) 'random_numbers': a random number is attributed to each room 'room_importance': each room receive a number based on the importance of the room see( def draw_map) in cooking_map_builder :return: ''' list_rooms_s_goals = [] if 'secondary_goals' in dict_game_goals: for sgoal in iter(dict_game_goals['secondary_goals']): if dict_game_goals['secondary_goals'][sgoal] not in list_rooms_s_goals: list_rooms_s_goals.append(dict_game_goals['secondary_goals'][sgoal]) f = open(name_file, "w+") f.write('####clue####\r\n') if name_type == 'literal': f.write('\r \n') f.write('easy:\r') clue = 'you are in the {}, take the ingredients in '.format(way[-1]) if len(list_rooms_s_goals) == 0: clue += 'inventory,' else: list_rooms =[] for sgoal in iter(dict_game_goals['secondary_goals']): if dict_game_goals['secondary_goals'][sgoal] not in list_rooms: clue = clue + 'the {}, '.format(dict_game_goals['secondary_goals'][sgoal]) list_rooms.append(dict_game_goals['secondary_goals'][sgoal]) clue = clue + 'and cook in the {}, '.format(dict_game_goals['cooking_location']) if death_room is not None: clue = clue + 'and avoid the death room which is the {}'.format(death_room) clue = clue+'\r\n' f.write(clue) f.write('\r \n') f.write('medium:\r') clue = 'take the ingredients in ' if len(list_rooms_s_goals) == 0: clue += 'inventory,' else: list_rooms = [] for sgoal in iter(dict_game_goals['secondary_goals']): if dict_game_goals['secondary_goals'][sgoal] not in list_rooms: clue = clue + 'the {}, '.format(dict_game_goals['secondary_goals'][sgoal]) list_rooms.append(dict_game_goals['secondary_goals'][sgoal]) clue = clue + 'and cook in the {}, '.format(dict_game_goals['cooking_location']) if death_room is not None: clue = clue + 'and avoid the death room which is the {}'.format(death_room) clue = clue + '\r\n' f.write(clue) f.write('\r \n') f.write('hard:\r') clue = 'take the ingredients in ' if len(list_rooms_s_goals) == 0: clue += 'inventory,' else: list_rooms = [] for sgoal in iter(dict_game_goals['secondary_goals']): if dict_game_goals['secondary_goals'][sgoal] not in list_rooms: clue = clue + 'the {}, '.format(dict_game_goals['secondary_goals'][sgoal]) list_rooms.append(dict_game_goals['secondary_goals'][sgoal]) clue = clue + 'and cook in the {}'.format(dict_game_goals['cooking_location']) if len(rooms_dict) != 1: clue = clue +', note that ' uninteresting_place = False for k in rooms_dict: if k not in list_rooms_s_goals and k != dict_game_goals['cooking_location']: clue = clue + 'the {}, '.format(k) uninteresting_place = True if uninteresting_place: clue = clue[:-2] + ' are uninteresting places' clue = clue + '\r\n' f.write(clue) f.write('\r \n') f.write('very hard:\r') clue = '' if len(rooms_dict) != 1: uninteresting_place = False for k in rooms_dict: if k not in list_rooms_s_goals and k != dict_game_goals['cooking_location']: clue = clue + 'the {}, '.format(k) uninteresting_place = True if uninteresting_place: clue = clue[:-2] + ' are uninteresting places' else: clue = clue + 'there is only one room' clue = clue + '\r\n' f.write(clue) f.write('\n') if name_type == 'random_numbers': f.write('\n') f.write('easy:\r') clue = 'you are in the room {}, take the ingredients in '.format(dict_rooms_numbers[way[-1]]) if len(list_rooms_s_goals) == 0: clue += 'I,' else: list_rooms = [] for sgoal in iter(dict_game_goals['secondary_goals']): if dict_game_goals['secondary_goals'][sgoal] not in list_rooms: clue = clue + 'the room {}, '.format(dict_rooms_numbers[dict_game_goals['secondary_goals'][sgoal]]) list_rooms.append(dict_game_goals['secondary_goals'][sgoal]) clue = clue + 'and cook in the room {}, '.format(dict_rooms_numbers[dict_game_goals['cooking_location']]) if death_room is not None: clue = clue + 'and avoid the death room which is the {}'.format(dict_rooms_numbers[death_room]) clue = clue + '\r\n' f.write(clue) f.write('\r \n') f.write('medium:\r') clue = 'take the ingredients in ' if len(list_rooms_s_goals) == 0: clue += 'inventory,' else: list_rooms = [] for sgoal in iter(dict_game_goals['secondary_goals']): if dict_game_goals['secondary_goals'][sgoal] not in list_rooms: clue = clue + 'the room {}, '.format(dict_rooms_numbers[dict_game_goals['secondary_goals'][sgoal]]) list_rooms.append(dict_game_goals['secondary_goals'][sgoal]) clue = clue + 'and cook in the room {}, '.format(dict_rooms_numbers[dict_game_goals['cooking_location']]) if death_room is not None: clue = clue + 'and avoid the death room which is the {}'.format(dict_rooms_numbers[death_room]) clue = clue + '\r\n' f.write(clue) f.write('\r \n') f.write('hard:\r') clue = 'take the ingredients in ' if len(list_rooms_s_goals) == 0: clue += 'inventory,' else: list_rooms = [] for sgoal in iter(dict_game_goals['secondary_goals']): if dict_game_goals['secondary_goals'][sgoal] not in list_rooms: clue = clue + 'the room {}, '.format(dict_rooms_numbers[dict_game_goals['secondary_goals'][sgoal]]) list_rooms.append(dict_game_goals['secondary_goals'][sgoal]) clue = clue + 'and cook in the room {}'.format(dict_rooms_numbers[dict_game_goals['cooking_location']]) if len(rooms_dict) != 1: clue = clue + ', note that ' uninteresting_place = False for k in rooms_dict: if k not in list_rooms_s_goals and k != dict_game_goals['cooking_location']: clue = clue + 'the room {}, '.format(dict_rooms_numbers[k]) uninteresting_place = True if uninteresting_place: clue = clue[:-2] + ' are uninteresting places' clue = clue + '\r\n' f.write(clue) f.write('\r \n') f.write('very hard:\r') clue = '' if len(rooms_dict) != 1: uninteresting_place = False for k in rooms_dict: if k not in list_rooms_s_goals and k != dict_game_goals['cooking_location']: clue = clue + 'the room {}, '.format(dict_rooms_numbers[k]) uninteresting_place = True if uninteresting_place: clue = clue[:-2] + ' are uninteresting places' else: clue = clue + 'there is only one room' clue = clue + '\r\n' f.write(clue) f.write('\n') if name_type == 'room_importance': f.write('\n') f.write('easy:\r') clue = 'Go in rooms with a 2, finish by the room with 1' if death_room is not None: clue += ', avoid room -1' f.write(clue) f.write('\r \n') f.write('medium:\r') clue = 'rooms with 0 have no interest; room with 1 is the place of the main quest; rooms with 2 are the ' \ 'places for secondary quest' if death_room is not None: clue += ' and avoid room with -1 which is the death room' f.write(clue) f.write('\r \n') f.write('hard:\r') clue = 'Go in rooms with a 2 finish by the room with 1' f.write(clue) f.write('\r \n') f.write('very hard:\r') clue = 'rooms with a 2 are less important than room with 1 and rooms with 0 have no importance' f.write(clue) f.write('\r \n') f.write('####end clue###\r') rooms_leading_to_death_room = dict() if death_room is not None: f.write('\r \n') f.write('####death room###\r') for i in range(4): if rooms_dict[death_room][i] is not None: if i == 0: rooms_leading_to_death_room['south'] = rooms_dict[death_room][i] elif i == 1: rooms_leading_to_death_room['north'] = rooms_dict[death_room][i] elif i == 2: rooms_leading_to_death_room['west'] = rooms_dict[death_room][i] else: rooms_leading_to_death_room['east'] = rooms_dict[death_room][i] f.write('\n') f.write('easy:\r') clue = 'the {} is the death room,'.format(death_room) for k in iter(rooms_leading_to_death_room): clue = clue + 'the {} go to death room by {}'.format(rooms_leading_to_death_room[k], k) + ' ' f.write(clue) f.write('\r \n') f.write('medium:\r') clue = '' for k in iter(rooms_leading_to_death_room): clue = clue + 'the {} go to death room by {}'.format(rooms_leading_to_death_room[k], k) + ' ' f.write(clue) f.write('\r \n') f.write('hard:\r') clue = '' for k in iter(rooms_leading_to_death_room): clue = clue + 'avoid the {} of {}'.format(k, rooms_leading_to_death_room[k]) + ' ' f.write(clue) f.write('\r \n') f.write('very hard:\r') clue = 'from the death room there is ' for i in range(4): if rooms_dict[death_room][i] is not None: if i == 0: clue = clue + 'the {} on the {},'.format(rooms_dict[death_room][i], 'north') elif i == 1: clue = clue + 'the {} on the {},'.format(rooms_dict[death_room][i], 'south') elif i == 2: clue = clue + 'the {} on the {},'.format(rooms_dict[death_room][i], 'east') else: clue = clue + 'the {} on the {},'.format(rooms_dict[death_room][i], 'west') f.write(clue) f.write('\r \n') f.write('####end death room###\r') f.close() return rooms_leading_to_death_room
42.828571
123
0.555787
1,599
11,992
3.957473
0.079425
0.054046
0.084229
0.093869
0.80689
0.765013
0.745101
0.723925
0.7067
0.7067
0
0.004437
0.323466
11,992
280
124
42.828571
0.775545
0.089143
0
0.823789
0
0.004405
0.220636
0
0
0
0
0
0
1
0.004405
false
0
0.013216
0
0.022026
0
0
0
0
null
0
0
0
1
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
7
6bcb586e65df2929d0fc8133657e15df23acc2de
135
py
Python
week4/runserver.py
adityatripathiiit/Python-Based-Automated-Verilog-Code-Generator-For-Arithmetic-Unit
a4ac003a842dc0f6c48d2e302c1cac218377f31d
[ "Apache-2.0" ]
1
2021-10-01T14:43:44.000Z
2021-10-01T14:43:44.000Z
week4/runserver.py
adityatripathiiit/Python-Based-Automated-Verilog-Code-Generator-For-Arithmetic-Unit
a4ac003a842dc0f6c48d2e302c1cac218377f31d
[ "Apache-2.0" ]
null
null
null
week4/runserver.py
adityatripathiiit/Python-Based-Automated-Verilog-Code-Generator-For-Arithmetic-Unit
a4ac003a842dc0f6c48d2e302c1cac218377f31d
[ "Apache-2.0" ]
3
2019-11-14T14:48:50.000Z
2021-12-07T13:51:24.000Z
import os os.system('cd "C:\Studies\projects\digital systems\ES_203\week4\week4\week3\django_project" & python manage.py runserver')
45
123
0.785185
21
135
4.952381
0.904762
0
0
0
0
0
0
0
0
0
0
0.048387
0.081481
135
2
124
67.5
0.790323
0
0
0
0
0.5
0.819549
0.571429
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
6bcc20a95ac74d2a7da4d5b35c5f0e0c9f79d9a1
2,160
py
Python
tests/functions/magnetization/test_total_magnetization.py
jdalzatec/llg
c0acd728d29a9a821ebadc4f1e17e0327d7e238c
[ "MIT" ]
4
2019-09-02T19:18:55.000Z
2021-05-05T15:04:54.000Z
tests/functions/magnetization/test_total_magnetization.py
lufvelasquezgo/llg
c0acd728d29a9a821ebadc4f1e17e0327d7e238c
[ "MIT" ]
116
2020-02-09T05:19:52.000Z
2022-03-27T18:47:17.000Z
tests/functions/magnetization/test_total_magnetization.py
lufvelasquezgo/llg
c0acd728d29a9a821ebadc4f1e17e0327d7e238c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `ffortran/functions` package.""" import numpy import pytest from llg.functions import magnetization @pytest.mark.repeat(10) def test_total_magnetization_random_state(num_sites, random_state): assert numpy.allclose( magnetization.total_magnetization(random_state), numpy.linalg.norm(numpy.sum(random_state, axis=0) / num_sites), ) def test_total_magnetization_FM_state_x_up(num_sites): state = numpy.array([[1.0, 0.0, 0.0]] * num_sites) assert numpy.allclose(magnetization.total_magnetization(state), 1.0) def test_total_magnetization_FM_state_x_down(num_sites): state = numpy.array([[-1.0, 0.0, 0.0]] * num_sites) assert numpy.allclose(magnetization.total_magnetization(state), 1.0) def test_total_magnetization_FM_state_y_up(num_sites): state = numpy.array([[0.0, 1.0, 0.0]] * num_sites) assert numpy.allclose(magnetization.total_magnetization(state), 1.0) def test_total_magnetization_FM_state_y_down(num_sites): state = numpy.array([[0.0, -1.0, 0.0]] * num_sites) assert numpy.allclose(magnetization.total_magnetization(state), 1.0) def test_total_magnetization_FM_state_z_up(num_sites): state = numpy.array([[0.0, 0.0, 1.0]] * num_sites) assert numpy.allclose(magnetization.total_magnetization(state), 1.0) def test_total_magnetization_FM_state_z_down(num_sites): state = numpy.array([[0.0, 0.0, -1.0]] * num_sites) assert numpy.allclose(magnetization.total_magnetization(state), 1.0) def test_total_magnetization_AFM_state_x(num_sites): state = numpy.array([[1.0, 0.0, 0.0], [-1.0, 0.0, 0.0]] * (num_sites // 2)) assert numpy.allclose(magnetization.total_magnetization(state), 0.0) def test_total_magnetization_AFM_state_y(num_sites): state = numpy.array([[0.0, 1.0, 0.0], [0.0, -1.0, 0.0]] * (num_sites // 2)) assert numpy.allclose(magnetization.total_magnetization(state), 0.0) def test_total_magnetization_AFM_state_z(num_sites): state = numpy.array([[0.0, 0.0, 1.0], [0.0, 0.0, -1.0]] * (num_sites // 2)) assert numpy.allclose(magnetization.total_magnetization(state), 0.0)
34.83871
79
0.726389
342
2,160
4.330409
0.131579
0.06077
0.054693
0.040513
0.83187
0.83187
0.794058
0.765699
0.757596
0.757596
0
0.051377
0.125926
2,160
61
80
35.409836
0.733051
0.037963
0
0.25
0
0
0
0
0
0
0
0
0.277778
1
0.277778
false
0
0.083333
0
0.361111
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
1
0
0
0
0
0
0
0
7
6bcfb6a89694b3ebc7672d0d12c4cf84f7eef94e
72,441
py
Python
sdk/python/pulumi_aws/memorydb/cluster.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/memorydb/cluster.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/memorydb/cluster.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = ['ClusterArgs', 'Cluster'] @pulumi.input_type class ClusterArgs: def __init__(__self__, *, acl_name: pulumi.Input[str], node_type: pulumi.Input[str], auto_minor_version_upgrade: Optional[pulumi.Input[bool]] = None, description: Optional[pulumi.Input[str]] = None, engine_version: Optional[pulumi.Input[str]] = None, final_snapshot_name: Optional[pulumi.Input[str]] = None, kms_key_arn: Optional[pulumi.Input[str]] = None, maintenance_window: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, name_prefix: Optional[pulumi.Input[str]] = None, num_replicas_per_shard: Optional[pulumi.Input[int]] = None, num_shards: Optional[pulumi.Input[int]] = None, parameter_group_name: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, snapshot_arns: Optional[pulumi.Input[str]] = None, snapshot_name: Optional[pulumi.Input[str]] = None, snapshot_retention_limit: Optional[pulumi.Input[int]] = None, snapshot_window: Optional[pulumi.Input[str]] = None, sns_topic_arn: Optional[pulumi.Input[str]] = None, subnet_group_name: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tls_enabled: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a Cluster resource. :param pulumi.Input[str] acl_name: The name of the Access Control List to associate with the cluster. :param pulumi.Input[str] node_type: The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). :param pulumi.Input[bool] auto_minor_version_upgrade: When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`. :param pulumi.Input[str] engine_version: Version number of the Redis engine to be used for the cluster. Downgrades are not supported. :param pulumi.Input[str] final_snapshot_name: Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. :param pulumi.Input[str] kms_key_arn: ARN of the KMS key used to encrypt the cluster at rest. :param pulumi.Input[str] maintenance_window: Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`. :param pulumi.Input[str] name: Name of this node. * `endpoint` :param pulumi.Input[str] name_prefix: Creates a unique name beginning with the specified prefix. Conflicts with `name`. :param pulumi.Input[int] num_replicas_per_shard: The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard). :param pulumi.Input[int] num_shards: The number of shards in the cluster. Defaults to `1`. :param pulumi.Input[str] parameter_group_name: The name of the parameter group associated with the cluster. :param pulumi.Input[int] port: The port number on which each of the nodes accepts connections. Defaults to `6379`. :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: Set of VPC Security Group ID-s to associate with this cluster. :param pulumi.Input[str] snapshot_arns: List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. :param pulumi.Input[str] snapshot_name: The name of a snapshot from which to restore data into the new cluster. :param pulumi.Input[int] snapshot_retention_limit: The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`. :param pulumi.Input[str] snapshot_window: The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`. :param pulumi.Input[str] sns_topic_arn: ARN of the SNS topic to which cluster notifications are sent. :param pulumi.Input[str] subnet_group_name: The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block). :param pulumi.Input[bool] tls_enabled: A flag to enable in-transit encryption on the cluster. When set to `false`, the `acl_name` must be `open-access`. Defaults to `true`. """ pulumi.set(__self__, "acl_name", acl_name) pulumi.set(__self__, "node_type", node_type) if auto_minor_version_upgrade is not None: pulumi.set(__self__, "auto_minor_version_upgrade", auto_minor_version_upgrade) if description is not None: pulumi.set(__self__, "description", description) if engine_version is not None: pulumi.set(__self__, "engine_version", engine_version) if final_snapshot_name is not None: pulumi.set(__self__, "final_snapshot_name", final_snapshot_name) if kms_key_arn is not None: pulumi.set(__self__, "kms_key_arn", kms_key_arn) if maintenance_window is not None: pulumi.set(__self__, "maintenance_window", maintenance_window) if name is not None: pulumi.set(__self__, "name", name) if name_prefix is not None: pulumi.set(__self__, "name_prefix", name_prefix) if num_replicas_per_shard is not None: pulumi.set(__self__, "num_replicas_per_shard", num_replicas_per_shard) if num_shards is not None: pulumi.set(__self__, "num_shards", num_shards) if parameter_group_name is not None: pulumi.set(__self__, "parameter_group_name", parameter_group_name) if port is not None: pulumi.set(__self__, "port", port) if security_group_ids is not None: pulumi.set(__self__, "security_group_ids", security_group_ids) if snapshot_arns is not None: pulumi.set(__self__, "snapshot_arns", snapshot_arns) if snapshot_name is not None: pulumi.set(__self__, "snapshot_name", snapshot_name) if snapshot_retention_limit is not None: pulumi.set(__self__, "snapshot_retention_limit", snapshot_retention_limit) if snapshot_window is not None: pulumi.set(__self__, "snapshot_window", snapshot_window) if sns_topic_arn is not None: pulumi.set(__self__, "sns_topic_arn", sns_topic_arn) if subnet_group_name is not None: pulumi.set(__self__, "subnet_group_name", subnet_group_name) if tags is not None: pulumi.set(__self__, "tags", tags) if tags_all is not None: pulumi.set(__self__, "tags_all", tags_all) if tls_enabled is not None: pulumi.set(__self__, "tls_enabled", tls_enabled) @property @pulumi.getter(name="aclName") def acl_name(self) -> pulumi.Input[str]: """ The name of the Access Control List to associate with the cluster. """ return pulumi.get(self, "acl_name") @acl_name.setter def acl_name(self, value: pulumi.Input[str]): pulumi.set(self, "acl_name", value) @property @pulumi.getter(name="nodeType") def node_type(self) -> pulumi.Input[str]: """ The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). """ return pulumi.get(self, "node_type") @node_type.setter def node_type(self, value: pulumi.Input[str]): pulumi.set(self, "node_type", value) @property @pulumi.getter(name="autoMinorVersionUpgrade") def auto_minor_version_upgrade(self) -> Optional[pulumi.Input[bool]]: """ When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`. """ return pulumi.get(self, "auto_minor_version_upgrade") @auto_minor_version_upgrade.setter def auto_minor_version_upgrade(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "auto_minor_version_upgrade", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter(name="engineVersion") def engine_version(self) -> Optional[pulumi.Input[str]]: """ Version number of the Redis engine to be used for the cluster. Downgrades are not supported. """ return pulumi.get(self, "engine_version") @engine_version.setter def engine_version(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "engine_version", value) @property @pulumi.getter(name="finalSnapshotName") def final_snapshot_name(self) -> Optional[pulumi.Input[str]]: """ Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. """ return pulumi.get(self, "final_snapshot_name") @final_snapshot_name.setter def final_snapshot_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "final_snapshot_name", value) @property @pulumi.getter(name="kmsKeyArn") def kms_key_arn(self) -> Optional[pulumi.Input[str]]: """ ARN of the KMS key used to encrypt the cluster at rest. """ return pulumi.get(self, "kms_key_arn") @kms_key_arn.setter def kms_key_arn(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "kms_key_arn", value) @property @pulumi.getter(name="maintenanceWindow") def maintenance_window(self) -> Optional[pulumi.Input[str]]: """ Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`. """ return pulumi.get(self, "maintenance_window") @maintenance_window.setter def maintenance_window(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "maintenance_window", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ Name of this node. * `endpoint` """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="namePrefix") def name_prefix(self) -> Optional[pulumi.Input[str]]: """ Creates a unique name beginning with the specified prefix. Conflicts with `name`. """ return pulumi.get(self, "name_prefix") @name_prefix.setter def name_prefix(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name_prefix", value) @property @pulumi.getter(name="numReplicasPerShard") def num_replicas_per_shard(self) -> Optional[pulumi.Input[int]]: """ The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard). """ return pulumi.get(self, "num_replicas_per_shard") @num_replicas_per_shard.setter def num_replicas_per_shard(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "num_replicas_per_shard", value) @property @pulumi.getter(name="numShards") def num_shards(self) -> Optional[pulumi.Input[int]]: """ The number of shards in the cluster. Defaults to `1`. """ return pulumi.get(self, "num_shards") @num_shards.setter def num_shards(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "num_shards", value) @property @pulumi.getter(name="parameterGroupName") def parameter_group_name(self) -> Optional[pulumi.Input[str]]: """ The name of the parameter group associated with the cluster. """ return pulumi.get(self, "parameter_group_name") @parameter_group_name.setter def parameter_group_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "parameter_group_name", value) @property @pulumi.getter def port(self) -> Optional[pulumi.Input[int]]: """ The port number on which each of the nodes accepts connections. Defaults to `6379`. """ return pulumi.get(self, "port") @port.setter def port(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "port", value) @property @pulumi.getter(name="securityGroupIds") def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ Set of VPC Security Group ID-s to associate with this cluster. """ return pulumi.get(self, "security_group_ids") @security_group_ids.setter def security_group_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "security_group_ids", value) @property @pulumi.getter(name="snapshotArns") def snapshot_arns(self) -> Optional[pulumi.Input[str]]: """ List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. """ return pulumi.get(self, "snapshot_arns") @snapshot_arns.setter def snapshot_arns(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "snapshot_arns", value) @property @pulumi.getter(name="snapshotName") def snapshot_name(self) -> Optional[pulumi.Input[str]]: """ The name of a snapshot from which to restore data into the new cluster. """ return pulumi.get(self, "snapshot_name") @snapshot_name.setter def snapshot_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "snapshot_name", value) @property @pulumi.getter(name="snapshotRetentionLimit") def snapshot_retention_limit(self) -> Optional[pulumi.Input[int]]: """ The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`. """ return pulumi.get(self, "snapshot_retention_limit") @snapshot_retention_limit.setter def snapshot_retention_limit(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "snapshot_retention_limit", value) @property @pulumi.getter(name="snapshotWindow") def snapshot_window(self) -> Optional[pulumi.Input[str]]: """ The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`. """ return pulumi.get(self, "snapshot_window") @snapshot_window.setter def snapshot_window(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "snapshot_window", value) @property @pulumi.getter(name="snsTopicArn") def sns_topic_arn(self) -> Optional[pulumi.Input[str]]: """ ARN of the SNS topic to which cluster notifications are sent. """ return pulumi.get(self, "sns_topic_arn") @sns_topic_arn.setter def sns_topic_arn(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "sns_topic_arn", value) @property @pulumi.getter(name="subnetGroupName") def subnet_group_name(self) -> Optional[pulumi.Input[str]]: """ The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. """ return pulumi.get(self, "subnet_group_name") @subnet_group_name.setter def subnet_group_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "subnet_group_name", value) @property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. """ return pulumi.get(self, "tags") @tags.setter def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "tags", value) @property @pulumi.getter(name="tagsAll") def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block). """ return pulumi.get(self, "tags_all") @tags_all.setter def tags_all(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "tags_all", value) @property @pulumi.getter(name="tlsEnabled") def tls_enabled(self) -> Optional[pulumi.Input[bool]]: """ A flag to enable in-transit encryption on the cluster. When set to `false`, the `acl_name` must be `open-access`. Defaults to `true`. """ return pulumi.get(self, "tls_enabled") @tls_enabled.setter def tls_enabled(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "tls_enabled", value) @pulumi.input_type class _ClusterState: def __init__(__self__, *, acl_name: Optional[pulumi.Input[str]] = None, arn: Optional[pulumi.Input[str]] = None, auto_minor_version_upgrade: Optional[pulumi.Input[bool]] = None, cluster_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterClusterEndpointArgs']]]] = None, description: Optional[pulumi.Input[str]] = None, engine_patch_version: Optional[pulumi.Input[str]] = None, engine_version: Optional[pulumi.Input[str]] = None, final_snapshot_name: Optional[pulumi.Input[str]] = None, kms_key_arn: Optional[pulumi.Input[str]] = None, maintenance_window: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, name_prefix: Optional[pulumi.Input[str]] = None, node_type: Optional[pulumi.Input[str]] = None, num_replicas_per_shard: Optional[pulumi.Input[int]] = None, num_shards: Optional[pulumi.Input[int]] = None, parameter_group_name: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, shards: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterShardArgs']]]] = None, snapshot_arns: Optional[pulumi.Input[str]] = None, snapshot_name: Optional[pulumi.Input[str]] = None, snapshot_retention_limit: Optional[pulumi.Input[int]] = None, snapshot_window: Optional[pulumi.Input[str]] = None, sns_topic_arn: Optional[pulumi.Input[str]] = None, subnet_group_name: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tls_enabled: Optional[pulumi.Input[bool]] = None): """ Input properties used for looking up and filtering Cluster resources. :param pulumi.Input[str] acl_name: The name of the Access Control List to associate with the cluster. :param pulumi.Input[str] arn: The ARN of the cluster. * `cluster_endpoint` :param pulumi.Input[bool] auto_minor_version_upgrade: When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`. :param pulumi.Input[str] engine_patch_version: Patch version number of the Redis engine used by the cluster. :param pulumi.Input[str] engine_version: Version number of the Redis engine to be used for the cluster. Downgrades are not supported. :param pulumi.Input[str] final_snapshot_name: Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. :param pulumi.Input[str] kms_key_arn: ARN of the KMS key used to encrypt the cluster at rest. :param pulumi.Input[str] maintenance_window: Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`. :param pulumi.Input[str] name: Name of this node. * `endpoint` :param pulumi.Input[str] name_prefix: Creates a unique name beginning with the specified prefix. Conflicts with `name`. :param pulumi.Input[str] node_type: The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). :param pulumi.Input[int] num_replicas_per_shard: The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard). :param pulumi.Input[int] num_shards: The number of shards in the cluster. Defaults to `1`. :param pulumi.Input[str] parameter_group_name: The name of the parameter group associated with the cluster. :param pulumi.Input[int] port: The port number on which each of the nodes accepts connections. Defaults to `6379`. :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: Set of VPC Security Group ID-s to associate with this cluster. :param pulumi.Input[Sequence[pulumi.Input['ClusterShardArgs']]] shards: Set of shards in this cluster. :param pulumi.Input[str] snapshot_arns: List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. :param pulumi.Input[str] snapshot_name: The name of a snapshot from which to restore data into the new cluster. :param pulumi.Input[int] snapshot_retention_limit: The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`. :param pulumi.Input[str] snapshot_window: The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`. :param pulumi.Input[str] sns_topic_arn: ARN of the SNS topic to which cluster notifications are sent. :param pulumi.Input[str] subnet_group_name: The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block). :param pulumi.Input[bool] tls_enabled: A flag to enable in-transit encryption on the cluster. When set to `false`, the `acl_name` must be `open-access`. Defaults to `true`. """ if acl_name is not None: pulumi.set(__self__, "acl_name", acl_name) if arn is not None: pulumi.set(__self__, "arn", arn) if auto_minor_version_upgrade is not None: pulumi.set(__self__, "auto_minor_version_upgrade", auto_minor_version_upgrade) if cluster_endpoints is not None: pulumi.set(__self__, "cluster_endpoints", cluster_endpoints) if description is not None: pulumi.set(__self__, "description", description) if engine_patch_version is not None: pulumi.set(__self__, "engine_patch_version", engine_patch_version) if engine_version is not None: pulumi.set(__self__, "engine_version", engine_version) if final_snapshot_name is not None: pulumi.set(__self__, "final_snapshot_name", final_snapshot_name) if kms_key_arn is not None: pulumi.set(__self__, "kms_key_arn", kms_key_arn) if maintenance_window is not None: pulumi.set(__self__, "maintenance_window", maintenance_window) if name is not None: pulumi.set(__self__, "name", name) if name_prefix is not None: pulumi.set(__self__, "name_prefix", name_prefix) if node_type is not None: pulumi.set(__self__, "node_type", node_type) if num_replicas_per_shard is not None: pulumi.set(__self__, "num_replicas_per_shard", num_replicas_per_shard) if num_shards is not None: pulumi.set(__self__, "num_shards", num_shards) if parameter_group_name is not None: pulumi.set(__self__, "parameter_group_name", parameter_group_name) if port is not None: pulumi.set(__self__, "port", port) if security_group_ids is not None: pulumi.set(__self__, "security_group_ids", security_group_ids) if shards is not None: pulumi.set(__self__, "shards", shards) if snapshot_arns is not None: pulumi.set(__self__, "snapshot_arns", snapshot_arns) if snapshot_name is not None: pulumi.set(__self__, "snapshot_name", snapshot_name) if snapshot_retention_limit is not None: pulumi.set(__self__, "snapshot_retention_limit", snapshot_retention_limit) if snapshot_window is not None: pulumi.set(__self__, "snapshot_window", snapshot_window) if sns_topic_arn is not None: pulumi.set(__self__, "sns_topic_arn", sns_topic_arn) if subnet_group_name is not None: pulumi.set(__self__, "subnet_group_name", subnet_group_name) if tags is not None: pulumi.set(__self__, "tags", tags) if tags_all is not None: pulumi.set(__self__, "tags_all", tags_all) if tls_enabled is not None: pulumi.set(__self__, "tls_enabled", tls_enabled) @property @pulumi.getter(name="aclName") def acl_name(self) -> Optional[pulumi.Input[str]]: """ The name of the Access Control List to associate with the cluster. """ return pulumi.get(self, "acl_name") @acl_name.setter def acl_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "acl_name", value) @property @pulumi.getter def arn(self) -> Optional[pulumi.Input[str]]: """ The ARN of the cluster. * `cluster_endpoint` """ return pulumi.get(self, "arn") @arn.setter def arn(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "arn", value) @property @pulumi.getter(name="autoMinorVersionUpgrade") def auto_minor_version_upgrade(self) -> Optional[pulumi.Input[bool]]: """ When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`. """ return pulumi.get(self, "auto_minor_version_upgrade") @auto_minor_version_upgrade.setter def auto_minor_version_upgrade(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "auto_minor_version_upgrade", value) @property @pulumi.getter(name="clusterEndpoints") def cluster_endpoints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ClusterClusterEndpointArgs']]]]: return pulumi.get(self, "cluster_endpoints") @cluster_endpoints.setter def cluster_endpoints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterClusterEndpointArgs']]]]): pulumi.set(self, "cluster_endpoints", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter(name="enginePatchVersion") def engine_patch_version(self) -> Optional[pulumi.Input[str]]: """ Patch version number of the Redis engine used by the cluster. """ return pulumi.get(self, "engine_patch_version") @engine_patch_version.setter def engine_patch_version(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "engine_patch_version", value) @property @pulumi.getter(name="engineVersion") def engine_version(self) -> Optional[pulumi.Input[str]]: """ Version number of the Redis engine to be used for the cluster. Downgrades are not supported. """ return pulumi.get(self, "engine_version") @engine_version.setter def engine_version(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "engine_version", value) @property @pulumi.getter(name="finalSnapshotName") def final_snapshot_name(self) -> Optional[pulumi.Input[str]]: """ Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. """ return pulumi.get(self, "final_snapshot_name") @final_snapshot_name.setter def final_snapshot_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "final_snapshot_name", value) @property @pulumi.getter(name="kmsKeyArn") def kms_key_arn(self) -> Optional[pulumi.Input[str]]: """ ARN of the KMS key used to encrypt the cluster at rest. """ return pulumi.get(self, "kms_key_arn") @kms_key_arn.setter def kms_key_arn(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "kms_key_arn", value) @property @pulumi.getter(name="maintenanceWindow") def maintenance_window(self) -> Optional[pulumi.Input[str]]: """ Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`. """ return pulumi.get(self, "maintenance_window") @maintenance_window.setter def maintenance_window(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "maintenance_window", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ Name of this node. * `endpoint` """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="namePrefix") def name_prefix(self) -> Optional[pulumi.Input[str]]: """ Creates a unique name beginning with the specified prefix. Conflicts with `name`. """ return pulumi.get(self, "name_prefix") @name_prefix.setter def name_prefix(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name_prefix", value) @property @pulumi.getter(name="nodeType") def node_type(self) -> Optional[pulumi.Input[str]]: """ The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). """ return pulumi.get(self, "node_type") @node_type.setter def node_type(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "node_type", value) @property @pulumi.getter(name="numReplicasPerShard") def num_replicas_per_shard(self) -> Optional[pulumi.Input[int]]: """ The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard). """ return pulumi.get(self, "num_replicas_per_shard") @num_replicas_per_shard.setter def num_replicas_per_shard(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "num_replicas_per_shard", value) @property @pulumi.getter(name="numShards") def num_shards(self) -> Optional[pulumi.Input[int]]: """ The number of shards in the cluster. Defaults to `1`. """ return pulumi.get(self, "num_shards") @num_shards.setter def num_shards(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "num_shards", value) @property @pulumi.getter(name="parameterGroupName") def parameter_group_name(self) -> Optional[pulumi.Input[str]]: """ The name of the parameter group associated with the cluster. """ return pulumi.get(self, "parameter_group_name") @parameter_group_name.setter def parameter_group_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "parameter_group_name", value) @property @pulumi.getter def port(self) -> Optional[pulumi.Input[int]]: """ The port number on which each of the nodes accepts connections. Defaults to `6379`. """ return pulumi.get(self, "port") @port.setter def port(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "port", value) @property @pulumi.getter(name="securityGroupIds") def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ Set of VPC Security Group ID-s to associate with this cluster. """ return pulumi.get(self, "security_group_ids") @security_group_ids.setter def security_group_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "security_group_ids", value) @property @pulumi.getter def shards(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ClusterShardArgs']]]]: """ Set of shards in this cluster. """ return pulumi.get(self, "shards") @shards.setter def shards(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterShardArgs']]]]): pulumi.set(self, "shards", value) @property @pulumi.getter(name="snapshotArns") def snapshot_arns(self) -> Optional[pulumi.Input[str]]: """ List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. """ return pulumi.get(self, "snapshot_arns") @snapshot_arns.setter def snapshot_arns(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "snapshot_arns", value) @property @pulumi.getter(name="snapshotName") def snapshot_name(self) -> Optional[pulumi.Input[str]]: """ The name of a snapshot from which to restore data into the new cluster. """ return pulumi.get(self, "snapshot_name") @snapshot_name.setter def snapshot_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "snapshot_name", value) @property @pulumi.getter(name="snapshotRetentionLimit") def snapshot_retention_limit(self) -> Optional[pulumi.Input[int]]: """ The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`. """ return pulumi.get(self, "snapshot_retention_limit") @snapshot_retention_limit.setter def snapshot_retention_limit(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "snapshot_retention_limit", value) @property @pulumi.getter(name="snapshotWindow") def snapshot_window(self) -> Optional[pulumi.Input[str]]: """ The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`. """ return pulumi.get(self, "snapshot_window") @snapshot_window.setter def snapshot_window(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "snapshot_window", value) @property @pulumi.getter(name="snsTopicArn") def sns_topic_arn(self) -> Optional[pulumi.Input[str]]: """ ARN of the SNS topic to which cluster notifications are sent. """ return pulumi.get(self, "sns_topic_arn") @sns_topic_arn.setter def sns_topic_arn(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "sns_topic_arn", value) @property @pulumi.getter(name="subnetGroupName") def subnet_group_name(self) -> Optional[pulumi.Input[str]]: """ The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. """ return pulumi.get(self, "subnet_group_name") @subnet_group_name.setter def subnet_group_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "subnet_group_name", value) @property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. """ return pulumi.get(self, "tags") @tags.setter def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "tags", value) @property @pulumi.getter(name="tagsAll") def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block). """ return pulumi.get(self, "tags_all") @tags_all.setter def tags_all(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "tags_all", value) @property @pulumi.getter(name="tlsEnabled") def tls_enabled(self) -> Optional[pulumi.Input[bool]]: """ A flag to enable in-transit encryption on the cluster. When set to `false`, the `acl_name` must be `open-access`. Defaults to `true`. """ return pulumi.get(self, "tls_enabled") @tls_enabled.setter def tls_enabled(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "tls_enabled", value) class Cluster(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, acl_name: Optional[pulumi.Input[str]] = None, auto_minor_version_upgrade: Optional[pulumi.Input[bool]] = None, description: Optional[pulumi.Input[str]] = None, engine_version: Optional[pulumi.Input[str]] = None, final_snapshot_name: Optional[pulumi.Input[str]] = None, kms_key_arn: Optional[pulumi.Input[str]] = None, maintenance_window: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, name_prefix: Optional[pulumi.Input[str]] = None, node_type: Optional[pulumi.Input[str]] = None, num_replicas_per_shard: Optional[pulumi.Input[int]] = None, num_shards: Optional[pulumi.Input[int]] = None, parameter_group_name: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, snapshot_arns: Optional[pulumi.Input[str]] = None, snapshot_name: Optional[pulumi.Input[str]] = None, snapshot_retention_limit: Optional[pulumi.Input[int]] = None, snapshot_window: Optional[pulumi.Input[str]] = None, sns_topic_arn: Optional[pulumi.Input[str]] = None, subnet_group_name: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tls_enabled: Optional[pulumi.Input[bool]] = None, __props__=None): """ Provides a MemoryDB Cluster. More information about MemoryDB can be found in the [Developer Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/what-is-memorydb-for-redis.html). ## Example Usage ```python import pulumi import pulumi_aws as aws example = aws.memorydb.Cluster("example", acl_name="open-access", node_type="db.t4g.small", num_shards=2, security_group_ids=[aws_security_group["example"]["id"]], snapshot_retention_limit=7, subnet_group_name=aws_memorydb_subnet_group["example"]["id"]) ``` ## Import Use the `name` to import a cluster. For example ```sh $ pulumi import aws:memorydb/cluster:Cluster example my-cluster ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] acl_name: The name of the Access Control List to associate with the cluster. :param pulumi.Input[bool] auto_minor_version_upgrade: When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`. :param pulumi.Input[str] engine_version: Version number of the Redis engine to be used for the cluster. Downgrades are not supported. :param pulumi.Input[str] final_snapshot_name: Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. :param pulumi.Input[str] kms_key_arn: ARN of the KMS key used to encrypt the cluster at rest. :param pulumi.Input[str] maintenance_window: Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`. :param pulumi.Input[str] name: Name of this node. * `endpoint` :param pulumi.Input[str] name_prefix: Creates a unique name beginning with the specified prefix. Conflicts with `name`. :param pulumi.Input[str] node_type: The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). :param pulumi.Input[int] num_replicas_per_shard: The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard). :param pulumi.Input[int] num_shards: The number of shards in the cluster. Defaults to `1`. :param pulumi.Input[str] parameter_group_name: The name of the parameter group associated with the cluster. :param pulumi.Input[int] port: The port number on which each of the nodes accepts connections. Defaults to `6379`. :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: Set of VPC Security Group ID-s to associate with this cluster. :param pulumi.Input[str] snapshot_arns: List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. :param pulumi.Input[str] snapshot_name: The name of a snapshot from which to restore data into the new cluster. :param pulumi.Input[int] snapshot_retention_limit: The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`. :param pulumi.Input[str] snapshot_window: The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`. :param pulumi.Input[str] sns_topic_arn: ARN of the SNS topic to which cluster notifications are sent. :param pulumi.Input[str] subnet_group_name: The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block). :param pulumi.Input[bool] tls_enabled: A flag to enable in-transit encryption on the cluster. When set to `false`, the `acl_name` must be `open-access`. Defaults to `true`. """ ... @overload def __init__(__self__, resource_name: str, args: ClusterArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Provides a MemoryDB Cluster. More information about MemoryDB can be found in the [Developer Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/what-is-memorydb-for-redis.html). ## Example Usage ```python import pulumi import pulumi_aws as aws example = aws.memorydb.Cluster("example", acl_name="open-access", node_type="db.t4g.small", num_shards=2, security_group_ids=[aws_security_group["example"]["id"]], snapshot_retention_limit=7, subnet_group_name=aws_memorydb_subnet_group["example"]["id"]) ``` ## Import Use the `name` to import a cluster. For example ```sh $ pulumi import aws:memorydb/cluster:Cluster example my-cluster ``` :param str resource_name: The name of the resource. :param ClusterArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(ClusterArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, acl_name: Optional[pulumi.Input[str]] = None, auto_minor_version_upgrade: Optional[pulumi.Input[bool]] = None, description: Optional[pulumi.Input[str]] = None, engine_version: Optional[pulumi.Input[str]] = None, final_snapshot_name: Optional[pulumi.Input[str]] = None, kms_key_arn: Optional[pulumi.Input[str]] = None, maintenance_window: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, name_prefix: Optional[pulumi.Input[str]] = None, node_type: Optional[pulumi.Input[str]] = None, num_replicas_per_shard: Optional[pulumi.Input[int]] = None, num_shards: Optional[pulumi.Input[int]] = None, parameter_group_name: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, snapshot_arns: Optional[pulumi.Input[str]] = None, snapshot_name: Optional[pulumi.Input[str]] = None, snapshot_retention_limit: Optional[pulumi.Input[int]] = None, snapshot_window: Optional[pulumi.Input[str]] = None, sns_topic_arn: Optional[pulumi.Input[str]] = None, subnet_group_name: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tls_enabled: Optional[pulumi.Input[bool]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ClusterArgs.__new__(ClusterArgs) if acl_name is None and not opts.urn: raise TypeError("Missing required property 'acl_name'") __props__.__dict__["acl_name"] = acl_name __props__.__dict__["auto_minor_version_upgrade"] = auto_minor_version_upgrade __props__.__dict__["description"] = description __props__.__dict__["engine_version"] = engine_version __props__.__dict__["final_snapshot_name"] = final_snapshot_name __props__.__dict__["kms_key_arn"] = kms_key_arn __props__.__dict__["maintenance_window"] = maintenance_window __props__.__dict__["name"] = name __props__.__dict__["name_prefix"] = name_prefix if node_type is None and not opts.urn: raise TypeError("Missing required property 'node_type'") __props__.__dict__["node_type"] = node_type __props__.__dict__["num_replicas_per_shard"] = num_replicas_per_shard __props__.__dict__["num_shards"] = num_shards __props__.__dict__["parameter_group_name"] = parameter_group_name __props__.__dict__["port"] = port __props__.__dict__["security_group_ids"] = security_group_ids __props__.__dict__["snapshot_arns"] = snapshot_arns __props__.__dict__["snapshot_name"] = snapshot_name __props__.__dict__["snapshot_retention_limit"] = snapshot_retention_limit __props__.__dict__["snapshot_window"] = snapshot_window __props__.__dict__["sns_topic_arn"] = sns_topic_arn __props__.__dict__["subnet_group_name"] = subnet_group_name __props__.__dict__["tags"] = tags __props__.__dict__["tags_all"] = tags_all __props__.__dict__["tls_enabled"] = tls_enabled __props__.__dict__["arn"] = None __props__.__dict__["cluster_endpoints"] = None __props__.__dict__["engine_patch_version"] = None __props__.__dict__["shards"] = None super(Cluster, __self__).__init__( 'aws:memorydb/cluster:Cluster', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, acl_name: Optional[pulumi.Input[str]] = None, arn: Optional[pulumi.Input[str]] = None, auto_minor_version_upgrade: Optional[pulumi.Input[bool]] = None, cluster_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ClusterClusterEndpointArgs']]]]] = None, description: Optional[pulumi.Input[str]] = None, engine_patch_version: Optional[pulumi.Input[str]] = None, engine_version: Optional[pulumi.Input[str]] = None, final_snapshot_name: Optional[pulumi.Input[str]] = None, kms_key_arn: Optional[pulumi.Input[str]] = None, maintenance_window: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, name_prefix: Optional[pulumi.Input[str]] = None, node_type: Optional[pulumi.Input[str]] = None, num_replicas_per_shard: Optional[pulumi.Input[int]] = None, num_shards: Optional[pulumi.Input[int]] = None, parameter_group_name: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, shards: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ClusterShardArgs']]]]] = None, snapshot_arns: Optional[pulumi.Input[str]] = None, snapshot_name: Optional[pulumi.Input[str]] = None, snapshot_retention_limit: Optional[pulumi.Input[int]] = None, snapshot_window: Optional[pulumi.Input[str]] = None, sns_topic_arn: Optional[pulumi.Input[str]] = None, subnet_group_name: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, tls_enabled: Optional[pulumi.Input[bool]] = None) -> 'Cluster': """ Get an existing Cluster resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] acl_name: The name of the Access Control List to associate with the cluster. :param pulumi.Input[str] arn: The ARN of the cluster. * `cluster_endpoint` :param pulumi.Input[bool] auto_minor_version_upgrade: When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`. :param pulumi.Input[str] engine_patch_version: Patch version number of the Redis engine used by the cluster. :param pulumi.Input[str] engine_version: Version number of the Redis engine to be used for the cluster. Downgrades are not supported. :param pulumi.Input[str] final_snapshot_name: Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. :param pulumi.Input[str] kms_key_arn: ARN of the KMS key used to encrypt the cluster at rest. :param pulumi.Input[str] maintenance_window: Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`. :param pulumi.Input[str] name: Name of this node. * `endpoint` :param pulumi.Input[str] name_prefix: Creates a unique name beginning with the specified prefix. Conflicts with `name`. :param pulumi.Input[str] node_type: The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). :param pulumi.Input[int] num_replicas_per_shard: The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard). :param pulumi.Input[int] num_shards: The number of shards in the cluster. Defaults to `1`. :param pulumi.Input[str] parameter_group_name: The name of the parameter group associated with the cluster. :param pulumi.Input[int] port: The port number on which each of the nodes accepts connections. Defaults to `6379`. :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: Set of VPC Security Group ID-s to associate with this cluster. :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ClusterShardArgs']]]] shards: Set of shards in this cluster. :param pulumi.Input[str] snapshot_arns: List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. :param pulumi.Input[str] snapshot_name: The name of a snapshot from which to restore data into the new cluster. :param pulumi.Input[int] snapshot_retention_limit: The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`. :param pulumi.Input[str] snapshot_window: The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`. :param pulumi.Input[str] sns_topic_arn: ARN of the SNS topic to which cluster notifications are sent. :param pulumi.Input[str] subnet_group_name: The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block). :param pulumi.Input[bool] tls_enabled: A flag to enable in-transit encryption on the cluster. When set to `false`, the `acl_name` must be `open-access`. Defaults to `true`. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _ClusterState.__new__(_ClusterState) __props__.__dict__["acl_name"] = acl_name __props__.__dict__["arn"] = arn __props__.__dict__["auto_minor_version_upgrade"] = auto_minor_version_upgrade __props__.__dict__["cluster_endpoints"] = cluster_endpoints __props__.__dict__["description"] = description __props__.__dict__["engine_patch_version"] = engine_patch_version __props__.__dict__["engine_version"] = engine_version __props__.__dict__["final_snapshot_name"] = final_snapshot_name __props__.__dict__["kms_key_arn"] = kms_key_arn __props__.__dict__["maintenance_window"] = maintenance_window __props__.__dict__["name"] = name __props__.__dict__["name_prefix"] = name_prefix __props__.__dict__["node_type"] = node_type __props__.__dict__["num_replicas_per_shard"] = num_replicas_per_shard __props__.__dict__["num_shards"] = num_shards __props__.__dict__["parameter_group_name"] = parameter_group_name __props__.__dict__["port"] = port __props__.__dict__["security_group_ids"] = security_group_ids __props__.__dict__["shards"] = shards __props__.__dict__["snapshot_arns"] = snapshot_arns __props__.__dict__["snapshot_name"] = snapshot_name __props__.__dict__["snapshot_retention_limit"] = snapshot_retention_limit __props__.__dict__["snapshot_window"] = snapshot_window __props__.__dict__["sns_topic_arn"] = sns_topic_arn __props__.__dict__["subnet_group_name"] = subnet_group_name __props__.__dict__["tags"] = tags __props__.__dict__["tags_all"] = tags_all __props__.__dict__["tls_enabled"] = tls_enabled return Cluster(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="aclName") def acl_name(self) -> pulumi.Output[str]: """ The name of the Access Control List to associate with the cluster. """ return pulumi.get(self, "acl_name") @property @pulumi.getter def arn(self) -> pulumi.Output[str]: """ The ARN of the cluster. * `cluster_endpoint` """ return pulumi.get(self, "arn") @property @pulumi.getter(name="autoMinorVersionUpgrade") def auto_minor_version_upgrade(self) -> pulumi.Output[Optional[bool]]: """ When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`. """ return pulumi.get(self, "auto_minor_version_upgrade") @property @pulumi.getter(name="clusterEndpoints") def cluster_endpoints(self) -> pulumi.Output[Sequence['outputs.ClusterClusterEndpoint']]: return pulumi.get(self, "cluster_endpoints") @property @pulumi.getter def description(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "description") @property @pulumi.getter(name="enginePatchVersion") def engine_patch_version(self) -> pulumi.Output[str]: """ Patch version number of the Redis engine used by the cluster. """ return pulumi.get(self, "engine_patch_version") @property @pulumi.getter(name="engineVersion") def engine_version(self) -> pulumi.Output[str]: """ Version number of the Redis engine to be used for the cluster. Downgrades are not supported. """ return pulumi.get(self, "engine_version") @property @pulumi.getter(name="finalSnapshotName") def final_snapshot_name(self) -> pulumi.Output[Optional[str]]: """ Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made. """ return pulumi.get(self, "final_snapshot_name") @property @pulumi.getter(name="kmsKeyArn") def kms_key_arn(self) -> pulumi.Output[Optional[str]]: """ ARN of the KMS key used to encrypt the cluster at rest. """ return pulumi.get(self, "kms_key_arn") @property @pulumi.getter(name="maintenanceWindow") def maintenance_window(self) -> pulumi.Output[str]: """ Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`. """ return pulumi.get(self, "maintenance_window") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ Name of this node. * `endpoint` """ return pulumi.get(self, "name") @property @pulumi.getter(name="namePrefix") def name_prefix(self) -> pulumi.Output[str]: """ Creates a unique name beginning with the specified prefix. Conflicts with `name`. """ return pulumi.get(self, "name_prefix") @property @pulumi.getter(name="nodeType") def node_type(self) -> pulumi.Output[str]: """ The compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). """ return pulumi.get(self, "node_type") @property @pulumi.getter(name="numReplicasPerShard") def num_replicas_per_shard(self) -> pulumi.Output[Optional[int]]: """ The number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard). """ return pulumi.get(self, "num_replicas_per_shard") @property @pulumi.getter(name="numShards") def num_shards(self) -> pulumi.Output[Optional[int]]: """ The number of shards in the cluster. Defaults to `1`. """ return pulumi.get(self, "num_shards") @property @pulumi.getter(name="parameterGroupName") def parameter_group_name(self) -> pulumi.Output[str]: """ The name of the parameter group associated with the cluster. """ return pulumi.get(self, "parameter_group_name") @property @pulumi.getter def port(self) -> pulumi.Output[int]: """ The port number on which each of the nodes accepts connections. Defaults to `6379`. """ return pulumi.get(self, "port") @property @pulumi.getter(name="securityGroupIds") def security_group_ids(self) -> pulumi.Output[Optional[Sequence[str]]]: """ Set of VPC Security Group ID-s to associate with this cluster. """ return pulumi.get(self, "security_group_ids") @property @pulumi.getter def shards(self) -> pulumi.Output[Sequence['outputs.ClusterShard']]: """ Set of shards in this cluster. """ return pulumi.get(self, "shards") @property @pulumi.getter(name="snapshotArns") def snapshot_arns(self) -> pulumi.Output[Optional[str]]: """ List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas. """ return pulumi.get(self, "snapshot_arns") @property @pulumi.getter(name="snapshotName") def snapshot_name(self) -> pulumi.Output[Optional[str]]: """ The name of a snapshot from which to restore data into the new cluster. """ return pulumi.get(self, "snapshot_name") @property @pulumi.getter(name="snapshotRetentionLimit") def snapshot_retention_limit(self) -> pulumi.Output[int]: """ The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`. """ return pulumi.get(self, "snapshot_retention_limit") @property @pulumi.getter(name="snapshotWindow") def snapshot_window(self) -> pulumi.Output[str]: """ The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`. """ return pulumi.get(self, "snapshot_window") @property @pulumi.getter(name="snsTopicArn") def sns_topic_arn(self) -> pulumi.Output[Optional[str]]: """ ARN of the SNS topic to which cluster notifications are sent. """ return pulumi.get(self, "sns_topic_arn") @property @pulumi.getter(name="subnetGroupName") def subnet_group_name(self) -> pulumi.Output[str]: """ The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets. """ return pulumi.get(self, "subnet_group_name") @property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. """ return pulumi.get(self, "tags") @property @pulumi.getter(name="tagsAll") def tags_all(self) -> pulumi.Output[Mapping[str, str]]: """ A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block). """ return pulumi.get(self, "tags_all") @property @pulumi.getter(name="tlsEnabled") def tls_enabled(self) -> pulumi.Output[Optional[bool]]: """ A flag to enable in-transit encryption on the cluster. When set to `false`, the `acl_name` must be `open-access`. Defaults to `true`. """ return pulumi.get(self, "tls_enabled")
52.303971
348
0.672064
9,396
72,441
4.981056
0.037995
0.090018
0.072988
0.064399
0.960173
0.948549
0.938827
0.927311
0.918807
0.904983
0
0.004476
0.222802
72,441
1,384
349
52.341763
0.826806
0.375823
0
0.852121
1
0
0.108187
0.022425
0
0
0
0
0
1
0.168485
false
0.001212
0.008485
0.006061
0.278788
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
2e020b712de72d298eb2562bc120dce5bcb444f6
14,792
py
Python
scripts/createGermlineMutations.py
leonorss/Bachelor-Thesis
c00aa4950ece82215c0af0852793f71a34c93001
[ "MIT" ]
null
null
null
scripts/createGermlineMutations.py
leonorss/Bachelor-Thesis
c00aa4950ece82215c0af0852793f71a34c93001
[ "MIT" ]
null
null
null
scripts/createGermlineMutations.py
leonorss/Bachelor-Thesis
c00aa4950ece82215c0af0852793f71a34c93001
[ "MIT" ]
null
null
null
import vcf import random from Bio import SeqIO # read in parameters from config File n_g_m = snakemake.params[0] f_h_m = snakemake.params[1] # create a seed for reproducibilaty configSeed = snakemake.params[2] random.seed(configSeed) # number if Homo- and Heterozygous Mutations according to the config File numberOfHeterozygousGermlineMutations = int(n_g_m * f_h_m) numberOfHomozygousGermlineMutations = n_g_m - numberOfHeterozygousGermlineMutations # read in reference Genome to check that we don't insert Mutations, that actually don't change the Genome referenceGenome = SeqIO.read(snakemake.params[3], "fasta") referenceGenomeLength = len(referenceGenome) # create two vcf Files for the 2 allels with the given header vcfReader_MetaData = vcf.Reader(filename=snakemake.params[4]) vcfWriter1 = vcf.Writer(open(snakemake.output[0], 'w'), vcfReader_MetaData) vcfWriter2 = vcf.Writer(open(snakemake.output[1], 'w'), vcfReader_MetaData) chromosomId = int(next(iter(vcfReader_MetaData.contigs))) # creating specified number of random homozygous mutations: 1=A, 2=C, 3=G, 4=T for homozygousMutation in range(0, numberOfHomozygousGermlineMutations): inserted = 0 # checking that we didn't create a mutation that din't actually change the reference genome while(inserted == 0): # choosing random Nucleotid and random place to insert newMutation = random.randrange(1, 5) insertPlace = random.randrange(0, referenceGenomeLength) alreadyMutated = 0 # case nucleotid="A" if newMutation==1: mutatedNucleotid = "A" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("a" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): if homozygousMutation != 0: vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break # inserting the mutations into the two vcf files if alreadyMutated == 0: inserted = 1 record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) vcfWriter1.write_record(record) vcfWriter2.write_record(record) vcfWriter1.flush() vcfWriter2.flush() # case nucleotid="C" elif newMutation==2: mutatedNucleotid = "C" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("c" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): if homozygousMutation != 0: vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break # inserting the mutations into the two vcf files if alreadyMutated == 0: inserted = 1 record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) vcfWriter1.write_record(record) vcfWriter2.write_record(record) vcfWriter1.flush() vcfWriter2.flush() # case nucleotid="G" elif newMutation==3: mutatedNucleotid = "G" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("g" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): if homozygousMutation != 0: vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break # inserting the mutations into the two vcf files if alreadyMutated == 0: inserted = 1 record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) vcfWriter1.write_record(record) vcfWriter2.write_record(record) vcfWriter1.flush() vcfWriter2.flush() # case nucleotid="T" else: mutatedNucleotid = "T" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("t" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): if homozygousMutation != 0: vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break # inserting the mutations into the two vcf files if alreadyMutated == 0: inserted = 1 record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) vcfWriter1.write_record(record) vcfWriter2.write_record(record) vcfWriter1.flush() vcfWriter2.flush() # creating specified number of random heterozygous mutations: 1=A, 2=C, 3=G, 4=T for heterozygousMutation in range(0, numberOfHeterozygousGermlineMutations): inserted = 0 # choose either Allel randomly allel = random.randint(1, 2) # checking that we didn't create a mutation that din't actually change the reference genome while(inserted == 0): # choosing random Nucleotid and random place to insert newMutation = random.randrange(1, 4) insertPlace = random.randrange(0, (referenceGenomeLength-1)) alreadyMutated = 0 # case nucleotid="A" if newMutation==1: mutatedNucleotid = "A" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("a" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) # insert record into randomly choosen allel if (allel == 1): vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter1.write_record(record) vcfWriter1.flush() else: vcfReader2 = vcf.Reader(filename=snakemake.output[1]) for existingRecord in vcfReader2: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter2.write_record(record) vcfWriter2.flush() # case nucleotid="C" elif newMutation==2: mutatedNucleotid = "C" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("c" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) # insert record into randomly choosen allel if (allel == 1): vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter1.write_record(record) vcfWriter1.flush() else: vcfReader2 = vcf.Reader(filename=snakemake.output[1]) for existingRecord in vcfReader2: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter2.write_record(record) vcfWriter2.flush() # case nucleotid="G" elif newMutation==3: mutatedNucleotid = "G" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("g" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) # insert record into randomly choosen allel if (allel == 1): vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter1.write_record(record) vcfWriter1.flush() else: vcfReader2 = vcf.Reader(filename=snakemake.output[1]) for existingRecord in vcfReader2: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter2.write_record(record) vcfWriter2.flush() # case nucleotid="T" else: mutatedNucleotid = "T" # making sure the nucleotid is not the same as in the reference genome or that we mutated the same nucleotide twize or not sequenced if (mutatedNucleotid != referenceGenome[insertPlace]) and ("t" != referenceGenome[insertPlace]) and ("N" != referenceGenome[insertPlace]): record = vcf.model._Record(CHROM=chromosomId, POS=(insertPlace+1), ID='.', REF=vcf.model._Substitution(referenceGenome[insertPlace]), ALT=[vcf.model._Substitution(mutatedNucleotid)], QUAL='.', FILTER='PASS', INFO={}, FORMAT=".", sample_indexes=[], samples=None) # insert record into randomly choosen allel if (allel == 1): vcfReader1 = vcf.Reader(filename=snakemake.output[0]) for existingRecord in vcfReader1: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter1.write_record(record) vcfWriter1.flush() else: vcfReader2 = vcf.Reader(filename=snakemake.output[1]) for existingRecord in vcfReader2: if insertPlace == existingRecord.POS: alreadyMutated = 1 break if alreadyMutated == 0: inserted = 1 vcfWriter2.write_record(record) vcfWriter2.flush() # close writers vcfWriter1.close() vcfWriter2.close()
51.183391
150
0.546444
1,322
14,792
6.067322
0.109682
0.103728
0.057848
0.042139
0.876699
0.850019
0.850019
0.850019
0.850019
0.850019
0
0.017482
0.369659
14,792
288
151
51.361111
0.842771
0.158599
0
0.88785
0
0
0.007012
0
0
0
0
0
0
1
0
false
0.037383
0.014019
0
0.014019
0
0
0
0
null
0
0
0
1
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
7
2e1f60ba3938bad9cbd645d4ed521b3816f8bf09
480,530
py
Python
unittest/test_amin.py
m1griffin/arrayfunc
df57097699c25d3e949e1ade307ed61eaa5728c2
[ "Apache-2.0" ]
2
2017-08-28T08:41:16.000Z
2018-05-29T03:49:36.000Z
unittest/test_amin.py
m1griffin/arrayfunc
df57097699c25d3e949e1ade307ed61eaa5728c2
[ "Apache-2.0" ]
null
null
null
unittest/test_amin.py
m1griffin/arrayfunc
df57097699c25d3e949e1ade307ed61eaa5728c2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ############################################################################## # Project: arrayfunc # Module: test_amin.py # Purpose: arrayfunc unit test. # Language: Python 3.4 # Date: 11-Jun-2014. # Ver: 06-Mar-2020. # ############################################################################### # # Copyright 2014 - 2020 Michael Griffin <m12.griffin@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ############################################################################## """This conducts unit tests for amin. """ ############################################################################## import sys import array import itertools import math import operator import platform import copy import unittest import arrayfunc ############################################################################## ############################################################################## # The following code is all auto-generated. ############################################################################## class amin_general_even_arraysize_with_simd_b(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('b', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('b', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('b', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('b', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('b', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code b. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code b. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code b. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code b. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code b. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code b. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_b(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min self.gentest = array.array('b', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code b. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code b. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code b. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code b. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_b(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('b', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('b', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('b', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('b', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('b', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code b. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code b. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code b. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code b. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code b. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code b. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_b(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min self.gentest = array.array('b', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code b. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code b. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code b. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code b. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_b(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('b', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('b', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('b', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('b', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('b', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code b. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code b. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code b. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code b. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code b. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code b. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_b(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min self.gentest = array.array('b', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code b. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code b. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code b. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code b. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_b(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('b', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('b', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('b', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('b', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('b', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code b. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code b. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code b. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code b. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code b. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code b. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_b(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.b_max MinVal = arrayfunc.arraylimits.b_min self.gentest = array.array('b', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code b. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code b. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code b. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code b. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_B(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('B', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('B', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('B', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('B', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('B', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code B. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code B. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code B. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code B. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code B. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code B. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_B(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min self.gentest = array.array('B', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code B. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code B. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code B. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code B. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_B(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('B', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('B', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('B', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('B', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('B', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code B. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code B. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code B. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code B. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code B. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code B. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_B(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min self.gentest = array.array('B', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code B. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code B. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code B. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code B. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_B(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('B', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('B', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('B', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('B', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('B', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code B. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code B. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code B. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code B. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code B. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code B. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_B(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min self.gentest = array.array('B', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code B. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code B. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code B. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code B. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_B(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('B', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('B', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('B', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('B', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('B', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code B. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code B. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code B. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code B. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code B. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code B. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_B(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.B_max MinVal = arrayfunc.arraylimits.B_min self.gentest = array.array('B', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code B. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code B. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code B. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code B. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_h(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('h', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('h', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('h', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('h', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('h', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code h. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code h. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code h. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code h. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code h. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code h. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_h(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min self.gentest = array.array('h', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code h. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code h. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code h. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code h. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_h(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('h', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('h', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('h', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('h', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('h', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code h. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code h. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code h. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code h. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code h. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code h. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_h(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min self.gentest = array.array('h', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code h. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code h. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code h. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code h. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_h(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('h', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('h', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('h', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('h', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('h', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code h. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code h. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code h. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code h. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code h. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code h. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_h(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min self.gentest = array.array('h', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code h. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code h. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code h. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code h. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_h(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('h', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('h', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('h', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('h', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('h', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code h. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code h. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code h. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code h. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code h. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code h. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_h(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.h_max MinVal = arrayfunc.arraylimits.h_min self.gentest = array.array('h', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code h. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code h. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code h. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code h. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_H(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('H', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('H', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('H', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('H', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('H', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code H. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code H. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code H. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code H. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code H. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code H. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_H(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min self.gentest = array.array('H', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code H. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code H. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code H. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code H. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_H(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('H', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('H', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('H', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('H', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('H', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code H. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code H. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code H. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code H. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code H. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code H. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_H(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min self.gentest = array.array('H', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code H. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code H. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code H. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code H. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_H(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('H', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('H', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('H', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('H', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('H', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code H. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code H. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code H. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code H. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code H. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code H. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_H(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min self.gentest = array.array('H', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code H. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code H. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code H. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code H. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_H(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('H', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('H', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('H', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('H', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('H', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code H. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code H. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code H. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code H. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code H. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code H. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_H(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.H_max MinVal = arrayfunc.arraylimits.H_min self.gentest = array.array('H', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code H. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code H. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code H. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code H. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_i(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('i', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('i', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('i', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('i', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('i', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code i. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code i. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code i. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code i. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code i. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code i. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_i(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min self.gentest = array.array('i', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code i. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code i. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code i. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code i. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_i(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('i', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('i', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('i', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('i', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('i', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code i. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code i. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code i. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code i. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code i. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code i. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_i(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min self.gentest = array.array('i', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code i. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code i. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code i. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code i. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_i(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('i', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('i', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('i', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('i', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('i', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code i. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code i. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code i. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code i. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code i. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code i. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_i(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min self.gentest = array.array('i', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code i. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code i. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code i. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code i. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_i(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('i', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('i', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('i', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('i', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('i', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code i. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code i. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code i. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code i. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code i. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code i. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_i(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.i_max MinVal = arrayfunc.arraylimits.i_min self.gentest = array.array('i', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code i. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code i. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code i. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code i. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_I(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('I', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('I', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('I', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('I', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('I', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code I. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code I. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code I. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code I. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code I. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code I. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_I(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min self.gentest = array.array('I', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code I. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code I. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code I. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code I. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_I(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('I', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('I', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('I', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('I', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('I', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code I. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code I. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code I. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code I. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code I. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code I. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_I(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min self.gentest = array.array('I', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code I. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code I. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code I. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code I. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_I(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('I', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('I', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('I', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('I', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('I', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code I. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code I. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code I. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code I. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code I. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code I. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_I(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min self.gentest = array.array('I', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code I. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code I. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code I. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code I. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_I(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('I', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('I', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('I', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('I', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('I', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code I. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code I. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code I. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code I. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code I. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code I. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_I(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.I_max MinVal = arrayfunc.arraylimits.I_min self.gentest = array.array('I', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code I. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code I. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code I. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code I. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_l(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('l', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('l', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('l', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('l', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('l', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code l. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code l. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code l. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code l. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code l. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code l. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_l(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min self.gentest = array.array('l', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code l. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code l. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code l. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code l. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_l(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('l', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('l', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('l', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('l', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('l', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code l. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code l. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code l. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code l. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code l. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code l. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_l(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min self.gentest = array.array('l', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code l. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code l. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code l. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code l. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_l(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('l', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('l', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('l', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('l', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('l', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code l. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code l. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code l. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code l. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code l. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code l. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_l(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min self.gentest = array.array('l', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code l. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code l. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code l. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code l. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_l(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('l', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('l', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('l', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('l', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('l', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code l. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code l. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code l. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code l. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code l. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code l. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_l(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.l_max MinVal = arrayfunc.arraylimits.l_min self.gentest = array.array('l', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code l. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code l. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code l. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code l. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_L(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('L', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('L', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('L', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('L', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('L', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code L. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code L. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code L. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code L. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code L. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code L. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_L(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min self.gentest = array.array('L', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code L. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code L. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code L. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code L. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_L(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('L', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('L', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('L', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('L', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('L', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code L. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code L. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code L. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code L. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code L. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code L. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_L(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min self.gentest = array.array('L', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code L. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code L. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code L. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code L. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_L(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('L', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('L', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('L', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('L', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('L', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code L. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code L. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code L. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code L. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code L. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code L. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_L(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min self.gentest = array.array('L', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code L. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code L. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code L. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code L. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_L(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('L', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('L', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('L', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('L', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('L', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code L. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code L. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code L. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code L. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code L. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code L. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_L(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.L_max MinVal = arrayfunc.arraylimits.L_min self.gentest = array.array('L', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code L. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code L. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code L. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code L. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code q. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code q. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code q. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code q. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code q. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code q. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min self.gentest = array.array('q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code q. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code q. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code q. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code q. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code q. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code q. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code q. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code q. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code q. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code q. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min self.gentest = array.array('q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code q. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code q. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code q. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code q. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code q. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code q. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code q. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code q. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code q. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code q. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min self.gentest = array.array('q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code q. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code q. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code q. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code q. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code q. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code q. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code q. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code q. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code q. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code q. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.q_max MinVal = arrayfunc.arraylimits.q_min self.gentest = array.array('q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code q. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code q. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code q. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code q. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_Q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('Q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('Q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('Q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code Q. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code Q. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code Q. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code Q. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code Q. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code Q. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_Q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min self.gentest = array.array('Q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code Q. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code Q. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code Q. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code Q. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_Q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('Q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('Q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('Q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code Q. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code Q. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code Q. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code Q. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code Q. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code Q. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_Q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min self.gentest = array.array('Q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code Q. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code Q. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code Q. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code Q. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_Q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('Q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('Q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('Q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code Q. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code Q. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code Q. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code Q. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code Q. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code Q. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_Q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min self.gentest = array.array('Q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code Q. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code Q. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code Q. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code Q. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_Q(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('Q', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('Q', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('Q', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('Q', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code Q. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code Q. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code Q. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code Q. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code Q. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code Q. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_Q(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.Q_max MinVal = arrayfunc.arraylimits.Q_min self.gentest = array.array('Q', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code Q. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code Q. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code Q. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code Q. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_f(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('f', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('f', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('f', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('f', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('f', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code f. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code f. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code f. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code f. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code f. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code f. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_f(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min self.gentest = array.array('f', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code f. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code f. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code f. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code f. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_f(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('f', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('f', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('f', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('f', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('f', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code f. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code f. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code f. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code f. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code f. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code f. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_f(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min self.gentest = array.array('f', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code f. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code f. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code f. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code f. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_f(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('f', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('f', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('f', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('f', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('f', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code f. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code f. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code f. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code f. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code f. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code f. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_f(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min self.gentest = array.array('f', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code f. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code f. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code f. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code f. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_f(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('f', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('f', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('f', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('f', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('f', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code f. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code f. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code f. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code f. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code f. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code f. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_f(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min self.gentest = array.array('f', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code f. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code f. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code f. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code f. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_with_simd_d(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('d', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('d', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('d', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('d', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('d', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code d. General test even length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code d. Test increasing values even length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code d. Test decreasing values even length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code d. Test finding max for data type even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code d. Test finding value from array that contains min for data type even length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code d. Test optional maxlen parameter even length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_with_simd_d(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min self.gentest = array.array('d', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code d. Test invalid parameter type even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code d. Test missing parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code d. Test excess parameters even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code d. Test invalid keyword parameter even length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_with_simd_d(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('d', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('d', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('d', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('d', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('d', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code d. General test odd length array with SIMD. """ result = arrayfunc.amin(self.gentest ) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code d. Test increasing values odd length array with SIMD. """ result = arrayfunc.amin(self.inctest ) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code d. Test decreasing values odd length array with SIMD. """ result = arrayfunc.amin(self.dectest ) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code d. Test finding max for data type odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest ) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code d. Test finding value from array that contains min for data type odd length array with SIMD. """ result = arrayfunc.amin(self.minvaltest ) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code d. Test optional maxlen parameter odd length array with SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 ) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_with_simd_d(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min self.gentest = array.array('d', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code d. Test invalid parameter type odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code d. Test missing parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code d. Test excess parameters odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code d. Test invalid keyword parameter odd length array with SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 ) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_even_arraysize_without_simd_d(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('d', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('d', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('d', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('d', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('d', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code d. General test even length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code d. Test increasing values even length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code d. Test decreasing values even length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code d. Test finding max for data type even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code d. Test finding value from array that contains min for data type even length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code d. Test optional maxlen parameter even length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_even_arraysize_without_simd_d(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min self.gentest = array.array('d', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code d. Test invalid parameter type even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code d. Test missing parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code d. Test excess parameters even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code d. Test invalid keyword parameter even length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_general_odd_arraysize_without_simd_d(unittest.TestCase): """Test amin for basic general function operation. op_template_general """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # This is generated by a common template, so we need to make # sure that in cases where we are using floating point values # we don't pass floating point values for range(). # Plus, double precision calcuations will overflow when calculating # the step value unless we convert to integer first. Python # integers have no upper limit, and so will not overflow. MaxInt = int(MaxVal) MinInt = int(MinVal) # Create some arbitrary data over a wide range of the data type. This # creates evenly spaced data over a range straddling the mid point of the data. midpoint = (MaxInt + MinInt) // 2 startval = (midpoint + MinInt) // 2 endval = (midpoint + MaxInt) // 2 stepval = (MaxInt - MinInt) // 100 halfrangeinc = list(range(startval, endval, stepval)) halfrangedec = list(range(endval, startval, -stepval)) gendata = list(itertools.chain.from_iterable(zip(halfrangeinc, halfrangedec))) incdata = halfrangeinc decdata = halfrangedec maxvaldata = list(itertools.chain(halfrangeinc, [MaxVal], halfrangedec)) minvaldata = list((itertools.chain(halfrangeinc, [MinVal], halfrangedec))) # Test arrays. self.gentest = array.array('d', [x for x,y in zip(itertools.cycle(gendata), range(arraylength))]) self.inctest = array.array('d', [x for x,y in zip(itertools.cycle(incdata), range(arraylength))]) self.dectest = array.array('d', [x for x,y in zip(itertools.cycle(decdata), range(arraylength))]) self.maxvaltest = array.array('d', [x for x,y in zip(itertools.cycle(maxvaldata), range(arraylength))]) self.minvaltest = array.array('d', [x for x,y in zip(itertools.cycle(minvaldata), range(arraylength))]) ######################################################## def test_amin_general_function_01(self): """Test amin - Array code d. General test odd length array without SIMD. """ result = arrayfunc.amin(self.gentest , nosimd=True) self.assertEqual(result, min(self.gentest)) ######################################################## def test_amin_general_function_02(self): """Test amin - Array code d. Test increasing values odd length array without SIMD. """ result = arrayfunc.amin(self.inctest , nosimd=True) self.assertEqual(result, min(self.inctest)) ######################################################## def test_amin_general_function_03(self): """Test amin - Array code d. Test decreasing values odd length array without SIMD. """ result = arrayfunc.amin(self.dectest , nosimd=True) self.assertEqual(result, min(self.dectest)) ######################################################## def test_amin_general_function_04(self): """Test amin - Array code d. Test finding max for data type odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest , nosimd=True) self.assertEqual(result, min(self.maxvaltest)) ######################################################## def test_amin_general_function_05(self): """Test amin - Array code d. Test finding value from array that contains min for data type odd length array without SIMD. """ result = arrayfunc.amin(self.minvaltest , nosimd=True) self.assertEqual(result, min(self.minvaltest)) ######################################################## def test_amin_general_function_06(self): """Test amin - Array code d. Test optional maxlen parameter odd length array without SIMD. """ result = arrayfunc.amin(self.maxvaltest, maxlen=5 , nosimd=True) self.assertEqual(result, min(self.maxvaltest[:5])) ############################################################################## ############################################################################## class amin_parameter_odd_arraysize_without_simd_d(unittest.TestCase): """Test amin for basic parameter tests. op_template_params """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min self.gentest = array.array('d', [MaxVal // 2] * arraylength) ######################################################## def test_amin_param_function_01(self): """Test amin - Array code d. Test invalid parameter type odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(1 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(1) ######################################################## def test_amin_param_function_02(self): """Test amin - Array code d. Test missing parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin() # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min() ######################################################## def test_amin_param_function_03(self): """Test amin - Array code d. Test excess parameters odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, 5, 2, 2 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, 2) ######################################################## def test_amin_param_function_04(self): """Test amin - Array code d. Test invalid keyword parameter odd length array without SIMD. """ with self.assertRaises(TypeError): result = arrayfunc.amin(self.gentest, xxxx=5 , nosimd=True) # Check that the exception raised corresponds to the native Python behaviour. with self.assertRaises(TypeError): result = min(self.gentest, xxxx=5) ############################################################################## ############################################################################## class amin_nonfinite_0_even_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 0 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_even_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 1 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_even_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 2 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_even_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 3 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_even_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 4 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_0_odd_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 0 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_odd_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 1 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_odd_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 2 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_odd_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 3 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_odd_arraysize_with_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 4 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_0_even_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 0 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_even_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 1 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_even_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 2 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_even_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 3 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_even_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with even length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with even length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with even length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with even length array data shifted 4 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_0_odd_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 0 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_odd_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 1 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_odd_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 2 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_odd_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 3 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_odd_arraysize_without_simd_f(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.f_max MinVal = arrayfunc.arraylimits.f_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('f', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('f', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('f', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('f', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code f. Test NaN data with odd length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code f. Test Inf data with odd length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code f. Test Negative Inf data with odd length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code f. Test mixed non-finite data with odd length array data shifted 4 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_0_even_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 0 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_even_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 1 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_even_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 2 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_even_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 3 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_even_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 4 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_0_odd_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 0 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 0 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_odd_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 1 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 1 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_odd_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 2 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 2 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_odd_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 3 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 3 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_odd_arraysize_with_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_nan ) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_inf ) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 4 with SIMD. """ result = arrayfunc.amin(self.data_ninf ) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 4 with SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed ) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_0_even_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 0 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_even_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 1 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_even_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 2 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_even_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 3 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_even_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'even' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with even length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with even length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with even length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with even length array data shifted 4 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_0_odd_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 0 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 0 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 0 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_1_odd_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 1 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 1 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 1 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_2_odd_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 2 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 2 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 2 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_3_odd_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 3 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 3 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 3 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## class amin_nonfinite_4_odd_arraysize_without_simd_d(unittest.TestCase): """Test with floating point nan, inf -inf. nonfinite_template """ ######################################################## def setUp(self): """Initialise. """ # We use a template to generate this code, so the following # compare is inserted into the template to generate code which # spills over past the SIMD handler. if 'odd' == 'odd': arrayextension = 5 else: arrayextension = 0 arraylength = 96 + arrayextension MaxVal = arrayfunc.arraylimits.d_max MinVal = arrayfunc.arraylimits.d_min # Create some test data containing a mixture of values. halfrangedata = list(range(int(MinVal / 2), int(MaxVal / 2), int(MaxVal) - int(MinVal) // 100)) nanvaldatabase = list(itertools.chain(halfrangedata, [math.nan, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) infvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) ninfvaldatabase = list(itertools.chain(halfrangedata, [-math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) mixedvaldatabase = list(itertools.chain(halfrangedata, [math.inf, -math.inf, -10.0, MaxVal, 10.0, MinVal], halfrangedata)) # Rotate the values in place in order to create different combinations. # This is being generated through a template to allow us to create # different combinations to help test the effects of having the # special values in various locations. This is primarily of use # for the SIMD tests which do operations in parallel. rotplaces = 4 nanvaldata = nanvaldatabase[rotplaces:] + nanvaldatabase[:rotplaces] infvaldata = infvaldatabase[rotplaces:] + infvaldatabase[:rotplaces] ninfvaldata = ninfvaldatabase[rotplaces:] + ninfvaldatabase[:rotplaces] mixedvaldata = mixedvaldatabase[rotplaces:] + mixedvaldatabase[:rotplaces] # Now create the arrays used in the tests. self.data_nan = array.array('d', [x for x,y in zip(itertools.cycle(nanvaldata), range(arraylength))]) self.data_inf = array.array('d', [x for x,y in zip(itertools.cycle(infvaldata), range(arraylength))]) self.data_ninf = array.array('d', [x for x,y in zip(itertools.cycle(ninfvaldata), range(arraylength))]) self.data_mixed = array.array('d', [x for x,y in zip(itertools.cycle(mixedvaldata), range(arraylength))]) ######################################################## def test_amin_nonfinite_nan_01(self): """Test amin - Array code d. Test NaN data with odd length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_nan , nosimd=True) result2 = min(self.data_nan) # We don't actually test the result as there is no meaningful order # comparison with NaN. ######################################################## def test_amin_nonfinite_inf_02(self): """Test amin - Array code d. Test Inf data with odd length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_inf , nosimd=True) self.assertEqual(result, min(self.data_inf)) ######################################################## def test_amin_nonfinite_ninf_03(self): """Test amin - Array code d. Test Negative Inf data with odd length array data shifted 4 without SIMD. """ result = arrayfunc.amin(self.data_ninf , nosimd=True) self.assertEqual(result, min(self.data_ninf)) ######################################################## def test_amin_nonfinite_mixed_04(self): """Test amin - Array code d. Test mixed non-finite data with odd length array data shifted 4 without SIMD. """ # The mixed test does not include NaN, as there is no meaningful order # comparison with NaN. result = arrayfunc.amin(self.data_mixed , nosimd=True) self.assertEqual(result, min(self.data_mixed)) ############################################################################## ############################################################################## if __name__ == '__main__': # Check to see if the log file option has been selected. This is an option # which we have added in order to decide where to output the results. if '-l' in sys.argv: # Remove the option from the argument list so that "unittest" does # not complain about unknown options. sys.argv.remove('-l') with open('af_unittest.txt', 'a') as f: f.write('\n\n') f.write('amin\n\n') trun = unittest.TextTestRunner(f) unittest.main(testRunner=trun) else: unittest.main() ##############################################################################
37.012247
125
0.627567
57,484
480,530
5.168516
0.005776
0.037078
0.023695
0.03662
0.996314
0.996314
0.996314
0.996314
0.996281
0.996281
0
0.010029
0.147398
480,530
12,982
126
37.015098
0.715151
0.342347
0
0.969317
0
0
0.005378
0
0
0
0
0
0.1578
1
0.154612
false
0
0.001793
0
0.183503
0
0
0
0
null
0
0
0
1
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
7
2e2ac36b0ca3e23db0a91d45b7b3309c5e79f1d7
4,522
py
Python
metrics.py
Rango-dz/Chefmate
ffff9c492e26089a7d7726b44e3d78394037d3fe
[ "MIT" ]
7
2020-02-06T23:14:58.000Z
2020-05-08T23:39:35.000Z
metrics.py
Rango-dz/Chefmate
ffff9c492e26089a7d7726b44e3d78394037d3fe
[ "MIT" ]
166
2020-02-12T23:24:32.000Z
2021-12-13T20:34:13.000Z
metrics.py
Rango-dz/Chefmate
ffff9c492e26089a7d7726b44e3d78394037d3fe
[ "MIT" ]
1
2020-05-08T23:43:26.000Z
2020-05-08T23:43:26.000Z
#!/usr/bin/python import sys import datetime def main(argv): print "\n" if str(argv[0]) == '1': # AVG SEARCH TIME usingDateRange = 0 if (len(argv) == 3): usingDateRange = 1 try: startDateObj = datetime.datetime.strptime(argv[1].strip().split(":")[0], '%Y/%m/%d') startTimeInt = (int(argv[1].strip().split(":")[1]) * 60 * 60) + (int(argv[1].strip().split(":")[2]) * 60) + (int(argv[1].strip().split(":")[3])) endDateObj = datetime.datetime.strptime(argv[2].strip().split(":")[0], '%Y/%m/%d') endTimeInt = (int(argv[2].strip().split(":")[1]) * 60 * 60) + (int(argv[2].strip().split(":")[2]) * 60) + (int(argv[2].strip().split(":")[3])) except (IndexError, ValueError): print "Malformed Date Argument(s), use './metrics help' to see proper format\n" return file1 = open('./client/logs/searchTime.txt', 'r') Lines = file1.readlines() count = 0 total = 0 for line in Lines: dateStr = line.strip().split(" - ")[0] timeStr = dateStr.strip().split(" ")[1] try: currDateObj = datetime.datetime.strptime(dateStr.strip().split(" ")[0], '%Y/%m/%d') currTimeInt = (int(timeStr.strip().split(":")[0]) * 60 * 60) + (int(timeStr.strip().split(":")[1]) * 60) + (int(timeStr.strip().split(":")[2])) except (IndexError, ValueError): print "Malformed entry in searchTime.txt, exitting..." return if (usingDateRange == 1): if ((currDateObj < startDateObj) | (currDateObj > endDateObj)): continue if (currDateObj == startDateObj): if (currTimeInt < startTimeInt): continue if (currDateObj == endDateObj): if (currTimeInt > endTimeInt): continue total = total + float(line.strip().split(" - ")[1]) count = count + 1 if (count == 0): print "No data available in the described date/time range" else : print 'avg search time (s): ', (total/float(count))/1000 print 'over ', count, ' datapoints' elif (argv[0] == '2'): # NUM OF SEARCHES usingDateRange = 0 if (len(argv) == 3): usingDateRange = 1 try: startDateObj = datetime.datetime.strptime(argv[1].strip().split(":")[0], '%Y/%m/%d') startTimeInt = (int(argv[1].strip().split(":")[1]) * 60 * 60) + (int(argv[1].strip().split(":")[2]) * 60) + (int(argv[1].strip().split(":")[3])) endDateObj = datetime.datetime.strptime(argv[2].strip().split(":")[0], '%Y/%m/%d') endTimeInt = (int(argv[2].strip().split(":")[1]) * 60 * 60) + (int(argv[2].strip().split(":")[2]) * 60) + (int(argv[2].strip().split(":")[3])) except (IndexError, ValueError): print "Malformed Date Argument(s), use './metrics help' to see proper format\n" return file1 = open('./client/logs/searchTime.txt', 'r') Lines = file1.readlines() count = 0 for line in Lines: dateStr = line.strip().split(" - ")[0] timeStr = dateStr.strip().split(" ")[1] try: currDateObj = datetime.datetime.strptime(dateStr.strip().split(" ")[0], '%Y/%m/%d') currTimeInt = (int(timeStr.strip().split(":")[0]) * 60 * 60) + (int(timeStr.strip().split(":")[1]) * 60) + (int(timeStr.strip().split(":")[2])) except (IndexError, ValueError): print "Malformed entry in searchTime.txt, exitting..." return if (usingDateRange == 1): if ((currDateObj < startDateObj) | (currDateObj > endDateObj)): continue if (currDateObj == startDateObj): if (currTimeInt < startTimeInt): continue if (currDateObj == endDateObj): if (currTimeInt > endTimeInt): continue count = count + 1 if (count == 0): print "No data available in the described date/time range" else : print 'number of searches: ', (count) print "\n" if __name__ == "__main__": main(sys.argv[1:])
45.22
160
0.488501
467
4,522
4.713062
0.188437
0.131758
0.049977
0.054521
0.890959
0.890959
0.890959
0.890959
0.890959
0.890959
0
0.036117
0.332596
4,522
100
161
45.22
0.693174
0.010615
0
0.860465
0
0
0.122093
0.012522
0
0
0
0
0
0
null
null
0
0.023256
null
null
0.127907
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
0
0
0
8
2e3d1c70e97da4324b262fa012ab22f2dfcd4bdc
17
py
Python
test/2.py
nus-cs4215/x-slang-t3-ss-zlx
389ae814703dc41f89b8d28d557dffff8b83109f
[ "Apache-2.0" ]
null
null
null
test/2.py
nus-cs4215/x-slang-t3-ss-zlx
389ae814703dc41f89b8d28d557dffff8b83109f
[ "Apache-2.0" ]
null
null
null
test/2.py
nus-cs4215/x-slang-t3-ss-zlx
389ae814703dc41f89b8d28d557dffff8b83109f
[ "Apache-2.0" ]
null
null
null
a = [1,3,7] a[1]
8.5
12
0.352941
6
17
1
0.666667
0.666667
0
0
0
0
0
0
0
0
0
0.307692
0.235294
17
2
13
8.5
0.153846
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
1
null
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
2e54347e5fc21bdf61bc7b1f97c1dcfbd1b0972e
26,228
py
Python
metal_python/api/ip_api.py
metal-stack/metal-python
cdf40fa86d2b2944f9818cef1c6723b1eecc506e
[ "MIT" ]
7
2020-12-21T05:24:24.000Z
2022-02-12T20:55:32.000Z
metal_python/api/ip_api.py
metal-stack/metal-python
cdf40fa86d2b2944f9818cef1c6723b1eecc506e
[ "MIT" ]
6
2020-09-16T07:23:34.000Z
2022-01-18T12:05:30.000Z
metal_python/api/ip_api.py
metal-stack/metal-python
cdf40fa86d2b2944f9818cef1c6723b1eecc506e
[ "MIT" ]
null
null
null
# coding: utf-8 """ metal-api API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501 OpenAPI spec version: v0.15.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from metal_python.api_client import ApiClient class IpApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def allocate_ip(self, body, **kwargs): # noqa: E501 """allocate an ip in the given network. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.allocate_ip(body, async_req=True) >>> result = thread.get() :param async_req bool :param V1IPAllocateRequest body: (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.allocate_ip_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.allocate_ip_with_http_info(body, **kwargs) # noqa: E501 return data def allocate_ip_with_http_info(self, body, **kwargs): # noqa: E501 """allocate an ip in the given network. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.allocate_ip_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param V1IPAllocateRequest body: (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method allocate_ip" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `allocate_ip`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['HMAC', 'jwt'] # noqa: E501 return self.api_client.call_api( '/v1/ip/allocate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1IPResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def allocate_specific_ip(self, ip, body, **kwargs): # noqa: E501 """allocate a specific ip in the given network. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.allocate_specific_ip(ip, body, async_req=True) >>> result = thread.get() :param async_req bool :param str ip: ip to try to allocate (required) :param V1IPAllocateRequest body: (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.allocate_specific_ip_with_http_info(ip, body, **kwargs) # noqa: E501 else: (data) = self.allocate_specific_ip_with_http_info(ip, body, **kwargs) # noqa: E501 return data def allocate_specific_ip_with_http_info(self, ip, body, **kwargs): # noqa: E501 """allocate a specific ip in the given network. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.allocate_specific_ip_with_http_info(ip, body, async_req=True) >>> result = thread.get() :param async_req bool :param str ip: ip to try to allocate (required) :param V1IPAllocateRequest body: (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ all_params = ['ip', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method allocate_specific_ip" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ip' is set if ('ip' not in params or params['ip'] is None): raise ValueError("Missing the required parameter `ip` when calling `allocate_specific_ip`") # noqa: E501 # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `allocate_specific_ip`") # noqa: E501 collection_formats = {} path_params = {} if 'ip' in params: path_params['ip'] = params['ip'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['HMAC', 'jwt'] # noqa: E501 return self.api_client.call_api( '/v1/ip/allocate/{ip}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1IPResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def find_i_ps(self, body, **kwargs): # noqa: E501 """get all ips that match given properties # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_i_ps(body, async_req=True) >>> result = thread.get() :param async_req bool :param V1IPFindRequest body: (required) :return: list[V1IPResponse] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.find_i_ps_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.find_i_ps_with_http_info(body, **kwargs) # noqa: E501 return data def find_i_ps_with_http_info(self, body, **kwargs): # noqa: E501 """get all ips that match given properties # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_i_ps_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param V1IPFindRequest body: (required) :return: list[V1IPResponse] If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_i_ps" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `find_i_ps`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['HMAC', 'jwt'] # noqa: E501 return self.api_client.call_api( '/v1/ip/find', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[V1IPResponse]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def find_ip(self, id, **kwargs): # noqa: E501 """get ip by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_ip(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: identifier of the ip (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.find_ip_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.find_ip_with_http_info(id, **kwargs) # noqa: E501 return data def find_ip_with_http_info(self, id, **kwargs): # noqa: E501 """get ip by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_ip_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: identifier of the ip (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_ip" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `find_ip`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['HMAC', 'jwt'] # noqa: E501 return self.api_client.call_api( '/v1/ip/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1IPResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def free_ip(self, id, **kwargs): # noqa: E501 """frees an ip # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.free_ip(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: identifier of the ip (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.free_ip_with_http_info(id, **kwargs) # noqa: E501 else: (data) = self.free_ip_with_http_info(id, **kwargs) # noqa: E501 return data def free_ip_with_http_info(self, id, **kwargs): # noqa: E501 """frees an ip # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.free_ip_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param str id: identifier of the ip (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method free_ip" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `free_ip`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['HMAC', 'jwt'] # noqa: E501 return self.api_client.call_api( '/v1/ip/free/{id}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1IPResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_i_ps(self, **kwargs): # noqa: E501 """get all ips # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_i_ps(async_req=True) >>> result = thread.get() :param async_req bool :return: list[V1IPResponse] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_i_ps_with_http_info(**kwargs) # noqa: E501 else: (data) = self.list_i_ps_with_http_info(**kwargs) # noqa: E501 return data def list_i_ps_with_http_info(self, **kwargs): # noqa: E501 """get all ips # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_i_ps_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: list[V1IPResponse] If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_i_ps" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['HMAC', 'jwt'] # noqa: E501 return self.api_client.call_api( '/v1/ip', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[V1IPResponse]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_ip(self, body, **kwargs): # noqa: E501 """updates an ip. if the ip was changed since this one was read, a conflict is returned # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_ip(body, async_req=True) >>> result = thread.get() :param async_req bool :param V1IPUpdateRequest body: (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_ip_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.update_ip_with_http_info(body, **kwargs) # noqa: E501 return data def update_ip_with_http_info(self, body, **kwargs): # noqa: E501 """updates an ip. if the ip was changed since this one was read, a conflict is returned # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_ip_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param V1IPUpdateRequest body: (required) :return: V1IPResponse If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_ip" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update_ip`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['HMAC', 'jwt'] # noqa: E501 return self.api_client.call_api( '/v1/ip', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1IPResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
36.733894
156
0.591696
3,037
26,228
4.870925
0.062562
0.051376
0.026499
0.03407
0.956466
0.954506
0.94876
0.940039
0.930034
0.923815
0
0.018379
0.313329
26,228
713
157
36.785414
0.802998
0.313291
0
0.816537
0
0
0.166657
0.030389
0
0
0
0
0
1
0.03876
false
0
0.010336
0
0.105943
0
0
0
0
null
0
0
0
1
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
7
2e8bbab47658ab8d5b9d564a50175ee76b3938e2
24,704
py
Python
ribo_plotting.py
borisz264/ribo_seq
ddcea3c913eab7e669baec1d39379bde656684b8
[ "MIT" ]
null
null
null
ribo_plotting.py
borisz264/ribo_seq
ddcea3c913eab7e669baec1d39379bde656684b8
[ "MIT" ]
1
2020-08-18T06:48:50.000Z
2020-08-18T10:30:52.000Z
ribo_plotting.py
borisz264/ribo_seq
ddcea3c913eab7e669baec1d39379bde656684b8
[ "MIT" ]
null
null
null
import ribo_utils import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams['pdf.fonttype'] = 42 #leaves most text as actual text in PDFs, not outlines import os import uniform_colormaps import math from matplotlib.ticker import AutoMinorLocator def plot_fragment_length_distributions(experiment): dfs = [] for lib in experiment.libs: frag_dict = lib.get_all_CDS_fragment_length_counts() frag_lengths = sorted(frag_dict.keys()) frag_length_counts = [frag_dict[length] for length in frag_lengths] d = {'fragment length': frag_lengths, '# reads': frag_length_counts, '% reads': 100. * np.array(frag_length_counts) / sum(frag_length_counts), 'sample': [lib.lib_settings.sample_name] * len(frag_length_counts)} temp_df = pd.DataFrame(data=d) dfs.append(temp_df) print lib.lib_settings.sample_name, 'reads: ', sum(frag_length_counts) frag_length_df = pd.concat(dfs) out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'fragment_length_distributions.tsv') frag_length_df.to_csv(out_name, sep='\t') out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'fragment_length_percent_pivot.tsv') frag_length_df.pivot(columns='sample', values ='% reads', index='fragment length').to_csv(out_name, sep='\t') fig = plt.figure(figsize=(8, 5)) plots = [] plot = fig.add_subplot(111) color_index = 0 group_df = frag_length_df.groupby(['sample']) for lib in experiment.libs: sample = lib.lib_settings.sample_name df = group_df.get_group(sample) df.plot(x='fragment length', y='% reads', ax=plot, color=ribo_utils.rainbow[color_index%len(ribo_utils.rainbow)], linestyle=ribo_utils.line_styles[color_index/len(ribo_utils.rainbow)], lw=2, sharex=True, sharey=True, label=sample) color_index += 1 plots.append(plot) for plot in plots: #major_xticks = range(12, 60, 3) #plot.set_xticks(major_xticks, minor=False) # plot.set_xticklabels(major_tick_labels) plot.set_ylabel('% CDS-mapping reads', fontsize=20) plot.set_xlabel('fragment length', fontsize=20) # Hide the right and top spines plot.spines['right'].set_visible(False) plot.spines['top'].set_visible(False) #plot.set_xlim(12, 57) #plot.set_ylim(0, 65) # try: # plot.legend_.remove() # except: # pass out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'fragment_length_distributions.pdf') plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_readthrough_box(experiment, log = False): fig = plt.figure(figsize=(8, 8)) num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = 1 colormap = uniform_colormaps.viridis plot_index = 0 plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) data = [] legends = [] boxprops = dict(linewidth=2, color=ribo_utils.black) for lib in experiment.libs: sample_name = lib.lib_settings.sample_name readthroughs = [tx.compute_readthrough_ratio(16, read_end='5p', read_lengths='all', cds_cutoff=128, log=log, post_cds_start_buffer=12, pre_cds_stop_buffer=15, pre_extension_stop_buffer=15, post_cds_stop_buffer=9) for tx in lib.transcripts.values() if (not tx.compute_readthrough_ratio(16, read_end='5p', read_lengths='all', cds_cutoff=128, log=log, post_cds_start_buffer=12, pre_cds_stop_buffer=15, pre_extension_stop_buffer=15, post_cds_stop_buffer=9) == None) and tx.is_coding ] data.append(readthroughs) legends.append('%s (%d)' % (sample_name, len(readthroughs))) # note that all but the last bin exclude the right (larger) edge of the bin. So I add an extra bin. plot.boxplot(data, notch=True, boxprops=boxprops, autorange=True) plot_index += 1 #plot.set_xlabel("fragment length", fontsize=8) if log: plot.set_ylabel("log10 readthrough fraction", fontsize=8) else: plot.set_ylabel("readthrough fraction", fontsize=8) plot.set_xticklabels(legends, rotation=40, ha='right') #plot.set_xlim(min_x, max(bins)) #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() if log: out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'log_readthrough_box.pdf') else: out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'readthrough_box.pdf') plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_frame_distributions(experiment, read_lengths = ['all', [28], [29], [30]], read_ends = ['5p', '3p']): num_libs = len(experiment.libs) num_plots_wide = len(read_lengths) * len(read_ends) num_plots_high = num_libs fig = plt.figure(figsize=(num_plots_wide, num_plots_high)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: for read_end in read_ends: for read_length in read_lengths: plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index+1) sample_name = lib.lib_settings.sample_name frame_counts = np.zeros(3) offsets = {'5p':-15, '3p': 15} offset = offsets[read_end] for transcript in lib.transcripts.values(): if transcript.is_coding: frame_counts = frame_counts + transcript.get_read_frame_counts(transcript.cds_start+offset, transcript.cds_end+offset, read_end=read_end, read_lengths=read_length) # note that all but the last bin exclude the right (larger) edge of the bin. So I add an extra bin. bar_corners = (np.arange(3)+0.25)*.5 bar_width = 0.5*.5 bar_centers = bar_corners + bar_width/2.0 plot.bar(bar_corners, frame_counts/sum(frame_counts), width=bar_width, label=sample_name, lw=0, color=ribo_utils.black) plot.set_ylim(0, 1) plot.set_xticks(bar_centers) plot.set_xticklabels([str(n) for n in range(3)]) #plot.set_xlabel("fragment length", fontsize=8) plot.set_title('%s, %s' % (read_end, str(read_length)), fontsize=8) if plot_index % num_plots_wide == 0: plot.set_ylabel(sample_name, fontsize=8) plt.setp(plot.get_xticklabels(), fontsize=7) plt.setp(plot.get_yticklabels(), fontsize=7) #plot.set_xlim(min_x, max(bins)) plot_index += 1 plt.subplots_adjust(wspace=0.5, hspace=0.5) #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) #plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'frame_ distributions.pdf') plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_start_codon_average(experiment, up = 100, down = 500, min_cds_reads = 128, read_end='5p', read_lengths='all'): num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = num_libs fig = plt.figure(figsize=(8, 2*num_libs)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) sample_name = lib.lib_settings.sample_name normed_count_sum = np.zeros(down+up+1) inclusion_sum = np.zeros(down + up + 1) for transcript in lib.transcripts.values(): if transcript.is_coding: if read_end == '5p': start_offset = -15 stop_offset = -12 elif read_end == '3p': start_offset = 14 stop_offset = 18 cds_reads = transcript.get_cds_read_count(start_offset, stop_offset, read_end=read_end, read_lengths=read_lengths) if cds_reads >= min_cds_reads: tx_count, tx_inclusion = transcript.get_CDS_read_counts_array(transcript.cds_start, -1 * up, down, read_end=read_end, read_lengths=read_lengths) normed_count_sum += tx_count/(float(cds_reads)/transcript.cds_length) inclusion_sum += tx_inclusion nt_positions = np.arange(-1*up, down+1)-0.5 plot.bar(nt_positions, normed_count_sum/inclusion_sum, color=colormap((plot_index - 1) / float(len(experiment.libs))), lw=0, label=sample_name) plot.set_title(sample_name, fontsize=8) plot_index += 1 if plot_index == num_libs: plot.set_xlabel("relative to CDS start", fontsize=8) plot.set_ylabel("average density\n (read %s end)" % (read_end), fontsize=8) plot.set_xlim(-1 * up, down) plot.set_ylim(0, 8) minorLocator = AutoMinorLocator(10) plot.xaxis.set_minor_locator(minorLocator) plot.get_xaxis().set_tick_params(which='both', direction='out') plot.get_yaxis().set_tick_params(which='both', direction='out') #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'start_codon_avg_%s_%s.pdf' %(read_end, str(read_lengths))) plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_second_stop_positions(experiment, up = 500, down = 100, min_cds_reads = 128, read_end='5p', read_lengths='all'): num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = num_libs fig = plt.figure(figsize=(8, 2*num_libs)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: sample_name = lib.lib_settings.sample_name plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) second_stop_positions = [] for transcript in lib.transcripts.values(): if transcript.is_coding: cds_reads = transcript.get_cds_read_count(-15, 12, read_end=read_end, read_lengths=read_lengths) if cds_reads >= min_cds_reads: second_stop = transcript.second_stop_position() if not second_stop == None: second_stop_positions.append(second_stop+3-transcript.cds_end) bins = range(-10, 200) bins.append(1000000) hist, bin_edges = np.histogram(second_stop_positions, bins) plot.bar(bin_edges[:-1]-0.5, hist, color=colormap((plot_index - 1) / float(len(experiment.libs))), lw=0, label=sample_name) plot.set_title(sample_name, fontsize=8) plot_index += 1 if plot_index == num_libs: plot.set_xlabel("second in-frame stop relative to CDS stop", fontsize=8) plot.set_ylabel("# genes", fontsize=8) plot.set_xlim(-10, 200) minorLocator = AutoMinorLocator(10) plot.xaxis.set_minor_locator(minorLocator) plot.get_xaxis().set_tick_params(which='both', direction='out') plot.get_yaxis().set_tick_params(which='both', direction='out') #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'second_stop_positions.pdf') plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_stop_codon_average(experiment, up = 500, down = 100, min_cds_reads = 128, read_end='5p', read_lengths='all'): ''' :param experiment: :param up: :param down: :param min_cds_reads: :param read_end: :param read_lengths: :return: ''' num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = num_libs fig = plt.figure(figsize=(8, 2*num_libs)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) sample_name = lib.lib_settings.sample_name normed_count_sum = np.zeros(down+up+1) inclusion_sum = np.zeros(down + up + 1) for transcript in lib.transcripts.values(): if transcript.is_coding: if read_end == '5p': start_offset = -15 stop_offset = -12 elif read_end == '3p': start_offset = 14 stop_offset = 18 cds_reads = transcript.get_cds_read_count(start_offset, stop_offset, read_end=read_end, read_lengths=read_lengths) if cds_reads >= min_cds_reads: tx_count, tx_inclusion = transcript.get_CDS_read_counts_array(transcript.cds_end, -1 * up, down, read_end=read_end, read_lengths=read_lengths) normed_count_sum += tx_count/(float(cds_reads)/transcript.cds_length) inclusion_sum += tx_inclusion nt_positions = np.arange(-1*up, down+1)-0.5 plot.bar(nt_positions, normed_count_sum/inclusion_sum, color=colormap((plot_index - 1) / float(len(experiment.libs))), lw=0, label=sample_name) plot.set_title(sample_name, fontsize=8) plot_index += 1 if plot_index == num_libs: plot.set_xlabel("nt relative to stop codon", fontsize=8) plot.set_ylabel("average density\n (read %s end)" % (read_end), fontsize=8) plot.set_xlim(-1*up, down) minorLocator = AutoMinorLocator(10) plot.xaxis.set_minor_locator(minorLocator) plot.get_xaxis().set_tick_params(which='both', direction='out') plot.get_yaxis().set_tick_params(which='both', direction='out') #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'stop_codon_avg_%s_%s.pdf' %(read_end, str(read_lengths))) plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_first_exon_average(experiment, up = 500, down = 100, min_cds_reads = 128, read_end='5p', read_lengths='all'): num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = num_libs fig = plt.figure(figsize=(8, 2*num_libs)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) sample_name = lib.lib_settings.sample_name normed_count_sum = np.zeros(down+up+1) inclusion_sum = np.zeros(down + up + 1) for transcript in lib.transcripts.values(): if transcript.is_coding: if not transcript.get_first_jxn_in_CDS() == None: if read_end == '5p': start_offset = -15 stop_offset = -12 elif read_end == '3p': start_offset = 14 stop_offset = 18 cds_reads = transcript.get_cds_read_count(start_offset, stop_offset, read_end=read_end, read_lengths=read_lengths) if cds_reads >= min_cds_reads: tx_count, tx_inclusion = transcript.get_CDS_read_counts_array(transcript.get_first_jxn_in_CDS(), -1 * up, down, read_end=read_end, read_lengths=read_lengths) normed_count_sum += tx_count/(float(cds_reads)/transcript.cds_length) inclusion_sum += tx_inclusion nt_positions = np.arange(-1*up, down+1)-0.5 plot.bar(nt_positions, normed_count_sum/inclusion_sum, color=colormap((plot_index - 1) / float(len(experiment.libs))), lw=0, label=sample_name) plot.set_title(sample_name, fontsize=8) plot_index += 1 if plot_index == num_libs: plot.set_xlabel("relative to second exon start", fontsize=8) plot.set_ylabel("average density\n (read %s end)" % (read_end), fontsize=8) plot.set_xlim(-1*up, down) minorLocator = AutoMinorLocator(10) plot.xaxis.set_minor_locator(minorLocator) plot.get_xaxis().set_tick_params(which='both', direction='out') plot.get_yaxis().set_tick_params(which='both', direction='out') #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'first_ej_avg_%s_%s.pdf' %(read_end, str(read_lengths))) plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_stop_positional_read_lengths(experiment, up = 500, down = 100, min_cds_reads = 128, read_end='5p', read_lengths='all'): num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = num_libs fig = plt.figure(figsize=(8, 2*num_libs)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) sample_name = lib.lib_settings.sample_name length_sum = np.zeros(down+up+1) count_sum = np.zeros(down + up + 1) for transcript in lib.transcripts.values(): if transcript.is_coding: if read_end == '5p': start_offset = -15 stop_offset = -12 elif read_end == '3p': start_offset = 14 stop_offset = 18 cds_reads = transcript.get_cds_read_count(start_offset, stop_offset, read_end=read_end, read_lengths=read_lengths) if cds_reads >= min_cds_reads: length_sum_array, counts_array = transcript.get_avg_read_lengths_array(transcript.cds_end, -1*up, down, read_end=read_end) length_sum += length_sum_array count_sum += counts_array nt_positions = np.arange(-1*up, down+1) plot.plot(nt_positions, length_sum/count_sum, color=colormap((plot_index - 1) / float(len(experiment.libs))), lw=1, label=sample_name) plot.set_title(sample_name, fontsize=8) plot_index += 1 if plot_index == num_libs: plot.set_xlabel("relative to CDS stop", fontsize=8) plot.set_ylabel("avg read length\n (read %s end)" % (read_end), fontsize=8) plot.set_xlim(-1*up, down) #plot.set_ylim(25, 35) minorLocator = AutoMinorLocator(10) plot.xaxis.set_minor_locator(minorLocator) plot.get_xaxis().set_tick_params(which='both', direction='out') plot.get_yaxis().set_tick_params(which='both', direction='out') #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'stop_lengths_%s_%s.pdf' %(read_end, str(read_lengths))) plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_start_positional_read_lengths(experiment, up = 500, down = 100, min_cds_reads = 128, read_end='5p', read_lengths='all'): num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = num_libs fig = plt.figure(figsize=(8, 2*num_libs)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) sample_name = lib.lib_settings.sample_name length_sum = np.zeros(down+up+1) count_sum = np.zeros(down + up + 1) for transcript in lib.transcripts.values(): if transcript.is_coding: if read_end == '5p': start_offset = -15 stop_offset = -12 elif read_end == '3p': start_offset = 14 stop_offset = 18 cds_reads = transcript.get_cds_read_count(start_offset, stop_offset, read_end=read_end, read_lengths=read_lengths) if cds_reads >= min_cds_reads: length_sum_array, counts_array = transcript.get_avg_read_lengths_array(transcript.cds_start, -1*up, down, read_end=read_end) length_sum += length_sum_array count_sum += counts_array nt_positions = np.arange(-1*up, down+1) plot.plot(nt_positions, length_sum/count_sum, color=colormap((plot_index - 1) / float(len(experiment.libs))), lw=1, label=sample_name) plot.set_title(sample_name, fontsize=8) plot_index += 1 if plot_index == num_libs: plot.set_xlabel("relative to CDS stop", fontsize=8) plot.set_ylabel("avg read length\n (read %s end)" % (read_end), fontsize=8) plot.set_xlim(-1*up, down) #plot.set_ylim(25, 35) minorLocator = AutoMinorLocator(10) plot.xaxis.set_minor_locator(minorLocator) plot.get_xaxis().set_tick_params(which='both', direction='out') plot.get_yaxis().set_tick_params(which='both', direction='out') #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'start_lengths_%s_%s.pdf' %(read_end, str(read_lengths))) plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def plot_first_exon_positional_read_lengths(experiment, up = 500, down = 100, min_cds_reads = 128, read_end='5p', read_lengths='all'): num_libs = len(experiment.libs) num_plots_wide = 1 num_plots_high = num_libs fig = plt.figure(figsize=(8, 2*num_libs)) colormap = uniform_colormaps.viridis plot_index = 0 for lib in experiment.libs: plot = fig.add_subplot(num_plots_high, num_plots_wide, plot_index + 1) sample_name = lib.lib_settings.sample_name length_sum = np.zeros(down+up+1) count_sum = np.zeros(down + up + 1) for transcript in lib.transcripts.values(): if transcript.is_coding and not transcript.get_first_jxn_in_CDS() == None: if read_end == '5p': start_offset = -15 stop_offset = -12 elif read_end == '3p': start_offset = 14 stop_offset = 18 cds_reads = transcript.get_cds_read_count(start_offset, stop_offset, read_end=read_end, read_lengths=read_lengths) if cds_reads >= min_cds_reads: length_sum_array, counts_array = transcript.get_avg_read_lengths_array(transcript.get_first_jxn_in_CDS(), -1*up, down, read_end=read_end) length_sum += length_sum_array count_sum += counts_array nt_positions = np.arange(-1*up, down+1) plot.plot(nt_positions, length_sum/count_sum, color=colormap((plot_index - 1) / float(len(experiment.libs))), lw=1, label=sample_name) plot.set_title(sample_name, fontsize=8) plot_index += 1 if plot_index == num_libs: plot.set_xlabel("relative to CDS stop", fontsize=8) plot.set_ylabel("avg read length\n (read %s end)" % (read_end), fontsize=8) plot.set_xlim(-1*up, down) #plot.set_ylim(25, 35) minorLocator = AutoMinorLocator(10) plot.xaxis.set_minor_locator(minorLocator) plot.get_xaxis().set_tick_params(which='both', direction='out') plot.get_yaxis().set_tick_params(which='both', direction='out') #lg = plt.legend(loc=2, prop={'size': 12}, labelspacing=0.2) #lg.draw_frame(False) plt.tight_layout() out_name = os.path.join(experiment.settings.get_rdir(), 'plots', 'first_ej_lengths_%s_%s.pdf' %(read_end, str(read_lengths))) plt.savefig(out_name, transparent='True', format='pdf') plt.clf() def codon_metaplots(library): pass
51.790356
211
0.625405
3,330
24,704
4.359459
0.084685
0.031343
0.017221
0.017566
0.803472
0.794517
0.780258
0.76717
0.762279
0.756975
0
0.025131
0.260687
24,704
476
212
51.89916
0.769711
0.057683
0
0.698795
0
0
0.053445
0.012517
0
0
0
0
0
0
null
null
0.00241
0.019277
null
null
0.00241
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
1
0
0
0
0
0
0
0
0
7
cf06f5be426b2b8344be483145f6546a3509eb60
269
py
Python
py_toolbelt/other_toolbelt.py
soamicharan/py_toolbelt
b2800a750bb554368b2ccf040e79c262c4b24e1e
[ "MIT" ]
null
null
null
py_toolbelt/other_toolbelt.py
soamicharan/py_toolbelt
b2800a750bb554368b2ccf040e79c262c4b24e1e
[ "MIT" ]
null
null
null
py_toolbelt/other_toolbelt.py
soamicharan/py_toolbelt
b2800a750bb554368b2ccf040e79c262c4b24e1e
[ "MIT" ]
null
null
null
def is_not_none(object=None, **kwargs): return (kwargs.get('on_true', True) if object is not None else kwargs.get('on_false', False)) def is_none(object=None, **kwargs): return (kwargs.get('on_true', True) if object is None else kwargs.get('on_false', False))
44.833333
97
0.710037
46
269
4
0.282609
0.195652
0.23913
0.217391
0.913043
0.913043
0.913043
0.597826
0.597826
0.597826
0
0
0.133829
269
5
98
53.8
0.7897
0
0
0
0
0
0.111524
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
0
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
9
cf243122998055b6fd029372f55c21addf4d6784
11,008
py
Python
hypixel_chinese_skyblock_bot/Commands/VerifyId.py
whats2000/hypixel-chinese-skyblock-bot
0e20fbcb5aaf7e5ca0558f7600a1337aa6a9990c
[ "MIT" ]
1
2021-06-23T16:32:54.000Z
2021-06-23T16:32:54.000Z
hypixel_chinese_skyblock_bot/Commands/VerifyId.py
whats2000/hypixel-chinese-skyblock-bot
0e20fbcb5aaf7e5ca0558f7600a1337aa6a9990c
[ "MIT" ]
null
null
null
hypixel_chinese_skyblock_bot/Commands/VerifyId.py
whats2000/hypixel-chinese-skyblock-bot
0e20fbcb5aaf7e5ca0558f7600a1337aa6a9990c
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from hypixel_chinese_skyblock_bot.Core.Common import CodExtension, get_hypixel_api, get_setting_json, set_user_id, \ get_verify_id_list from hypixel_chinese_skyblock_bot.Core.UserData import UserData class VerifyId(CodExtension): @commands.command() async def verifyid(self, ctx, args=None): # check is in the desired channel. if ctx.channel.id == get_setting_json('VerifyIdChannelId'): # check is player input its id if args is not None: # check is player has been verified if get_setting_json('VerifyIdRole') not in [y.name.lower() for y in ctx.message.author.roles]: player = get_verify_id_list(ctx.message.author) player_data = UserData(player) player_data.api = get_hypixel_api(args) print('> verify player user : ' + str(ctx.message.author)) # check get hypixel api is successes if player_data.api['success']: print('> get hypixel api success') player_data.set_latest_user_api() # try to get player social media discord try: player_data.discord = player_data.api['player']['socialMedia']['links']['DISCORD'] # check user name is correct in api if str(ctx.message.author) == player_data.discord: set_user_id(ctx.message.author, args) print('- Verify Id success') embed = discord.Embed( title='成功驗證', description=str(ctx.message.author) + ' ---> ' + args, color=0x00ff00 ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed) role = discord.utils.get(ctx.message.author.guild.roles, name=get_setting_json('VerifyIdRole')) await ctx.author.add_roles(role) else: print('> Player not found') embed = discord.Embed( title='驗證失敗,玩家id不正確', description=str(ctx.message.author) + ' -x-> ' + args, color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) except KeyError: print('> The player do not open the social media') embed = discord.Embed( title='驗證失敗,請先打開discord api', description=str(ctx.message.author) + ' -x-> ' + args, color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) else: print('> Please wait a little bit and try again') embed = discord.Embed( title='驗證失敗,請稍後重試', description=str(ctx.message.author) + ' -x-> ' + args, color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) else: print('> Has already verified') embed = discord.Embed( title='你已經驗證,更新請用sb?verifyidupdate', description=str(ctx.message.author) + ' -x-> ' + args, color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) else: print('> Required id') embed = discord.Embed( title='你需要在指令後方加上自己的 id', description=str(ctx.message.author) + ' -x-> ?', color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) else: print('> Wrong channel') embed = discord.Embed( title='請在正確頻道輸入', color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) await ctx.message.delete() @commands.command() async def verifyidupdate(self, ctx, args=None): # check is in the desired channel. if ctx.channel.id == get_setting_json('VerifyIdChannelId'): # check is player input its id if args is not None: player = get_verify_id_list(ctx.message.author) player_data = UserData(player) player_data.api = get_hypixel_api(args) print('> update player user : ' + str(ctx.message.author)) # check is player has been verified if get_setting_json('VerifyIdRole') in [y.name.lower() for y in ctx.message.author.roles]: # check get hypixel api is successes if player_data.api['success']: print('> get hypixel api success') player_data.set_latest_user_api() # try to get player social media discord try: player_data.discord = player_data.api['player']['socialMedia']['links']['DISCORD'] # check user name is correct in api if str(ctx.message.author) == player_data.discord: set_user_id(ctx.message.author, args) print('> update Id success') embed = discord.Embed( title='成功更新', description=str(ctx.message.author) + ' ---> ' + args, color=0x00ff00 ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed) else: print('> Player not found') embed = discord.Embed( title='驗證失敗,玩家id不正確', description=str(ctx.message.author) + ' -x-> ' + args, color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) except KeyError: print('> The player do not open the social media') embed = discord.Embed( title='驗證失敗,請先打開 hypixel discord api', description=str(ctx.message.author) + ' -x-> ' + args, color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) else: print('> Please wait a little bit and try again') print('> fail reason : ' + player_data.api['cause']) embed = discord.Embed( title='驗證失敗,請稍後重試', description=str(ctx.message.author) + ' -x-> ' + args + '\n\n' + '原因 : ' + player_data.api[ 'cause'], color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) else: print('> Required id') embed = discord.Embed( title='你需要在指令後方加上自己的 id', description=str(ctx.message.author) + ' -x-> ?', color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) else: print('> Wrong channel') embed = discord.Embed( title='請在正確頻道輸入', color=0xe74c3c ) embed.set_author( name=ctx.message.author.name, icon_url=ctx.message.author.avatar_url ) await ctx.send(embed=embed, delete_after=20.0) await ctx.message.delete() def setup(pybot): pybot.add_cog(VerifyId(pybot))
38.760563
119
0.421966
945
11,008
4.795767
0.131217
0.110327
0.169462
0.062886
0.877979
0.877979
0.849735
0.836937
0.836937
0.836937
0
0.015735
0.497729
11,008
283
120
38.897527
0.803943
0.036973
0
0.728643
0
0
0.078485
0.00255
0
0
0.009822
0
0
1
0.005025
false
0
0.020101
0
0.030151
0.090452
0
0
0
null
0
0
0
1
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
7
cf38ba43094e48c1d4f128798069b61c16b3156b
2,305
py
Python
uuidbase62/tests/test_dependencies.py
jaddison/fastapi-uuidbase62
e43bfcfb0d1b2546bace124e296bfac9065560c2
[ "MIT" ]
1
2022-03-30T19:01:10.000Z
2022-03-30T19:01:10.000Z
uuidbase62/tests/test_dependencies.py
jaddison/fastapi-uuidbase62
e43bfcfb0d1b2546bace124e296bfac9065560c2
[ "MIT" ]
null
null
null
uuidbase62/tests/test_dependencies.py
jaddison/fastapi-uuidbase62
e43bfcfb0d1b2546bace124e296bfac9065560c2
[ "MIT" ]
null
null
null
import uuid import fastapi import pytest from pydantic import BaseModel from uuidbase62 import ( UUIDBase62, UUIDBase62ModelMixin, con_uuidbase62, get_validated_uuidbase62, get_validated_uuidbase62_by_model, ) class Item(UUIDBase62ModelMixin, BaseModel): client_id: con_uuidbase62(prefix="my_prefix") # type: ignore def test_get_validated_uuidbase62_by_model_function__returns_callable(): func = get_validated_uuidbase62_by_model(Item, "client_id", "item_id") assert callable(func) def test_get_validated_uuidbase62_by_model_function__with_valid_input__returns_valid_uuidbase62_value(): prefix = "my_prefix" value = f"{prefix}_7yNMTpVy8ddRxYKGJqtk7e" func = get_validated_uuidbase62_by_model(Item, "client_id", "item_id") uuidbase62_value = func(value) assert isinstance(uuidbase62_value, UUIDBase62) assert uuidbase62_value.value == value assert uuidbase62_value.prefix == prefix assert isinstance(uuidbase62_value.uuid, uuid.UUID) def test_get_validated_uuidbase62_function__returns_callable(): func = get_validated_uuidbase62("item_id") assert callable(func) def test_get_validated_uuidbase62_function__with_valid_input__returns_valid_uuidbase62_value(): prefix = "my_prefix" value = f"{prefix}_7yNMTpVy8ddRxYKGJqtk7e" func = get_validated_uuidbase62("item_id", prefix) uuidbase62_value = func(value) assert isinstance(uuidbase62_value, UUIDBase62) assert uuidbase62_value.value == value assert uuidbase62_value.prefix == prefix assert isinstance(uuidbase62_value.uuid, uuid.UUID) def test_get_validated_uuidbase62_function__with_invalid_input__returns_valid_uuidbase62_value(): value = f"my_prefix_7yNMTpVy8ddRxYKGJqtk7e" func = get_validated_uuidbase62("item_id", "different_prefix") with pytest.raises(fastapi.exceptions.HTTPException) as e: func(value) assert e.value.status_code == 404 def test_get_validated_uuidbase62_by_model_function__with_invalid_input__returns_valid_uuidbase62_value(): value = f"different_prefix_7yNMTpVy8ddRxYKGJqtk7e" func = get_validated_uuidbase62_by_model(Item, "client_id", "item_id") with pytest.raises(fastapi.exceptions.HTTPException) as e: func(value) assert e.value.status_code == 404
31.148649
106
0.790022
280
2,305
6.039286
0.164286
0.09935
0.182141
0.09935
0.845062
0.827912
0.827912
0.794796
0.729746
0.704317
0
0.045272
0.137527
2,305
73
107
31.575342
0.805332
0.005206
0
0.510204
0
0
0.10694
0.058053
0
0
0
0
0.244898
1
0.122449
false
0
0.102041
0
0.265306
0
0
0
0
null
0
1
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
7
cf61d27de57659933f48f34b5668468eca784274
51,214
py
Python
foo/wx/wx_items.py
ThomasZh/legend-club-wxpub
a10dbe5c25dda8e85826a0039c41406e1044af0a
[ "Apache-2.0" ]
2
2017-05-12T04:20:07.000Z
2018-04-18T02:48:34.000Z
foo/wx/wx_items.py
ThomasZh/legend-club-wxpub
a10dbe5c25dda8e85826a0039c41406e1044af0a
[ "Apache-2.0" ]
null
null
null
foo/wx/wx_items.py
ThomasZh/legend-club-wxpub
a10dbe5c25dda8e85826a0039c41406e1044af0a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # _*_ coding: utf-8_*_ # # Copyright 2016 planc2c.com # dev@tripc2c.com # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import tornado.web import logging import uuid import time import re import json as JSON # 启用别名,不会跟方法里的局部变量混淆 import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../")) sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../dao")) from tornado.escape import json_encode, json_decode from tornado.httpclient import HTTPClient from tornado.httputil import url_concat from bson import json_util from comm import * from dao import budge_num_dao from dao import category_dao from dao import activity_dao from dao import group_qrcode_dao from dao import cret_template_dao from dao import bonus_template_dao from dao import bonus_dao from dao import apply_dao from dao import order_dao from dao import group_qrcode_dao from dao import vendor_member_dao from dao import voucher_dao from dao import insurance_template_dao from dao import contact_dao from dao import vendor_hha_dao from dao import voucher_pay_dao from dao import vendor_wx_dao from dao import voucher_order_dao from dao import trip_router_dao from dao import triprouter_share_dao from dao import club_dao from dao import activity_share_dao from dao import vendor_wx_dao from foo.wx import wx_wrap from xml_parser import parseWxOrderReturn, parseWxPayReturn from global_const import * # 俱乐部首页 class WxItemsIndexHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("got club_id %r", club_id) access_token = self.get_access_token() guest_id = DEFAULT_USER_ID if len(club_id) == 32: guest_id = DEFAULT_USER_ID elif len(club_id) == 64: guest_id = club_id[32:64] club_id = club_id[0:32] else: guest_id = club_id[32:64] club_id = club_id[0:32] logging.info("got club_id=[%r]", club_id) logging.info("got guest_id=[%r]", guest_id) # club = self.get_club_basic_info(club_id) # logging.info("got club %r", club) url = API_DOMAIN+"/api/clubs/"+club_id http_client = HTTPClient() response = http_client.fetch(url, method="GET") logging.info("got response %r", response.body) data = json_decode(response.body) club = data['rs'] if not club.has_key('img'): club['img'] = '' if not club.has_key('paragraphs'): club['paragraphs'] = '' my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] wx_app_secret = wx_app_info['wx_app_secret'] wx_notify_domain = wx_app_info['wx_notify_domain'] logging.info("got wx_app_info=[%r]", wx_app_info) wx_access_token = wx_wrap.getAccessTokenByClientCredential(wx_app_id, wx_app_secret) _jsapi_ticket = wx_wrap.getJsapiTicket(wx_access_token) _url = wx_notify_domain + self.request.uri share_url = wx_notify_domain + "/bf/wx/vendors/"+club_id+my_account_id+"/index" _sign = wx_wrap.Sign(_jsapi_ticket, _url).sign() logging.info("got sign=[%r]", _sign) self.render('items/main.html', api_domain = API_DOMAIN, access_token=access_token, club_id = club_id, club=club, wx_app_id=wx_app_id, share_url=share_url, sign=_sign) # 默认分类列表 class WxItemsCategoryListDefaultHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self): logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("GET %r", self.request.uri) club_id = CLUB_ID last_visit_club_id = self.get_cookie("last_visit_club_id") logging.info("got last_visit_club_id=[%r]", last_visit_club_id) if last_visit_club_id == None: last_visit_club_id = club_id self.set_cookie("last_visit_club_id", last_visit_club_id) self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/category/items") else: self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/category/items") # 分类列表 class WxItemsCategoryListHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("GET %r", self.request.uri) self.set_cookie("last_visit_club_id", club_id) guest_id = DEFAULT_USER_ID if len(club_id) == 32: guest_id = DEFAULT_USER_ID elif len(club_id) == 64: guest_id = club_id[32:64] club_id = club_id[0:32] else: guest_id = club_id[32:64] club_id = club_id[0:32] logging.info("got club_id=[%r]", club_id) logging.info("got guest_id=[%r]", guest_id) category_id = self.get_argument("category_id", "") logging.info("got category_id %r", category_id) second_category_id = self.get_argument("second_category_id", "") logging.info("got second_category_id %r", second_category_id) # 查询分类 access_token = self.get_access_token() logging.info("GET access_token=[%r]", access_token) my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) club = self.get_club_basic_info(club_id) logging.info("get club %r",club) league_id = club['league_id'] url = API_DOMAIN + "/api/def/leagues/"+ league_id +"/categories" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.debug("got categorys response.body %r", response.body) data = json_decode(response.body) categorys = data['rs'] if not category_id: category_id = categorys[0]['_id'] url = API_DOMAIN + "/api/def/categories/" + category_id + "/level2" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.debug("got second_categorys response.body %r", response.body) data = json_decode(response.body) second_categorys = data['rs'] # 获取商品数量 /api/clubs/([a-z0-9]*)/cart/nums url = API_DOMAIN + "/api/clubs/" + club_id + "/cart/nums" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.debug("got cart_goods_num response.body %r", response.body) data = json_decode(response.body) cart_goods_num = data['data']['quantity'] logging.info("got cart_goods_num %r", cart_goods_num) second_specs = None second_brands = None if not second_category_id: second_category_id = second_categorys[0]['_id'] url = API_DOMAIN + "/api/def/categories/"+ second_category_id +"/specs" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.debug("got second_specs response.body %r", response.body) data = json_decode(response.body) second_specs = data['rs'] url = API_DOMAIN + "/api/def/categories/"+ second_category_id +"/brands" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.debug("got second_brands response.body %r", response.body) data = json_decode(response.body) second_brands = data['rs'] my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] wx_app_secret = wx_app_info['wx_app_secret'] wx_notify_domain = wx_app_info['wx_notify_domain'] logging.info("got wx_app_info=[%r]", wx_app_info) wx_access_token = wx_wrap.getAccessTokenByClientCredential(wx_app_id, wx_app_secret) _jsapi_ticket = wx_wrap.getJsapiTicket(wx_access_token) _url = wx_notify_domain + self.request.uri share_url = wx_notify_domain + "/bf/wx/vendors/"+club_id+my_account_id+"/category/items" _sign = wx_wrap.Sign(_jsapi_ticket, _url).sign() logging.info("got sign=[%r]", _sign) club = self.get_club_basic_info(club_id) self.render('items/category.html', API_DOMAIN=API_DOMAIN, access_token=access_token, club=club, club_id=club_id, category_id=category_id, second_category_id=second_category_id, second_categorys=second_categorys, second_specs=second_specs, second_brands=second_brands, categorys=categorys, cart_goods_num=cart_goods_num, wx_app_id=wx_app_id, share_url=share_url, sign=_sign) # 规格分类列表 class WxItemsCategorySpecsListHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id, spec_id): logging.info("GET %r", self.request.uri) category_id = self.get_argument("category_id", "") logging.info("got category_id %r", category_id) second_category_id = self.get_argument("second_category_id", "") logging.info("got second_category_id %r", second_category_id) # 查询分类 access_token = self.get_access_token() logging.info("GET access_token %r", access_token) club = self.get_club_basic_info(club_id) logging.info("get club %r",club) league_id = club['league_id'] url = API_DOMAIN + "/api/def/leagues/"+ league_id +"/categories" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) categorys = data['rs'] if not category_id: category_id = categorys[0]['_id'] url = API_DOMAIN + "/api/def/categories/" + category_id + "/level2" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) second_categorys = data['rs'] # 获取商品数量 /api/clubs/([a-z0-9]*)/cart/nums url = API_DOMAIN + "/api/clubs/" + club_id + "/cart/nums" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) cart_goods_num = data['data']['quantity'] logging.info("got cart_goods_num %r", cart_goods_num) second_specs = None second_brands = None if not second_category_id: second_category_id = second_categorys[0]['_id'] url = API_DOMAIN + "/api/def/categories/"+ second_category_id +"/specs" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) second_specs = data['rs'] url = API_DOMAIN + "/api/def/categories/"+ second_category_id +"/brands" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) second_brands = data['rs'] url = API_DOMAIN + "/api/def/specs/"+spec_id http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) _spec = data['rs'] my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] wx_app_secret = wx_app_info['wx_app_secret'] wx_notify_domain = wx_app_info['wx_notify_domain'] logging.info("got wx_app_info=[%r]", wx_app_info) wx_access_token = wx_wrap.getAccessTokenByClientCredential(wx_app_id, wx_app_secret) _jsapi_ticket = wx_wrap.getJsapiTicket(wx_access_token) _url = wx_notify_domain + self.request.uri share_url = wx_notify_domain + "/bf/wx/vendors/"+club_id+my_account_id+"/category/items" _sign = wx_wrap.Sign(_jsapi_ticket, _url).sign() logging.info("got sign=[%r]", _sign) club = self.get_club_basic_info(club_id) self.render('items/category-specs.html', API_DOMAIN=API_DOMAIN, access_token=access_token, club=club, club_id=club_id, spec_id=spec_id, category_id=category_id, second_category_id=second_category_id, second_categorys=second_categorys, second_specs=second_specs, second_brands=second_brands, categorys=categorys, _spec=_spec, cart_goods_num=cart_goods_num, wx_app_id=wx_app_id, share_url=share_url, sign=_sign) # 品牌分类列表 class WxItemsCategoryBrandsListHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id, brand_id): logging.info("GET %r", self.request.uri) category_id = self.get_argument("category_id", "") logging.info("got category_id %r", category_id) second_category_id = self.get_argument("second_category_id", "") logging.info("got second_category_id %r", second_category_id) # 查询分类 access_token = self.get_access_token() logging.info("GET access_token %r", access_token) club = self.get_club_basic_info(club_id) logging.info("get club %r",club) league_id = club['league_id'] url = API_DOMAIN + "/api/def/leagues/"+ league_id +"/categories" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) categorys = data['rs'] if not category_id: category_id = categorys[0]['_id'] url = API_DOMAIN + "/api/def/categories/" + category_id + "/level2" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) second_categorys = data['rs'] # 获取商品数量 /api/clubs/([a-z0-9]*)/cart/nums url = API_DOMAIN + "/api/clubs/" + club_id + "/cart/nums" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) cart_goods_num = data['data']['quantity'] logging.info("got cart_goods_num %r", cart_goods_num) second_specs = None second_brands = None if not second_category_id: second_category_id = second_categorys[0]['_id'] url = API_DOMAIN + "/api/def/categories/"+ second_category_id +"/specs" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) second_specs = data['rs'] url = API_DOMAIN + "/api/def/categories/"+ second_category_id +"/brands" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) second_brands = data['rs'] url = API_DOMAIN + "/api/def/brands/"+brand_id http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) _brand = data['rs'] my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] wx_app_secret = wx_app_info['wx_app_secret'] wx_notify_domain = wx_app_info['wx_notify_domain'] logging.info("got wx_app_info=[%r]", wx_app_info) wx_access_token = wx_wrap.getAccessTokenByClientCredential(wx_app_id, wx_app_secret) _jsapi_ticket = wx_wrap.getJsapiTicket(wx_access_token) _url = wx_notify_domain + self.request.uri share_url = wx_notify_domain + "/bf/wx/vendors/"+club_id+my_account_id+"/category/items" _sign = wx_wrap.Sign(_jsapi_ticket, _url).sign() logging.info("got sign=[%r]", _sign) club = self.get_club_basic_info(club_id) self.render('items/category-brands.html', API_DOMAIN=API_DOMAIN, access_token=access_token, club=club, club_id=club_id, brand_id=brand_id, category_id=category_id, second_category_id=second_category_id, second_categorys=second_categorys, second_specs=second_specs, second_brands=second_brands, categorys=categorys, _brand=_brand, cart_goods_num=cart_goods_num, wx_app_id=wx_app_id, share_url=share_url, sign=_sign) # old分类列表 class WxItemsListHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("GET %r", self.request.uri) # 查询分类 _array = category_dao.category_dao().query_by_vendor(club_id) logging.info("got categories=[%r]", _array) category_num = len(_array) logging.info("got category_num", category_num) cart_goods = self.get_cart(club_id) logging.info("got cart_goods %r", cart_goods) # 获取商品数量 cart_goods_num = 0 for cart_good in cart_goods: cart_goods_num += cart_good['quantity'] logging.info("got cart_goods_num %r", cart_goods_num) club = self.get_club_basic_info(club_id) private = 0 items = self.get_items(club_id, ACTIVITY_STATUS_RECRUIT, private) logging.info("GET items %r", items) for item in items: # 格式化价格 item['amount'] = float(item['amount']) / 100 self.render('items/main.html', club=club, club_id=club_id, items=items, cart_goods_num=cart_goods_num, category_num=category_num) # 产品详情 class WxItemsDetailHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self,club_id,item_id): logging.info("GET %r", self.request.uri) access_token = self.get_secure_cookie("access_token") club = self.get_club_basic_info(club_id) item = self.get_item(item_id) logging.info("got item %r", item) # url = API_DOMAIN + "/api/def/categories/"+ activity['level2_category_id'] +"/specs" # http_client = HTTPClient() # headers = {"Authorization":"Bearer " + access_token} # response = http_client.fetch(url, method="GET", headers=headers) # logging.info("got response.body %r", response.body) # data = json_decode(response.body) # specs = data['rs'] url = API_DOMAIN + "/api/items/"+ item_id +"/specs" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) item_specs = data['rs'] for item_spec in item_specs: item_spec['amount'] = float(item_spec['amount']) / 100 # 获取购物车商品详情 cart_goods = self.get_cart(club_id) logging.info("got cart_goods %r", cart_goods) # 获取商品数量 cart_goods_num = 0 for cart_good in cart_goods: cart_goods_num += cart_good['quantity'] logging.info("got cart_goods_num %r", cart_goods_num) # 获取产品说明 article = self.get_article(item_id) if not article: article = {'_id':item_id, 'title':item['title'], 'subtitle':[], 'img':item['img'],'paragraphs':''} self.create_article(article) logging.info("got article %r", article) my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] wx_app_secret = wx_app_info['wx_app_secret'] wx_notify_domain = wx_app_info['wx_notify_domain'] logging.info("got wx_app_info=[%r]", wx_app_info) wx_access_token = wx_wrap.getAccessTokenByClientCredential(wx_app_id, wx_app_secret) _jsapi_ticket = wx_wrap.getJsapiTicket(wx_access_token) _url = wx_notify_domain + self.request.uri share_url = wx_notify_domain + "/bf/wx/vendors/"+club_id+my_account_id+"/category/items" _sign = wx_wrap.Sign(_jsapi_ticket, _url).sign() logging.info("got sign=[%r]", _sign) self.render('items/prodetail.html', api_domain= API_DOMAIN, access_token=access_token, cart_goods_num=cart_goods_num, club=club, club_id=club_id, item_id=item_id, item=item, item_specs=item_specs, article=article, wx_app_id=wx_app_id, share_url=share_url, sign=_sign) # 添加商品到购物车 # @tornado.web.authenticated # if no session, redirect to login page # def post(self, club_id, item_id): # logging.info("got club_id %r in uri", club_id) # access_token = self.get_secure_cookie("access_token") # # fee_template_id = self.get_argument('fee_template_id',"") # logging.info("got fee_template_id %r in uri", fee_template_id) # product_num = self.get_argument('product_num',"") # logging.info("got product_num %r in uri", product_num) # # item_type = [{"item_id":item_id, "fee_template_id":fee_template_id, "quantity":product_num}] # headers = {"Authorization":"Bearer "+access_token} # # url = API_DOMAIN + "/api/clubs/"+ club_id +"/cart/items" # _json = json_encode(item_type) # http_client = HTTPClient() # response = http_client.fetch(url, method="POST", headers=headers, body=_json) # logging.info("update item response.body=[%r]", response.body) # # self.redirect('/bf/wx/vendors/'+ club_id +'/items/'+item_id) # 默认购物车 class WxItemsCartDefaultHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self): logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("GET %r", self.request.uri) last_visit_club_id = self.get_cookie("last_visit_club_id") logging.info("got last_visit_club_id=[%r]", last_visit_club_id) if last_visit_club_id == None: last_visit_club_id = CLUB_ID self.set_cookie("last_visit_club_id", last_visit_club_id) self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/items/cart") else: self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/items/cart") # 购物车 class WxItemsCartHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("GET %r", self.request.uri) access_token = self.get_secure_cookie("access_token") self.set_cookie("last_visit_club_id", club_id) self.render('items/cart.html',api_domain=API_DOMAIN,club_id=club_id,access_token=access_token) # 提交订单页 class WxItemsSubmitOrderHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("GET %r", self.request.uri) access_token = self.get_secure_cookie("access_token") account_id = self.get_secure_cookie("account_id") club = self.get_club_basic_info(club_id) logging.info("get club %r",club) league_id = club['league_id'] self.render('items/submit-order.html',api_domain=API_DOMAIN,league_id=league_id, club_id=club_id,access_token=access_token,account_id=account_id) # 调用wechat pay class WxItemsOrderCheckoutHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def post(self): club_id = self.get_argument("club_id", "") logging.info("got club_id %r", club_id) _account_id = self.get_secure_cookie("account_id") guest_club_id = self.get_argument("guest_club_id") logging.info("got guest_club_id %r", guest_club_id) access_token = self.get_access_token() item_id = "00000000000000000000000000000000" # 取得自己的最后一笔订单 params = {"filter":"account", "account_id":_account_id, "page":1, "limit":1,} url = url_concat(API_DOMAIN + "/api/orders", params) http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) rs = data['rs'] orders = rs['data'] _timestamp = int(time.time()) # 一分钟内不能创建第二个订单, # 防止用户点击回退按钮,产生第二个订单 if len(orders) > 0: for order in orders: if (_timestamp - order['create_time']) < 60: self.redirect('/bf/wx/orders/wait') return #购物车商品json items = self.get_body_argument("items", []) logging.info("got items %r", items) items = JSON.loads(items) logging.info("got items %r", items) #收获地址 addr = self.get_argument("addr", {}) logging.info("got addr %r", addr) addr = JSON.loads(addr) logging.info("got addr %r", addr) #是否需要发票 billing = self.get_argument("billing",'0') logging.info("got billing %r", billing) billing_addr = {'tfn':'','company_title':''} # 发票信息 if billing == '1': _addr = self.get_argument("billing_addr",{}) logging.info("got _addr %r", _addr) billing_addr = JSON.loads(_addr) logging.info("got billing_addr %r", billing_addr) coupon = self.get_argument('coupon',0) logging.info("got coupon %r",coupon) coupon = JSON.loads(coupon) # 积分 used_points = self.get_argument('used_points',0) logging.info("got used_points %r",used_points) order_id = str(uuid.uuid1()).replace('-', '') # 创建订单索引 order_index = { "_id": order_id, "order_type": "buy_item", "club_id": club_id, "item_type": "items", "item_id": item_id, "item_name": "", # 由服务器端填写第一个商品名称 "distributor_type": "item", "items":items, "shipping_addr":addr, "shipping_cost":0, # 由服务器端计算运费 "billing_required":billing, "billing_addr":billing_addr, "coupon":coupon, "distributor_id": "00000000000000000000000000000000", "create_time": _timestamp, "pay_type": "wxpay", "pay_status": ORDER_STATUS_BF_INIT, "quantity": 0, # 由服务器端计算商品数量 "amount": 0, # 由服务器端计算商品合计 "actual_payment": 0, # 由服务器端计算实际支付金额 "base_fees": [], #基本服务 "ext_fees": [], # 附加服务项编号数组 "insurances": [], # 保险选项,数组 "vouchers": [], #代金券选项,数组 "points_used": used_points, # 使用积分数量 "bonus_points": 0, # 购买商品获得奖励积分 "booking_time": _timestamp, } pay_id = self.create_order(order_index) order = self.get_symbol_object(order_id) logging.info("GET order %r", order) order['create_time'] = timestamp_datetime(float(order['create_time'])) # order['shipping_cost'] = float(order['shipping_cost'])/100 # order['actual_payment'] = float(order['actual_payment'])/100 items = order['items'] _product_description = items[0]['title'] logging.info("GET items %r", items) shipping_addr = order['shipping_addr'] logging.info("GET shipping_addr %r", shipping_addr) billing_addr = order['billing_addr'] logging.info("GET billing_addr %r", billing_addr) # 清空购物车 headers = {"Authorization":"Bearer "+access_token} url = API_DOMAIN + "/api/clubs/"+ club_id +"/cart/items" http_client = HTTPClient() response = http_client.fetch(url, method="DELETE", headers=headers) logging.info("update item response.body=[%r]", response.body) # budge_num increase self.counter_increase(club_id, "item_order") # self.counter_increase(order_id, "order") # TODO notify this message to vendor's administrator by SMS wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] logging.info("got wx_app_id %r in uri", wx_app_id) wx_app_secret = wx_app_info['wx_app_secret'] wx_mch_key = wx_app_info['wx_mch_key'] wx_mch_id = wx_app_info['wx_mch_id'] wx_notify_domain = wx_app_info['wx_notify_domain'] # 如使用积分抵扣,则将积分减去 if order_index['points_used'] > 0: # 修改个人积分信息 bonus_points = { 'org_id':club_id, 'org_type':'club', 'account_id':_account_id, 'account_type':'user', 'action': 'buy_item', 'item_type': 'items', 'item_id': order['item_id'], 'item_name': order['item_name'], 'bonus_type':'bonus', 'points': used_points, 'order_id': order_index['_id'] } self.create_points(bonus_points) if order['actual_payment'] != 0: # wechat 统一下单 myinfo = self.get_myinfo_login() _openid = myinfo['login'] _store_id = 'Aplan' logging.info("got _store_id %r", _store_id) #_ip = self.request.remote_ip _remote_ip = self.request.headers['X-Real-Ip'] _order_return = wx_wrap.getUnifiedOrder(_remote_ip, wx_app_id, _store_id, _product_description, wx_notify_domain, wx_mch_id, wx_mch_key, _openid, pay_id, order['actual_payment'], _timestamp) # wx统一下单记录保存 _order_return['_id'] = _order_return['prepay_id'] self.create_symbol_object(_order_return) # 微信统一下单返回成功 order_unified = None if(_order_return['return_msg'] == 'OK'): order_unified = {'_id':order_id,'prepay_id': _order_return['prepay_id'], 'pay_status': ORDER_STATUS_WECHAT_UNIFIED_SUCCESS} else: order_unified = {'_id':order_id,'prepay_id': _order_return['prepay_id'], 'pay_status': ORDER_STATUS_WECHAT_UNIFIED_FAILED} # 微信统一下单返回成功 # TODO: 更新订单索引中,订单状态pay_status,prepay_id self.update_order_unified(order_unified) for item in items: item['amount'] = float(item['amount'])/100 self.render('items/order-confirm.html', access_token = access_token, api_domain = API_DOMAIN, shipping_addr=shipping_addr, billing_addr=billing_addr, club_id=club_id, return_msg=response.body, order_return=_order_return, order=order, items=items, ) # self.redirect('/bf/wx/vendors/'+ club_id +'/items/checkout/orders/'+order_id) else: #actual_payment == 0: # send message to wx 公众号客户 by template wx_access_token = wx_wrap.getAccessTokenByClientCredential(WX_APP_ID, WX_APP_SECRET) logging.info("got wx_access_token %r", wx_access_token) # 通过wxpub,给俱乐部操作员发送通知 ops = self.get_club_ops_wx(club_id) for op in ops: wx_openid = op['binding_id'] logging.info("got wx_openid %r", wx_openid) if order_index['order_type'] == "buy_activity": wx_wrap.sendActivityOrderPayedToOpsMessage(wx_access_token, WX_NOTIFY_DOMAIN, wx_openid, order_index) elif order_index['order_type'] == "buy_item": logging.info("sendItemOrderPayedToOpsMessage=[%r]", WX_MESSAGE_TEMPLATE) if WX_MESSAGE_TEMPLATE == "kkfcps": wx_wrap.sendItemOrderPayedToOpsMessage_kkfcps(wx_access_token, WX_NOTIFY_DOMAIN, wx_openid, order_index) else: wx_wrap.sendItemOrderPayedToOpsMessage(wx_access_token, WX_NOTIFY_DOMAIN, wx_openid, order_index) self.render('items/order-result.html', api_domain=API_DOMAIN, club_id=club_id, items=items, shipping_addr=shipping_addr, billing_addr=billing_addr, access_token=access_token, order_id=order['_id'], order=order) # 下单成功后的订单详情 class WxItemsOrderResultHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id, order_id): logging.info("GET %r", self.request.uri) access_token = self.get_secure_cookie("access_token") order = self.get_symbol_object(order_id) logging.info("GET order %r", order) pay_status = order['pay_status'] order['create_time'] = timestamp_datetime(float(order['create_time'])) items = order['items'] logging.info("GET items %r", items) shipping_addr= order['shipping_addr'] billing_addr= order['billing_addr'] self.render('items/order-result.html', api_domain=API_DOMAIN, club_id=club_id, items=items, shipping_addr=shipping_addr, billing_addr=billing_addr, access_token=access_token, order_id=order_id, order=order) # 重新支付订单操作 class WxOrdersCheckoutHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def post(self): club_id = self.get_argument("club_id", "") logging.info("got club_id %r", club_id) _account_id = self.get_secure_cookie("account_id") order_id = self.get_argument("order_id","") logging.info("got order_id %r",order_id) access_token = self.get_access_token() item_id = "00000000000000000000000000000000" guest_club_id = "00000000000000000000000000000000" # 取得自己的最后一笔订单 params = {"filter":"account", "account_id":_account_id, "page":1, "limit":1,} url = url_concat(API_DOMAIN + "/api/orders", params) http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) rs = data['rs'] orders = rs['data'] _timestamp = time.time() # 一分钟内不能创建第二个订单, # 防止用户点击回退按钮,产生第二个订单 if len(orders) > 0: for order in orders: if (_timestamp - order['create_time']) < 60: self.redirect('/bf/wx/orders/wait') return # 更改pay_id url = API_DOMAIN + "/api/orders/"+order_id+"/payid" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} _json = json_encode(headers) response = http_client.fetch(url, method="POST", headers=headers, body=_json) logging.info("got response.body %r", response.body) data = json_decode(response.body) rs = data['rs'] pay_id = rs['pay_id'] order = self.get_symbol_object(order_id) _product_description = order['items'][0]['title'] actual_payment = order['actual_payment'] _timestamp = (int)(time.time()) items = order['items'] order['create_time'] = timestamp_datetime(float(order['create_time'])) # order['shipping_cost'] = float(order['shipping_cost'])/100 # order['actual_payment'] = float(order['actual_payment'])/100 shipping_addr = order['shipping_addr'] logging.info("GET shipping_addr %r", shipping_addr) billing_addr = order['billing_addr'] logging.info("GET billing_addr %r", billing_addr) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] logging.info("got wx_app_id %r in uri", wx_app_id) wx_app_secret = wx_app_info['wx_app_secret'] wx_mch_key = wx_app_info['wx_mch_key'] wx_mch_id = wx_app_info['wx_mch_id'] wx_notify_domain = wx_app_info['wx_notify_domain'] _timestamp = (int)(time.time()) if actual_payment != 0: # wechat 统一下单 myinfo = self.get_myinfo_login() _openid = myinfo['login'] _store_id = 'Aplan' logging.info("got _store_id %r", _store_id) #_ip = self.request.remote_ip _remote_ip = self.request.headers['X-Real-Ip'] _order_return = wx_wrap.getUnifiedOrder(_remote_ip, wx_app_id, _store_id, _product_description, wx_notify_domain, wx_mch_id, wx_mch_key, _openid, pay_id, actual_payment, _timestamp) # wx统一下单记录保存 _order_return['_id'] = _order_return['prepay_id'] self.create_symbol_object(_order_return) # 微信统一下单返回成功 order_unified = None if(_order_return['return_msg'] == 'OK'): order_unified = {'_id':order_id,'prepay_id': _order_return['prepay_id'], 'pay_status': ORDER_STATUS_WECHAT_UNIFIED_SUCCESS} else: order_unified = {'_id':order_id,'prepay_id': _order_return['prepay_id'], 'pay_status': ORDER_STATUS_WECHAT_UNIFIED_FAILED} # 微信统一下单返回成功 # TODO: 更新订单索引中,订单状态pay_status,prepay_id self.update_order_unified(order_unified) self.render('items/re-order-confirm.html', access_token = access_token, api_domain = API_DOMAIN, shipping_addr=shipping_addr, billing_addr=billing_addr, club_id=club_id, return_msg=response.body, order_return=_order_return, order=order, items=items) # 默认个人订单列表 class WxItemsMyordersDefaultHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self): logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("GET %r", self.request.uri) last_visit_club_id = self.get_cookie("last_visit_club_id") logging.info("got last_visit_club_id=[%r]", last_visit_club_id) if last_visit_club_id == None: last_visit_club_id = CLUB_ID self.set_cookie("last_visit_club_id", last_visit_club_id) self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/items/myorders") else: self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/items/myorders") # 订单中心-所有订单 class WxItemsMyordersHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("GET %r", self.request.uri) access_token = self.get_access_token() logging.info("GET access_token %r", access_token) self.set_cookie("last_visit_club_id", club_id) self.render('items/myorders.html', club_id=club_id, API_DOMAIN=API_DOMAIN, access_token=access_token) # 订单中心-已支付订单 class WxItemsPayMyordersHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("GET %r", self.request.uri) access_token = self.get_access_token() logging.info("GET access_token %r", access_token) self.render('items/pay-myorders.html', club_id=club_id, API_DOMAIN=API_DOMAIN, access_token=access_token) # 订单中心-未支付订单 class WxItemsNopayMyordersHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("GET %r", self.request.uri) access_token = self.get_access_token() logging.info("GET access_token %r", access_token) self.render('items/nopay-myorders.html', club_id=club_id, API_DOMAIN=API_DOMAIN, access_token=access_token) # 默认预估分类列表 class WxItemsRecommendListDefaultHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self): logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^") logging.info("GET %r", self.request.uri) last_visit_club_id = self.get_cookie("last_visit_club_id") logging.info("got last_visit_club_id=[%r]", last_visit_club_id) if last_visit_club_id == None: last_visit_club_id = CLUB_ID self.set_cookie("last_visit_club_id", last_visit_club_id) self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/recommend") else: self.redirect("/bf/wx/vendors/"+ last_visit_club_id +"/recommend") # 预估分类列表 class WxItemsRecommendListHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id): logging.info("GET %r", self.request.uri) self.set_cookie("last_visit_club_id", club_id) # 查询分类 access_token = self.get_access_token() logging.info("GET access_token %r", access_token) club = self.get_club_basic_info(club_id) league_id = club['league_id'] my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] wx_app_secret = wx_app_info['wx_app_secret'] wx_notify_domain = wx_app_info['wx_notify_domain'] logging.info("got wx_app_info=[%r]", wx_app_info) wx_access_token = wx_wrap.getAccessTokenByClientCredential(wx_app_id, wx_app_secret) _jsapi_ticket = wx_wrap.getJsapiTicket(wx_access_token) _url = wx_notify_domain + self.request.uri share_url = wx_notify_domain + "/bf/wx/vendors/"+club_id+my_account_id+"/category/items" _sign = wx_wrap.Sign(_jsapi_ticket, _url).sign() logging.info("got sign=[%r]", _sign) self.render('items/recommend-category.html', API_DOMAIN=API_DOMAIN, access_token=access_token, LEAGUE_ID=league_id, club=club, club_id=club_id, wx_app_id=wx_app_id, share_url=share_url, sign=_sign) # 预估商品列表 class WxItemsRecommendProductsHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, club_id, recommend_category_id): logging.info("GET %r", self.request.uri) logging.info("GET club_id %r", club_id) access_token = self.get_access_token() logging.info("GET access_token %r", access_token) logging.info("got recommend_category_id %r", recommend_category_id) club = self.get_club_basic_info(club_id) my_account_id = self.get_secure_cookie("account_id") logging.info("GET my_account_id=[%r]", my_account_id) wx_app_info = vendor_wx_dao.vendor_wx_dao().query(club_id) wx_app_id = wx_app_info['wx_app_id'] wx_app_secret = wx_app_info['wx_app_secret'] wx_notify_domain = wx_app_info['wx_notify_domain'] logging.info("got wx_app_info=[%r]", wx_app_info) wx_access_token = wx_wrap.getAccessTokenByClientCredential(wx_app_id, wx_app_secret) _jsapi_ticket = wx_wrap.getJsapiTicket(wx_access_token) _url = wx_notify_domain + self.request.uri share_url = wx_notify_domain + "/bf/wx/vendors/"+club_id+my_account_id+"/category/items" _sign = wx_wrap.Sign(_jsapi_ticket, _url).sign() logging.info("got sign=[%r]", _sign) self.render('items/recommend-products.html', api_domain=API_DOMAIN, club_id=club_id, club=club, access_token=access_token, recommend_category_id=recommend_category_id, wx_app_id=wx_app_id, share_url=share_url, sign=_sign) # 我的历史积分列表页 class WxItemsUserPointsHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, vendor_id): logging.info("got vendor_id %r in uri", vendor_id) account_id = self.get_secure_cookie("account_id") access_token = self.get_access_token() # 获取当前积分 url = API_DOMAIN + "/api/clubs/"+vendor_id+"/users/" + account_id http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) _customer_profile = data['rs'] bonus_num = _customer_profile['remaining_points'] self.render('items/user-points.html', api_domain = API_DOMAIN, access_token = access_token, account_id = account_id, vendor_id=vendor_id, bonus_num=bonus_num) # 我的上下线 class WxItemsUserlinesHandler(AuthorizationHandler): @tornado.web.authenticated # if no session, redirect to login page def get(self, vendor_id): logging.info("got vendor_id %r in uri", vendor_id) account_id = self.get_secure_cookie("account_id") access_token = self.get_access_token() # 上级 url = API_DOMAIN + "/api/clubs/"+vendor_id+"/acquaintance/"+account_id+"/higher" http_client = HTTPClient() headers = {"Authorization":"Bearer " + access_token} response = http_client.fetch(url, method="GET", headers=headers) logging.info("got response.body %r", response.body) data = json_decode(response.body) higher = data['rs'] if higher: higher['ctime'] = timestamp_datetime(float(higher['ctime'])) self.render('items/user-lines.html', vendor_id=vendor_id, account_id=account_id, higher=higher, api_domain=API_DOMAIN, access_token = access_token)
41.875715
202
0.617077
6,263
51,214
4.72106
0.066741
0.037946
0.04072
0.022321
0.817708
0.798363
0.788724
0.775365
0.758726
0.740835
0
0.006394
0.257898
51,214
1,222
203
41.909984
0.771589
0.082126
0
0.738095
0
0
0.163607
0.012721
0
0
0
0.000818
0
1
0.02381
false
0
0.042208
0
0.091991
0
0
0
0
null
0
0
0
1
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
7
cf88a501e95a2b8e4166f19911a9f931488f412e
202
py
Python
imagedt/tensorflow/__init__.py
Ken2yLiu/ImageDT
2fb08ed67c94c690ab5845a949d58d8fb3ff4ee5
[ "Apache-2.0" ]
null
null
null
imagedt/tensorflow/__init__.py
Ken2yLiu/ImageDT
2fb08ed67c94c690ab5845a949d58d8fb3ff4ee5
[ "Apache-2.0" ]
null
null
null
imagedt/tensorflow/__init__.py
Ken2yLiu/ImageDT
2fb08ed67c94c690ab5845a949d58d8fb3ff4ee5
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from __future__ import print_function # from . import network # from . import optim # from . import trainer from . import tools from . import lite
22.444444
38
0.777228
28
202
5.25
0.5
0.340136
0.217687
0
0
0
0
0
0
0
0
0.005952
0.168317
202
9
39
22.444444
0.869048
0.381188
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.25
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
cf8a2652a9a354d866562077cf19c09ca5dddb78
52,904
py
Python
source/deepsecurity/api/rulesets_api.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:09.000Z
2021-10-30T16:40:09.000Z
source/deepsecurity/api/rulesets_api.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-07-28T20:19:03.000Z
2021-07-28T20:19:03.000Z
source/deepsecurity/api/rulesets_api.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:02.000Z
2021-10-30T16:40:02.000Z
# coding: utf-8 """ Trend Micro Deep Security API Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate Deep Security into your CI/CD pipeline. # noqa: E501 OpenAPI spec version: 12.5.841 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from deepsecurity.api_client import ApiClient class RulesetsApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def create_ruleset(self, ruleset, softwareinventoryid, api_version, **kwargs): # noqa: E501 """Create a Shared Ruleset # noqa: E501 Create a new shared ruleset. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_ruleset(ruleset, softwareinventoryid, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param Ruleset ruleset: The settings of the new ruleset. (required) :param int softwareinventoryid: ID of the software inventory to base the ruleset on. (required) :param str api_version: The version of the api being called. (required) :return: Ruleset If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_ruleset_with_http_info(ruleset, softwareinventoryid, api_version, **kwargs) # noqa: E501 else: (data) = self.create_ruleset_with_http_info(ruleset, softwareinventoryid, api_version, **kwargs) # noqa: E501 return data def create_ruleset_with_http_info(self, ruleset, softwareinventoryid, api_version, **kwargs): # noqa: E501 """Create a Shared Ruleset # noqa: E501 Create a new shared ruleset. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_ruleset_with_http_info(ruleset, softwareinventoryid, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param Ruleset ruleset: The settings of the new ruleset. (required) :param int softwareinventoryid: ID of the software inventory to base the ruleset on. (required) :param str api_version: The version of the api being called. (required) :return: Ruleset If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset', 'softwareinventoryid', 'api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_ruleset" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset' is set if ('ruleset' not in params or params['ruleset'] is None): raise ValueError("Missing the required parameter `ruleset` when calling `create_ruleset`") # noqa: E501 # verify the required parameter 'softwareinventoryid' is set if ('softwareinventoryid' not in params or params['softwareinventoryid'] is None): raise ValueError("Missing the required parameter `softwareinventoryid` when calling `create_ruleset`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `create_ruleset`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'softwareinventoryid' in params: query_params.append(('softwareinventoryid', params['softwareinventoryid'])) # noqa: E501 header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'ruleset' in params: body_params = params['ruleset'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Ruleset', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_ruleset(self, ruleset_id, api_version, **kwargs): # noqa: E501 """Delete a Ruleset # noqa: E501 Delete a ruleset by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_ruleset(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset to delete. (required) :param str api_version: The version of the api being called. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_ruleset_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 else: (data) = self.delete_ruleset_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 return data def delete_ruleset_with_http_info(self, ruleset_id, api_version, **kwargs): # noqa: E501 """Delete a Ruleset # noqa: E501 Delete a ruleset by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_ruleset_with_http_info(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset to delete. (required) :param str api_version: The version of the api being called. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset_id', 'api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_ruleset" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset_id' is set if ('ruleset_id' not in params or params['ruleset_id'] is None): raise ValueError("Missing the required parameter `ruleset_id` when calling `delete_ruleset`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `delete_ruleset`") # noqa: E501 if 'ruleset_id' in params and not re.search('\\d+', str(params['ruleset_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `ruleset_id` when calling `delete_ruleset`, must conform to the pattern `/\\d+/`") # noqa: E501 collection_formats = {} path_params = {} if 'ruleset_id' in params: path_params['rulesetID'] = params['ruleset_id'] # noqa: E501 query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/{rulesetID}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_ruleset_rule(self, ruleset_id, rule_id, api_version, **kwargs): # noqa: E501 """Delete a Ruleset Rule # noqa: E501 Delete a ruleset rule by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_ruleset_rule(ruleset_id, rule_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param int rule_id: The ID number of the rule to delete. (required) :param str api_version: The version of the api being called. (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_ruleset_rule_with_http_info(ruleset_id, rule_id, api_version, **kwargs) # noqa: E501 else: (data) = self.delete_ruleset_rule_with_http_info(ruleset_id, rule_id, api_version, **kwargs) # noqa: E501 return data def delete_ruleset_rule_with_http_info(self, ruleset_id, rule_id, api_version, **kwargs): # noqa: E501 """Delete a Ruleset Rule # noqa: E501 Delete a ruleset rule by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_ruleset_rule_with_http_info(ruleset_id, rule_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param int rule_id: The ID number of the rule to delete. (required) :param str api_version: The version of the api being called. (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset_id', 'rule_id', 'api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_ruleset_rule" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset_id' is set if ('ruleset_id' not in params or params['ruleset_id'] is None): raise ValueError("Missing the required parameter `ruleset_id` when calling `delete_ruleset_rule`") # noqa: E501 # verify the required parameter 'rule_id' is set if ('rule_id' not in params or params['rule_id'] is None): raise ValueError("Missing the required parameter `rule_id` when calling `delete_ruleset_rule`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `delete_ruleset_rule`") # noqa: E501 if 'ruleset_id' in params and not re.search('\\d+', str(params['ruleset_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `ruleset_id` when calling `delete_ruleset_rule`, must conform to the pattern `/\\d+/`") # noqa: E501 if 'rule_id' in params and not re.search('\\d+', str(params['rule_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `rule_id` when calling `delete_ruleset_rule`, must conform to the pattern `/\\d+/`") # noqa: E501 collection_formats = {} path_params = {} if 'ruleset_id' in params: path_params['rulesetID'] = params['ruleset_id'] # noqa: E501 if 'rule_id' in params: path_params['ruleID'] = params['rule_id'] # noqa: E501 query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/{rulesetID}/rules/{ruleID}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def describe_ruleset(self, ruleset_id, api_version, **kwargs): # noqa: E501 """Describe a Ruleset # noqa: E501 Describe a ruleset by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.describe_ruleset(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset to describe. (required) :param str api_version: The version of the api being called. (required) :return: Ruleset If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.describe_ruleset_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 else: (data) = self.describe_ruleset_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 return data def describe_ruleset_with_http_info(self, ruleset_id, api_version, **kwargs): # noqa: E501 """Describe a Ruleset # noqa: E501 Describe a ruleset by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.describe_ruleset_with_http_info(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset to describe. (required) :param str api_version: The version of the api being called. (required) :return: Ruleset If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset_id', 'api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method describe_ruleset" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset_id' is set if ('ruleset_id' not in params or params['ruleset_id'] is None): raise ValueError("Missing the required parameter `ruleset_id` when calling `describe_ruleset`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `describe_ruleset`") # noqa: E501 if 'ruleset_id' in params and not re.search('\\d+', str(params['ruleset_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `ruleset_id` when calling `describe_ruleset`, must conform to the pattern `/\\d+/`") # noqa: E501 collection_formats = {} path_params = {} if 'ruleset_id' in params: path_params['rulesetID'] = params['ruleset_id'] # noqa: E501 query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/{rulesetID}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Ruleset', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def describe_ruleset_rule(self, ruleset_id, rule_id, api_version, **kwargs): # noqa: E501 """Describe a Ruleset Rule # noqa: E501 Describe a ruleset rule by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.describe_ruleset_rule(ruleset_id, rule_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param int rule_id: The ID number of the rule to describe. (required) :param str api_version: The version of the api being called. (required) :return: ApplicationControlRule If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.describe_ruleset_rule_with_http_info(ruleset_id, rule_id, api_version, **kwargs) # noqa: E501 else: (data) = self.describe_ruleset_rule_with_http_info(ruleset_id, rule_id, api_version, **kwargs) # noqa: E501 return data def describe_ruleset_rule_with_http_info(self, ruleset_id, rule_id, api_version, **kwargs): # noqa: E501 """Describe a Ruleset Rule # noqa: E501 Describe a ruleset rule by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.describe_ruleset_rule_with_http_info(ruleset_id, rule_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param int rule_id: The ID number of the rule to describe. (required) :param str api_version: The version of the api being called. (required) :return: ApplicationControlRule If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset_id', 'rule_id', 'api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method describe_ruleset_rule" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset_id' is set if ('ruleset_id' not in params or params['ruleset_id'] is None): raise ValueError("Missing the required parameter `ruleset_id` when calling `describe_ruleset_rule`") # noqa: E501 # verify the required parameter 'rule_id' is set if ('rule_id' not in params or params['rule_id'] is None): raise ValueError("Missing the required parameter `rule_id` when calling `describe_ruleset_rule`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `describe_ruleset_rule`") # noqa: E501 if 'ruleset_id' in params and not re.search('\\d+', str(params['ruleset_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `ruleset_id` when calling `describe_ruleset_rule`, must conform to the pattern `/\\d+/`") # noqa: E501 if 'rule_id' in params and not re.search('\\d+', str(params['rule_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `rule_id` when calling `describe_ruleset_rule`, must conform to the pattern `/\\d+/`") # noqa: E501 collection_formats = {} path_params = {} if 'ruleset_id' in params: path_params['rulesetID'] = params['ruleset_id'] # noqa: E501 if 'rule_id' in params: path_params['ruleID'] = params['rule_id'] # noqa: E501 query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/{rulesetID}/rules/{ruleID}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationControlRule', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_ruleset_rules(self, ruleset_id, api_version, **kwargs): # noqa: E501 """List Ruleset Rules # noqa: E501 List all rules of a ruleset by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_ruleset_rules(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param str api_version: The version of the api being called. (required) :return: ApplicationControlRules If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_ruleset_rules_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 else: (data) = self.list_ruleset_rules_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 return data def list_ruleset_rules_with_http_info(self, ruleset_id, api_version, **kwargs): # noqa: E501 """List Ruleset Rules # noqa: E501 List all rules of a ruleset by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_ruleset_rules_with_http_info(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param str api_version: The version of the api being called. (required) :return: ApplicationControlRules If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset_id', 'api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_ruleset_rules" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset_id' is set if ('ruleset_id' not in params or params['ruleset_id'] is None): raise ValueError("Missing the required parameter `ruleset_id` when calling `list_ruleset_rules`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `list_ruleset_rules`") # noqa: E501 if 'ruleset_id' in params and not re.search('\\d+', str(params['ruleset_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `ruleset_id` when calling `list_ruleset_rules`, must conform to the pattern `/\\d+/`") # noqa: E501 collection_formats = {} path_params = {} if 'ruleset_id' in params: path_params['rulesetID'] = params['ruleset_id'] # noqa: E501 query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/{rulesetID}/rules', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationControlRules', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_rulesets(self, api_version, **kwargs): # noqa: E501 """List Rulesets # noqa: E501 Lists all rulesets. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_rulesets(api_version, async_req=True) >>> result = thread.get() :param async_req bool :param str api_version: The version of the api being called. (required) :return: Rulesets If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_rulesets_with_http_info(api_version, **kwargs) # noqa: E501 else: (data) = self.list_rulesets_with_http_info(api_version, **kwargs) # noqa: E501 return data def list_rulesets_with_http_info(self, api_version, **kwargs): # noqa: E501 """List Rulesets # noqa: E501 Lists all rulesets. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_rulesets_with_http_info(api_version, async_req=True) >>> result = thread.get() :param async_req bool :param str api_version: The version of the api being called. (required) :return: Rulesets If the method is called asynchronously, returns the request thread. """ all_params = ['api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_rulesets" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `list_rulesets`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Rulesets', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def modify_ruleset_rule(self, ruleset_id, rule_id, rule, api_version, **kwargs): # noqa: E501 """Modify a Ruleset Rule # noqa: E501 Modify a ruleset rule by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.modify_ruleset_rule(ruleset_id, rule_id, rule, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param int rule_id: The ID number of the rule to modify. (required) :param ApplicationControlRule rule: The settings of the rule to modify. (required) :param str api_version: The version of the api being called. (required) :return: ApplicationControlRule If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.modify_ruleset_rule_with_http_info(ruleset_id, rule_id, rule, api_version, **kwargs) # noqa: E501 else: (data) = self.modify_ruleset_rule_with_http_info(ruleset_id, rule_id, rule, api_version, **kwargs) # noqa: E501 return data def modify_ruleset_rule_with_http_info(self, ruleset_id, rule_id, rule, api_version, **kwargs): # noqa: E501 """Modify a Ruleset Rule # noqa: E501 Modify a ruleset rule by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.modify_ruleset_rule_with_http_info(ruleset_id, rule_id, rule, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param int rule_id: The ID number of the rule to modify. (required) :param ApplicationControlRule rule: The settings of the rule to modify. (required) :param str api_version: The version of the api being called. (required) :return: ApplicationControlRule If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset_id', 'rule_id', 'rule', 'api_version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method modify_ruleset_rule" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset_id' is set if ('ruleset_id' not in params or params['ruleset_id'] is None): raise ValueError("Missing the required parameter `ruleset_id` when calling `modify_ruleset_rule`") # noqa: E501 # verify the required parameter 'rule_id' is set if ('rule_id' not in params or params['rule_id'] is None): raise ValueError("Missing the required parameter `rule_id` when calling `modify_ruleset_rule`") # noqa: E501 # verify the required parameter 'rule' is set if ('rule' not in params or params['rule'] is None): raise ValueError("Missing the required parameter `rule` when calling `modify_ruleset_rule`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `modify_ruleset_rule`") # noqa: E501 if 'ruleset_id' in params and not re.search('\\d+', str(params['ruleset_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `ruleset_id` when calling `modify_ruleset_rule`, must conform to the pattern `/\\d+/`") # noqa: E501 if 'rule_id' in params and not re.search('\\d+', str(params['rule_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `rule_id` when calling `modify_ruleset_rule`, must conform to the pattern `/\\d+/`") # noqa: E501 collection_formats = {} path_params = {} if 'ruleset_id' in params: path_params['rulesetID'] = params['ruleset_id'] # noqa: E501 if 'rule_id' in params: path_params['ruleID'] = params['rule_id'] # noqa: E501 query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'rule' in params: body_params = params['rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/{rulesetID}/rules/{ruleID}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationControlRule', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search_ruleset_rules(self, ruleset_id, api_version, **kwargs): # noqa: E501 """Search Ruleset Rules # noqa: E501 Search for ruleset rules using optional filters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_ruleset_rules(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param str api_version: The version of the api being called. (required) :param SearchFilter search_filter: A collection of options used to filter the search results. :return: ApplicationControlRules If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_ruleset_rules_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 else: (data) = self.search_ruleset_rules_with_http_info(ruleset_id, api_version, **kwargs) # noqa: E501 return data def search_ruleset_rules_with_http_info(self, ruleset_id, api_version, **kwargs): # noqa: E501 """Search Ruleset Rules # noqa: E501 Search for ruleset rules using optional filters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_ruleset_rules_with_http_info(ruleset_id, api_version, async_req=True) >>> result = thread.get() :param async_req bool :param int ruleset_id: The ID number of the ruleset. (required) :param str api_version: The version of the api being called. (required) :param SearchFilter search_filter: A collection of options used to filter the search results. :return: ApplicationControlRules If the method is called asynchronously, returns the request thread. """ all_params = ['ruleset_id', 'api_version', 'search_filter'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method search_ruleset_rules" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'ruleset_id' is set if ('ruleset_id' not in params or params['ruleset_id'] is None): raise ValueError("Missing the required parameter `ruleset_id` when calling `search_ruleset_rules`") # noqa: E501 # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `search_ruleset_rules`") # noqa: E501 if 'ruleset_id' in params and not re.search('\\d+', str(params['ruleset_id'])): # noqa: E501 raise ValueError("Invalid value for parameter `ruleset_id` when calling `search_ruleset_rules`, must conform to the pattern `/\\d+/`") # noqa: E501 collection_formats = {} path_params = {} if 'ruleset_id' in params: path_params['rulesetID'] = params['ruleset_id'] # noqa: E501 query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'search_filter' in params: body_params = params['search_filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/{rulesetID}/rules/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApplicationControlRules', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def search_rulesets(self, api_version, **kwargs): # noqa: E501 """Search Rulesets # noqa: E501 Search for rulesets using optional filters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_rulesets(api_version, async_req=True) >>> result = thread.get() :param async_req bool :param str api_version: The version of the api being called. (required) :param SearchFilter search_filter: A collection of options used to filter the search results. :return: Rulesets If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.search_rulesets_with_http_info(api_version, **kwargs) # noqa: E501 else: (data) = self.search_rulesets_with_http_info(api_version, **kwargs) # noqa: E501 return data def search_rulesets_with_http_info(self, api_version, **kwargs): # noqa: E501 """Search Rulesets # noqa: E501 Search for rulesets using optional filters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_rulesets_with_http_info(api_version, async_req=True) >>> result = thread.get() :param async_req bool :param str api_version: The version of the api being called. (required) :param SearchFilter search_filter: A collection of options used to filter the search results. :return: Rulesets If the method is called asynchronously, returns the request thread. """ all_params = ['api_version', 'search_filter'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method search_rulesets" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'api_version' is set if ('api_version' not in params or params['api_version'] is None): raise ValueError("Missing the required parameter `api_version` when calling `search_rulesets`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'api_version' in params: header_params['api-version'] = params['api_version'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'search_filter' in params: body_params = params['search_filter'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['DefaultAuthentication'] # noqa: E501 return self.api_client.call_api( '/rulesets/search', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Rulesets', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
45.725151
311
0.611447
6,173
52,904
5.008586
0.033857
0.053044
0.029756
0.025875
0.97005
0.967689
0.964875
0.96122
0.956174
0.951679
0
0.017129
0.299259
52,904
1,156
312
45.764706
0.81687
0.319768
0
0.797806
0
0
0.247057
0.050946
0
0
0
0
0
1
0.032915
false
0
0.00627
0
0.087774
0
0
0
0
null
0
0
0
1
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
7
9932f0bdbc8b24b8e65bdfec0f0290b6c959e317
63
py
Python
samples/src/main/resources/datasets/python/89.py
sritchie/kotlingrad
8165ed1cd77220a5347c58cded4c6f2bcf22ee30
[ "Apache-2.0" ]
11
2020-12-19T01:19:44.000Z
2021-12-25T20:43:33.000Z
src/main/resources/datasets/python/89.py
breandan/katholic
081c39f3acc73ff41f5865563debe78a36e1038f
[ "Apache-2.0" ]
null
null
null
src/main/resources/datasets/python/89.py
breandan/katholic
081c39f3acc73ff41f5865563debe78a36e1038f
[ "Apache-2.0" ]
2
2021-01-25T07:59:20.000Z
2021-08-07T07:13:49.000Z
def test1(a, b, c): del a del a, b, c del a.x, b.y
12.6
19
0.444444
16
63
1.75
0.5
0.428571
0.214286
0.428571
0.5
0
0
0
0
0
0
0.026316
0.396825
63
4
20
15.75
0.710526
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0
1
0
1
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
1
0
0
0
0
0
0
0
7
996fcbcbbe11a986a965b67441161f9137d85690
17,877
py
Python
tests/pretty_printers.py
hakatashi/oj
cb156ff6d0a122a3865280c90dddf8871e6ff7cc
[ "MIT" ]
null
null
null
tests/pretty_printers.py
hakatashi/oj
cb156ff6d0a122a3865280c90dddf8871e6ff7cc
[ "MIT" ]
null
null
null
tests/pretty_printers.py
hakatashi/oj
cb156ff6d0a122a3865280c90dddf8871e6ff7cc
[ "MIT" ]
null
null
null
"""This module has unit tests for onlinejudge_command.pretty_printers module. """ import textwrap import unittest from typing import * from onlinejudge_command.output_comparators import CompareMode from onlinejudge_command.pretty_printers import _LineDiffOp, _make_diff_between_file_and_file, _PrettyToken, _PrettyTokenType, _render_tokens, _tokenize_file_content_without_snipping, _tokenize_large_file_content, _tokenize_line, _tokenize_pretty_diff class TokenizeLineTest(unittest.TestCase): def test_simple(self) -> None: line = 'hello\n' expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] actual = _tokenize_line(line=line) self.assertEqual(actual, expected) def test_crlf(self) -> None: line = 'hello\r\n' expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.NEWLINE, '\r\n'), ] actual = _tokenize_line(line=line) self.assertEqual(actual, expected) def test_with_whitespace(self) -> None: line = 'hello \t\tworld\n' expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' \t\t'), _PrettyToken(_PrettyTokenType.BODY, 'world'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] actual = _tokenize_line(line=line) self.assertEqual(actual, expected) def test_without_newline(self) -> None: line = 'hello' expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), ] actual = _tokenize_line(line=line) self.assertEqual(actual, expected) def test_trailing_whitespace(self) -> None: line = 'hello \n' expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.HINT, '(trailing whitespace)'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] actual = _tokenize_line(line=line) self.assertEqual(actual, expected) def test_only_newline(self) -> None: line = '\n' expected = [ _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] actual = _tokenize_line(line=line) self.assertEqual(actual, expected) def test_empty_string(self) -> None: line = '' expected: List[_PrettyToken] = [] actual = _tokenize_line(line=line) self.assertEqual(actual, expected) class TokenizeLargeFileContentTest(unittest.TestCase): def test_small(self) -> None: content = b'hello\nworld\n' limit = 40 head = 20 tail = 10 char_in_line = 40 expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), _PrettyToken(_PrettyTokenType.BODY, 'world'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] actual = _tokenize_large_file_content(content=content, limit=limit, head=head, tail=tail, char_in_line=char_in_line) self.assertEqual(actual, expected) def test_too_many_chars(self) -> None: content_chars = 100000 content = b'hello' * (content_chars // len(b'hello')) limit = 40 head = 20 tail = 10 char_in_line = 40 expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello' * (head * char_in_line // len('hello'))), _PrettyToken(_PrettyTokenType.HINT, '... ({} chars) ...'.format(content_chars - head * char_in_line - tail * char_in_line)), _PrettyToken(_PrettyTokenType.BODY, 'hello' * (tail * char_in_line // len('hello'))), _PrettyToken(_PrettyTokenType.HINT, '(no trailing newline)'), ] actual = _tokenize_large_file_content(content=content, limit=limit, head=head, tail=tail, char_in_line=char_in_line) self.assertEqual(actual, expected) def test_too_many_lines(self) -> None: content_lines = 100 content = b'hello\n' * content_lines limit = 40 head = 20 tail = 10 char_in_line = 40 expected = [] for _ in range(head): expected += [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] expected += [ _PrettyToken(_PrettyTokenType.HINT, '... ({} lines) ...\n'.format(content_lines - head - tail)), ] for _ in range(tail): expected += [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] actual = _tokenize_large_file_content(content=content, limit=limit, head=head, tail=tail, char_in_line=char_in_line) self.assertEqual(actual, expected) def test_empty(self) -> None: content = b'' limit = 40 head = 20 tail = 10 char_in_line = 40 expected = [ _PrettyToken(_PrettyTokenType.HINT, '(empty)'), ] actual = _tokenize_large_file_content(content=content, limit=limit, head=head, tail=tail, char_in_line=char_in_line) self.assertEqual(actual, expected) def test_only_newlines(self) -> None: content = b'\r\n\n' limit = 40 head = 20 tail = 10 char_in_line = 40 expected = [ _PrettyToken(_PrettyTokenType.NEWLINE, '\r\n'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), _PrettyToken(_PrettyTokenType.HINT, '(only newline)'), ] actual = _tokenize_large_file_content(content=content, limit=limit, head=head, tail=tail, char_in_line=char_in_line) self.assertEqual(actual, expected) class TokenizeFileContentWithoutSnippingTest(unittest.TestCase): def test_small(self) -> None: content = b'hello\nworld\n' expected = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), _PrettyToken(_PrettyTokenType.BODY, 'world'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] actual = _tokenize_file_content_without_snipping(content=content) self.assertEqual(actual, expected) def test_empty(self) -> None: content = b'' expected = [ _PrettyToken(_PrettyTokenType.HINT, '(empty)'), ] actual = _tokenize_file_content_without_snipping(content=content) self.assertEqual(actual, expected) def test_only_newlines(self) -> None: content = b'\r\n\n' expected = [ _PrettyToken(_PrettyTokenType.NEWLINE, '\r\n'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), _PrettyToken(_PrettyTokenType.HINT, '(only newline)'), ] actual = _tokenize_file_content_without_snipping(content=content) self.assertEqual(actual, expected) class RenderTokensTest(unittest.TestCase): def test_simple(self) -> None: tokens = [ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), _PrettyToken(_PrettyTokenType.BODY, 'world'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ] expected = ''.join([ '<bold>hello</bold>', '<dim>\n</dim>', '<bold>world</bold>', '<dim>\n</dim>', ]) font_dim = lambda s: '<dim>' + s + '</dim>' font_bold = lambda s: '<bold>' + s + '</bold>' actual = _render_tokens(tokens=tokens, font_bold=font_bold, font_dim=font_dim) self.assertEqual(actual, expected) def test_complicated(self) -> None: tokens = [ _PrettyToken(_PrettyTokenType.BODY, 'hello world'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' \t'), _PrettyToken(_PrettyTokenType.HINT, 'this is a hint message'), _PrettyToken(_PrettyTokenType.NEWLINE, '\r\n'), ] expected = ''.join([ '<bold>hello world</bold>', '<dim>_\\t</dim>', '<dim>this is a hint message</dim>', '<dim>\\r\n</dim>', ]) font_dim = lambda s: '<dim>' + s + '</dim>' font_bold = lambda s: '<bold>' + s + '</bold>' actual = _render_tokens(tokens=tokens, font_bold=font_bold, font_dim=font_dim) self.assertEqual(actual, expected) class MakeDiffBetweenFileAndFileTest(unittest.TestCase): def test_word_by_word(self) -> None: a = ''.join([ '1 2 3\n', '4 -1\n', '6\n', ]) b = ''.join([ '1 2 3\n', '4 5\n', '6\n', ]) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH expected = [ _LineDiffOp(lineno=1, left=[ _PrettyToken(_PrettyTokenType.BODY, '4'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY_HIGHLIGHT_LEFT, '-1'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ], right=[ _PrettyToken(_PrettyTokenType.BODY, '4'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY_HIGHLIGHT_RIGHT, '5'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ]), ] actual = _make_diff_between_file_and_file(a, b, compare_mode=compare_mode) self.assertEqual(actual, expected) def test_line_difflib(self) -> None: a = ''.join([ '1 3\n', 'wow\n', 'he llo word\n', ]) b = ''.join([ '1 2 3\n', 'wow\n', 'hello world\n', ]) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH expected = [ _LineDiffOp(lineno=0, left=[ _PrettyToken(_PrettyTokenType.BODY, '1'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY, '3'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ], right=[ _PrettyToken(_PrettyTokenType.BODY, '1'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY_HIGHLIGHT_RIGHT, '2'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY, '3'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ]), _LineDiffOp(lineno=2, left=[ _PrettyToken(_PrettyTokenType.BODY, 'he'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY, 'llo'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY, 'word'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ], right=[ _PrettyToken(_PrettyTokenType.BODY, 'hello'), _PrettyToken(_PrettyTokenType.WHITESPACE, ' '), _PrettyToken(_PrettyTokenType.BODY, 'wor'), _PrettyToken(_PrettyTokenType.BODY_HIGHLIGHT_RIGHT, 'l'), _PrettyToken(_PrettyTokenType.BODY, 'd'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ]), ] actual = _make_diff_between_file_and_file(a, b, compare_mode=compare_mode) self.assertEqual(actual, expected) def test_file_difflib(self) -> None: a = ''.join([ 'foo\n', 'baz\n', 'hello\n', 'world\n', 'hey\n', 'wow\n', ]) b = ''.join([ 'foo\n', 'bar\n', 'baz\n', 'hello\n', 'world\n', 'wow\n', 'wow\n', ]) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH expected = [ _LineDiffOp(lineno=1, left=None, right=[ _PrettyToken(_PrettyTokenType.BODY_HIGHLIGHT_RIGHT, 'bar'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ]), _LineDiffOp(lineno=4, left=[ _PrettyToken(_PrettyTokenType.BODY_HIGHLIGHT_LEFT, 'hey'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ], right=None), _LineDiffOp(lineno=6, left=None, right=[ _PrettyToken(_PrettyTokenType.BODY_HIGHLIGHT_RIGHT, 'wow'), _PrettyToken(_PrettyTokenType.NEWLINE, '\n'), ]), ] actual = _make_diff_between_file_and_file(a, b, compare_mode=compare_mode) self.assertEqual(actual, expected) class MakePrettyDiffTest(unittest.TestCase): def test_word_by_word(self) -> None: a = ''.join([ '1 2 3\n', '4 -1\n', '6\n', ]) b = ''.join([ '1 2 3\n', '4 5\n', '6\n', ]) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH char_in_line = 40 limit = 40 expected = textwrap.dedent("""\ output: expected: 1| 1_2_3 1| 1_2_3 2| 4_-1 2| 4_5 3| 6 3| 6 """) font_dim = lambda s: s font_bold = lambda s: s font_red = lambda s: s font_blue = lambda s: s tokens = _tokenize_pretty_diff(a, expected=b, compare_mode=compare_mode, char_in_line=char_in_line, limit=limit) actual = _render_tokens(tokens=tokens, font_dim=font_dim, font_bold=font_bold, font_red=font_red, font_blue=font_blue) self.assertEqual(actual, expected) def test_line_difflib(self) -> None: a = ''.join([ '1 3\n', 'wow\n', 'he llo word\n', ]) b = ''.join([ '1 2 3\n', 'wow\n', 'hello world\n', ]) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH char_in_line = 40 limit = 40 expected = textwrap.dedent("""\ output: expected: 1| 1_3 1| 1_2_3 2| wow 2| wow 3| he_llo_word 3| hello_world """) font_dim = lambda s: s font_bold = lambda s: s font_red = lambda s: s font_blue = lambda s: s tokens = _tokenize_pretty_diff(a, expected=b, compare_mode=compare_mode, char_in_line=char_in_line, limit=limit) actual = _render_tokens(tokens=tokens, font_dim=font_dim, font_bold=font_bold, font_red=font_red, font_blue=font_blue) self.assertEqual(actual, expected) def test_file_difflib(self) -> None: a = ''.join([ 'foo\n', 'baz\n', 'hello\n', 'world\n', 'hey\n', 'wow\n', ]) b = ''.join([ 'foo\n', 'bar\n', 'baz\n', 'hello\n', 'world\n', 'wow\n', 'wow\n', ]) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH char_in_line = 40 limit = 40 expected = textwrap.dedent("""\ output: expected: 1| foo 1| foo 2| bar 2| baz 3| baz 3| hello 4| hello 4| world 5| world 5| hey 6| wow 6| wow 7| wow """) font_dim = lambda s: s font_bold = lambda s: s font_red = lambda s: s font_blue = lambda s: s tokens = _tokenize_pretty_diff(a, expected=b, compare_mode=compare_mode, char_in_line=char_in_line, limit=limit) actual = _render_tokens(tokens=tokens, font_dim=font_dim, font_bold=font_bold, font_red=font_red, font_blue=font_blue) self.assertEqual(actual, expected) class MakePrettyDiffLimitTest(unittest.TestCase): def test_with_limit(self) -> None: a = ''.join([ 'a\n', ] * 100) b = ''.join([ 'b\n', ] * 100) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH char_in_line = 40 limit = 40 expected = 1 + limit + 1 font_dim = lambda s: s font_bold = lambda s: s font_red = lambda s: s font_blue = lambda s: s tokens = _tokenize_pretty_diff(a, expected=b, compare_mode=compare_mode, char_in_line=char_in_line, limit=limit) actual = _render_tokens(tokens=tokens, font_dim=font_dim, font_bold=font_bold, font_red=font_red, font_blue=font_blue) self.assertEqual(len(actual.splitlines()), expected) def test_without_limit(self) -> None: a = ''.join([ 'a\n', ] * 100) b = ''.join([ 'b\n', ] * 100) compare_mode = CompareMode.CRLF_INSENSITIVE_EXACT_MATCH char_in_line = 40 limit = -1 expected = 1 + 100 font_dim = lambda s: s font_bold = lambda s: s font_red = lambda s: s font_blue = lambda s: s tokens = _tokenize_pretty_diff(a, expected=b, compare_mode=compare_mode, char_in_line=char_in_line, limit=limit) actual = _render_tokens(tokens=tokens, font_dim=font_dim, font_bold=font_bold, font_red=font_red, font_blue=font_blue) self.assertEqual(len(actual.splitlines()), expected)
35.754
251
0.561895
1,814
17,877
5.223815
0.07387
0.230477
0.113972
0.082524
0.855846
0.814162
0.787041
0.768784
0.735331
0.690798
0
0.014597
0.321698
17,877
499
252
35.825651
0.766865
0.004139
0
0.751142
0
0
0.096145
0
0
0
0
0
0.057078
1
0.057078
false
0
0.011416
0
0.084475
0.002283
0
0
0
null
1
0
0
1
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
8
51325c99fe1f1d09c761b7895273b4820b21a207
43,668
py
Python
chc/proof/CPOPredicate.py
Databean/CodeHawk-C
98720753beb51e0bf5105f8f6838618292fbf55c
[ "MIT" ]
10
2020-08-17T15:35:55.000Z
2022-03-23T14:39:57.000Z
chc/proof/CPOPredicate.py
kestreltechnology/CodeHawk-C
db0fa92fa630cd919f29021d464533f0e7170fed
[ "MIT" ]
31
2020-07-17T05:45:43.000Z
2021-05-29T04:49:49.000Z
chc/proof/CPOPredicate.py
kestreltechnology/CodeHawk-C
db0fa92fa630cd919f29021d464533f0e7170fed
[ "MIT" ]
3
2020-06-13T05:32:34.000Z
2021-09-16T02:31:39.000Z
# ------------------------------------------------------------------------------ # CodeHawk C Analyzer # Author: Henny Sipma # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2017-2020 Kestrel Technology LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # ------------------------------------------------------------------------------ import chc.app.CDictionaryRecord as CD import chc.app.CExp as CX po_predicate_names = { "ab": "allocation-base", "b": "buffer", "c": "cast", "cb": "common-base", "cbt": "common-base-type", "cls": "can-leave-scope", "cr": "controlled-resource", "cssl": "signed-to-signed-cast-lb", "cssu": "signed-to-signed-cast-ub", "csul": "signed-to-unsigned-cast-lb", "csuu": "signed-to-unsigned-cast-ub", "cus": "unsigned-to-signed-cast", "cuu": "unsigned-to-unsigned-cast", "dr": "distinct-region", "fc": "format-cast", "ft": "format-string", "ga": "global-address", "ha": "heap-address", "i": "initialized", "ilb": "index-lower-bound", "io": "int-overflow", "ir": "initialized-range", "is": "in-scope", "iu": "int-underflow", "iub": "index-upper-bound", "lb": "lower-bound", "nm": "new-memory", "nn": "not-null", "nneg": "non-negative", "no": "no-overlap", "nt": "null-terminated", "null": "null", "pc": "pointer-cast", "plb": "ptr-lower-bound", "pre": "precondition", "prm": "preserved-all-memory", "pub": "ptr-upper-bound", "pubd": "ptr-upper-bound-deref", "pv": "preserves-value", "sae": "stack-address-escape", "tao": "type-at-offset", "ub": "upper-bound", "uio": "uint-overflow", "uiu": "uint-underflow", "va": "var-args", "vc": "value-constraint", "vm": "valid-mem", "w": "width-overflow", "z": "not-zero", } def get_predicate_tag(name): revnames = {v: k for (k, v) in po_predicate_names.items()} if name in revnames: return revnames[name] class CPOPredicate(CD.CDictionaryRecord): def __init__(self, cd, index, tags, args): CD.CDictionaryRecord.__init__(self, cd, index, tags, args) def get_tag(self): return po_predicate_names[self.tags[0]] def is_allocation_base(self): return False def is_buffer(self): return False def is_cast(self): return False def is_common_base(self): return False def is_format_cast(self): return False def is_controlled_resource(self): return False def is_format_string(self): return False def is_in_scope(self): return False def is_can_leave_scope(self): return False def is_global_address(self): return False def is_heap_address(self): return False def is_index_lower_bound(self): return False def is_index_upper_bound(self): return False def is_initialized(self): return False def is_initialized_range(self): return False def is_int_overflow(self): return False def is_int_underflow(self): return False def is_lower_bound(self): return False def is_new_memory(self): return False def is_non_negative(self): return False def is_no_overlap(self): return False def is_not_null(self): return False def is_not_zero(self): return False def is_null(self): return False def is_null_terminated(self): return False def is_pointer_cast(self): return False def is_preserved_all_memory(self): return False def is_ptr_lower_bound(self): return False def is_ptr_upper_bound(self): return False def is_ptr_upper_bound_deref(self): return False def is_rev_buffer(self): return False def is_signed_to_signed_cast_lb(self): return False def is_signed_to_signed_cast_ub(self): return False def is_signed_to_unsigned_cast_lb(self): return False def is_signed_to_unsigned_cast_ub(self): return False def is_unsigned_to_signed_cast(self): return False def is_unsigned_to_unsigned_cast(self): return False def is_stack_address_escape(self): return False def is_type_at_offset(self): return False def is_upper_bound(self): return False def is_valid_mem(self): return False def is_value_constraint(self): return False def is_width_overflow(self): return False def has_variable(self, vid): return False def has_variable_op(self, vid, op): return False def has_argument(self, vid): return False def has_variable_deref(self, vid): return False def has_ref_type(self): return False def __str__(self): return "po-predicate " + self.tags[0] class CPONotNull(CPOPredicate): """ tags: 0: 'nn' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_not_null(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def has_argument(self, vid): if self.get_exp().is_lval(): lhost = self.get_exp().get_lval().get_lhost() return lhost.is_var() and lhost.get_vid() == vid else: return False def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOGlobalAddress(CPOPredicate): """ tags: 0: 'ga' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_global_address(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def has_argument(self, vid): if self.get_exp().is_lval(): lhost = self.get_exp().get_lval().get_lhost() return lhost.is_var() and lhost.get_vid() == vid else: return False def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOHeapAddress(CPOPredicate): """ tags: 0: 'ha' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(int(self.args[0])) def is_heap_address(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def has_argument(self, vid): if self.get_exp().is_lval(): lhost = self.get_exp().get_lval().get_lhost() return lhost.is_var() and lhost.get_vid() == vid else: return False def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPODistinctRegion(CPOPredicate): """ tags: 0: 'dr' args: 0: exp 1: memref index """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(int(self.args[0])) def get_memref(self): return int(self.args[1]) def is_distinct_region(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def has_argument(self, vid): if self.get_exp().is_lval(): lhost = self.get_exp().get_lval().get_lhost() return lhost.is_var() and lhost.get_vid() == vid else: return False def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + "," + str(self.get_memref()) + ")" ) class CPONull(CPOPredicate): """ tags: 0: 'null' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_null(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOValidMem(CPOPredicate): """ tags: 0: 'vm' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_valid_mem(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def has_argument(self, vid): if self.get_exp().is_lval(): lhost = self.get_exp().get_lval().get_lhost() return lhost.is_var() and lhost.get_vid() == vid else: return False def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOControlledResource(CPOPredicate): """ tags: 0: 'cr', 1: name of resource (e.g., memory) args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_resource(self): return self.tags[1] def is_controlled_resource(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def has_argument(self, vid): if self.get_exp().is_lval(): lhost = self.get_exp().get_lval().get_lhost() return lhost.is_var() and lhost.get_vid() == vid else: return False def __str__(self): return ( self.get_tag() + ":" + self.get_resource() + "(" + str(self.get_exp()) + ")" ) class CPOCanLeaveScope(CPOPredicate): """ tags: 0: 'cls' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_can_leave_scope(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOStackAddressEscape(CPOPredicate): """ tags: 0: 'sae' args: 0: lval option 1: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_lval(self): return self.cd.dictionary.get_lval(int(self.args[0])) def get_exp(self): return self.cd.dictionary.get_exp(int(self.args[1])) def has_lval(self): return (int(self.args[0])) >= 0 def is_stack_address_escape(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): lval = "" if self.has_lval(): lval = str(self.get_lval()) + "," return self.get_tag() + "(" + lval + str(self.get_exp()) + ")" class CPOInScope(CPOPredicate): """ tags: 0: 'is' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_in_scope(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOAllocationBase(CPOPredicate): """ tags: 0: 'ab' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_allocation_base(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPONewMemory(CPOPredicate): """ tags: 0: 'nm' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_new_memory(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOBuffer(CPOPredicate): """ tags: 0: 'b' args: 0: exp (pointer to buffer) 1: exp (length of buffer in bytes) """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_length(self): return self.cd.dictionary.get_exp(self.args[1]) def is_buffer(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) or self.get_length().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",size:" + str(self.get_length()) + ")" ) class CPORevBuffer(CPOPredicate): """ tags: 0: 'b' args: 0: exp (pointer to buffer) 1: exp (length of buffer in bytes before pointer) """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_length(self): return self.cd.dictionary.get_exp(self.args[1]) def is_rev_buffer(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) or self.get_length().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",size:" + str(self.get_length()) + ")" ) class CPOTypeAtOffset(CPOPredicate): """ tags: 0: 'tao' args: 0: typ 1: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_exp(self): return self.cd.dictionary.get_exp(self.args[1]) def has_variable(self, vid): return self.get_exp().has_variable(vid) def is_type_at_offset(self): return True def __str__(self): return ( self.get_tag() + "(" + str(self.get_type()) + "," + str(self.get_exp()) + ")" ) class CPOLowerBound(CPOPredicate): """ tags: 0: 'lb' args: 0: typ 1: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_exp(self): return self.cd.dictionary.get_exp(self.args[1]) def is_lower_bound(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_type()) + "," + str(self.get_exp()) + ")" ) class CPOUpperBound(CPOPredicate): """ tags: 0: 'ub' args: 0: typ 1: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_exp(self): return self.cd.dictionary.get_exp(self.args[1]) def has_variable(self, vid): return self.get_exp().has_variable(vid) def is_upper_bound(self): return True def __str__(self): return ( self.get_tag() + "(" + str(self.get_type()) + "," + str(self.get_exp()) + ")" ) class CPOIndexLowerBound(CPOPredicate): """ tags: 0: 'ilb' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_index_lower_bound(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOIndexUpperBound(CPOPredicate): """ tags: 0: 'iub' args: 0: index-exp 1: upperbound exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_bound(self): return self.cd.dictionary.get_exp(self.args[1]) def is_index_upper_bound(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",bound:" + str(self.get_bound()) + ")" ) class CPOInitialized(CPOPredicate): """ tags: 0: 'i' args: 0: lval """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_lval(self): return self.cd.dictionary.get_lval(self.args[0]) def is_initialized(self): return True def has_variable(self, vid): return self.get_lval().has_variable(vid) def has_variable_deref(self, vid): return self.get_lval().has_variable_deref(vid) def has_ref_type(self): return self.get_lval().has_ref_type() def __str__(self): return self.get_tag() + "(" + str(self.get_lval()) + ")" class CPOInitializedRange(CPOPredicate): """ tags: 0: 'ir' args: 0: exp (pointer to start of address range) 1: len-exp (number of bytes that should be initialized) """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_length(self): return self.cd.dictionary.get_exp(self.args[1]) def is_initialized_range(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",len:" + str(self.get_length()) + ")" ) class CPOCast(CPOPredicate): """ tags: 0: 'c' args: 0: typ (tfrom, current) 1: typ (tto, target) 2: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[2]) def get_from_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_tgt_type(self): return self.cd.dictionary.get_typ(self.args[1]) def is_cast(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + str(self.get_from_type()) + ",to:" + str(self.get_tgt_type()) + ")" ) class CPOFormatCast(CPOPredicate): """ tags: 0: 'c' args: 0: typ (tfrom, current) 1: typ (tto, target) 2: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[2]) def get_from_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_tgt_type(self): return self.cd.dictionary.get_typ(self.args[1]) def is_format_cast(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + str(self.get_from_type()) + ",to:" + str(self.get_tgt_type()) + ")" ) class CPOPointerCast(CPOPredicate): """ tags: 0: 'pc' args: 0: typ (tfrom, current) 1: typ (tto, target) 2: exp (pointed-to expression) """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[2]) def get_from_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_tgt_type(self): return self.cd.dictionary.get_typ(self.args[1]) def is_pointer_cast(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def has_argument(self, vid): if self.get_exp().is_lval(): lhost = self.get_exp().get_lval().get_lhost() return lhost.is_var() and lhost.get_vid() == vid else: return False def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + str(self.get_from_type()) + ",to:" + str(self.get_tgt_type()) + ")" ) class CPOSignedToUnsignedCastLB(CPOPredicate): """ tags: 0: 'csul' 1: from ikind 2: tgt ikind args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_from_kind(self): return self.tags[1] def get_tgt_kind(self): return self.tags[2] def is_signed_to_unsigned_cast_lb(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + self.get_from_kind() + ",to:" + self.get_tgt_kind() + ")" ) class CPOSignedToUnsignedCastUB(CPOPredicate): """ tags: 0: 'csuu' 1: from ikind 2: tgt ikind args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_from_kind(self): return self.tags[1] def get_tgt_kind(self): return self.tags[2] def is_signed_to_unsigned_cast_ub(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + self.get_from_kind() + ",to:" + self.get_tgt_kind() + ")" ) class CPOUnsignedToSignedCast(CPOPredicate): """ tags: 0: 'cus' 1: from ikind 2: tgt ikind args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_from_kind(self): return self.tags[1] def get_tgt_kind(self): return self.tags[2] def is_unsigned_to_signed_cast(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + self.get_from_kind() + ",to:" + self.get_tgt_kind() + ")" ) class CPOUnsignedToUnsignedCast(CPOPredicate): """ tags: 0: 'cuu' 1: from ikind 2: tgt ikind args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_from_kind(self): return self.tags[1] def get_tgt_kind(self): return self.tags[2] def is_unsigned_to_unsigned_cast(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + self.get_from_kind() + ",to:" + self.get_tgt_kind() + ")" ) class CPOSignedToSignedCastLB(CPOPredicate): """ tags: 0: 'cssl' 1: from ikind 2: tgt ikind args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_from_kind(self): return self.tags[1] def get_tgt_kind(self): return self.tags[2] def is_signed_to_signed_cast_lb(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + self.get_from_kind() + ",to:" + self.get_tgt_kind() + ")" ) class CPOSignedToSignedCastUB(CPOPredicate): """ tags: 0: 'cssu' 1: from ikind 2: tgt ikind args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_from_kind(self): return self.tags[1] def get_tgt_kind(self): return self.tags[2] def is_signed_to_signed_cast_ub(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",from:" + self.get_from_kind() + ",to:" + self.get_tgt_kind() + ")" ) class CPONotZero(CPOPredicate): """ tags: 0: 'z' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_not_zero(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPONonNegative(CPOPredicate): """ tags: 0: 'nneg' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_non_negative(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPONullTerminated(CPOPredicate): """ tags: 0: 'nt' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def is_null_terminated(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOIntUnderflow(CPOPredicate): """ tags: 0: 'iu' 1: binop 2: ikind args: 0: exp1 1: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_binop(self): return self.tags[1] def get_ikind(self): return self.tags[2] def get_exp1(self): return self.cd.dictionary.get_exp(self.args[0]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[1]) def is_int_underflow(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ",op:" + self.get_binop() + ",ikind:" + self.get_ikind() + ")" ) class CPOIntOverflow(CPOPredicate): """ tags: 0: 'io' 1: binop 2: ikind args: 0: exp1 1: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_binop(self): return self.tags[1] def get_ikind(self): return self.tags[2] def get_exp1(self): return self.cd.dictionary.get_exp(self.args[0]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[1]) def is_int_overflow(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ",op:" + self.get_binop() + ",ikind:" + self.get_ikind() + ")" ) class CPOUIntUnderflow(CPOPredicate): """ tags: 0: 'uiu' 1: binop 2: ikind args: 0: exp1 1: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_binop(self): return self.tags[1] def get_ikind(self): return self.tags[2] def get_exp1(self): return self.cd.dictionary.get_exp(self.args[0]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[1]) def is_int_underflow(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ",op:" + self.get_binop() + ",ikind:" + self.get_ikind() + ")" ) class CPOUIntOverflow(CPOPredicate): """ tags: 0: 'uio' 1: binop 2: ikind args: 0: exp1 1: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_binop(self): return self.tags[1] def get_ikind(self): return self.tags[2] def get_exp1(self): return self.cd.dictionary.get_exp(self.args[0]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[1]) def is_int_overflow(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ",op:" + self.get_binop() + ",ikind:" + self.get_ikind() + ")" ) class CPOWidthOverflow(CPOPredicate): """ tags: 0: 'w' 1: ikind args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_ikind(self): return self.tags[1] def is_width_overflow(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp()) + ",kind:" + self.get_ikind() + ")" ) class CPOPtrLowerBound(CPOPredicate): """ tags: 0: 'plb' 1: binop args: 0: typ 1: exp1 2: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_exp1(self): return self.cd.dictionary.get_exp(self.args[1]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[2]) def get_binop(self): return self.tags[1] def is_ptr_lower_bound(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ",op:" + self.get_binop() + ",typ:" + str(self.get_type()) + ")" ) class CPOPtrUpperBound(CPOPredicate): """ tags: 0: 'pl=ub' 1: binop args: 0: typ 1: exp1 2: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_exp1(self): return self.cd.dictionary.get_exp(self.args[1]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[2]) def get_binop(self): return self.tags[1] def is_ptr_upper_bound(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def has_variable_op(self, vid, op): return self.get_exp1().has_variable_op( vid, op ) or self.get_exp2().has_variable_op(vid, op) def __str__(self): return ( self.get_tag() + "(typ:" + str(self.get_type()) + ",op:" + self.get_binop() + "," + str(self.get_exp1()) + "," + str(self.get_exp2()) + ")" ) class CPOPtrUpperBoundDeref(CPOPredicate): """ tags: 0: 'pubd' 1: binop args: 0: typ 1: exp1 2: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_type(self): return self.cd.dictionary.get_typ(self.args[0]) def get_exp1(self): return self.cd.dictionary.get_exp(self.args[1]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[2]) def get_binop(self): return self.tags[1] def is_ptr_upper_bound_deref(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(typ:" + str(self.get_type()) + ",op:" + self.get_binop() + "," + str(self.get_exp1()) + "," + str(self.get_exp2()) + ")" ) class CPOCommonBase(CPOPredicate): """ tags: 0: 'cb' args: 0: exp1 1: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp1(self): return self.cd.dictionary.get_exp(self.args[0]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[1]) def is_common_base(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ")" ) class CPOCommonBaseType(CPOPredicate): """ tags: 0: 'cbt' args: 0: exp1 1: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp1(self): return self.cd.dictionary.get_exp(self.args[0]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[1]) def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ")" ) class CPOFormatString(CPOPredicate): """ tags: 0: 'ft' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(int(self.args[0])) def is_format_string(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return self.get_tag() + "(" + str(self.get_exp()) + ")" class CPOVarArgs(CPOPredicate): """ tags: 0: 'va' args: 0: exp (format string) 1: int (expected number of arguments) r: exps (actual arguments) """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_formatstring(self): return self.cd.dictionary.get_exp(int(self.args[1])) def get_argcount(self): return int(self.args[0]) def get_arguments(self): return [self.cd.dictionary.get_exp(int(x)) for x in self.args[2:]] def __str__(self): return ( self.get_tag() + "(" + str(self.get_formatstring()) + "," + str(self.get_argcount()) + "," + str(len(self.get_arguments())) + ")" ) class CPONoOverlap(CPOPredicate): """ tags: 0: 'no' args: 0: exp1 1: exp2 """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp1(self): return self.cd.dictionary.get_exp(self.args[0]) def get_exp2(self): return self.cd.dictionary.get_exp(self.args[1]) def is_no_overlap(self): return True def has_variable(self, vid): return self.get_exp1().has_variable(vid) or self.get_exp2().has_variable(vid) def __str__(self): return ( self.get_tag() + "(" + str(self.get_exp1()) + "," + str(self.get_exp2()) + ")" ) class CPOValueConstraint(CPOPredicate): """ tags: 0: 'vc' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def get_tag(self): return CPOPredicate.get_tag(self) # + ':' + str(self.get_exp()) def is_value_constraint(self): return True def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return str(self.get_exp()) class CPOPreservedAllMemory(CPOPredicate): """ tags: 0: 'prm' """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def is_preserved_all_memory(self): return True def __str__(self): return self.get_tag() class CPOPreservedValue(CPOPredicate): """ tags: 0: 'pv' args: 0: exp """ def __init__(self, cd, index, tags, args): CPOPredicate.__init__(self, cd, index, tags, args) def get_exp(self): return self.cd.dictionary.get_exp(self.args[0]) def has_variable(self, vid): return self.get_exp().has_variable(vid) def __str__(self): return "preserves-value(" + str(self.get_exp()) + ")"
21.954751
88
0.548777
5,405
43,668
4.165772
0.06124
0.109256
0.092023
0.066619
0.816264
0.799876
0.75191
0.727127
0.714736
0.703855
0
0.011642
0.315448
43,668
1,988
89
21.965795
0.741578
0.098356
0
0.838302
0
0
0.030494
0.00447
0
0
0
0
0
1
0.323397
false
0
0.001807
0.270099
0.654923
0
0
0
0
null
0
0
0
1
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
1
0
0
0
1
1
0
0
10
5ac4f48991ca83a2eb902daef58390182cff0376
74,769
py
Python
tests/python/gpu/test_norm_conv_gpu.py
sneaxiy/NVIDIA-MxNet
ce30b18212fbf23f68c006a02cc034e417bb5518
[ "Apache-2.0" ]
null
null
null
tests/python/gpu/test_norm_conv_gpu.py
sneaxiy/NVIDIA-MxNet
ce30b18212fbf23f68c006a02cc034e417bb5518
[ "Apache-2.0" ]
null
null
null
tests/python/gpu/test_norm_conv_gpu.py
sneaxiy/NVIDIA-MxNet
ce30b18212fbf23f68c006a02cc034e417bb5518
[ "Apache-2.0" ]
3
2021-07-20T07:40:15.000Z
2021-08-03T08:39:17.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. from __future__ import print_function import sys import os import mxnet as mx import numpy as np from mxnet.test_utils import default_context, set_default_context, assert_almost_equal curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) sys.path.insert(0, os.path.join(curr_path, '../unittest')) from common import setup_module, with_seed, teardown set_default_context(mx.gpu(0)) # Helper function that returns True/False with equal probability. def _random_boolean(): return np.random.randint(0,2) == 0 # Helper function to the normalized convolution tests # Return the indices (along the feature dimension) that have relu inputs near 0. def _has_near_zero_outputs(x, b, g, eps, threshold): ctx = default_context() X = mx.sym.Variable('X') B = mx.sym.Variable('B') # beta, i.e. bias G = mx.sym.Variable('G') # gamma, i.e. scale MovMean = mx.sym.Variable('MovMean') MovVar = mx.sym.Variable('MovVar') feature_shape = b.shape mov_mean = mx.nd.zeros(feature_shape, dtype=np.float32, ctx=ctx) mov_var = mx.nd.ones(feature_shape, dtype=np.float32, ctx=ctx) bn_sym = mx.sym.BatchNorm(data=X, gamma=G, beta=B, act_type=None, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=0.9, fix_gamma=False, use_global_stats=False, output_mean_var=False, cudnn_off=False, name=None, axis=-1) args_dict = {'X':x, 'B':b, 'G':g,} aux_states_dict = {'MovMean':mov_mean, 'MovVar':mov_var} grad_req = {'MovMean':'null', 'MovVar':'null', 'X':'null', 'W':'null', 'G':'null', 'B':'null'} bn_exe = bn_sym.bind(ctx=ctx, args=args_dict, aux_states=aux_states_dict, grad_req=grad_req) # Execute forward() graph calculation # need is_train=True to keep Batchnorm using the mini-batch mean and variance bn_outputs = bn_exe.forward(is_train=True) out_data = bn_outputs[0].asnumpy() out_data_abs = np.abs(out_data) not_feature_axes = (0, 1, 2) origin_dist_mins = out_data_abs.min(axis=not_feature_axes) bad_indices = np.nonzero(origin_dist_mins < threshold)[0] return bad_indices @with_seed() def test_norm_convolution(): ctx = default_context() cuda_arch_list = [70, 75, 80, 86] cuda_arch = mx.context.gpu_sm_arch(ctx.device_id) if cuda_arch not in cuda_arch_list: print('Bypassing normalized convolution test on cuda arch {} supported versions are {}).'.format( cuda_arch, cuda_arch_list)) return # RN50 layer shapes nchw_shapes = [ ( 64, 256, 56, 56), ( 64, 128, 28, 28), ( 64, 512, 28, 28), ( 64, 256, 14, 14), ( 64, 1024, 14, 14), ( 64, 512, 7, 7), ( 64, 2048, 7, 7), (128, 64, 56, 56), (128, 256, 56, 56), (128, 128, 28, 28), (128, 512, 28, 28), (128, 256, 14, 14), (128, 1024, 14, 14), (128, 512, 7, 7), (128, 2048, 7, 7), ] # Make dataset stats (to input to BNStatsFinalize) def create_input_stats_np(data_np): data_fp32_np = data_np.astype(np.float32) not_feature_axes = (0, 1, 2) feature_sum_np = data_fp32_np.sum(axis=not_feature_axes) feature_sum_squares_np = np.square(data_fp32_np).sum(axis=not_feature_axes) return (feature_sum_np, feature_sum_squares_np) def create_output_stats(data, output_stats): if output_stats: data_fp32 = mx.sym.cast(data, np.float32) not_feature_axes = (0, 1, 2) feature_sum = data_fp32.sum(axis=not_feature_axes) feature_sum_squares = data_fp32.square().sum(axis=not_feature_axes) return mx.sym.Group([data, feature_sum, feature_sum_squares]) else: return data def out_shape(nhwc_inshape, num_filters, kernel_shape, stride, pad): (n, h, w, _) = nhwc_inshape (kernel_h, kernel_w) = kernel_shape (stride_h, stride_w) = stride (pad_h, pad_w) = pad out_shape_h = 1 + ((h + 2 * pad_h - kernel_h) // stride_h) out_shape_w = 1 + ((w + 2 * pad_w - kernel_w) // stride_w) return (n, out_shape_h, out_shape_w, num_filters) # flip a dataset about the 1st dimension def flip(data): return mx.sym.flip(data, axis=0) # return a new symbol that isolates the input symbol's outputs def buffer(sym): num_outputs = len(sym.list_outputs()) if num_outputs == 1: return flip(flip(sym)) else: flipped_outputs = [ flip(flip(sym[i])) for i in range(num_outputs)] return mx.sym.Group(flipped_outputs) # Test fused op without input normalization. Options for activation and output of stats. def finalize_norm_conv_test(nchw_inshape, kernel_shape, num_filter, act_type, stride, pad, output_stats, no_norm, no_conv, eps, momentum): # If we are disabling the convolution (no_conv = True), then set kernel=1x1 and weights 1 if no_conv: if kernel_shape != (1,1): print('Ignoring kernel_shape {}, forcing 1x1 in no_conv mode.'.format(kernel_shape)) kernel_shape = (1,1) (n, c, h, w) = nchw_inshape X = mx.sym.Variable('X') W = mx.sym.Variable('W') SUM = mx.sym.Variable('SUM') SUMSQ = mx.sym.Variable('SUMSQ') B = mx.sym.Variable('B') # beta, i.e. bias G = mx.sym.Variable('G') # gamma, i.e. scale # randomly insert buffering here to exercise in-place vs. copy of gamma/beta by Finalize if _random_boolean(): B = buffer(B) G = buffer(G) MovMean = mx.sym.Variable('MovMean') MovVar = mx.sym.Variable('MovVar') # make 'ground truth' symbol using standard Batchnorm and Convolution if no_norm and (act_type is None): normalized = X elif no_norm: normalized = mx.sym.Activation(data=X, act_type=act_type) else: normalized = mx.sym.BatchNorm(data=X, gamma=G, beta=B, act_type=act_type, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, use_global_stats=False, output_mean_var=False, cudnn_off=False, name=None, axis=-1) (r, s) = kernel_shape layout = 'NHWC' conv_args = {'weight':W, 'num_filter':num_filter, 'kernel':kernel_shape, 'stride':stride, 'pad':pad, 'layout':layout, 'name':'conv'} # For test failure reproducibility, fix the algos of the golden copy conv_sym = mx.sym.Convolution(data=normalized, no_bias=True, cudnn_algo_fwd=1, cudnn_algo_bwd_data=1, cudnn_algo_bwd_filter=1, **conv_args) conv_sym = create_output_stats(conv_sym, output_stats) # make symbol-under-test using NormConvolution if not no_norm: # NormConvolution makes use of conv_args but for stats-apply mode has more inputs: conv_args.update({'in_sum':SUM, 'in_sum_squares':SUMSQ, 'gamma':G, 'beta':B, 'moving_mean':MovMean, 'moving_var':MovVar, 'eps':eps, 'momentum':momentum, 'fix_gamma':False, 'output_mean_var':True }) norm_conv_sym = mx.sym.NormConvolution(X, act_type=act_type, no_norm=no_norm, **conv_args) if not output_stats: # discard sum and sum_squares outputs before binding norm_conv_sym = norm_conv_sym[0] # make data inputs weight_shape = (num_filter, r, s, c) data_shape = (n, h, w, c) # x_np = np.fromfunction(lambda n, h, w, c: 3*((n+h+w)%2), data_shape) # x = mx.nd.array(x_np, dtype=np.float16, ctx=ctx) x = mx.ndarray.random.uniform(-0.5, 0.5, data_shape, dtype=np.float16, ctx=ctx) (feature_sum_np, feature_sum_squares_np) = create_input_stats_np(x.asnumpy()) sum = mx.nd.array(feature_sum_np, dtype=np.float32) sum_squares = mx.nd.array(feature_sum_squares_np, dtype=np.float32) equiv_scale_bias_shape = (c,) scale_max = 1.25 bias_max = 1 # Comparing gradients of two symbols is tricky when a non-smooth function like 'relu' # is part of the function. We ensure that no relu inputs are near 0 (within a threshold) # by trying different beta/gamma values as needed. b_np = np.zeros(equiv_scale_bias_shape, dtype=np.float32) g_np = np.zeros(equiv_scale_bias_shape, dtype=np.float32) indices_to_set = np.array(range(c)) while len(indices_to_set) > 0: for index in indices_to_set: b_np[index] = np.random.uniform(-bias_max, bias_max) g_np[index] = np.random.uniform(1.0/scale_max, scale_max) b = mx.nd.array(b_np, dtype=np.float32, ctx=ctx) g = mx.nd.array(g_np, dtype=np.float32, ctx=ctx) smallest_norm_fp16 = pow(2, -14) threshold = smallest_norm_fp16 / 2 need_data_check = not no_norm and act_type == 'relu' if need_data_check: indices_to_set = _has_near_zero_outputs(x, b, g, eps, threshold=threshold) else: indices_to_set = [] # mov_mean_np = np.zeros(equiv_scale_bias_shape).astype(np.float32) # mov_var_np = np.ones(equiv_scale_bias_shape).astype(np.float32) mov_mean_np = np.random.uniform(-bias_max, bias_max, equiv_scale_bias_shape) mov_var_np = np.random.uniform(1.0/scale_max, scale_max, equiv_scale_bias_shape) # since the models change the moving mean and variance, each model gets their own copy mov_mean1 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_mean2 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_var1 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) mov_var2 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) if no_conv: weights = mx.ndarray.ones(weight_shape, dtype=np.float16, ctx=ctx) else: weights = mx.ndarray.random.uniform(-0.20, 0.20, weight_shape, dtype=np.float16, ctx=ctx) # These are the tensor's that receive the backpropped gradients (so an output of backward()) # Copy 1 is for 'ground truth' symbol based on BatchNorm/Convolution ops d_x_out_gt = mx.ndarray.zeros(data_shape, dtype=np.float16, ctx=ctx) d_w_out_gt = mx.ndarray.zeros(weight_shape, dtype=np.float16, ctx=ctx) d_gamma_out_gt = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_beta_out_gt = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) # Copy 2 is for symbol based on BNStatsFinalize/NormConvolution ops (=ones, not zeros) d_x_out = mx.ndarray.ones(data_shape, dtype=np.float16, ctx=ctx) d_w_out = mx.ndarray.ones(weight_shape, dtype=np.float16, ctx=ctx) d_gamma_out = mx.ndarray.ones(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_beta_out = mx.ndarray.ones(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) # bind i/o's to symbols to create executors grad_req = {'SUM':'null', 'SUMSQ':'null', 'MovMean':'null', 'MovVar':'null', 'X':'write', 'W':'write', 'G':'write', 'B':'write'} args_grad_dict_gt = {'X':d_x_out_gt, 'W':d_w_out_gt, 'G':d_gamma_out_gt, 'B':d_beta_out_gt} args_grad_dict = {'X':d_x_out, 'W':d_w_out, 'G':d_gamma_out, 'B':d_beta_out} args_dict = {'X':x, 'W':weights} # conv binding does not need SUM, and SUMSQ, but extra items are OK if not no_norm: args_dict.update({'B':b, 'G':g, 'SUM':sum, 'SUMSQ':sum_squares}) gt_aux_states_dict = \ {'MovMean':mov_mean1, 'MovVar':mov_var1} finalize_aux_states_dict = \ {'MovMean':mov_mean2, 'MovVar':mov_var2} conv_exe = conv_sym.bind(ctx=ctx, args=args_dict, args_grad=args_grad_dict_gt, aux_states=gt_aux_states_dict, grad_req=grad_req) norm_conv_exe = norm_conv_sym.bind(ctx=ctx, args=args_dict, args_grad=args_grad_dict, aux_states=finalize_aux_states_dict, grad_req=grad_req) # Execute forward() graph calculation # need is_train=True to keep Batchnorm using the mini-batch mean and variance conv_outputs = conv_exe.forward(is_train=True) # need is_train=True to keep stats from being turned off norm_conv_outputs = norm_conv_exe.forward(is_train=True) # Check forward outputs outputs = ['out', 'sum', 'sum_squares'] # greater atols needs for 'sum' and 'sum_squares', also if input scale/bias is applied if no_norm: tols = [(1e-2, 2e-2), (1e-2, 2), (1e-2, 2)] else: # 'sum' seems to have a large span (e.g. -400K -> +400K) so a large absolute tolerance # is needed to cover those cases when the result is near 0 and rtol can't help. # One possible source of the large sum tolerance is the internal rounding of the # mean to fp16. Any rounding amount will give a bias to the conv inputs and so the sum. # 'sum_squares' doesn't have this issue because rtol handles the always-positive result. per_element_atol = 5e-3 sum_atol = n * h * w * per_element_atol tols = [(1e-2, 1e-1), (1e-1, sum_atol), (1e-2, 2)] num_outputs = 3 if output_stats else 1 for idx in range(num_outputs): out_name = outputs[idx] conv_data = conv_outputs[idx] norm_conv_data = norm_conv_outputs[idx] (rtol, atol) = tols[idx] assert_almost_equal(conv_data, norm_conv_data, rtol=rtol, atol=atol, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Check backward function if no_norm and act_type is not None: # gradient calculation not supported for this configuration return # Create backward gradients outshape = out_shape(data_shape, num_filter, kernel_shape, stride, pad) d_out_in = mx.ndarray.random.uniform(-0.2, 0.2, outshape, dtype=np.float16, ctx=ctx) # not really needed sum_shape = (num_filter,) # gradients on these outputs will be summed into the d_out_in for the ground truth # symbol, so make sure these are 0. d_sum_in = mx.ndarray.zeros(sum_shape, dtype=np.float32, ctx=ctx) d_sum_squares_in = mx.ndarray.zeros(sum_shape, dtype=np.float32, ctx=ctx) # d_sum_in = mx.ndarray.random.uniform(0.0, 1.0, sum_shape, # dtype=np.float32, ctx=ctx) # d_sum_squares_in = mx.ndarray.random.uniform(0.0, 1.0, sum_shape, # dtype=np.float32, ctx=ctx) # Execute backward() graph calculation if output_stats: conv_outputs = conv_exe.backward([d_out_in, d_sum_in, d_sum_squares_in]) norm_conv_outputs = norm_conv_exe.backward([d_out_in, d_sum_in, d_sum_squares_in]) else: conv_outputs = conv_exe.backward([d_out_in,]) norm_conv_outputs = norm_conv_exe.backward([d_out_in,]) # Check weight gradient out_name = 'd_w' assert_almost_equal(d_w_out_gt, d_w_out, atol=0.3, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Check data gradient # This check is flakey when act_type = relu because if the two models differ on whether # the normalized value is above or below 0, then the gradient may or may-not be backpropped. # To fix this test, we could run a separate model with relu off, capture the normalized # output and then mask off the gradient comparison when the normalized value is near 0. out_name = 'd_x' if act_type is None: assert_almost_equal(d_x_out_gt, d_x_out, atol=0.1, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Check gamma and beta gradients out_name = 'd_gamma' assert_almost_equal(d_gamma_out_gt, d_gamma_out, atol=10, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) out_name = 'd_beta' assert_almost_equal(d_beta_out_gt, d_beta_out, atol=10, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Test input normalization function only: no_norm = False, 1x1 unity-weights conv # Also test with 'relu' activation on and off. print('\nTest of input normalization without convolution function.') eps = 1e-4 momentum = 0.9 for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] (n, c, h, w) = inshape num_filter = 32 outshape = (n, num_filter, h, w) stride = (1,1) print('nchw inshape = {}, outshape = {}, stride = {}'.format(inshape, outshape, stride)) kernel_shape = (1, 1) pad = (0, 0) output_stats = False act_type = 'relu' if _random_boolean() else None print(' kernel= {}, pad = {}, output_stats={}, act_type = {}'.format( kernel_shape, pad, output_stats, act_type)) finalize_norm_conv_test(nchw_inshape=inshape, kernel_shape=kernel_shape, num_filter=num_filter, act_type=act_type, stride=stride, pad=pad, output_stats=output_stats, no_norm=False, no_conv=True, eps=eps, momentum=momentum) # Test convolution and stats-gen functions, first without, then with, input normalization. # Also test with 'relu' activation on and off. for no_norm in [True, False]: if no_norm: print('\nTest of convolution function, without input normalization.') else: print('\nTest of convolution function with input normalization.') for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] (n, c, h, w) = inshape (stride_h, stride_w) = (1,1) # Leverage next test case (if available) to determine outshape, strides if i == len(nchw_shapes)-1: num_filter = nchw_shapes[i][1] else: num_filter = nchw_shapes[i+1][1] if nchw_shapes[i+1][2] < nchw_shapes[i][2]: stride_h = nchw_shapes[i][2] // nchw_shapes[i+1][2] if nchw_shapes[i+1][3] < nchw_shapes[i][3]: stride_w = nchw_shapes[i][3] // nchw_shapes[i+1][3] stride = (stride_h, stride_w) outshape = (n, num_filter, h // stride_h, w // stride_w) print('nchw inshape = {}, outshape = {}, stride = {}'.format(inshape, outshape, stride)) # Only 3x3 kernel supports strides, not 1x1 kernel_shapes = [(3, 3),] if stride_h > 1 or stride_w > 1 else [(1, 1), (3, 3)] for kernel_shape in kernel_shapes: # padding doesn't make sense for a 1x1 kernel pads = [(0, 0),] if kernel_shape[0] == 1 or kernel_shape[1] == 1 else [(0, 0), (1, 1)] for pad in pads: act_type = 'relu' if _random_boolean() else None output_stats = _random_boolean() print(' kernel= {}, pad = {}, output_stats={}, act_type = {}'.format( kernel_shape, pad, output_stats, act_type)) finalize_norm_conv_test(nchw_inshape=inshape, kernel_shape=kernel_shape, num_filter=num_filter, act_type=act_type, stride=stride, pad=pad, output_stats=output_stats, no_norm=no_norm, no_conv=False, eps=eps, momentum=momentum) @with_seed() def test_normalized_convolution(): ctx = default_context() cuda_arch_list = [70, 75, 80, 86] cuda_arch = mx.context.gpu_sm_arch(ctx.device_id) if cuda_arch not in cuda_arch_list: print('Bypassing normalized convolution test on cuda arch {} supported versions are {}).'.format( cuda_arch, cuda_arch_list)) return # RN50 layer shapes nchw_shapes = [ ( 64, 256, 56, 56), ( 64, 128, 28, 28), ( 64, 512, 28, 28), ( 64, 256, 14, 14), ( 64, 1024, 14, 14), ( 64, 512, 7, 7), ( 64, 2048, 7, 7), (128, 64, 56, 56), (128, 256, 56, 56), (128, 128, 28, 28), (128, 512, 28, 28), (128, 256, 14, 14), (128, 1024, 14, 14), (128, 512, 7, 7), (128, 2048, 7, 7), ] # Make dataset stats (to input to BNStatsFinalize) def create_mean_inv_std(data): num_features = data.shape[3] num_elems_per_feature = np.prod(data.shape) / num_features data_fp32 = data.astype(np.float32) not_feature_axes = (0, 1, 2) feature_sum = data_fp32.sum(axis=not_feature_axes) mean = feature_sum / num_elems_per_feature squared_error_sum = np.square(data_fp32 - mean).sum(axis=not_feature_axes) variance = squared_error_sum / num_elems_per_feature inv_std_dev = 1.0 / np.sqrt(variance) return (mean, inv_std_dev) # Prepare the input for a standard Convolution so it will mimic NormalizedConvolution def normalize_input(data, equiv_scale, equiv_bias, act_type, no_equiv_scale_bias): normalized = data if no_equiv_scale_bias else \ mx.sym.broadcast_add(mx.sym.broadcast_mul(data, equiv_scale), equiv_bias) return normalized if act_type is None else mx.sym.Activation(normalized, act_type=act_type) # Helper function to the normalized convolution tests # Return the indices (along the feature dimension) that have relu inputs near 0. def has_near_zero_outputs(x, b, g, threshold): X = mx.sym.Variable('X') B = mx.sym.Variable('B') # beta, i.e. bias G = mx.sym.Variable('G') # gamma, i.e. scale norm_sym = mx.sym.broadcast_add(mx.sym.broadcast_mul(X, G), B) args_dict = {'X':x, 'B':b, 'G':g,} grad_req = {'X':'null', 'G':'null', 'B':'null'} norm_exe = norm_sym.bind(ctx=ctx, args=args_dict, grad_req=grad_req) # Execute forward() graph calculation # need is_train=True to keep Batchnorm using the mini-batch mean and variance norm_outputs = norm_exe.forward(is_train=True) out_data = norm_outputs[0].asnumpy() out_data_abs = np.abs(out_data) not_feature_axes = (0, 1, 2) origin_dist_mins = out_data_abs.min(axis=not_feature_axes) bad_indices = np.nonzero(origin_dist_mins < threshold)[0] return bad_indices # Make dataset stats (to augment standard Convolution) to mimic NormalizedConvolution def create_output_stats(data, output_stats): if output_stats: data_fp32 = mx.sym.cast(data, np.float32) not_feature_axes = (0, 1, 2) feature_sum = data_fp32.sum(axis=not_feature_axes) feature_sum_squares = data_fp32.square().sum(axis=not_feature_axes) return mx.sym.Group([data, feature_sum, feature_sum_squares]) else: return data # Test fused op without input normalization. Options for activation and output of stats. def convolution_stats_test(nchw_inshape, kernel_shape, num_filter, act_type, stride, pad, output_stats, no_equiv_scale_bias, no_conv): # If we are disabling the convolution (no_conv = True), then set kernel=1x1 and weights 1 if no_conv: if kernel_shape != (1,1): print('Ignoring kernel_shape {}, forcing 1x1 in no_conv mode.'.format(kernel_shape)) kernel_shape = (1,1) (n, c, h, w) = nchw_inshape X = mx.sym.Variable('X') W = mx.sym.Variable('W') EB = mx.sym.Variable('EB') # equiv_bias ES = mx.sym.Variable('ES') # equiv_scale M = mx.sym.Variable('M') # mean V = mx.sym.Variable('V') # variance (inv_std_dev actually) G = mx.sym.Variable('G') # gamma (dummy, only needed for backward) B = mx.sym.Variable('B') # beta (dummy, only needed for backward) (r, s) = kernel_shape layout = 'NHWC' conv_args = {'weight':W, 'num_filter':num_filter, 'kernel':kernel_shape, 'stride':stride, 'pad':pad, 'layout':layout, 'name':'conv'} conv_input = normalize_input(data=X, equiv_scale=ES, equiv_bias=EB, act_type=act_type, no_equiv_scale_bias=no_equiv_scale_bias) # For test failure reproducibility, fix the algos of the golden copy conv_sym = mx.sym.Convolution(conv_input, no_bias=True, cudnn_algo_fwd=1, cudnn_algo_bwd_data=1, cudnn_algo_bwd_filter=1, **conv_args) conv_sym = create_output_stats(conv_sym, output_stats) if not no_equiv_scale_bias: conv_args.update({'equiv_bias':EB, 'equiv_scale':ES, 'mean':M, 'var':V, 'gamma':G, 'beta':B}) norm_conv_sym = mx.sym.NormalizedConvolution(X, act_type=act_type, no_equiv_scale_bias=no_equiv_scale_bias, **conv_args) if not output_stats: # discard sum and sum_squares outputs before binding norm_conv_sym = norm_conv_sym[0] weight_shape = (num_filter, r, s, c) data_shape = (n, h, w, c) feature_plane_elements = n * h * w x = mx.ndarray.random.uniform(-0.5, 0.5, data_shape, dtype=np.float16, ctx=ctx) (m_np, v_np) = create_mean_inv_std(x.asnumpy()) m = mx.nd.array(m_np, dtype=np.float32, ctx=ctx) v = mx.nd.array(v_np, dtype=np.float32, ctx=ctx) if no_conv: w = mx.ndarray.ones(weight_shape, dtype=np.float16, ctx=ctx) else: w = mx.ndarray.random.uniform(-0.5, 0.5, weight_shape, dtype=np.float16, ctx=ctx) equiv_scale_bias_shape = (c,) scale_max = 1.25 bias_max = 1 # Comparing gradients of two symbols is tricky when a non-smooth function like 'relu' # is part of the function. We ensure that no relu inputs are near 0 (within a threshold) # by trying different beta/gamma values as needed. eb_np = np.zeros(equiv_scale_bias_shape, dtype=np.float16) es_np = np.zeros(equiv_scale_bias_shape, dtype=np.float16) indices_to_set = np.array(range(c)) while len(indices_to_set) > 0: for index in indices_to_set: eb_np[index] = np.random.uniform(-bias_max, bias_max) es_np[index] = np.random.uniform(1.0/scale_max, scale_max) eb = mx.nd.array(eb_np, dtype=np.float16, ctx=ctx) es = mx.nd.array(es_np, dtype=np.float16, ctx=ctx) smallest_norm_fp16 = pow(2, -14) threshold = smallest_norm_fp16 / 2 need_data_check = not no_equiv_scale_bias and act_type == 'relu' if need_data_check: indices_to_set = has_near_zero_outputs(x, eb, es, threshold=threshold) else: indices_to_set = [] dummy_g = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) dummy_b = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) args_dict = {'X':x, 'W':w} if no_equiv_scale_bias else {'X':x, 'W':w, 'EB':eb, 'ES':es, 'M':m, 'V':v, 'G':dummy_g, 'B':dummy_b} conv_exe = conv_sym.bind(ctx=ctx, args=args_dict, grad_req='null') norm_conv_exe = norm_conv_sym.bind(ctx=ctx, args=args_dict, grad_req='null') conv_outputs = conv_exe.forward(is_train=False) # need is_train=True to keep stats from being turned off norm_conv_outputs = norm_conv_exe.forward(is_train=output_stats) outputs = ['out', 'sum', 'sum_squares'] # greater atols needs for 'sum' and 'sum_squares', also if input scale/bias is applied if no_equiv_scale_bias: tols = [(1e-2, 2e-2), (1e-2, 2), (1e-2, 2)] else: # 'sum' seems to have a large span (e.g. -400K -> +400K) so a large absolute tolerance # is needed to cover those cases when the result is near 0 and rtol can't help. # One possible source of the large sum tolerance is the internal rounding of the # mean to fp16. Any rounding amount will give a bias to the conv inputs and so the sum. # 'sum_squares' doesn't have this issue because rtol handles the always-positive result. per_element_atol = 5e-3 sum_atol = feature_plane_elements * per_element_atol tols = [(1e-2, 1e-1), (5e-2, sum_atol), (1e-2, 2)] num_outputs = 3 if output_stats else 1 for idx in range(num_outputs): out_name = outputs[idx] conv_data = conv_outputs[idx] norm_conv_data = norm_conv_outputs[idx] (rtol, atol) = tols[idx] assert_almost_equal(conv_data, norm_conv_data, rtol=rtol, atol=atol, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Test input normalization function only: no_equiv_scale_bias = False, 1x1 unity-weights conv # Also test with 'relu' activation on and off. for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] (n, c, h, w) = inshape num_filter = 32 outshape = (n, num_filter, h, w) stride = (1,1) print('nchw inshape = {}, outshape = {}, stride = {}'.format(inshape, outshape, stride)) kernel_shape = (1, 1) pad = (0, 0) output_stats = False act_type = 'relu' if _random_boolean() else None print(' kernel= {}, pad = {}, output_stats={}, act_type = {}'.format( kernel_shape, pad, output_stats, act_type)) convolution_stats_test(nchw_inshape=inshape, kernel_shape=kernel_shape, num_filter=num_filter, act_type=act_type, stride=stride, pad=pad, output_stats=output_stats, no_equiv_scale_bias=False, no_conv=True) # Test convolution and stats-gen functions, first without, then with, input normalization. # Also test with 'relu' activation on and off. for no_equiv_scale_bias in [True, False]: if no_equiv_scale_bias: print('\nTest of convolution function, without input normalization.') else: print('\nTest of convolution function with input normalization.') for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] (n, c, h, w) = inshape (stride_h, stride_w) = (1,1) # Leverage next test case (if available) to determine outshape, strides if i == len(nchw_shapes)-1: num_filter = nchw_shapes[i][1] else: num_filter = nchw_shapes[i+1][1] if nchw_shapes[i+1][2] < nchw_shapes[i][2]: stride_h = nchw_shapes[i][2] // nchw_shapes[i+1][2] if nchw_shapes[i+1][3] < nchw_shapes[i][3]: stride_w = nchw_shapes[i][3] // nchw_shapes[i+1][3] stride = (stride_h, stride_w) outshape = (n, num_filter, h // stride_h, w // stride_w) print('nchw inshape = {}, outshape = {}, stride = {}'.format(inshape, outshape, stride)) # Only 3x3 kernel supports strides, not 1x1 kernel_shapes = [(3, 3),] if stride_h > 1 or stride_w > 1 else [(1, 1), (3, 3)] for kernel_shape in kernel_shapes: # padding doesn't make sense for a 1x1 kernel pads = [(0, 0),] if kernel_shape[0] == 1 or kernel_shape[1] == 1 else [(0, 0), (1, 1)] for pad in pads: act_type = 'relu' if _random_boolean() else None output_stats = _random_boolean() print(' kernel= {}, pad = {}, output_stats={}, act_type = {}'.format( kernel_shape, pad, output_stats, act_type)) convolution_stats_test(nchw_inshape=inshape, kernel_shape=kernel_shape, num_filter=num_filter, act_type=act_type, stride=stride, pad=pad, output_stats=output_stats, no_equiv_scale_bias=no_equiv_scale_bias, no_conv=False) @with_seed() def test_finalize_with_normalized_convolution(): ctx = default_context() min_cuda_arch = 70 max_cuda_arch = 86 cuda_arch = mx.context.gpu_sm_arch(ctx.device_id) if cuda_arch < min_cuda_arch or cuda_arch > max_cuda_arch: print('Bypassing normalized convolution test on cuda arch {} ({} <= arch <= {}).'.format( cuda_arch, min_cuda_arch, max_cuda_arch)) return # RN50 layer shapes nchw_shapes = [ ( 64, 256, 56, 56), ( 64, 128, 28, 28), ( 64, 512, 28, 28), ( 64, 256, 14, 14), ( 64, 1024, 14, 14), ( 64, 512, 7, 7), ( 64, 2048, 7, 7), (128, 64, 56, 56), (128, 256, 56, 56), (128, 128, 28, 28), (128, 512, 28, 28), (128, 256, 14, 14), (128, 1024, 14, 14), (128, 512, 7, 7), (128, 2048, 7, 7), ] # Make dataset stats (to input to BNStatsFinalize) def create_input_stats_np(data_np): data_fp32_np = data_np.astype(np.float32) not_feature_axes = (0, 1, 2) feature_sum_np = data_fp32_np.sum(axis=not_feature_axes) feature_sum_squares_np = np.square(data_fp32_np).sum(axis=not_feature_axes) return (feature_sum_np, feature_sum_squares_np) def create_output_stats(data, output_stats): if output_stats: data_fp32 = mx.sym.cast(data, np.float32) not_feature_axes = (0, 1, 2) feature_sum = data_fp32.sum(axis=not_feature_axes) feature_sum_squares = data_fp32.square().sum(axis=not_feature_axes) return mx.sym.Group([data, feature_sum, feature_sum_squares]) else: return data def out_shape(nhwc_inshape, num_filters, kernel_shape, stride, pad): (n, h, w, _) = nhwc_inshape (kernel_h, kernel_w) = kernel_shape (stride_h, stride_w) = stride (pad_h, pad_w) = pad out_shape_h = 1 + ((h + 2 * pad_h - kernel_h) // stride_h) out_shape_w = 1 + ((w + 2 * pad_w - kernel_w) // stride_w) return (n, out_shape_h, out_shape_w, num_filters) # flip a dataset about the 1st dimension def flip(data): return mx.sym.flip(data, axis=0) # return a new symbol that isolates the input symbol's outputs def buffer(sym): num_outputs = len(sym.list_outputs()) if num_outputs == 1: return flip(flip(sym)) else: flipped_outputs = [ flip(flip(sym[i])) for i in range(num_outputs)] return mx.sym.Group(flipped_outputs) # Test fused op without input normalization. Options for activation and output of stats. def finalize_norm_conv_test(nchw_inshape, kernel_shape, num_filter, act_type, stride, pad, output_stats, no_equiv_scale_bias, no_conv, eps, momentum): # If we are disabling the convolution (no_conv = True), then set kernel=1x1 and weights 1 if no_conv: if kernel_shape != (1,1): print('Ignoring kernel_shape {}, forcing 1x1 in no_conv mode.'.format(kernel_shape)) kernel_shape = (1,1) (n, c, h, w) = nchw_inshape X = mx.sym.Variable('X') W = mx.sym.Variable('W') SUM = mx.sym.Variable('SUM') SUMSQ = mx.sym.Variable('SUMSQ') B = mx.sym.Variable('B') # beta, i.e. bias G = mx.sym.Variable('G') # gamma, i.e. scale # randomly insert buffering here to exercise in-place vs. copy of gamma/beta by Finalize if _random_boolean(): B = buffer(B) G = buffer(G) MovMean = mx.sym.Variable('MovMean') MovVar = mx.sym.Variable('MovVar') # make 'ground truth' symbol using standard Batchnorm and Convolution if no_equiv_scale_bias and (act_type is None): normalized = X elif no_equiv_scale_bias: normalized = mx.sym.Activation(data=X, act_type=act_type) else: normalized = mx.sym.BatchNorm(data=X, gamma=G, beta=B, act_type=act_type, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, use_global_stats=False, output_mean_var=False, cudnn_off=False, name=None, axis=-1) (r, s) = kernel_shape layout = 'NHWC' conv_args = {'weight':W, 'num_filter':num_filter, 'kernel':kernel_shape, 'stride':stride, 'pad':pad, 'layout':layout, 'name':'conv'} # For test failure reproducibility, fix the algos of the golden copy conv_sym = mx.sym.Convolution(data=normalized, no_bias=True, cudnn_algo_fwd=1, cudnn_algo_bwd_data=1, cudnn_algo_bwd_filter=1, **conv_args) conv_sym = create_output_stats(conv_sym, output_stats) # make symbol-under-test using Finalize and NormalizedConvolution if not no_equiv_scale_bias: elem_count = np.prod(nchw_inshape) // c (equiv_scale, equiv_bias, saved_mean, saved_inv_std, gamma_out, beta_out) = \ mx.sym.BNStatsFinalize(sum=SUM, sum_squares=SUMSQ, gamma=G, beta=B, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, output_mean_var=True, elem_count=elem_count) # NormalizedConvolution makes use of conv_args but for stats-apply mode has more inputs: conv_args.update({'equiv_scale':equiv_scale, 'equiv_bias':equiv_bias, 'mean':saved_mean, 'var':saved_inv_std, 'gamma':gamma_out, 'beta':beta_out}) norm_conv_sym = mx.sym.NormalizedConvolution(X, act_type=act_type, no_equiv_scale_bias=no_equiv_scale_bias, **conv_args) if not output_stats: # discard sum and sum_squares outputs before binding norm_conv_sym = norm_conv_sym[0] # make data inputs weight_shape = (num_filter, r, s, c) data_shape = (n, h, w, c) # x_np = np.fromfunction(lambda n, h, w, c: 3*((n+h+w)%2), data_shape) # x = mx.nd.array(x_np, dtype=np.float16, ctx=ctx) x = mx.ndarray.random.uniform(-0.5, 0.5, data_shape, dtype=np.float16, ctx=ctx) (feature_sum_np, feature_sum_squares_np) = create_input_stats_np(x.asnumpy()) sum = mx.nd.array(feature_sum_np, dtype=np.float32) sum_squares = mx.nd.array(feature_sum_squares_np, dtype=np.float32) equiv_scale_bias_shape = (c,) scale_max = 1.25 bias_max = 1 # Comparing gradients of two symbols is tricky when a non-smooth function like 'relu' # is part of the function. We ensure that no relu inputs are near 0 (within a threshold) # by trying different beta/gamma values as needed. b_np = np.zeros(equiv_scale_bias_shape, dtype=np.float32) g_np = np.zeros(equiv_scale_bias_shape, dtype=np.float32) indices_to_set = np.array(range(c)) while len(indices_to_set) > 0: for index in indices_to_set: b_np[index] = np.random.uniform(-bias_max, bias_max) g_np[index] = np.random.uniform(1.0/scale_max, scale_max) b = mx.nd.array(b_np, dtype=np.float32, ctx=ctx) g = mx.nd.array(g_np, dtype=np.float32, ctx=ctx) smallest_norm_fp16 = pow(2, -14) threshold = smallest_norm_fp16 / 2 need_data_check = not no_equiv_scale_bias and act_type == 'relu' if need_data_check: indices_to_set = _has_near_zero_outputs(x, b, g, eps, threshold=threshold) else: indices_to_set = [] # mov_mean_np = np.zeros(equiv_scale_bias_shape).astype(np.float32) # mov_var_np = np.ones(equiv_scale_bias_shape).astype(np.float32) mov_mean_np = np.random.uniform(-bias_max, bias_max, equiv_scale_bias_shape) mov_var_np = np.random.uniform(1.0/scale_max, scale_max, equiv_scale_bias_shape) # since the models change the moving mean and variance, each model gets their own copy mov_mean1 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_mean2 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_var1 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) mov_var2 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) if no_conv: weights = mx.ndarray.ones(weight_shape, dtype=np.float16, ctx=ctx) else: weights = mx.ndarray.random.uniform(-0.20, 0.20, weight_shape, dtype=np.float16, ctx=ctx) # These are the tensor's that receive the backpropped gradients (so an output of backward()) # Copy 1 is for 'ground truth' symbol based on BatchNorm/Convolution ops d_x_out_gt = mx.ndarray.zeros(data_shape, dtype=np.float16, ctx=ctx) d_w_out_gt = mx.ndarray.zeros(weight_shape, dtype=np.float16, ctx=ctx) d_gamma_out_gt = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_beta_out_gt = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) # Copy 2 is for symbol based on BNStatsFinalize/NormalizedConvolution ops (=ones, not zeros) d_x_out = mx.ndarray.ones(data_shape, dtype=np.float16, ctx=ctx) d_w_out = mx.ndarray.ones(weight_shape, dtype=np.float16, ctx=ctx) d_gamma_out = mx.ndarray.ones(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_beta_out = mx.ndarray.ones(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) # bind i/o's to symbols to create executors grad_req = {'SUM':'null', 'SUMSQ':'null', 'MovMean':'null', 'MovVar':'null', 'X':'write', 'W':'write', 'G':'write', 'B':'write'} args_grad_dict_gt = {'X':d_x_out_gt, 'W':d_w_out_gt, 'G':d_gamma_out_gt, 'B':d_beta_out_gt} args_grad_dict = {'X':d_x_out, 'W':d_w_out, 'G':d_gamma_out, 'B':d_beta_out} args_dict = {'X':x, 'W':weights} # conv binding does not need SUM, and SUMSQ, but extra items are OK if not no_equiv_scale_bias: args_dict.update({'B':b, 'G':g, 'SUM':sum, 'SUMSQ':sum_squares}) gt_aux_states_dict = \ {'MovMean':mov_mean1, 'MovVar':mov_var1} finalize_aux_states_dict = \ {'MovMean':mov_mean2, 'MovVar':mov_var2} conv_exe = conv_sym.bind(ctx=ctx, args=args_dict, args_grad=args_grad_dict_gt, aux_states=gt_aux_states_dict, grad_req=grad_req) norm_conv_exe = norm_conv_sym.bind(ctx=ctx, args=args_dict, args_grad=args_grad_dict, aux_states=finalize_aux_states_dict, grad_req=grad_req) # Execute forward() graph calculation # need is_train=True to keep Batchnorm using the mini-batch mean and variance conv_outputs = conv_exe.forward(is_train=True) # need is_train=True to keep stats from being turned off norm_conv_outputs = norm_conv_exe.forward(is_train=True) # Check forward outputs outputs = ['out', 'sum', 'sum_squares'] # greater atols needs for 'sum' and 'sum_squares', also if input scale/bias is applied if no_equiv_scale_bias: tols = [(1e-2, 2e-2), (1e-2, 2), (1e-2, 2)] else: # 'sum' seems to have a large span (e.g. -400K -> +400K) so a large absolute tolerance # is needed to cover those cases when the result is near 0 and rtol can't help. # One possible source of the large sum tolerance is the internal rounding of the # mean to fp16. Any rounding amount will give a bias to the conv inputs and so the sum. # 'sum_squares' doesn't have this issue because rtol handles the always-positive result. per_element_atol = 5e-3 sum_atol = n * h * w * per_element_atol tols = [(1e-2, 1e-1), (1e-1, sum_atol), (1e-2, 2)] num_outputs = 3 if output_stats else 1 for idx in range(num_outputs): out_name = outputs[idx] conv_data = conv_outputs[idx] norm_conv_data = norm_conv_outputs[idx] (rtol, atol) = tols[idx] assert_almost_equal(conv_data, norm_conv_data, rtol=rtol, atol=atol, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Check backward function if no_equiv_scale_bias and act_type is not None: # gradient calculation not supported for this configuration return # Create backward gradients outshape = out_shape(data_shape, num_filter, kernel_shape, stride, pad) d_out_in = mx.ndarray.random.uniform(-0.2, 0.2, outshape, dtype=np.float16, ctx=ctx) # not really needed sum_shape = (num_filter,) # gradients on these outputs will be summed into the d_out_in for the ground truth # symbol, so make sure these are 0. d_sum_in = mx.ndarray.zeros(sum_shape, dtype=np.float32, ctx=ctx) d_sum_squares_in = mx.ndarray.zeros(sum_shape, dtype=np.float32, ctx=ctx) # d_sum_in = mx.ndarray.random.uniform(0.0, 1.0, sum_shape, # dtype=np.float32, ctx=ctx) # d_sum_squares_in = mx.ndarray.random.uniform(0.0, 1.0, sum_shape, # dtype=np.float32, ctx=ctx) # Execute backward() graph calculation if output_stats: conv_outputs = conv_exe.backward([d_out_in, d_sum_in, d_sum_squares_in]) norm_conv_outputs = norm_conv_exe.backward([d_out_in, d_sum_in, d_sum_squares_in]) else: conv_outputs = conv_exe.backward([d_out_in,]) norm_conv_outputs = norm_conv_exe.backward([d_out_in,]) # Check weight gradient out_name = 'd_w' assert_almost_equal(d_w_out_gt, d_w_out, atol=0.3, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Check data gradient # This check is flakey when act_type = relu because if the two models differ on whether # the normalized value is above or below 0, then the gradient may or may-not be backpropped. # To fix this test, we could run a separate model with relu off, capture the normalized # output and then mask off the gradient comparison when the normalized value is near 0. out_name = 'd_x' if act_type is None: assert_almost_equal(d_x_out_gt, d_x_out, atol=0.1, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Check gamma and beta gradients out_name = 'd_gamma' assert_almost_equal(d_gamma_out_gt, d_gamma_out, atol=10, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) out_name = 'd_beta' assert_almost_equal(d_beta_out_gt, d_beta_out, atol=10, rtol=0.1, names=('conv_{}'.format(out_name), 'norm_conv_{}'.format(out_name))) # Test input normalization function only: no_equiv_scale_bias = False, 1x1 unity-weights conv # Also test with 'relu' activation on and off. print('\nTest of input normalization without convolution function.') eps = 1e-4 momentum = 0.9 for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] (n, c, h, w) = inshape num_filter = 32 outshape = (n, num_filter, h, w) stride = (1,1) print('nchw inshape = {}, outshape = {}, stride = {}'.format(inshape, outshape, stride)) kernel_shape = (1, 1) pad = (0, 0) output_stats = False act_type = 'relu' if _random_boolean() else None print(' kernel= {}, pad = {}, output_stats={}, act_type = {}'.format( kernel_shape, pad, output_stats, act_type)) finalize_norm_conv_test(nchw_inshape=inshape, kernel_shape=kernel_shape, num_filter=num_filter, act_type=act_type, stride=stride, pad=pad, output_stats=output_stats, no_equiv_scale_bias=False, no_conv=True, eps=eps, momentum=momentum) # Test convolution and stats-gen functions, first without, then with, input normalization. # Also test with 'relu' activation on and off. # for no_equiv_scale_bias in [False, True]: for no_equiv_scale_bias in [True, False]: if no_equiv_scale_bias: print('\nTest of convolution function, without input normalization.') else: print('\nTest of convolution function with input normalization.') for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] (n, c, h, w) = inshape (stride_h, stride_w) = (1,1) # Leverage next test case (if available) to determine outshape, strides if i == len(nchw_shapes)-1: num_filter = nchw_shapes[i][1] else: num_filter = nchw_shapes[i+1][1] if nchw_shapes[i+1][2] < nchw_shapes[i][2]: stride_h = nchw_shapes[i][2] // nchw_shapes[i+1][2] if nchw_shapes[i+1][3] < nchw_shapes[i][3]: stride_w = nchw_shapes[i][3] // nchw_shapes[i+1][3] stride = (stride_h, stride_w) outshape = (n, num_filter, h // stride_h, w // stride_w) print('nchw inshape = {}, outshape = {}, stride = {}'.format(inshape, outshape, stride)) # Only 3x3 kernel supports strides, not 1x1 # kernel_shapes = [(1, 1),] kernel_shapes = [(3, 3),] if stride_h > 1 or stride_w > 1 else [(1, 1), (3, 3)] for kernel_shape in kernel_shapes: # padding doesn't make sense for a 1x1 kernel pads = [(0, 0),] if kernel_shape[0] == 1 or kernel_shape[1] == 1 else [(0, 0), (1, 1)] for pad in pads: act_type = 'relu' if _random_boolean() else None output_stats = _random_boolean() print(' kernel= {}, pad = {}, output_stats={}, act_type = {}'.format( kernel_shape, pad, output_stats, act_type)) finalize_norm_conv_test(nchw_inshape=inshape, kernel_shape=kernel_shape, num_filter=num_filter, act_type=act_type, stride=stride, pad=pad, output_stats=output_stats, no_equiv_scale_bias=no_equiv_scale_bias, no_conv=False, eps=eps, momentum=momentum) @with_seed() def test_bn_stats_finalize(): ctx = default_context() min_cuda_arch = 70 cuda_arch = mx.context.gpu_sm_arch(ctx.device_id) if cuda_arch < min_cuda_arch: print('Bypassing bn_stats_finalize test on cuda arch {} (need >= {}).'.format( cuda_arch, min_cuda_arch)) return nchw_shapes = [ # n*h*w == 2 included to flush out 'sample' vs. 'population' variance issues ( 1, 8, 1, 2), # RN50 layer shapes ( 64, 256, 56, 56), ( 64, 128, 28, 28), ( 64, 512, 28, 28), ( 64, 256, 14, 14), ( 64, 1024, 14, 14), ( 64, 512, 7, 7), ( 64, 2048, 7, 7), (128, 64, 56, 56), (128, 256, 56, 56), (128, 128, 28, 28), (128, 512, 28, 28), (128, 256, 14, 14), (128, 1024, 14, 14), (128, 512, 7, 7), (128, 2048, 7, 7), ] # Prepare the input for a standard Convolution so it will mimic NormalizedConvolution def normalize_input(data, equiv_scale, equiv_bias, act_type, no_equiv_scale_bias): normalized = data if no_equiv_scale_bias else \ mx.sym.broadcast_add(mx.sym.broadcast_mul(data, equiv_scale), equiv_bias) return normalized if act_type is None else mx.sym.Activation(normalized, act_type=act_type) # Make dataset stats (to input to BNStatsFinalize) def create_output_stats(data): data_fp32 = mx.sym.cast(data, np.float32) not_feature_axes = (0, 1, 2) feature_sum = data_fp32.sum(axis=not_feature_axes) feature_sum_squares = data_fp32.square().sum(axis=not_feature_axes) return (feature_sum, feature_sum_squares) # flip a dataset about the 1st dimension def flip(data): return mx.sym.flip(data, axis=0) # return a new symbol that isolates the input symbol's outputs def buffer(sym): num_outputs = len(sym.list_outputs()) if num_outputs == 1: return flip(flip(sym)) else: flipped_outputs = [ flip(flip(sym[i])) for i in range(num_outputs)] return mx.sym.Group(flipped_outputs) # Test of BNStatsFinalize op against a 'ground truth' of Batchnorm and home-grown functions. def bn_stats_finalize_test(nchw_inshape, eps, momentum, is_train, test_writeinplace): (n, c, h, w) = nchw_inshape elem_count = np.prod(nchw_inshape) // c X = mx.sym.Variable('X') G = mx.sym.Variable('G') # gamma, i.e. scale B = mx.sym.Variable('B') # beta, i.e. bias if (test_writeinplace): G = buffer(G) B = buffer(B) MovMean = mx.sym.Variable('MovMean') MovVar = mx.sym.Variable('MovVar') # Make ground truth (i.e. 'gt') model using conventional cudnn Batchnorm, which processes # the running mean using the 'sample variance' with N = elem_count - 1. To avoid use of # the NHWCBatchnorm, which uses 'population variance', we transpose around the Batchnorm op. # The input data 'X' starts in 'NHWC'. # For NHWC -> NCHW, axes=(0,3,1,2) transposed = mx.sym.transpose(data=X, axes=(0,3,1,2)) (data, saved_mean, saved_inv_std) = mx.sym.BatchNorm(data=transposed, gamma=G, beta=B, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, use_global_stats=False, output_mean_var=True, cudnn_off=False, name=None, axis=1) # For NCHW -> NHWC axes=(0,2,3,1) data = mx.sym.transpose(data=data, axes=(0,2,3,1)) equiv_scale_inf_fp32 = G / mx.sym.sqrt(MovVar + eps) equiv_scale_inf = mx.sym.cast(equiv_scale_inf_fp32, dtype=np.float16) equiv_bias_inf_fp32 = B - G * MovMean / mx.sym.sqrt(MovVar + eps) equiv_bias_inf = mx.sym.cast(equiv_bias_inf_fp32, dtype=np.float16) (sum, sum_squares) = create_output_stats(X) batch_mean_fp32 = sum / elem_count batch_variance_fp32 = sum_squares / elem_count - mx.sym.square(batch_mean_fp32) equiv_scale_train_fp32 = G / mx.sym.sqrt(batch_variance_fp32 + eps) equiv_scale_train = mx.sym.cast(equiv_scale_train_fp32, dtype=np.float16) equiv_bias_train_fp32 = B - G * batch_mean_fp32 / mx.sym.sqrt(batch_variance_fp32 + eps) equiv_bias_train = mx.sym.cast(equiv_bias_train_fp32, dtype=np.float16) # Leave bn data as part of symbol output in case operator doesn't like req[kOut]==kNullOp if is_train: gt_sym = mx.sym.Group([equiv_scale_train, equiv_bias_train, saved_mean, saved_inv_std, data]) else: gt_sym = mx.sym.Group([equiv_scale_inf, equiv_bias_inf, data]) # Make BNStatsFinalize model, uses sum and sum_squares created above based on the data finalize_sym = mx.sym.BNStatsFinalize(sum=sum, sum_squares=sum_squares, gamma=G, beta=B, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, output_mean_var=is_train, elem_count=elem_count) if (test_writeinplace): finalize_sym = buffer(finalize_sym) data_shape = (n, h, w, c) x = mx.ndarray.random.uniform(-0.5, 0.5, data_shape, dtype=np.float16, ctx=ctx) equiv_scale_bias_shape = (c,) scale_max = 1.25 bias_max = 1 b = mx.ndarray.random.uniform(-bias_max, bias_max, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) g = mx.ndarray.random.uniform(1.0/scale_max, scale_max, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) mov_mean_np = np.random.uniform(-bias_max, bias_max, equiv_scale_bias_shape) mov_var_np = np.random.uniform(1.0/scale_max, scale_max, equiv_scale_bias_shape) # since the models change the moving mean and variance, each model gets their own copy mov_mean1 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_mean2 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_var1 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) mov_var2 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) args_dict = {'X':x, 'B':b, 'G':g} gt_aux_states_dict =\ {'MovMean':mov_mean1, 'MovVar':mov_var1} finalize_aux_states_dict =\ {'MovMean':mov_mean2, 'MovVar':mov_var2} gt_exe = gt_sym.bind(ctx=ctx, args=args_dict, aux_states=gt_aux_states_dict, grad_req='null') finalize_exe = finalize_sym.bind(ctx=ctx, args=args_dict, aux_states=finalize_aux_states_dict, grad_req='null') gt_outputs = gt_exe.forward(is_train=is_train) finalize_outputs = finalize_exe.forward(is_train=is_train) outputs = ['equiv_scale', 'equiv_bias', 'saved_mean', 'saved_var'] tols = [(1e-2, 1e-2), (1e-2, 1e-2), (1e-2, 1e-2), (1e-2, 1e-2)] num_outputs = 4 if is_train else 2 for idx in range(num_outputs): out_name = outputs[idx] gt_data = gt_outputs[idx] finalize_data = finalize_outputs[idx] (rtol, atol) = tols[idx] assert_almost_equal(gt_data, finalize_data, rtol=rtol, atol=atol, names=('gt_{}'.format(out_name), 'finalize_{}'.format(out_name))) if is_train: for aux_name in ['MovMean', 'MovVar']: gt_data = gt_exe.aux_dict[aux_name] finalize_data = finalize_exe.aux_dict[aux_name] assert_almost_equal(gt_data, finalize_data, rtol=rtol, atol=atol, names=('gt_{}'.format(aux_name), 'finalize_{}'.format(aux_name))) # Also test finalize ability to propagate beta and gamma # gamma is output index 4 gamma_out = finalize_outputs[4] assert_almost_equal(gamma_out, g, atol=0.0, rtol=0.0) # gamma is output index 5 beta_out = finalize_outputs[5] assert_almost_equal(beta_out, b, atol=0.0, rtol=0.0) # Now test BNStatsFinalize ability to backprop gradient in a training graph if is_train: S = mx.sym.Variable('S') # sum SS = mx.sym.Variable('SS') # sum_squares finalize_sym = mx.sym.BNStatsFinalize(sum=S, sum_squares=SS, gamma=G, beta=B, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, output_mean_var=is_train, elem_count=elem_count) s = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) ss = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) b = mx.ndarray.random.uniform(-bias_max, bias_max, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) g = mx.ndarray.random.uniform(1.0/scale_max, scale_max, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) args_dict = {'S':s, 'SS':ss, 'B':b, 'G':g} grad_req = {'S':'null', 'SS':'null', 'G':'write', 'B':'write'} d_gamma_out = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_beta_out = mx.ndarray.zeros(equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) args_grad_dict = {'G':d_gamma_out, 'B':d_beta_out} if (test_writeinplace): finalize_sym = buffer(finalize_sym) finalize_exe = finalize_sym.bind(ctx=ctx, args=args_dict, args_grad=args_grad_dict, aux_states=finalize_aux_states_dict, grad_req=grad_req) finalize_exe.forward(is_train=is_train) d_equiv_scale_in = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float16, ctx=ctx) d_equiv_bias_in = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float16, ctx=ctx) d_mean_in = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_inv_stddev_in = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_gamma_in = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) d_beta_in = mx.ndarray.random.uniform(0.0, 1.0, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) finalize_exe.backward([d_equiv_scale_in, d_equiv_bias_in, d_mean_in, d_inv_stddev_in, d_gamma_in, d_beta_in]) assert_almost_equal(d_gamma_in, d_gamma_out, atol=0.0, rtol=0.0) assert_almost_equal(d_beta_in, d_beta_out, atol=0.0, rtol=0.0) # Test BNStatsFinalize op in both inference and training modes for is_train in [False, True]: for test_writeinplace in [False, True]: # writeinplace test only relevant for training graphs if not is_train and test_writeinplace: continue for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] eps = 1e-4 momentum = 0.9 bn_stats_finalize_test(inshape, eps, momentum, is_train, test_writeinplace) @with_seed() def test_norm_convolution_finalize(): ctx = default_context() min_cuda_arch = 70 max_cuda_arch = 86 cuda_arch = mx.context.gpu_sm_arch(ctx.device_id) if cuda_arch < min_cuda_arch or cuda_arch > max_cuda_arch: print('Bypassing normalized convolution test on cuda arch {} ({} <= arch <= {}).'.format( cuda_arch, min_cuda_arch, max_cuda_arch)) return nchw_shapes = [ # n*h*w == 2 included to flush out 'sample' vs. 'population' variance issues ( 1, 32, 1, 2), # RN50 layer shapes ( 64, 256, 56, 56), ( 64, 128, 28, 28), ( 64, 512, 28, 28), ( 64, 256, 14, 14), ( 64, 1024, 14, 14), ( 64, 512, 7, 7), ( 64, 2048, 7, 7), (128, 64, 56, 56), (128, 256, 56, 56), (128, 128, 28, 28), (128, 512, 28, 28), (128, 256, 14, 14), (128, 1024, 14, 14), (128, 512, 7, 7), (128, 2048, 7, 7), ] # Make dataset stats (to input to BNStatsFinalize) def create_output_stats(data): data_fp32 = mx.sym.cast(data, np.float32) not_feature_axes = (0, 1, 2) feature_sum = data_fp32.sum(axis=not_feature_axes) feature_sum_squares = data_fp32.square().sum(axis=not_feature_axes) return (feature_sum, feature_sum_squares) # Test of BNStatsFinalize op against a 'ground truth' of Batchnorm and home-grown functions. def bn_stats_finalize_test(nchw_inshape, eps, momentum, is_train): (n, c, h, w) = nchw_inshape elem_count = np.prod(nchw_inshape) // c X = mx.sym.Variable('X') G = mx.sym.Variable('G') # gamma, i.e. scale B = mx.sym.Variable('B') # beta, i.e. bias W = mx.sym.Variable('W') # weight, dummy value to keep NormConvolution happy MovMean = mx.sym.Variable('MovMean') MovVar = mx.sym.Variable('MovVar') # Make ground truth (i.e. 'gt') model using conventional cudnn Batchnorm, which processes # the running mean using the 'sample variance' with N = elem_count - 1. To avoid use of # the NHWCBatchnorm, which uses 'population variance', we transpose around the Batchnorm op. # The input data 'X' starts in 'NHWC'. # For NHWC -> NCHW, axes=(0,3,1,2) transposed = mx.sym.transpose(data=X, axes=(0,3,1,2)) (data, saved_mean, saved_inv_std) = mx.sym.BatchNorm(data=transposed, gamma=G, beta=B, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, use_global_stats=False, output_mean_var=True, cudnn_off=False, name=None, axis=1) # For NCHW -> NHWC axes=(0,2,3,1) data = mx.sym.transpose(data=data, axes=(0,2,3,1)) equiv_scale_inf_fp32 = G / mx.sym.sqrt(MovVar + eps) equiv_scale_inf = mx.sym.cast(equiv_scale_inf_fp32, dtype=np.float16) equiv_bias_inf_fp32 = B - G * MovMean / mx.sym.sqrt(MovVar + eps) equiv_bias_inf = mx.sym.cast(equiv_bias_inf_fp32, dtype=np.float16) (sum, sum_squares) = create_output_stats(X) batch_mean_fp32 = sum / elem_count batch_variance_fp32 = sum_squares / elem_count - mx.sym.square(batch_mean_fp32) equiv_scale_train_fp32 = G / mx.sym.sqrt(batch_variance_fp32 + eps) equiv_scale_train = mx.sym.cast(equiv_scale_train_fp32, dtype=np.float16) equiv_bias_train_fp32 = B - G * batch_mean_fp32 / mx.sym.sqrt(batch_variance_fp32 + eps) equiv_bias_train = mx.sym.cast(equiv_bias_train_fp32, dtype=np.float16) # Leave bn data as part of symbol output in case operator doesn't like req[kOut]==kNullOp if is_train: gt_sym = mx.sym.Group([saved_mean, saved_inv_std, equiv_scale_train, equiv_bias_train, data]) else: gt_sym = mx.sym.Group([equiv_scale_inf, equiv_bias_inf, data]) # Make BNStatsFinalize model, uses sum and sum_squares created above based on the data num_filter = 32 (data, _, _, saved_mean, saved_inv_std, equiv_scale, equiv_bias) = \ mx.sym.NormConvolution(data=X, weight=W, kernel=(1,1), num_filter=num_filter, in_sum=sum, in_sum_squares=sum_squares, gamma=G, beta=B, moving_mean=MovMean, moving_var=MovVar, eps=eps, momentum=momentum, fix_gamma=False, output_mean_var=True, no_norm=False, output_equiv_scale_bias=True, layout='NHWC') if is_train: finalize_sym = mx.sym.Group([saved_mean, saved_inv_std, equiv_scale, equiv_bias, data]) else: finalize_sym = mx.sym.Group([equiv_scale, equiv_bias, data]) data_shape = (n, h, w, c) x = mx.ndarray.random.uniform(-0.5, 0.5, data_shape, dtype=np.float16, ctx=ctx) equiv_scale_bias_shape = (c,) w = mx.nd.zeros((num_filter,1,1,c), dtype=np.float16, ctx=ctx) scale_max = 1.25 bias_max = 1 b = mx.ndarray.random.uniform(-bias_max, bias_max, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) g = mx.ndarray.random.uniform(1.0/scale_max, scale_max, equiv_scale_bias_shape, dtype=np.float32, ctx=ctx) mov_mean_np = np.random.uniform(-bias_max, bias_max, equiv_scale_bias_shape) mov_var_np = np.random.uniform(1.0/scale_max, scale_max, equiv_scale_bias_shape) # since the models change the moving mean and variance, each model gets their own copy mov_mean1 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_mean2 = mx.nd.array(mov_mean_np, dtype=np.float32, ctx=ctx) mov_var1 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) mov_var2 = mx.nd.array(mov_var_np, dtype=np.float32, ctx=ctx) args_dict = {'X':x, 'B':b, 'G':g, 'W':w} gt_aux_states_dict =\ {'MovMean':mov_mean1, 'MovVar':mov_var1} finalize_aux_states_dict =\ {'MovMean':mov_mean2, 'MovVar':mov_var2} gt_exe = gt_sym.bind(ctx=ctx, args=args_dict, aux_states=gt_aux_states_dict, grad_req='null') finalize_exe = finalize_sym.bind(ctx=ctx, args=args_dict, aux_states=finalize_aux_states_dict, grad_req='null') finalize_outputs = finalize_exe.forward(is_train=is_train) gt_outputs = gt_exe.forward(is_train=is_train) if is_train: outputs = ['saved_mean', 'saved_var', 'equiv_scale', 'equiv_bias'] else: outputs = ['equiv_scale', 'equiv_bias'] tols = [(1e-2, 1e-2), (1e-2, 1e-2), (1e-2, 1e-2), (1e-2, 1e-2)] for idx, out_name in enumerate(outputs): finalize_data = finalize_outputs[idx] gt_data = gt_outputs[idx] (rtol, atol) = tols[idx] assert_almost_equal(gt_data, finalize_data, rtol=rtol, atol=atol, names=('gt_{}'.format(out_name), 'finalize_{}'.format(out_name))) if is_train: for aux_name in ['MovMean', 'MovVar']: gt_data = gt_exe.aux_dict[aux_name] finalize_data = finalize_exe.aux_dict[aux_name] assert_almost_equal(gt_data, finalize_data, rtol=rtol, atol=atol, names=('gt_{}'.format(aux_name), 'finalize_{}'.format(aux_name))) # Test BNStatsFinalize op in both inference and training modes for is_train in [False, True]: for i in range(len(nchw_shapes)): inshape = nchw_shapes[i] eps = 1e-4 momentum = 0.9 bn_stats_finalize_test(inshape, eps, momentum, is_train) if __name__ == '__main__': import nose nose.runmodule()
52.432679
105
0.587115
10,349
74,769
3.996328
0.051696
0.029015
0.029112
0.023019
0.921708
0.909352
0.897892
0.886914
0.88041
0.868635
0
0.034459
0.307574
74,769
1,425
106
52.469474
0.76439
0.177747
0
0.843636
0
0
0.04877
0
0
0
0
0
0.018182
1
0.028182
false
0.004545
0.007273
0.003636
0.066364
0.026364
0
0
0
null
0
0
0
1
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
7
51c215503402aafb815e9e28aee5722fd629638d
1,755
py
Python
Simulation/Test/DiseaseBank/numerical_actions.py
anoppa/Proyecto-IA-Sim-Comp
71132bd0c6cb5aeff812fd96e0017be71178a5f3
[ "MIT" ]
1
2022-03-11T14:24:10.000Z
2022-03-11T14:24:10.000Z
Simulation/Test/DiseaseBank/numerical_actions.py
anoppa/Proyecto-IA-Sim-Comp
71132bd0c6cb5aeff812fd96e0017be71178a5f3
[ "MIT" ]
null
null
null
Simulation/Test/DiseaseBank/numerical_actions.py
anoppa/Proyecto-IA-Sim-Comp
71132bd0c6cb5aeff812fd96e0017be71178a5f3
[ "MIT" ]
1
2022-01-19T04:29:19.000Z
2022-01-19T04:29:19.000Z
from ...Simulation.environment import Environment from random import random def tos_action(time:int, env:Environment)->Environment: r = random() if r < 0.5: if env.get_parameter('tos') != None: env.update_parameter('tos', 0.4) if env.get_parameter('plaqueta') != None: env.update_parameter('plaqueta', -0.5) else: if env.get_parameter('tos') != None: env.update_parameter('tos', 0.4) if env.get_parameter('plaqueta') != None: env.update_parameter('plaqueta', -0.8) return env def fiebre_action(time:int, env:Environment)->Environment: r = random() if r < 0.4: if env.get_parameter('fiebre') != None: env.update_parameter('fiebre', 1) if env.get_parameter('plaqueta') != None: env.update_parameter('plaqueta', -1.5) elif r < 0.75: if env.get_parameter('fiebre') != None: env.update_parameter('fiebre', 1.4) if env.get_parameter('plaqueta') != None: env.update_parameter('plaqueta', -1.5) else: if env.get_parameter('fiebre') != None: env.update_parameter('fiebre', 1.8) if env.get_parameter('plaqueta') != None: env.update_parameter('plaqueta', -2.0) if env.get_parameter('dolor de cabeza') != None: env.update_parameter('dolor de cabeza', 3) return env def dc_action(time:int, env:Environment)->Environment: r = random() if r < 0.75: if env.get_parameter('dolor de cabeza') != None: env.update_parameter('dolor de cabeza', 2.5) else: if env.get_parameter('dolor de cabeza') != None: env.update_parameter('dolor de cabeza', 4.5) return env
35.816327
58
0.597151
230
1,755
4.430435
0.147826
0.063788
0.102061
0.216879
0.878312
0.878312
0.863592
0.857704
0.857704
0.857704
0
0.026194
0.260399
1,755
48
59
36.5625
0.75886
0
0
0.590909
0
0
0.124217
0
0
0
0
0
0
1
0.068182
false
0
0.045455
0
0.181818
0
0
0
0
null
0
0
1
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
7
51c8e3bd0f20cb53c76dd35a3478647c769e72d0
517
py
Python
teste1.py
allanedgard/pdss
9874dfb9faa57db79e8072bfd35e79c5c16eea67
[ "Apache-2.0" ]
null
null
null
teste1.py
allanedgard/pdss
9874dfb9faa57db79e8072bfd35e79c5c16eea67
[ "Apache-2.0" ]
null
null
null
teste1.py
allanedgard/pdss
9874dfb9faa57db79e8072bfd35e79c5c16eea67
[ "Apache-2.0" ]
null
null
null
import Buffer import time y = int(time.time()*1000) time.sleep(.001) x = Buffer.Buffer() x.add(int(time.time()*1000)%y, 'teste 1') x.add(int(time.time()*1000)%y, 'teste 2') time.sleep(.001) x.add(int(time.time()*1000)%y, 'prova 3') x.add(int(time.time()*1000)%y, 'prova 4') print x.getMsgs(int(time.time()*1000)%y) time.sleep(.001) x.add(int(time.time()*1000)%y, 'teste 1') x.add(int(time.time()*1000)%y, 'teste 2') time.sleep(.001) x.add(int(time.time()*1000)%y, 'prova 3') print x.getMsgs(int(time.time()*1000)%y)
27.210526
41
0.655706
103
517
3.291262
0.174757
0.20649
0.324484
0.442478
0.811209
0.811209
0.811209
0.811209
0.566372
0.566372
0
0.12369
0.077369
517
18
42
28.722222
0.587002
0
0
0.705882
0
0
0.094961
0
0
0
0
0
0
0
null
null
0
0.117647
null
null
0.117647
0
0
0
null
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
9
51cf935e9e313b47a478419c2bfca9086c3cd1ed
84,200
py
Python
sample/web/app/mautic_models.py
hdknr/django-mautic
aa2e5304936541c9266215df00469576142ee906
[ "BSD-2-Clause-FreeBSD" ]
1
2021-02-20T08:48:05.000Z
2021-02-20T08:48:05.000Z
sample/web/app/mautic_models.py
hdknr/django-mautic
aa2e5304936541c9266215df00469576142ee906
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
sample/web/app/mautic_models.py
hdknr/django-mautic
aa2e5304936541c9266215df00469576142ee906
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desired behavior. # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free to rename the models, but don't rename db_table values or field names. from django.db import models class AssetDownloads(models.Model): asset = models.ForeignKey('Assets', models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey('IpAddresses', models.DO_NOTHING) lead = models.ForeignKey('Leads', models.DO_NOTHING, blank=True, null=True) email = models.ForeignKey('Emails', models.DO_NOTHING, blank=True, null=True) date_download = models.DateTimeField() code = models.IntegerField() referer = models.TextField(blank=True, null=True) tracking_id = models.CharField(max_length=255) source = models.CharField(max_length=255, blank=True, null=True) source_id = models.IntegerField(blank=True, null=True) class Meta: managed = False db_table = 'asset_downloads' class Assets(models.Model): category = models.ForeignKey('Categories', models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) title = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) alias = models.CharField(max_length=255) storage_location = models.CharField(max_length=255, blank=True, null=True) path = models.CharField(max_length=255, blank=True, null=True) remote_path = models.CharField(max_length=255, blank=True, null=True) original_file_name = models.CharField(max_length=255, blank=True, null=True) lang = models.CharField(max_length=255) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) download_count = models.IntegerField() unique_download_count = models.IntegerField() revision = models.IntegerField() extension = models.CharField(max_length=255, blank=True, null=True) mime = models.CharField(max_length=255, blank=True, null=True) size = models.IntegerField(blank=True, null=True) disallow = models.IntegerField(blank=True, null=True) class Meta: managed = False db_table = 'assets' class AuditLog(models.Model): user_id = models.IntegerField() user_name = models.CharField(max_length=255) bundle = models.CharField(max_length=50) object = models.CharField(max_length=50) object_id = models.IntegerField() action = models.CharField(max_length=50) details = models.TextField(blank=True, null=True) date_added = models.DateTimeField() ip_address = models.CharField(max_length=45) class Meta: managed = False db_table = 'audit_log' class CacheItems(models.Model): item_id = models.CharField(primary_key=True, max_length=255) item_data = models.TextField() item_lifetime = models.PositiveIntegerField(blank=True, null=True) item_time = models.PositiveIntegerField() class Meta: managed = False db_table = 'cache_items' class CampaignEvents(models.Model): campaign = models.ForeignKey('Campaigns', models.DO_NOTHING) parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) type = models.CharField(max_length=50) event_type = models.CharField(max_length=50) event_order = models.IntegerField() properties = models.TextField() trigger_date = models.DateTimeField(blank=True, null=True) trigger_interval = models.IntegerField(blank=True, null=True) trigger_interval_unit = models.CharField(max_length=1, blank=True, null=True) trigger_mode = models.CharField(max_length=10, blank=True, null=True) decision_path = models.CharField(max_length=255, blank=True, null=True) temp_id = models.CharField(max_length=255, blank=True, null=True) channel = models.CharField(max_length=255, blank=True, null=True) channel_id = models.IntegerField(blank=True, null=True) class Meta: managed = False db_table = 'campaign_events' class CampaignFormXref(models.Model): campaign = models.ForeignKey('Campaigns', models.DO_NOTHING, primary_key=True) form = models.ForeignKey('Forms', models.DO_NOTHING) class Meta: managed = False db_table = 'campaign_form_xref' unique_together = (('campaign', 'form'),) class CampaignLeadEventFailedLog(models.Model): log = models.ForeignKey('CampaignLeadEventLog', models.DO_NOTHING, primary_key=True) date_added = models.DateTimeField() reason = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'campaign_lead_event_failed_log' class CampaignLeadEventLog(models.Model): event = models.ForeignKey(CampaignEvents, models.DO_NOTHING) lead = models.ForeignKey('Leads', models.DO_NOTHING) campaign = models.ForeignKey('Campaigns', models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey('IpAddresses', models.DO_NOTHING, blank=True, null=True) rotation = models.IntegerField() date_triggered = models.DateTimeField(blank=True, null=True) is_scheduled = models.IntegerField() trigger_date = models.DateTimeField(blank=True, null=True) system_triggered = models.IntegerField() metadata = models.TextField(blank=True, null=True) channel = models.CharField(max_length=255, blank=True, null=True) channel_id = models.IntegerField(blank=True, null=True) non_action_path_taken = models.IntegerField(blank=True, null=True) class Meta: managed = False db_table = 'campaign_lead_event_log' unique_together = (('event', 'lead', 'rotation'),) class CampaignLeadlistXref(models.Model): campaign = models.ForeignKey('Campaigns', models.DO_NOTHING, primary_key=True) leadlist = models.ForeignKey('LeadLists', models.DO_NOTHING) class Meta: managed = False db_table = 'campaign_leadlist_xref' unique_together = (('campaign', 'leadlist'),) class CampaignLeads(models.Model): campaign = models.ForeignKey('Campaigns', models.DO_NOTHING, primary_key=True) lead = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() manually_removed = models.IntegerField() manually_added = models.IntegerField() date_last_exited = models.DateTimeField(blank=True, null=True) rotation = models.IntegerField() class Meta: managed = False db_table = 'campaign_leads' unique_together = (('campaign', 'lead'),) class Campaigns(models.Model): category = models.ForeignKey('Categories', models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) canvas_settings = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'campaigns' class Categories(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) title = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) alias = models.CharField(max_length=255) color = models.CharField(max_length=7, blank=True, null=True) bundle = models.CharField(max_length=50) class Meta: managed = False db_table = 'categories' class ChannelUrlTrackables(models.Model): redirect = models.ForeignKey('PageRedirects', models.DO_NOTHING, primary_key=True) channel_id = models.IntegerField() channel = models.CharField(max_length=255) hits = models.IntegerField() unique_hits = models.IntegerField() class Meta: managed = False db_table = 'channel_url_trackables' unique_together = (('redirect', 'channel_id'),) class Companies(models.Model): owner = models.ForeignKey('Users', models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) social_cache = models.TextField(blank=True, null=True) score = models.IntegerField(blank=True, null=True) companyemail = models.CharField(max_length=255, blank=True, null=True) companyaddress1 = models.CharField(max_length=255, blank=True, null=True) companyaddress2 = models.CharField(max_length=255, blank=True, null=True) companyphone = models.CharField(max_length=255, blank=True, null=True) companycity = models.CharField(max_length=255, blank=True, null=True) companystate = models.CharField(max_length=255, blank=True, null=True) companyzipcode = models.CharField(max_length=255, blank=True, null=True) companycountry = models.CharField(max_length=255, blank=True, null=True) companyname = models.CharField(max_length=255, blank=True, null=True) companywebsite = models.TextField(blank=True, null=True) companyindustry = models.CharField(max_length=255, blank=True, null=True) companydescription = models.TextField(blank=True, null=True) companynumber_of_employees = models.FloatField(blank=True, null=True) companyfax = models.CharField(max_length=255, blank=True, null=True) companyannual_revenue = models.FloatField(blank=True, null=True) class Meta: managed = False db_table = 'companies' class CompaniesLeads(models.Model): company = models.ForeignKey(Companies, models.DO_NOTHING, primary_key=True) lead = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() is_primary = models.IntegerField(blank=True, null=True) manually_removed = models.IntegerField() manually_added = models.IntegerField() class Meta: managed = False db_table = 'companies_leads' unique_together = (('company', 'lead'),) class ContactMergeRecords(models.Model): contact = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() merged_id = models.IntegerField() name = models.CharField(max_length=255) class Meta: managed = False db_table = 'contact_merge_records' class DynamicContent(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) translation_parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) variant_parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) sent_count = models.IntegerField() content = models.TextField(blank=True, null=True) lang = models.CharField(max_length=255) variant_settings = models.TextField(blank=True, null=True) variant_start_date = models.DateTimeField(blank=True, null=True) filters = models.TextField(blank=True, null=True) is_campaign_based = models.IntegerField() slot_name = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'dynamic_content' class DynamicContentLeadData(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) dynamic_content = models.ForeignKey(DynamicContent, models.DO_NOTHING, blank=True, null=True) date_added = models.DateTimeField(blank=True, null=True) slot = models.TextField() class Meta: managed = False db_table = 'dynamic_content_lead_data' class DynamicContentStats(models.Model): dynamic_content = models.ForeignKey(DynamicContent, models.DO_NOTHING, blank=True, null=True) lead = models.ForeignKey('Leads', models.DO_NOTHING, blank=True, null=True) date_sent = models.DateTimeField() source = models.CharField(max_length=255, blank=True, null=True) source_id = models.IntegerField(blank=True, null=True) tokens = models.TextField(blank=True, null=True) sent_count = models.IntegerField(blank=True, null=True) last_sent = models.DateTimeField(blank=True, null=True) sent_details = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'dynamic_content_stats' class EmailAssetsXref(models.Model): email = models.ForeignKey('Emails', models.DO_NOTHING, primary_key=True) asset = models.ForeignKey(Assets, models.DO_NOTHING) class Meta: managed = False db_table = 'email_assets_xref' unique_together = (('email', 'asset'),) class EmailCopies(models.Model): id = models.CharField(primary_key=True, max_length=32) date_created = models.DateTimeField() body = models.TextField(blank=True, null=True) subject = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'email_copies' class EmailListXref(models.Model): email = models.ForeignKey('Emails', models.DO_NOTHING, primary_key=True) leadlist = models.ForeignKey('LeadLists', models.DO_NOTHING) class Meta: managed = False db_table = 'email_list_xref' unique_together = (('email', 'leadlist'),) class EmailStatReplies(models.Model): id = models.CharField(primary_key=True, max_length=36) stat = models.ForeignKey('EmailStats', models.DO_NOTHING) date_replied = models.DateTimeField() message_id = models.CharField(max_length=255) class Meta: managed = False db_table = 'email_stat_replies' class EmailStats(models.Model): email = models.ForeignKey('Emails', models.DO_NOTHING, blank=True, null=True) lead = models.ForeignKey('Leads', models.DO_NOTHING, blank=True, null=True) list = models.ForeignKey('LeadLists', models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey('IpAddresses', models.DO_NOTHING, blank=True, null=True) copy = models.ForeignKey(EmailCopies, models.DO_NOTHING, blank=True, null=True) email_address = models.CharField(max_length=255) date_sent = models.DateTimeField() is_read = models.IntegerField() is_failed = models.IntegerField() viewed_in_browser = models.IntegerField() date_read = models.DateTimeField(blank=True, null=True) tracking_hash = models.CharField(max_length=255, blank=True, null=True) retry_count = models.IntegerField(blank=True, null=True) source = models.CharField(max_length=255, blank=True, null=True) source_id = models.IntegerField(blank=True, null=True) tokens = models.TextField(blank=True, null=True) open_count = models.IntegerField(blank=True, null=True) last_opened = models.DateTimeField(blank=True, null=True) open_details = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'email_stats' class EmailStatsDevices(models.Model): device = models.ForeignKey('LeadDevices', models.DO_NOTHING, blank=True, null=True) stat = models.ForeignKey(EmailStats, models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey('IpAddresses', models.DO_NOTHING, blank=True, null=True) date_opened = models.DateTimeField() class Meta: managed = False db_table = 'email_stats_devices' class Emails(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) translation_parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) variant_parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) unsubscribeform = models.ForeignKey('Forms', models.DO_NOTHING, blank=True, null=True) preference_center = models.ForeignKey('Pages', models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) subject = models.TextField(blank=True, null=True) from_address = models.CharField(max_length=255, blank=True, null=True) from_name = models.CharField(max_length=255, blank=True, null=True) reply_to_address = models.CharField(max_length=255, blank=True, null=True) bcc_address = models.CharField(max_length=255, blank=True, null=True) template = models.CharField(max_length=255, blank=True, null=True) content = models.TextField(blank=True, null=True) utm_tags = models.TextField(blank=True, null=True) plain_text = models.TextField(blank=True, null=True) custom_html = models.TextField(blank=True, null=True) email_type = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) read_count = models.IntegerField() sent_count = models.IntegerField() revision = models.IntegerField() lang = models.CharField(max_length=255) variant_settings = models.TextField(blank=True, null=True) variant_start_date = models.DateTimeField(blank=True, null=True) dynamic_content = models.TextField(blank=True, null=True) variant_sent_count = models.IntegerField() variant_read_count = models.IntegerField() headers = models.TextField() class Meta: managed = False db_table = 'emails' class Focus(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) focus_type = models.CharField(max_length=255) style = models.CharField(max_length=255) website = models.CharField(max_length=255, blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) properties = models.TextField(blank=True, null=True) utm_tags = models.TextField(blank=True, null=True) form_id = models.IntegerField(blank=True, null=True) cache = models.TextField(blank=True, null=True) html_mode = models.CharField(max_length=255, blank=True, null=True) editor = models.TextField(blank=True, null=True) html = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'focus' class FocusStats(models.Model): focus = models.ForeignKey(Focus, models.DO_NOTHING) lead = models.ForeignKey('Leads', models.DO_NOTHING, blank=True, null=True) type = models.CharField(max_length=255) type_id = models.IntegerField(blank=True, null=True) date_added = models.DateTimeField() class Meta: managed = False db_table = 'focus_stats' class FormActions(models.Model): form = models.ForeignKey('Forms', models.DO_NOTHING) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) type = models.CharField(max_length=50) action_order = models.IntegerField() properties = models.TextField() class Meta: managed = False db_table = 'form_actions' class FormFields(models.Model): form = models.ForeignKey('Forms', models.DO_NOTHING) label = models.TextField() show_label = models.IntegerField(blank=True, null=True) alias = models.CharField(max_length=255) type = models.CharField(max_length=255) is_custom = models.IntegerField() custom_parameters = models.TextField(blank=True, null=True) default_value = models.TextField(blank=True, null=True) is_required = models.IntegerField() validation_message = models.TextField(blank=True, null=True) help_message = models.TextField(blank=True, null=True) field_order = models.IntegerField(blank=True, null=True) properties = models.TextField(blank=True, null=True) label_attr = models.CharField(max_length=255, blank=True, null=True) input_attr = models.CharField(max_length=255, blank=True, null=True) container_attr = models.CharField(max_length=255, blank=True, null=True) lead_field = models.CharField(max_length=255, blank=True, null=True) save_result = models.IntegerField(blank=True, null=True) is_auto_fill = models.IntegerField(blank=True, null=True) show_when_value_exists = models.IntegerField(blank=True, null=True) show_after_x_submissions = models.IntegerField(blank=True, null=True) class Meta: managed = False db_table = 'form_fields' class FormResults1Fomu(models.Model): submission_id = models.IntegerField(primary_key=True) form_id = models.IntegerField() class Meta: managed = False db_table = 'form_results_1_fomu' unique_together = (('submission_id', 'form_id'),) class FormResults2Documentdo(models.Model): submission_id = models.IntegerField(primary_key=True) form_id = models.IntegerField() yu_she_ming = models.TextField(blank=True, null=True) email = models.TextField(blank=True, null=True) dan_dang_zhe_yang_xing = models.TextField(blank=True, null=True) dan_dang_zhe_yang_ming = models.TextField(blank=True, null=True) dian_hua_fan_hao = models.TextField(blank=True, null=True) dou_dao_fu_xian = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'form_results_2_documentdo' unique_together = (('submission_id', 'form_id'),) class FormResults3Partnerpro(models.Model): submission_id = models.IntegerField(primary_key=True) form_id = models.IntegerField() yu_she_ming = models.TextField(blank=True, null=True) yu_sheweb_url = models.TextField(blank=True, null=True) go_dan_dang_zhe_yang_ming = models.TextField(blank=True, null=True) go_dan_dang_zhe_yang_ming1 = models.TextField(blank=True, null=True) go_dan_dang_zhe_yangmerua1 = models.TextField(blank=True, null=True) go_dan_dang_zhe_yang_dian = models.TextField(blank=True, null=True) zhu_yao_qu_yin_zhi_pin = models.TextField(blank=True, null=True) zhu_yao_fan_mai_de_yu = models.TextField(blank=True, null=True) xiang_ding_fan_mai_tai_sh = models.TextField(blank=True, null=True) dou_dao_fu_xian = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'form_results_3_partnerpro' unique_together = (('submission_id', 'form_id'),) class FormResults4Recruitcon(models.Model): submission_id = models.IntegerField(primary_key=True) form_id = models.IntegerField() han_zi_xing = models.TextField(blank=True, null=True) han_zi_ming = models.TextField(blank=True, null=True) kana_xing = models.TextField(blank=True, null=True) kana_ming = models.TextField(blank=True, null=True) dian_hua_fan_hao = models.TextField(blank=True, null=True) meruadoresu = models.TextField(blank=True, null=True) xi_wang_zhi_zhong = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'form_results_4_recruitcon' unique_together = (('submission_id', 'form_id'),) class FormResults5Contact(models.Model): submission_id = models.IntegerField(primary_key=True) form_id = models.IntegerField() yu_she_ming = models.TextField(blank=True, null=True) go_dan_dang_zhe_xing = models.TextField(blank=True, null=True) go_dan_dang_zhe_ming1 = models.TextField(blank=True, null=True) meruadoresu = models.TextField(blank=True, null=True) o_wen_hese_jian_ming = models.TextField(blank=True, null=True) o_wen_hese_zhong_bie = models.TextField(blank=True, null=True) dui_xiang_zhi_pin = models.TextField(blank=True, null=True) xiang_ding_tai_shu = models.TextField(blank=True, null=True) xian_zai_li_yong_zhongnos = models.TextField(blank=True, null=True) zai_fan_dui_xiang_qi_ye_g = models.TextField(blank=True, null=True) o_wen_hese_nei_rong = models.TextField(blank=True, null=True) dian_hua_fan_hao = models.TextField(blank=True, null=True) dou_dao_fu_xian = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'form_results_5_contact' unique_together = (('submission_id', 'form_id'),) class FormSubmissions(models.Model): form = models.ForeignKey('Forms', models.DO_NOTHING) ip = models.ForeignKey('IpAddresses', models.DO_NOTHING) lead = models.ForeignKey('Leads', models.DO_NOTHING, blank=True, null=True) page = models.ForeignKey('Pages', models.DO_NOTHING, blank=True, null=True) tracking_id = models.CharField(max_length=255, blank=True, null=True) date_submitted = models.DateTimeField() referer = models.TextField() class Meta: managed = False db_table = 'form_submissions' class Forms(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) alias = models.CharField(max_length=255) cached_html = models.TextField(blank=True, null=True) post_action = models.CharField(max_length=255) post_action_property = models.CharField(max_length=255, blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) template = models.CharField(max_length=255, blank=True, null=True) in_kiosk_mode = models.IntegerField(blank=True, null=True) render_style = models.IntegerField(blank=True, null=True) form_type = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'forms' class Imports(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) dir = models.CharField(max_length=255) file = models.CharField(max_length=255) original_file = models.CharField(max_length=255, blank=True, null=True) line_count = models.IntegerField() inserted_count = models.IntegerField() updated_count = models.IntegerField() ignored_count = models.IntegerField() priority = models.IntegerField() status = models.IntegerField() date_started = models.DateTimeField(blank=True, null=True) date_ended = models.DateTimeField(blank=True, null=True) object = models.CharField(max_length=255) properties = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'imports' class IntegrationEntity(models.Model): date_added = models.DateTimeField() integration = models.CharField(max_length=255, blank=True, null=True) integration_entity = models.CharField(max_length=255, blank=True, null=True) integration_entity_id = models.CharField(max_length=255, blank=True, null=True) internal_entity = models.CharField(max_length=255, blank=True, null=True) internal_entity_id = models.IntegerField(blank=True, null=True) last_sync_date = models.DateTimeField(blank=True, null=True) internal = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'integration_entity' class IpAddresses(models.Model): ip_address = models.CharField(max_length=45) ip_details = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'ip_addresses' class LeadCategories(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING) lead = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() manually_removed = models.IntegerField() manually_added = models.IntegerField() class Meta: managed = False db_table = 'lead_categories' class LeadCompaniesChangeLog(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) type = models.TextField() event_name = models.CharField(max_length=255) action_name = models.CharField(max_length=255) company_id = models.IntegerField() date_added = models.DateTimeField() class Meta: managed = False db_table = 'lead_companies_change_log' class LeadDevices(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() client_info = models.TextField(blank=True, null=True) device = models.CharField(max_length=255, blank=True, null=True) device_os_name = models.CharField(max_length=255, blank=True, null=True) device_os_shortname = models.CharField(max_length=255, blank=True, null=True) device_os_version = models.CharField(max_length=255, blank=True, null=True) device_os_platform = models.CharField(max_length=255, blank=True, null=True) device_brand = models.CharField(max_length=255, blank=True, null=True) device_model = models.CharField(max_length=255, blank=True, null=True) device_fingerprint = models.CharField(max_length=255, blank=True, null=True) tracking_id = models.CharField(unique=True, max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'lead_devices' class LeadDonotcontact(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING, blank=True, null=True) date_added = models.DateTimeField() reason = models.SmallIntegerField() channel = models.CharField(max_length=255) channel_id = models.IntegerField(blank=True, null=True) comments = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'lead_donotcontact' class LeadEventLog(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING, blank=True, null=True) user_id = models.IntegerField(blank=True, null=True) user_name = models.CharField(max_length=255, blank=True, null=True) bundle = models.CharField(max_length=255, blank=True, null=True) object = models.CharField(max_length=255, blank=True, null=True) action = models.CharField(max_length=255, blank=True, null=True) object_id = models.IntegerField(blank=True, null=True) date_added = models.DateTimeField() properties = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'lead_event_log' class LeadFields(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) label = models.CharField(max_length=255) alias = models.CharField(max_length=255) type = models.CharField(max_length=50) field_group = models.CharField(max_length=255, blank=True, null=True) default_value = models.CharField(max_length=255, blank=True, null=True) is_required = models.IntegerField() is_fixed = models.IntegerField() is_visible = models.IntegerField() is_short_visible = models.IntegerField() is_listable = models.IntegerField() is_publicly_updatable = models.IntegerField() is_unique_identifer = models.IntegerField(blank=True, null=True) field_order = models.IntegerField(blank=True, null=True) object = models.CharField(max_length=255, blank=True, null=True) properties = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'lead_fields' class LeadFrequencyrules(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() frequency_number = models.SmallIntegerField(blank=True, null=True) frequency_time = models.CharField(max_length=25, blank=True, null=True) channel = models.CharField(max_length=255) preferred_channel = models.IntegerField() pause_from_date = models.DateTimeField(blank=True, null=True) pause_to_date = models.DateTimeField(blank=True, null=True) class Meta: managed = False db_table = 'lead_frequencyrules' class LeadIpsXref(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING, primary_key=True) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING) class Meta: managed = False db_table = 'lead_ips_xref' unique_together = (('lead', 'ip'),) class LeadLists(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) alias = models.CharField(max_length=255) filters = models.TextField() is_global = models.IntegerField() class Meta: managed = False db_table = 'lead_lists' class LeadListsLeads(models.Model): leadlist = models.ForeignKey(LeadLists, models.DO_NOTHING, primary_key=True) lead = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() manually_removed = models.IntegerField() manually_added = models.IntegerField() class Meta: managed = False db_table = 'lead_lists_leads' unique_together = (('leadlist', 'lead'),) class LeadNotes(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) text = models.TextField() type = models.CharField(max_length=50, blank=True, null=True) date_time = models.DateTimeField(blank=True, null=True) class Meta: managed = False db_table = 'lead_notes' class LeadPointsChangeLog(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING) type = models.TextField() event_name = models.CharField(max_length=255) action_name = models.CharField(max_length=255) delta = models.IntegerField() date_added = models.DateTimeField() class Meta: managed = False db_table = 'lead_points_change_log' class LeadStagesChangeLog(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) stage = models.ForeignKey('Stages', models.DO_NOTHING, blank=True, null=True) event_name = models.CharField(max_length=255) action_name = models.CharField(max_length=255) date_added = models.DateTimeField() class Meta: managed = False db_table = 'lead_stages_change_log' class LeadTags(models.Model): tag = models.CharField(max_length=255) class Meta: managed = False db_table = 'lead_tags' class LeadTagsXref(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING, primary_key=True) tag = models.ForeignKey(LeadTags, models.DO_NOTHING) class Meta: managed = False db_table = 'lead_tags_xref' unique_together = (('lead', 'tag'),) class LeadUtmtags(models.Model): lead = models.ForeignKey('Leads', models.DO_NOTHING) date_added = models.DateTimeField() query = models.TextField(blank=True, null=True) referer = models.TextField(blank=True, null=True) remote_host = models.CharField(max_length=255, blank=True, null=True) url = models.CharField(max_length=255, blank=True, null=True) user_agent = models.TextField(blank=True, null=True) utm_campaign = models.CharField(max_length=255, blank=True, null=True) utm_content = models.CharField(max_length=255, blank=True, null=True) utm_medium = models.CharField(max_length=255, blank=True, null=True) utm_source = models.CharField(max_length=255, blank=True, null=True) utm_term = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'lead_utmtags' class Leads(models.Model): owner = models.ForeignKey('Users', models.DO_NOTHING, blank=True, null=True) stage = models.ForeignKey('Stages', models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) points = models.IntegerField() last_active = models.DateTimeField(blank=True, null=True) internal = models.TextField(blank=True, null=True) social_cache = models.TextField(blank=True, null=True) date_identified = models.DateTimeField(blank=True, null=True) preferred_profile_image = models.CharField(max_length=255, blank=True, null=True) title = models.CharField(max_length=255, blank=True, null=True) firstname = models.CharField(max_length=255, blank=True, null=True) lastname = models.CharField(max_length=255, blank=True, null=True) company = models.CharField(max_length=255, blank=True, null=True) position = models.CharField(max_length=255, blank=True, null=True) email = models.CharField(max_length=255, blank=True, null=True) phone = models.CharField(max_length=255, blank=True, null=True) mobile = models.CharField(max_length=255, blank=True, null=True) address1 = models.CharField(max_length=255, blank=True, null=True) address2 = models.CharField(max_length=255, blank=True, null=True) city = models.CharField(max_length=255, blank=True, null=True) state = models.CharField(max_length=255, blank=True, null=True) zipcode = models.CharField(max_length=255, blank=True, null=True) timezone = models.CharField(max_length=255, blank=True, null=True) country = models.CharField(max_length=255, blank=True, null=True) fax = models.CharField(max_length=255, blank=True, null=True) preferred_locale = models.CharField(max_length=255, blank=True, null=True) attribution_date = models.DateTimeField(blank=True, null=True) attribution = models.FloatField(blank=True, null=True) website = models.TextField(blank=True, null=True) facebook = models.CharField(max_length=255, blank=True, null=True) foursquare = models.CharField(max_length=255, blank=True, null=True) googleplus = models.CharField(max_length=255, blank=True, null=True) instagram = models.CharField(max_length=255, blank=True, null=True) linkedin = models.CharField(max_length=255, blank=True, null=True) skype = models.CharField(max_length=255, blank=True, null=True) twitter = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'leads' class MessageChannels(models.Model): message = models.ForeignKey('Messages', models.DO_NOTHING) channel = models.CharField(max_length=255) channel_id = models.IntegerField(blank=True, null=True) properties = models.TextField() is_enabled = models.IntegerField() class Meta: managed = False db_table = 'message_channels' unique_together = (('message', 'channel'),) class MessageQueue(models.Model): event = models.ForeignKey(CampaignEvents, models.DO_NOTHING, blank=True, null=True) lead = models.ForeignKey(Leads, models.DO_NOTHING) channel = models.CharField(max_length=255) channel_id = models.IntegerField() priority = models.SmallIntegerField() max_attempts = models.SmallIntegerField() attempts = models.SmallIntegerField() success = models.IntegerField() status = models.CharField(max_length=255) date_published = models.DateTimeField(blank=True, null=True) scheduled_date = models.DateTimeField(blank=True, null=True) last_attempt = models.DateTimeField(blank=True, null=True) date_sent = models.DateTimeField(blank=True, null=True) options = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'message_queue' class Messages(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) class Meta: managed = False db_table = 'messages' class MonitorPostCount(models.Model): monitor = models.ForeignKey('Monitoring', models.DO_NOTHING, blank=True, null=True) post_date = models.DateField() post_count = models.IntegerField() class Meta: managed = False db_table = 'monitor_post_count' class Monitoring(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) title = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) lists = models.TextField(blank=True, null=True) network_type = models.CharField(max_length=255, blank=True, null=True) revision = models.IntegerField() stats = models.TextField(blank=True, null=True) properties = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) class Meta: managed = False db_table = 'monitoring' class MonitoringLeads(models.Model): monitor = models.ForeignKey(Monitoring, models.DO_NOTHING, primary_key=True) lead = models.ForeignKey(Leads, models.DO_NOTHING) date_added = models.DateTimeField() class Meta: managed = False db_table = 'monitoring_leads' unique_together = (('monitor', 'lead'),) class Notifications(models.Model): user = models.ForeignKey('Users', models.DO_NOTHING) type = models.CharField(max_length=25, blank=True, null=True) header = models.CharField(max_length=255, blank=True, null=True) message = models.TextField() date_added = models.DateTimeField() icon_class = models.CharField(max_length=255, blank=True, null=True) is_read = models.IntegerField() class Meta: managed = False db_table = 'notifications' class Oauth1AccessTokens(models.Model): consumer = models.ForeignKey('Oauth1Consumers', models.DO_NOTHING) user = models.ForeignKey('Users', models.DO_NOTHING) token = models.CharField(max_length=255) secret = models.CharField(max_length=255) expires_at = models.BigIntegerField(blank=True, null=True) class Meta: managed = False db_table = 'oauth1_access_tokens' class Oauth1Consumers(models.Model): name = models.CharField(max_length=255) consumer_key = models.CharField(max_length=255) consumer_secret = models.CharField(max_length=255) callback = models.CharField(max_length=255) class Meta: managed = False db_table = 'oauth1_consumers' class Oauth1Nonces(models.Model): nonce = models.CharField(primary_key=True, max_length=255) timestamp = models.CharField(max_length=255) class Meta: managed = False db_table = 'oauth1_nonces' class Oauth1RequestTokens(models.Model): consumer = models.ForeignKey(Oauth1Consumers, models.DO_NOTHING) user = models.ForeignKey('Users', models.DO_NOTHING, blank=True, null=True) token = models.CharField(max_length=255) secret = models.CharField(max_length=255) expires_at = models.BigIntegerField() verifier = models.CharField(max_length=255) class Meta: managed = False db_table = 'oauth1_request_tokens' class Oauth2Accesstokens(models.Model): client = models.ForeignKey('Oauth2Clients', models.DO_NOTHING) user = models.ForeignKey('Users', models.DO_NOTHING) token = models.CharField(unique=True, max_length=255) expires_at = models.BigIntegerField(blank=True, null=True) scope = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'oauth2_accesstokens' class Oauth2Authcodes(models.Model): client = models.ForeignKey('Oauth2Clients', models.DO_NOTHING) user = models.ForeignKey('Users', models.DO_NOTHING) token = models.CharField(unique=True, max_length=255) expires_at = models.BigIntegerField(blank=True, null=True) scope = models.CharField(max_length=255, blank=True, null=True) redirect_uri = models.TextField() class Meta: managed = False db_table = 'oauth2_authcodes' class Oauth2Clients(models.Model): name = models.CharField(max_length=255) random_id = models.CharField(max_length=255) secret = models.CharField(max_length=255) redirect_uris = models.TextField() allowed_grant_types = models.TextField() class Meta: managed = False db_table = 'oauth2_clients' class Oauth2Refreshtokens(models.Model): client = models.ForeignKey(Oauth2Clients, models.DO_NOTHING) user = models.ForeignKey('Users', models.DO_NOTHING) token = models.CharField(unique=True, max_length=255) expires_at = models.BigIntegerField(blank=True, null=True) scope = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'oauth2_refreshtokens' class Oauth2UserClientXref(models.Model): client = models.ForeignKey(Oauth2Clients, models.DO_NOTHING, primary_key=True) user = models.ForeignKey('Users', models.DO_NOTHING) class Meta: managed = False db_table = 'oauth2_user_client_xref' unique_together = (('client', 'user'),) class PageHits(models.Model): page = models.ForeignKey('Pages', models.DO_NOTHING, blank=True, null=True) redirect = models.ForeignKey('PageRedirects', models.DO_NOTHING, blank=True, null=True) email = models.ForeignKey(Emails, models.DO_NOTHING, blank=True, null=True) lead = models.ForeignKey(Leads, models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING) device = models.ForeignKey(LeadDevices, models.DO_NOTHING, blank=True, null=True) date_hit = models.DateTimeField() date_left = models.DateTimeField(blank=True, null=True) country = models.CharField(max_length=255, blank=True, null=True) region = models.CharField(max_length=255, blank=True, null=True) city = models.CharField(max_length=255, blank=True, null=True) isp = models.CharField(max_length=255, blank=True, null=True) organization = models.CharField(max_length=255, blank=True, null=True) code = models.IntegerField() referer = models.TextField(blank=True, null=True) url = models.TextField(blank=True, null=True) url_title = models.CharField(max_length=255, blank=True, null=True) user_agent = models.TextField(blank=True, null=True) remote_host = models.CharField(max_length=255, blank=True, null=True) page_language = models.CharField(max_length=255, blank=True, null=True) browser_languages = models.TextField(blank=True, null=True) tracking_id = models.CharField(max_length=255) source = models.CharField(max_length=255, blank=True, null=True) source_id = models.IntegerField(blank=True, null=True) query = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'page_hits' class PageRedirects(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) redirect_id = models.CharField(max_length=25) url = models.TextField() hits = models.IntegerField() unique_hits = models.IntegerField() class Meta: managed = False db_table = 'page_redirects' class Pages(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) translation_parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) variant_parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) title = models.CharField(max_length=255) alias = models.CharField(max_length=255) template = models.CharField(max_length=255, blank=True, null=True) custom_html = models.TextField(blank=True, null=True) content = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) hits = models.IntegerField() unique_hits = models.IntegerField() variant_hits = models.IntegerField() revision = models.IntegerField() meta_description = models.CharField(max_length=255, blank=True, null=True) redirect_type = models.CharField(max_length=100, blank=True, null=True) redirect_url = models.CharField(max_length=2048, blank=True, null=True) is_preference_center = models.IntegerField(blank=True, null=True) no_index = models.IntegerField(blank=True, null=True) lang = models.CharField(max_length=255) variant_settings = models.TextField(blank=True, null=True) variant_start_date = models.DateTimeField(blank=True, null=True) class Meta: managed = False db_table = 'pages' class Permissions(models.Model): role = models.ForeignKey('Roles', models.DO_NOTHING) bundle = models.CharField(max_length=50) name = models.CharField(max_length=50) bitwise = models.IntegerField() class Meta: managed = False db_table = 'permissions' unique_together = (('bundle', 'name', 'role'),) class PluginCitrixEvents(models.Model): lead = models.ForeignKey(Leads, models.DO_NOTHING) product = models.CharField(max_length=255) email = models.CharField(max_length=255) event_name = models.CharField(max_length=255) event_desc = models.CharField(max_length=255, blank=True, null=True) event_type = models.CharField(max_length=50) event_date = models.DateTimeField() class Meta: managed = False db_table = 'plugin_citrix_events' class PluginCrmPipedriveOwners(models.Model): email = models.CharField(max_length=255) owner_id = models.IntegerField(blank=True, null=True) class Meta: managed = False db_table = 'plugin_crm_pipedrive_owners' class PluginIntegrationSettings(models.Model): plugin = models.ForeignKey('Plugins', models.DO_NOTHING, blank=True, null=True) name = models.CharField(max_length=255) is_published = models.IntegerField() supported_features = models.TextField(blank=True, null=True) api_keys = models.TextField() feature_settings = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'plugin_integration_settings' class Plugins(models.Model): name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) is_missing = models.IntegerField() bundle = models.CharField(unique=True, max_length=50) version = models.CharField(max_length=255, blank=True, null=True) author = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'plugins' class PointLeadActionLog(models.Model): point = models.ForeignKey('Points', models.DO_NOTHING, primary_key=True) lead = models.ForeignKey(Leads, models.DO_NOTHING) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING, blank=True, null=True) date_fired = models.DateTimeField() class Meta: managed = False db_table = 'point_lead_action_log' unique_together = (('point', 'lead'),) class PointLeadEventLog(models.Model): event = models.ForeignKey('PointTriggerEvents', models.DO_NOTHING, primary_key=True) lead = models.ForeignKey(Leads, models.DO_NOTHING) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING, blank=True, null=True) date_fired = models.DateTimeField() class Meta: managed = False db_table = 'point_lead_event_log' unique_together = (('event', 'lead'),) class PointTriggerEvents(models.Model): trigger = models.ForeignKey('PointTriggers', models.DO_NOTHING) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) type = models.CharField(max_length=50) action_order = models.IntegerField() properties = models.TextField() class Meta: managed = False db_table = 'point_trigger_events' class PointTriggers(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) points = models.IntegerField() color = models.CharField(max_length=7) trigger_existing_leads = models.IntegerField() class Meta: managed = False db_table = 'point_triggers' class Points(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) type = models.CharField(max_length=50) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) delta = models.IntegerField() properties = models.TextField() class Meta: managed = False db_table = 'points' class PushIds(models.Model): lead = models.ForeignKey(Leads, models.DO_NOTHING, blank=True, null=True) push_id = models.CharField(max_length=255) enabled = models.IntegerField() mobile = models.IntegerField() class Meta: managed = False db_table = 'push_ids' class PushNotificationListXref(models.Model): notification = models.ForeignKey('PushNotifications', models.DO_NOTHING, primary_key=True) leadlist = models.ForeignKey(LeadLists, models.DO_NOTHING) class Meta: managed = False db_table = 'push_notification_list_xref' unique_together = (('notification', 'leadlist'),) class PushNotificationStats(models.Model): notification = models.ForeignKey('PushNotifications', models.DO_NOTHING, blank=True, null=True) lead = models.ForeignKey(Leads, models.DO_NOTHING, blank=True, null=True) list = models.ForeignKey(LeadLists, models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING, blank=True, null=True) date_sent = models.DateTimeField() date_read = models.DateTimeField(blank=True, null=True) is_clicked = models.IntegerField() date_clicked = models.DateTimeField(blank=True, null=True) tracking_hash = models.CharField(max_length=255, blank=True, null=True) retry_count = models.IntegerField(blank=True, null=True) source = models.CharField(max_length=255, blank=True, null=True) source_id = models.IntegerField(blank=True, null=True) tokens = models.TextField(blank=True, null=True) click_count = models.IntegerField(blank=True, null=True) last_clicked = models.DateTimeField(blank=True, null=True) click_details = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'push_notification_stats' class PushNotifications(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) lang = models.CharField(max_length=255) url = models.TextField(blank=True, null=True) heading = models.TextField() message = models.TextField() button = models.TextField(blank=True, null=True) utm_tags = models.TextField(blank=True, null=True) notification_type = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) read_count = models.IntegerField() sent_count = models.IntegerField() mobile = models.IntegerField() mobilesettings = models.TextField(db_column='mobileSettings') # Field name made lowercase. class Meta: managed = False db_table = 'push_notifications' class Reports(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) system = models.IntegerField() source = models.CharField(max_length=255) columns = models.TextField(blank=True, null=True) filters = models.TextField(blank=True, null=True) table_order = models.TextField(blank=True, null=True) graphs = models.TextField(blank=True, null=True) group_by = models.TextField(blank=True, null=True) aggregators = models.TextField(blank=True, null=True) settings = models.TextField(blank=True, null=True) is_scheduled = models.IntegerField() schedule_unit = models.CharField(max_length=255, blank=True, null=True) to_address = models.CharField(max_length=255, blank=True, null=True) schedule_day = models.CharField(max_length=255, blank=True, null=True) schedule_month_frequency = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'reports' class ReportsSchedulers(models.Model): report = models.ForeignKey(Reports, models.DO_NOTHING) schedule_date = models.DateTimeField() class Meta: managed = False db_table = 'reports_schedulers' class Roles(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) is_admin = models.IntegerField() readable_permissions = models.TextField() class Meta: managed = False db_table = 'roles' class SamlIdEntry(models.Model): id = models.CharField(primary_key=True, max_length=255) entity_id = models.CharField(max_length=255) expirytimestamp = models.IntegerField(db_column='expiryTimestamp') # Field name made lowercase. class Meta: managed = False db_table = 'saml_id_entry' unique_together = (('id', 'entity_id'),) class SmsMessageListXref(models.Model): sms = models.ForeignKey('SmsMessages', models.DO_NOTHING, primary_key=True) leadlist = models.ForeignKey(LeadLists, models.DO_NOTHING) class Meta: managed = False db_table = 'sms_message_list_xref' unique_together = (('sms', 'leadlist'),) class SmsMessageStats(models.Model): sms = models.ForeignKey('SmsMessages', models.DO_NOTHING, blank=True, null=True) lead = models.ForeignKey(Leads, models.DO_NOTHING, blank=True, null=True) list = models.ForeignKey(LeadLists, models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING, blank=True, null=True) date_sent = models.DateTimeField() tracking_hash = models.CharField(max_length=255, blank=True, null=True) source = models.CharField(max_length=255, blank=True, null=True) source_id = models.IntegerField(blank=True, null=True) tokens = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'sms_message_stats' class SmsMessages(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) lang = models.CharField(max_length=255) message = models.TextField() sms_type = models.TextField(blank=True, null=True) publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) sent_count = models.IntegerField() class Meta: managed = False db_table = 'sms_messages' class StageLeadActionLog(models.Model): stage = models.ForeignKey('Stages', models.DO_NOTHING, primary_key=True) lead = models.ForeignKey(Leads, models.DO_NOTHING) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING, blank=True, null=True) date_fired = models.DateTimeField() class Meta: managed = False db_table = 'stage_lead_action_log' unique_together = (('stage', 'lead'),) class Stages(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) weight = models.IntegerField() publish_up = models.DateTimeField(blank=True, null=True) publish_down = models.DateTimeField(blank=True, null=True) class Meta: managed = False db_table = 'stages' class TweetStats(models.Model): tweet = models.ForeignKey('Tweets', models.DO_NOTHING, blank=True, null=True) lead = models.ForeignKey(Leads, models.DO_NOTHING, blank=True, null=True) twitter_tweet_id = models.CharField(max_length=255, blank=True, null=True) handle = models.CharField(max_length=255) date_sent = models.DateTimeField(blank=True, null=True) is_failed = models.IntegerField(blank=True, null=True) retry_count = models.IntegerField(blank=True, null=True) source = models.CharField(max_length=255, blank=True, null=True) source_id = models.IntegerField(blank=True, null=True) favorite_count = models.IntegerField(blank=True, null=True) retweet_count = models.IntegerField(blank=True, null=True) response_details = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'tweet_stats' class Tweets(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) page = models.ForeignKey(Pages, models.DO_NOTHING, blank=True, null=True) asset = models.ForeignKey(Assets, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) media_id = models.CharField(max_length=255, blank=True, null=True) media_path = models.CharField(max_length=255, blank=True, null=True) text = models.CharField(max_length=280) sent_count = models.IntegerField(blank=True, null=True) favorite_count = models.IntegerField(blank=True, null=True) retweet_count = models.IntegerField(blank=True, null=True) lang = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'tweets' class UserTokens(models.Model): user = models.ForeignKey('Users', models.DO_NOTHING) authorizator = models.CharField(max_length=32) secret = models.CharField(unique=True, max_length=120) expiration = models.DateTimeField(blank=True, null=True) one_time_only = models.IntegerField() class Meta: managed = False db_table = 'user_tokens' class Users(models.Model): role = models.ForeignKey(Roles, models.DO_NOTHING) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) username = models.CharField(unique=True, max_length=255) password = models.CharField(max_length=64) first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) email = models.CharField(unique=True, max_length=255) position = models.CharField(max_length=255, blank=True, null=True) timezone = models.CharField(max_length=255, blank=True, null=True) locale = models.CharField(max_length=255, blank=True, null=True) last_login = models.DateTimeField(blank=True, null=True) last_active = models.DateTimeField(blank=True, null=True) online_status = models.CharField(max_length=255, blank=True, null=True) preferences = models.TextField(blank=True, null=True) signature = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'users' class VideoHits(models.Model): lead = models.ForeignKey(Leads, models.DO_NOTHING, blank=True, null=True) ip = models.ForeignKey(IpAddresses, models.DO_NOTHING) date_hit = models.DateTimeField() date_left = models.DateTimeField(blank=True, null=True) country = models.CharField(max_length=255, blank=True, null=True) region = models.CharField(max_length=255, blank=True, null=True) city = models.CharField(max_length=255, blank=True, null=True) isp = models.CharField(max_length=255, blank=True, null=True) organization = models.CharField(max_length=255, blank=True, null=True) code = models.IntegerField() referer = models.TextField(blank=True, null=True) url = models.TextField(blank=True, null=True) user_agent = models.TextField(blank=True, null=True) remote_host = models.CharField(max_length=255, blank=True, null=True) guid = models.CharField(max_length=255) page_language = models.CharField(max_length=255, blank=True, null=True) browser_languages = models.TextField(blank=True, null=True) channel = models.CharField(max_length=255, blank=True, null=True) channel_id = models.IntegerField(blank=True, null=True) time_watched = models.IntegerField(blank=True, null=True) duration = models.IntegerField(blank=True, null=True) query = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'video_hits' class WebhookEvents(models.Model): webhook = models.ForeignKey('Webhooks', models.DO_NOTHING) event_type = models.CharField(max_length=50) class Meta: managed = False db_table = 'webhook_events' class WebhookLogs(models.Model): webhook = models.ForeignKey('Webhooks', models.DO_NOTHING) status_code = models.CharField(max_length=50) date_added = models.DateTimeField(blank=True, null=True) note = models.CharField(max_length=255, blank=True, null=True) runtime = models.FloatField(blank=True, null=True) class Meta: managed = False db_table = 'webhook_logs' class WebhookQueue(models.Model): webhook = models.ForeignKey('Webhooks', models.DO_NOTHING) event = models.ForeignKey(WebhookEvents, models.DO_NOTHING) date_added = models.DateTimeField(blank=True, null=True) payload = models.TextField() class Meta: managed = False db_table = 'webhook_queue' class Webhooks(models.Model): category = models.ForeignKey(Categories, models.DO_NOTHING, blank=True, null=True) is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) description = models.TextField(blank=True, null=True) webhook_url = models.CharField(max_length=255) events_orderby_dir = models.CharField(max_length=255, blank=True, null=True) class Meta: managed = False db_table = 'webhooks' class Widgets(models.Model): is_published = models.IntegerField() date_added = models.DateTimeField(blank=True, null=True) created_by = models.IntegerField(blank=True, null=True) created_by_user = models.CharField(max_length=255, blank=True, null=True) date_modified = models.DateTimeField(blank=True, null=True) modified_by = models.IntegerField(blank=True, null=True) modified_by_user = models.CharField(max_length=255, blank=True, null=True) checked_out = models.DateTimeField(blank=True, null=True) checked_out_by = models.IntegerField(blank=True, null=True) checked_out_by_user = models.CharField(max_length=255, blank=True, null=True) name = models.CharField(max_length=255) type = models.CharField(max_length=255) width = models.IntegerField() height = models.IntegerField() cache_timeout = models.IntegerField(blank=True, null=True) ordering = models.IntegerField(blank=True, null=True) params = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'widgets'
43.223819
104
0.730344
10,756
84,200
5.550762
0.060989
0.112756
0.16287
0.212984
0.866893
0.854549
0.817014
0.778072
0.744322
0.683154
0
0.015362
0.158112
84,200
1,947
105
43.24602
0.826879
0.006021
0
0.605704
1
0
0.032109
0.006465
0
0
0
0
0
1
0
false
0.00062
0.00186
0
0.849969
0.00062
0
0
0
null
0
0
1
1
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
1
0
0
9
cfe2acf5df39b6354ac84b44bc21a18195edfe11
2,493
py
Python
2020/Day-12/Rain_Risk/vector.py
sreekesari-vangeepuram/aoc-2020
645531be0208affe042ac0328105b9ef3cfc9dbf
[ "MIT" ]
1
2021-07-09T07:56:14.000Z
2021-07-09T07:56:14.000Z
2020/Day-12/Rain_Risk/vector.py
sreekesari-vangeepuram/adventofcode
645531be0208affe042ac0328105b9ef3cfc9dbf
[ "MIT" ]
null
null
null
2020/Day-12/Rain_Risk/vector.py
sreekesari-vangeepuram/adventofcode
645531be0208affe042ac0328105b9ef3cfc9dbf
[ "MIT" ]
null
null
null
class vector: def __init__(self, x, y, pointing_direction): self.x = x self.y = y self.direction = pointing_direction def get_pos(self): return (self.x, self.y, self.direction) def change_position(self, ins): d = self.direction if d == 'E': if ins[0] == 'E' or ins[0] == 'F': self.x += ins[1] elif ins[0] == 'W': self.x -= ins[1] elif ins[0] == 'N': self.y += ins[1] elif ins[0] == 'S': self.y -= ins[1] elif d == 'W': if ins[0] == 'W' or ins[0] == 'F': self.x -= ins[1] elif ins[0] == 'E': self.x += ins[1] elif ins[0] == 'N': self.y += ins[1] elif ins[0] == 'S': self.y -= ins[1] elif d == 'N': if ins[0] == 'N' or ins[0] == 'F': self.y += ins[1] elif ins[0] == 'W': self.x -= ins[1] elif ins[0] == 'E': self.x += ins[1] elif ins[0] == 'S': self.y -= ins[1] elif d == 'S': if ins[0] == 'S' or ins[0] == 'F': self.y -= ins[1] elif ins[0] == 'W': self.x -= ins[1] elif ins[0] == 'N': self.y += ins[1] elif ins[0] == 'E': self.x += ins[1] def change_direction(self, ins): d = self.direction if ins[0] == 'R': if d == 'E': if ins[1] == 90: self.direction = 'S' elif ins[1] == 180: self.direction = 'W' elif ins[1] == 270: self.direction = 'N' elif d == 'W': if ins[1] == 90: self.direction = 'N' elif ins[1] == 180: self.direction = 'E' elif ins[1] == 270: self.direction = 'S' elif d == 'N': if ins[1] == 90: self.direction = 'E' elif ins[1] == 180: self.direction = 'S' elif ins[1] == 270: self.direction = 'W' elif d == 'S': if ins[1] == 90: self.direction = 'W' elif ins[1] == 180: self.direction = 'N' elif ins[1] == 270: self.direction = 'E' elif ins[0] == 'L': if d == 'E': if ins[1] == 90: self.direction = 'N' elif ins[1] == 180: self.direction = 'W' elif ins[1] == 270: self.direction = 'S' elif d == 'W': if ins[1] == 90: self.direction = 'S' elif ins[1] == 180: self.direction = 'E' elif ins[1] == 270: self.direction = 'N' elif d == 'N': if ins[1] == 90: self.direction = 'W' elif ins[1] == 180: self.direction = 'S' elif ins[1] == 270: self.direction = 'E' elif d == 'S': if ins[1] == 90: self.direction = 'E' elif ins[1] == 180: self.direction = 'N' elif ins[1] == 270: self.direction = 'W' def manhattan_distance(self): return abs(self.x)+abs(self.y)
24.683168
54
0.490975
413
2,493
2.939467
0.082324
0.131796
0.105437
0.108731
0.817957
0.794893
0.757002
0.755354
0.750412
0.710873
0
0.070986
0.288006
2,493
100
55
24.93
0.612958
0
0
0.813187
0
0
0.023265
0
0
0
0
0
0
1
0.054945
false
0
0
0.021978
0.087912
0
0
0
0
null
0
0
0
1
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
7
cfe73730991d31b8a39a3f48d514ae3136c07d3d
243
py
Python
PackageName/plots/__init__.py
asiaszmek/CA1TestUnit
ff4d70a14ab15331528dbdd67973a9b6c037a13f
[ "BSD-3-Clause" ]
1
2021-05-05T15:44:13.000Z
2021-05-05T15:44:13.000Z
DemoTestUnit/plots/__init__.py
appukuttan-shailesh/DemoTestUnit
bd0430fdb730ad18492f3cd32b1af039fa9fe093
[ "BSD-3-Clause" ]
null
null
null
DemoTestUnit/plots/__init__.py
appukuttan-shailesh/DemoTestUnit
bd0430fdb730ad18492f3cd32b1af039fa9fe093
[ "BSD-3-Clause" ]
null
null
null
import sciunit # =============================================================================== # Enter source code for generating result related files here # ===============================================================================
30.375
81
0.259259
11
243
5.727273
1
0
0
0
0
0
0
0
0
0
0
0
0.078189
243
7
82
34.714286
0.28125
0.897119
0
0
0
0
0
0
0
1
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
0
0
0
0
0
null
1
0
0
0
0
0
1
0
1
0
1
0
0
8
32150535b32a48384a2a6e655f4952188ed39b17
2,276
py
Python
kiqpo/core/Head.py
bionic-py/Bionic
a54c85107a6a2aa9a9563b6b3e1f9bb64d63faa4
[ "MIT" ]
9
2021-10-31T03:38:16.000Z
2021-12-17T00:03:36.000Z
kiqpo/core/Head.py
bionic-py/Bionic
a54c85107a6a2aa9a9563b6b3e1f9bb64d63faa4
[ "MIT" ]
12
2021-11-11T14:18:09.000Z
2021-12-03T14:00:25.000Z
kiqpo/core/Head.py
kiqpo/kiqpo
a54c85107a6a2aa9a9563b6b3e1f9bb64d63faa4
[ "MIT" ]
3
2022-03-03T18:30:53.000Z
2022-03-09T13:29:39.000Z
def HeadCore(Title="Bionic-Ui", Css=True, Style="./css/core.css", ThemeColor="#119f7f", SiteUrl="www.hey.com", Image_description="this is an image description", Imageurl="", Type="Landing-page", Keywords="", Description="", Author="", Icon="./assets/icons/png/icon.png"): if Css == True: return f"""<meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="theme-color" content="{ThemeColor}" /> <meta name="description" content="{Description}" /> <meta name="keywords" content="{Keywords}"> <meta name="author" content="{Author}" /> <meta property="og:title" content="{Title}" /> <meta property="og:url" content="{SiteUrl}" /> <link rel="manifest" href="/manifest.json" /> <meta property="og:description" content="{Image_description}" /> <meta property="og:image" itemprop="image" content="{Imageurl}" /> <meta property="og:type" content="{Type}"/> <link rel="stylesheet" href="./css/material.min.css"> <link href="./css/core.css" rel="stylesheet" /> <link rel="stylesheet" href="./css/theme.css" /> <link rel="icon" href="{Icon}" sizes="16x16" type="image/ico" /> <title>{Title}</title>""" else: return f"""<meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0 /"> <meta name="theme-color" content="{ThemeColor}" /> <meta name="description" content="{Description}" /> <meta name="keywords" content="{Keywords}" /> <meta name="author" content="{Author}" /> <meta property="og:title" content="{Title}" /> <meta property="og:url" content="{SiteUrl}" /> <link rel="manifest" href="/manifest.json" /> <meta property="og:description" content="{Image_description}" /> <meta property="og:image" itemprop="image" content="{Imageurl}" /> <meta property="og:type" content="{Type}"/> <link rel="stylesheet" href="./css/material.min.css"> <link rel="icon" href="{Icon}" sizes="16x16" type="image/ico" /> <link rel="stylesheet" href="./css/core.css" /> <link rel="stylesheet" href="./css/theme.css" /> <title>{Title}</title>"""
56.9
271
0.634007
283
2,276
5.088339
0.250883
0.055556
0.097222
0.072917
0.813889
0.797222
0.797222
0.754861
0.754861
0.754861
0
0.009212
0.141476
2,276
39
272
58.358974
0.727738
0
0
0.717949
0
0.102564
0.894552
0.259227
0
0
0
0
0
1
0.025641
false
0
0
0
0.076923
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
5c674f6451cd5c0695a93f10658aa9cd15da5ceb
3,255
py
Python
Lesson04/random_resize.py
supercatex/ML_Lesson
e975d4486be0faccab3f38b55ed73298756dd3d5
[ "MIT" ]
1
2020-06-05T07:11:02.000Z
2020-06-05T07:11:02.000Z
Lesson04/random_resize.py
supercatex/ML_Lesson
e975d4486be0faccab3f38b55ed73298756dd3d5
[ "MIT" ]
null
null
null
Lesson04/random_resize.py
supercatex/ML_Lesson
e975d4486be0faccab3f38b55ed73298756dd3d5
[ "MIT" ]
null
null
null
import os import sys import cv2 import numpy as np def generate_csv( dir_root="../../dataset", dir_img="img", csv="data.csv", new_csv="new_data.csv" ): dir_output_img = os.path.join(dir_root, dir_img) path_output_csv = os.path.join(dir_root, csv) path_output_new_csv = os.path.join(dir_root, new_csv) if not os.path.exists(dir_output_img): raise ("Image file not found->", dir_output_img) print("Reading csv file...") f = open(path_output_csv, "r") lines = f.readlines() f.close() print("Create csv file...") f = open(path_output_new_csv, "w") f.write("img,width,height,x1,y1,x2,y2,class\n") for i, line in enumerate(lines): sys.stdout.write("\rReading image file...%d/%d" % (i + 1, len(lines))) sys.stdout.flush() temp = line.split(",") name = temp[0].strip() if name == "img": continue w = int(temp[1].strip()) h = int(temp[2].strip()) x1 = int(temp[3].strip()) y1 = int(temp[4].strip()) x2 = int(temp[5].strip()) y2 = int(temp[6].strip()) label = int(temp[7]) path = os.path.join(dir_output_img, name) image = cv2.imread(path, cv2.IMREAD_UNCHANGED) cv2.imwrite(path, image) f.write("%s,%d,%d,%d,%d,%d,%d,%d\n" % ( name, image.shape[1], image.shape[0], 0, 0, image.shape[1], image.shape[0], label )) del image f.close() def random_resize( dir_root="../../dataset", dir_img="img", csv="data.csv", new_csv="new_data.csv" ): dir_output_img = os.path.join(dir_root, dir_img) path_output_csv = os.path.join(dir_root, csv) path_output_new_csv = os.path.join(dir_root, new_csv) if not os.path.exists(path_output_csv): raise("CSV file not found->", path_output_csv) print("Reading csv file...") f = open(path_output_csv, "r") lines = f.readlines() f.close() print("Create csv file...") f = open(path_output_new_csv, "w") f.write("img,width,height,x1,y1,x2,y2,class\n") for i, line in enumerate(lines): sys.stdout.write("\rReading image file...%d/%d" % (i + 1, len(lines))) sys.stdout.flush() temp = line.split(",") name = temp[0].strip() if name == "img": continue w = int(temp[1].strip()) h = int(temp[2].strip()) x1 = int(temp[3].strip()) y1 = int(temp[4].strip()) x2 = int(temp[5].strip()) y2 = int(temp[6].strip()) label = int(temp[7]) rs = np.random.randint(20, 100) path = os.path.join(dir_output_img, name) image = cv2.imread(path, cv2.IMREAD_UNCHANGED) image = cv2.resize(image, (rs, rs)) cv2.imwrite(path, image) f.write("%s,%d,%d,%d,%d,%d,%d,%d\n" % ( name, image.shape[1], image.shape[0], 0, 0, image.shape[1], image.shape[0], label )) del image f.close() if __name__ == "__main__": # random_resize() generate_csv()
25.833333
78
0.525346
461
3,255
3.561822
0.182213
0.017052
0.01827
0.063337
0.853837
0.853837
0.853837
0.853837
0.853837
0.853837
0
0.026106
0.305684
3,255
125
79
26.04
0.700442
0.004608
0
0.862745
1
0
0.119209
0.037678
0
0
0
0
0
1
0.019608
false
0
0.039216
0
0.058824
0.039216
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
5ccdcf82f06a2dd9192e04ea630e62386dc03b62
220
py
Python
HumanModeling/environment/__init__.py
nesl/EngagementService
bb8dc5a58d2038ace6467bfbcf4d253680628f67
[ "BSD-3-Clause" ]
6
2018-09-01T03:32:10.000Z
2021-11-14T10:39:41.000Z
HumanModeling/environment/__init__.py
nesl/EngagementService
bb8dc5a58d2038ace6467bfbcf4d253680628f67
[ "BSD-3-Clause" ]
null
null
null
HumanModeling/environment/__init__.py
nesl/EngagementService
bb8dc5a58d2038ace6467bfbcf4d253680628f67
[ "BSD-3-Clause" ]
null
null
null
from .always_say_ok_user import AlwaysSayOKUser from .stubborn_user import StubbornUser from .less_stubborn_user import LessStubbornUser from .survey_user import SurveyUser from .mturk_survey_user import MTurkSurveyUser
36.666667
48
0.886364
29
220
6.413793
0.517241
0.268817
0.193548
0
0
0
0
0
0
0
0
0
0.090909
220
5
49
44
0.93
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
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
7
7a2a2944a1f1b1934e92da155d7d4589d515eef6
1,570
py
Python
pyaz/network/application_gateway/identity/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/network/application_gateway/identity/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/network/application_gateway/identity/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
from .... pyaz_utils import _call_az def assign(gateway_name, identity, resource_group, no_wait=None): ''' Assign a managed service identity to an application-gateway Required Parameters: - gateway_name -- Name of the application gateway. - identity -- Name or ID of the ManagedIdentity Resource - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` Optional Parameters: - no_wait -- Do not wait for the long-running operation to finish. ''' return _call_az("az network application-gateway identity assign", locals()) def remove(gateway_name, resource_group, no_wait=None): ''' Remove the managed service identity of an application-gateway Required Parameters: - gateway_name -- Name of the application gateway. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` Optional Parameters: - no_wait -- Do not wait for the long-running operation to finish. ''' return _call_az("az network application-gateway identity remove", locals()) def show(gateway_name, resource_group): ''' Show the managed service identity of an application-gateway Required Parameters: - gateway_name -- Name of the application gateway. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` ''' return _call_az("az network application-gateway identity show", locals())
37.380952
128
0.723567
205
1,570
5.419512
0.234146
0.105311
0.093609
0.075608
0.79928
0.757876
0.757876
0.757876
0.715572
0.715572
0
0
0.194268
1,570
41
129
38.292683
0.878261
0.643312
0
0
0
0
0.297593
0
0
0
0
0
0
1
0.428571
false
0
0.142857
0
1
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
7
7a2acd5289cac8e6eac2758d8a6a491a5e1830df
7,635
py
Python
tests/unit/certificates/conftest.py
SpComb/hcloud-python
ed00e39dd2c2625cc0aae0e6153cee9c0b06c4af
[ "MIT" ]
1
2021-06-01T03:15:08.000Z
2021-06-01T03:15:08.000Z
tests/unit/certificates/conftest.py
CPT-Jack-A-Castle/hcloud-python
1500fbc166df4d33c9a5dddcb45a06235b2f9514
[ "MIT" ]
null
null
null
tests/unit/certificates/conftest.py
CPT-Jack-A-Castle/hcloud-python
1500fbc166df4d33c9a5dddcb45a06235b2f9514
[ "MIT" ]
null
null
null
import pytest @pytest.fixture() def certificate_response(): return { "certificate": { "id": 2323, "name": "My Certificate", "type": "managed", "labels": {}, "certificate": "-----BEGIN CERTIFICATE-----\n...", "created": "2019-01-08T12:10:00+00:00", "not_valid_before": "2019-01-08T10:00:00+00:00", "not_valid_after": "2019-07-08T09:59:59+00:00", "domain_names": [ "example.com", "webmail.example.com", "www.example.com" ], "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", "status": { "issuance": "failed", "renewal": "scheduled", "error": { "code": "error_code", "message": "error message" } }, "used_by": [ { "id": 42, "type": "server" } ] } } @pytest.fixture() def create_managed_certificate_response(): return { "certificate": { "id": 2323, "name": "My Certificate", "type": "managed", "labels": {}, "certificate": "-----BEGIN CERTIFICATE-----\n...", "created": "2019-01-08T12:10:00+00:00", "not_valid_before": "2019-01-08T10:00:00+00:00", "not_valid_after": "2019-07-08T09:59:59+00:00", "domain_names": [ "example.com", "webmail.example.com", "www.example.com" ], "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", "status": { "issuance": "pending", "renewal": "scheduled", "error": None }, "used_by": [ { "id": 42, "type": "load_balancer" } ] }, "action": { "id": 14, "command": "issue_certificate", "status": "success", "progress": 100, "started": "2021-01-30T23:55:00+00:00", "finished": "2021-01-30T23:57:00+00:00", "resources": [ { "id": 896, "type": "certificate" } ], "error": { "code": "action_failed", "message": "Action failed" } } } @pytest.fixture() def two_certificates_response(): return { "certificates": [ { "id": 2323, "name": "My Certificate", "labels": {}, "type": "uploaded", "certificate": "-----BEGIN CERTIFICATE-----\n...", "created": "2019-01-08T12:10:00+00:00", "not_valid_before": "2019-01-08T10:00:00+00:00", "not_valid_after": "2019-07-08T09:59:59+00:00", "domain_names": [ "example.com", "webmail.example.com", "www.example.com" ], "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", "status": None, "used_by": [ { "id": 42, "type": "load_balancer" } ] }, { "id": 2324, "name": "My website cert", "labels": {}, "type": "uploaded", "certificate": "-----BEGIN CERTIFICATE-----\n...", "created": "2019-01-08T12:10:00+00:00", "not_valid_before": "2019-01-08T10:00:00+00:00", "not_valid_after": "2019-07-08T09:59:59+00:00", "domain_names": [ "example.com", "webmail.example.com", "www.example.com" ], "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", "status": None, "used_by": [ { "id": 42, "type": "load_balancer" } ] } ] } @pytest.fixture() def one_certificates_response(): return { "certificates": [ { "id": 2323, "name": "My Certificate", "labels": {}, "type": "uploaded", "certificate": "-----BEGIN CERTIFICATE-----\n...", "created": "2019-01-08T12:10:00+00:00", "not_valid_before": "2019-01-08T10:00:00+00:00", "not_valid_after": "2019-07-08T09:59:59+00:00", "domain_names": [ "example.com", "webmail.example.com", "www.example.com" ], "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", "status": None, "used_by": [ { "id": 42, "type": "load_balancer" } ] } ] } @pytest.fixture() def response_update_certificate(): return { "certificate": { "id": 2323, "name": "New name", "labels": {}, "type": "uploaded", "certificate": "-----BEGIN CERTIFICATE-----\n...", "created": "2019-01-08T12:10:00+00:00", "not_valid_before": "2019-01-08T10:00:00+00:00", "not_valid_after": "2019-07-08T09:59:59+00:00", "domain_names": [ "example.com", "webmail.example.com", "www.example.com" ], "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", "status": None, "used_by": [ { "id": 42, "type": "load_balancer" } ] } } @pytest.fixture() def response_get_actions(): return { "actions": [ { "id": 13, "command": "change_protection", "status": "success", "progress": 100, "started": "2016-01-30T23:55:00+00:00", "finished": "2016-01-30T23:56:00+00:00", "resources": [ { "id": 14, "type": "certificate" } ], "error": { "code": "action_failed", "message": "Action failed" } } ] } @pytest.fixture() def response_retry_issuance_action(): return { "action": { "id": 14, "command": "issue_certificate", "status": "running", "progress": 0, "started": "2016-01-30T23:50+00:00", "finished": None, "resources": [ { "id": 42, "type": "certificate" } ], "error": { "code": "action_failed", "message": "Action failed" } } }
29.941176
87
0.369221
647
7,635
4.25966
0.163833
0.065312
0.047896
0.039187
0.858491
0.810958
0.810958
0.765965
0.75508
0.735123
0
0.154417
0.470727
7,635
254
88
30.059055
0.527592
0
0
0.655462
0
0.02521
0.361624
0.133071
0
0
0
0
0
1
0.029412
true
0
0.004202
0.029412
0.063025
0.02521
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
1
0
0
0
0
0
0
7
7a34aa955aad823e2bc987e211067ddb27c8e2d4
13,053
py
Python
examples/helloworld/python_image.py
jnadro/pybgfx
b08755355e05a83d6a6f49cc4710cd86c2de3f2f
[ "BSD-2-Clause" ]
72
2016-03-01T03:54:25.000Z
2022-03-28T23:19:46.000Z
examples/helloworld/python_image.py
jnadro/pybgfx
b08755355e05a83d6a6f49cc4710cd86c2de3f2f
[ "BSD-2-Clause" ]
3
2017-03-14T22:10:11.000Z
2021-05-22T07:43:43.000Z
examples/helloworld/python_image.py
jnadro/pybgfx
b08755355e05a83d6a6f49cc4710cd86c2de3f2f
[ "BSD-2-Clause" ]
2
2017-09-18T08:47:20.000Z
2019-10-06T12:20:55.000Z
from ctypes import c_uint8 s_python_logo = (c_uint8*2160)( *[ 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x2e, 0x0f, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x2e, 0x0f, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x2e, 0x0f, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x2e, 0x0f, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x2e, 0x0f, 0x3a, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x2e, 0x0f, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x2e, 0x0f, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x20, 0x04, 0x20, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x2e, 0x0f, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x20, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x2e, 0x0f, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x20, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x37, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0x24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0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2e, 0x0f, 0x2e, 0x0f, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x2e, 0x0f, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x3d, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2e, 0x0f, 0x2e, 0x0f, 0x2b, 0x0b, 0x2b, 0x0b, 0x2b, 0x0b, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x2d, 0x0c, 0x3d, 0x0c, 0x20, 0x04, 0x70, 0x0b, 0x79, 0x0b, 0x62, 0x0b, 0x67, 0x0b, 0x66, 0x0b, 0x78, 0x0b, 0x20, 0x0b, 0x70, 0x0b, 0x79, 0x0b, 0x74, 0x0b, 0x68, 0x0b, 0x6f, 0x0b, 0x6e, 0x0b, 0x20, 0x0b, 0x62, 0x0b, 0x69, 0x0b, 0x6e, 0x0b, 0x64, 0x0b, 0x69, 0x0b, 0x6e, 0x0b, 0x67, 0x0b, 0x73, 0x0b, 0x20, 0x0b, 0x66, 0x0b, 0x6f, 0x0b, 0x72, 0x0b, 0x20, 0x0b, 0x62, 0x0b, 0x67, 0x0b, 0x66, 0x0b, 0x78, 0x0b, 0x20, 0x0b, 0x3d, 0x0c, 0x2d, 0x0c, 0x20, 0x04, 0x20, 0x04, ])
407.90625
480
0.665518
2,171
13,053
3.999539
0.016582
0.332604
0.46712
0.61177
0.974778
0.967408
0.967408
0.966486
0.962801
0.962801
0
0.524871
0.168314
13,053
31
481
421.064516
0.274963
0
0
0
0
0
0
0
0
0
0.661917
0
0
1
0
false
0
0.032258
0
0.032258
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
13
7a48747bf8ee04c027cf150a72f35a2d8fdba437
6,803
py
Python
ZoomAutomationBot.py
erknabd/zoomautomation
8cabf302a701ebaf6d6dbacc549053fb1d309c38
[ "MIT" ]
8
2021-04-06T09:07:20.000Z
2021-05-09T14:47:44.000Z
ZoomAutomationBot.py
erknabd/zoomautomation
8cabf302a701ebaf6d6dbacc549053fb1d309c38
[ "MIT" ]
null
null
null
ZoomAutomationBot.py
erknabd/zoomautomation
8cabf302a701ebaf6d6dbacc549053fb1d309c38
[ "MIT" ]
3
2021-05-01T10:48:04.000Z
2021-05-09T14:47:46.000Z
from selenium import webdriver import time import keyboard import datetime x = datetime.datetime.now() # Change <BROWSER NAME> according to your browser driver_path = r"Your_Driver_Path" browser = webdriver.<BROWSER NAME>(executable_path=driver_path) # Days (Not change) day1 = "Monday" day2 = "Tuesday" day3 = "Wednesday" day4 = "Thursday" day5 = "Friday" # Lesson Times (You can Add or Remove according to your lessons) lesson1 = "xx:xx:xx" lesson2 = "xx:xx:xx" lesson3 = "xx:xx:xx" lesson4 = "xx:xx:xx" lesson5 = "xx:xx:xx" lesson6 = "xx:xx:xx" lesson7 = "xx:xx:xx" lesson8 = "xx:xx:xx" # Lesson Names and Links (You can Add or Remove according to your lessons) lesname1 = ("Zoom-link") lesname2 = ("Zoom-link") lesname3 = ("Zoom-link") lesname4 = ("Zoom-link") lesname5 = ("Zoom-link") lesname6 = ("Zoom-link") lesname7 = ("Zoom-link") lesname8 = ("Zoom-link") def open_lesson(): time.sleep(2) keyboard.press_and_release('esc') time.sleep(8) log_in = browser.find_element_by_xpath("//*[@id='zoom-ui-frame']/div[2]/div/div[1]/div/div") log_in.click() time.sleep(1) keyboard.press_and_release('left') keyboard.press_and_release('enter') time.sleep(8) browser.close() # Customize "lesnameX" according to your lesson time table while True: an = datetime.datetime.now() hour = datetime.datetime.strftime(an, '%X') if hour == lesson1 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson2 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson3 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson4 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson5 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson6 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson7 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson8 and day1 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson1 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson2 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson3 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson4 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson5 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson6 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson7 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson8 and day2 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson1 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson2 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson3 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson4 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson5 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson6 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson7 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson8 and day3 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson1 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson2 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson3 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson4 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson5 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson6 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson7 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson8 and day4 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson1 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson2 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson3 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson4 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson5 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson6 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson7 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break elif hour == lesson8 and day5 == x.strftime("%A"): browser.get(lesnameX) open_lesson() break else: pass
26.574219
100
0.52859
763
6,803
4.63827
0.129751
0.115852
0.113026
0.192145
0.752472
0.752472
0.752472
0.752472
0.752472
0.730432
0
0.024061
0.346318
6,803
255
101
26.678431
0.771756
0.038071
0
0.598039
0
0.004902
0.05078
0.007648
0
0
0
0
0
0
null
null
0.004902
0.019608
null
null
0
0
0
0
null
0
0
1
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
7
7a8c9c94c6651995637d57d3b38791a590b511d9
29,049
py
Python
tests/dhcpv6/kea_only/host_reservation/test_host_reservation_options.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
22
2015-02-27T11:51:05.000Z
2022-02-28T12:39:29.000Z
tests/dhcpv6/kea_only/host_reservation/test_host_reservation_options.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
16
2018-10-30T15:00:12.000Z
2019-01-11T17:55:13.000Z
tests/dhcpv6/kea_only/host_reservation/test_host_reservation_options.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
11
2015-02-27T11:51:36.000Z
2021-03-30T08:33:54.000Z
"""Host Reservation including options DHCPv6 stored in MySQL database""" # pylint: disable=invalid-name,line-too-long import pytest import srv_control import misc import srv_msg @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_mysql_duid_ll_matching_option(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('MySQL') srv_control.new_db_backend_reservation('MySQL', 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'MySQL', 1) srv_control.ipv6_address_db_backend_reservation('3000::100', '$(EMPTY)', 'MySQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) srv_control.upload_db_reservation('MySQL') srv_control.config_srv('preference', 0, '123') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100') srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:21') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 123) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_mysql_duid_ll_matching_option_no_address_1(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('MySQL') srv_control.new_db_backend_reservation('MySQL', 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'MySQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) srv_control.upload_db_reservation('MySQL') srv_control.config_srv('preference', 0, '123') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100', expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:21') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 123) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_mysql_duid_ll_matching_option_no_address_2(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('MySQL') srv_control.new_db_backend_reservation('MySQL', 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'MySQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) srv_control.upload_db_reservation('MySQL') srv_control.config_srv('preference', 0, '123') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100', expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3, expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:21') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 123) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_mysql_duid_ll_matching_option_inforequest(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('MySQL') srv_control.new_db_backend_reservation('MySQL', 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'MySQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) srv_control.upload_db_reservation('MySQL') srv_control.config_srv('preference', 0, '123') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_send_msg('INFOREQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3, expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 123) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3, expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:21') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 123) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_mysql_option_multiple(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('MySQL') srv_control.new_db_backend_reservation('MySQL', 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'MySQL', 1) srv_control.ipv6_address_db_backend_reservation('3000::100', '$(EMPTY)', 'MySQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) srv_control.option_db_record_reservation(21, 'srv1.example.com,srv2.isc.org', 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) srv_control.option_db_record_reservation(23, '2001:db8::1,2001:db8::2', 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) srv_control.option_db_record_reservation(59, 'http://www.kea-reserved.isc.org', 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'MySQL', 1) # Add option reservation code 60 value 10 space dhcp6 persistent 1 client class $(EMPTY) subnet id 1 and scope subnet to MySQL record id 1. srv_control.upload_db_reservation('MySQL') srv_control.config_srv('preference', 0, '123') srv_control.config_srv_opt('sip-server-dns', 'srv4.example.com,srv5.isc.org') # 21 srv_control.config_srv_opt('dns-servers', '2001:db8::4,2001:db8::5') # 23 srv_control.config_srv_opt('bootfile-url', 'http://www.kea.isc.org') # 59 srv_control.config_srv_opt('bootfile-param', '000B48656C6C6F20776F726C640003666F6F') # 60 srv_control.config_srv_opt('new-tzdb-timezone', 'Europe/Zurich') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_requests_option(21) srv_msg.client_requests_option(23) srv_msg.client_requests_option(42) srv_msg.client_requests_option(59) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100') srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) srv_msg.response_check_include_option(59) srv_msg.response_check_option_content(59, 'optdata', 'http://www.kea-reserved.isc.org') srv_msg.response_check_include_option(21) srv_msg.response_check_option_content(21, 'addr', 'srv1.example.com.,srv2.isc.org.') srv_msg.response_check_include_option(23) srv_msg.response_check_option_content(23, 'addr', '2001:db8::1,2001:db8::2') srv_msg.response_check_include_option(42) srv_msg.response_check_option_content(42, 'optdata', 'Europe/Zurich') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:21') srv_msg.client_requests_option(7) srv_msg.client_requests_option(21) srv_msg.client_requests_option(42) srv_msg.client_requests_option(23) srv_msg.client_requests_option(59) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 123) srv_msg.response_check_include_option(59) srv_msg.response_check_option_content(59, 'optdata', 'http://www.kea.isc.org') srv_msg.response_check_include_option(21) srv_msg.response_check_option_content(21, 'addr', 'srv4.example.com.,srv5.isc.org.') srv_msg.response_check_include_option(23) srv_msg.response_check_option_content(23, 'addr', '2001:db8::4,2001:db8::5') srv_msg.response_check_include_option(42) srv_msg.response_check_option_content(42, 'optdata', 'Europe/Zurich') @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_pgsql_hwaddrr_matching_option(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('PostgreSQL') srv_control.new_db_backend_reservation('PostgreSQL', 'hw-address', 'f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'PostgreSQL', 1) srv_control.ipv6_address_db_backend_reservation('3000::100', '$(EMPTY)', 'PostgreSQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'PostgreSQL', 1) srv_control.upload_db_reservation('PostgreSQL') srv_control.config_srv_opt('preference', '12') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) # Response sub-option 5 from option 3 MUST contain address 3000::100. srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:22') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) # Response sub-option 5 from option 3 MUST contain address 3000::100. srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 12) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_pgsql_hwaddrr_matching_option_no_address(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('PostgreSQL') srv_control.new_db_backend_reservation('PostgreSQL', 'hw-address', 'f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'PostgreSQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'PostgreSQL', 1) srv_control.upload_db_reservation('PostgreSQL') srv_control.config_srv_opt('preference', '12') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3, expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:22') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3, expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 12) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_pgsql_hwaddrr_matching_option_inforequest(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('PostgreSQL') srv_control.new_db_backend_reservation('PostgreSQL', 'hw-address', 'f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'PostgreSQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'PostgreSQL', 1) srv_control.upload_db_reservation('PostgreSQL') srv_control.config_srv_opt('preference', '12') srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_send_msg('INFOREQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'REPLY') srv_msg.response_check_include_option(3, expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 12) misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:01:00:01:52:7b:a8:f0:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3, expect_include=False) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) @pytest.mark.v6 @pytest.mark.host_reservation @pytest.mark.kea_only @pytest.mark.reserved_options def test_v6_host_reservation_pgsql_option_multiple(): misc.test_setup() srv_control.config_srv_subnet('3000::/64', '3000::1-3000::ff') srv_control.enable_db_backend_reservation('PostgreSQL') srv_control.new_db_backend_reservation('PostgreSQL', 'duid', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_control.update_db_backend_reservation('dhcp6_subnet_id', 1, 'PostgreSQL', 1) srv_control.ipv6_address_db_backend_reservation('3000::100', '$(EMPTY)', 'PostgreSQL', 1) srv_control.option_db_record_reservation(7, 10, 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'PostgreSQL', 1) srv_control.option_db_record_reservation(21, 'srv1.example.com,srv2.isc.org', 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'PostgreSQL', 1) srv_control.option_db_record_reservation(23, '2001:db8::1,2001:db8::2', 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'PostgreSQL', 1) srv_control.option_db_record_reservation(59, 'http://www.kea-reserved.isc.org', 'dhcp6', 1, '$(EMPTY)', 1, 'subnet', 'PostgreSQL', 1) # Add option reservation code 60 value 10 space dhcp6 persistent 1 client class $(EMPTY) subnet id 1 and scope subnet to MySQL record id 1. srv_control.upload_db_reservation('PostgreSQL') srv_control.config_srv('preference', 0, '123') srv_control.config_srv_opt('sip-server-dns', 'srv4.example.com,srv5.isc.org') # 21 srv_control.config_srv_opt('dns-servers', '2001:db8::4,2001:db8::5') # 23 srv_control.config_srv_opt('bootfile-url', 'http://www.kea.isc.org') # 59 srv_control.config_srv_opt('new-tzdb-timezone', 'Europe/Zurich') # 60 and not reserved srv_control.build_and_send_config_files() srv_control.start_srv('DHCP', 'started') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:01') srv_msg.client_requests_option(7) srv_msg.client_requests_option(21) srv_msg.client_requests_option(23) srv_msg.client_requests_option(42) srv_msg.client_requests_option(59) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_suboption_content(5, 3, 'addr', '3000::100') srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 10) srv_msg.response_check_include_option(59) srv_msg.response_check_option_content(59, 'optdata', 'http://www.kea-reserved.isc.org') srv_msg.response_check_include_option(21) srv_msg.response_check_option_content(21, 'addr', 'srv1.example.com.,srv2.isc.org.') srv_msg.response_check_include_option(23) srv_msg.response_check_option_content(23, 'addr', '2001:db8::1,2001:db8::2') srv_msg.response_check_include_option(42) srv_msg.response_check_option_content(42, 'optdata', 'Europe/Zurich') misc.test_procedure() srv_msg.client_sets_value('Client', 'DUID', '00:03:00:01:f6:f5:f4:f3:f2:21') srv_msg.client_requests_option(7) srv_msg.client_requests_option(21) srv_msg.client_requests_option(23) srv_msg.client_requests_option(59) srv_msg.client_requests_option(42) srv_msg.client_does_include('Client', 'client-id') srv_msg.client_does_include('Client', 'IA-NA') srv_msg.client_send_msg('SOLICIT') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', 'ADVERTISE') srv_msg.response_check_include_option(3) srv_msg.response_check_option_content(3, 'sub-option', 5) srv_msg.response_check_include_option(7) srv_msg.response_check_option_content(7, 'value', 123) srv_msg.response_check_include_option(59) srv_msg.response_check_option_content(59, 'optdata', 'http://www.kea.isc.org') srv_msg.response_check_include_option(21) srv_msg.response_check_option_content(21, 'addr', 'srv4.example.com.,srv5.isc.org.') srv_msg.response_check_include_option(23) srv_msg.response_check_option_content(23, 'addr', '2001:db8::4,2001:db8::5') srv_msg.response_check_include_option(42) srv_msg.response_check_option_content(42, 'optdata', 'Europe/Zurich')
44.967492
143
0.607491
3,642
29,049
4.468149
0.043108
0.087753
0.094635
0.128434
0.986911
0.986911
0.986419
0.986419
0.986419
0.984514
0
0.060154
0.277221
29,049
645
144
45.037209
0.714898
0.019381
0
0.972973
0
0.007207
0.158107
0.04433
0
0
0
0
0
1
0.016216
true
0.036036
0.007207
0
0.023423
0
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
0
8
7abf36ea4f38922fa45728a3faa8a950ab5ed54b
1,124
py
Python
allure-pytest-bdd/test/labels_tests/labels_test.py
Duisus/allure-python
09402db43da00bb3edb59767d5cc3826457c3f1a
[ "Apache-2.0" ]
1
2021-01-08T12:52:32.000Z
2021-01-08T12:52:32.000Z
allure-pytest-bdd/test/labels_tests/labels_test.py
Duisus/allure-python
09402db43da00bb3edb59767d5cc3826457c3f1a
[ "Apache-2.0" ]
null
null
null
allure-pytest-bdd/test/labels_tests/labels_test.py
Duisus/allure-python
09402db43da00bb3edb59767d5cc3826457c3f1a
[ "Apache-2.0" ]
null
null
null
from pytest_bdd import scenario @scenario("labels_features\\tag_in_gherkin_or_scenario.feature", "Tag in gherkin") def test_tag_in_gherkin(): pass @scenario("labels_features\\tag_in_gherkin_or_scenario.feature", "Tag in scenario") def test_tag_in_scenario(): pass @scenario("labels_features\\tags_in_gherkin_and_scenario.feature", "Different tag in gherkin and scenario") def test_different_tags(): pass @scenario("labels_features\\tags_in_gherkin_and_scenario.feature", "Same tag in gherkin and scenario") def test_same_tags(): pass @scenario("labels_features\\many_tags.feature", "Many tags in gherkin") def test_many_tags_in_gherkin(): pass @scenario("labels_features\\many_tags.feature", "Many tags in scenario") def test_many_tags_in_scenario(): pass @scenario("labels_features\\many_tags.feature", "Many tags in gherkin and scenario") def test_many_tags_in_gherkin_and_scenario(): pass @scenario("labels_features\\tags_in_feature.feature", "Tag in feature") def test_tag_in_feature(): pass
22.48
66
0.72331
152
1,124
4.973684
0.131579
0.142857
0.232804
0.240741
0.818783
0.808201
0.662698
0.519841
0.519841
0.519841
0
0
0.177046
1,124
49
67
22.938776
0.817297
0
0
0.454545
0
0
0.476868
0.311388
0
0
0
0
0
1
0.242424
true
0.242424
0.030303
0
0.272727
0
0
0
0
null
0
1
1
1
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
1
1
0
0
0
0
0
7
8fa6feae0823b64c0a81d995dc720ff4145a63c9
181
py
Python
python-algorithm/leetcode/problem_420.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
5
2017-06-11T09:19:34.000Z
2019-01-16T16:58:31.000Z
python-algorithm/leetcode/problem_420.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
null
null
null
python-algorithm/leetcode/problem_420.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
1
2019-03-02T15:50:43.000Z
2019-03-02T15:50:43.000Z
"""420. Strong Password Checker https://leetcode.com/problems/strong-password-checker/ """ class Solution: def strongPasswordChecker(self, password: str) -> int: pass
20.111111
58
0.707182
20
181
6.4
0.8
0.21875
0.328125
0
0
0
0
0
0
0
0
0.019737
0.160221
181
8
59
22.625
0.822368
0.458564
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.666667
0
0
0.666667
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
1
0
0
1
0
0
7
8fb49052501691edecf908352b1f526fc1e01552
84
py
Python
tests/import/import2a.py
sebastien-riou/micropython
116c15842fd48ddb77b0bc016341d936a0756573
[ "MIT" ]
13,648
2015-01-01T01:34:51.000Z
2022-03-31T16:19:53.000Z
tests/import/import2a.py
sebastien-riou/micropython
116c15842fd48ddb77b0bc016341d936a0756573
[ "MIT" ]
7,092
2015-01-01T07:59:11.000Z
2022-03-31T23:52:18.000Z
tests/import/import2a.py
sebastien-riou/micropython
116c15842fd48ddb77b0bc016341d936a0756573
[ "MIT" ]
4,942
2015-01-02T11:48:50.000Z
2022-03-31T19:57:10.000Z
from import1b import var print(var) from import1b import var as var2 print(var2)
10.5
32
0.77381
14
84
4.642857
0.5
0.369231
0.553846
0.646154
0
0
0
0
0
0
0
0.057971
0.178571
84
7
33
12
0.884058
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
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
8
64e09fe575fbf8ffa09aed5720f2ecab5d2695f9
224
py
Python
iceworm/utils/__init__.py
wrmsr0/iceworm
09431bb3cdc4f6796aafca41e37d42ebe0ddfeef
[ "BSD-3-Clause" ]
null
null
null
iceworm/utils/__init__.py
wrmsr0/iceworm
09431bb3cdc4f6796aafca41e37d42ebe0ddfeef
[ "BSD-3-Clause" ]
1
2021-01-19T14:29:19.000Z
2021-01-19T14:34:27.000Z
iceworm/utils/__init__.py
wrmsr0/iceworm
09431bb3cdc4f6796aafca41e37d42ebe0ddfeef
[ "BSD-3-Clause" ]
1
2020-12-31T22:29:52.000Z
2020-12-31T22:29:52.000Z
from . import inject # noqa from . import secrets # noqa from .utils import ReprFn # noqa from .utils import build_dc_repr # noqa from .utils import build_enum_value_map # noqa from .utils import memoized_unary # noqa
32
47
0.758929
34
224
4.823529
0.441176
0.243902
0.317073
0.463415
0.292683
0
0
0
0
0
0
0
0.1875
224
6
48
37.333333
0.901099
0.129464
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
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
7
a4393decb6a90e2a2ecf41eaa9d4818fa703d896
48,596
py
Python
lammps_interface/mof_sbus.py
zmzeng/lammps_interface
07da45c444cadcab06683f3fea0fe4a781377365
[ "MIT" ]
74
2016-10-19T23:42:21.000Z
2022-03-31T08:05:54.000Z
lammps_interface/mof_sbus.py
zmzeng/lammps_interface
07da45c444cadcab06683f3fea0fe4a781377365
[ "MIT" ]
44
2017-01-22T02:25:12.000Z
2021-12-08T03:25:51.000Z
lammps_interface/mof_sbus.py
mwitman1/lammps_interface
4ebea5493df9e7f2381b7cad3cd5b6b2ae698a27
[ "MIT" ]
46
2016-08-10T09:22:41.000Z
2022-03-01T03:33:14.000Z
""" MOF sbus. """ import networkx as nx import numpy as np from scipy.spatial import distance def add_distance_matrix(graph): carts = [] if(float('.'.join(nx.__version__.split('.')[:2])) >= 2.0): for j, data in sorted(list(graph.nodes(data=True))): carts.append(data['cartesian_coordinates']) else: for j, data in sorted(graph.nodes_iter(data=True)): carts.append(data['cartesian_coordinates']) carts = np.array(carts) graph.distance_matrix = distance.cdist(carts, carts) InorganicCluster = { 'Cu':{'Cu Paddlewheel': nx.Graph(name='Cu Paddlewheel') # taken from doi: 10.1126/science.283.5405.1148 }, 'Zn':{'Zn4O': nx.Graph(name='Zn4O'), # taken from doi: 'Zn Paddlewheel': nx.Graph(name='Zn Paddlewheel'), # taken from doi: 'Kuratowski': nx.Graph(name='Kuratowski')}, 'Zr':{'Zr_UiO': nx.Graph(name='Zr_UiO') # taken from doi: }, 'Cr':{'Cr_tri': nx.Graph(name='Cr_tri') # taken from doi: }, 'V':{'V_pillar': nx.Graph(name='V_pillar') # taken from doi: }, 'Al':{'Al_pillar': nx.Graph(name='Al_pillar') # taken from doi: } } OrganicCluster = { 'N':{'Thymine': nx.Graph(name='Thymine'), 'Adenine': nx.Graph(name='Adenine'), 'CarboxylateImidazolate': nx.Graph(name='CarboxylateImidazolate')}, 'C':{'Benzene-2C': nx.Graph(name='Benzene-2C'), 'Biphenyl-2C': nx.Graph(name='Biphenyl-2C'), 'Triphenyl-2C': nx.Graph(name='Triphenyl-2C') } } # add entry InorganicCluster['Cu']['Cu Paddlewheel'].add_nodes_from([ (1, {'element':'O', 'special_flag': 'O1_Cu_pdw', 'cartesian_coordinates':np.array([1.755, -0.181, -1.376]) } ), (2, {'element':'O', 'special_flag': 'O2_Cu_pdw', 'cartesian_coordinates':np.array([-1.755, 0.181, -1.376]) } ), (3, {'element':'O', 'special_flag': 'O1_Cu_pdw', 'cartesian_coordinates':np.array([-0.181, 1.755, 1.376]) } ), (4, {'element':'O', 'special_flag':'O2_Cu_pdw', 'cartesian_coordinates':np.array([0.181, -1.755, 1.376]) } ), (5, {'element':'O', 'special_flag':'O1_Cu_pdw', 'cartesian_coordinates':np.array([-1.755, 0.181, 1.376]) } ), (6, {'element':'O', 'special_flag':'O2_Cu_pdw', 'cartesian_coordinates':np.array([1.755, -0.181, 1.376]) } ), (7, {'element':'O', 'special_flag':'O1_Cu_pdw', 'cartesian_coordinates':np.array([0.181, -1.755, -1.376]) } ), (8, {'element':'O', 'special_flag':'O2_Cu_pdw', 'cartesian_coordinates':np.array([-0.181, 1.755, -1.376]) } ), (9, {'element':'Cu', 'special_flag':'Cu_pdw', 'cartesian_coordinates':np.array([0.929, 0.929, 0.000]) } ), (10, {'element':'Cu', 'special_flag':'Cu_pdw', 'cartesian_coordinates':np.array([-0.929, -0.929, 0.000]) } ), (11, {'element':'C', 'special_flag':'C_Cu_pdw', 'cartesian_coordinates':np.array([1.233, -1.233, -1.810]) } ), (12, {'element':'C', 'special_flag':'C_Cu_pdw', 'cartesian_coordinates':np.array([-1.233, 1.233, -1.810]) } ), (13, {'element':'C', 'special_flag':'C_Cu_pdw', 'cartesian_coordinates':np.array([-1.233, 1.233, 1.810]) } ), (14, {'element':'C', 'special_flag':'C_Cu_pdw', 'cartesian_coordinates':np.array([1.233, -1.233, 1.810]) } ) ]) InorganicCluster['Zn']['Zn Paddlewheel'].add_nodes_from([ (1, {'element':'O', 'special_flag': 'O1_Zn_pdw', 'cartesian_coordinates':np.array([-1.398, -1.339, 1.417]) } ), (2, {'element':'O', 'special_flag': 'O2_Zn_pdw', 'cartesian_coordinates':np.array([-1.398, 0.853, -1.417]) } ), (3, {'element':'O', 'special_flag': 'O1_Zn_pdw', 'cartesian_coordinates':np.array([-1.398, 0.853, 1.417]) } ), (4, {'element':'O', 'special_flag':'O2_Zn_pdw', 'cartesian_coordinates':np.array([-1.398, -1.339, -1.417]) } ), (5, {'element':'O', 'special_flag':'O1_Zn_pdw', 'cartesian_coordinates':np.array([1.398, -1.339, -1.417]) } ), (6, {'element':'O', 'special_flag':'O2_Zn_pdw', 'cartesian_coordinates':np.array([1.398, 0.853, 1.417]) } ), (7, {'element':'O', 'special_flag':'O1_Zn_pdw', 'cartesian_coordinates':np.array([1.398, 0.853, -1.417]) } ), (8, {'element':'O', 'special_flag':'O2_Zn_pdw', 'cartesian_coordinates':np.array([1.398, -1.339, 1.417]) } ), (9, {'element':'Zn', 'special_flag':'Zn_pdw', 'cartesian_coordinates':np.array([0.000, -1.717, 0.000]) } ), (10, {'element':'Zn', 'special_flag':'Zn_pdw', 'cartesian_coordinates':np.array([0.000, 1.230, 0.000]) } ), (11, {'element':'C', 'special_flag':'C_Zn_pdw', 'cartesian_coordinates':np.array([-1.761, -0.243, 1.837]) } ), (12, {'element':'C', 'special_flag':'C_Zn_pdw', 'cartesian_coordinates':np.array([-1.761, -0.243, -1.837]) } ), (13, {'element':'C', 'special_flag':'C_Zn_pdw', 'cartesian_coordinates':np.array([1.761, -0.243, 1.837]) } ), (14, {'element':'C', 'special_flag':'C_Zn_pdw', 'cartesian_coordinates':np.array([1.761, -0.243, -1.837]) } ) ]) InorganicCluster['Zn']['Zn4O'].add_nodes_from([ (1, {'element':'Zn', 'special_flag':'Zn4O', 'cartesian_coordinates':np.array([-1.063000,-1.063000,-1.174000]) } ), (2, {'element':'Zn', 'special_flag':'Zn4O', 'cartesian_coordinates':np.array([-1.062000,1.179000,1.067000]) } ), (3, {'element':'Zn', 'special_flag':'Zn4O', 'cartesian_coordinates':np.array([1.179000,-1.063000,1.067000]) } ), (4, {'element':'Zn', 'special_flag':'Zn4O', 'cartesian_coordinates':np.array([1.179000,1.178000,-1.175000]) } ), (5, {'element':'O', 'special_flag':'O_z_Zn4O', 'cartesian_coordinates':np.array([0.058000,0.058000,-0.054000]) } ), (6, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([-2.939000,-0.765000,-0.876000]) } ), (7, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([-0.764000,0.883000,2.943000]) } ), (8, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([0.881000,-2.938000,0.770000]) } ), (9, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([-2.938000,0.883000,0.770000]) } ), (10, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([-0.767000,-2.938000,-0.876000]) } ), (11, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([0.882000,-0.764000,2.943000]) } ), (12, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([3.055000,-0.766000,0.769000]) } ), (13, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([0.881000,0.880000,-3.051000]) } ), (14, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([3.055000,0.880000,-0.878000]) } ), (15, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([-0.766000,-0.766000,-3.050000]) } ), (16, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([-0.764000,3.055000,0.769000]) } ), (17, {'element':'O', 'special_flag':'O_c_Zn4O', 'cartesian_coordinates':np.array([0.882000,3.054000,-0.879000]) } ), (18, {'element':'C', 'special_flag':'C_Zn4O', 'cartesian_coordinates':np.array([3.541000,0.057000,-0.055000]) } ), (19, {'element':'C', 'special_flag':'C_Zn4O', 'cartesian_coordinates':np.array([0.059000,3.541000,-0.055000]) } ), (20, {'element':'C', 'special_flag':'C_Zn4O', 'cartesian_coordinates':np.array([0.057000,0.057000,-3.550000]) } ), (21, {'element':'C', 'special_flag':'C_Zn4O', 'cartesian_coordinates':np.array([-3.438000,0.059000,-0.053000]) } ), (22, {'element':'C', 'special_flag':'C_Zn4O', 'cartesian_coordinates':np.array([0.057000,-3.438000,-0.053000]) } ), (23, {'element':'C', 'special_flag':'C_Zn4O', 'cartesian_coordinates':np.array([0.058000,0.058000,3.429000]) } ) ]) InorganicCluster['Zn']['Kuratowski'].add_nodes_from([ (1, {'element':'Zn', 'special_flag':'Zn_tet', 'cartesian_coordinates':np.array([2.079000,2.079000,-2.079000]) } ), (2, {'element':'Cl', 'special_flag':'Cl_kuratowski', 'cartesian_coordinates':np.array([3.295000,3.295000,-3.295000]) } ), (3, {'element':'Zn', 'special_flag':'Zn_tet', 'cartesian_coordinates':np.array([-2.079000,2.079000,2.079000]) } ), (4, {'element':'Cl', 'special_flag':'Cl_kuratowski', 'cartesian_coordinates':np.array([-3.295000,3.295000,3.295000]) } ), (5, {'element':'Zn', 'special_flag':'Zn_tet', 'cartesian_coordinates':np.array([2.079000,-2.079000,2.079000]) } ), (6, {'element':'Cl', 'special_flag':'Cl_kuratowski', 'cartesian_coordinates':np.array([3.295000,-3.295000,3.295000]) } ), (7, {'element':'Zn', 'special_flag':'Zn_tet', 'cartesian_coordinates':np.array([-2.079000,-2.079000,-2.079000]) } ), (8, {'element':'Cl', 'special_flag':'Cl_kuratowski', 'cartesian_coordinates':np.array([-3.295000,-3.295000,-3.295000]) } ), (9, {'element':'Zn', 'special_flag':'Zn_oct', 'cartesian_coordinates':np.array([-0.000000,-0.000000,-0.000000]) } ), (10, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([2.946000,0.770000,-0.770000]) } ), (11, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([4.261000,-0.493000,0.493000]) } ), (12, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([-0.770000,2.946000,0.770000]) } ), (13, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([0.493000,4.261000,-0.493000]) } ), (14, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([0.770000,-0.770000,2.946000]) } ), (15, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([-0.493000,0.493000,4.261000]) } ), (16, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([0.770000,2.946000,-0.770000]) } ), (17, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([-0.493000,4.261000,0.493000]) } ), (18, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([2.946000,-0.770000,0.770000]) } ), (19, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([4.261000,0.493000,-0.493000]) } ), (20, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([-0.770000,0.770000,2.946000]) } ), (21, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([0.493000,-0.493000,4.261000]) } ), (22, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([-0.770000,-2.946000,-0.770000]) } ), (23, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([0.493000,-4.261000,0.493000]) } ), (24, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([0.770000,0.770000,-2.946000]) } ), (25, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([-0.493000,-0.493000,-4.261000]) } ), (26, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([0.770000,-2.946000,0.770000]) } ), (27, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([-0.493000,-4.261000,-0.493000]) } ), (28, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([-0.770000,-0.770000,-2.946000]) } ), (29, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([0.493000,0.493000,-4.261000]) } ), (30, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([-2.946000,0.770000,0.770000]) } ), (31, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([-4.261000,-0.493000,-0.493000]) } ), (32, {'element':'N', 'special_flag':'N_tet', 'cartesian_coordinates':np.array([-2.946000,-0.770000,-0.770000]) } ), (33, {'element':'C', 'special_flag':'C_kuratowski', 'cartesian_coordinates':np.array([-4.261000,0.493000,0.493000]) } ), (34, {'element':'N', 'special_flag':'N_oct', 'cartesian_coordinates':np.array([2.211000,-0.000000,-0.000000]) } ), (35, {'element':'N', 'special_flag':'N_oct', 'cartesian_coordinates':np.array([-0.000000,2.211000,-0.000000]) } ), (36, {'element':'N', 'special_flag':'N_oct', 'cartesian_coordinates':np.array([-0.000000,-0.000000,2.211000]) } ), (37, {'element':'N', 'special_flag':'N_oct', 'cartesian_coordinates':np.array([-0.000000,-2.211000,-0.000000]) } ), (38, {'element':'N', 'special_flag':'N_oct', 'cartesian_coordinates':np.array([-0.000000,-0.000000,-2.211000]) } ), (39, {'element':'N', 'special_flag':'N_oct', 'cartesian_coordinates':np.array([-2.211000,-0.000000,-0.000000]) } ) ]) InorganicCluster['Zr']['Zr_UiO'].add_nodes_from([ (1, {'element':'Zr', 'special_flag':'Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-2.521000,0.000000]) } ), (2, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([1.973000,-3.568000,0.000000]) } ), (3, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-1.973000,-3.568000,0.000000]) } ), (4, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-2.012000,-3.529000]) } ), (5, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-2.012000,3.529000]) } ), (6, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-3.568000,-1.973000]) } ), (7, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-3.568000,1.973000]) } ), (8, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-3.529000,-2.012000,0.000000]) } ), (9, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([3.529000,-2.012000,0.000000]) } ), (10, {'element':'O', 'special_flag':'O_h_Zr_UiO', 'cartesian_coordinates':np.array([1.161000,-1.200000,-1.161000]) } ), (11, {'element':'O', 'special_flag':'O_h_Zr_UiO', 'cartesian_coordinates':np.array([-1.161000,-1.200000,1.161000]) } ), (12, {'element':'O', 'special_flag':'O_z_Zr_UiO', 'cartesian_coordinates':np.array([1.161000,-1.200000,1.161000]) } ), (13, {'element':'O', 'special_flag':'O_z_Zr_UiO', 'cartesian_coordinates':np.array([-1.161000,-1.200000,-1.161000]) } ), (14, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-3.180000,-3.219000,0.000000]) } ), (15, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([3.180000,-3.219000,0.000000]) } ), (16, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-3.219000,3.180000]) } ), (17, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-3.219000,-3.180000]) } ), (18, {'element':'Zr', 'special_flag':'Zr_UiO', 'cartesian_coordinates':np.array([2.482000,-0.039000,0.000000]) } ), (19, {'element':'Zr', 'special_flag':'Zr_UiO', 'cartesian_coordinates':np.array([-2.482000,-0.039000,0.000000]) } ), (20, {'element':'Zr', 'special_flag':'Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,2.443000,0.000000]) } ), (21, {'element':'Zr', 'special_flag':'Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-0.039000,2.482000]) } ), (22, {'element':'Zr', 'special_flag':'Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,-0.039000,-2.482000]) } ), (23, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([3.529000,-0.039000,1.973000]) } ), (24, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-3.529000,-0.039000,1.973000]) } ), (25, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-3.529000,-0.039000,-1.973000]) } ), (26, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([3.529000,-0.039000,-1.973000]) } ), (27, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([1.973000,3.490000,0.000000]) } ), (28, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-1.973000,3.490000,0.000000]) } ), (29, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,1.934000,3.529000]) } ), (30, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,1.934000,-3.529000]) } ), (31, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,3.490000,-1.973000]) } ), (32, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,3.490000,1.973000]) } ), (33, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([3.529000,1.934000,0.000000]) } ), (34, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-3.529000,1.934000,0.000000]) } ), (35, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([1.973000,-0.039000,-3.529000]) } ), (36, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([1.973000,-0.039000,3.529000]) } ), (37, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-1.973000,-0.039000,3.529000]) } ), (38, {'element':'O', 'special_flag':'O_c_Zr_UiO', 'cartesian_coordinates':np.array([-1.973000,-0.039000,-3.529000]) } ), (39, {'element':'O', 'special_flag':'O_h_Zr_UiO', 'cartesian_coordinates':np.array([-1.161000,1.122000,-1.161000]) } ), (40, {'element':'O', 'special_flag':'O_h_Zr_UiO', 'cartesian_coordinates':np.array([1.161000,1.122000,1.161000]) } ), (41, {'element':'O', 'special_flag':'O_z_Zr_UiO', 'cartesian_coordinates':np.array([-1.161000,1.122000,1.161000]) } ), (42, {'element':'O', 'special_flag':'O_z_Zr_UiO', 'cartesian_coordinates':np.array([1.161000,1.122000,-1.161000]) } ), (43, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([3.180000,-0.039000,-3.180000]) } ), (44, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-3.180000,-0.039000,-3.180000]) } ), (45, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-3.180000,-0.039000,3.180000]) } ), (46, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([3.180000,-0.039000,3.180000]) } ), (47, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-3.180000,3.141000,0.000000]) } ), (48, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([3.180000,3.141000,0.000000]) } ), (49, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,3.141000,-3.180000]) } ), (50, {'element':'C', 'special_flag':'C_Zr_UiO', 'cartesian_coordinates':np.array([-0.000000,3.141000,3.180000]) } ), (51, {'element':'H', 'special_flag':'H_o_Zr_UiO', 'cartesian_coordinates':np.array([1.881000,1.801000,1.666000]) } ), (52, {'element':'H', 'special_flag':'H_o_Zr_UiO', 'cartesian_coordinates':np.array([-1.832000,-1.884000,1.722000]) } ), (53, {'element':'H', 'special_flag':'H_o_Zr_UiO', 'cartesian_coordinates':np.array([-1.838000,1.795000,-1.728000]) } ), (54, {'element':'H', 'special_flag':'H_o_Zr_UiO', 'cartesian_coordinates':np.array([1.871000,-1.866000,-1.695000]) } ) ]) InorganicCluster['Cr']['Cr_tri'].add_nodes_from([ (1, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([2.267000,-1.345000,1.482000]) } ), (2, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([-0.321000,-2.272000,1.374000]) } ), (3, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([-1.353000,-2.006000,2.059000]) } ), (4, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([-2.299000,-1.290000,1.482000]) } ), (5, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([-1.808000,1.414000,1.374000]) } ), (6, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([-1.061000,2.175000,2.059000]) } ), (7, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([0.032000,2.636000,1.482000]) } ), (8, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([2.128000,0.859000,1.374000]) } ), (9, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([2.414000,-0.169000,2.059000]) } ), (10, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([2.267000,-1.345000,-1.477000]) } ), (11, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([-0.321000,-2.272000,-1.369000]) } ), (12, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([-1.353000,-2.006000,-2.054000]) } ), (13, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([-2.299000,-1.290000,-1.477000]) } ), (14, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([-1.808000,1.414000,-1.369000]) } ), (15, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([-1.061000,2.175000,-2.054000]) } ), (16, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([0.032000,2.636000,-1.477000]) } ), (17, {'element':'O', 'special_flag':'O', 'cartesian_coordinates':np.array([2.128000,0.859000,-1.369000]) } ), (18, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([2.414000,-0.169000,-2.054000]) } ), (19, {'element':'Cr', 'special_flag':'Cr_tri', 'cartesian_coordinates':np.array([0.918000,-1.740000,0.002000]) } ), (20, {'element':'Cr', 'special_flag':'Cr_tri', 'cartesian_coordinates':np.array([-1.966000,0.075000,0.002000]) } ), (21, {'element':'Cr', 'special_flag':'Cr_tri', 'cartesian_coordinates':np.array([1.048000,1.665000,0.002000]) } ), (22, {'element':'O', 'special_flag':'O_z_Cr_tri', 'cartesian_coordinates':np.array([0.000000,0.000000,0.002000]) } ) ]) InorganicCluster['V']['V_pillar'].add_nodes_from([ (1, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([-3.335000,1.411000,1.192000]) } ), (2, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([-1.088000,-1.401000,1.345000]) } ), (3, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([0.073000,-1.411000,-1.136000]) } ), (4, {'element':'C', 'special_flag':'C_V_pillar', 'cartesian_coordinates':np.array([-2.221000,-1.831000,1.655000]) } ), (5, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([-1.088000,1.401000,1.345000]) } ), (6, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([0.073000,1.411000,-1.136000]) } ), (7, {'element':'C', 'special_flag':'C_V_pillar', 'cartesian_coordinates':np.array([-2.221000,1.831000,1.655000]) } ), (8, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([-3.335000,-1.411000,1.192000]) } ), (9, {'element':'O', 'special_flag':'O_z_V_pillar', 'cartesian_coordinates':np.array([-2.201000,0.000000,-0.786000]) } ), (10, {'element':'V', 'special_flag':'V_pillar', 'cartesian_coordinates':np.array([-0.327000,0.000000,0.179000]) } ), (11, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([2.321000,1.401000,-1.289000]) } ), (12, {'element':'C', 'special_flag':'C_V_pillar', 'cartesian_coordinates':np.array([1.187000,1.831000,-1.599000]) } ), (13, {'element':'O', 'special_flag':'O_c_V_pillar', 'cartesian_coordinates':np.array([2.321000,-1.401000,-1.289000]) } ), (14, {'element':'C', 'special_flag':'C_V_pillar', 'cartesian_coordinates':np.array([1.187000,-1.831000,-1.599000]) } ), (15, {'element':'V', 'special_flag':'V_pillar', 'cartesian_coordinates':np.array([3.082000,0.000000,-0.123000]) } ), (16, {'element':'O', 'special_flag':'O_z_V_pillar', 'cartesian_coordinates':np.array([1.208000,0.000000,0.842000]) } ) ]) InorganicCluster['Al']['Al_pillar'].add_nodes_from([ (1, {'element':'O', 'special_flag':'O_c_Al_pillar', 'cartesian_coordinates':np.array([-1.215000,1.107000,-0.732000]) } ), (2, {'element':'O', 'special_flag':'O_c_Al_pillar', 'cartesian_coordinates':np.array([1.383000,-1.106000,-0.464000]) } ), (3, {'element':'O', 'special_flag':'O_c_Al_pillar', 'cartesian_coordinates':np.array([1.383000,1.107000,-0.464000]) } ), (4, {'element':'O', 'special_flag':'O_c_Al_pillar', 'cartesian_coordinates':np.array([-1.215000,-1.106000,-0.732000]) } ), (5, {'element':'Al', 'special_flag':'Al_pillar', 'cartesian_coordinates':np.array([-0.102000,-1.657000,0.608000]) } ), (6, {'element':'O', 'special_flag':'O_z_Al_pillar', 'cartesian_coordinates':np.array([-0.102000,0.000000,1.473000]) } ), (7, {'element':'C', 'special_flag':'C_Al_pillar', 'cartesian_coordinates':np.array([2.005000,0.000000,-0.744000]) } ), (8, {'element':'C', 'special_flag':'C_Al_pillar', 'cartesian_coordinates':np.array([-1.849000,0.000000,-0.976000]) } ), (9, {'element':'H', 'special_flag':'H_Al_pillar', 'cartesian_coordinates':np.array([-0.121000,-0.071000,2.580000]) } )#, #(10, {'element':'Al', # 'special_flag':'Al_pillar', # 'cartesian_coordinates':np.array([-0.102000,1.658000,0.608000]) # } # ) ]) OrganicCluster['N']['Adenine'].add_nodes_from([ (1, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([-0.108000,-0.237000,0.527000]) } ), (2, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([0.853000,-2.150000,0.700000]) } ), (3, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([0.550000,-0.540000,-0.675000]) } ), (4, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([-0.074000,1.419000,-1.600000]) } ), (5, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([-0.796000,0.992000,0.603000]) } ), (6, {'element':'H', 'special_flag':'Hd', 'cartesian_coordinates':np.array([-1.914000,2.348000,1.629000]) } ), (7, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([-1.599000,0.804000,2.476000]) } ), (8, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([1.193000,-3.098000,1.104000]) } ), (9, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([-0.080000,2.127000,-2.431000]) } ), (10, {'element':'N', 'special_flag':'N', 'cartesian_coordinates':np.array([0.121000,-1.283000,1.403000]) } ), (11, {'element':'N', 'special_flag':'N', 'cartesian_coordinates':np.array([1.133000,-1.761000,-0.560000]) } ), (12, {'element':'N', 'special_flag':'N', 'cartesian_coordinates':np.array([0.617000,0.283000,-1.751000]) } ), (13, {'element':'N', 'special_flag':'Na', 'cartesian_coordinates':np.array([-0.763000,1.773000,-0.514000]) } ), (14, {'element':'N', 'special_flag':'Nd', 'cartesian_coordinates':np.array([-1.424000,1.447000,1.691000]) } ) ]) OrganicCluster['N']['Thymine'].add_nodes_from([ (1, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([13.966000,16.972000,12.145000]) } ), (2, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([12.549000,18.380000,13.950000]) } ), (3, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([11.714000,19.119000,14.888000]) } ), (4, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([13.016000,17.103000,14.220000]) } ), (5, {'element':'N', 'special_flag':'Ndw', 'cartesian_coordinates':np.array([13.714000,16.442000,13.316000]) } ), (6, {'element':'O', 'special_flag':'Oa2', 'cartesian_coordinates':np.array([14.542000,16.323000,11.289000]) } ), (7, {'element':'O', 'special_flag':'Oaw', 'cartesian_coordinates':np.array([12.755000,16.528000,15.269000]) } ), (8, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([10.864000,18.500000,15.184000]) } ), (9, {'element':'H', 'special_flag':'Hdw', 'cartesian_coordinates':np.array([14.003000,15.581000,13.493000]) } ), (10, {'element':'C', 'special_flag':'C', 'cartesian_coordinates':np.array([12.877000,18.890000,12.738000]) } ), (11, {'element':'N', 'special_flag':'Nd2', 'cartesian_coordinates':np.array([13.557000,18.186000,11.867000]) } ), (12, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([12.293000,19.381000,15.776000]) } ), (13, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([11.316000,20.039000,14.453000]) } ), (14, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([12.585000,19.801000,12.470000]) } ), (15, {'element':'H', 'special_flag':'Hd2', 'cartesian_coordinates':np.array([13.727000,18.544000,11.021000]) } ) ]) OrganicCluster['N']['CarboxylateImidazolate'].add_nodes_from([ (1, {'element':'C', 'special_flag':'C13', 'cartesian_coordinates':np.array([-0.325000,-0.797000,0.755000]) } ), (2, {'element':'N', 'special_flag':'N20', 'cartesian_coordinates':np.array([-0.712000,0.499000,0.760000]) } ), (3, {'element':'C', 'special_flag':'N20', 'cartesian_coordinates':np.array([-0.133000,1.108000,-0.263000]) } ), (4, {'element':'C', 'special_flag':'C13', 'cartesian_coordinates':np.array([0.616000,0.148000,-0.885000]) } ), (5, {'element':'N', 'special_flag':'N20', 'cartesian_coordinates':np.array([0.512000,-1.071000,-0.265000]) } ), (6, {'element':'H', 'special_flag':'8H13', 'cartesian_coordinates':np.array([1.218000,0.325000,-1.764000]) } ), (7, {'element':'H', 'special_flag':'H', 'cartesian_coordinates':np.array([-0.314000,2.158000,-0.439000]) } ), (8, {'element':'C', 'special_flag':'C1', 'cartesian_coordinates':np.array([-0.843000,-1.760000,1.840000]) } ), (9, {'element':'O', 'special_flag':'O2', 'cartesian_coordinates':np.array([-0.453000,-3.062000,1.835000]) } ), (10, {'element':'O', 'special_flag':'O3', 'cartesian_coordinates':np.array([-1.690000,-1.307000,2.803000]) } ) ]) # Note, the special_flags for the organic linkers below are designed to be compatible # with the Dubbeldam force field, so changing these values will break if one requests # the Dubbeldam FF. OrganicCluster['C']['Benzene-2C'].add_nodes_from([ (1, {'element':'C', 'special_flag':'Cb', 'cartesian_coordinates':np.array([-0.000000,-0.000000,-1.401000]) } ), (2, {'element':'C', 'special_flag':'Cb', 'cartesian_coordinates':np.array([-0.000000,-0.000000,1.399000]) } ), (3, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([-0.858000,0.858000,-0.700000]) } ), (4, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([-1.519000,1.519000,-1.239000]) } ), (5, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([-0.857000,0.857000,0.700000]) } ), (6, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([-1.519000,1.519000,1.241000]) } ), (7, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([0.858000,-0.858000,-0.700000]) } ), (8, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([1.519000,-1.519000,-1.239000]) } ), (9, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([0.857000,-0.857000,0.700000]) } ), (10, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([1.519000,-1.519000,1.241000]) } ) ]) OrganicCluster['C']['Biphenyl-2C'].add_nodes_from([ (1, {'element':'C', 'special_flag':'Cb', 'cartesian_coordinates':np.array([0.000000,0.000000,-3.571000]) } ), (2, {'element':'C', 'special_flag':'Ce', 'cartesian_coordinates':np.array([0.000000,0.000000,-0.771000]) } ), (3, {'element':'C', 'special_flag':'Cb', 'cartesian_coordinates':np.array([0.000000,0.000000,3.569000]) } ), (4, {'element':'C', 'special_flag':'Ce', 'cartesian_coordinates':np.array([0.000000,0.000000,0.771000]) } ), (5, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([1.519000,-1.519000,0.928000]) } ), (6, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([0.858000,-0.858000,1.469000]) } ), (7, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([-0.858000,0.858000,-2.870000]) } ), (8, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([-1.519000,1.519000,-3.409000]) } ), (9, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([-0.857000,0.857000,-1.470000]) } ), (10, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([-1.519000,1.519000,-0.929000]) } ), (11, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([-1.519000,1.519000,3.412000]) } ), (12, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([-0.858000,0.858000,2.872000]) } ), (13, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([1.519000,-1.519000,3.412000]) } ), (14, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([0.858000,-0.858000,2.872000]) } ), (15, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([-1.519000,1.519000,0.928000]) } ), (16, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([-0.858000,0.858000,1.469000]) } ), (17, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([0.858000,-0.858000,-2.870000]) } ), (18, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([1.519000,-1.519000,-3.409000]) } ), (19, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([0.857000,-0.857000,-1.470000]) } ), (20, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([1.519000,-1.519000,-0.929000]) } ) ]) OrganicCluster['C']['Triphenyl-2C'].add_nodes_from([ (1, {'element':'C', 'special_flag':'Cb', 'cartesian_coordinates':np.array([-0.000000,-0.000000,-5.741000]) } ), (2, {'element':'C', 'special_flag':'Ce', 'cartesian_coordinates':np.array([-0.000000,-0.000000,-2.941000]) } ), (3, {'element':'C', 'special_flag':'Cf', 'cartesian_coordinates':np.array([-0.000000,-0.000000,1.399000]) } ), (4, {'element':'C', 'special_flag':'Cb', 'cartesian_coordinates':np.array([-0.000000,-0.000000,5.741000]) } ), (5, {'element':'C', 'special_flag':'Ce', 'cartesian_coordinates':np.array([-0.000000,-0.000000,2.941000]) } ), (6, {'element':'C', 'special_flag':'Cf', 'cartesian_coordinates':np.array([-0.000000,-0.000000,-1.399000]) } ), (7, {'element':'H', 'special_flag':'Hc', 'cartesian_coordinates':np.array([1.519000,-1.519000,-1.242000]) } ), (8, {'element':'C', 'special_flag':'Cg', 'cartesian_coordinates':np.array([0.858000,-0.858000,-0.701000]) } ), (9, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([-0.858000,0.858000,-5.040000]) } ), (10, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([-1.519000,1.519000,-5.579000]) } ), (11, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([-0.857000,0.857000,-3.640000]) } ), (12, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([-1.519000,1.519000,-3.099000]) } ), (13, {'element':'H', 'special_flag':'Hc', 'cartesian_coordinates':np.array([-1.519000,1.519000,1.242000]) } ), (14, {'element':'C', 'special_flag':'Cg', 'cartesian_coordinates':np.array([-0.858000,0.858000,0.701000]) } ), (15, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([0.858000,-0.858000,5.040000]) } ), (16, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([1.519000,-1.519000,5.579000]) } ), (17, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([0.857000,-0.857000,3.640000]) } ), (18, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([1.519000,-1.519000,3.099000]) } ), (19, {'element':'H', 'special_flag':'Hc', 'cartesian_coordinates':np.array([1.519000,-1.519000,1.242000]) } ), (20, {'element':'C', 'special_flag':'Cg', 'cartesian_coordinates':np.array([0.858000,-0.858000,0.701000]) } ), (21, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([-0.858000,0.858000,5.040000]) } ), (22, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([-1.519000,1.519000,5.579000]) } ), (23, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([-0.857000,0.857000,3.640000]) } ), (24, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([-1.519000,1.519000,3.099000]) } ), (25, {'element':'H', 'special_flag':'Hc', 'cartesian_coordinates':np.array([-1.519000,1.519000,-1.242000]) } ), (26, {'element':'C', 'special_flag':'Cg', 'cartesian_coordinates':np.array([-0.858000,0.858000,-0.701000]) } ), (27, {'element':'C', 'special_flag':'Cc', 'cartesian_coordinates':np.array([0.858000,-0.858000,-5.040000]) } ), (28, {'element':'H', 'special_flag':'Ha', 'cartesian_coordinates':np.array([1.519000,-1.519000,-5.579000]) } ), (29, {'element':'C', 'special_flag':'Cd', 'cartesian_coordinates':np.array([0.857000,-0.857000,-3.640000]) } ), (30, {'element':'H', 'special_flag':'Hb', 'cartesian_coordinates':np.array([1.519000,-1.519000,-3.099000]) } ) ]) # compute the distance matrix add_distance_matrix(InorganicCluster['Cu']['Cu Paddlewheel']) add_distance_matrix(InorganicCluster['Zn']['Zn Paddlewheel']) add_distance_matrix(InorganicCluster['Zn']['Zn4O']) add_distance_matrix(InorganicCluster['Zn']['Kuratowski']) add_distance_matrix(InorganicCluster['Zr']['Zr_UiO']) add_distance_matrix(InorganicCluster['Cr']['Cr_tri']) add_distance_matrix(InorganicCluster['V']['V_pillar']) add_distance_matrix(InorganicCluster['Al']['Al_pillar']) add_distance_matrix(OrganicCluster['N']['Adenine']) add_distance_matrix(OrganicCluster['N']['Thymine']) add_distance_matrix(OrganicCluster['N']['CarboxylateImidazolate']) add_distance_matrix(OrganicCluster['C']['Benzene-2C']) add_distance_matrix(OrganicCluster['C']['Biphenyl-2C']) add_distance_matrix(OrganicCluster['C']['Triphenyl-2C'])
31.012125
111
0.50179
5,406
48,596
4.326674
0.083981
0.250534
0.273707
0.335913
0.863745
0.811159
0.794186
0.787345
0.781702
0.770928
0
0.187328
0.291032
48,596
1,566
112
31.031928
0.491568
0.010536
0
0.499019
0
0
0.297364
0.129424
0
0
0
0
0
1
0.000654
false
0
0.001962
0
0.002616
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
a44853a719d1cc203688d7dbb70ade94c5c8b4bb
16,258
py
Python
layers.py
Luisiglm/Omics-Graph-Neural-Nets-
75a4f72ff62c930fd907f4b232b307445ca0c06a
[ "MIT" ]
1
2021-11-12T10:58:35.000Z
2021-11-12T10:58:35.000Z
layers.py
Luisiglm/Omics-Graph-Neural-Nets-
75a4f72ff62c930fd907f4b232b307445ca0c06a
[ "MIT" ]
null
null
null
layers.py
Luisiglm/Omics-Graph-Neural-Nets-
75a4f72ff62c930fd907f4b232b307445ca0c06a
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from tensorflow.keras.layers import Layer class gat(Layer): """ Graph Attention Layer adapted to genomic data. Takes as input a tf float 32 object of shape batch x genes x features Initialization Args: adj: a gene x gene numpy array units: the number of features to obtain. activation: a keras activation function. Parameters: w: a features x gat.units tf variable . ai: a gat.units x genes tf variable that corresponds to the self attention parameter. aj: a gat.units x genes tf variable that is the attention to adjacent nodes parameter. """ def __init__(self,adj,units, activation = None): super(gat, self).__init__() self.id = tf.cast(np.identity(adj.shape[1]), dtype = "float32") self.adj = tf.cast(adj, dtype ='float32') self.activation = tf.keras.activations.get(activation) self.units = units self.nodes = adj.shape[1] def build(self, input_shape): w_init = tf.keras.initializers.GlorotNormal(seed=None) self.w = tf.Variable(name = "weight", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) self.ai = tf.Variable(name = "self_attn", initial_value = w_init(shape = (self.units,self.nodes), dtype = "float32"), trainable = True) self.aj = tf.Variable(name = "other_attn", initial_value = w_init(shape = (self.units,self.nodes), dtype = "float32"), trainable = True) super().build(input_shape) def call(self, inputs): # batch x nodes x features //inputs f = tf.matmul(inputs,self.w) # batch x nodes x features' self_attn = tf.matmul(f,self.ai) # batch x nodes x nodes other_attn = tf.transpose(tf.matmul(f,self.aj), perm = [0, 2, 1]) # batch x nodes x nodes attn = tf.math.add(self_attn,other_attn) attn = tf.math.add(attn, -1e09*(1-(self.adj+self.id)))# it should be batch x nodes x nodes attn = tf.nn.softmax(attn, axis = 1) # transpose this bad boy. f = tf.transpose(f,perm=[0, 2, 1])# batch x features' x nodes // f = tf.matmul(f,attn)# message passing. f = tf.transpose(f,perm=[0, 2, 1]) # transpose again! return(self.activation(f), attn)# activate and poom! class gate(Layer): """ Gated Graph Layer adapted to genomic data. Takes as input a tf float 32 object of shape batch x genes x features Initialization Args: adj: a gene x gene numpy array units: the number of features to obtain. activation: a keras activation function. Parameters: w: a features x gat.units tf variable. w_2: a features x gat.units tf variable. ai: a gat.units x genes tf variable that corresponds to the self gate parameter. aj: a gat.units x genes tf variable that is the gate to adjacent nodes parameter. """ def __init__(self,adj,units, activation = None): super(gate, self).__init__() self.id = tf.cast(np.identity(adj.shape[1]), dtype = "float32") self.adj = tf.cast(adj, dtype ='float32') self.activation = tf.keras.activations.get(activation) self.units = units def build(self, input_shape): w_init = tf.keras.initializers.GlorotNormal(seed=None) self.w = tf.Variable(name = "weight", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) self.ai = tf.Variable(name = "self_attn", initial_value = w_init(shape = (self.units,self.adj.shape[1]), dtype = "float32"), trainable = True) self.aj = tf.Variable(name = "other_attn", initial_value = w_init(shape = (self.units,self.adj.shape[1]), dtype = "float32"), trainable = True) self.w_2 = tf.Variable(name = "weight_2", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) self.b_a = tf.Variable(name = "other_gate", initial_value = w_init(shape = (self.adj.shape[0],self.adj.shape[1]), dtype = "float32"), trainable = True) super().build(input_shape) def call(self, inputs): # batch x nodes x features //inputs f = tf.matmul(inputs,self.w) # batch x nodes x features' self_attn = tf.matmul(f,self.ai) # batch x nodes x nodes other_attn = tf.transpose(tf.matmul(f,self.aj), perm = [0, 2, 1]) # batch x nodes x nodes attn = tf.math.add(self_attn,other_attn) attn = tf.math.add(attn, -1e09*(1-(self.adj)))# it should be batch x nodes x nodes gate_h = tf.keras.activations.sigmoid(attn+self.b_a) # transpose this bad boy. f = tf.transpose(f,perm=[0, 2, 1])# batch x features' x nodes // f = tf.matmul(f,gate_h)# message passing. f = tf.transpose(f,perm=[0, 2, 1]) # transpose again! f = tf.add(f, tf.matmul(inputs, self.w_2)) return(self.activation(f), gate_h)# activate and poom! class gcn(Layer): """ Graph Convolution Layer adapted to genomic data. Takes as input a tf float 32 object of shape batch x genes x features Initialization Args: adj: a gene x gene numpy array units: the number of features to obtain. activation: a keras activation function. Parameters: w: a features x gat.units tf variable. """ def __init__(self,adj,units, activation = None): super(gcn, self).__init__() self.id = tf.cast(np.identity(adj.shape[1]), dtype = "float32") self.adj = tf.cast(adj, dtype ='float32') self.d = tf.math.multiply(self.id,tf.math.reduce_sum(self.adj, axis = 0)**-.5) self.L = self.id-tf.matmul(self.d,tf.matmul(self.adj,self.d)) self.activation = tf.keras.activations.get(activation) self.units = units self.nodes = adj.shape[1] def build(self, input_shape): w_init = tf.keras.initializers.RandomNormal( mean=0.0, stddev=1/np.sum(input_shape[-1]), seed=None) self.w = tf.Variable(name = "weight", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) super().build(input_shape) def call(self, inputs): # batch x nodes x features //inputs f = tf.matmul(inputs,self.w) # batch x nodes x features' # transpose this bad boy. f = tf.transpose(f,perm=[0, 2, 1])# batch x features' x nodes // f = tf.matmul(f,self.L)# message passing. f = tf.transpose(f,perm=[0, 2, 1]) # transpose again! return(self.activation(f))# activate and poom! class gpool(Layer): """ Graph Pooling Layer adapted to genomic data. Takes as input a tf float 32 object of shape batch x genes x features Args: adj: a batch x genes x genes tensor object. units: the number of features to obtain. activation: a keras activation function. w: a features x gat.units tf variable. """ def __init__(self, adj, units, activation = None): super(gpool, self).__init__() self.activation = tf.keras.activations.get(activation) self.units = units self.id = tf.cast(np.identity(adj.shape[1]), dtype = "float32") self.adj = tf.cast(adj, dtype = 'float32') def build(self, input_shape): w_init = tf.keras.initializers.GlorotNormal(seed=None) self.w1 = tf.Variable(name = "weight", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) self.w2 = tf.Variable(name = "weight", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) super().build(input_shape) def call(self, inputs): # batch x nodes x features //inputs f = tf.matmul(inputs,self.w1) # batch x nodes x features' h = tf.transpose(inputs,perm=[0, 2, 1])# batch x features' x nodes // h = tf.matmul(h,self.adj)# message passing. h = tf.transpose(h,perm=[0, 2, 1]) # transpose again! f = tf.add(tf.matmul(h, self.w2),f) # transpose this bad boy. return(self.activation(f))# activate and poom! class gpool_ad(Layer): """ Graph Pooling Layer adapted to genomic data. Takes as input a tf float 32 object of shape batch x genes x features Args: adj: a batch x genes x genes tensor object. units: the number of features to obtain. activation: a keras activation function. w: a features x gat.units tf variable. """ def __init__(self,units, activation = None): super(gpool_ad, self).__init__() self.activation = tf.keras.activations.get(activation) self.units = units def build(self, input_shape): w_init = tf.keras.initializers.RandomNormal( mean=0.0, stddev=1/np.sum(input_shape[-1]), seed=None) self.w = tf.Variable(name = "weight", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) super().build(input_shape) def call(self, inputs, adj): # batch x nodes x features //inputs f = tf.matmul(inputs,self.w) # batch x nodes x features' # transpose this bad boy. f = tf.transpose(f,perm=[0, 2, 1])# batch x features' x nodes // f = tf.matmul(f,adj)# message passing. f = tf.transpose(f,perm=[0, 2, 1]) # transpose again! return(self.activation(f))# activate and poom! class gated_pool_ad(Layer): """ Gated Pooling Layer adapted to genomic data. Takes as input a tf float 32 object of shape batch x genes x features Args: adj: a batch x genes x genes tensor object. units: the number of features to obtain. activation: a keras activation function. w: a features x gat.units tf variable. w_2: a features x gat.units tf Variable. """ def __init__(self,units, activation = None): super(gated_pool_ad, self).__init__() self.activation = tf.keras.activations.get(activation) self.units = units def build(self, input_shape): w_init = tf.keras.initializers.RandomNormal( mean=0.0, stddev=1/np.sum(input_shape[-1]), seed=None) self.w = tf.Variable(name = "weight", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) self.w_2 = tf.Variable(name = "weight_2", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) super().build(input_shape) def call(self, inputs, adj): # batch x nodes x features //inputs f = tf.matmul(inputs,self.w) # batch x nodes x features' # transpose this bad boy. f = tf.transpose(f,perm=[0, 2, 1])# batch x features' x nodes // f = tf.matmul(f,adj)# message passing. f = tf.transpose(f,perm=[0, 2, 1]) # transpose again! f = tf.add(f, tf.matmul(inputs, self.w_2)) return(self.activation(f))# activate and poom! class fully_3d(Layer): def __init__(self, units, activation = None): super(fully_3d,self).__init__() self.activation = tf.keras.activations.get(activation) self.units = units def build(self, input_shape): w_init = tf.random_normal_initializer() self.w_g = tf.Variable(name = "kernel", initial_value = w_init(shape = (input_shape[1],input_shape[2]), dtype = "float32"), trainable = True) self.w = tf.Variable(name = "kernel", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) b_init = tf.random_normal_initializer() self.b = tf.Variable(name = "bias", initial_value = b_init(shape = (self.units,), dtype = "float32"), trainable = True) super().build(input_shape) def call(self,inputs): inpts = tf.math.add(inputs,self.w_g)#+self.b_g# zero out the variables we aren't using. return(self.activation(tf.matmul(inpts, self.w)+self.b)) class path_fc(Layer): """ Local MLP Layer. Takes as input a tf float 32 object of shape batch x genes x features Initialization Args: adj: a gene x gene numpy array units: the number of features to obtain. activation: a keras activation function. Parameters: w: a features x gat.units tf variable. """ def __init__(self,paths,units, activation = None): super(path_fc, self).__init__() self.activation = tf.keras.activations.get(activation) self.units = units self.paths = tf.cast(paths, dtype = "float32") self.no_paths = paths.shape[1] def build(self, input_shape): w_init = tf.random_normal_initializer() self.w = tf.Variable(name = "kernel", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) self.w_paths = tf.Variable(name = "kernel", initial_value = w_init(shape = (input_shape[1],self.no_paths), dtype = "float32"), trainable = True) b_init = tf.random_normal_initializer() self.b = tf.Variable(name = "bias", initial_value = b_init(shape = (self.units,), dtype = "float32"), trainable = True) super().build(input_shape) def call(self, inputs): # batch x nodes x features //inputs h = tf.matmul(inputs,self.w) h = h + self.b h = tf.transpose(h, perm = [0, 2, 1]) w2 = tf.math.multiply(self.paths,self.w_paths) f = tf.matmul(h,w2) # transpose this bad boy. f = tf.transpose(f, perm = [0,2,1]) return(self.activation(f))# activate and poom! class fully_3d_ne(Layer): def __init__(self, units, activation = None): super(fully_3d_ne,self).__init__() self.activation = tf.keras.activations.get(activation) self.units = units def build(self, input_shape): w_init = tf.random_normal_initializer() self.w = tf.Variable(name = "kernel", initial_value = w_init(shape = (input_shape[2],self.units), dtype = "float32"), trainable = True) b_init = tf.random_normal_initializer() self.b = tf.Variable(name = "bias", initial_value = b_init(shape = (self.units,), dtype = "float32"), trainable = True) super().build(input_shape) def call(self,inputs): return(self.activation(tf.matmul(inputs, self.w)+self.b))
49.117825
119
0.562246
2,094
16,258
4.258357
0.071633
0.040372
0.034541
0.06168
0.906807
0.893798
0.888079
0.887406
0.876192
0.864416
0
0.017402
0.324886
16,258
330
120
49.266667
0.795007
0.238467
0
0.76
0
0
0.031725
0
0
0
0
0
0
1
0.12
false
0
0.013333
0.004444
0.173333
0
0
0
0
null
0
0
0
1
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
7
8ef7d798926c8b5e03f63b732f6250a14266e417
13,792
py
Python
zokyo/utils/data_format_conversions.py
toyotaconnected-India/zokyo
6086ce7c014dd76b28756596ada3559eacc06d44
[ "Apache-2.0" ]
null
null
null
zokyo/utils/data_format_conversions.py
toyotaconnected-India/zokyo
6086ce7c014dd76b28756596ada3559eacc06d44
[ "Apache-2.0" ]
null
null
null
zokyo/utils/data_format_conversions.py
toyotaconnected-India/zokyo
6086ce7c014dd76b28756596ada3559eacc06d44
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Contributors : [srinivas.v@toyotaconnected.co.in,srivathsan.govindarajan@toyotaconnected.co.in, # harshavardhan.thirupathi@toyotaconnected.co.in, # ashok.ramadass@toyotaconnected.com ] from pathlib import Path import json import xml.etree.ElementTree as ET def coco_std_2_voc(coco_ann_path, save_folder=None, database=None): """ Function convert given standard COCO annotation json file to Pascal VOC annotation. If save_folder is not given then output is saved in the same folder """ coco_ann_path = Path(coco_ann_path) if not database: database = 'Unspecified' if not save_folder: save_folder = coco_ann_path.parent else: save_folder = Path(save_folder) if not save_folder.is_dir(): raise Exception('Save path should be a directory') with open(coco_ann_path, 'r') as f: coco_ann = json.load(f) categories = {cat['id']: cat['name'] for cat in coco_ann['categories']} categories = dict(sorted(categories.items())) voc_names = '' for i, cat in categories.items(): voc_names += cat + '\n' with open(f'{save_folder}/voc.names', 'w') as f: f.write(voc_names) for i, img in enumerate(coco_ann['images']): root = ET.Element('annotation') img_path = Path(img['file_name']) fold = ET.Element('folder') fold.text = str(img_path.parent) root.append(fold) file_name = ET.Element('filename') file_name.text = img_path.name root.append(file_name) path = ET.Element('path') path.text = str(img_path) root.append(path) source = ET.Element('source') db = ET.SubElement(source, 'database') db.text = database root.append(source) size = ET.Element('size') width = ET.SubElement(size, 'width') width.text = str(int(img['width'])) height = ET.SubElement(size, 'height') height.text = str(int(img['height'])) depth = ET.SubElement(size, 'depth') depth.text = str(3) root.append(size) for ann in coco_ann['annotations']: if img['id'] == ann['image_id']: obj = ET.Element('object') name = ET.Element('name') name.text = categories[ann['category_id']] obj.append(name) pose = ET.Element('pose') if 'pose' in ann: pose.text = str(ann['pose']) else: pose.text = 'Unspecified' obj.append(pose) truncated = ET.Element('truncated') if 'truncated' in ann: truncated.text = str(ann['truncated']) else: truncated.text = 'Unspecified' obj.append(truncated) bndbox = ET.Element('bndbox') xmin = ET.SubElement(bndbox, 'xmin') xmin.text = str(int(ann['bbox'][0])) ymin = ET.SubElement(bndbox, 'ymin') ymin.text = str(int(ann['bbox'][1])) xmax = ET.SubElement(bndbox, 'xmax') xmax.text = str(int(ann['bbox'][0] + ann['bbox'][2])) ymax = ET.SubElement(bndbox, 'ymax') ymax.text = str(int(ann['bbox'][1] + ann['bbox'][3])) obj.append(bndbox) root.append(obj) tree = ET.ElementTree(root) with open(f'{save_folder}/{i}.xml', 'wb') as f: tree.write(f) def voc_2_coco_std(voc_folder_path, save_folder=None, info=None): """ Function convert given Pascal VOC annotations to standard COCO annotation json file. If save_folder is not given then output is saved in the same folder """ voc_folder_path = Path(voc_folder_path) if not info: info = {} if not save_folder: save_folder = voc_folder_path else: save_folder = Path(save_folder) if not save_folder.is_dir(): raise Exception('Save path should be a directory') coco_ann = {} voc_names_path = list(voc_folder_path.glob('*.names'))[0] with open(voc_names_path, 'r') as f: voc_names = [n.rstrip('\n') for n in f.readlines()] categories = [{"id": i, "name": cat} for i, cat in enumerate(voc_names, 1)] coco_ann['info'] = info coco_ann['categories'] = categories voc_ann_paths = sorted(list(voc_folder_path.glob('*.xml'))) if len(voc_ann_paths) == 0: raise Exception('Empty Voc directory') imgs = [] anns = [] j = 0 for i, voc_ann_path in enumerate(voc_ann_paths): root = ET.parse(voc_ann_path).getroot() img = {} img['id'] = i size = root.find('size') img['width'] = int(size.find('width').text) img['height'] = int(size.find('height').text) img['file_name'] = root.find('path').text imgs.append(img) for obj in root.findall('object'): ann = {} ann['id'] = j ann['image_id'] = i ann['category_id'] = voc_names.index(obj.find('name').text) + 1 bbox = obj.find('bndbox') x = int(bbox.find('xmin').text) y = int(bbox.find('ymin').text) w = int(bbox.find('xmax').text) - x h = int(bbox.find('ymax').text) - y ann['area'] = w * h ann['bbox'] = [x, y, w, h] j += 1 anns.append(ann) coco_ann['images'] = imgs coco_ann['annotations'] = anns with open(f'{save_folder}/coco_ann.json', 'w') as f: json.dump(coco_ann, f) def coco_std_2_coco_toyo(coco_ann_path, save_folder=None): """ Function convert given standard COCO annotation json file to Toyo COCO annotation json files. If save_folder is not given then output is saved in the same folder """ coco_ann_path = Path(coco_ann_path) if not save_folder: save_folder = coco_ann_path.parent else: save_folder = Path(save_folder) if not save_folder.is_dir(): raise Exception('Save path should be a directory') with open(coco_ann_path, 'r') as f: coco_ann = json.load(f) coco_toyo_ann = {} coco_toyo_ann['info'] = coco_ann['info'] coco_toyo_ann['categories'] = coco_ann['categories'] for i, img in enumerate(coco_ann['images']): coco_toyo_ann['images'] = [img] anns = [] for j, ann in enumerate(coco_ann['annotations']): if img['id'] == ann['image_id']: anns.append(ann) coco_toyo_ann['annotations'] = anns with open(f'{save_folder}/{i}.json', 'w') as f: json.dump(coco_toyo_ann, f) def coco_toyo_2_coco_std(coco_toyo_ann_folder, save_folder=None): """ Function convert given Toyo COCO annotation json files to standard COCO annotation json file. If save_folder is not given then output is saved in the same folder """ coco_toyo_ann_folder = Path(coco_toyo_ann_folder) if not save_folder: save_folder = coco_toyo_ann_folder.parent else: save_folder = Path(save_folder) if not save_folder.is_dir(): raise Exception('Save path should be a directory') coco_toyo_ann_paths = sorted(list(coco_toyo_ann_folder.glob('*.json'))) coco_ann = {} imgs = [] anns = [] for _, coco_toyo_ann_path in enumerate(coco_toyo_ann_paths): with open(coco_toyo_ann_path, 'r') as f: coco_toyo_ann = json.load(f) coco_ann['info'] = coco_toyo_ann['info'] coco_ann['categories'] = coco_toyo_ann['categories'] imgs.append(coco_toyo_ann['images'][0]) anns.extend(coco_toyo_ann['annotations']) coco_ann['images'] = sorted(imgs, key=lambda x: x['id']) coco_ann['annotations'] = sorted(anns, key=lambda x: x['id']) with open(f'{save_folder}/coco_ann.json', 'w') as f: json.dump(coco_ann, f) def coco_toyo_2_voc(coco_toyo_ann_folder, save_folder=None, database=None): """ Function convert given Toyo COCO annotation json files to Pascal VOC annotation. If save_folder is not given then output is saved in the same folder """ coco_toyo_ann_folder = Path(coco_toyo_ann_folder) if not database: database = 'Unspecified' if not save_folder: save_folder = coco_toyo_ann_folder.parent else: save_folder = Path(save_folder) if not save_folder.is_dir(): raise Exception('Save path should be a directory') coco_toyo_ann_paths = sorted(list(coco_toyo_ann_folder.glob('*.json'))) with open(coco_toyo_ann_paths[0], 'r') as f: coco_toyo_ann = json.load(f) categories = {cat['id']: cat['name'] for cat in coco_toyo_ann['categories']} categories = dict(sorted(categories.items())) voc_names = '' for i, cat in categories.items(): voc_names += cat + '\n' with open(f'{save_folder}/voc.names', 'w') as f: f.write(voc_names) for i, coco_toyo_ann_path in enumerate(coco_toyo_ann_paths): with open(coco_toyo_ann_path, 'r') as f: coco_toyo_ann = json.load(f) img = coco_toyo_ann['images'][0] root = ET.Element('annotation') img_path = Path(img['file_name']) fold = ET.Element('folder') fold.text = str(img_path.parent) root.append(fold) file_name = ET.Element('filename') file_name.text = img_path.name root.append(file_name) path = ET.Element('path') path.text = str(img_path) root.append(path) source = ET.Element('source') db = ET.SubElement(source, 'database') db.text = database root.append(source) size = ET.Element('size') width = ET.SubElement(size, 'width') width.text = str(int(img['width'])) height = ET.SubElement(size, 'height') height.text = str(int(img['height'])) depth = ET.SubElement(size, 'depth') depth.text = str(3) root.append(size) for ann in coco_toyo_ann['annotations']: if img['id'] == ann['image_id']: obj = ET.Element('object') name = ET.Element('name') name.text = categories[ann['category_id']] obj.append(name) pose = ET.Element('pose') if 'pose' in ann: pose.text = str(ann['pose']) else: pose.text = 'Unspecified' obj.append(pose) truncated = ET.Element('truncated') if 'truncated' in ann: truncated.text = str(ann['truncated']) else: truncated.text = 'Unspecified' obj.append(truncated) bndbox = ET.Element('bndbox') xmin = ET.SubElement(bndbox, 'xmin') xmin.text = str(int(ann['bbox'][0])) ymin = ET.SubElement(bndbox, 'ymin') ymin.text = str(int(ann['bbox'][1])) xmax = ET.SubElement(bndbox, 'xmax') xmax.text = str(int(ann['bbox'][0] + ann['bbox'][2])) ymax = ET.SubElement(bndbox, 'ymax') ymax.text = str(int(ann['bbox'][1] + ann['bbox'][3])) obj.append(bndbox) root.append(obj) tree = ET.ElementTree(root) with open(f'{save_folder}/{coco_toyo_ann_path.stem}.xml', 'wb') as f: tree.write(f) def voc_2_coco_toyo(voc_folder_path, save_folder=None, info=None): """ Function convert given Pascal VOC annotation to Toyo COCO annotation json files. If save_folder is not given then output is saved in the same folder """ voc_folder_path = Path(voc_folder_path) if not info: info = {} if not save_folder: save_folder = voc_folder_path else: save_folder = Path(save_folder) if not save_folder.is_dir(): raise Exception('Save path should be a directory') coco_toyo_ann = {} voc_names_path = list(voc_folder_path.glob('*.names'))[0] with open(voc_names_path, 'r') as f: voc_names = [n.rstrip('\n') for n in f.readlines()] categories = [{"id": i, "name": cat} for i, cat in enumerate(voc_names, 1)] coco_toyo_ann['info'] = info coco_toyo_ann['categories'] = categories voc_ann_paths = sorted(list(voc_folder_path.glob('*.xml'))) if len(voc_ann_paths) == 0: raise Exception('Empty Voc directory') imgs = [] anns = [] j = 0 for i, voc_ann_path in enumerate(voc_ann_paths): root = ET.parse(voc_ann_path).getroot() img = {} img['id'] = i size = root.find('size') img['width'] = int(size.find('width').text) img['height'] = int(size.find('height').text) img['fil_ename'] = root.find('path').text imgs.append(img) for obj in root.findall('object'): ann = {} ann['id'] = j ann['image_id'] = i ann['category_id'] = voc_names.index(obj.find('name').text) + 1 bbox = obj.find('bndbox') x = int(bbox.find('xmin').text) y = int(bbox.find('ymin').text) w = int(bbox.find('xmax').text) - x h = int(bbox.find('ymax').text) - y ann['area'] = w * h ann['bbox'] = [x, y, w, h] j += 1 anns.append(ann) coco_toyo_ann['images'] = imgs coco_toyo_ann['annotations'] = anns imgs = [] anns = [] with open(f'{save_folder}/{i}.json', 'w') as f: json.dump(coco_toyo_ann, f)
31.20362
101
0.568735
1,827
13,792
4.120963
0.079365
0.06641
0.061363
0.023908
0.921636
0.90251
0.882322
0.876478
0.85868
0.852437
0
0.003714
0.297274
13,792
441
102
31.274376
0.773112
0.081932
0
0.872131
0
0
0.114997
0.016645
0
0
0
0
0
1
0.019672
false
0
0.009836
0
0.029508
0
0
0
0
null
0
0
0
1
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
7
8efccfffd892ee42a0ffe231c51e5bfc944a948a
4,008
py
Python
gym/envs/F16/AeroBenchVVPython/code/RunF16Sim.py
caffett/gym
a9126ace2488acfaa63544ad14859d530ee4ac76
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
gym/envs/F16/AeroBenchVVPython/code/RunF16Sim.py
caffett/gym
a9126ace2488acfaa63544ad14859d530ee4ac76
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
gym/envs/F16/AeroBenchVVPython/code/RunF16Sim.py
caffett/gym
a9126ace2488acfaa63544ad14859d530ee4ac76
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
''' Stanley Bak RunF16Sim python version ''' import numpy as np from scipy.integrate import RK45 from controlledF16 import controlledF16 def RunF16Sim(initialState, tMax, der_func, F16Model, ap, llc, pass_fail, sim_step=0.01, multipliers=None): 'Simulates and analyzes autonomous F-16 maneuvers' # append integral error states to state vector initialState = np.array(initialState, dtype=float) x0 = np.zeros((initialState.shape[0] + llc.get_num_integrators() + ap.get_num_integrators(),)) x0[:initialState.shape[0]] = initialState # run the numerical simulation times = [0] states = [x0] modes = [ap.state] _, u, Nz, ps, _ = controlledF16(times[-1], states[-1], F16Model, ap, llc, multipliers=multipliers) Nz_list = [Nz] ps_list = [ps] u_list = [u] rk45 = RK45(der_func, times[-1], states[-1], tMax) while rk45.status == 'running': rk45.step() if rk45.t > times[-1] + sim_step: dense_output = rk45.dense_output() while rk45.t > times[-1] + sim_step: t = times[-1] + sim_step times.append(t) states.append(dense_output(t)) updated = ap.advance_discrete_state(times[-1], states[-1]) modes.append(ap.state) # re-run dynamics function at current state to get non-state variables xd, u, Nz, ps, Ny_r = controlledF16(times[-1], states[-1], F16Model, ap, llc, multipliers=multipliers) pass_fail.advance(times[-1], states[-1], ap.state, xd, u, Nz, ps, Ny_r) Nz_list.append(Nz) ps_list.append(ps) u_list.append(u) if updated: rk45 = RK45(der_func, times[-1], states[-1], tMax) print("at time {}, state changes to {}".format(times[-1], ap.state)) break if pass_fail.break_on_error and not pass_fail.result(): break if pass_fail.break_on_error and not pass_fail.result(): break result = pass_fail.result() # make sure the solver didn't fail if rk45.status != 'finished': result = False # fail # print(times) # assert False return result, times, states, modes, ps_list, Nz_list, u_list def RunF16Sim_discete_time(initialState, tMax, F16Model, ap, llc, pass_fail, sim_step=0.01, multipliers=None): 'Simulates and analyzes autonomous F-16 maneuvers' # append integral error states to state vector initialState = np.array(initialState, dtype=float) x0 = np.zeros((initialState.shape[0] + llc.get_num_integrators() + ap.get_num_integrators(),)) x0[:initialState.shape[0]] = initialState # run the numerical simulation times = [0] states = [x0] modes = [ap.state] xd, u, Nz, ps, Ny_r = controlledF16(times[-1], states[-1], F16Model, ap, llc, multipliers=multipliers) Nz_list = [Nz] ps_list = [ps] u_list = [u] while times[-1] < tMax: t = times[-1] + sim_step state = states[-1]+sim_step*xd times.append(t) states.append(state) updated = ap.advance_discrete_state(times[-1], states[-1]) modes.append(ap.state) if updated: print("at time {}, state changes to {}".format(times[-1], ap.state)) # re-run dynamics function at current state to get non-state variables xd, u, Nz, ps, Ny_r = controlledF16(times[-1], states[-1], F16Model, ap, llc, multipliers=multipliers) pass_fail.advance(times[-1], states[-1], ap.state, xd, u, Nz, ps, Ny_r) Nz_list.append(Nz) ps_list.append(ps) u_list.append(u) if pass_fail.break_on_error and not pass_fail.result(): result = False break # result = pass_fail.result() # print(times) # print(u_list[:5]) # print(states[:6]) # assert False return result, times, states, modes, ps_list, Nz_list, u_list
33.680672
118
0.605289
536
4,008
4.393657
0.192164
0.043312
0.050955
0.055202
0.814437
0.763057
0.747771
0.747771
0.747771
0.720594
0
0.03558
0.270709
4,008
119
119
33.680672
0.770099
0.143463
0
0.767123
0
0
0.049288
0
0
0
0
0
0
1
0.027397
false
0.109589
0.041096
0
0.09589
0.027397
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
8
2d0a28114bc3ab769f4b8d7039ed5bf48a3bb752
120
py
Python
Operators/Selection/__init__.py
mjbogusz/TSPGen
4916cf6276fda41b73ebdf24a7969167c63d0650
[ "MIT" ]
null
null
null
Operators/Selection/__init__.py
mjbogusz/TSPGen
4916cf6276fda41b73ebdf24a7969167c63d0650
[ "MIT" ]
null
null
null
Operators/Selection/__init__.py
mjbogusz/TSPGen
4916cf6276fda41b73ebdf24a7969167c63d0650
[ "MIT" ]
null
null
null
from Operators.Selection.Selector import Selector from Operators.Selection.TournamentSelector import TournamentSelector
40
69
0.9
12
120
9
0.5
0.240741
0.407407
0
0
0
0
0
0
0
0
0
0.066667
120
2
70
60
0.964286
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
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
7
742a8be10c4c217737d25f821b63af98c8b22766
6,288
py
Python
tests/test_configs.py
hipster-philology/pandora
613fc114a3faf2b49c7094d756583d0385b1ab65
[ "MIT" ]
8
2017-11-06T14:04:56.000Z
2021-10-04T10:38:23.000Z
tests/test_configs.py
hipster-philology/pandora
613fc114a3faf2b49c7094d756583d0385b1ab65
[ "MIT" ]
95
2017-02-06T13:49:43.000Z
2018-06-14T07:51:30.000Z
tests/test_configs.py
hipster-philology/pandora
613fc114a3faf2b49c7094d756583d0385b1ab65
[ "MIT" ]
3
2017-02-08T21:15:39.000Z
2018-04-09T13:46:13.000Z
from unittest import TestCase import os import shutil from pandora.tagger import Tagger from pandora.tagger import MODELS TEST, DEV, TRAIN = "data/geste/test", "data/geste/dev", "data/geste/train" class TestConfigLoader(TestCase): def setUp(self): try: os.makedirs("fake_model") except: pass def tearDown(self): shutil.rmtree("fake_model") def test_load(self): """ Ensure params are correctly loaded """ tagger = Tagger(config_path="./tests/test_configs/config_chrestien.txt") self.assertEqual(tagger.nb_encoding_layers, 2, "nb_encoding_layers should be correctly loaded") self.assertEqual(tagger.nb_epochs, 3, "nb_epochs should be correctly loaded") self.assertEqual(tagger.nb_dense_dims, 1000, "nb_dense_dims should be correctly loaded") self.assertEqual(tagger.batch_size, 100, "batch_size should be correctly loaded") self.assertEqual(tagger.nb_left_tokens, 2, "nb_left_tokens should be correctly loaded") self.assertEqual(tagger.nb_right_tokens, 1, "nb_right_tokens should be correctly loaded") self.assertEqual(tagger.nb_context_tokens, 3, "nb_context_tokens should be correctly computed") self.assertEqual(tagger.nb_embedding_dims, 100, "nb_embedding_dims should be correctly loaded") self.assertEqual(tagger.model_dir, "fake_model", "model_dir should be correctly loaded") self.assertEqual(tagger.postcorrect, False, "postcorrect should be correctly loaded") self.assertEqual(tagger.nb_filters, 100, "nb_filters should be correctly loaded") self.assertEqual(tagger.filter_length, 3, "filter_length should be correctly loaded") self.assertEqual(tagger.focus_repr, "convolutions", "focus_repr should be correctly loaded") self.assertEqual(tagger.dropout_level, 0.15, "dropout_level should be correctly loaded") self.assertEqual(tagger.include_token, True, "include_token should be correctly loaded") self.assertEqual(tagger.include_context, True, "include_context should be correctly loaded") self.assertEqual(tagger.include_lemma, "label", "include_lemma should be correctly loaded") self.assertEqual(tagger.include_pos, True, "include_pos should be correctly loaded") self.assertEqual(tagger.include_morph, False, "include_morph should be correctly loaded") self.assertEqual(tagger.include_dev, True, "include_dev should be correctly loaded") self.assertEqual(tagger.include_test, True, "include_test should be correctly loaded") self.assertEqual(tagger.min_token_freq_emb, 5, "min_token_freq_emb should be correctly loaded") self.assertEqual(tagger.halve_lr_at, 75, "halve_lr_at should be correctly loaded") self.assertEqual(tagger.max_token_len, 20, "max_token_len should be correctly loaded") self.assertEqual(tagger.min_lem_cnt, 1, "min_lem_cnt should be correctly loaded") def test_load_after_save(self): """ Ensure param are correctly saved """ tagger = Tagger.setup_from_disk( config_path="./tests/test_configs/config_chrestien.txt", train_data=TRAIN, dev_data=DEV, test_data=TEST ) tagger.include_pos = False tagger.curr_nb_epochs = 10 tagger.save_params() self.assertEqual(tagger.pretrainer.nb_workers, 1, "Pretrainer Workers should be correctly loaded") del tagger tagger = Tagger(config_path="./fake_model/config.txt") self.assertEqual(tagger.nb_encoding_layers, 2, "nb_encoding_layers should be correctly loaded") self.assertEqual(tagger.nb_epochs, 3, "nb_epochs should be correctly loaded") self.assertEqual(tagger.nb_dense_dims, 1000, "nb_dense_dims should be correctly loaded") self.assertEqual(tagger.batch_size, 100, "batch_size should be correctly loaded") self.assertEqual(tagger.nb_left_tokens, 2, "nb_left_tokens should be correctly loaded") self.assertEqual(tagger.nb_right_tokens, 1, "nb_right_tokens should be correctly loaded") self.assertEqual(tagger.nb_context_tokens, 3, "nb_context_tokens should be correctly computed") self.assertEqual(tagger.nb_embedding_dims, 100, "nb_embedding_dims should be correctly loaded") self.assertEqual(tagger.model_dir, "fake_model", "model_dir should be correctly loaded") self.assertEqual(tagger.postcorrect, False, "postcorrect should be correctly loaded") self.assertEqual(tagger.nb_filters, 100, "nb_filters should be correctly loaded") self.assertEqual(tagger.filter_length, 3, "filter_length should be correctly loaded") self.assertEqual(tagger.focus_repr, "convolutions", "focus_repr should be correctly loaded") self.assertEqual(tagger.dropout_level, 0.15, "dropout_level should be correctly loaded") self.assertEqual(tagger.include_token, True, "include_token should be correctly loaded") self.assertEqual(tagger.include_context, True, "include_context should be correctly loaded") self.assertEqual(tagger.include_lemma, "label", "include_lemma should be correctly loaded") self.assertEqual(tagger.include_pos, False, "include_pos should be correctly loaded") self.assertEqual(tagger.include_morph, False, "include_morph should be correctly loaded") self.assertEqual(tagger.include_dev, True, "include_dev should be correctly loaded") self.assertEqual(tagger.include_test, True, "include_test should be correctly loaded") self.assertEqual(tagger.min_token_freq_emb, 5, "min_token_freq_emb should be correctly loaded") self.assertEqual(tagger.halve_lr_at, 75, "halve_lr_at should be correctly loaded") self.assertEqual(tagger.max_token_len, 20, "max_token_len should be correctly loaded") self.assertEqual(tagger.min_lem_cnt, 1, "min_lem_cnt should be correctly loaded") self.assertEqual(tagger.curr_nb_epochs, 10, "Current number of epochs should be correctly loaded") self.assertEqual(tagger.model, "PyTorch", "PyTorch implementation is loaded") tagger = Tagger(config_path="./fake_model/config.txt", load=True) self.assertIsInstance(tagger.model, MODELS["PyTorch"], "PyTorch implementation is loaded")
67.612903
115
0.74014
825
6,288
5.435152
0.134545
0.177297
0.248216
0.256467
0.863515
0.835861
0.835861
0.831178
0.782783
0.782783
0
0.011679
0.16937
6,288
92
116
68.347826
0.846831
0.010814
0
0.6
0
0
0.389202
0.020629
0
0
0
0
0.675
1
0.05
false
0.0125
0.0625
0
0.125
0
0
0
0
null
0
1
1
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
1
0
0
0
0
0
0
0
0
0
9
7435e823772eaac230f997774c3e89cfb23ab7f2
6,899
py
Python
src/randonet/pytorch/rnn.py
ahgamut/randonet
b55241809318d70e97c7718b3fcdc91a7219f269
[ "MIT" ]
null
null
null
src/randonet/pytorch/rnn.py
ahgamut/randonet
b55241809318d70e97c7718b3fcdc91a7219f269
[ "MIT" ]
null
null
null
src/randonet/pytorch/rnn.py
ahgamut/randonet
b55241809318d70e97c7718b3fcdc91a7219f269
[ "MIT" ]
null
null
null
from randonet.generator.param import ( Param, IntParam, FloatParam, BinaryParam, ChoiceParam, TupleParam, ) from randonet.generator.unit import Unit, Factory as _Factory from randonet.generator.conv import ConvFactory, ConvTransposeFactory from collections import namedtuple class RNN(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple( "RNN", [ "input_size", "hidden_size", "num_layers", "bias", "batch_first", "dropout", "bidirectional", ], ) self.params = self.template_fn( input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), num_layers=IntParam(name="num_layers", default=1), bias=BinaryParam(name="bias", default=True, true_prob=0.5), batch_first=BinaryParam(name="batch_first", default=False, true_prob=0.5), dropout=IntParam(name="dropout", default=0.0), bidirectional=BinaryParam( name="bidirectional", default=False, true_prob=0.5 ), ) for k, v in kwargs.items(): getattr(self.params, k).val = v class LSTM(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple( "LSTM", [ "input_size", "hidden_size", "num_layers", "bias", "batch_first", "dropout", "bidirectional", ], ) self.params = self.template_fn( input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), num_layers=IntParam(name="num_layers", default=1), bias=BinaryParam(name="bias", default=True, true_prob=0.5), batch_first=BinaryParam(name="batch_first", default=False, true_prob=0.5), dropout=IntParam(name="dropout", default=0.0), bidirectional=BinaryParam( name="bidirectional", default=False, true_prob=0.5 ), ) for k, v in kwargs.items(): getattr(self.params, k).val = v class GRU(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple( "GRU", [ "input_size", "hidden_size", "num_layers", "bias", "batch_first", "dropout", "bidirectional", ], ) self.params = self.template_fn( input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), num_layers=IntParam(name="num_layers", default=1), bias=BinaryParam(name="bias", default=True, true_prob=0.5), batch_first=BinaryParam(name="batch_first", default=False, true_prob=0.5), dropout=IntParam(name="dropout", default=0.0), bidirectional=BinaryParam( name="bidirectional", default=False, true_prob=0.5 ), ) for k, v in kwargs.items(): getattr(self.params, k).val = v class LSTMCell(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple("LSTMCell", ["input_size", "hidden_size", "bias"]) self.params = self.template_fn( input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), bias=BinaryParam(name="bias", default=True, true_prob=0.5), ) for k, v in kwargs.items(): getattr(self.params, k).val = v class GRUCell(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple("GRUCell", ["input_size", "hidden_size", "bias"]) self.params = self.template_fn( input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), bias=BinaryParam(name="bias", default=True, true_prob=0.5), ) for k, v in kwargs.items(): getattr(self.params, k).val = v class RNNCellBase(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple( "RNNCellBase", ["input_size", "hidden_size", "bias", "num_chunks"] ) self.params = self.template_fn( input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), bias=Param(name="bias", default=None), num_chunks=Param(name="num_chunks", default=None), ) for k, v in kwargs.items(): getattr(self.params, k).val = v class RNNCell(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple( "RNNCell", ["input_size", "hidden_size", "bias", "nonlinearity"] ) self.params = self.template_fn( input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), bias=BinaryParam(name="bias", default=True, true_prob=0.5), nonlinearity=ChoiceParam( name="nonlinearity", choices=("tanh",), cprobs=(1,), default="tanh" ), ) for k, v in kwargs.items(): getattr(self.params, k).val = v class RNNBase(_Factory): def __init__(self, **kwargs): _Factory.__init__(self) self.template_fn = namedtuple( "RNNBase", [ "mode", "input_size", "hidden_size", "num_layers", "bias", "batch_first", "dropout", "bidirectional", ], ) self.params = self.template_fn( mode=Param(name="mode", default=None), input_size=IntParam(name="input_size", default=1), hidden_size=Param(name="hidden_size", default=None), num_layers=IntParam(name="num_layers", default=1), bias=BinaryParam(name="bias", default=True, true_prob=0.5), batch_first=BinaryParam(name="batch_first", default=False, true_prob=0.5), dropout=IntParam(name="dropout", default=0.0), bidirectional=BinaryParam( name="bidirectional", default=False, true_prob=0.5 ), ) for k, v in kwargs.items(): getattr(self.params, k).val = v
35.561856
88
0.551529
731
6,899
4.949384
0.090287
0.059701
0.061913
0.041459
0.856551
0.843836
0.843836
0.843836
0.843836
0.843836
0
0.01086
0.319322
6,899
193
89
35.746114
0.759583
0
0
0.711864
0
0
0.121467
0
0
0
0
0
0
1
0.045198
false
0
0.022599
0
0.112994
0
0
0
0
null
0
0
0
1
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
7
744d71ef3fc7d12fe14127fb797f97e81d72faaf
14,719
py
Python
appengine/monorail/services/test/spam_svc_test.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
1
2018-01-02T05:47:07.000Z
2018-01-02T05:47:07.000Z
appengine/monorail/services/test/spam_svc_test.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
null
null
null
appengine/monorail/services/test/spam_svc_test.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is govered by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Tests for the spam service.""" import unittest import mox from google.appengine.ext import testbed import settings from framework import sql from proto import user_pb2 from proto import tracker_pb2 from services import spam_svc from testing import fake class SpamServiceTest(unittest.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activate() self.mox = mox.Mox() self.mock_report_tbl = self.mox.CreateMock(sql.SQLTableManager) self.mock_verdict_tbl = self.mox.CreateMock(sql.SQLTableManager) self.mock_issue_tbl = self.mox.CreateMock(sql.SQLTableManager) self.cnxn = self.mox.CreateMock(sql.MonorailConnection) self.issue_service = fake.IssueService() self.spam_service = spam_svc.SpamService() self.spam_service.report_tbl = self.mock_report_tbl self.spam_service.verdict_tbl = self.mock_verdict_tbl self.spam_service.issue_tbl = self.mock_issue_tbl def tearDown(self): self.testbed.deactivate() self.mox.UnsetStubs() self.mox.ResetAll() def testLookupFlaggers(self): self.mock_report_tbl.Select( self.cnxn, cols=['user_id', 'comment_id'], issue_id=234).AndReturn([[111L, None], [222L, 1]]) self.mox.ReplayAll() issue_reporters, comment_reporters = ( self.spam_service.LookupIssueFlaggers(self.cnxn, 234)) self.mox.VerifyAll() self.assertItemsEqual([111L], issue_reporters) self.assertEqual({1: [222L]}, comment_reporters) def testFlagIssues_overThresh(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901) self.mock_report_tbl.InsertRows(self.cnxn, ['issue_id', 'reported_user_id', 'user_id'], [(78901, 111L, 111L)], ignore=True) self.mock_report_tbl.Select(self.cnxn, cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh)]) self.mock_verdict_tbl.Select( self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([]) self.mock_verdict_tbl.InsertRows( self.cnxn, ['issue_id', 'is_spam', 'reason', 'project_id'], [(78901, True, 'threshold', 789)], ignore=True) self.mox.ReplayAll() self.spam_service.FlagIssues( self.cnxn, self.issue_service, [issue], 111L, True) self.mox.VerifyAll() self.assertIn(issue, self.issue_service.updated_issues) def testFlagIssues_underThresh(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901) self.mock_report_tbl.InsertRows(self.cnxn, ['issue_id', 'reported_user_id', 'user_id'], [(78901, 111L, 111L)], ignore=True) self.mock_report_tbl.Select(self.cnxn, cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh - 1)]) self.mock_verdict_tbl.Select( self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([]) self.mox.ReplayAll() self.spam_service.FlagIssues( self.cnxn, self.issue_service, [issue], 111L, True) self.mox.VerifyAll() self.assertNotIn(issue, self.issue_service.updated_issues) def testUnflagIssue_overThresh(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901, is_spam=True) self.mock_report_tbl.Delete(self.cnxn, issue_id=[issue.issue_id], comment_id=None, user_id=111L) self.mock_report_tbl.Select(self.cnxn, cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh)]) self.mock_verdict_tbl.Select( self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([]) self.mox.ReplayAll() self.spam_service.FlagIssues( self.cnxn, self.issue_service, [issue], 111L, False) self.mox.VerifyAll() self.assertNotIn(issue, self.issue_service.updated_issues) self.assertEqual(True, issue.is_spam) def testUnflagIssue_underThresh(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901, is_spam=True) self.mock_report_tbl.Delete(self.cnxn, issue_id=[issue.issue_id], comment_id=None, user_id=111L) self.mock_report_tbl.Select(self.cnxn, cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh - 1)]) self.mock_verdict_tbl.Select( self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([]) self.mock_verdict_tbl.InsertRows( self.cnxn, ['issue_id', 'is_spam', 'reason', 'project_id'], [(78901, False, 'threshold', 789)], ignore=True) self.mox.ReplayAll() self.spam_service.FlagIssues( self.cnxn, self.issue_service, [issue], 111L, False) self.mox.VerifyAll() self.assertIn(issue, self.issue_service.updated_issues) self.assertEqual(False, issue.is_spam) def testUnflagIssue_underThreshNoManualOerride(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901, is_spam=True) self.mock_report_tbl.Delete(self.cnxn, issue_id=[issue.issue_id], comment_id=None, user_id=111L) self.mock_report_tbl.Select(self.cnxn, cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh - 1)]) self.mock_verdict_tbl.Select( self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'], group_by=['issue_id'], issue_id=[78901]).AndReturn([(78901, 'manual', '')]) self.mox.ReplayAll() self.spam_service.FlagIssues( self.cnxn, self.issue_service, [issue], 111L, False) self.mox.VerifyAll() self.assertNotIn(issue, self.issue_service.updated_issues) self.assertEqual(True, issue.is_spam) def testGetIssueClassifierQueue_noVerdicts(self): self.mock_verdict_tbl.Select(self.cnxn, cols=['issue_id', 'is_spam', 'reason', 'classifier_confidence', 'created'], where=[ ('project_id = %s', [789]), ('classifier_confidence <= %s', [settings.classifier_moderation_thresh]), ('overruled = %s', [False]), ('issue_id IS NOT NULL', []), ], order_by=[ ('classifier_confidence ASC', []), ('created ASC', []) ], group_by=['issue_id'], offset=0, limit=10, ).AndReturn([]) self.mock_verdict_tbl.SelectValue(self.cnxn, col='COUNT(*)', where=[ ('project_id = %s', [789]), ('classifier_confidence <= %s', [settings.classifier_moderation_thresh]), ('overruled = %s', [False]), ('issue_id IS NOT NULL', []), ]).AndReturn(0) self.mox.ReplayAll() res, count = self.spam_service.GetIssueClassifierQueue( self.cnxn, self.issue_service, 789) self.mox.VerifyAll() self.assertEqual([], res) self.assertEqual(0, count) def testGetIssueClassifierQueue_someVerdicts(self): self.mock_verdict_tbl.Select(self.cnxn, cols=['issue_id', 'is_spam', 'reason', 'classifier_confidence', 'created'], where=[ ('project_id = %s', [789]), ('classifier_confidence <= %s', [settings.classifier_moderation_thresh]), ('overruled = %s', [False]), ('issue_id IS NOT NULL', []), ], order_by=[ ('classifier_confidence ASC', []), ('created ASC', []) ], group_by=['issue_id'], offset=0, limit=10, ).AndReturn([[78901, 0, "classifier", 0.9, "2015-12-10 11:06:24"]]) self.mock_verdict_tbl.SelectValue(self.cnxn, col='COUNT(*)', where=[ ('project_id = %s', [789]), ('classifier_confidence <= %s', [settings.classifier_moderation_thresh]), ('overruled = %s', [False]), ('issue_id IS NOT NULL', []), ]).AndReturn(10) self.mox.ReplayAll() res, count = self.spam_service.GetIssueClassifierQueue( self.cnxn, self.issue_service, 789) self.mox.VerifyAll() self.assertEqual(1, len(res)) self.assertEqual(10, count) self.assertEqual(78901, res[0].issue_id) self.assertEqual(False, res[0].is_spam) self.assertEqual("classifier", res[0].reason) self.assertEqual(0.9, res[0].classifier_confidence) self.assertEqual("2015-12-10 11:06:24", res[0].verdict_time) def testIsExempt_RegularUser(self): author = user_pb2.MakeUser(111L, email='test@example.com') self.assertFalse(self.spam_service._IsExempt(author, False)) author = user_pb2.MakeUser(111L, email='test@chromium.org.example.com') self.assertFalse(self.spam_service._IsExempt(author, False)) def testIsExempt_ProjectMember(self): author = user_pb2.MakeUser(111L, email='test@example.com') self.assertTrue(self.spam_service._IsExempt(author, True)) def testIsExempt_WhitelistedDomain(self): author = user_pb2.MakeUser(111L, email='test@google.com') self.assertTrue(self.spam_service._IsExempt(author, False)) def testIsExempt_TrustedNotToSpam(self): author = user_pb2.MakeUser(111L, email='test@example.com') author.ignore_action_limits = True self.assertTrue(self.spam_service._IsExempt(author, False)) def testClassifyIssue_spam(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901, is_spam=True) self.spam_service._predict = lambda body: ( {'outputLabel': 'spam'}) # Prevent missing service inits to fail the test. self.spam_service.prediction_service = True comment_pb = tracker_pb2.IssueComment() comment_pb.content = "this is spam" reporter = user_pb2.MakeUser(111L, email='test@test.com') res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False) self.assertEqual('spam', res['outputLabel']) reporter.email = 'test@chromium.org.spam.com' res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False) self.assertEqual('spam', res['outputLabel']) reporter.email = 'test.google.com@test.com' res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False) self.assertEqual('spam', res['outputLabel']) def testClassifyIssue_Whitelisted(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901, is_spam=True) self.spam_service._predict = lambda *args: { 'outputLabel': 'this should not be called' } # Prevent missing service inits to fail the test. self.spam_service.prediction_service = True comment_pb = tracker_pb2.IssueComment() comment_pb.content = "this is spam" reporter = user_pb2.MakeUser(111L, email='test@google.com') res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False) self.assertEqual('ham', res['outputLabel']) reporter.email = 'test@chromium.org' res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False) self.assertEqual('ham', res['outputLabel']) def testClassifyIssue_IgnoreActionLimitsAndSpam(self): issue = fake.MakeTestIssue( project_id=789, local_id=1, reporter_id=111L, owner_id=456, summary='sum', status='Live', issue_id=78901, is_spam=True) self.spam_service._predict = lambda *args: { 'outputLabel': 'this should not be called' } # Prevent missing service inits to fail the test. self.spam_service.prediction_service = True comment_pb = tracker_pb2.IssueComment() comment_pb.content = "this is spam" reporter = user_pb2.MakeUser(111L, email='test@example.com') reporter.ignore_action_limits = True res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False) self.assertEqual('ham', res['outputLabel']) def testClassifyComment_spam(self): self.spam_service._predict = lambda body: ( {'outputLabel': 'spam'}) # Prevent missing service inits to fail the test. self.spam_service.prediction_service = True commenter = user_pb2.MakeUser(111L, email='test@test.com') res = self.spam_service.ClassifyComment('this is spam', commenter, False) self.assertEqual('spam', res['outputLabel']) commenter.email = 'test@chromium.org.spam.com' res = self.spam_service.ClassifyComment('this is spam', commenter, False) self.assertEqual('spam', res['outputLabel']) commenter.email = 'test.google.com@test.com' res = self.spam_service.ClassifyComment('this is spam', commenter, False) self.assertEqual('spam', res['outputLabel']) def testClassifyComment_Whitelisted(self): self.spam_service._predict = lambda *args: { 'outputLabel': 'this should not be called' } # Prevent missing service inits to fail the test. self.spam_service.prediction_service = True commenter = user_pb2.MakeUser(111L, email='test@google.com') res = self.spam_service.ClassifyComment('this is spam', commenter, False) self.assertEqual('ham', res['outputLabel']) commenter.email = 'test@chromium.org' res = self.spam_service.ClassifyComment('this is spam', commenter, False) self.assertEqual('ham', res['outputLabel']) def testClassifyComment_IgnoreActionLimitsAndSpam(self): self.spam_service._predict = lambda *args: { 'outputLabel': 'this should not be called' } # Prevent missing service inits to fail the test. self.spam_service.prediction_service = True commenter = user_pb2.MakeUser(111L, email='test@example.com') commenter.ignore_action_limits = True res = self.spam_service.ClassifyComment('this is spam', commenter, False) self.assertEqual('ham', res['outputLabel'])
38.430809
77
0.672872
1,827
14,719
5.224959
0.110016
0.042531
0.064425
0.023151
0.820972
0.809659
0.806306
0.795307
0.753405
0.742196
0
0.034869
0.187513
14,719
382
78
38.531414
0.763358
0.034106
0
0.69967
0
0
0.130186
0.020957
0
0
0
0
0.118812
0
null
null
0
0.029703
null
null
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
1
0
0
0
0
0
0
0
0
7
7471504461794ecaeb1a5979afa34183aa804c70
94
py
Python
keyboards/inline/__init__.py
NikolaySimakov/Shop-bot
c13d5a2b91d9524af156948ff0014ff5357c376c
[ "MIT" ]
50
2020-09-27T13:27:02.000Z
2022-03-28T13:11:33.000Z
keyboards/inline/__init__.py
NikolaySimakov/Shop-bot
c13d5a2b91d9524af156948ff0014ff5357c376c
[ "MIT" ]
null
null
null
keyboards/inline/__init__.py
NikolaySimakov/Shop-bot
c13d5a2b91d9524af156948ff0014ff5357c376c
[ "MIT" ]
18
2021-02-06T16:54:50.000Z
2022-03-25T07:49:37.000Z
from . import products_from_catalog from . import products_from_cart from . import categories
23.5
35
0.840426
13
94
5.769231
0.461538
0.4
0.48
0.586667
0
0
0
0
0
0
0
0
0.12766
94
3
36
31.333333
0.914634
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
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
779242e4906482c689dc7ffbc3cec9b7fc29814c
9,376
py
Python
tests/test_permissions.py
tordne/Flask-Authorize
c440e3328e7fb509ecb18acf77d07aa8a0fe2dde
[ "MIT" ]
null
null
null
tests/test_permissions.py
tordne/Flask-Authorize
c440e3328e7fb509ecb18acf77d07aa8a0fe2dde
[ "MIT" ]
null
null
null
tests/test_permissions.py
tordne/Flask-Authorize
c440e3328e7fb509ecb18acf77d07aa8a0fe2dde
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Testing for access control list authorization. # # ------------------------------------------------ # imports # ------- from sqlalchemy import and_ from flask import g from .fixtures import authorize, Article, ArticleFactory # helpers # ------- def query(name, check): return Article.query.filter(and_( Article.name.contains(name), Article.authorized(check) )).all() # session # ------- class TestOtherPermissions(object): def test_other_delete(self, client, reader, editor): # other open read permissions g.user = None article = ArticleFactory.create( name='Other Delete Open Article', owner=editor, group=editor.groups[0] ).set_permissions('001') g.user = reader assert authorize.delete(article) assert query(article.name, 'delete') # other closed read permissions g.user = None article = ArticleFactory.create( name='Other Delete Closed Article', owner=editor, group=editor.groups[0] ).set_permissions('770') g.user = reader assert not authorize.delete(article) assert not query(article.name, 'delete') return def test_other_read(self, client, reader, editor): # other open read permissions g.user = None article = ArticleFactory.create( name='Other Read Open Article', owner=editor, group=editor.groups[0] ).set_permissions('002') g.user = reader assert authorize.read(article) assert query(article.name, 'read') # other closed read permissions g.user = None article = ArticleFactory.create( name='Other Read Closed Article', owner=editor, group=editor.groups[0] ).set_permissions('660') g.user = reader assert not authorize.read(article) assert not query(article.name, 'read') return def test_other_update(self, reader, editor): # other open update permissions g.user = None article = ArticleFactory.create( name='Other Write Open Article', owner=editor, group=editor.groups[0] ).set_permissions('004') g.user = reader assert authorize.update(article) assert query(article.name, 'update') # other closed update permissions g.user = None article = ArticleFactory.create( name='Other Write Closed Article', owner=editor, group=editor.groups[0] ).set_permissions('662') g.user = reader assert not authorize.update(article) assert not query(article.name, 'update') return def test_other_custom(self, reader, editor): # other open custom permissions g.user = None article = ArticleFactory.create( name='Other Custom Open Article', owner=editor, group=editor.groups[0] ).set_permissions(other=['custom']) g.user = reader assert authorize.custom(article) assert query(article.name, 'custom') # other closed custom permissions g.user = None article = ArticleFactory.create( name='Other Custom Closed Article', owner=editor, group=editor.groups[0] ) g.user = reader assert not authorize.custom(article) assert not query(article.name, 'custom') return class TestOwnerPermissions(object): def test_owner_delete(self, client, reader, editor): g.user = reader # other open read permissions article = ArticleFactory.create( name='Owner Delete Open Article', owner=reader, group=editor.groups[0] ).set_permissions('100') assert authorize.delete(article) assert query(article.name, 'delete') # other closed read permissions article = ArticleFactory.create( name='Owner Delete Closed Article', owner=reader, group=editor.groups[0] ).set_permissions('070') assert not authorize.delete(article) assert not query(article.name, 'delete') return def test_owner_read(self, client, reader, editor): g.user = reader # other open read permissions article = ArticleFactory.create( name='Owner Read Open Article', owner=reader, group=editor.groups[0] ).set_permissions('200') assert authorize.read(article) assert query(article.name, 'read') # other closed read permissions article = ArticleFactory.create( name='Owner Read Closed Article', owner=reader, group=editor.groups[0] ).set_permissions('170') assert not authorize.read(article) assert not query(article.name, 'read') return def test_owner_update(self, reader, editor): g.user = reader # other open update permissions article = ArticleFactory.create( name='Owner Write Open Article', owner=reader, group=editor.groups[0] ).set_permissions('400') assert authorize.update(article) assert query(article.name, 'update') # other closed update permissions article = ArticleFactory.create( name='Owner Write Closed Article', owner=reader, group=editor.groups[0] ).set_permissions('270') assert not authorize.update(article) assert not query(article.name, 'update') return def test_owner_custom(self, reader, editor): g.user = reader # other open update permissions article = ArticleFactory.create( name='Owner Custom Open Article', owner=reader, group=editor.groups[0] ).set_permissions(owner=['custom']) assert authorize.custom(article) assert query(article.name, 'custom') # other closed update permissions article = ArticleFactory.create( name='Owner Custom Closed Article', owner=reader, group=editor.groups[0] ) assert not authorize.custom(article) assert not query(article.name, 'custom') return class TestGroupPermissions(object): def test_group_delete(self, client, reader, editor): g.user = editor # other open read permissions article = ArticleFactory.create( name='Group Delete Open Article', owner=reader, group=editor.groups[0] ).set_permissions('010') assert authorize.delete(article) assert query(article.name, 'delete') # other closed read permissions article = ArticleFactory.create( name='Group Delete Closed Article', owner=reader, group=editor.groups[0] ).set_permissions('700') assert not authorize.delete(article) assert not query(article.name, 'delete') return def test_group_read(self, client, reader, editor): g.user = editor # other open read permissions article = ArticleFactory.create( name='Group Read Open Article', owner=reader, group=editor.groups[0] ).set_permissions('020') assert authorize.read(article) assert query(article.name, 'read') # other closed read permissions article = ArticleFactory.create( name='Group Read Closed Article', owner=reader, group=editor.groups[0] ).set_permissions('710') assert not authorize.read(article) assert not query(article.name, 'read') return def test_group_update(self, reader, editor): g.user = editor # other open update permissions article = ArticleFactory.create( name='Group Write Open Article', owner=reader, group=editor.groups[0] ).set_permissions('040') assert authorize.update(article) assert query(article.name, 'update') # other closed update permissions article = ArticleFactory.create( name='Group Write Closed Article', owner=reader, group=editor.groups[0] ).set_permissions('720') assert not authorize.update(article) assert not query(article.name, 'update') return def test_group_custom(self, reader, editor): g.user = editor # other open update permissions article = ArticleFactory.create( name='Group Write Open Article', owner=reader, group=editor.groups[0] ).set_permissions(group=['custom']) assert authorize.custom(article) assert query(article.name, 'custom') # other closed update permissions article = ArticleFactory.create( name='Group Write Closed Article', owner=reader, group=editor.groups[0] ) assert not authorize.custom(article) assert not query(article.name, 'custom') return
29.859873
56
0.588417
964
9,376
5.674274
0.080913
0.095978
0.118464
0.136015
0.90841
0.889397
0.876965
0.873309
0.863437
0.857952
0
0.012261
0.31282
9,376
313
57
29.955272
0.836722
0.09439
0
0.704846
0
0
0.095565
0
0
0
0
0
0.211454
1
0.057269
false
0
0.013216
0.004405
0.140969
0
0
0
0
null
0
0
0
1
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
7
77f05920b3c1eb8ac1d38d8c9c76582bc01b49e2
43,236
py
Python
Resume-Parser-master-new/updateYamlViaScraping.py
eitrheim/Resume-Screening-and-Selection
4ee2dd0d6ba917bcf244c704ef5042fe7596e600
[ "MIT" ]
14
2020-02-28T22:18:19.000Z
2022-03-27T17:35:21.000Z
Resume-Parser-master-new/updateYamlViaScraping.py
eitrheim/Resume-Screening-and-Selection
4ee2dd0d6ba917bcf244c704ef5042fe7596e600
[ "MIT" ]
1
2020-03-30T12:47:08.000Z
2020-03-30T12:47:08.000Z
Resume-Parser-master-new/updateYamlViaScraping.py
eitrheim/Resume-Screening-and-Selection
4ee2dd0d6ba917bcf244c704ef5042fe7596e600
[ "MIT" ]
7
2020-05-06T04:33:55.000Z
2022-03-23T08:43:51.000Z
import yaml from bs4 import BeautifulSoup as bs import requests import re import itertools from operator import itemgetter def update_yaml(main_section, sub_section, wiki_extension): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/' + wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") for i, li in enumerate(soup.select('li')): if list(li.attrs.keys()) == ['class']: pass elif list(li.attrs.keys()) == ['id']: pass elif list(li.attrs.keys()) == ['style']: pass elif li.text == 'Private equity firm': break elif li.text == 'Fitness wear': break elif li.text == 'Canadian Petroleum Companies': break elif li.text == 'Casual': break elif li.text == 'Acorn Computers': break elif li.text == 'Enterprise search': break elif li.text == 'Distance education institutions based in the United States': break elif 'List of ' in li.text: break elif 'Lists of ' in li.text: break elif li.text == 'Electronic design': break elif li.text == 'Yazoo and Mississippi Valley Railroad': break elif li.text == 'Airline codes': break elif li.text == 'Telegram & Gazette': break elif li.text == 'Film treatment': break elif li.text == 'Ocean Freeze Frozen Yogurt': break elif li.text == 'Bass effects': break elif li.text == 'Multinational company topics': break elif li.text == 'Great Books Program': break elif li.text == 'Higher education in the United States': break elif li.text == 'Polytechnics': break else: x = li.text x = x.split(' (')[0].split('[')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\'', '').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_dash_comma_split(main_section, sub_section, wiki_extension): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/' + wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") for i, li in enumerate(soup.select('li')): if list(li.attrs.keys()) == ['class']: pass elif list(li.attrs.keys()) == ['id']: pass elif list(li.attrs.keys()) == ['style']: pass elif 'List of ' in li.text: break elif 'Lists of ' in li.text: break elif li.text == '3D printer companies': break elif li.text == 'Electronic design': break elif li.text == 'Official website': break elif li.text == 'Land Grant Colleges': break elif li.text == 'Catholicism portal': break elif li.text == 'Student loan debt': break elif li.text == 'Art school': break else: x = li.text x = x.split(' (')[0].split('[')[0].split(' –')[0].split(' -')[0].split(',')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\'', '').replace('–', ' ').replace('–', ' ').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table1(main_section, sub_section, wiki_extension, col): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/'+wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.find('table', class_='sortable wikitable') for row in right_table.findAll('tr'): cells = row.findAll('td') if len(cells) > 1: x = cells[col].text.split('[')[0].split(' /')[0].split('(')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '').replace(' ^', '').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table2(main_section, sub_section, wiki_extension, col): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/'+wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.find('table', class_='wikitable sortable') for row in right_table.findAll('tr'): cells = row.findAll('td') if len(cells) > 1: x = cells[col].text.split('[')[0].split(' /')[0].split('(')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '').replace(' ^', '').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table2lists(main_section, sub_section, wiki_extension, col): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/'+wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.find('table', class_='wikitable sortable') for row in right_table.findAll('tr'): cells = row.findAll('td') if len(cells) > 1: for x in cells[col].text.split(','): x = x.split('[')[0].split(' /')[0].split('(')[0] x = re.sub('[.]', '', x).replace('-', '').replace('\n', '').replace('\'', '').replace(' ^', '').lstrip() if x != "": print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table3(main_section, sub_section, wiki_extension, col): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/'+wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.find('table', class_='wikitable plainrowheaders sortable') for row in right_table.findAll('tr'): cells = row.findAll('td') if len(cells) > 1: x = cells[col].text.split('[')[0].split(' /')[0].split('(')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '').replace(' ^', '').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table4(main_section, sub_section, wiki_extension, col): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/'+wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.find('table', class_='wikitable') for row in right_table.findAll('tr'): cells = row.findAll('td') if len(cells) > 1: x = cells[col].text.split('[')[0].split(' /')[0].split('(')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '').replace(' ^', '').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table4all(main_section, sub_section, wiki_extension, col): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/'+wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.findAll('table', class_='wikitable') for table in right_table: # print(table) for row in table.findAll('tr'): cells = row.findAll('td') if len(cells) > 1: x = cells[col].text.split('[')[0].split(' /')[0].split('(')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '').replace(' ^', '').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table5(main_section, sub_section, wiki_extension, col): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/'+wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.find('table') for row in right_table.findAll('tr'): cells = row.findAll('td') if len(cells) > 1: x = cells[col].text.split('[')[0].split(' /')[0].split('(')[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '').replace(' ^', '').lstrip() print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table6(main_section, sub_section, wiki_extension): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/' + wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") try: right_table = soup.find('table', class_='sortable wikitable') for row in right_table.findAll('tr'): for col in row.findAll('th'): for tag in col.find_all(True): if tag.text in ['Location', 'Partners', 'Industries', 'Assets under management']: pass else: x = tag.text.split(" (")[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '') print(x) data_loaded[main_section][sub_section].append(x.lower()) except: right_table = soup.find('table', class_='wikitable sortable') for row in right_table.findAll('tr'): for col in row.findAll('th'): for tag in col.find_all(True): if tag.text in ['Location', 'Partners', 'Industries', 'Assets under management']: pass else: x = tag.text.split(" (")[0] x = re.sub('[,.-]', '', x).replace('\n', '').replace('\'', '') print(x) data_loaded[main_section][sub_section].append(x) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def update_yaml_table7(main_section, sub_section, wiki_extension): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) print("Accessing Wikipedia") html = requests.get('https://en.wikipedia.org/wiki/' + wiki_extension).text soup = bs(html, 'html.parser') print("Getting List Items and Adding to YAML\n") right_table = soup.find('table') for row in right_table.findAll('tr'): for col in row.findAll('th'): for tag in col.find_all(True): if tag.text in ['Location', 'Partners', 'Industries', 'Assets under management']: pass else: x = tag.text.split(" (")[0] x = re.sub('[,.]', '', x).replace('-', '').replace('\n', '').replace('\'', '') print(x) data_loaded[main_section][sub_section].append(x.lower()) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=lambda x: x[0]) data_loaded[main_section][sub_section] = list( k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) print("\nSorted and Dropped Duplicates") except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") def sort_yaml(main_section, sub_section): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) try: data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=itemgetter(0, 1)) data_loaded[main_section][sub_section] = list(k for k, _ in itertools.groupby(data_loaded[main_section][sub_section])) data_loaded[main_section][sub_section] = sorted(data_loaded[main_section][sub_section], key=itemgetter(0, 1)) except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print(sub_section, "Sorted & Saved") def sort_yaml_flat(main_section, sub_section): with open('confs/config.yaml', 'r') as stream: try: data_loaded = yaml.safe_load(stream) except yaml.YAMLError as exc: print(exc) try: data_loaded[main_section][sub_section] = sorted(list(set(data_loaded[main_section][sub_section]))) except IndexError: pass with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print(sub_section, "Sorted & Saved") ############################ updating schools ############################ # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_American_colleges_and_universities_abroad', 0) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_NAIH_Institutions') # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_NCAA_Division_II_wrestling_programs', 0) # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_Benedictine_colleges_and_universities', 0) # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_colleges_and_universities_in_the_United_States_by_endowment', 0) # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_schools_of_international_relations_in_the_United_States', 2) # update_yaml_dash_comma_split('case_agnostic_education', 'community_college', 'List_of_junior_colleges_in_the_United_States') # update_yaml('case_agnostic_education', 'other_universities', 'List_of_universities_accredited_by_DEAC') # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_medical_schools_in_the_United_States', 1) # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_Lutheran_colleges_and_universities_in_the_United_States', 0) # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_library_science_schools', 1) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_library_science_schools') # update_yaml('case_agnostic_education', 'other_universities', 'List_of_liberal_arts_colleges_in_the_United_States') # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_law_schools_in_the_United_States', 1) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_land-grant_universities') # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_University_of_Puerto_Rico_campuses', 0) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_Posse_Scholars_school_partnerships') # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_pharmacy_schools_in_the_United_States', 2) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_online_colleges_in_the_United_States') # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_American_universities_with_Olympic_medals', 1) # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_nursing_schools_in_the_United_States') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'National_Space_Grant_College_and_Fellowship_Program') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'National_Sea_Grant_College_Program') # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_research_universities_in_the_United_States', 0) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_Catholic_universities_and_colleges_in_the_United_States') # update_yaml('case_agnostic_education', 'other_universities', 'List_of_state_and_territorial_universities_in_the_United_States') # update_yaml_table4('case_agnostic_education', 'community_college', 'List_of_United_States_technological_universities', 0) # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_schools_accredited_by_the_Association_of_Theological_Schools_in_the_United_States_and_Canada', 0) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_tribal_colleges_and_universities') # update_yaml('case_agnostic_education', 'other_universities', 'List_of_schools_of_veterinary_medicine') # update_yaml('case_agnostic_education', 'community_college', 'List_of_vocational_colleges_in_the_United_States') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_for-profit_universities_and_colleges') # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_largest_universities_and_university_networks_by_enrollment', 1) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_postgraduate-only_institutions') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_unaccredited_institutions_of_higher_education') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_international_schools') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_EQUIS_accredited_institutions') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_institutions_accredited_by_AMBA') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_schools_of_international_relations') # update_yaml_dash_comma_split('case_agnostic_education', 'other_universities', 'List_of_liberal_arts_colleges') # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_lantern_slide_collections', 0) # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_engineering_schools', 1) # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_engineering_schools', 1) # update_yaml('case_agnostic_education', 'other_universities', 'List_of_art_schools') # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_open_universities', 0) # update_yaml('case_agnostic_education', 'other_universities', 'National_university') # if it says community college move it to community/technical college with open('confs/config.yaml', 'r') as stream: data_loaded = yaml.safe_load(stream) for item in data_loaded['case_agnostic_education']['other_universities']: if 'Community College' in item: data_loaded['case_agnostic_education']['community_college'].append(item) data_loaded['case_agnostic_education']['other_universities'].remove(item) print(item, "added to community_college") if 'Technical College' in item: data_loaded['case_agnostic_education']['community_college'].append(item) data_loaded['case_agnostic_education']['other_universities'].remove(item) print(item, "added to community_college") with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) # deleting schools in 'other' if they are in another section with open('confs/config.yaml', 'r') as stream: data_loaded = yaml.safe_load(stream) for company_type in data_loaded['case_agnostic_education'].keys(): if company_type == 'other_universities': pass else: for item in data_loaded['case_agnostic_education'][company_type]: if item in data_loaded['case_agnostic_education']['other_universities']: data_loaded['case_agnostic_education']['other_universities'].remove(item) print(item, "deleted from other_universities") with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) ############################ updating companies ############################ # update_yaml('case_agnostic_work', 'company_fin', 'List_of_asset_management_firms') # update_yaml_table1('case_agnostic_work', 'company_fin', 'List_of_asset_management_firms', 1) # update_yaml('case_agnostic_work', 'company_fin', 'List_of_investment_banks') # update_yaml_table6('case_agnostic_work', 'company_fin', 'List_of_venture_capital_firms') # update_yaml_table2('case_agnostic_work', 'company_fin', 'List_of_private_equity_firms', 0) # update_yaml_table2('case_agnostic_work', 'company_fin', 'List_of_systemically_important_banks', 0) # update_yaml_table2('case_agnostic_work', 'company_consumer', 'List_of_swimwear_brands', 0) # update_yaml_table3('case_agnostic_work', 'company_consumer', 'List_of_sporting_goods_manufacturers', 0) # update_yaml_table2('case_agnostic_work', 'company_consumer', 'List_of_lingerie_brands', 0) # update_yaml('case_agnostic_work', 'company_consumer', 'List_of_fitness_wear_brands') # update_yaml('case_agnostic_work', 'company_energychem', 'List_of_concentrating_solar_thermal_power_companies') # update_yaml('case_agnostic_work', 'company_energychem', 'List_of_United_States_water_companies') # update_yaml('case_agnostic_work', 'company_energychem', 'List_of_oilfield_service_companies') # update_yaml('case_agnostic_work', 'company_industrial', 'List_of_wind_turbine_manufacturers') # update_yaml_table4('case_agnostic_work', 'company_industrial', 'List_of_traction_motor_manufacturers', 0) # update_yaml('case_agnostic_work', 'company_industrial', 'List_of_touch-solution_manufacturers') # update_yaml_table2('case_agnostic_work', 'company_energychem', 'List_of_steel_producers', 13) # update_yaml_table4('case_agnostic_work', 'company_tech', 'Semiconductor_equipment_sales_leaders_by_year', 1) # update_yaml_table2('case_agnostic_work', 'company_services', 'List_of_multiple-system_operators', 0) # update_yaml_table2('case_agnostic_work', 'company_consumer', 'List_of_supermarket_chains', 0) # update_yaml('case_agnostic_work', 'company_consumer', 'List_of_pharmacies') # update_yaml_table2('case_agnostic_work', 'company_consumer', 'List_of_chained-brand_hotels', 0) # update_yaml_table2lists('case_agnostic_work', 'company_consumer', 'List_of_chained-brand_hotels', 6) # update_yaml_table2lists('case_agnostic_work', 'company_consumer', 'List_of_chained-brand_hotels', 7) # update_yaml_table2lists('case_agnostic_work', 'company_consumer', 'List_of_chained-brand_hotels', 8) # update_yaml_table2lists('case_agnostic_work', 'company_consumer', 'List_of_chained-brand_hotels', 9) # update_yaml_table2lists('case_agnostic_work', 'company_consumer', 'List_of_chained-brand_hotels', 10) # update_yaml_table2lists('case_agnostic_work', 'company_consumer', 'List_of_chained-brand_hotels', 11) # update_yaml_table2('case_agnostic_work', 'company_services', 'List_of_largest_law_firms_by_revenue', 1) # update_yaml_table2('case_agnostic_work', 'company_services', 'List_of_largest_United_States-based_law_firms_by_head_count', 1) # update_yaml('case_agnostic_work', 'company_services', 'List_of_marketing_research_firms') # update_yaml('case_agnostic_work', 'company_consumer', 'List of executive search firms') # update_yaml('case_agnostic_work', 'company_tech', 'List_of_computer_system_manufacturers') # update_yaml('case_agnostic_work', 'company_tech', 'List_of_computer_hardware_manufacturers') # update_yaml('case_agnostic_work', 'company_tech', 'List_of_advertising_technology_companies') # update_yaml_table2('case_agnostic_work', 'company_tech', 'List_of_flash_memory_controller_manufacturers', 0) # update_yaml_table4('case_agnostic_work', 'company_tech', 'List_of_EDA_companies', 0) # update_yaml_table2('case_agnostic_work', 'company_tech', 'List_of_electric-vehicle-battery_manufacturers', 0) # update_yaml_table2('case_agnostic_work', 'company_services', 'List_of_telephone_operating_companies', 1) # update_yaml('case_agnostic_work', 'company_energychem', 'List_of_silicon_producers') # update_yaml_table2('case_agnostic_work', 'company_tech', 'List_of_photovoltaics_companies', 0) # update_yaml_table4all('case_agnostic_work', 'company_consumer', 'List_of_airlines_of_the_United_States', 0) # update_yaml_table5('case_agnostic_work', 'company_consumer', 'List_of_casinos_in_the_United_States', 0) # update_yaml_table2('case_agnostic_work', 'company_consumer', 'List_of_cruise_lines', 0) # update_yaml('case_agnostic_work', 'company_industrial', 'List_of_Class_I_railroads') # update_yaml('case_agnostic_work', 'company_consumer', 'List_of_charter_airlines') # update_yaml_table2('case_agnostic_work', 'company_services', 'List_of_largest_container_shipping_companies', 0) # update_yaml('case_agnostic_work', 'company_tech', 'List_of_system-on-a-chip_suppliers') # update_yaml_table2('case_agnostic_work', 'company_tech', 'List_of_companies_involved_in_quantum_computing_or_communication', 0) # update_yaml_table2('case_agnostic_work', 'company_tech', 'List_of_data_recovery_companies', 0) # update_yaml_table4all('case_agnostic_work', 'company_services', 'List_of_IT_consulting_firms', 0) # update_yaml_table4('case_agnostic_work', 'company_tech', 'List_of_largest_Internet_companies', 1) # update_yaml_table4('case_agnostic_work', 'company_fin', 'List_of_hedge_funds', 1) # update_yaml_table4('case_agnostic_work', 'company_services', 'List_of_newspapers_in_the_United_States', 1) # update_yaml_table4('case_agnostic_work', 'company_services', 'List_of_newspapers_by_circulation', 0) # update_yaml('case_agnostic_work', 'company_services', 'List_of_newspapers_serving_cities_over_100,000_in_the_United_States') # update_yaml_table4all('case_agnostic_work', 'company_consumer', 'List_of_restaurant_chains_in_the_United_States', 0) # update_yaml_table4all('case_agnostic_work', 'company_industrial', 'List_of_largest_manufacturing_companies_by_revenue', 1) # update_yaml('case_agnostic_work', 'company_fin', 'List_of_United_States_insurance_companies') # update_yaml('case_agnostic_work', 'company_fin', 'List_of_international_banking_institutions') # update_yaml_table4all('case_agnostic_work', 'company_tech', 'Semiconductor_equipment_sales_leaders_by_year', 2) # update_yaml_table4('case_agnostic_work', 'company_energychem', 'List_of_largest_aluminum_producers_by_output', 1) # update_yaml_table4('case_agnostic_work', 'company_tech', 'List_of_glossy_display_branding_manufacturers', 0) # update_yaml_table4('case_agnostic_work', 'company_consumer', 'List_of_bean-to-bar_chocolate_manufacturers', 0) # update_yaml('case_agnostic_work', 'company_consumer', 'List_of_frozen_yogurt_companies') # update_yaml('case_agnostic_work', 'company_services', 'List_of_websites_about_food_and_drink') # update_yaml('case_agnostic_work', 'company_tech', 'List_of_bass_amplifier_and_loudspeaker_manufacturers') # update_yaml_table4('case_agnostic_work', 'company_tech', 'List_of_digital_camera_brands', 2) # update_yaml_table4all('case_agnostic_work', 'company_other', 'List_of_SRI_International_spin-offs', 0) # update_yaml_table4('case_agnostic_work', 'company_other', 'List_of_largest_European_manufacturing_companies_by_revenue', 0) # update_yaml('case_agnostic_work', 'company_other', 'List_of_multinational_corporations') # update_yaml_table4('case_agnostic_work', 'company_other', 'List_of_companies_of_the_European_Union', 1) # update_yaml_table4('case_agnostic_work', 'company_energychem', 'List_of_copper_production_by_company', 1) # update_yaml_table4all('case_agnostic_work', 'company_other', 'List_of_largest_corporate_profits_and_losses', 1) # update_yaml('case_agnostic_work', 'company_other', 'List_of_private_security_companies') # update_yaml_table4all('case_agnostic_work', 'company_tech', 'List_of_private_spaceflight_companies', 0) # update_yaml('case_agnostic_work', 'company_other', 'List_of_multi-level_marketing_companies') # update_yaml('case_agnostic_work', 'company_services', 'List_of_television_production_companies') # update_yaml_table4all('case_agnostic_work', 'company_services', 'List_of_United_States_over-the-air_television_networks', 0) # update_yaml_table4all('case_agnostic_work', 'company_services', 'List_of_United_States_pay_television_channels', 0) # update_yaml_dash_comma_split('case_agnostic_work', 'company_other', 'List_of_modeling_agencies') # update_yaml_dash_comma_split('case_agnostic_work', 'company_tech', 'List_of_3D_printer_manufacturers') # update_yaml_dash_comma_split('case_agnostic_work', 'company_tech', 'List_of_semiconductor_IP_core_vendors') # update_yaml_dash_comma_split('case_agnostic_work', 'company_energychem', 'List_of_United_States_electric_companies') with open('confs/config.yaml', 'r') as stream: data_loaded = yaml.safe_load(stream) # # deleting companies in consumer if they are in foodbev for item in data_loaded['case_agnostic_work']['company_foodbev']: if item in data_loaded['case_agnostic_work']['company_consumer']: data_loaded['case_agnostic_work']['company_consumer'].remove(item) print(item, "deleted from company_consumer") # # deleting companies in 'other' if they are in another section for company_type in data_loaded['case_agnostic_work'].keys(): if company_type == 'company_other': pass else: for item in data_loaded['case_agnostic_work'][company_type]: if item in data_loaded['case_agnostic_work']['company_other']: data_loaded['case_agnostic_work']['company_other'].remove(item) print(item, "deleted from company_other") with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) ################################################## # figure out how to scrape these # https://en.wikipedia.org/wiki/List_of_United_States_natural_gas_companies # https://en.wikipedia.org/wiki/List_of_oil_exploration_and_production_companies#North_America # https://en.wikipedia.org/wiki/List_of_modern_armament_manufacturers # https://en.wikipedia.org/wiki/List_of_automobile_manufacturers#U # https://en.wikipedia.org/wiki/state_drive_manufacturers # https://en.wikipedia.org/wiki/List_of_video_game_developers # https://en.wikipedia.org/wiki/List_of_video_game_publishers # https://en.wikipedia.org/wiki/List_of_animation_studios # https://en.wikipedia.org/wiki/List_of_convenience_stores # https://en.wikipedia.org/wiki/List_of_retailers%27_cooperatives # https://en.wikipedia.org/wiki/List_of_department_stores_by_country # https://en.wikipedia.org/wiki/List_of_game_manufacturers # https://en.wikipedia.org/wiki/List_of_supermarket_chains_in_North_America # https://en.wikipedia.org/wiki/List_of_bookstore_chains # https://en.wikipedia.org/wiki/List_of_book_sales_clubs # https://en.wikipedia.org/wiki/List_of_superstores # https://en.wikipedia.org/wiki/List_of_cleaning_companies # https://en.wikipedia.org/wiki/List_of_press_release_agencies # https://en.wikipedia.org/wiki/List_of_CAx_companies # https://en.wikipedia.org/wiki/List_of_electronics_brands # https://en.wikipedia.org/wiki/List_of_bus_operating_companies # https://en.wikipedia.org/wiki/List_of_big_data_companies # https://en.wikipedia.org/wiki/Tech_companies_in_the_New_York_metropolitan_area # https://en.wikipedia.org/wiki/List_of_banks_(alphabetical) # https://en.wikipedia.org/wiki/List_of_mobile_network_operators # https://en.wikipedia.org/wiki/List_of_communication_satellite_companies # https://en.wikipedia.org/wiki/List_of_largest_biomedical_companies_by_revenue # https://en.wikipedia.org/wiki/List_of_film_distributors_by_country#United_States # https://en.wikipedia.org/wiki/List_of_solid-state_drive_manufacturers # https://en.wikipedia.org/wiki/List_of_soft_drink_producers # https://en.wikipedia.org/wiki/List_of_PLC_manufacturers # https://en.wikipedia.org/wiki/List_of_major_arms_industry_corporations_by_country # https://en.wikipedia.org/wiki/List_of_public_corporations_by_market_capitalization # https://en.wikipedia.org/wiki/List_of_television_manufacturers # https://en.wikipedia.org/wiki/List_of_flat_panel_display_manufacturers # https://en.wikipedia.org/wiki/List_of_loudspeaker_manufacturers # https://en.wikipedia.org/wiki/List_of_unicorn_startup_companies # https://en.wikipedia.org/wiki/List_of_government-owned_companies # https://en.wikipedia.org/wiki/List_of_holding_companies # https://en.wikipedia.org/wiki/List_of_franchises # https://en.wikipedia.org/wiki/List_of_largest_employers # https://en.wikipedia.org/wiki/List_of_conglomerates # https://en.wikipedia.org/wiki/List_of_company_registers#United_States # https://en.wikipedia.org/wiki/List_of_film_production_companies # sorting sections # sort_yaml_flat('case_agnostic_work', 'company_foodbev') # sort_yaml_flat('case_agnostic_work', 'company_fin') # sort_yaml_flat('case_agnostic_work', 'company_tech') # sort_yaml_flat('case_agnostic_work', 'company_services') # sort_yaml_flat('case_agnostic_work', 'company_health') # sort_yaml_flat('case_agnostic_work', 'company_energychem') # sort_yaml_flat('case_agnostic_work', 'company_other') # sort_yaml_flat('case_agnostic_work', 'company_consumer') # sort_yaml_flat('case_agnostic_hobbies', 'hobbies') # sort_yaml('case_agnostic_whole_resume', 'honor_societies') # sort_yaml('case_agnostic_education', 'community_college') # sort_yaml('case_agnostic_education', 'other_universities') # sort_yaml_flat('case_agnostic_work', 'company_foodbev') sort_yaml('case_agnostic_skill', 'technical_skills') ############################ cleaning up softskills section ############################ with open('confs/config.yaml', 'r') as stream: data_loaded = yaml.safe_load(stream) myLIST = [] for item in data_loaded['case_agnostic_whole_resume']['soft_skills']: myLIST.append(item.lower()) myLIST = sorted(list(set(myLIST))) data_loaded['case_agnostic_whole_resume']['soft_skills'] = myLIST with open('confs/config.yaml', 'w') as fp: yaml.dump(data_loaded, fp) print("Updated Yaml File Saved") # already run: # update_yaml('case_agnostic_work', 'company_foodbev', 'List_of_food_companies') # update_yaml_table1('case_agnostic_work', 'company_health', 'List_of_largest_biotechnology_and_pharmaceutical_companies', 1) # update_yaml_table4('case_agnostic_work', 'company_fin', 'List_of_largest_banks', 1) # update_yaml_table2('case_agnostic_work', 'company_energychem', 'List_of_largest_oil_and_gas_companies_by_revenue', 1) # update_yaml('case_agnostic_work', 'company_services', 'List_of_management_consulting_firms') # update_yaml_table2('case_agnostic_work', 'company_energychem', 'List_of_largest_chemical_producers', 1) # update_yaml('case_agnostic_work', 'company_other', 'List_of_companies_in_the_Chicago_metropolitan_area') # update_yaml_table2('case_agnostic_work', 'company_other', 'List_of_largest_companies_by_revenue', 0) # update_yaml('case_agnostic_work', 'company_other', 'List_of_Six_Sigma_companies') # update_yaml_table4('case_agnostic_work', 'company_other', 'List_of_S%26P_500_companies', 1) # update_yaml('case_agnostic_work', 'company_health', 'List_of_pharmaceutical_companies') # list_of_links = [] # print("Accessing Wikipedia") # html = requests.get('https://en.wikipedia.org/wiki/List_of_college_athletic_programs_by_U.S._state').text # soup = bs(html, 'html.parser') # for i, li in enumerate(soup.select('li')): # if list(li.attrs.keys()) == ['class']: # pass # elif list(li.attrs.keys()) == ['id']: # pass # elif list(li.attrs.keys()) == ['style']: # pass # elif li.text == 'List of Division I athletic directors': # break # else: # list_of_links.append(li.text) # print(li.text) # # for link in list_of_links: # update_yaml_table4all('case_agnostic_education', 'other_universities', link, 1) # update_yaml_table7('case_agnostic_education', 'other_universities', 'List_of_NAIA_institutions') # update_yaml_table7('case_agnostic_education', 'other_universities', 'List_of_NCAA_Division_I_institutions') # update_yaml_table7('case_agnostic_education', 'other_universities', 'List_of_NCAA_Division_II_institutions') # update_yaml_table7('case_agnostic_education', 'other_universities', 'List_of_NCAA_Division_III_institutions') # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_USCAA_institutions', 0) # update_yaml('case_agnostic_education', 'community_college', 'List_of_community_colleges') # update_yaml_table4all('case_agnostic_education', 'other_universities', 'List_of_NCCAA_institutions', 0) # update_yaml_table4('case_agnostic_education', 'other_universities', 'List_of_historically_black_colleges_and_universities', 0) # update_yaml('case_agnostic_hobbies', 'hobbies', 'List_of_hobbies')
53.64268
176
0.709941
5,665
43,236
5.0406
0.093557
0.040763
0.062196
0.088601
0.83495
0.827001
0.811872
0.762984
0.71252
0.656733
0
0.006776
0.153506
43,236
805
177
53.709317
0.773354
0.470719
0
0.826446
0
0.012397
0.196343
0.01155
0
0
0
0
0
1
0.02686
false
0.049587
0.012397
0
0.039256
0.161157
0
0
0
null
0
0
0
1
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
7
77fc264b84e19afc24c6ad18d3401a8ccb521f4e
13,587
py
Python
app/model/schema/token.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
2
2021-08-19T12:35:25.000Z
2022-02-16T04:13:38.000Z
app/model/schema/token.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
46
2021-09-02T03:22:05.000Z
2022-03-31T09:20:00.000Z
app/model/schema/token.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
1
2021-11-17T23:18:27.000Z
2021-11-17T23:18:27.000Z
""" Copyright BOOSTRY Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache-2.0 """ from typing import ( List, Optional ) import math from pydantic import ( BaseModel, Field, validator ) from web3 import Web3 from .types import ( MMDD_constr, YYYYMMDD_constr ) ############################ # REQUEST ############################ class IbetStraightBondCreate(BaseModel): """ibet Straight Bond schema (Create)""" name: str = Field(max_length=100) total_supply: int = Field(..., ge=0, le=100_000_000) face_value: int = Field(..., ge=0, le=5_000_000_000) purpose: str = Field(max_length=2000) symbol: Optional[str] = Field(max_length=100) redemption_date: Optional[YYYYMMDD_constr] redemption_value: Optional[int] = Field(None, ge=0, le=5_000_000_000) return_date: Optional[YYYYMMDD_constr] return_amount: Optional[str] = Field(max_length=2000) interest_rate: Optional[float] = Field(None, ge=0.0000, le=100.0000) interest_payment_date: Optional[List[MMDD_constr]] transferable: Optional[bool] is_redeemed: Optional[bool] status: Optional[bool] is_offering: Optional[bool] tradable_exchange_contract_address: Optional[str] personal_info_contract_address: Optional[str] image_url: Optional[List[str]] contact_information: Optional[str] = Field(max_length=2000) privacy_policy: Optional[str] = Field(max_length=5000) transfer_approval_required: Optional[bool] is_manual_transfer_approval: Optional[bool] @validator("interest_rate") def interest_rate_4_decimal_places(cls, v): if v is not None: float_data = float(v * 10 ** 4) int_data = int(v * 10 ** 4) if not math.isclose(int_data, float_data): raise ValueError("interest_rate must be less than or equal to four decimal places") return v @validator("interest_payment_date") def interest_payment_date_list_length_less_than_13(cls, v): if v is not None and len(v) >= 13: raise ValueError("list length of interest_payment_date must be less than 13") return v @validator("tradable_exchange_contract_address") def tradable_exchange_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("tradable_exchange_contract_address is not a valid address") return v @validator("personal_info_contract_address") def personal_info_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("personal_info_contract_address is not a valid address") return v class IbetStraightBondUpdate(BaseModel): """ibet Straight Bond schema (Update)""" face_value: Optional[int] = Field(None, ge=0, le=5_000_000_000) interest_rate: Optional[float] = Field(None, ge=0.0000, le=100.0000) interest_payment_date: Optional[List[MMDD_constr]] redemption_value: Optional[int] = Field(None, ge=0, le=5_000_000_000) transferable: Optional[bool] status: Optional[bool] is_offering: Optional[bool] is_redeemed: Optional[bool] tradable_exchange_contract_address: Optional[str] personal_info_contract_address: Optional[str] contact_information: Optional[str] = Field(max_length=2000) privacy_policy: Optional[str] = Field(max_length=5000) transfer_approval_required: Optional[bool] is_manual_transfer_approval: Optional[bool] memo: Optional[str] = Field(max_length=2000) @validator("interest_rate") def interest_rate_4_decimal_places(cls, v): if v is not None: float_data = float(v * 10 ** 4) int_data = int(v * 10 ** 4) if not math.isclose(int_data, float_data): raise ValueError("interest_rate must be rounded to 4 decimal places") return v @validator("interest_payment_date") def interest_payment_date_list_length_less_than_13(cls, v): if v is not None and len(v) >= 13: raise ValueError("list length of interest_payment_date must be less than 13") return v @validator("tradable_exchange_contract_address") def tradable_exchange_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("tradable_exchange_contract_address is not a valid address") return v @validator("personal_info_contract_address") def personal_info_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("personal_info_contract_address is not a valid address") return v class IbetStraightBondAdd(BaseModel): """ibet Straight Bond schema (Additional Issue)""" account_address: str amount: int = Field(..., ge=1, le=100_000_000) @validator("account_address") def account_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("account_address is not a valid address") return v class IbetStraightBondTransfer(BaseModel): """ibet Straight Bond schema (Transfer)""" token_address: str from_address: str to_address: str amount: int = Field(..., ge=1, le=100_000_000) @validator("token_address") def token_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("token_address is not a valid address") return v @validator("from_address") def from_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("from_address is not a valid address") return v @validator("to_address") def to_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("to_address is not a valid address") return v class IbetShareCreate(BaseModel): """ibet Share schema (Create)""" name: str = Field(max_length=100) issue_price: int = Field(..., ge=0, le=5_000_000_000) principal_value: int = Field(..., ge=0, le=5_000_000_000) total_supply: int = Field(..., ge=0, le=100_000_000) symbol: Optional[str] = Field(max_length=100) dividends: Optional[float] = Field(None, ge=0.00, le=5_000_000_000.00) dividend_record_date: Optional[YYYYMMDD_constr] dividend_payment_date: Optional[YYYYMMDD_constr] cancellation_date: Optional[YYYYMMDD_constr] transferable: Optional[bool] status: Optional[bool] is_offering: Optional[bool] tradable_exchange_contract_address: Optional[str] personal_info_contract_address: Optional[str] contact_information: Optional[str] = Field(max_length=2000) privacy_policy: Optional[str] = Field(max_length=5000) transfer_approval_required: Optional[bool] is_manual_transfer_approval: Optional[bool] is_canceled: Optional[bool] @validator("dividends") def dividends_2_decimal_places(cls, v): if v is not None: float_data = float(v * 10 ** 2) int_data = int(v * 10 ** 2) if not math.isclose(int_data, float_data): raise ValueError("dividends must be rounded to 2 decimal places") return v @validator("tradable_exchange_contract_address") def tradable_exchange_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("tradable_exchange_contract_address is not a valid address") return v @validator("personal_info_contract_address") def personal_info_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("personal_info_contract_address is not a valid address") return v class IbetShareUpdate(BaseModel): """ibet Share schema (Update)""" cancellation_date: Optional[YYYYMMDD_constr] dividend_record_date: Optional[YYYYMMDD_constr] dividend_payment_date: Optional[YYYYMMDD_constr] dividends: Optional[float] = Field(None, ge=0.00, le=5_000_000_000.00) tradable_exchange_contract_address: Optional[str] personal_info_contract_address: Optional[str] transferable: Optional[bool] status: Optional[bool] is_offering: Optional[bool] contact_information: Optional[str] = Field(max_length=2000) privacy_policy: Optional[str] = Field(max_length=5000) transfer_approval_required: Optional[bool] is_manual_transfer_approval: Optional[bool] principal_value: Optional[int] = Field(None, ge=0, le=5_000_000_000) is_canceled: Optional[bool] memo: Optional[str] = Field(max_length=2000) @validator("dividends") def dividends_2_decimal_places(cls, v): if v is not None: float_data = float(v * 10 ** 2) int_data = int(v * 10 ** 2) if not math.isclose(int_data, float_data): raise ValueError("dividends must be rounded to 2 decimal places") return v @validator("dividends") def dividend_information_all_required(cls, v, values, **kwargs): if v is not None: if values.get("dividend_record_date") is None or values.get("dividend_payment_date") is None: raise ValueError("all items are required to update the dividend information") return v @validator("tradable_exchange_contract_address") def tradable_exchange_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("tradable_exchange_contract_address is not a valid address") return v @validator("personal_info_contract_address") def personal_info_contract_address_is_valid_address(cls, v): if v is not None and not Web3.isAddress(v): raise ValueError("personal_info_contract_address is not a valid address") return v class IbetShareTransfer(BaseModel): """ibet Share schema (Transfer)""" token_address: str from_address: str to_address: str amount: int = Field(..., ge=1, le=100_000_000) @validator("token_address") def token_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("token_address is not a valid address") return v @validator("from_address") def from_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("from_address is not a valid address") return v @validator("to_address") def to_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("to_address is not a valid address") return v class IbetShareAdd(BaseModel): """ibet Share schema (Additional Issue)""" account_address: str amount: int = Field(..., ge=1, le=100_000_000) @validator("account_address") def account_address_is_valid_address(cls, v): if not Web3.isAddress(v): raise ValueError("account_address is not a valid address") return v class IbetSecurityTokenApproveTransfer(BaseModel): """ibet SecurityToken schema (ApproveTransfer)""" application_id: int data: str class IbetSecurityTokenCancelTransfer(BaseModel): """ibet SecurityToken schema (CancelTransfer)""" application_id: int data: str class IbetSecurityTokenEscrowApproveTransfer(BaseModel): """ibet SecurityTokenEscrow schema (ApproveTransfer)""" escrow_id: int data: str ############################ # RESPONSE ############################ class TokenAddressResponse(BaseModel): """token address""" token_address: str token_status: int class IbetStraightBondResponse(BaseModel): """ibet Straight Bond schema (Response)""" issuer_address: str token_address: str name: str symbol: str total_supply: int face_value: int redemption_date: str redemption_value: int return_date: str return_amount: str purpose: str interest_rate: float interest_payment_date: List[str] transferable: bool is_redeemed: bool status: bool is_offering: bool tradable_exchange_contract_address: str personal_info_contract_address: str contact_information: str privacy_policy: str issue_datetime: str token_status: int transfer_approval_required: bool is_manual_transfer_approval: bool memo: str class IbetShareResponse(BaseModel): """ibet Share schema (Response)""" issuer_address: str token_address: str name: str symbol: str issue_price: int principal_value: int total_supply: int dividends: float dividend_record_date: str dividend_payment_date: str cancellation_date: str transferable: bool transfer_approval_required: bool is_manual_transfer_approval: bool status: bool is_offering: bool tradable_exchange_contract_address: str personal_info_contract_address: str contact_information: str privacy_policy: str issue_datetime: str token_status: int is_canceled: bool memo: str
34.572519
105
0.697137
1,784
13,587
5.067825
0.11435
0.059728
0.0146
0.061719
0.778343
0.751797
0.738856
0.731335
0.723371
0.708882
0
0.029598
0.209244
13,587
392
106
34.660714
0.811895
0.080445
0
0.795987
0
0
0.129155
0.05015
0
0
0
0
0
1
0.076923
false
0
0.016722
0
0.692308
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
1
0
0
7
248692685a3cab5df3e84725100cf965ee2f0368
92
py
Python
get-gip.py
dev100kg/get-gip
d034ad80d675d0837718da483a34ca188685dd22
[ "Unlicense" ]
null
null
null
get-gip.py
dev100kg/get-gip
d034ad80d675d0837718da483a34ca188685dd22
[ "Unlicense" ]
null
null
null
get-gip.py
dev100kg/get-gip
d034ad80d675d0837718da483a34ca188685dd22
[ "Unlicense" ]
null
null
null
import requests def getGlobalIp(): return requests.get("http://inet-ip.info/ip").text
15.333333
54
0.706522
13
92
5
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.130435
92
5
55
18.4
0.8125
0
0
0
0
0
0.23913
0
0
0
0
0
0
1
0.333333
true
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
1
0
1
1
1
0
0
7
24cbea9cbc9c7d31faef9a241e2fd30fccee62a2
181
py
Python
productos/views.py
Yaco-Lee/SaraswatiApp
8c8bc03987c7f921611864ba58945f6ec4f33b6d
[ "MIT" ]
null
null
null
productos/views.py
Yaco-Lee/SaraswatiApp
8c8bc03987c7f921611864ba58945f6ec4f33b6d
[ "MIT" ]
3
2021-03-30T14:09:41.000Z
2021-06-04T23:42:04.000Z
productos/views.py
Yaco-Lee/SaraswatiApp
8c8bc03987c7f921611864ba58945f6ec4f33b6d
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse from django.shortcuts import render def home_view(): return HttpResponse("<h1> Saraswati App </h1>")
20.111111
51
0.773481
24
181
5.791667
0.583333
0.215827
0.273381
0.359712
0.446043
0
0
0
0
0
0
0.012903
0.143646
181
8
52
22.625
0.883871
0
0
0.4
0
0
0.133333
0
0
0
0
0
0
1
0.2
true
0
0.6
0.2
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
9
24d58c6467d7053c14ac14013152e0f502892a7a
13,390
py
Python
go/routers/group/tests/test_views.py
lynnUg/vumi-go
852f906c46d5d26940bd6699f11488b73bbc3742
[ "BSD-3-Clause" ]
null
null
null
go/routers/group/tests/test_views.py
lynnUg/vumi-go
852f906c46d5d26940bd6699f11488b73bbc3742
[ "BSD-3-Clause" ]
null
null
null
go/routers/group/tests/test_views.py
lynnUg/vumi-go
852f906c46d5d26940bd6699f11488b73bbc3742
[ "BSD-3-Clause" ]
null
null
null
from go.base.tests.helpers import GoDjangoTestCase from go.routers.tests.view_helpers import RouterViewsHelper from go.vumitools.api import VumiApiCommand class GroupViewTests(GoDjangoTestCase): def setUp(self): self.router_helper = self.add_helper(RouterViewsHelper(u'group')) self.user_helper = self.router_helper.vumi_helper.get_or_create_user() self.client = self.router_helper.get_client() def test_new_router(self): router_store = self.user_helper.user_api.router_store self.assertEqual([], router_store.list_routers()) response = self.client.post(self.router_helper.get_new_view_url(), { 'name': u"myrouter", 'router_type': u'group', }) [router_key] = router_store.list_routers() rtr_helper = self.router_helper.get_router_helper_by_key(router_key) self.assertRedirects(response, rtr_helper.get_view_url('edit')) def test_show_stopped(self): rtr_helper = self.router_helper.create_router_helper(name=u"myrouter") response = self.client.get(rtr_helper.get_view_url('show')) router = response.context[0].get('router') self.assertEqual(router.name, u"myrouter") self.assertContains(response, rtr_helper.get_view_url('start')) self.assertNotContains(response, rtr_helper.get_view_url('stop')) def test_show_running(self): rtr_helper = self.router_helper.create_router_helper( name=u"myrouter", started=True) response = self.client.get(rtr_helper.get_view_url('show')) router = response.context[0].get('router') self.assertEqual(router.name, u"myrouter") self.assertNotContains(response, rtr_helper.get_view_url('start')) self.assertContains(response, rtr_helper.get_view_url('stop')) def test_start(self): rtr_helper = self.router_helper.create_router_helper(started=False) response = self.client.post(rtr_helper.get_view_url('start')) self.assertRedirects(response, rtr_helper.get_view_url('show')) router = rtr_helper.get_router() self.assertTrue(router.starting()) [start_cmd] = self.router_helper.get_api_commands_sent() self.assertEqual( start_cmd, VumiApiCommand.command( '%s_router' % (router.router_type,), 'start', user_account_key=router.user_account.key, router_key=router.key)) def test_stop(self): rtr_helper = self.router_helper.create_router_helper(started=True) response = self.client.post(rtr_helper.get_view_url('stop')) self.assertRedirects(response, rtr_helper.get_view_url('show')) router = rtr_helper.get_router() self.assertTrue(router.stopping()) [start_cmd] = self.router_helper.get_api_commands_sent() self.assertEqual( start_cmd, VumiApiCommand.command( '%s_router' % (router.router_type,), 'stop', user_account_key=router.user_account.key, router_key=router.key)) def test_get_edit_empty_config(self): rtr_helper = self.router_helper.create_router_helper(started=True) response = self.client.get(rtr_helper.get_view_url('edit')) self.assertEqual(response.status_code, 200) def test_edit_shows_only_static_groups(self): static_group = self.router_helper.create_group(u'staticgroup') smart_group = self.router_helper.create_smart_group(u'smartgroup', u'') rtr_helper = self.router_helper.create_router_helper(started=True) response = self.client.get(rtr_helper.get_view_url('edit')) self.assertEqual(response.status_code, 200) self.assertContains(response, static_group.key) self.assertContains(response, static_group.name) self.assertNotContains(response, smart_group.key) self.assertNotContains(response, smart_group.name) self.assertContains( response, "Smart groups are not currently supported") def test_get_edit_small_config(self): group = self.router_helper.create_group(u'mygroup') rtr_helper = self.router_helper.create_router_helper( started=True, config={'rules': [ { 'group': group.key, 'endpoint': 'target_endpoint', }, ]}) response = self.client.get(rtr_helper.get_view_url('edit')) self.assertEqual(response.status_code, 200) self.assertContains(response, group.name) self.assertContains(response, 'target_endpoint') def test_edit_router_config(self): group1 = self.router_helper.create_group(u'mygroup 1') group2 = self.router_helper.create_group(u'mygroup 2') rtr_helper = self.router_helper.create_router_helper(started=True) router = rtr_helper.get_router() self.assertEqual(router.config, {}) response = self.client.post(rtr_helper.get_view_url('edit'), { 'rules-TOTAL_FORMS': ['2'], 'rules-INITIAL_FORMS': ['0'], 'rules-MAX_NUM_FORMS': [''], 'rules-0-group': [group1.key], 'rules-0-endpoint': ['foo'], 'rules-0-DELETE': [''], 'rules-1-group': [group2.key], 'rules-1-endpoint': ['bar'], 'rules-1-DELETE': [''], }) self.assertRedirects(response, rtr_helper.get_view_url('show')) router = rtr_helper.get_router() self.assertEqual(router.config, {u'rules': [ {'group': group1.key, 'endpoint': 'foo'}, {'group': group2.key, 'endpoint': 'bar'}, ]}) self.assertEqual(set(router.extra_inbound_endpoints), set()) self.assertEqual( set(router.extra_outbound_endpoints), set(['foo', 'bar'])) def test_edit_router_group_config_with_delete(self): group1 = self.router_helper.create_group(u'mygroup 1') group2 = self.router_helper.create_group(u'mygroup 2') rtr_helper = self.router_helper.create_router_helper(started=True) router = rtr_helper.get_router() self.assertEqual(router.config, {}) response = self.client.post(rtr_helper.get_view_url('edit'), { 'rules-TOTAL_FORMS': ['2'], 'rules-INITIAL_FORMS': ['0'], 'rules-MAX_NUM_FORMS': [''], 'rules-0-group': [group1.key], 'rules-0-endpoint': ['foo'], 'rules-0-DELETE': ['on'], 'rules-1-group': [group2.key], 'rules-1-endpoint': ['bar'], 'rules-1-DELETE': [''], }) self.assertRedirects(response, rtr_helper.get_view_url('show')) router = rtr_helper.get_router() self.assertEqual(router.config, {u'rules': [ {'group': group2.key, 'endpoint': 'bar'}, ]}) self.assertEqual(set(router.extra_inbound_endpoints), set()) self.assertEqual( set(router.extra_outbound_endpoints), set(['bar'])) def test_edit_router_group_config_with_delete_missing_group(self): group = self.router_helper.create_group(u'mygroup') rtr_helper = self.router_helper.create_router_helper(started=True) router = rtr_helper.get_router() self.assertEqual(router.config, {}) response = self.client.post(rtr_helper.get_view_url('edit'), { 'rules-TOTAL_FORMS': ['2'], 'rules-INITIAL_FORMS': ['0'], 'rules-MAX_NUM_FORMS': [''], 'rules-0-group': ['badgroup'], 'rules-0-endpoint': ['foo'], 'rules-0-DELETE': ['on'], 'rules-1-group': [group.key], 'rules-1-endpoint': ['bar'], 'rules-1-DELETE': [''], }) self.assertRedirects(response, rtr_helper.get_view_url('show')) router = rtr_helper.get_router() self.assertEqual(router.config, {u'rules': [ {'group': group.key, 'endpoint': 'bar'}, ]}) self.assertEqual(set(router.extra_inbound_endpoints), set()) self.assertEqual( set(router.extra_outbound_endpoints), set(['bar'])) def test_edit_router_group_config_with_unmodified_extra_form(self): group = self.router_helper.create_group(u'mygroup') rtr_helper = self.router_helper.create_router_helper( started=True, extra_outbound_endpoints=[u'foo'], config={u'rules': [{'group': group.key, 'endpoint': 'foo'}]}) router = rtr_helper.get_router() response = self.client.post(rtr_helper.get_view_url('edit'), { 'rules-TOTAL_FORMS': ['2'], 'rules-INITIAL_FORMS': ['1'], 'rules-MAX_NUM_FORMS': [''], 'rules-0-group': [group.key], 'rules-0-endpoint': ['foo'], 'rules-0-DELETE': [''], 'rules-1-group': [''], 'rules-1-endpoint': [''], 'rules-1-DELETE': [''], }) self.assertRedirects(response, rtr_helper.get_view_url('show')) router = rtr_helper.get_router() self.assertEqual(router.config, {u'rules': [ {'group': group.key, 'endpoint': 'foo'}, ]}) self.assertEqual(set(router.extra_inbound_endpoints), set()) self.assertEqual( set(router.extra_outbound_endpoints), set(['foo'])) def test_edit_router_group_config_extra_form_empty_group(self): group = self.router_helper.create_group(u'mygroup') rtr_helper = self.router_helper.create_router_helper( started=True, extra_outbound_endpoints=[u'foo'], config={u'rules': [{'group': group.key, 'endpoint': 'foo'}]}) router = rtr_helper.get_router() response = self.client.post(rtr_helper.get_view_url('edit'), { 'rules-TOTAL_FORMS': ['2'], 'rules-INITIAL_FORMS': ['1'], 'rules-MAX_NUM_FORMS': [''], 'rules-0-group': [group.key], 'rules-0-endpoint': ['foo'], 'rules-0-DELETE': [''], 'rules-1-group': [''], 'rules-1-endpoint': ['bar'], 'rules-1-DELETE': [''], }) self.assertEqual(response.status_code, 200) self.assertEqual( response.context['edit_forms'][0].errors, [{}, {'group': [u'This field is required.']}]) router = rtr_helper.get_router() self.assertEqual(router.config, {u'rules': [ {'group': group.key, 'endpoint': 'foo'}, ]}) self.assertEqual(set(router.extra_inbound_endpoints), set()) self.assertEqual( set(router.extra_outbound_endpoints), set(['foo'])) def test_edit_router_group_config_extra_form_empty_endpoint(self): group = self.router_helper.create_group(u'mygroup') other_group = self.router_helper.create_group(u'othergroup') rtr_helper = self.router_helper.create_router_helper( started=True, extra_outbound_endpoints=[u'foo'], config={u'rules': [{'group': group.key, 'endpoint': 'foo'}]}) router = rtr_helper.get_router() response = self.client.post(rtr_helper.get_view_url('edit'), { 'rules-TOTAL_FORMS': ['2'], 'rules-INITIAL_FORMS': ['1'], 'rules-MAX_NUM_FORMS': [''], 'rules-0-group': [group.key], 'rules-0-endpoint': ['foo'], 'rules-0-DELETE': [''], 'rules-1-group': [other_group.key], 'rules-1-endpoint': [''], 'rules-1-DELETE': [''], }) self.assertEqual(response.status_code, 200) self.assertEqual( response.context['edit_forms'][0].errors, [{}, {'endpoint': [u'This field is required.']}]) router = rtr_helper.get_router() self.assertEqual(router.config, {u'rules': [ {'group': group.key, 'endpoint': 'foo'}, ]}) self.assertEqual(set(router.extra_inbound_endpoints), set()) self.assertEqual( set(router.extra_outbound_endpoints), set(['foo'])) def test_edit_router_group_config_extra_form_new_entry(self): group = self.router_helper.create_group(u'mygroup') other_group = self.router_helper.create_group(u'othergroup') rtr_helper = self.router_helper.create_router_helper( started=True, extra_outbound_endpoints=[u'foo'], config={u'rules': [{'group': group.key, 'endpoint': 'foo'}]}) router = rtr_helper.get_router() response = self.client.post(rtr_helper.get_view_url('edit'), { 'rules-TOTAL_FORMS': ['2'], 'rules-INITIAL_FORMS': ['1'], 'rules-MAX_NUM_FORMS': [''], 'rules-0-group': [group.key], 'rules-0-endpoint': ['foo'], 'rules-0-DELETE': [''], 'rules-1-group': [other_group.key], 'rules-1-endpoint': ['bar'], 'rules-1-DELETE': [''], }) self.assertRedirects(response, rtr_helper.get_view_url('show')) router = rtr_helper.get_router() self.assertEqual(router.config, {u'rules': [ {'group': group.key, 'endpoint': 'foo'}, {'group': other_group.key, 'endpoint': 'bar'}, ]}) self.assertEqual(set(router.extra_inbound_endpoints), set()) self.assertEqual( set(router.extra_outbound_endpoints), set(['foo', 'bar']))
45.856164
79
0.611352
1,542
13,390
5.046044
0.076524
0.06593
0.064773
0.079167
0.878036
0.843465
0.842437
0.837553
0.814034
0.790387
0
0.008846
0.240179
13,390
291
80
46.013746
0.755947
0
0
0.755556
0
0
0.138013
0
0
0
0
0
0.211111
1
0.059259
false
0
0.011111
0
0.074074
0
0
0
0
null
0
0
0
1
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
7
7000591eb8a4f6d8ca525e77c98fa7ef119dd9f3
6,545
py
Python
loldib/getratings/models/NA/na_darius/na_darius_sup.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_darius/na_darius_sup.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_darius/na_darius_sup.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_Darius_Sup_Aatrox(Ratings): pass class NA_Darius_Sup_Ahri(Ratings): pass class NA_Darius_Sup_Akali(Ratings): pass class NA_Darius_Sup_Alistar(Ratings): pass class NA_Darius_Sup_Amumu(Ratings): pass class NA_Darius_Sup_Anivia(Ratings): pass class NA_Darius_Sup_Annie(Ratings): pass class NA_Darius_Sup_Ashe(Ratings): pass class NA_Darius_Sup_AurelionSol(Ratings): pass class NA_Darius_Sup_Azir(Ratings): pass class NA_Darius_Sup_Bard(Ratings): pass class NA_Darius_Sup_Blitzcrank(Ratings): pass class NA_Darius_Sup_Brand(Ratings): pass class NA_Darius_Sup_Braum(Ratings): pass class NA_Darius_Sup_Caitlyn(Ratings): pass class NA_Darius_Sup_Camille(Ratings): pass class NA_Darius_Sup_Cassiopeia(Ratings): pass class NA_Darius_Sup_Chogath(Ratings): pass class NA_Darius_Sup_Corki(Ratings): pass class NA_Darius_Sup_Darius(Ratings): pass class NA_Darius_Sup_Diana(Ratings): pass class NA_Darius_Sup_Draven(Ratings): pass class NA_Darius_Sup_DrMundo(Ratings): pass class NA_Darius_Sup_Ekko(Ratings): pass class NA_Darius_Sup_Elise(Ratings): pass class NA_Darius_Sup_Evelynn(Ratings): pass class NA_Darius_Sup_Ezreal(Ratings): pass class NA_Darius_Sup_Fiddlesticks(Ratings): pass class NA_Darius_Sup_Fiora(Ratings): pass class NA_Darius_Sup_Fizz(Ratings): pass class NA_Darius_Sup_Galio(Ratings): pass class NA_Darius_Sup_Gangplank(Ratings): pass class NA_Darius_Sup_Garen(Ratings): pass class NA_Darius_Sup_Gnar(Ratings): pass class NA_Darius_Sup_Gragas(Ratings): pass class NA_Darius_Sup_Graves(Ratings): pass class NA_Darius_Sup_Hecarim(Ratings): pass class NA_Darius_Sup_Heimerdinger(Ratings): pass class NA_Darius_Sup_Illaoi(Ratings): pass class NA_Darius_Sup_Irelia(Ratings): pass class NA_Darius_Sup_Ivern(Ratings): pass class NA_Darius_Sup_Janna(Ratings): pass class NA_Darius_Sup_JarvanIV(Ratings): pass class NA_Darius_Sup_Jax(Ratings): pass class NA_Darius_Sup_Jayce(Ratings): pass class NA_Darius_Sup_Jhin(Ratings): pass class NA_Darius_Sup_Jinx(Ratings): pass class NA_Darius_Sup_Kalista(Ratings): pass class NA_Darius_Sup_Karma(Ratings): pass class NA_Darius_Sup_Karthus(Ratings): pass class NA_Darius_Sup_Kassadin(Ratings): pass class NA_Darius_Sup_Katarina(Ratings): pass class NA_Darius_Sup_Kayle(Ratings): pass class NA_Darius_Sup_Kayn(Ratings): pass class NA_Darius_Sup_Kennen(Ratings): pass class NA_Darius_Sup_Khazix(Ratings): pass class NA_Darius_Sup_Kindred(Ratings): pass class NA_Darius_Sup_Kled(Ratings): pass class NA_Darius_Sup_KogMaw(Ratings): pass class NA_Darius_Sup_Leblanc(Ratings): pass class NA_Darius_Sup_LeeSin(Ratings): pass class NA_Darius_Sup_Leona(Ratings): pass class NA_Darius_Sup_Lissandra(Ratings): pass class NA_Darius_Sup_Lucian(Ratings): pass class NA_Darius_Sup_Lulu(Ratings): pass class NA_Darius_Sup_Lux(Ratings): pass class NA_Darius_Sup_Malphite(Ratings): pass class NA_Darius_Sup_Malzahar(Ratings): pass class NA_Darius_Sup_Maokai(Ratings): pass class NA_Darius_Sup_MasterYi(Ratings): pass class NA_Darius_Sup_MissFortune(Ratings): pass class NA_Darius_Sup_MonkeyKing(Ratings): pass class NA_Darius_Sup_Mordekaiser(Ratings): pass class NA_Darius_Sup_Morgana(Ratings): pass class NA_Darius_Sup_Nami(Ratings): pass class NA_Darius_Sup_Nasus(Ratings): pass class NA_Darius_Sup_Nautilus(Ratings): pass class NA_Darius_Sup_Nidalee(Ratings): pass class NA_Darius_Sup_Nocturne(Ratings): pass class NA_Darius_Sup_Nunu(Ratings): pass class NA_Darius_Sup_Olaf(Ratings): pass class NA_Darius_Sup_Orianna(Ratings): pass class NA_Darius_Sup_Ornn(Ratings): pass class NA_Darius_Sup_Pantheon(Ratings): pass class NA_Darius_Sup_Poppy(Ratings): pass class NA_Darius_Sup_Quinn(Ratings): pass class NA_Darius_Sup_Rakan(Ratings): pass class NA_Darius_Sup_Rammus(Ratings): pass class NA_Darius_Sup_RekSai(Ratings): pass class NA_Darius_Sup_Renekton(Ratings): pass class NA_Darius_Sup_Rengar(Ratings): pass class NA_Darius_Sup_Riven(Ratings): pass class NA_Darius_Sup_Rumble(Ratings): pass class NA_Darius_Sup_Ryze(Ratings): pass class NA_Darius_Sup_Sejuani(Ratings): pass class NA_Darius_Sup_Shaco(Ratings): pass class NA_Darius_Sup_Shen(Ratings): pass class NA_Darius_Sup_Shyvana(Ratings): pass class NA_Darius_Sup_Singed(Ratings): pass class NA_Darius_Sup_Sion(Ratings): pass class NA_Darius_Sup_Sivir(Ratings): pass class NA_Darius_Sup_Skarner(Ratings): pass class NA_Darius_Sup_Sona(Ratings): pass class NA_Darius_Sup_Soraka(Ratings): pass class NA_Darius_Sup_Swain(Ratings): pass class NA_Darius_Sup_Syndra(Ratings): pass class NA_Darius_Sup_TahmKench(Ratings): pass class NA_Darius_Sup_Taliyah(Ratings): pass class NA_Darius_Sup_Talon(Ratings): pass class NA_Darius_Sup_Taric(Ratings): pass class NA_Darius_Sup_Teemo(Ratings): pass class NA_Darius_Sup_Thresh(Ratings): pass class NA_Darius_Sup_Tristana(Ratings): pass class NA_Darius_Sup_Trundle(Ratings): pass class NA_Darius_Sup_Tryndamere(Ratings): pass class NA_Darius_Sup_TwistedFate(Ratings): pass class NA_Darius_Sup_Twitch(Ratings): pass class NA_Darius_Sup_Udyr(Ratings): pass class NA_Darius_Sup_Urgot(Ratings): pass class NA_Darius_Sup_Varus(Ratings): pass class NA_Darius_Sup_Vayne(Ratings): pass class NA_Darius_Sup_Veigar(Ratings): pass class NA_Darius_Sup_Velkoz(Ratings): pass class NA_Darius_Sup_Vi(Ratings): pass class NA_Darius_Sup_Viktor(Ratings): pass class NA_Darius_Sup_Vladimir(Ratings): pass class NA_Darius_Sup_Volibear(Ratings): pass class NA_Darius_Sup_Warwick(Ratings): pass class NA_Darius_Sup_Xayah(Ratings): pass class NA_Darius_Sup_Xerath(Ratings): pass class NA_Darius_Sup_XinZhao(Ratings): pass class NA_Darius_Sup_Yasuo(Ratings): pass class NA_Darius_Sup_Yorick(Ratings): pass class NA_Darius_Sup_Zac(Ratings): pass class NA_Darius_Sup_Zed(Ratings): pass class NA_Darius_Sup_Ziggs(Ratings): pass class NA_Darius_Sup_Zilean(Ratings): pass class NA_Darius_Sup_Zyra(Ratings): pass
15.695444
46
0.766692
972
6,545
4.736626
0.151235
0.209818
0.389661
0.479583
0.803432
0.803432
0
0
0
0
0
0
0.169748
6,545
416
47
15.733173
0.847258
0
0
0.498195
0
0
0
0
0
0
0
0
0
1
0
true
0.498195
0.00361
0
0.501805
0
0
0
0
null
1
1
1
1
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
0
1
1
0
0
1
0
0
8
7006309453752b0fe1db0708c5bbba3447541024
2,468
py
Python
amy/workshops/migrations/0221_auto_20201025_1113.py
code-review-doctor/amy
268c1a199510457891459f3ddd73fcce7fe2b974
[ "MIT" ]
53
2015-01-10T17:39:19.000Z
2019-06-12T17:36:34.000Z
amy/workshops/migrations/0221_auto_20201025_1113.py
code-review-doctor/amy
268c1a199510457891459f3ddd73fcce7fe2b974
[ "MIT" ]
1,176
2015-01-02T06:32:47.000Z
2019-06-18T11:57:47.000Z
amy/workshops/migrations/0221_auto_20201025_1113.py
code-review-doctor/amy
268c1a199510457891459f3ddd73fcce7fe2b974
[ "MIT" ]
44
2015-01-03T15:08:56.000Z
2019-06-09T05:33:08.000Z
# Generated by Django 2.2.13 on 2020-10-25 11:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('workshops', '0220_event_public_status'), ] operations = [ migrations.AlterField( model_name='person', name='data_privacy_agreement', field=models.BooleanField(default=False, verbose_name='I have read and agree to <a href="https://docs.carpentries.org/topic_folders/policies/privacy.html" target="_blank" rel="noreferrer">the data privacy policy</a> of The Carpentries.'), ), migrations.AlterField( model_name='person', name='may_contact', field=models.BooleanField(default=True, help_text='Allow to contact from The Carpentries according to the <a href="https://docs.carpentries.org/topic_folders/policies/privacy.html" target="_blank" rel="noreferrer">Privacy Policy</a>.'), ), migrations.AlterField( model_name='trainingrequest', name='code_of_conduct_agreement', field=models.BooleanField(default=False, verbose_name='I agree to abide by The Carpentries\' <a href="https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html" target="_blank" rel="noreferrer">Code of Conduct</a>.'), ), migrations.AlterField( model_name='trainingrequest', name='data_privacy_agreement', field=models.BooleanField(default=False, verbose_name='I have read and agree to <a href="https://docs.carpentries.org/topic_folders/policies/privacy.html" target="_blank" rel="noreferrer">the data privacy policy</a> of The Carpentries.'), ), migrations.AlterField( model_name='workshoprequest', name='code_of_conduct_agreement', field=models.BooleanField(default=False, verbose_name='I agree to abide by The Carpentries\' <a href="https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html" target="_blank" rel="noreferrer">Code of Conduct</a>.'), ), migrations.AlterField( model_name='workshoprequest', name='data_privacy_agreement', field=models.BooleanField(default=False, verbose_name='I have read and agree to <a href="https://docs.carpentries.org/topic_folders/policies/privacy.html" target="_blank" rel="noreferrer">the data privacy policy</a> of The Carpentries.'), ), ]
56.090909
250
0.678282
296
2,468
5.52027
0.239865
0.073439
0.091799
0.106487
0.837821
0.837821
0.791922
0.755202
0.755202
0.755202
0
0.010081
0.19611
2,468
43
251
57.395349
0.813508
0.018639
0
0.756757
1
0.108108
0.496694
0.067769
0
0
0
0
0
1
0
false
0
0.027027
0
0.108108
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
704c4b7cda27d063fbb314bb1d09928956954ad0
80,686
py
Python
src/OYTX_Recog/Hierarchical_Attn_With_Senti_Map_on_deap.py
Ruiver/CTCNet
539e55ec9fed06028379d35dfd5cd4074755ffd8
[ "Apache-2.0" ]
6
2020-09-17T06:30:41.000Z
2021-11-07T14:19:23.000Z
src/OYTX_Recog/Hierarchical_Attn_With_Senti_Map_on_deap.py
Ruiver/CTCNet
539e55ec9fed06028379d35dfd5cd4074755ffd8
[ "Apache-2.0" ]
null
null
null
src/OYTX_Recog/Hierarchical_Attn_With_Senti_Map_on_deap.py
Ruiver/CTCNet
539e55ec9fed06028379d35dfd5cd4074755ffd8
[ "Apache-2.0" ]
3
2020-09-21T13:00:47.000Z
2021-10-30T07:32:05.000Z
""" author: ouyangtianxiong date: 2020/3/03 des: implements attention-based emotion recognition on deap dataset Based on code from https://github.com/KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch """ import sys sys.path.append('../') __author__ = 'ouyangtianxiong.bupt.edu.cn' import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from torch.nn.utils import clip_grad_norm_ from torch.optim import Adam,SGD,RMSprop from torch.nn import CrossEntropyLoss import numpy as np from Common_utils.model_evaluation import plot_acc_loss_curve from Common_utils.model_training import GradualWarmupScheduler, LabelSmoothSoftmax from Common_utils.basic_module import FCNet import os from data_set.deap_feature import DEAP, DEAP_DATASET, DEAP128 #from Hierarchical_Attn import MultiBlocks, OneSideInterModalityUpdate, InterModalityUpdate,SingleBlock, Classifier import pandas as pd from sklearn.metrics import classification_report, confusion_matrix, accuracy_score, precision_score, recall_score, f1_score from sklearn.model_selection import KFold from Common_utils.basic_utils import deap_normalization os.environ['CUDA_VISIBLE_DEVICES'] = '2' # device = torch.device('cpu') device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') class Classifier(nn.Sequential): def __init__(self, in_features, mid_features, out_features, drop=0.0): super(Classifier, self).__init__() # define number of detector for each sentiment class self.lin1 = FCNet(in_features, mid_features, activate='relu', drop=drop) self.lin2 = FCNet(mid_features, out_features, drop=drop) # self.bilinear = nn.Bilinear(in1_features=in_features, in2_features=in_features, out_features=mid_features) def forward(self, v, q): """ :param v: [batch, r1, features] :param q: [batch, r2, features] :return: """ num_obj = v.shape[2] max_len = q.shape[2] v_mean = v.sum(1) / num_obj q_mean = q.sum(1) / max_len #print("classifier v_mean", v_mean[0]) #print("classifier q_mean", q_mean[0]) #out = self.lin1(v_mean * q_mean) out = self.lin1(v_mean * q_mean) out = self.bilinear(v_mean, q_mean) #print("classifier out 1", out[0]) out = self.lin2(out) #print("classifier out 2", out[0]) return out class InterModalityUpdate(nn.Module): """ Inter-Modality Attention Flow """ def __init__(self, v_size, q_size, output_size, num_head, drop=0.0): super(InterModalityUpdate, self).__init__() self.v_size = v_size self.q_size = q_size self.output_size = output_size self.num_head = num_head self.v_lin = FCNet(v_size, output_size * 3, drop=drop, activate='relu') self.q_lin = FCNet(q_size, output_size * 3, drop=drop, activate='relu') self.v_output = FCNet(output_size + v_size, output_size, drop=drop, activate='relu') self.q_output = FCNet(output_size + q_size, output_size, drop=drop, activate='relu') def forward(self, v, q): """ :param v: eeg feature [batch, regions, feature_size] :param q: eye feature [batch, regions, feature_size] :return: """ batch_size, num_obj = v.shape[0], v.shape[1] max_len = q.shape[1] # transfer feature to Q, K ,V matrix, here Q, K, V are concat together v_tran = self.v_lin(v) q_tran = self.q_lin(q) # mask all padding object/word feature # split Q, K, V v_key, v_query, v_val = torch.split(v_tran, v_tran.size(2) // 3, dim=2) q_key, q_query, q_val = torch.split(q_tran, q_tran.size(2) // 3, dim=2) # apply multi-head v_key_set = torch.split(v_key, v_key.size(2) // self.num_head, dim=2) v_query_set = torch.split(v_query, v_query.size(2) // self.num_head, dim=2) v_val_set = torch.split(v_val, v_val.size(2) // self.num_head, dim=2) q_key_set = torch.split(q_key, q_key.size(2) // self.num_head, dim=2) q_query_set = torch.split(q_query, q_query.size(2) // self.num_head, dim=2) q_val_set = torch.split(q_val, q_val.size(2) // self.num_head, dim=2) # apply multi-head operation for i in range(self.num_head): v_key_slice, v_query_slice, v_val_slice = v_key_set[i], v_query_set[i], v_val_set[i] q_key_slice, q_query_slice, q_val_slice = q_key_set[i], q_query_set[i], q_val_set[i] # calculating attention # [batch, num_obj, max_len] #print(v_query_slice.shape, q_key_slice.shape) q2v = (v_query_slice @ q_key_slice.transpose(1, 2)) / ((self.output_size // self.num_head) ** 0.5) #print(q_query_slice.shape, v_key_slice.shape) v2q = (q_query_slice @ v_key_slice.transpose(1, 2)) / ((self.output_size // self.num_head) ** 0.5) # softmax attention interMAF_q2v = F.softmax(q2v, dim=2).unsqueeze(3) #[batch_size, num_obj, max_len, 1] interMAF_v2q = F.softmax(v2q, dim=2).unsqueeze(3) #[batch_size, max_len, num_obj, 1] torch.cat((v_update, (interMAF_q2v * q_val_slice.unsqueeze(1)).sum(2)), dim=2) v_update = (interMAF_q2v * q_val_slice.unsqueeze(1)).sum(2) if (i == 0) else torch.cat((v_update, (interMAF_q2v * q_val_slice.unsqueeze(1)).sum(2)), dim=2) q_update = (interMAF_v2q * v_val_slice.unsqueeze(1)).sum(2) if (i == 0) else torch.cat((q_update, (interMAF_v2q * v_val_slice.unsqueeze(1)).sum(2)), dim=2) # update new feature cat_v = torch.cat((v, v_update), dim=2) cat_q = torch.cat((q, q_update), dim=2) updated_v = self.v_output(cat_v) updated_q = self.q_output(cat_q) return updated_v, updated_q class OneSideInterModalityUpdate(nn.Module): """ one-side Inter-Modality Attention Flow according to the paper, instead of parallel V->Q & Q->V, we first to V->Q and then Q->V """ def __init__(self,src_size,tgt_size,output_size,num_head,drop=0.0): super(OneSideInterModalityUpdate, self).__init__() self.src_size = src_size self.tgt_size = tgt_size self.output_size = output_size self.num_head = num_head self.src_lin = FCNet(src_size, output_size * 2, drop=drop, activate='relu') self.tgt_lin = FCNet(tgt_size, output_size, drop=drop, activate='relu') self.tgt_output = FCNet(output_size + tgt_size, output_size, drop=drop, activate='relu') def forward(self, src, tgt): """ :param src: eeg feature [batch, regions, feature_size] :param tgt: eye feature [batch, regions, feature_size] :return: """ batch_size, num_src = src.shape[0],src.shape[1] num_tgt = tgt.shape[1] src_tran = self.src_lin(src) tgt_tran = self.tgt_lin(tgt) src_key, src_val = torch.split(src_tran, src_tran.size(2) // 2, dim=2) tgt_query = tgt_tran src_key_set = torch.split(src_key, src_key.size(2) // self.num_head, dim=2) src_val_set = torch.split(src_val, src_val.size(2) // self.num_head, dim=2) tgt_query_set = torch.split(tgt_query,tgt_query.size(2) // self.num_head, dim=2) for i in range(self.num_head): src_key_slice, tgt_query_slice, src_val_slice = src_key_set[i], tgt_query_set[i], src_val_set[i] src2tgt = (tgt_query_slice @ src_key_slice.transpose(1, 2)) / ((self.output_size // self.num_head) ** 0.5) interMAF_src2tgt = F.softmax(src2tgt, dim=2).unsqueeze(3) tgt_update = (interMAF_src2tgt * src_val_slice.unsqueeze(1)).sum(2) if (i == 0) else torch.cat((tgt_update, (interMAF_src2tgt * src_val_slice.unsqueeze(1)).sum(2)), dim=2) cat_tgt = torch.cat((tgt, tgt_update), dim=2) tgt_updated = self.tgt_output(cat_tgt) return tgt_updated class DyIntraModalityUpdate(nn.Module): """ Dynamic Intra-Modality Attention Flow """ def __init__(self, v_size, q_size, output_size, num_head, drop=0.0): super(DyIntraModalityUpdate, self).__init__() self.v_size = v_size self.q_size = q_size self.output_size = output_size self.num_head = num_head self.v4q_gate_lin = FCNet(v_size, output_size, drop=drop) self.q4v_gate_lin = FCNet(q_size, output_size, drop=drop) self.v_lin = FCNet(v_size, output_size * 3, drop=drop, activate='relu') self.q_lin = FCNet(q_size, output_size * 3, drop=drop, activate='relu') self.v_output = FCNet(output_size, output_size,drop=drop, activate='relu') self.q_output = FCNet(output_size, output_size, drop=drop, activate='relu') self.relu = nn.ReLU() self.tanh = nn.Tanh() self.sigmoid = nn.Sigmoid() def forward(self, v, q): """ :param v: [batch_size, num_obj, feature_size] :param q: [batch_size, max_len, feature_size] :return: """ batch_size, num_obj = v.shape[0], v.shape[1] max_len = q.shape[1] # conditioned gating vector v_mean = v.sum(1) / num_obj q_mean = q.sum(1) / max_len v4q_gate = self.sigmoid(self.v4q_gate_lin(v_mean)).unsqueeze(1) # [batch_size, 1, feature_size] q4v_gate = self.sigmoid(self.q4v_gate_lin(q_mean)).unsqueeze(1) # [batch_size, 1, feature_size] # K, Q, V v_tran = self.v_lin(v) q_tran = self.q_lin(q) # split for different use v_key, v_query, v_val = torch.split(v_tran, v_tran.size(2) // 3, dim=2) q_key, q_query, q_val = torch.split(q_tran, q_tran.size(2) // 3, dim=2) # apply conditioned gate gated_v_query = (1 + q4v_gate) * v_query gated_v_key = (1 + q4v_gate) * v_key gated_v_val = (1 + q4v_gate) * v_val gated_q_query = (1 + v4q_gate) * q_query gated_q_key = (1 + v4q_gate) * q_key gated_q_val = (1 + v4q_gate) * q_val # apply multi-head v_key_set = torch.split(gated_v_key, gated_v_key.size(2) // self.num_head, dim=2) v_query_set = torch.split(gated_v_query, gated_v_query.size(2) // self.num_head, dim=2) v_val_set = torch.split(gated_v_val, gated_v_val.size(2) // self.num_head, dim=2) q_key_set = torch.split(gated_q_key, gated_q_key.size(2) // self.num_head, dim=2) q_query_set = torch.split(gated_q_query, gated_q_query.size(2) // self.num_head, dim=2) q_val_set = torch.split(gated_q_val, gated_q_val.size(2) // self.num_head, dim=2) for i in range(self.num_head): v_key_slice, v_query_slice, v_val_slice = v_key_set[i], v_query_set[i], v_val_set[i] q_key_slice, q_query_slice, q_val_slice = q_key_set[i], q_query_set[i], q_val_set[i] # calcuating attention v2v = (v_query_slice @ v_key_slice.transpose(1,2)) / ((self.output_size // self.num_head) ** 0.5) q2q = (q_query_slice @ q_key_slice.transpose(1,2)) / ((self.output_size // self.num_head) ** 0.5) dyIntranMAF_v2v = F.softmax(v2v, dim=2).unsqueeze(3) # [batch_size, num_obj, num_obj, 1] dyIntranMAF_q2q = F.softmax(q2q, dim=2).unsqueeze(3) # [batch_size, max_len, max_len, 1] # calculating update input v_update = (dyIntranMAF_v2v * v_val_slice.unsqueeze(1)).sum(2) if (i == 0) else torch.cat((v_update, (dyIntranMAF_v2v * v_val_slice.unsqueeze(1)).sum(2)), dim=2) q_update = (dyIntranMAF_q2q * q_val_slice.unsqueeze(1)).sum(2) if (i == 0) else torch.cat((q_update, (dyIntranMAF_q2q * q_val_slice.unsqueeze(1)).sum(2)), dim=2) # update updated_v = self.v_output(v + v_update) updated_q = self.q_output(q + q_update) return updated_v, updated_q class SingleBlock(nn.Module): """ Single Block Inter- and Intra modality stack multiple times, in such circumstance, all the basic blocks share the same parameters in the model """ def __init__(self, num_blocks, v_size, q_size, output_size, num_inter_head, num_intra_head, drop=0.0): super(SingleBlock, self).__init__() self.v_size = v_size self.q_size = q_size self.output_size = output_size self.num_inter_head = num_inter_head self.num_intra_head = num_intra_head self.num_block = num_blocks self.v_lin = FCNet(v_size, output_size, drop=drop, activate='relu') self.q_lin = FCNet(q_size, output_size, drop=drop, activate='relu') self.v2q_interBlock = OneSideInterModalityUpdate(output_size, output_size, output_size, num_inter_head, drop) self.q2v_interBlock = OneSideInterModalityUpdate(output_size, output_size, output_size, num_inter_head, drop) self.intraBlock = DyIntraModalityUpdate(output_size, output_size, output_size, num_intra_head, drop) def forward(self, v, q): """ :param v: eeg feature [batch_size, regions, feature_size] :param q: eye feature [batch_size, regions, feature_size] :return: """ # transfer features v = self.v_lin(v) q = self.q_lin(q) # residual connection v_container = [v] q_container = [q] result_v = [v] result_q = [q] for i in range(self.num_block): q1 = self.v2q_interBlock(v_container[-1], q_container[-1]) q_container.append(q1) v1 = self.q2v_interBlock(q_container[-1], v_container[-1]) v_container.append(v1) v2, q2 = self.intraBlock(v_container[-1] + v_container[-2], q_container[-1] + q_container[-2]) v_container.append(v2) q_container.append(q2) result_v.append(v1) result_v.append(v2) result_q.append(q1) result_q.append(q2) v_container.append(v_container[-1] + v_container[-2] + v_container[-3]) q_container.append(q_container[-1] + q_container[-2] + q_container[-3]) return sum(result_v), sum(result_q) class MultiBlocks(nn.Module): """ Stack multiple single block layer, each layer possess their own parameters """ def __init__(self, num_blocks, v_size, q_size, output_size, num_inter_head, num_intra_head, drop=0.0): super(MultiBlocks, self).__init__() self.v_size = v_size self.q_size = q_size self.output_size = output_size self.num_inter_head = num_inter_head self.num_intra_head = num_intra_head self.num_blocks = num_blocks self.v_lin = FCNet(v_size, output_size, drop=drop, activate='relu') self.q_lin = FCNet(q_size, output_size, drop=drop, activate='relu') blocks = [] for i in range(self.num_blocks): #blocks.append(OneSideInterModalityUpdate(output_size, output_size, output_size, num_inter_head, drop)) #blocks.append(OneSideInterModalityUpdate(output_size, output_size, output_size, num_inter_head, drop)) blocks.append(InterModalityUpdate(output_size, output_size, output_size, num_inter_head, drop)) blocks.append(DyIntraModalityUpdate(output_size, output_size, output_size, num_intra_head, drop)) self.multi_blocks = nn.ModuleList(blocks) def forward(self, v, q): """ :param v: eeg feature [batch, regions, feature_size] :param q: eye feature [batch, regions, feature_size] :return: """ # transfer feature v = self.v_lin(v) q = self.q_lin(q) v_container = [v] q_container = [q] result_v = [v] result_q = [q] # dense residule connection for i in range(self.num_blocks): # q1 = self.multi_blocks[i * 3 + 0](v_container[-1], q_container[-1]) # q_container.append(q1) # v1 = self.multi_blocks[i * 3 + 1](q_container[-1], v_container[-1]) # v_container.append(v1) v1, q1 = self.multi_blocks[i * 2 + 0](v_container[-1], q_container[-1]) q_container.append(q1) v_container.append(v1) v2, q2 = self.multi_blocks[i * 2 + 1](v_container[-1] + v_container[-2], q_container[-1] + q_container[-2]) v_container.append(v2) q_container.append(q2) result_v.append(v1) result_v.append(v2) result_q.append(q1) result_q.append(q2) v_container.append(v_container[-1] + v_container[-2] + v_container[-3]) q_container.append(q_container[-1] + q_container[-2] + q_container[-3]) return sum(result_v), sum(result_q) class EEGFeatureExtractor(nn.Module): def __init__(self, eeg_size, output_size): super(EEGFeatureExtractor, self).__init__() self.eeg_size = eeg_size self.output_size = output_size self.regions = 14 # regions的数量 self.regions_indexs = [torch.LongTensor(e) for e in [[0, 1, 16, 17], [2, 18, 19], [3, 4], [20], [7,8], [21,25,26], [5, 22], [6,23,24], [9,27], [11], [29], [10,15,28], [12, 30], [13, 14,31]]] reginal_extractors = [] for i in range(self.regions): reginal_extractors.append(nn.LSTM(input_size=eeg_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) self.reginalFeatureExtractors = nn.ModuleList(reginal_extractors) self.bn = nn.BatchNorm1d(num_features=self.regions) def forward(self, x): """ :param x: [batch, n_electrode, 128] :return: [batch, regions, feature_size] """ batch, n_electrode, _ = x.shape X_regions_input = [] # 列表存储不同区域的张量输入 for i in range(self.regions): X_regions_input.append(x.index_select(dim=1, index=self.regions_indexs[i].to(device))) X_regional_lstm_out = [] for i in range(self.regions): shape = X_regions_input[i].shape # print(shape) # 先转成(B*T,n_i,d)再进LSTM hidden_units, _ = self.reginalFeatureExtractors[i](X_regions_input[i].reshape((-1, shape[-2], shape[-1]))) X_regional_lstm_out.append(hidden_units[:, -1, :].squeeze()) # X_regional_feature : 列表:元素为tensor [ B*T, regions_num, 2*self.d_r] # reshape成(B*T, regions, 2*self.d_r) # (B * T, regions, 2* self.d_r) X_regional_feature = torch.cat(X_regional_lstm_out, dim=-1).reshape(batch, self.regions, self.output_size) return self.bn(X_regional_feature) class PeripheralFeatureExtractor(nn.Module): def __init__(self, peripheral_size, output_size): super(PeripheralFeatureExtractor, self).__init__() self.peripheral_size = peripheral_size self.output_size = output_size self.regions = 8 self.regions_indexs = [torch.LongTensor(e) for e in [[0], [1], [2], [3], [4], [5], [6], [7]]] eye_extractor = [] eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) eye_extractor.append(nn.LSTM(input_size=peripheral_size, hidden_size= output_size // 2, batch_first=True, bias=True, bidirectional=True)) self.eyeFeatureExtractor = nn.ModuleList(eye_extractor) self.bn = nn.BatchNorm1d(num_features=self.regions) def forward(self, x): """ :param x: EYE feature [batch, peripheral_num, 128] :return: [batch, regons, output_size] """ batch, n_electrode, _ = x.shape X_regions_input = [] # 列表存储不同区域的张量输入 for i in range(self.regions): X_regions_input.append(x.index_select(dim=1, index=self.regions_indexs[i].to(device))) X_regional_lstm_out = [] for i in range(self.regions): shape = X_regions_input[i].shape # print(shape) # 先转成(B*T,n_i,d)再进LSTM hidden_units, _ = self.eyeFeatureExtractor[i](X_regions_input[i].reshape((-1, shape[-2], shape[-1]))) X_regional_lstm_out.append(hidden_units[:, -1, :].squeeze()) # X_regional_feature : 列表:元素为tensor [ B*T, regions_num, 2*self.d_r] # reshape成(B*T, regions, 2*self.d_r) # (B * T, regions, 2* self.d_r) X_regional_feature = torch.cat(X_regional_lstm_out, dim=-1).reshape(batch, self.regions, self.output_size) return self.bn(X_regional_feature) class PeripheralFeatureExtractor2(nn.Module): def __init__(self, peripheral_size, output_size): super(PeripheralFeatureExtractor2, self).__init__() self.peripheral_size = peripheral_size self.output_size = output_size self.regions = 6 self.regions_indexs = [torch.LongTensor(e) for e in [[0, 1], [2, 3], [4], [5], [6], [7]]] eye_extractor = [] eye_extractor.append(FCNet(in_size=10, out_size=output_size, activate='relu')) eye_extractor.append(FCNet(in_size=10, out_size=output_size, activate='relu')) eye_extractor.append(FCNet(in_size=5, out_size=output_size, activate='relu')) eye_extractor.append(FCNet(in_size=5, out_size=output_size, activate='relu')) eye_extractor.append(FCNet(in_size=5, out_size=output_size, activate='relu')) eye_extractor.append(FCNet(in_size=5, out_size=output_size, activate='relu')) self.eyeFeatureExtractor = nn.ModuleList(eye_extractor) self.bn = nn.BatchNorm1d(num_features=self.regions) def forward(self, x): """ :param x: peripheral feature [batch, 8, 5] :return: [batch, regions, output_size] """ B = x.shape[0] X_regions_input = [] # 列表存储不同区域的张量输入 for i in range(self.regions): tmp = x.index_select(dim=1, index=self.regions_indexs[i].to(device)) #print(tmp.shape) tmp = tmp.reshape(B, -1) #print(tmp.shape) X_regions_input.append(tmp) X_regional_output = [] for i in range(self.regions): X_regional_output.append( self.eyeFeatureExtractor[i](X_regions_input[i]) ) X_regional_feature = torch.cat(X_regional_output, dim=-1).reshape(B, self.regions, self.output_size) return self.bn(X_regional_feature) class Senti_Map_Classifier(nn.Sequential): def __init__(self, in_features, mid_features, out_features, drop=0.0): super(Senti_Map_Classifier, self).__init__() # define number of detector for each sentiment class self.k = 10 self.emotion_class = out_features eeg_detectors = [] eye_detectors = [] for i in range(out_features): eeg_detectors.append( nn.Conv1d(in_channels=in_features, out_channels=self.k, kernel_size=1, stride=1, padding=0, bias=True)) eye_detectors.append( nn.Conv1d(in_channels=in_features, out_channels=self.k, kernel_size=1, stride=1, padding=0, bias=True)) self.eeg_detectors = nn.ModuleList(eeg_detectors) self.eye_detectors = nn.ModuleList(eye_detectors) self.lin1 = FCNet(in_features * self.emotion_class, mid_features, activate='relu', drop=drop) self.lin2 = FCNet(mid_features, out_features, drop=drop) emotion_classifer = [] self.bilinears = nn.ModuleList([nn.Bilinear(in1_features=in_features, in2_features=in_features, out_features=in_features) for _ in range(self.emotion_class)]) for i in range(self.emotion_class): emotion_classifer.append(nn.Sequential( nn.Dropout(p=drop), FCNet(in_features, mid_features, activate='relu', drop=drop), FCNet(mid_features, 1, drop=drop) )) self.emotion_classifer = nn.ModuleList(emotion_classifer) def eeg_senti_relevance_detect(self, v): b, r, d = v.shape v = v.permute(0, 2, 1) eeg_activate = [] for i in range(self.emotion_class): # [batch, k, r] k_eeg_activate_per_class = torch.softmax(self.eeg_detectors[i](v), dim=-1) # [batch, 1, k ,r] eeg_activate = k_eeg_activate_per_class.unsqueeze(dim=1) if i == 0 else torch.cat( (eeg_activate, k_eeg_activate_per_class.unsqueeze(dim=1)), dim=1) assert eeg_activate.shape == torch.Size([b, self.emotion_class, self.k, r]), "sentiment map wrong!! {}".format( eeg_activate.shape) return eeg_activate.permute(0, 1, 3, 2) def eye_senti_relevance_detect(self, v): b, r, d = v.shape v = v.permute(0, 2, 1) eye_activate = [] for i in range(self.emotion_class): # [batch, k, r] k_eye_activate_per_class = torch.softmax(self.eeg_detectors[i](v), dim=-1) # [batch, 1, k ,r] eye_activate = k_eye_activate_per_class.unsqueeze(dim=1) if i == 0 else torch.cat( (eye_activate, k_eye_activate_per_class.unsqueeze(dim=1)), dim=1) assert eye_activate.shape == torch.Size([b, self.emotion_class, self.k, r]), "sentiment map wrong!! {}".format( eye_activate.shape) return eye_activate.permute(0, 1, 3, 2) def forward(self, v, q): """ :param v: [batch, r1, features] :param q: [batch, r2, features] :return: """ b, r1 = v.shape[0], v.shape[1] r2 = q.shape[1] eeg = v eye = q # [batch, emotion_class, r1, k] eeg_senti_relevance = self.eeg_senti_relevance_detect(v) # [batch, emotion_class, r2, k] eye_senti_relevance = self.eye_senti_relevance_detect(q) # # [batch, emotion_class, r1,1] # attn_eeg = eeg_senti_relevance.sum(dim=3, keepdims=True) / self.k # # # [batch, emotion_class, r2,1] # attn_eye = eye_senti_relevance.sum(dim=3, keepdims=True) / self.k # # # [batch, emotion_class, r1, 1] * [batch, 1, r1, features] = [batch, emotion class, r, features] # # introduce learnable sentiment relevance # map_eeg = attn_eeg * eeg.unsqueeze(dim=1) # map_eye = attn_eye * eye.unsqueeze(dim=1) # # [batch, emotion_class, feature] # map_eeg = map_eeg.sum(dim=2) / r1 # map_eye = map_eye.sum(dim=2) / r2 # # # fusion_feature = map_eeg * map_eye # final = fusion_feature.view(b, -1) # out = self.lin1(final) # out = self.lin2(out) # [batch, emotion_class, r1,1] attn_eeg = eeg_senti_relevance.sum(dim=3, keepdim=True) / self.k emotion_eeg_attn = attn_eeg.squeeze().sum(dim=2, keepdim=False) / attn_eeg.size(2) # [batch, emotion_class] represents the maximum activate in sentiment map emotion_eeg_attn = emotion_eeg_attn.squeeze() # [batch, emotion_class, r2,1] attn_eye = eye_senti_relevance.sum(dim=3, keepdim=True) / self.k emotion_eye_attn = attn_eye.squeeze().sum(dim=2, keepdim=False) / attn_eye.size(2) emotion_eye_attn = emotion_eye_attn.squeeze() # [batch, emotion_class, r1, 1] * [batch, 1, r1, features] = [batch, emotion class, r, features] # introduce learnable sentiment relevance map_eeg = attn_eeg * eeg.unsqueeze(dim=1) map_eye = attn_eye * eye.unsqueeze(dim=1) out = [] for i in range(self.emotion_class): emotion_specific_eeg = map_eeg[:, i, :, :].squeeze().mean(1).squeeze() emotion_specific_eye = map_eye[:, i, :, :].squeeze().mean(1).squeeze() tmp = self.bilinears[i](emotion_specific_eeg, emotion_specific_eye) out1 = self.emotion_classifer[i](tmp) out.append(out1) out = torch.cat(out, dim=-1) return out # , torch.softmax(emotion_eeg_attn,dim=1), torch.softmax(emotion_eye_attn,dim=1) class Hierarchical_ATTN_With_Senti_Map(nn.Module): def __init__(self, class_num=4): super(Hierarchical_ATTN_With_Senti_Map, self).__init__() # self.eeg_features = 16 # 256 # self.peripheral_features = 16 # 256 self.eeg_features = 64 # 256 self.peripheral_features = 64 # 256 self.hidden_feature = 128 # 256 self.num_inter_head = 4 self.num_intra_head = 4 self.num_block = 1 assert self.hidden_feature % self.num_inter_head == 0, 'hidden features size can not be divided by header nums, please check!!' assert self.hidden_feature % self.num_inter_head == 0, 'hidden features size can not be divided by header nums, please check!!' # basic feature extractor self.eegFeatureExtractor = EEGFeatureExtractor(eeg_size=5, output_size=self.eeg_features) self.eyeFeatureExtractor = PeripheralFeatureExtractor2(peripheral_size=5, output_size=self.peripheral_features) # inter- & intra-modality attention flow mechanism for fusion cross modality feature self.interIntraBlocks = MultiBlocks( num_blocks=self.num_block, v_size=self.peripheral_features, q_size=self.eeg_features, output_size=self.hidden_feature, num_inter_head=self.num_inter_head, num_intra_head=self.num_intra_head, drop=0.5 ) # emotion classifier # self.classifier = Classifier( # in_features=self.hidden_feature, # mid_features=512, out_features=class_num, # drop=0.5) self.classifier = Senti_Map_Classifier( in_features=self.hidden_feature, mid_features=512, out_features=class_num, drop=0.5) def forward(self, v, q): """ :param v: eeg feature [batch, n, 5] :param q: eye feature [batch, 31] :return: predict logits [batch, max_answer] """ # prepare v & q feature v = self.eegFeatureExtractor(v) q = self.eyeFeatureExtractor(q) # feature normalization v = v / (v.norm(p=2, dim=2, keepdim=True) + 1e-12).expand_as(v) # [batch, num_obj, feature] q = q / (q.norm(p=2, dim=2, keepdim=True) + 1e-12).expand_as(q) # inter- & intra- modality attention flow v, q = self.interIntraBlocks(v, q) # predict logits answer = self.classifier(v, q) return answer def generate_k_data(data,n_split=10,shuffle=True): if shuffle: np.random.shuffle(data) total_count = data.shape[0] for k in range(n_split): pass def subject_dependent(individual=1, class_target=4): class_list = [ "Valence", "Arousal", "Dominance", "Liking", "Valence-Arousal" ] class_nums = [2,2,2,2,4] test_loss_list = [] # 记录每一折验证的loss test_acc_list = [] # 记录每一折验证的acc # prepare data nor_method = 1 label_smooth = 0.1 shuffle = True # reading the data in the whole dataset deap = DEAP(individual=individual, normalization=nor_method) train_X, train_Y = deap.get_train_data() validate_X, validate_Y = deap.get_validate_data() test_X, test_Y = deap.get_test_data() # Hyper-parameters epochs = 100 batch_size = 512 learning_rate = 5e-6 criterion = LabelSmoothSoftmax(lb_smooth=label_smooth) # criterion_attn = CrossEntropyLoss() print("starting subject-dependent training experiments on individual %d class %s" % ( individual, class_list[class_target])) print("train_X shape", train_X.shape) print("train_Y shape", train_Y.shape) print("validate_X shape", validate_X.shape) print("validate_Y shape", validate_Y.shape) print("test_X shape", test_X.shape) print("test_Y shape", test_Y.shape) train_Y, test_Y, validate_Y = train_Y[:, class_target].squeeze(), test_Y[:, class_target].squeeze(), validate_Y[:, class_target].squeeze() train_loader = DataLoader(dataset=DEAP_DATASET(train_X, train_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) validate_loader = DataLoader(dataset=DEAP_DATASET(validate_X, validate_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) test_loader = DataLoader(dataset=DEAP_DATASET(test_X, test_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) exp_des = "%d_dependent_%s_%s_%d_%d_%s" % ( individual, 'shuffle' if shuffle else "without_shuffle", 'deap', epochs, batch_size, class_list[class_target]) print("model construction...") net = Hierarchical_ATTN_With_Senti_Map(class_num=class_nums[class_target]) # if fine_tuning we continue train the pretrained model net = net.to(device) save_model_path = '../../saved_models/%s/deap/subject_%d/%s/' % ( net.__class__.__name__, individual, class_list[class_target]) if not os.path.exists(save_model_path): os.makedirs(save_model_path) optimization = Adam(net.parameters(), lr=learning_rate, weight_decay=0.001) # save model training state running_loss_list = [] running_acc_list = [] validate_loss_list = [] validate_acc_list = [] best_acc = -1 print("start training...") scheduler_cosine = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer=optimization, T_max=epochs) scheduler_warmup = GradualWarmupScheduler(optimizer=optimization, multiplier=10, total_epoch=np.ceil(0.1 * epochs), after_scheduler=scheduler_cosine) for epoch in range(epochs): net.train() running_loss = 0.0 correct = 0.0 total = 0.0 for i, (feature, target) in enumerate(train_loader): feature = feature.reshape(-1, 40, 5) optimization.zero_grad() #print("训练集label:{}".format(target)) # print("脏数据统计", torch.sum(torch.isnan(feature), dim=0)) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 5) peripheral = peripheral.reshape(-1, 8, 5) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) out = net(eeg, peripheral) #print("训练集", out.data[:5]) #print("训练集",eeg_attn.shape, eeg_attn.data[:5]) #print("训练集",eye_attn.shape, eye_attn.data[:5]) # print("batch output",out[0]) cross_entropy_loss = criterion(out, target) # eeg_attn_loss = criterion_attn(eeg_attn, target) # eye_attn_loss = criterion_attn(eye_attn, target) #loss = cross_entropy_loss #print("交叉熵损失", cross_entropy_loss.data) #print("eeg注意力损失", eeg_attn_loss.data) #print("eye注意力损失", eeg_attn_loss.data) cross_entropy_loss.backward() clip_grad_norm_(net.parameters(), max_norm=10) # for name, parms in net.named_parameters(): # print('打印梯度') # print('-->name:', name, '-->grad_requirs:', parms.requires_grad, \ # ' -->grad_value:', parms.grad) optimization.step() running_loss += cross_entropy_loss.item() # print("batch loss", loss.item()) _, prediction = torch.max(out.data, dim=-1) #print('训练集', prediction[:5]) total += target.size(0) correct += prediction.eq(target.data).cpu().sum().item() cur_loss = running_loss / total cur_acc = correct / total # print(cur_acc, correct, total) if isinstance(cur_acc, torch.Tensor): cur_acc = cur_acc.item() if isinstance(cur_loss, torch.Tensor): cur_loss = cur_loss.item() print('Training Loss: %.10f | Training Acc: %.3f%% (%d/%d)' % ( cur_loss, 100 * cur_acc, correct, total)) running_loss_list.append(cur_loss) running_acc_list.append(cur_acc) scheduler_warmup.step() if epoch % 5 == 0: net.eval() print("start evaluating...") validate_loss = 0.0 validate_correct = 0.0 validate_total = 0.0 for i, (feature, target) in enumerate(validate_loader): feature = feature.reshape(-1, 40, 5) #print("训练集label:{}".format(target)) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 5) peripheral = peripheral.reshape(-1, 8, 5) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) with torch.no_grad(): out= net(eeg, peripheral) #print("c集", out.data[:5]) #print("c集", eeg_attn.data[:5]) #print("c集", eye_attn.data[:5]) loss = criterion(out, target) validate_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) #print('验证集',prediction[:10]) validate_total += target.size(0) validate_correct += prediction.eq(target.data).cpu().sum().item() #print("验证集相等:{}".format(prediction.eq(target.data))) validate_acc = validate_correct / validate_total validate_loss = validate_loss / validate_total if isinstance(validate_acc, torch.Tensor): validate_acc = validate_acc.item() if isinstance(validate_loss, torch.Tensor): validate_loss = validate_loss.item() print('Validate Loss: %.10f | Validate-Acc: %.3f%% (%d/%d)' % ( validate_loss, 100 * validate_acc, validate_correct, validate_total)) validate_acc_list.append(validate_acc) validate_loss_list.append(validate_loss) if validate_acc > best_acc: best_acc = validate_acc print("better model founded in validating sets, start saving new model") model_name = '%s' % (net.__class__.__name__) state = { 'net': net.state_dict(), 'epoch': epoch, 'best_acc': best_acc, 'current_loss': validate_loss } torch.save(state, os.path.join(save_model_path, model_name)) # 开始计算测试集 checkpoint = torch.load(os.path.join(save_model_path, net.__class__.__name__)) net.load_state_dict(checkpoint['net']) print("start evaluating...") testing_loss = 0.0 test_correct = 0.0 test_total = 0.0 y_pre = [] y_true = [] for i, (feature, target) in enumerate(test_loader): feature = feature.reshape(-1, 40, 5) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 5) peripheral = peripheral.reshape(-1, 8, 5) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) y_true.extend(target.cpu().numpy().tolist()) with torch.no_grad(): out = net(eeg, peripheral) loss = criterion(out, target) testing_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) y_pre.extend(prediction.cpu().numpy().tolist()) # print(prediction) test_total += target.size(0) test_correct += prediction.eq(target.data).cpu().sum().item() test_acc = test_correct / test_total test_loss = testing_loss / test_total if isinstance(test_acc, torch.Tensor): test_acc = test_acc.item() if isinstance(test_loss, torch.Tensor): test_loss = test_loss.item() print('Test Loss: %.10f | Test Acc: %.3f%% (%d/%d)' % ( test_loss, 100 * test_acc, test_correct, test_total)) test_acc_list.append(test_acc) test_loss_list.append(test_loss) plot_acc_loss_curve({'train_loss': running_loss_list, 'train_acc': running_acc_list, 'test_loss': validate_loss_list, 'test_acc': validate_acc_list}, net.__class__.__name__, exp_des) pd.DataFrame.from_dict({ 'test_loss': test_loss_list, 'test_acc': test_acc_list }).to_csv('./results/deap_individual_%d_%s.csv' % (individual, class_list[class_target]), mode='w', index=False, header=True, encoding='utf-8') y_true = np.array(y_true) y_pre = np.array(y_pre) with open('./results/{}_classification_reports.txt'.format(class_list[class_target]), 'a+') as f: f.write("***********Predict results of individual {}***********\n".format(individual)) f.write("classification reports:\n{}\nconfusion matrix:\n{}\noytx_accuracy_score:{}\noytx_precision_score:{}\noytx_recall_score:{}\noytx_f1_score:{}\n".format(classification_report(y_true, y_pre), confusion_matrix(y_true, y_pre),accuracy_score(y_true, y_pre),precision_score(y_true, y_pre, average='macro'),recall_score(y_true, y_pre, average='macro'),f1_score(y_true,y_pre, average='macro'))) f.write("******************************************************\n") def subject_independent(all_X, all_Y, individual=1, class_target=4): # 跨个体,留一法 class_list = [ "Valence", "Arousal", "Dominance", "Liking", "Valence-Arousal" ] class_nums = [2,2,2,2,4] test_loss_list = [] # 记录每一折验证的loss test_acc_list = [] # 记录每一折验证的acc # prepare data nor_method = 1 label_smooth = 0.1 shuffle = True kfold = 5 # reading the data in the whole dataset # Hyper-parameters epochs = 120 batch_size = 512 learning_rate = 1e-3 criterion = LabelSmoothSoftmax(lb_smooth=label_smooth) criterion_attn = CrossEntropyLoss() print("starting subject-independent training experiments on individual %d class %s" % ( individual, class_list[class_target])) train_X = np.vstack([item for i, item in enumerate(all_X) if i != individual]).reshape(-1,40,128) train_Y = np.vstack([item for i, item in enumerate(all_Y) if i != individual]).reshape(-1,5) test_X = all_X[individual].reshape(-1,40,128) test_Y = all_Y[individual].reshape(-1,5) sample_index = list(range(train_X.shape[0])) if shuffle: np.random.seed(seed=0) np.random.shuffle(sample_index) val_X, val_Y = train_X[sample_index[:int(len(sample_index)*0.3)]], train_Y[sample_index[:int(len(sample_index)*0.3)]] #train_X, train_Y = train_X[sample_index[int(len(sample_index)*0.3):]], train_Y[sample_index[int(len(sample_index)*0.3):]] print("train_X shape", train_X.shape) print("train_Y shape", train_Y.shape) print("val_X shape", val_X.shape) print("val_Y shape", val_Y.shape) print("test_X shape", test_X.shape) print("test_Y shape", test_Y.shape) train_Y, test_Y, val_Y = train_Y[:, class_target].squeeze(), test_Y[:, class_target].squeeze(), val_Y[:, class_target].squeeze() train_loader = DataLoader(dataset=DEAP_DATASET(train_X, train_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) val_loader = DataLoader(dataset=DEAP_DATASET(val_X, val_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) test_loader = DataLoader(dataset=DEAP_DATASET(test_X, test_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) exp_des = "%d_dependent_in_%s_%s_%d_%d_%s" % ( individual, 'shuffle' if shuffle else "without_shuffle", 'deap', epochs, batch_size, class_list[class_target]) print("model construction...") net = Hierarchical_ATTN_With_Senti_Map(class_num=class_nums[class_target]) # if fine_tuning we continue train the pretrained model net = net.to(device) save_model_path = '../../saved_models/%s/deap_subjuect_independent/subject_%d/%s/' % ( net.__class__.__name__, individual, class_list[class_target]) if not os.path.exists(save_model_path): os.makedirs(save_model_path) optimization = Adam(net.parameters(), lr=learning_rate, weight_decay=0.001) # save model training state running_loss_list = [] running_acc_list = [] testing_loss_list = [] testing_acc_list = [] best_acc = -1 print("start training...") scheduler_cosine = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer=optimization, T_max=epochs) scheduler_warmup = GradualWarmupScheduler(optimizer=optimization, multiplier=10, total_epoch=np.ceil(0.1 * epochs), after_scheduler=scheduler_cosine) for epoch in range(epochs): net.train() running_loss = 0.0 correct = 0.0 total = 0.0 for i, (feature, target) in enumerate(train_loader): optimization.zero_grad() # print("脏数据统计", torch.sum(torch.isnan(feature), dim=0)) eeg = feature[:, :32] peripheral = feature[:, 32:] eeg = eeg.reshape(-1, 32, 128) eeg = eeg.to(device) peripheral = peripheral.reshape(-1, 8, 128) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) out, eeg_attn, eye_attn = net(eeg, peripheral) # print("batch output",out[0]) cross_entropy_loss = criterion(out, target) eeg_attn_loss = criterion_attn(eeg_attn, target) eye_attn_loss = criterion_attn(eye_attn, target) loss = cross_entropy_loss + eeg_attn_loss + eye_attn_loss loss.backward() for name, params in optimization.param_groups: print('打印梯度') print('-->name:', name, '-->grad_requirs:', params.requires_grad, \ ' -->grad_value:', params.grad) clip_grad_norm_(net.parameters(), max_norm=10) optimization.step() running_loss += loss.item() # print("batch loss", loss.item()) _, prediction = torch.max(out.data, dim=-1) total += target.size(0) correct += prediction.eq(target.data).cpu().sum().item() cur_loss = running_loss / len(train_loader) cur_acc = correct / total # print(cur_acc, correct, total) if isinstance(cur_acc, torch.Tensor): cur_acc = cur_acc.item() if isinstance(cur_loss, torch.Tensor): cur_loss = cur_loss.item() print('Loss: %.10f | Acc: %.3f%% (%d/%d)' % ( cur_loss, 100 * cur_acc, correct, total)) running_loss_list.append(cur_loss) running_acc_list.append(cur_acc) scheduler_warmup.step() if epoch % 1 == 0: net.eval() print("start evaluating...") test_loss = 0.0 test_correct = 0.0 test_total = 0.0 for i, (feature, target) in enumerate(val_loader): eeg = feature[:, :32] peripheral = feature[:, 32:] eeg = eeg.reshape(-1, 32, 128) eeg = eeg.to(device) peripheral = peripheral.reshape(-1, 8, 128) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) with torch.no_grad(): out, eeg_attn, eye_attn = net(eeg, peripheral) loss = criterion(out, target) + criterion_attn(eeg_attn, target) + criterion_attn(eye_attn, target) test_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) # print(prediction) test_total += target.size(0) test_correct += prediction.eq(target.data).cpu().sum().item() test_acc = test_correct / test_total test_loss = test_loss / len(test_loader) if isinstance(test_acc, torch.Tensor): test_acc = test_acc.item() if isinstance(test_loss, torch.Tensor): val_loss = test_loss.item() print('Testset Loss: %.10f | Test-Acc: %.3f%% (%d/%d)' % ( test_loss, 100 * test_acc, test_correct, test_total)) testing_acc_list.append(test_acc) testing_loss_list.append(test_loss) if test_acc > best_acc: best_acc = test_acc print("better model founded in testsets, start saving new model") model_name = '%s' % (net.__class__.__name__) state = { 'net': net.state_dict(), 'epoch': epoch, 'best_acc': best_acc, 'current_loss': test_loss } torch.save(state, os.path.join(save_model_path, model_name)) # 开始计算测试集 checkpoint = torch.load(os.path.join(save_model_path, net.__class__.__name__)) net.load_state_dict(checkpoint['net']) print("start evaluating...") testing_loss = 0.0 test_correct = 0.0 test_total = 0.0 for i, (feature, target) in enumerate(test_loader): eeg = feature[:, :32] peripheral = feature[:, 32:] eeg = eeg.reshape(-1, 32, 128) eeg = eeg.to(device) peripheral = peripheral.reshape(-1, 8, 128) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) with torch.no_grad(): out, eeg_attn, eye_attn = net(eeg, peripheral) loss = criterion(out, target) + criterion_attn(eeg_attn, target) + criterion_attn(eye_attn, target) testing_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) # print(prediction) test_total += target.size(0) test_correct += prediction.eq(target.data).cpu().sum().item() test_acc = test_correct / test_total test_loss = testing_loss / len(test_loader) if isinstance(test_acc, torch.Tensor): test_acc = test_acc.item() if isinstance(test_loss, torch.Tensor): test_loss = test_loss.item() print('Testset Loss: %.10f | Acc: %.3f%% (%d/%d)' % ( test_loss, 100 * test_acc, test_correct, test_total)) test_acc_list.append(test_acc) test_loss_list.append(test_loss) plot_acc_loss_curve({'train_loss': running_loss_list, 'train_acc': running_acc_list, 'test_loss': testing_loss_list, 'test_acc': testing_acc_list}, net.__class__.__name__, exp_des) pd.DataFrame.from_dict({ 'test_loss': test_loss_list, 'test_acc': test_acc_list }).to_csv('./subject_independent_results/deap_individual_%d_%s.csv' % (individual, class_list[class_target]), mode='w', index=False, header=True, encoding='utf-8') def subject_dependent_k_fold(individual=1, class_target=4, k_fold = 5): # k-fold cv class_list = [ "Valence", "Arousal", "Dominance", "Liking", "Valence-Arousal" ] class_nums = [2, 2, 2, 2, 4] test_loss_list = [] # 记录每一折验证的loss test_acc_list = [] # 记录每一折验证的acc test_precision_list = [] # 记录每一折验证的precision test_recall_list = [] # 记录每一折验证的recall test_f1_list = [] #记录每一折验证的f1 test_accuray_list = [] # 记录每一折验证的准确率 # prepare data nor_method = 0 label_smooth = 0.3 shuffle = True # reading the data in the whole dataset deap = DEAP(individual=individual) k_fold_data = deap.get_kfold_X_Y2(k_fold) for fold, (train_X, train_Y, test_X, test_Y) in enumerate(k_fold_data): print("start {} th cross-validation".format(fold)) train_X, train_Y, test_X, test_Y = deap_normalization(train_X, train_Y, test_X, test_Y, nor_method=1, merge=2, column=0) # Hyper-parameters epochs = 80 batch_size = 512 learning_rate = 1e-4 criterion = LabelSmoothSoftmax(lb_smooth=label_smooth) # criterion_attn = CrossEntropyLoss() print("starting subject-dependent %d-th CV training experiments on individual %d class %s" % (fold, individual, class_list[class_target])) print("train_X shape", train_X.shape) print("train_Y shape", train_Y.shape) print("test_X shape", test_X.shape) print("test_Y shape", test_Y.shape) train_Y, test_Y = train_Y[:, class_target].squeeze(), test_Y[:, class_target].squeeze() print("{}-th CV\t train X shape {}\n".format(fold, train_X.shape)) print("{}-th CV\t train Y shape {}\n".format(fold, train_Y.shape)) print("{}-th CV\t test X shape {}\n".format(fold, test_X.shape)) print("{}-th CV\t test Y shape {}\n".format(fold, test_Y.shape)) print("train Y == 0\t{}".format(sum(train_Y == 0))) print("train Y == 1\t{}".format(sum(train_Y == 1))) print("train Y == 2\t{}".format(sum(train_Y == 2))) print("train Y == 3\t{}".format(sum(train_Y == 3))) print("test Y == 0\t{}".format(sum(test_Y == 0))) print("test Y == 1\t{}".format(sum(test_Y == 1))) print("test Y == 2\t{}".format(sum(test_Y == 2))) print("test Y == 3\t{}".format(sum(test_Y == 3))) train_loader = DataLoader(dataset=DEAP_DATASET(train_X, train_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) test_loader = DataLoader(dataset=DEAP_DATASET(test_X, test_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) exp_des = "%d_dependent_%dth_cv_%s_%s_%d_%d_%s" % ( individual, fold,'shuffle' if shuffle else "without_shuffle", 'deap', epochs, batch_size, class_list[class_target]) print("model construction...") net = Hierarchical_ATTN_With_Senti_Map(class_num=class_nums[class_target]) # if fine_tuning we continue train the pretrained model net = net.to(device) save_model_path = '../../saved_models/%s/deap/subject_%d/%s/fold%d' % ( net.__class__.__name__, individual, class_list[class_target], fold) if not os.path.exists(save_model_path): os.makedirs(save_model_path) optimization = RMSprop(net.parameters(), lr=learning_rate, weight_decay=0.01) running_loss_list = [] running_acc_list = [] validate_loss_list = [] validate_acc_list = [] best_acc = -1 print("start training...") scheduler_cosine = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer=optimization, T_max=epochs) scheduler_warmup = GradualWarmupScheduler(optimizer=optimization, multiplier=10, total_epoch=np.ceil(0.1 * epochs), after_scheduler=scheduler_cosine) for epoch in range(epochs): net.train() running_loss = 0.0 correct = 0.0 total = 0.0 for i, (feature, target) in enumerate(train_loader): feature = feature.reshape(-1, 40, 5) optimization.zero_grad() # print("训练集label:{}".format(target)) # print("脏数据统计", torch.sum(torch.isnan(feature), dim=0)) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 5) peripheral = peripheral.reshape(-1, 8, 5) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) #print(eeg.shape, peripheral.shape) out = net(eeg, peripheral) # print("训练集", out.data[:5]) # print("训练集",eeg_attn.shape, eeg_attn.data[:5]) # print("训练集",eye_attn.shape, eye_attn.data[:5]) # print("batch output",out[0]) cross_entropy_loss = criterion(out, target) # eeg_attn_loss = criterion_attn(eeg_attn, target) # eye_attn_loss = criterion_attn(eye_attn, target) # loss = cross_entropy_loss # print("交叉熵损失", cross_entropy_loss.data) # print("eeg注意力损失", eeg_attn_loss.data) # print("eye注意力损失", eeg_attn_loss.data) cross_entropy_loss.backward() clip_grad_norm_(net.parameters(), max_norm=10) # for name, parms in net.named_parameters(): # print('打印梯度') # print('-->name:', name, '-->grad_requirs:', parms.requires_grad, \ # ' -->grad_value:', parms.grad) optimization.step() running_loss += cross_entropy_loss.item() # print("batch loss", loss.item()) _, prediction = torch.max(out.data, dim=-1) # print('训练集', prediction[:5]) total += target.size(0) correct += prediction.eq(target.data).cpu().sum().item() cur_loss = running_loss / total cur_acc = correct / total # print(cur_acc, correct, total) if isinstance(cur_acc, torch.Tensor): cur_acc = cur_acc.item() if isinstance(cur_loss, torch.Tensor): cur_loss = cur_loss.item() print('Training Loss: %.10f | Training Acc: %.3f%% (%d/%d)' % ( cur_loss, 100 * cur_acc, correct, total)) running_loss_list.append(cur_loss) running_acc_list.append(cur_acc) scheduler_warmup.step() if epoch % 5 == 0: net.eval() print("start evaluating...") validate_loss = 0.0 validate_correct = 0.0 validate_total = 0.0 for i, (feature, target) in enumerate(test_loader): feature = feature.reshape(-1, 40, 5) # print("训练集label:{}".format(target)) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 5) peripheral = peripheral.reshape(-1, 8, 5) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) with torch.no_grad(): out = net(eeg, peripheral) # print("c集", out.data[:5]) # print("c集", eeg_attn.data[:5]) # print("c集", eye_attn.data[:5]) loss = criterion(out, target) validate_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) # print('验证集',prediction[:10]) validate_total += target.size(0) validate_correct += prediction.eq(target.data).cpu().sum().item() # print("验证集相等:{}".format(prediction.eq(target.data))) validate_acc = validate_correct / validate_total validate_loss = validate_loss / validate_total if isinstance(validate_acc, torch.Tensor): validate_acc = validate_acc.item() if isinstance(validate_loss, torch.Tensor): validate_loss = validate_loss.item() print('Validate Loss: %.10f | Validate-Acc: %.3f%% (%d/%d)' % ( validate_loss, 100 * validate_acc, validate_correct, validate_total)) validate_acc_list.append(validate_acc) validate_loss_list.append(validate_loss) if validate_acc > best_acc: best_acc = validate_acc print("better model founded in validating sets, start saving new model") model_name = '%s' % (net.__class__.__name__) state = { 'net': net.state_dict(), 'epoch': epoch, 'best_acc': best_acc, 'current_loss': validate_loss } torch.save(state, os.path.join(save_model_path, model_name)) # 开始计算测试集 checkpoint = torch.load(os.path.join(save_model_path, net.__class__.__name__)) net.load_state_dict(checkpoint['net']) net.eval() print("start evaluating...") testing_loss = 0.0 test_correct = 0.0 test_total = 0.0 y_pre = [] y_true = [] for i, (feature, target) in enumerate(test_loader): feature = feature.reshape(-1, 40, 5) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 5) peripheral = peripheral.reshape(-1, 8, 5) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) y_true.extend(target.cpu().numpy().tolist()) with torch.no_grad(): out = net(eeg, peripheral) loss = criterion(out, target) testing_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) y_pre.extend(prediction.cpu().numpy().tolist()) # print(prediction) test_total += target.size(0) test_correct += prediction.eq(target.data).cpu().sum().item() test_acc = test_correct / test_total test_loss = testing_loss / test_total if isinstance(test_acc, torch.Tensor): test_acc = test_acc.item() if isinstance(test_loss, torch.Tensor): test_loss = test_loss.item() print('Test Loss: %.10f | Test Acc: %.3f%% (%d/%d)' % ( test_loss, 100 * test_acc, test_correct, test_total)) plot_acc_loss_curve({'train_loss': running_loss_list, 'train_acc': running_acc_list, 'test_loss': validate_loss_list, 'test_acc': validate_acc_list}, net.__class__.__name__, exp_des) y_true = np.array(y_true) y_pre = np.array(y_pre) test_acc_list.append(test_acc) test_loss_list.append(test_loss) test_precision_list.append(precision_score(y_true, y_pre, average='macro')) test_recall_list.append(recall_score(y_true, y_pre, average='macro')) test_f1_list.append(f1_score(y_true, y_pre, average='macro')) test_accuray_list.append(accuracy_score(y_true, y_pre)) with open('./cv_results/{}_classification_reports.txt'.format(class_list[class_target]), 'a+') as f: f.write("*********** {}-th CV Predict results of individual {}***********\n".format(fold, individual)) f.write( "classification reports:\n{}\nconfusion matrix:\n{}\noytx_accuracy_score:{}\noytx_precision_score:{}\noytx_recall_score:{}\noytx_f1_score:{}\n".format( classification_report(y_true, y_pre), confusion_matrix(y_true, y_pre), accuracy_score(y_true, y_pre), precision_score(y_true, y_pre, average='macro'), recall_score(y_true, y_pre, average='macro'), f1_score(y_true, y_pre, average='macro'))) f.write("******************************************************\n") df = pd.DataFrame.from_dict({ 'test_loss': test_loss_list, 'test_acc': test_acc_list, "test_accuracy":test_accuray_list, "test_precision":test_precision_list, "test_recall":test_recall_list, "test_f1":test_f1_list }) df_mean = df.mean() df_std = df.std() df = df.append(df_mean, ignore_index=True) df = df.append(df_std, ignore_index=True) df.to_csv('./cv_results/deap_individual_%d_%s.csv' % (individual, class_list[class_target]), mode='w', index=False, header=True, encoding='utf-8') def subject_dependent_k_fold_128(individual=1, class_target=4, k_fold=5): # k-fold cv class_list = [ "Valence", "Arousal", "Dominance", "Liking", "Valence-Arousal" ] class_nums = [2, 2, 2, 2, 4] test_loss_list = [] # 记录每一折验证的loss test_acc_list = [] # 记录每一折验证的acc test_precision_list = [] # 记录每一折验证的precision test_recall_list = [] # 记录每一折验证的recall test_f1_list = [] # 记录每一折验证的f1 test_accuray_list = [] # 记录每一折验证的准确率 # prepare data nor_method = 0 label_smooth = 0.1 shuffle = True # reading the data in the whole dataset deap = DEAP128(individual=individual) k_fold_data = deap.get_kfold_X_Y2(k_fold) for fold, (train_X, train_Y, test_X, test_Y) in enumerate(k_fold_data): print("start {} th cross-validation".format(fold)) train_X, train_Y, test_X, test_Y = deap_normalization(train_X, train_Y, test_X, test_Y, nor_method=0, merge=1, column=0) # Hyper-parameters epochs = 150 batch_size = 512 learning_rate = 1e-4 criterion = LabelSmoothSoftmax(lb_smooth=label_smooth) # criterion_attn = CrossEntropyLoss() print("starting subject-dependent %d-th CV training experiments on individual %d class %s" % (fold, individual, class_list[ class_target])) print("train_X shape", train_X.shape) print("train_Y shape", train_Y.shape) print("test_X shape", test_X.shape) print("test_Y shape", test_Y.shape) train_Y, test_Y = train_Y[:, class_target].squeeze(), test_Y[:, class_target].squeeze() print("{}-th CV\t train X shape {}\n".format(fold, train_X.shape)) print("{}-th CV\t train Y shape {}\n".format(fold, train_Y.shape)) print("{}-th CV\t test X shape {}\n".format(fold, test_X.shape)) print("{}-th CV\t test Y shape {}\n".format(fold, test_Y.shape)) print("train Y == 0\t{}".format(sum(train_Y == 0))) print("train Y == 1\t{}".format(sum(train_Y == 1))) print("train Y == 2\t{}".format(sum(train_Y == 2))) print("train Y == 3\t{}".format(sum(train_Y == 3))) print("test Y == 0\t{}".format(sum(test_Y == 0))) print("test Y == 1\t{}".format(sum(test_Y == 1))) print("test Y == 2\t{}".format(sum(test_Y == 2))) print("test Y == 3\t{}".format(sum(test_Y == 3))) train_loader = DataLoader(dataset=DEAP_DATASET(train_X, train_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) test_loader = DataLoader(dataset=DEAP_DATASET(test_X, test_Y), batch_size=batch_size, shuffle=shuffle, num_workers=0) exp_des = "%d_dependent_%dth_cv_%s_%s_%d_%d_%s" % ( individual, fold, 'shuffle' if shuffle else "without_shuffle", 'deap', epochs, batch_size, class_list[class_target]) print("model construction...") net = Hierarchical_ATTN_With_Senti_Map(class_num=class_nums[class_target]) # if fine_tuning we continue train the pretrained model net = net.to(device) save_model_path = '../../saved_models/%s/deap/subject_%d/%s/fold%d' % ( net.__class__.__name__, individual, class_list[class_target], fold) if not os.path.exists(save_model_path): os.makedirs(save_model_path) optimization = RMSprop(net.parameters(), lr=learning_rate, weight_decay=0.01) running_loss_list = [] running_acc_list = [] validate_loss_list = [] validate_acc_list = [] best_acc = -1 print("start training...") scheduler_cosine = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer=optimization, T_max=epochs) scheduler_warmup = GradualWarmupScheduler(optimizer=optimization, multiplier=10, total_epoch=np.ceil(0.1 * epochs), after_scheduler=scheduler_cosine) for epoch in range(epochs): net.train() running_loss = 0.0 correct = 0.0 total = 0.0 for i, (feature, target) in enumerate(train_loader): feature = feature.reshape(-1, 40, 128) optimization.zero_grad() # print("训练集label:{}".format(target)) # print("脏数据统计", torch.sum(torch.isnan(feature), dim=0)) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 128) peripheral = peripheral.reshape(-1, 8, 128) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) # print(eeg.shape, peripheral.shape) out = net(eeg, peripheral) # print("训练集", out.data[:5]) # print("训练集",eeg_attn.shape, eeg_attn.data[:5]) # print("训练集",eye_attn.shape, eye_attn.data[:5]) # print("batch output",out[0]) cross_entropy_loss = criterion(out, target) # eeg_attn_loss = criterion_attn(eeg_attn, target) # eye_attn_loss = criterion_attn(eye_attn, target) # loss = cross_entropy_loss # print("交叉熵损失", cross_entropy_loss.data) # print("eeg注意力损失", eeg_attn_loss.data) # print("eye注意力损失", eeg_attn_loss.data) cross_entropy_loss.backward() clip_grad_norm_(net.parameters(), max_norm=10) # for name, parms in net.named_parameters(): # print('打印梯度') # print('-->name:', name, '-->grad_requirs:', parms.requires_grad, \ # ' -->grad_value:', parms.grad) optimization.step() running_loss += cross_entropy_loss.item() # print("batch loss", loss.item()) _, prediction = torch.max(out.data, dim=-1) # print('训练集', prediction[:5]) total += target.size(0) correct += prediction.eq(target.data).cpu().sum().item() cur_loss = running_loss / total cur_acc = correct / total # print(cur_acc, correct, total) if isinstance(cur_acc, torch.Tensor): cur_acc = cur_acc.item() if isinstance(cur_loss, torch.Tensor): cur_loss = cur_loss.item() print('Training Loss: %.10f | Training Acc: %.3f%% (%d/%d)' % ( cur_loss, 100 * cur_acc, correct, total)) running_loss_list.append(cur_loss) running_acc_list.append(cur_acc) scheduler_warmup.step() if epoch % 5 == 0: net.eval() print("start evaluating...") validate_loss = 0.0 validate_correct = 0.0 validate_total = 0.0 for i, (feature, target) in enumerate(test_loader): feature = feature.reshape(-1, 40, 128) # print("训练集label:{}".format(target)) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 128) peripheral = peripheral.reshape(-1, 8, 128) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) with torch.no_grad(): out = net(eeg, peripheral) # print("c集", out.data[:5]) # print("c集", eeg_attn.data[:5]) # print("c集", eye_attn.data[:5]) loss = criterion(out, target) validate_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) # print('验证集',prediction[:10]) validate_total += target.size(0) validate_correct += prediction.eq(target.data).cpu().sum().item() # print("验证集相等:{}".format(prediction.eq(target.data))) print("classification reports {}\n".format(classification_report(target.cpu().numpy(), prediction.cpu().numpy()))) print("confusion matrix {}".format( confusion_matrix(target.cpu().numpy(), prediction.cpu().numpy()))) validate_acc = validate_correct / validate_total validate_loss = validate_loss / validate_total if isinstance(validate_acc, torch.Tensor): validate_acc = validate_acc.item() if isinstance(validate_loss, torch.Tensor): validate_loss = validate_loss.item() print('Validate Loss: %.10f | Validate-Acc: %.3f%% (%d/%d)' % ( validate_loss, 100 * validate_acc, validate_correct, validate_total)) validate_acc_list.append(validate_acc) validate_loss_list.append(validate_loss) if validate_acc > best_acc: best_acc = validate_acc print("better model founded in validating sets, start saving new model") model_name = '%s' % (net.__class__.__name__) state = { 'net': net.state_dict(), 'epoch': epoch, 'best_acc': best_acc, 'current_loss': validate_loss } torch.save(state, os.path.join(save_model_path, model_name)) # 开始计算测试集 checkpoint = torch.load(os.path.join(save_model_path, net.__class__.__name__)) net.load_state_dict(checkpoint['net']) net.eval() print("start evaluating...") testing_loss = 0.0 test_correct = 0.0 test_total = 0.0 y_pre = [] y_true = [] for i, (feature, target) in enumerate(test_loader): feature = feature.reshape(-1, 40, 128) eeg = feature[:, :32, :] peripheral = feature[:, 32:, :] eeg = eeg.reshape(-1, 32, 128) peripheral = peripheral.reshape(-1, 8, 128) eeg = eeg.to(device) peripheral = peripheral.to(device) target = target.type(torch.LongTensor).to(device) y_true.extend(target.cpu().numpy().tolist()) with torch.no_grad(): out = net(eeg, peripheral) loss = criterion(out, target) testing_loss += loss.item() _, prediction = torch.max(out.data, dim=-1) y_pre.extend(prediction.cpu().numpy().tolist()) # print(prediction) test_total += target.size(0) test_correct += prediction.eq(target.data).cpu().sum().item() test_acc = test_correct / test_total test_loss = testing_loss / test_total if isinstance(test_acc, torch.Tensor): test_acc = test_acc.item() if isinstance(test_loss, torch.Tensor): test_loss = test_loss.item() print('Test Loss: %.10f | Test Acc: %.3f%% (%d/%d)' % ( test_loss, 100 * test_acc, test_correct, test_total)) plot_acc_loss_curve({'train_loss': running_loss_list, 'train_acc': running_acc_list, 'test_loss': validate_loss_list, 'test_acc': validate_acc_list}, net.__class__.__name__, exp_des) y_true = np.array(y_true) y_pre = np.array(y_pre) test_acc_list.append(test_acc) test_loss_list.append(test_loss) test_precision_list.append(precision_score(y_true, y_pre, average='macro')) test_recall_list.append(recall_score(y_true, y_pre, average='macro')) test_f1_list.append(f1_score(y_true, y_pre, average='macro')) test_accuray_list.append(accuracy_score(y_true, y_pre)) with open('./cv_results/{}_classification_reports.txt'.format(class_list[class_target]), 'a+') as f: f.write("*********** {}-th CV Predict results of individual {}***********\n".format(fold, individual)) f.write( "classification reports:\n{}\nconfusion matrix:\n{}\noytx_accuracy_score:{}\noytx_precision_score:{}\noytx_recall_score:{}\noytx_f1_score:{}\n".format( classification_report(y_true, y_pre), confusion_matrix(y_true, y_pre), accuracy_score(y_true, y_pre), precision_score(y_true, y_pre, average='macro'), recall_score(y_true, y_pre, average='macro'), f1_score(y_true, y_pre, average='macro'))) f.write("******************************************************\n") df = pd.DataFrame.from_dict({ 'test_loss': test_loss_list, 'test_acc': test_acc_list, "test_accuracy": test_accuray_list, "test_precision": test_precision_list, "test_recall": test_recall_list, "test_f1": test_f1_list }) df_mean = df.mean() df_std = df.std() df = df.append(df_mean, ignore_index=True) df = df.append(df_std, ignore_index=True) df.to_csv('./cv_results/deap_individual_%d_%s.csv' % (individual, class_list[class_target]), mode='w', index=False, header=True, encoding='utf-8') if __name__ == '__main__': # for c in [4, 0, 1, 2, 3]: for i in range(1, 33): subject_dependent_k_fold(i, class_target=0, k_fold=10) print("experiments done...") # subject_dependent(11, class_target=4) # # subject-independent # _x_list = [] # _y_list = [] # for i in range(1, 33): # deap = DEAP(individual=i, normalization=1) # X, Y = deap.get_X_Y() # X = X.transpose((0,2,1,3)) # X = X.reshape(-1, 128) # Y = Y.reshape(-1, 5) # _x_list.append(X) # _y_list.append(Y) # print(X.shape) # for c in [4, 0, 1, 2, 3]: # for j in range(1,33): # subject_independent(_x_list, _y_list, individual=j, class_target=c) # # # main(1, 'subject_dependent') # print("experiment done!")
47.799763
401
0.588566
10,276
80,686
4.348774
0.053717
0.021259
0.019424
0.00584
0.836668
0.814693
0.804176
0.795202
0.779807
0.772847
0
0.02164
0.285799
80,686
1,688
402
47.799763
0.753844
0.124235
0
0.719715
0
0
0.069694
0.016926
0
0
0
0
0.003167
1
0.022961
false
0.000792
0.014252
0
0.056215
0.068884
0
0
0
null
0
0
0
1
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
7
7060a76727aea70cf5fa920732e34b66bd1121e6
25,787
py
Python
levenshtein_test.py
vcbin/SparseDamerauLevenshteinAutomaton
09ad573c1201a9c03dfbc707323acfa2f3999a29
[ "MIT" ]
16
2016-08-04T10:04:26.000Z
2021-05-14T05:15:32.000Z
levenshtein_test.py
vcbin/SparseDamerauLevenshteinAutomaton
09ad573c1201a9c03dfbc707323acfa2f3999a29
[ "MIT" ]
null
null
null
levenshtein_test.py
vcbin/SparseDamerauLevenshteinAutomaton
09ad573c1201a9c03dfbc707323acfa2f3999a29
[ "MIT" ]
6
2016-12-21T08:26:26.000Z
2020-08-20T12:16:55.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # ref # http://julesjacobs.github.io/2015/06/17/disqus-levenshtein-simple-and-fast.html class LevenshteinAutomaton(object): def __init__(self, string, n, weight=1.0): self.string = string self.max_edits = n self.weight = weight def get_string(self): return self.string def get_n(self): return self.n def get_weight(self): return self.weight def start(self): return range(len(self.string) + 1) def step(self, state, c): new_state = [state[0] + 1] for i in range(len(state) - 1): cost = 0 if self.string[i] == c else 1 new_state.append( min(new_state[i] + 1, state[i] + cost, state[i + 1] + 1)) return [min(x, self.max_edits + 1) for x in new_state] def is_match(self, state): return state[-1] <= self.max_edits def can_match(self, state): return min(state) <= self.max_edits def match_error(self, state): return state[-1] def transitions(self, state): return set(c for (i, c) in enumerate(self.string) if state[i] <= self.max_edits) class SparseLevenshteinAutomaton(object): def __init__(self, string, n, weight=1.0): self.string = string self.max_edits = n self.weight = weight def get_string(self): return self.string def get_n(self): return self.n def get_weight(self): return self.weight def start(self): return (range(self.max_edits + 1), range(self.max_edits + 1)) # return (range(min(self.max_edits, len(self.string)) + 1), # range(min(self.max_edits, len(self.string) + 1))) def step(self, (indices, values), c): if indices and indices[0] == 0 and values[0] < self.max_edits: new_indices = [0] new_values = [values[0] + 1] else: new_indices = [] new_values = [] for j, i in enumerate(indices): if i == len(self.string): break cost = 0 if self.string[i] == c else 1 val = values[j] + cost if new_indices and new_indices[-1] == i: val = min(val, new_values[-1] + 1) if j + 1 < len(indices) and indices[j + 1] == i + 1: val = min(val, values[j + 1] + 1) if val <= self.max_edits: new_indices.append(i + 1) new_values.append(val) return (new_indices, new_values) def is_match(self, (indices, values)): return bool(indices) and indices[-1] == len(self.string) def can_match(self, (indices, values)): return bool(indices) def match_error(self, state): return state[1][-1] # state is tuple of (key_list, value_list) def transitions(self, (indices, values)): return set(self.string[i] for i in indices if i < len(self.string)) def explore(lev, state, states, counter, matching, transitions): # lists can't be hashed in Python because they are mutable, so convert to # a tuple key = (tuple(state[0]), tuple(state[1])) if key in states: return states[key] i = counter[0] counter[0] += 1 states[key] = i if lev.is_match(state): matching.append(i) for c in lev.transitions(state) | set(['*']): newstate = lev.step(state, c) j = explore(lev, newstate, states, counter, matching, transitions) transitions.append((i, j, c)) return i def state_equal(dense_state, sparse_state): # print type(dense_s), type(sparse_state) indices, values = sparse_state # print type(indices), type(values) assert(len(indices) == len(values)) # print indices, values sparse_len = len(indices) for i in range(sparse_len): # print "i %d, indices[i] %d, len(dense_s) %d, len(values) %d" \ # % (i, indices[i], len(dense_s), len(values)) assert(indices[i] < len(dense_state)) if values[i] != dense_state[indices[i]]: # print "len(dense_state)= %d" % len(dense_state) print print "%s\t(%s, %s)" % (dense_state, indices, values) return False return True class DamerauLevenshteinAutomaton(LevenshteinAutomaton): ''' # ref https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance''' def __init__(self, word, n, state=[], c=u""): super(DamerauLevenshteinAutomaton, self).__init__(word, n) self._prev_state = state self._prev_c = c # def step(self, state, c, prev_state, prev_c): # '''simple implementation of Optimal string alignment distance algorithm of wikipedia # the optimal string alignment algorithm computes the number of edit operations needed to make the strings equal under the condition that NO SUBSTRING is EDITED MORE THAN ONCE # Note that for the optimal string alignment distance, # the triangle inequality does not hold: OSA(CA,AC) + OSA(AC,ABC) < OSA(CA,ABC), and so it is not a true metric.''' # assert(state) # if prev_state: # assert(len(prev_state) == len(state)) # new_state = [state[0] + 1] # for i in range(len(state) - 1): # cost = 0 if self.string[i] == c else 1 # cur_min = min(new_state[i] + 1, state[i] + cost, state[i + 1] + 1) # # print # # print ("prev_state= %s\t, i= %d, c='%s', prev_c='%s', self.string='%s'" % (prev_state, i, c, prev_c, self.string)) # if prev_state and len(prev_c) and i > 0 and \ # self.string[i - 1] == c and self.string[i] == prev_c: # # cost == 0 when c == prev_c == self.string[i] == self.string[i - 1] # # assert (prev_state) # # print # # print ("prev_state= %s\t, i= %d, c='%s', prev_c='%s', self.string='%s'" % (prev_state, i, c, prev_c, self.string)) # cur_min = min(cur_min, prev_state[i - 1] + cost) # new_state.append(cur_min) # assert(len(new_state) == len(self.string) + 1) # res_state = [min(x, self.max_edits + 1) for x in new_state] # # print "len(prev_state): %d\t%s\t%s" % (len(prev_state), prev_state, prev_c) # # print "len(res_state)= %d\t%s\t%s" % (len(res_state), res_state, c) # # print # return res_state def step(self, state, c): '''simple implementation of Optimal string alignment distance algorithm of wikipedia the optimal string alignment algorithm computes the number of edit operations needed to make the strings equal under the condition that NO SUBSTRING is EDITED MORE THAN ONCE Note that for the optimal string alignment distance, the triangle inequality does not hold: OSA(CA,AC) + OSA(AC,ABC) < OSA(CA,ABC), and so it is not a true metric.''' assert(state) prev_state = self._prev_state if prev_state: assert(len(prev_state) == len(state)) prev_c = self._prev_c new_state = [state[0] + 1] for i in range(len(state) - 1): cost = 0 if self.string[i] == c else 1 cur_min = min(new_state[i] + 1, state[i] + cost, state[i + 1] + 1) # print # print ("prev_state= %s\t, i= %d, c='%s', prev_c='%s', self.string='%s'" % (prev_state, i, c, prev_c, self.string)) if prev_state and len(prev_c) and i > 0 and \ self.string[i - 1] == c and self.string[i] == prev_c: # cost == 0 when c == prev_c == self.string[i] == self.string[i - 1] # assert (prev_state) # print # print ("prev_state= %s\t, i= %d, c='%s', prev_c='%s', self.string='%s'" % (prev_state, i, c, prev_c, self.string)) cur_min = min(cur_min, prev_state[i - 1] + cost) new_state.append(cur_min) assert(len(new_state) == len(self.string) + 1) res_state = [min(x, self.max_edits + 1) for x in new_state] self._prev_state = state self._prev_c = c # print "len(prev_state): %d\t%s\t%s" % (len(prev_state), prev_state, prev_c) # print "len(res_state)= %d\t%s\t%s" % (len(res_state), res_state, c) # print return res_state def clear_state(self): """clear internal previous state and previous query character variables :returns: None """ self._prev_state = [] self._prev_c = u"" class SparseDamerauLevenshteinAutomaton(SparseLevenshteinAutomaton): """SparseDamerauLevenshteinAutomaton implemented by optimal string alignment algorithm Note that this class is NOT thread safe""" def __init__(self, word, n, state=([], []), c=u""): super(SparseDamerauLevenshteinAutomaton, self).__init__(word, n) self._prev_state = state self._prev_c = c # def step(self, (indices, values), c, (prev_indices, prev_values), prev_c): # if indices and indices[0] == 0 and values[0] < self.max_edits: # new_indices = [0] # new_values = [values[0] + 1] # else: # new_indices = [] # new_values = [] # for j, i in enumerate(indices): # if i == len(self.string): # break # cost = 0 if self.string[i] == c else 1 # val = values[j] + cost # if new_indices and new_indices[-1] == i: # val = min(val, new_values[-1] + 1) # if j + 1 < len(indices) and indices[j + 1] == i + 1: # val = min(val, values[j + 1] + 1) # # print # # print ("prev_state=(%s, %s)\ti= %d, j= %d\t\t, prev_c='%s', c='%s'\tself.string='%s'" % (prev_indices, prev_values, i, j, prev_c, c, self.string)) # if prev_indices and \ # i > 0 and i < len(self.string) and \ # self.string[i - 1] == c and self.string[i] == prev_c: # idx = None # for k, l in enumerate(prev_indices): # if l == i - 1: # idx = k # break # assert(idx is not None) # val = min(val, prev_values[idx] + cost) # # print # # print ('''prev_state=(%s, %s)\ti= %d, j= %d\t # # idx = %d, prev_values[idx]= %d, cost= %d, val= %d\tprev_c=\'%s\', c=\'%s\'\tself.string=\'%s\'''' # # % (prev_indices, prev_values, i, j, idx, prev_values[idx], cost, val, # # prev_c, c, self.string)) # if val <= self.max_edits: # new_indices.append(i + 1) # new_values.append(val) # return (new_indices, new_values) def step(self, (indices, values), c): if indices and indices[0] == 0 and values[0] < self.max_edits: new_indices = [0] new_values = [values[0] + 1] else: new_indices = [] new_values = [] prev_state = self._prev_state prev_indices, prev_values = prev_state prev_c = self._prev_c for j, i in enumerate(indices): if i == len(self.string): break cost = 0 if self.string[i] == c else 1 val = values[j] + cost if new_indices and new_indices[-1] == i: val = min(val, new_values[-1] + 1) if j + 1 < len(indices) and indices[j + 1] == i + 1: val = min(val, values[j + 1] + 1) # print # print ("prev_state=(%s, %s)\tstate=(%s, %s)\ti= %d, j= %d\t\t, prev_c='%s', c='%s'\tself.string='%s'" % (prev_indices, prev_values, indices, values, i, j, prev_c, c, self.string)) if prev_indices and \ i > 0 and i < len(self.string) and \ self.string[i - 1] == c and self.string[i] == prev_c: idx = None # look around first if j < len(prev_indices) and j >= 0 and prev_indices[j] == i - 1: idx = j elif j - 1 < len(prev_indices) and j - 1 >= 0 and prev_indices[j - 1] == i - 1: idx = j - 1 elif j + 1 < len(prev_indices) and j + 1 >= 0 and prev_indices[j + 1] == i - 1: idx = j + 1 else: for k, l in enumerate(prev_indices): if l == i - 1: idx = k break assert(idx is not None) val = min(val, prev_values[idx] + cost) # print # print ('''prev_state=(%s, %s)\ti= %d, j= %d\t # idx = %d, prev_values[idx]= %d, cost= %d, val= %d\tprev_c=\'%s\', c=\'%s\'\tself.string=\'%s\'''' # % (prev_indices, prev_values, i, j, idx, prev_values[idx], cost, val, # prev_c, c, self.string)) if val <= self.max_edits: new_indices.append(i + 1) new_values.append(val) self._prev_state = (indices, values) self._prev_c = c return (new_indices, new_values) def clear_state(self): """clear internal previous state and previous query character variables :returns: None """ self._prev_state = ([], []) self._prev_c = u"" def exploreSpaDamLev(lev, state, states, counter, matching, transitions): # lists can't be hashed in Python because they are mutable, so convert to # a tuple assert(isinstance(lev, SparseDamerauLevenshteinAutomaton)) key = (tuple(state[0]), tuple(state[1])) if key in states: return states[key] i = counter[0] counter[0] += 1 states[key] = i if lev.is_match(state): matching.append(i) for c in lev.transitions(state) | set(['*']): # lev.clear_state() # this line made DamerauLevenshtein identical to # # Levenshtein newstate = lev.step(state, c) j = exploreSpaDamLev(lev, newstate, states, counter, matching, transitions) transitions.append((i, j, c)) return i class LevMatch(object): def __init__(self, key_list, n, weight_list=[]): for i, title in enumerate(key_list): if not isinstance(title, unicode): # only work for python 2.x assert(isinstance(title, basestring)) # convert to unicode object, not working key_list[i] = title.decode('utf-8') self._key_list = key_list self._n = n self._weight_list = weight_list if weight_list: self._word_weight_d = dict(zip(key_list, weight_list)) def print_key_value(self): if (self._weight_list): from collections import OrderedDict word_weight_ord_d = OrderedDict(sorted(self._word_weight_d.items(), key=lambda t: t[ 1], reverse=True)) # sorted by weight for display for k, v in word_weight_ord_d.items(): print "%s -> %s" % (k, repr(v).decode("unicode-escape")) else: for k in self._key_list: print "%s" % k def items(self): if any(self._word_weight_d): return self._word_weight_d.items() def keys(self, prefix=u"", top_n=10, debug_info=False): '''time complexity: $M * N * n$ where $M$ is the total index count and $N$ is the query string length, and $n$ is the maximum DamerauLevenshtein distance''' if (not len(prefix)): return self._key_list if not isinstance(prefix, unicode): # only work for python 2.x assert(isinstance(prefix, basestring)) # convert to unicode object, not working prefix = prefix.decode('utf-8') # print "prefix=%s , len = %d" % ( prefix, len(prefix)) words = self._key_list words_lev_l = [SparseLevenshteinAutomaton( word, self._n) for word in words] exact_match_res_l = [] fuzzy_match_res_l = [] from timeit import default_timer as timer start_t = timer() for word in words: if len(word) and len(prefix) and ( ( len(prefix) == 1 and prefix[0] != word[0] ) or ( len(word) > 1 and prefix[0] != word[0] and prefix[1] != word[1] ) ): continue # it is unlikely that the first two input characters are misspelled or transposed if word == prefix: exact_match_res_l.append(word) continue common_len = min(len(prefix), len(word)) # match_prefix = [] # match_word = [] for i in range(common_len): if prefix[i] != word[i]: # if debug_info: # print # print "%d, prefix[i]: %s, word[i]: %s" % (i, prefix[i], word[i]) break # only match the different part to speed up the matching process match_prefix = prefix[i:] match_word = word[i:] # if debug_info: # print # print "i= %d, prefix '%s', match_prefix '%s', word '%s', match_word: '%s'" % (i,prefix,match_prefix,word, match_word) lev = SparseLevenshteinAutomaton( match_word, self._n) cur_lev_state = lev.start() for i, cur_c in enumerate(match_prefix): cur_lev_state = lev.step(cur_lev_state, cur_c) # new_lev_state = words_lev_d[word].step( # cur_lev_state, cur_c, prev_lev_state, prev_c) # prev_lev_state = cur_lev_state # cur_lev_state = new_lev_state # prev_c = cur_c if not lev.can_match(cur_lev_state): break # print " ",cur_lev_state if lev.is_match(cur_lev_state): # if words_lev_d[word].can_match(cur_lev_state): # NOT correct cause this potentially match a COMPLETELY different/irrelevent word # print cur_lev_state err_num = lev.match_error(cur_lev_state) # print "%s\t%s" % (type(err_num),err_num) # print "%s, match error char count: %d" % (type(err_num), # err_num) if (len(word) == len(prefix) and not err_num): exact_match_res_l.append(word) else: if debug_info: print "\tprefix: %s, word: %s, cur_i: %d, match error count %d" % ("".join(prefix), word, i, err_num) fuzzy_match_res_l.append(word) if (exact_match_res_l or fuzzy_match_res_l) and self._weight_list: import heapq def get_weight(word_weight_d, key): return word_weight_d[key] from functools import partial bound_get_weight = partial(get_weight, self._word_weight_d) exact_match_res_l = list(heapq.nlargest( top_n, exact_match_res_l, key=bound_get_weight)) fuzzy_match_res_l = list(heapq.nlargest( top_n, fuzzy_match_res_l, key=bound_get_weight)) # exact_match_res_lst = list(heapq.nlargest( # top_n, exact_match_res_l, key=lambda key: word_weight_d[key])) # fuzzy_match_res_lst = list(heapq.nlargest( # top_n, fuzzy_match_res_l, key=lambda key: # word_weight_d[key])) if debug_info: sep_str_l = [u"----"] else: sep_str_l = [] res_l = exact_match_res_l + sep_str_l + fuzzy_match_res_l elapsed_t = timer() - start_t # import sys # res_out = repr([x.encode(sys.stdout.encoding) for x in exact_match_res_l + fuzzy_match_res_l]).decode('string-escape') # res_out = repr(res_l).decode('unicode-escape') if debug_info: print "\t\tlev distance %d, time: %f" % (self._n, elapsed_t) if res_l: # print "\t\tmatch result:\t%s" % res_out print "\t\t'%s' -> \t%s" % \ ("".join((prefix)), "\t".join( ['"' + elem + '"' for elem in res_l])) print return res_l class DamLevMatch(LevMatch): def keys(self, prefix=u"", top_n=10, debug_info=False): '''time complexity: $M * N * n$ where $M$ is the total index count and $N$ is the query string length, and $n$ is the maximum DamerauLevenshtein distance''' if (not len(prefix)): return self._key_list if not isinstance(prefix, unicode): # only work for python 2.x assert(isinstance(prefix, basestring)) # convert to unicode object, not working prefix = prefix.decode('utf-8') # print "prefix=%s , len = %d" % ( prefix, len(prefix)) words = self._key_list # words_lev_l = [SparseDamerauLevenshteinAutomaton( # word, self._n) for word in words] # words_lev_d = dict(zip(words, words_lev_l)) exact_match_res_l = [] fuzzy_match_res_l = [] from timeit import default_timer as timer start_t = timer() for word in words: if len(word) and len(prefix) and ( ( len(prefix) == 1 and prefix[0] != word[0] ) or ( len(word) > 1 and prefix[0] != word[0] and prefix[1] != word[1] and (prefix[0] != word[1] or prefix[1] != word[0]) ) ): continue # it is unlikely that the first two input characters are misspelled or transposed if word == prefix: exact_match_res_l.append(word) continue common_len = min(len(prefix), len(word)) # match_prefix = [] # match_word = [] for i in range(common_len): if prefix[i] != word[i]: # if debug_info: # print # print "%d, prefix[i]: %s, word[i]: %s" % (i, prefix[i], word[i]) break # only match the different part to speed up the matching process match_prefix = prefix[i:] match_word = word[i:] # if debug_info: # print # print "i= %d, prefix '%s', match_prefix '%s', word '%s', match_word: '%s'" % (i,prefix,match_prefix,word, match_word) lev = SparseDamerauLevenshteinAutomaton( match_word, self._n) cur_lev_state = lev.start() # prev_lev_state = ([], []) # prev_c = u"" lev.clear_state() for i, cur_c in enumerate(match_prefix): cur_lev_state = lev.step(cur_lev_state, cur_c) # new_lev_state = words_lev_d[word].step( # cur_lev_state, cur_c, prev_lev_state, prev_c) # prev_lev_state = cur_lev_state # cur_lev_state = new_lev_state # prev_c = cur_c if not lev.can_match(cur_lev_state): break # print " ",cur_lev_state if lev.is_match(cur_lev_state): # if words_lev_d[word].can_match(cur_lev_state): # NOT correct cause this potentially match a COMPLETELY different/irrelevent word # print cur_lev_state err_num = lev.match_error(cur_lev_state) # print "%s\t%s" % (type(err_num),err_num) # print "%s, match error char count: %d" % (type(err_num), # err_num) if (len(word) == len(prefix) and not err_num): exact_match_res_l.append(word) else: if debug_info: print "\tprefix: %s, word: %s, cur_i: %d, match error count %d" % ("".join(prefix), word, i, err_num) fuzzy_match_res_l.append(word) if (exact_match_res_l or fuzzy_match_res_l) and self._weight_list: import heapq def get_weight(word_weight_d, key): return word_weight_d[key] from functools import partial bound_get_weight = partial(get_weight, self._word_weight_d) exact_match_res_l = list(heapq.nlargest( top_n, exact_match_res_l, key=bound_get_weight)) fuzzy_match_res_l = list(heapq.nlargest( top_n, fuzzy_match_res_l, key=bound_get_weight)) # exact_match_res_lst = list(heapq.nlargest( # top_n, exact_match_res_l, key=lambda key: word_weight_d[key])) # fuzzy_match_res_lst = list(heapq.nlargest( # top_n, fuzzy_match_res_l, key=lambda key: # word_weight_d[key])) if debug_info: sep_str_l = [u"----"] else: sep_str_l = [] res_l = exact_match_res_l + sep_str_l + fuzzy_match_res_l elapsed_t = timer() - start_t # import sys # res_out = repr([x.encode(sys.stdout.encoding) for x in exact_match_res_l + fuzzy_match_res_l]).decode('string-escape') # res_out = repr(res_l).decode('unicode-escape') if debug_info: print "\t\tlev distance %d, time: %f" % (self._n, elapsed_t) # print "\t\tmatch result:\t%s" % res_out if res_l: print "\t\t'%s' -> \t%s" % \ ("".join((prefix)), "\t".join( ['"' + elem + '"' for elem in res_l])) print return res_l
41.998371
193
0.538876
3,447
25,787
3.834059
0.078909
0.037833
0.023154
0.019068
0.839815
0.817797
0.806295
0.791843
0.780645
0.76309
0
0.010505
0.339241
25,787
613
194
42.066884
0.765127
0.291077
0
0.688202
0
0.005618
0.015933
0
0
0
0
0
0.02809
0
null
null
0
0.019663
null
null
0.036517
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
1
0
0
0
0
0
0
0
0
7
562139e081d5c1a6ad10b91167dd92fce69d9d14
26,763
py
Python
design/migrations/0001_initial.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
1
2019-07-20T09:51:53.000Z
2019-07-20T09:51:53.000Z
design/migrations/0001_initial.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
11
2019-07-26T02:23:52.000Z
2022-03-11T23:41:09.000Z
design/migrations/0001_initial.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
1
2019-07-26T02:16:49.000Z
2019-07-26T02:16:49.000Z
# Generated by Django 2.1.7 on 2019-08-02 08:15 import design.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.db.models.manager import django.utils.timezone import imagekit.models.fields import model_utils.fields import mptt.fields import uuid class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('title', models.CharField(max_length=128, verbose_name='title')), ('lft', models.PositiveIntegerField(db_index=True, editable=False)), ('rght', models.PositiveIntegerField(db_index=True, editable=False)), ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)), ('level', models.PositiveIntegerField(db_index=True, editable=False)), ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='design.Category', verbose_name='parent')), ], options={ 'verbose_name': '카테고리 품목', 'verbose_name_plural': '카테고리 품목', }, ), migrations.CreateModel( name='DeliveryOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('title', models.CharField(blank=True, max_length=100, null=True, verbose_name='배송 방법')), ('price', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='배송 비용')), ('tax', models.BooleanField(default=False, verbose_name='부가세 포함여부')), ], options={ 'verbose_name': '상품옵션 _배송비', 'verbose_name_plural': '상품옵션 _배송비', }, ), migrations.CreateModel( name='EtcOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('title', models.CharField(blank=True, max_length=255, null=True, verbose_name='기타 옵션')), ('option', models.CharField(blank=True, max_length=255, null=True, verbose_name='기타 옵션 상세')), ('memo', models.CharField(blank=True, max_length=255, null=True, verbose_name='기타 옵션 메모')), ('price', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='기타 옵션 가격')), ], options={ 'verbose_name': '상품옵션 _기타옵션', 'verbose_name_plural': '상품옵션 _기타옵션', }, ), migrations.CreateModel( name='HooOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('title', models.CharField(blank=True, max_length=100, null=True, verbose_name='후가공명')), ('option', models.CharField(blank=True, max_length=100, null=True, verbose_name='상위 품목')), ('price', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='후가공 가격')), ], options={ 'verbose_name': '상품옵션 _후가공', 'verbose_name_plural': '상품옵션 _후가공', }, ), migrations.CreateModel( name='Option', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('title', models.CharField(max_length=128, verbose_name='title')), ('slug', models.SlugField(allow_unicode=True, help_text='A short label containing only letters, numbers, underscores or hyphens for URL', max_length=255, unique=True, verbose_name='slug')), ('lft', models.PositiveIntegerField(db_index=True, editable=False)), ('rght', models.PositiveIntegerField(db_index=True, editable=False)), ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)), ('level', models.PositiveIntegerField(db_index=True, editable=False)), ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='options', to='design.Category', verbose_name='category')), ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='design.Option', verbose_name='parent')), ], options={ 'verbose_name': '상품옵션 기타', 'verbose_name_plural': '상품옵션 기타', }, managers=[ ('_tree_manager', django.db.models.manager.Manager()), ], ), migrations.CreateModel( name='OrderImg', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('order_img_num', models.IntegerField(blank=True, null=True, verbose_name='이미지 넘버링')), ('plush_date', models.DateTimeField(auto_now_add=True, verbose_name='등록일')), ('name', models.CharField(blank=True, max_length=255, verbose_name='제목')), ('keyword', models.CharField(blank=True, max_length=255, verbose_name='키워드')), ('state_at', models.IntegerField(blank=True, choices=[(0, '대기'), (1, '수정완료'), (2, '확정'), (3, '보류'), (4, '취소'), (5, '무효처리')], default=0, null=True, verbose_name='시안 상태')), ('state', models.BooleanField(default=True, verbose_name='노출 상태')), ('images', imagekit.models.fields.ProcessedImageField(blank=True, upload_to=design.models.OrderImg.upload_to_order, verbose_name='sample_img')), ('link', models.CharField(blank=True, max_length=255, verbose_name='링크 url')), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='design.Category', verbose_name='카테고리')), ], options={ 'verbose_name': '주문 3_시안', 'verbose_name_plural': '주문 3_시안', }, ), migrations.CreateModel( name='OrderInfo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('today_num', models.IntegerField(default=1, verbose_name='today-넘버링')), ('joo_date', models.DateField(blank=True, null=True, verbose_name='주문일')), ('order_date', models.DateField(blank=True, null=True, verbose_name='발주일')), ('company', models.CharField(blank=True, max_length=255, null=True, verbose_name='업체명')), ('company_keyword', models.CharField(blank=True, max_length=255, null=True, verbose_name='업체 키워드')), ('address', models.CharField(blank=True, max_length=255, null=True, verbose_name='주소')), ('tell', models.CharField(blank=True, max_length=255, null=True, verbose_name='연락처')), ('state', models.IntegerField(blank=True, choices=[(0, '견적'), (1, '주문'), (2, '시안'), (3, '제작'), (4, '완료'), (5, '취소'), (6, '보류'), (7, '환불'), (8, '입금대기'), (9, '배송')], db_index=True, default=0, verbose_name='상태값')), ('tax', models.BooleanField(default=True, verbose_name='부가세포함')), ('keywords', models.CharField(blank=True, max_length=1000, null=True, verbose_name='검색창 내용')), ('checker', models.CharField(blank=True, max_length=255, null=True, verbose_name='시안 확인')), ('deposit', models.CharField(blank=True, max_length=100, null=True, verbose_name='입금 확인')), ('options', models.CharField(blank=True, max_length=255, null=True, verbose_name='결제/포함/택배')), ('employees', models.CharField(blank=True, db_index=True, max_length=100, null=True, verbose_name='작업자')), ('fix_manager', models.CharField(blank=True, db_index=True, max_length=100, null=True, verbose_name='담당자')), ('in_memo', models.CharField(blank=True, max_length=1000, null=True, verbose_name='관리자메모')), ('out_memo', models.CharField(blank=True, max_length=1000, null=True, verbose_name='고객표시 메모')), ('deposit_check', models.IntegerField(blank=True, null=True, verbose_name='입금 확인 및 차액')), ('uuid', models.UUIDField(default=uuid.uuid1)), ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='거래처')), ], options={ 'verbose_name': '주문 1_정보', 'verbose_name_plural': '주문 1_정보', }, ), migrations.CreateModel( name='OrderList', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('list_sort', models.IntegerField(db_index=True, verbose_name='내역 순서')), ('num', models.IntegerField(blank=True, null=True, verbose_name='동일 전표')), ('code', models.IntegerField(blank=True, db_index=True, null=True, verbose_name='품목코드')), ('name', models.CharField(blank=True, max_length=1000, null=True, verbose_name='제품명')), ('standard', models.CharField(blank=True, max_length=1000, null=True, verbose_name='규격')), ('quantity', models.IntegerField(db_index=True, verbose_name='수량')), ('price', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='매입가')), ('price_tax', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='매입 부가세')), ('selling_price', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='판매가')), ('selling_price_tax', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='판매 부가세')), ('group_manage', models.CharField(blank=True, max_length=1000, null=True, verbose_name='관리 항목')), ('gram', models.CharField(blank=True, max_length=1000, null=True, verbose_name='기타')), ('etc', models.CharField(blank=True, max_length=1000, null=True, verbose_name='적요')), ('memo', models.CharField(blank=True, max_length=2000, null=True, verbose_name='메모')), ('order_info', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_list', to='design.OrderInfo', verbose_name='주문 정보')), ], options={ 'verbose_name': '주문 2_품목', 'verbose_name_plural': '주문 2_품목', }, ), migrations.CreateModel( name='OrderMemo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('check', models.BooleanField(default=False, verbose_name='확인')), ('memo', models.CharField(blank=True, max_length=9000, null=True, verbose_name='내용')), ('location', models.CharField(blank=True, max_length=9000, null=True, verbose_name='위치 좌표')), ('order_img', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='design.OrderImg', verbose_name='주문 이미지')), ], options={ 'verbose_name': '주문 4_시안 메모', 'verbose_name_plural': '주문 4_시안 메모', }, ), migrations.CreateModel( name='PaperOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('title', models.CharField(blank=True, max_length=100, null=True, verbose_name='용지 이름')), ('gram', models.CharField(blank=True, max_length=100, null=True, verbose_name='그람수')), ('color', models.CharField(blank=True, max_length=100, null=True, verbose_name='색상')), ('option', models.CharField(blank=True, max_length=100, null=True, verbose_name='옵션 코팅/유무')), ], options={ 'verbose_name': '상품옵션 _용지옵션', 'verbose_name_plural': '상품옵션 _용지옵션', }, ), migrations.CreateModel( name='ProductBase', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('code', models.IntegerField(blank=True, null=True, verbose_name='품목코드')), ('title', models.CharField(blank=True, max_length=128, null=True, verbose_name='품목명')), ('slug', models.SlugField(allow_unicode=True, blank=True, max_length=255, null=True, unique=True, verbose_name='slug')), ('sell_price', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='판매가')), ('buy_price', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='매입가')), ('main_quantity', models.BooleanField(default=False, verbose_name='메인 수량')), ('ecount', models.BooleanField(default=False, verbose_name='이카운트 전송')), ('product_active', models.BooleanField(default=False, verbose_name='활성화')), ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='product_base_category', to='design.Category', verbose_name='카테고리')), ('etc', models.ManyToManyField(blank=True, related_name='product_base_etc', to='design.EtcOption')), ('paper', models.ManyToManyField(blank=True, related_name='product_base_paper', to='design.PaperOption')), ], options={ 'verbose_name': '상품옵션_통합', 'verbose_name_plural': '상품옵션_통합', }, ), migrations.CreateModel( name='ProductText', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('standard', models.CharField(blank=True, max_length=255, null=True, verbose_name='규격명')), ('horizontal', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='가로')), ('vertical', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='세로')), ('width', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='넓이')), ('height', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='높이')), ('paper', models.CharField(blank=True, max_length=255, null=True, verbose_name='재질')), ('gram', models.CharField(blank=True, max_length=100, null=True, verbose_name='그람수')), ('color', models.CharField(blank=True, max_length=100, null=True, verbose_name='색상')), ('paper_option', models.CharField(blank=True, max_length=100, null=True, verbose_name='옵션 코팅/유무')), ('side', models.CharField(blank=True, max_length=100, null=True, verbose_name='양면 / 단면')), ('etc', models.CharField(blank=True, max_length=100, null=True, verbose_name='기타 정보')), ('etc_option', models.CharField(blank=True, max_length=100, null=True, verbose_name='기타 옵션 상세')), ('memo', models.CharField(blank=True, max_length=100, null=True, verbose_name='기타 옵션 메모')), ('code', models.IntegerField(blank=True, null=True, verbose_name='품목코드')), ('title', models.CharField(blank=True, max_length=128, null=True, verbose_name='품목명')), ('slug', models.SlugField(allow_unicode=True, blank=True, max_length=255, null=True, unique=True, verbose_name='slug')), ('sell_price', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='판매가')), ('buy_price', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='매입가')), ('quantity', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, null=True, verbose_name='메인 수량')), ('main_quantity', models.BooleanField(default=False, verbose_name='메인 수량')), ('ecount', models.BooleanField(default=True, verbose_name='이카운트 전송')), ('product_active', models.BooleanField(default=False, verbose_name='활성화')), ('product_version', models.IntegerField(blank=True, default=1, null=True, verbose_name='version')), ('group', models.IntegerField(blank=True, null=True, verbose_name='group')), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='design.Category', verbose_name='카테고리')), ('supplier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='매입처')), ], options={ 'verbose_name': '상품옵션_통합 str', 'verbose_name_plural': '상품옵션_통합 str', }, ), migrations.CreateModel( name='SectorsCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('title', models.CharField(max_length=128, verbose_name='title')), ('lft', models.PositiveIntegerField(db_index=True, editable=False)), ('rght', models.PositiveIntegerField(db_index=True, editable=False)), ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)), ('level', models.PositiveIntegerField(db_index=True, editable=False)), ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='design.SectorsCategory', verbose_name='parent')), ], options={ 'verbose_name': '카테고리 업종', 'verbose_name_plural': '카테고리 업종', }, ), migrations.CreateModel( name='SideOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('title', models.CharField(blank=True, max_length=100, null=True, verbose_name='양면 / 단면')), ], options={ 'verbose_name': '상품옵션 _양면/단면', 'verbose_name_plural': '상품옵션 _양면/단면', }, ), migrations.CreateModel( name='StandardOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('is_removed', models.BooleanField(default=False)), ('title', models.CharField(blank=True, max_length=100, null=True, verbose_name='품목명')), ('horizontal', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='가로')), ('vertical', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='세로')), ('width', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='넓이')), ('height', models.DecimalField(blank=True, decimal_places=4, max_digits=11, null=True, verbose_name='높이')), ], options={ 'verbose_name': '상품옵션 _기본 규격', 'verbose_name_plural': '상품옵션 _기본 규격', }, ), migrations.AddField( model_name='productbase', name='side', field=models.ManyToManyField(blank=True, related_name='product_base_side', to='design.SideOption'), ), migrations.AddField( model_name='productbase', name='standard', field=models.ManyToManyField(blank=True, related_name='product_base_standard', to='design.StandardOption'), ), migrations.AddField( model_name='productbase', name='supplier', field=models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='매입처'), ), migrations.AddField( model_name='orderimg', name='order_info', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_img', to='design.OrderInfo', verbose_name='주문 리스트'), ), migrations.AddField( model_name='orderimg', name='sectors_category', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='design.SectorsCategory', verbose_name='업종'), ), ]
72.332432
227
0.623323
2,971
26,763
5.439583
0.102996
0.127962
0.077037
0.087
0.83553
0.813997
0.774086
0.75905
0.74191
0.712518
0
0.013627
0.226768
26,763
369
228
72.528455
0.767324
0.001681
0
0.494475
1
0
0.130034
0.004005
0
0
0
0
0
1
0
false
0
0.027624
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
562d3d97a95991880cdc57a20b3d842dfd0c0e9a
152
py
Python
srs/blog/admin.py
Ramguru94/python_django_school
bedaba575f8986fd17aaf7dcb920769224a9fc07
[ "MIT" ]
3
2020-03-27T12:34:15.000Z
2021-01-06T09:08:34.000Z
srs/blog/admin.py
Ramguru94/python_django_school
bedaba575f8986fd17aaf7dcb920769224a9fc07
[ "MIT" ]
null
null
null
srs/blog/admin.py
Ramguru94/python_django_school
bedaba575f8986fd17aaf7dcb920769224a9fc07
[ "MIT" ]
2
2020-10-25T14:11:32.000Z
2020-11-17T15:09:48.000Z
from django.contrib import admin # Register your models here. from django.contrib import admin from blog.models import Post admin.site.register(Post)
19
32
0.809211
23
152
5.347826
0.521739
0.162602
0.276423
0.373984
0.455285
0
0
0
0
0
0
0
0.131579
152
7
33
21.714286
0.931818
0.171053
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
5681991fa1e772ce60841c831b39e58ef39685a0
62,869
py
Python
Pre-Processing/src/audio_processing/file_lengths.py
jaquielajoie/Alzheimers_Project
0abc03dae4a81e390c9b0d1c479627273da9daf1
[ "Apache-2.0" ]
5
2021-04-17T02:37:56.000Z
2021-11-14T07:35:44.000Z
Pre-Processing/src/audio_processing/file_lengths.py
jaquielajoie/Alzheimers_Project
0abc03dae4a81e390c9b0d1c479627273da9daf1
[ "Apache-2.0" ]
null
null
null
Pre-Processing/src/audio_processing/file_lengths.py
jaquielajoie/Alzheimers_Project
0abc03dae4a81e390c9b0d1c479627273da9daf1
[ "Apache-2.0" ]
null
null
null
class FileLengths: def __init__(self): self.file_lengths = [ [ 54.3869387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/212-1.mp3" ], [ 38.138775510204084, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/271-2.mp3" ], [ 50.10285714285714, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/707-0.mp3" ], [ 110.18448979591837, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/236-0.mp3" ], [ 155.8465306122449, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/033-1.mp3" ], [ 80.352, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/563-0.mp3" ], [ 70.26938775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/526-1.mp3" ], [ 55.58857142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/033-0.mp3" ], [ 81.84163265306123, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/076-0.mp3" ], [ 68.54530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/172-1.mp3" ], [ 66.53387755102041, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/587-0.mp3" ], [ 82.65142857142857, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/257-0.mp3" ], [ 89.54775510204081, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/212-0.mp3" ], [ 70.19102040816327, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/049-0.mp3" ], [ 108.90448979591837, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/212-2.mp3" ], [ 108.61714285714285, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/257-2.mp3" ], [ 49.50204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/465-0.mp3" ], [ 82.8, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/578-0.mp3" ], [ 36.28408163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/172-3.mp3" ], [ 113.73714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/154-0.mp3" ], [ 80.03918367346938, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/585-0.mp3" ], [ 40.333061224489796, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/601-0.mp3" ], [ 95.13795918367347, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/076-2.mp3" ], [ 60.70857142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/033-2.mp3" ], [ 268.4865306122449, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/268-0.mp3" ], [ 35.944489795918365, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/458-0.mp3" ], [ 104.35918367346939, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/089-0.mp3" ], [ 30.798367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/660-0.mp3" ], [ 62.223673469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/050-0.mp3" ], [ 64.86204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/033-3.mp3" ], [ 113.42367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/154-1.mp3" ], [ 128.88816326530613, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/329-0.mp3" ], [ 36.179591836734694, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/172-2.mp3" ], [ 76.35591836734694, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/705-0.mp3" ], [ 76.7738775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/212-3.mp3" ], [ 60.16, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/049-1.mp3" ], [ 29.466122448979593, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/234-0.mp3" ], [ 39.862857142857145, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/291-1.mp3" ], [ 82.44244897959183, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/310-0.mp3" ], [ 40.777142857142856, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/355-0.mp3" ], [ 41.16897959183674, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/190-1.mp3" ], [ 83.17387755102041, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/334-1.mp3" ], [ 37.198367346938774, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/598-0.mp3" ], [ 78.7330612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/035-1.mp3" ], [ 52.03591836734694, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/368-0.mp3" ], [ 81.42367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/581-0.mp3" ], [ 77.00897959183673, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/094-1.mp3" ], [ 121.392, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/539-0.mp3" ], [ 109.87102040816326, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/461-0.mp3" ], [ 74.08326530612244, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/035-0.mp3" ], [ 99.91836734693878, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/334-0.mp3" ], [ 47.33387755102041, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/504-0.mp3" ], [ 58.200816326530614, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/355-1.mp3" ], [ 29.048163265306123, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/640-0.mp3" ], [ 51.304489795918364, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/291-2.mp3" ], [ 71.31428571428572, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/190-2.mp3" ], [ 53.498775510204084, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/642-0.mp3" ], [ 55.51020408163265, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/607-0.mp3" ], [ 88.39836734693877, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/506-0.mp3" ], [ 98.56, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/070-2.mp3" ], [ 33.22775510204082, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/216-0.mp3" ], [ 57.286530612244896, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/076-4.mp3" ], [ 88.76408163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/033-4.mp3" ], [ 70.6873469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/094-3.mp3" ], [ 96.3395918367347, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/094-2.mp3" ], [ 48.77061224489796, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/216-1.mp3" ], [ 35.65714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/703-0.mp3" ], [ 75.96, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/357-0.mp3" ], [ 60.55183673469388, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/293-1.mp3" ], [ 81.63265306122449, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/030-0.mp3" ], [ 34.795102040816325, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/016-3.mp3" ], [ 93.49224489795918, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/350-1.mp3" ], [ 33.201632653061225, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/168-0.mp3" ], [ 150.1518367346939, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/269-0.mp3" ], [ 63.3469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/051-1.mp3" ], [ 35.47428571428571, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/544-0.mp3" ], [ 134.7395918367347, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/029-1.mp3" ], [ 46.18448979591837, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/579-0.mp3" ], [ 71.44489795918368, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/091-1.mp3" ], [ 59.40244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/270-1.mp3" ], [ 86.23020408163265, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/213-2.mp3" ], [ 45.008979591836734, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/134-1.mp3" ], [ 76.01632653061225, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/349-0.mp3" ], [ 39.82430839002267, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/157-2.mp3" ], [ 61.10040816326531, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/134-0.mp3" ], [ 71.34040816326531, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/010-4.mp3" ], [ 65.48897959183674, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/349-1.mp3" ], [ 114.59918367346938, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/213-3.mp3" ], [ 163.60489795918366, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/235-0.mp3" ], [ 87.82367346938776, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/270-0.mp3" ], [ 60.264489795918365, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/091-0.mp3" ], [ 59.32408163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/704-0.mp3" ], [ 77.00897959183673, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/029-0.mp3" ], [ 81.37142857142857, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/237-2.mp3" ], [ 23.588571428571427, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/544-1.mp3" ], [ 55.48408163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/051-0.mp3" ], [ 101.4073469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/269-1.mp3" ], [ 84.37551020408164, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/168-1.mp3" ], [ 86.15183673469387, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/350-0.mp3" ], [ 75.8595918367347, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/030-1.mp3" ], [ 59.42857142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/624-0.mp3" ], [ 60.18612244897959, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/016-0.mp3" ], [ 28.473469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/663-0.mp3" ], [ 120.89469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/014-2.mp3" ], [ 139.46775510204083, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/051-2.mp3" ], [ 70.13877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/527-0.mp3" ], [ 56.32, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/562-0.mp3" ], [ 97.28, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/466-1.mp3" ], [ 61.28326530612245, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/091-2.mp3" ], [ 101.30285714285715, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/213-1.mp3" ], [ 85.73387755102041, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/270-2.mp3" ], [ 87.53632653061224, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/235-2.mp3" ], [ 164.7596598639456, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/157-1.mp3" ], [ 45.19183673469388, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/134-2.mp3" ], [ 60.21224489795918, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/134-3.mp3" ], [ 82.42530612244897, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/157-0.mp3" ], [ 75.91183673469388, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/466-0.mp3" ], [ 74.8930612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/173-1.mp3" ], [ 65.95918367346938, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/237-1.mp3" ], [ 56.088, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/527-1.mp3" ], [ 109.37469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/051-3.mp3" ], [ 131.68326530612245, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/053-1.mp3" ], [ 45.68816326530612, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/016-1.mp3" ], [ 63.111836734693874, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/252-0.mp3" ], [ 41.48244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/097-1.mp3" ], [ 39.54938775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/356-1.mp3" ], [ 113.2669387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/057-1.mp3" ], [ 51.74857142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/337-0.mp3" ], [ 56.08489795918367, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/010-3.mp3" ], [ 104.38530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/010-2.mp3" ], [ 79.6734693877551, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/057-0.mp3" ], [ 93.80571428571429, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/356-0.mp3" ], [ 45.94938775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/289-2.mp3" ], [ 67.70938775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/252-1.mp3" ], [ 41.48244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/702-0.mp3" ], [ 80.01306122448979, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/016-4.mp3" ], [ 141.0873469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/276-0.mp3" ], [ 136.09795918367348, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/369-0.mp3" ], [ 57.88734693877551, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/559-0.mp3" ], [ 66.56, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/620-0.mp3" ], [ 71.44489795918368, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/148-0.mp3" ], [ 125.51836734693877, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/057-2.mp3" ], [ 107.25877551020409, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/698-0.mp3" ], [ 56.42448979591837, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/354-0.mp3" ], [ 51.69632653061225, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/311-0.mp3" ], [ 112.14367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/010-0.mp3" ], [ 77.53142857142858, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/010-1.mp3" ], [ 51.38285714285714, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/252-2.mp3" ], [ 49.47591836734694, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/580-0.mp3" ], [ 65.17551020408163, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/639-0.mp3" ], [ 68.93714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/681-0.mp3" ], [ 71.9934693877551, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/341-0.mp3" ], [ 98.13616780045352, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/184-1.mp3" ], [ 82.80816326530612, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/005-0.mp3" ], [ 94.01469387755103, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/635-0.mp3" ], [ 33.671836734693876, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/488-1.mp3" ], [ 81.5804081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/358-1.mp3" ], [ 144.6138775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/125-0.mp3" ], [ 39.20979591836735, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/381-0.mp3" ], [ 70.21714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/144-1.mp3" ], [ 51.226122448979595, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/339-0.mp3" ], [ 55.431836734693874, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/144-0.mp3" ], [ 57.652244897959186, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/595-0.mp3" ], [ 56.92081632653061, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/381-1.mp3" ], [ 37.4334693877551, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/358-0.mp3" ], [ 42.81469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/488-0.mp3" ], [ 53.34204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/007-3.mp3" ], [ 113.81551020408163, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/023-2.mp3" ], [ 50.07673469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/184-0.mp3" ], [ 62.58292517006803, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/184-2.mp3" ], [ 110.52408163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/023-0.mp3" ], [ 81.18857142857142, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/066-0.mp3" ], [ 34.481632653061226, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/656-0.mp3" ], [ 54.543673469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/007-1.mp3" ], [ 66.71673469387756, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/493-1.mp3" ], [ 157.7273469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/247-0.mp3" ], [ 49.397551020408166, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/127-0.mp3" ], [ 60.31673469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/226-0.mp3" ], [ 84.87183673469387, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/493-0.mp3" ], [ 94.92897959183674, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/306-0.mp3" ], [ 65.8808163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/343-0.mp3" ], [ 55.222857142857144, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/005-2.mp3" ], [ 53.42040816326531, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/573-0.mp3" ], [ 40.96, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/672-0.mp3" ], [ 37.328979591836735, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/164-2.mp3" ], [ 95.34693877551021, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/222-0.mp3" ], [ 28.813061224489797, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/676-0.mp3" ], [ 81.29306122448979, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/001-2.mp3" ], [ 44.8, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/283-1.mp3" ], [ 235.8595918367347, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/003-0.mp3" ], [ 61.02204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/046-0.mp3" ], [ 64.86204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/497-0.mp3" ], [ 56.60734693877551, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/497-1.mp3" ], [ 55.797551020408164, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/283-0.mp3" ], [ 72.01959183673469, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/062-0.mp3" ], [ 128.2873469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/222-1.mp3" ], [ 51.313265306122446, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/164-3.mp3" ], [ 116.66285714285715, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/206-0.mp3" ], [ 36.33632653061225, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/220-1.mp3" ], [ 191.16408163265305, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/dementia/018-0.mp3" ], [ 54.23020408163265, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/113-1.mp3" ], [ 45.89714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/092-0.mp3" ], [ 70.79183673469387, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/172-0.mp3" ], [ 42.840816326530614, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/056-4.mp3" ], [ 99.57877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/137-0.mp3" ], [ 53.21142857142857, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/013-4.mp3" ], [ 51.98367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/627-0.mp3" ], [ 99.78775510204082, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/015-2.mp3" ], [ 40.80326530612245, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/297-1.mp3" ], [ 54.073469387755104, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/052-0.mp3" ], [ 56.11102040816326, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/209-2.mp3" ], [ 67.21306122448979, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/196-1.mp3" ], [ 60.969795918367346, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/196-0.mp3" ], [ 121.46938775510205, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/209-3.mp3" ], [ 69.1461224489796, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/015-3.mp3" ], [ 31.634285714285713, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/332-0.mp3" ], [ 54.674285714285716, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/137-1.mp3" ], [ 100.93714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/210-2.mp3" ], [ 59.794285714285714, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/092-1.mp3" ], [ 41.95265306122449, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/113-0.mp3" ], [ 73.56081632653061, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/686-0.mp3" ], [ 57.6, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/113-2.mp3" ], [ 26.30530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/092-3.mp3" ], [ 101.35510204081632, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/684-0.mp3" ], [ 47.72571428571428, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/255-0.mp3" ], [ 71.49714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/028-1.mp3" ], [ 65.8808163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/137-3.mp3" ], [ 28.133877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/295-0.mp3" ], [ 97.69795918367348, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/015-1.mp3" ], [ 61.49224489795918, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/297-2.mp3" ], [ 39.44489795918367, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/209-1.mp3" ], [ 27.141224489795917, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/052-2.mp3" ], [ 117.18530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/015-0.mp3" ], [ 26.070204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/295-1.mp3" ], [ 38.373877551020406, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/137-2.mp3" ], [ 41.87428571428571, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/255-1.mp3" ], [ 90.33142857142857, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/210-1.mp3" ], [ 37.7469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/092-2.mp3" ], [ 50.31183673469388, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/113-3.mp3" ], [ 96.52244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/128-1.mp3" ], [ 39.07918367346939, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/229-1.mp3" ], [ 73.97877551020409, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/054-0.mp3" ], [ 71.47102040816327, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/028-4.mp3" ], [ 53.05469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/013-2.mp3" ], [ 75.25877551020409, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/248-0.mp3" ], [ 66.76897959183674, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/275-0.mp3" ], [ 54.25632653061224, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/096-2.mp3" ], [ 78.0538775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/015-4.mp3" ], [ 62.61551020408163, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/150-1.mp3" ], [ 45.74040816326531, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/150-0.mp3" ], [ 47.46448979591837, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/275-1.mp3" ], [ 84.1404081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/248-1.mp3" ], [ 44.93061224489796, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/056-3.mp3" ], [ 58.51428571428571, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/013-3.mp3" ], [ 63.29469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/192-2.mp3" ], [ 131.57877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/128-2.mp3" ], [ 34.220408163265304, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/229-2.mp3" ], [ 45.92326530612245, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/192-0.mp3" ], [ 71.28816326530612, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/096-1.mp3" ], [ 76.14693877551021, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/232-1.mp3" ], [ 70.47836734693878, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/150-2.mp3" ], [ 100.54530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/017-4.mp3" ], [ 74.73632653061225, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/232-0.mp3" ], [ 57.10367346938776, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/013-0.mp3" ], [ 39.157551020408164, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/056-0.mp3" ], [ 40.6204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/248-2.mp3" ], [ 168.6204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/128-3.mp3" ], [ 77.84489795918367, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/336-1.mp3" ], [ 77.00897959183673, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/109-1.mp3" ], [ 92.78693877551021, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/296-2.mp3" ], [ 36.440816326530616, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/114-4.mp3" ], [ 37.17224489795918, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/208-1.mp3" ], [ 86.54367346938776, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/034-4.mp3" ], [ 67.73551020408163, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/155-0.mp3" ], [ 35.056326530612246, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/071-4.mp3" ], [ 83.61795918367346, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/678-0.mp3" ], [ 67.34367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/256-2.mp3" ], [ 32.496326530612244, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/171-1.mp3" ], [ 43.10204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/171-0.mp3" ], [ 85.49877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/211-1.mp3" ], [ 62.69387755102041, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/208-0.mp3" ], [ 59.14122448979592, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/661-0.mp3" ], [ 89.12979591836735, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/296-1.mp3" ], [ 73.11673469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/208-2.mp3" ], [ 51.46122448979592, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/155-3.mp3" ], [ 40.646530612244895, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/256-1.mp3" ], [ 46.10612244897959, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/093-0.mp3" ], [ 30.824489795918367, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/093-1.mp3" ], [ 62.0669387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/256-0.mp3" ], [ 91.55918367346939, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/155-2.mp3" ], [ 75.62448979591836, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/211-2.mp3" ], [ 64.88816326530612, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/296-0.mp3" ], [ 55.51020408163265, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/109-3.mp3" ], [ 60.68244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/068-3.mp3" ], [ 60.34285714285714, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/132-1.mp3" ], [ 49.136326530612244, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/114-2.mp3" ], [ 48.53551020408163, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/175-3.mp3" ], [ 33.28, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/130-3.mp3" ], [ 62.95510204081633, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/034-2.mp3" ], [ 51.69632653061225, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/071-2.mp3" ], [ 81.9461224489796, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/073-0.mp3" ], [ 72.56816326530613, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/073-1.mp3" ], [ 87.58857142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/034-3.mp3" ], [ 61.544489795918366, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/071-3.mp3" ], [ 58.51428571428571, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/292-1.mp3" ], [ 58.5665306122449, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/175-2.mp3" ], [ 27.40244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/130-2.mp3" ], [ 38.76571428571429, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/274-2.mp3" ], [ 49.16244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/114-3.mp3" ], [ 57.67836734693878, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/132-0.mp3" ], [ 53.05469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/068-2.mp3" ], [ 61.36163265306122, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/109-4.mp3" ], [ 68.23183673469387, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/068-0.mp3" ], [ 57.626122448979594, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/114-1.mp3" ], [ 55.77142857142857, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/274-0.mp3" ], [ 66.71673469387756, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/175-0.mp3" ], [ 34.14204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/071-1.mp3" ], [ 60.86530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/034-1.mp3" ], [ 74.34448979591836, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/129-1.mp3" ], [ 61.83183673469388, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/055-0.mp3" ], [ 83.25224489795919, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/073-3.mp3" ], [ 45.06122448979592, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/071-0.mp3" ], [ 92.23836734693877, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/034-0.mp3" ], [ 29.675102040816327, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/130-1.mp3" ], [ 72.96, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/175-1.mp3" ], [ 39.3665306122449, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/274-1.mp3" ], [ 45.583673469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/114-0.mp3" ], [ 97.25387755102041, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/121-4.mp3" ], [ 41.53469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/118-0.mp3" ], [ 37.12, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/322-2.mp3" ], [ 56.05877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/118-3.mp3" ], [ 65.98530612244897, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/042-1.mp3" ], [ 34.82122448979592, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/021-2.mp3" ], [ 49.11020408163265, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/059-2.mp3" ], [ 78.65469387755103, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/245-2.mp3" ], [ 56.52897959183674, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/146-1.mp3" ], [ 38.713469387755104, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/059-3.mp3" ], [ 32.888163265306126, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/021-3.mp3" ], [ 49.78938775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/118-2.mp3" ], [ 81.03183673469388, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/086-4.mp3" ], [ 64.54857142857144, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/322-1.mp3" ], [ 52.74122448979592, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/304-2.mp3" ], [ 84.21877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/243-1.mp3" ], [ 102.26938775510204, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/121-2.mp3" ], [ 51.14775510204082, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/142-1.mp3" ], [ 53.18530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/107-1.mp3" ], [ 106.81469387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/086-0.mp3" ], [ 54.59591836734694, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/267-0.mp3" ], [ 33.72408163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/166-0.mp3" ], [ 36.4669387755102, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/042-4.mp3" ], [ 52.950204081632656, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/140-3.mp3" ], [ 59.66367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/138-3.mp3" ], [ 48.53551020408163, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/302-0.mp3" ], [ 95.0595918367347, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/105-2.mp3" ], [ 102.4, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/166-1.mp3" ], [ 56.60734693877551, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/086-1.mp3" ], [ 68.02285714285715, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/142-0.mp3" ], [ 82.67755102040816, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/121-3.mp3" ], [ 128.20897959183674, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/243-0.mp3" ], [ 28.212244897959184, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/107-2.mp3" ], [ 95.50367346938775, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/121-1.mp3" ], [ 43.33714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/298-1.mp3" ], [ 50.83428571428571, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/086-3.mp3" ], [ 84.29714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/140-0.mp3" ], [ 72.75102040816327, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/105-0.mp3" ], [ 29.622857142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/021-4.mp3" ], [ 34.61224489795919, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/059-4.mp3" ], [ 48.40489795918367, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/182-3.mp3" ], [ 35.18693877551021, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/631-0.mp3" ], [ 77.27020408163266, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/138-1.mp3" ], [ 55.32734693877551, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/166-2.mp3" ], [ 54.543673469387755, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/105-1.mp3" ], [ 57.67836734693878, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/267-2.mp3" ], [ 61.17877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/118-4.mp3" ], [ 46.75918367346939, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/086-2.mp3" ], [ 147.8530612244898, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/121-0.mp3" ], [ 48.71836734693878, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/142-3.mp3" ], [ 71.75836734693877, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/227-1.mp3" ], [ 78.62857142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/612-0.mp3" ], [ 98.2204081632653, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/323-0.mp3" ], [ 55.48408163265306, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/022-0.mp3" ], [ 44.01632653061225, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/022-1.mp3" ], [ 77.50530612244899, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/323-1.mp3" ], [ 132.2057142857143, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/225-2.mp3" ], [ 77.60979591836735, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/145-3.mp3" ], [ 58.5665306122449, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/227-0.mp3" ], [ 52.21877551020408, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/145-1.mp3" ], [ 115.01714285714286, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/225-0.mp3" ], [ 79.80408163265307, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/124-0.mp3" ], [ 43.59836734693877, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/006-2.mp3" ], [ 52.32326530612245, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/340-0.mp3" ], [ 52.375510204081635, "/Users/jackie/Documents/AD_CGU/Pre-Processing/test_data/mp3/control/022-2.mp3" ] ]
39.967578
96
0.506863
6,280
62,869
4.948567
0.107484
0.138752
0.252277
0.277504
0.776941
0.776941
0.776941
0.776941
0.776941
0.776941
0
0.215941
0.374557
62,869
1,572
97
39.993003
0.5744
0
0
0.26972
0
0.249364
0.483291
0.483291
0
0
0
0
0
1
0.000636
false
0
0
0
0.001272
0
0
0
0
null
0
1
1
0
1
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
3b0d6fd18472cbd0df58e57e09cd86895e9e66cb
124
py
Python
app/main/service/balance_service.py
luifer-villalba/capibara-server
22b2a9ea31fcf11d2930c55998824e980c29d1cb
[ "MIT" ]
null
null
null
app/main/service/balance_service.py
luifer-villalba/capibara-server
22b2a9ea31fcf11d2930c55998824e980c29d1cb
[ "MIT" ]
null
null
null
app/main/service/balance_service.py
luifer-villalba/capibara-server
22b2a9ea31fcf11d2930c55998824e980c29d1cb
[ "MIT" ]
null
null
null
from app.main import db from app.main.model.balance import Balance def get_all_balances(): return Balance.query.all()
17.714286
42
0.766129
20
124
4.65
0.65
0.150538
0.236559
0
0
0
0
0
0
0
0
0
0.145161
124
6
43
20.666667
0.877358
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.5
0.25
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
1
1
0
1
1
0
0
0
7
3b108ece47dbf079927f08c344a0bd6738c6aabf
120
py
Python
conftest.py
michalk8/anndata
664e32b0aa6625fe593370d37174384c05abfd4e
[ "BSD-3-Clause" ]
null
null
null
conftest.py
michalk8/anndata
664e32b0aa6625fe593370d37174384c05abfd4e
[ "BSD-3-Clause" ]
null
null
null
conftest.py
michalk8/anndata
664e32b0aa6625fe593370d37174384c05abfd4e
[ "BSD-3-Clause" ]
null
null
null
# This file exists just to allow ignoring warnings without test collection failing on CI # TODO: Fix that import pytest
30
88
0.8
19
120
5.052632
1
0
0
0
0
0
0
0
0
0
0
0
0.175
120
3
89
40
0.969697
0.841667
0
0
0
0
0
0
0
0
0
0.333333
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
1
0
0
7
8ee3540b670d397c75f44f144c5818a4eae703c0
66
py
Python
examples/underscored/trivial_string.py
doboy/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
7
2016-09-23T00:44:05.000Z
2021-10-04T21:19:12.000Z
examples/underscored/trivial_string.py
jameswu1991/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
1
2016-09-23T00:45:05.000Z
2019-02-16T19:05:37.000Z
examples/underscored/trivial_string.py
jameswu1991/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
3
2016-09-23T01:13:15.000Z
2018-07-20T21:22:17.000Z
# x = 'x' # print(x) (__,) = ('x',) _ = __ print _ (x,) = (_,)
8.25
14
0.333333
7
66
2.142857
0.285714
0.266667
0.933333
1.066667
0
0
0
0
0
0
0
0
0.30303
66
7
15
9.428571
0.326087
0.257576
0
0
0
0
0.022222
0
0
0
0
0
0
0
null
null
0
0
null
null
0.25
1
0
0
null
1
1
1
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
1
0
0
0
0
0
0
0
0
7
d91dc5b856047f971e1f91ad846ea94d6e9ef2bf
16,859
py
Python
package/test/integrated_mongos_test.py
yektas/ambari-mongodb
f7cf763183b9aa85d1bc47a7918f3d05f61a69ee
[ "BSD-3-Clause" ]
null
null
null
package/test/integrated_mongos_test.py
yektas/ambari-mongodb
f7cf763183b9aa85d1bc47a7918f3d05f61a69ee
[ "BSD-3-Clause" ]
null
null
null
package/test/integrated_mongos_test.py
yektas/ambari-mongodb
f7cf763183b9aa85d1bc47a7918f3d05f61a69ee
[ "BSD-3-Clause" ]
null
null
null
import os import sys from time import sleep # Ambari includes from resource_management.core.exceptions import ComponentIsNotRunning from resource_management.libraries.script import Script # Custom service test classes includes from integrated_base_test import IntegratedBaseTestCase SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PACKAGE_DIR = os.path.join(SCRIPT_DIR, '../scripts/') SERVICE_DIR = os.path.join(SCRIPT_DIR, '../') sys.path.append(PACKAGE_DIR) sys.path.append(SERVICE_DIR) # Custom service scripts includes import params from mongos import MongosServer from mongo_base import InstanceConfig from mongo_base import InstanceStatus from mongo_config import MongoConfigServer class IntegratedMongoConfTestCase(IntegratedBaseTestCase): def setUp(self): self.as_super = super(IntegratedMongoConfTestCase, self) self.as_super.setUp() self.config_server = None params.try_interval = 4 params.times_to_try = 10 # Configuring and Installing mongo config dependencies server = MongoConfigServer() server.my_hostname = 'node1.test.com' server.configure(self.env) server.install(self.env) # Configuring and Installing mongos dependencies server = MongosServer() server.my_hostname = 'node1.test.com' server.configure(self.env) server.install(self.env) def tearDown(self): self.as_super = super(IntegratedMongoConfTestCase, self) self.as_super.tearDown() if self.config_server: self.config_server.stop(self.env) def several_hosts_setup(self): Script.config['clusterHostInfo'] = { 'mongos_hosts': ['node1.test.com','node2.test.com'], 'mongodb_hosts': [], 'mongodc_hosts': ['node1.test.com','node2.test.com','node3.test.com'] } params.mongos_cluster_definition = '' def several_hosts_setup_with_config_server(self): Script.config['clusterHostInfo'] = { 'mongos_hosts': ['node1.test.com','node2.test.com'], 'mongodb_hosts': [], 'mongodc_hosts': ['node1.test.com'] } params.mongos_cluster_definition = '' # Starting the required config server self.config_server = MongoConfigServer() self.config_server.my_hostname = 'node1.test.com' self.config_server.start(self.env) expected_cluster_status_for_several_hosts_stopped = [ ('0',['node1.test.com','node2.test.com'], [ InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_0.pid', final_db_path='/var/lib/mongodb/node1_0_0', log_file='/var/log/mongodb/node1_0_0.log', db_port='27017', host_name='node1.test.com', is_arbiter=False, is_started=False, is_repl_configurated=None, repl_role=None), InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node2_0_0.pid', final_db_path='/var/lib/mongodb/node2_0_0', log_file='/var/log/mongodb/node2_0_0.log', db_port='27017', host_name='node2.test.com', is_arbiter=False, is_started=False, is_repl_configurated=None, repl_role=None)])] def one_host_setup(self): Script.config['clusterHostInfo'] = { 'mongos_hosts': ['node1.test.com'], 'mongodb_hosts': [], 'mongodc_hosts': ['node1.test.com'] } params.mongos_cluster_definition = 'node1.test.com,node1.test.com' self.config_server = MongoConfigServer() self.config_server.my_hostname = 'node1.test.com' self.config_server.start(self.env) expected_cluster_status_for_one_host_stopped = [ ('0',['node1.test.com','node1.test.com'], [ InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_0.pid', final_db_path='/var/lib/mongodb/node1_0_0', log_file='/var/log/mongodb/node1_0_0.log', db_port='27017', host_name='node1.test.com', is_arbiter=False, is_started=False, is_repl_configurated=None, repl_role=None), InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_1.pid', final_db_path='/var/lib/mongodb/node1_0_1', log_file='/var/log/mongodb/node1_0_1.log', db_port='27018', host_name='node1.test.com', is_arbiter=False, is_started=False, is_repl_configurated=None, repl_role=None)])] def test_get_cluster_data_with_one_host(self): self.one_host_setup() server = MongosServer() server.my_hostname = 'node1.test.com' expectedClusterData = [('0', ['node1.test.com', 'node1.test.com'], [InstanceConfig(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_0.pid', final_db_path='/var/lib/mongodb/node1_0_0', log_file='/var/log/mongodb/node1_0_0.log', db_port='27017', host_name='node1.test.com', is_arbiter=False), InstanceConfig(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_1.pid', final_db_path='/var/lib/mongodb/node1_0_1', log_file='/var/log/mongodb/node1_0_1.log', db_port='27018', host_name='node1.test.com', is_arbiter=False)])] clusterData = server.getClusterData() self.assertEqual(clusterData,expectedClusterData,"The cluster data for the mongos is not right") def test_get_cluster_status_with_one_host(self): self.one_host_setup() server = MongosServer() server.my_hostname = 'node1.test.com' clusterStatus = server.getClusterStatus(server.getClusterData()) self.assertEqual(clusterStatus,self.expected_cluster_status_for_one_host_stopped, "The cluster status result before stating the mongos is not right") def test_stopping_an_already_stopped_cluster(self): self.one_host_setup() server = MongosServer() server.my_hostname = 'node1.test.com' clusterStatus = server.getClusterStatus(server.getClusterData()) self.assertEqual(clusterStatus,self.expected_cluster_status_for_one_host_stopped, "The cluster status result before stating the mongos is not right") server.stop(self.env) clusterStatus = server.getClusterStatus(server.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_one_host_stopped, "The cluster status result after stopping the mongos is not right") def test_mongos_in_one_host(self): self.one_host_setup() server = MongosServer() server.my_hostname = 'node1.test.com' with self.assertRaises(ComponentIsNotRunning): server.status(self.env) clusterStatus = server.getClusterStatus(server.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_one_host_stopped, "The cluster status result before stating the mongos is not right") server.start(self.env) sleep(self.SLEEP_INTERVAL_AFTER_START_A_INSTANCE) server.status(self.env) expectedClusterStatus = [('0', ['node1.test.com', 'node1.test.com'], [ InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_0.pid', final_db_path='/var/lib/mongodb/node1_0_0', log_file='/var/log/mongodb/node1_0_0.log', db_port='27017', host_name='node1.test.com', is_arbiter=False, is_started=True, is_repl_configurated=False, repl_role=None), InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_1.pid', final_db_path='/var/lib/mongodb/node1_0_1', log_file='/var/log/mongodb/node1_0_1.log', db_port='27018', host_name='node1.test.com', is_arbiter=False, is_started=True, is_repl_configurated=False, repl_role=None)])] clusterStatus = server.getClusterStatus(server.getClusterData()) self.assertEqual(clusterStatus, expectedClusterStatus,"The cluster status result for a started mongos is " "not right") server.stop(self.env) with self.assertRaises(ComponentIsNotRunning): server.status(self.env) clusterStatus = server.getClusterStatus(server.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_one_host_stopped, "The cluster status result after stopping the mongos is not right") def test_get_cluster_status_with_several_hosts(self): self.several_hosts_setup_with_config_server() server = MongosServer() server.my_hostname = 'node1.test.com' clusterStatus = server.getClusterStatus(server.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_several_hosts_stopped, "The cluster status result before stating the mongos is not right") def test_mongos_with_several_hosts(self): self.several_hosts_setup_with_config_server() server2 = MongosServer() server2.my_hostname = 'node2.test.com' server1 = MongosServer() server1.my_hostname = 'node1.test.com' clusterStatus = server2.getClusterStatus(server2.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_several_hosts_stopped, "The cluster status result before stating the mongos is not right") server2.start(self.env) sleep(self.SLEEP_INTERVAL_AFTER_START_A_INSTANCE) server2.status(self.env) expectedClusterStatusServer2On = [ ('0',['node1.test.com','node2.test.com'], [ InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_0.pid', final_db_path='/var/lib/mongodb/node1_0_0', log_file='/var/log/mongodb/node1_0_0.log', db_port='27017', host_name='node1.test.com', is_arbiter=False, is_started=False, is_repl_configurated=None, repl_role=None), InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node2_0_0.pid', final_db_path='/var/lib/mongodb/node2_0_0', log_file='/var/log/mongodb/node2_0_0.log', db_port='27017', host_name='node2.test.com', is_arbiter=False, is_started=True, is_repl_configurated=False, repl_role=None)])] clusterStatus = server2.getClusterStatus(server2.getClusterData()) self.assertEqual(clusterStatus, expectedClusterStatusServer2On, "The cluster status result for a started node2" " in the mongos is not right") server1.start(self.env) sleep(self.SLEEP_INTERVAL_AFTER_START_A_INSTANCE) server1.status(self.env) expectedClusterStatusServer1On = [ ('0',['node1.test.com','node2.test.com'], [ InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node1_0_0.pid', final_db_path='/var/lib/mongodb/node1_0_0', log_file='/var/log/mongodb/node1_0_0.log', db_port='27017', host_name='node1.test.com', is_arbiter=False, is_started=True, is_repl_configurated=False, repl_role=None), InstanceStatus(shard_name='0', pid_file_name='/var/run/mongodb/node2_0_0.pid', final_db_path='/var/lib/mongodb/node2_0_0', log_file='/var/log/mongodb/node2_0_0.log', db_port='27017', host_name='node2.test.com', is_arbiter=False, is_started=True, is_repl_configurated=False, repl_role=None)])] clusterStatus = server1.getClusterStatus(server1.getClusterData()) self.assertEqual(clusterStatus, expectedClusterStatusServer1On, "The cluster status result for a started node1" " in the mongos is not right") server2.stop(self.env) with self.assertRaises(ComponentIsNotRunning): server2.status(self.env) server1.stop(self.env) with self.assertRaises(ComponentIsNotRunning): server1.status(self.env) clusterStatus = server2.getClusterStatus(server2.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_several_hosts_stopped, "The cluster status result after stopping the mongos is not right") def test_must_not_start_if_all_config_servers_are_off(self): self.several_hosts_setup() server1 = MongosServer() server1.my_hostname = 'node1.test.com' clusterStatus = server1.getClusterStatus(server1.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_several_hosts_stopped, "The cluster status result before stating the mongos is not right") server1.start(self.env) clusterStatus = server1.getClusterStatus(server1.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_several_hosts_stopped, "The cluster status result before stating the mongos is not right") def test_must_not_start_if_no_config_servers_primary_on(self): self.several_hosts_setup() server1 = MongosServer() server1.my_hostname = 'node1.test.com' clusterStatus = server1.getClusterStatus(server1.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_several_hosts_stopped, "The cluster status result before stating the mongos is not right") # Starting only the secondary config servers config_server2 = MongoConfigServer() config_server2.my_hostname = 'node2.test.com' config_server2.start(self.env) config_server3 = MongoConfigServer() config_server3.my_hostname = 'node3.test.com' config_server3.start(self.env) server1.start(self.env) clusterStatus = server1.getClusterStatus(server1.getClusterData()) self.assertEqual(clusterStatus, self.expected_cluster_status_for_several_hosts_stopped, "The cluster status result before stating the mongos is not right")
46.443526
119
0.572573
1,728
16,859
5.314815
0.085069
0.038872
0.049652
0.027439
0.832753
0.828397
0.803136
0.77341
0.742814
0.734756
0
0.025646
0.338514
16,859
362
120
46.571823
0.797884
0.0156
0
0.754209
0
0
0.181637
0.063962
0
0
0
0
0.06734
1
0.043771
false
0
0.037037
0
0.090909
0
0
0
0
null
0
0
0
1
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
7
d9411fa6de1381e3bdc96f6766d8b3880690eec7
13,439
py
Python
courthouse/tensorflow/judge.py
heidariarash/Courthouse
bda59c8a86d6187720ddf2841d986c98e7d9b83e
[ "MIT" ]
null
null
null
courthouse/tensorflow/judge.py
heidariarash/Courthouse
bda59c8a86d6187720ddf2841d986c98e7d9b83e
[ "MIT" ]
null
null
null
courthouse/tensorflow/judge.py
heidariarash/Courthouse
bda59c8a86d6187720ddf2841d986c98e7d9b83e
[ "MIT" ]
null
null
null
from courthouse.utils.case import CategoricalCase, NumericalCase import numpy as np import tensorflow as tf class CategoricalJudge: """ Use this class to judge your model to see if it is fair or not. """ def __init__(self) -> None: self.__org_data = None self.__new_data = None self.__old_case = None self.__new_case = None self.__org_out = None self.__new_out = None self.__output_type = None def case(self, data: np.ndarray, change_from: CategoricalCase , change_towards: CategoricalCase) -> None: """ Use this method to specify the transformation from the old case to the new case """ self.__old_case = change_from self.__new_case = change_towards #binary if change_from.get("binary") != -1: self.__org_data = data[data[:, change_from.get("column")] == change_from.get("binary")] self.__new_data = self.__org_data.copy() self.__new_data[:, change_from.get("column")] = 1 - self.__new_data[:, change_from.get("column")] #column to non column elif change_towards.get("column") is None: self.__org_data = data[data[:, change_from.get("column")] == 1] self.__new_data = self.__org_data.copy() self.__new_data[:, change_from.get("column")] = 0 #non column to column elif type(change_from.get("column")) == list or type(change_from.get("column")) == tuple: self.__org_data = data for column in change_from.get("column"): self.__org_data = self.__org_data[self.__org_data[:, column] == 0] self.__new_data = self.__org_data.copy() self.__new_data[:, change_towards.get("column")] = 1 #column to column else: self.__org_data = data[data[:, change_from.get("column")] == 1] self.__new_data = self.__org_data.copy() self.__new_data[:, change_from.get("column")] = 0 self.__new_data[:, change_towards.get("column")] = 1 def judge(self, model:tf.keras.Model, output_type: str) -> None: """ Use this method to judge your model fairness. """ org_predict = model.predict(self.__org_data) new_predict = model.predict(self.__new_data) self.__output_type = output_type if output_type == "categorical": self.__org_out = [] self.__new_out = [] for output in org_predict: self.__org_out.append(np.argmax(output)) for output in new_predict: self.__new_out.append(np.argmax(output)) elif output_type == "binary_sigmoid": self.__org_out = [] self.__new_out = [] for output in org_predict: self.__org_out.append(1 if output>=0.5 else 0) for output in new_predict: self.__new_out.append(1 if output>=0.5 else 0) elif output_type == "binary_tanh": self.__org_out = [] self.__new_out = [] for output in org_predict: self.__org_out.append(1 if output>=0 else 0) for output in new_predict: self.__new_out.append(1 if output>=0 else 0) elif output_type == "regression": self.__org_out = [] self.__new_out = [] self.__org_out.append(np.mean(org_predict)) self.__org_out.append(np.min(org_predict)) self.__org_out.append(np.max(org_predict)) self.__new_out.append(np.mean(new_predict)) self.__new_out.append(np.min(new_predict)) self.__new_out.append(np.max(new_predict)) else: self.__output_type = None raise Exception(f'{output_type} output_type is not defined.') def verdict(self) -> str: """ Use this method to print the report of the fairness of the model. """ #checking if the model is actually judged if self.__output_type is None: print('No model has been judged yet.') print(f"There are {self.__org_data.shape[0]} \"{self.__old_case.get('name')}\" to be found.\n") print("When the model was applied to the original dataset, these results where obtained:") if self.__output_type == "binary_sigmoid" or self.__output_type == "binary_tanh": ones = sum(filter(lambda x: x==1, self.__org_out)) print(f"\t{ones} time(s) the model predicted 1. This is the case for {ones/len(self.__org_out)*100}% of the data.") print(f"\t{len(self.__org_out) - ones} time(s) the model predicted 0. This is the case for {(1 - ones/len(self.__org_out))* 100}% of the data.\n") print(f"Then the value of {self.__case.get("name")} changed.\n") print("These results were obtained after applying the model on the new data.") ones = sum(filter(lambda x: x==1, self.__new_out)) print(f"\t{ones} time(s) the model predicted 1. This is the case for {ones/len(self.__new_out) * 100}% of the data.") print(f"\t{len(self.__new_out) - ones} time(s) the model predicted 0. This is the case for {(1 - ones/len(self.__new_out)) * 100}% of the data.") elif self.__output_type == "categorical": results = {} for output in self.__org_out: results[output] = results.get(output, 0) + 1 for key, value in results.items(): print(f"\t{value} time(s) the model predicted {key}. This is the case for {value/len(self.__org_out)*100}% of the data.") print("\n") print(f"Then the value of {self.__case.get("name")} changed.\n") print("These results were obtained after applying the model on the new data.") results = {} for output in self.__new_out: results[output] = results.get(output, 0) + 1 for key, value in results.items(): print(f"\t{value} time(s) the model predicted {key}. This is the case for {value/len(self.__org_out)*100}% of the data.") elif self.__output_type == "regression": print(f"\tMean of the predictions: {self.__org_out[0]}") print(f"\tMinimum of the predictions: {self.__org_out[1]}") print(f"\tMaximum of the predictions: {self.__org_out[2]}\n") print(f"Then the value of {self.__case.get("name")} changed.\n") print("These results were obtained after applying the model on the new data.") print(f"\tMean of the predictions: {self.__new_out[0]}") print(f"\tMaximum of the predictions: {self.__new_out[1]}") print(f"\tMaximum of the predictions: {self.__new_out[2]}") def faced_discrimination(self) -> list: """ Use this method to get a list of datapoints, for which the prediction would be different if the case was different. """ if self.__output_type == "regression": print("You can not use this method on a regression problem.") return differnet = {} for i, output in enumerate(self.__org_out): if output != self.__new_out[i]: differnet[i] = self.__org_data[i] return differnet class NumericalJudge: """ Use this class to judge your model to see if it is fair or not. """ def __init__(self) -> None: self.__org_data = None self.__new_data = None self.__case = None self.__org_out = None self.__new_out = None self.__output_type = None def case(self, data: np.ndarray, case:NumericalCase, change_amount: int) -> None: """ Use this method to specify """ self.__case = case self.__org_data = data self.__new_data = data.copy() self.__new_data[:, case.get("column")] = self.__new_data[:, case.get("column")] + change_amount def judge(self, model:tf.keras.Model, output_type: str) -> None: """ Use this method to judge your model fairness. """ org_predict = model.predict(self.__org_data) new_predict = model.predict(self.__new_data) self.__output_type = output_type if output_type == "categorical": self.__org_out = [] self.__new_out = [] for output in org_predict: self.__org_out.append(np.argmax(output)) for output in new_predict: self.__new_out.append(np.argmax(output)) elif output_type == "binary_sigmoid": self.__org_out = [] self.__new_out = [] for output in org_predict: self.__org_out.append(1 if output>=0.5 else 0) for output in new_predict: self.__new_out.append(1 if output>=0.5 else 0) elif output_type == "binary_tanh": self.__org_out = [] self.__new_out = [] for output in org_predict: self.__org_out.append(1 if output>=0 else 0) for output in new_predict: self.__new_out.append(1 if output>=0 else 0) elif output_type == "regression": self.__org_out = [] self.__new_out = [] self.__org_out.append(np.mean(org_predict)) self.__org_out.append(np.min(org_predict)) self.__org_out.append(np.max(org_predict)) self.__new_out.append(np.mean(new_predict)) self.__new_out.append(np.min(new_predict)) self.__new_out.append(np.max(new_predict)) else: self.__output_type = None raise Exception(f'{output_type} output_type is not defined.') def verdict(self) -> str: """ Use this method to print the report of the fairness of the model. """ #checking if the model is actually judged if self.__output_type is None: print('No model has been judged yet.') print(f"There are {self.__org_data.shape[0]} datapoint in original dataset.\n") print("When the model was applied to the original dataset, these results where obtained:") if self.__output_type == "binary_sigmoid" or self.__output_type == "binary_tanh": ones = sum(filter(lambda x: x==1, self.__org_out)) print(f"\t{ones} time(s) the model predicted 1. This is the case for {ones/len(self.__org_out)*100}% of the data.") print(f"\t{len(self.__org_out) - ones} time(s) the model predicted 0. This is the case for {(1 - ones/len(self.__org_out))* 100}% of the data.\n") print(f"Then the value of {self.__case.get('name')} changed.") print("\n") print("These results were obtained after applying the model on the new data.") ones = sum(filter(lambda x: x==1, self.__new_out)) print(f"\t{ones} time(s) the model predicted 1. This is the case for {ones/len(self.__new_out) * 100}% of the data.") print(f"\t{len(self.__new_out) - ones} time(s) the model predicted 0. This is the case for {(1 - ones/len(self.__new_out)) * 100}% of the data.") elif self.__output_type == "categorical": results = {} for output in self.__org_out: results[output] = results.get(output, 0) + 1 for key, value in results.items(): print(f"\t{value} time(s) the model predicted {key}. This is the case for {value/len(self.__org_out)*100}% of the data.") print("\n") print(f"Then the value of {self.__case.get('name')} changed.") print("\n") print("These results were obtained after applying the model on the new data.") results = {} for output in self.__new_out: results[output] = results.get(output, 0) + 1 for key, value in results.items(): print(f"\t{value} time(s) the model predicted {key}. This is the case for {value/len(self.__org_out)*100}% of the data.") elif self.__output_type == "regression": print(f"\tMean of the predictions: {self.__org_out[0]}") print(f"\tMinimum of the predictions: {self.__org_out[1]}") print(f"\tMaximum of the predictions: {self.__org_out[2]}\n") print(f"Then the value of {self.__case.get('name')} changed.") print("\n") print("These results were obtained after applying the model on the new data.") print(f"\tMean of the predictions: {self.__new_out[0]}") print(f"\tMaximum of the predictions: {self.__new_out[1]}") print(f"\tMaximum of the predictions: {self.__new_out[2]}") def faced_discrimination(self) -> list: """ Use this method to get a list of datapoints, for which the prediction would be different if the case was different. """ if self.__output_type == "regression": print("You can not use this method on a regression problem.") return differnet = {} for i, output in enumerate(self.__org_out): if output != self.__new_out[i]: differnet[i] = self.__org_data[i] return differnet
43.775244
158
0.58799
1,836
13,439
4.014706
0.080065
0.060779
0.059693
0.026048
0.916294
0.908018
0.889974
0.887397
0.880478
0.873694
0
0.011737
0.296302
13,439
307
159
43.775244
0.767685
0.010566
0
0.888889
0
0.055556
0.286752
0.048357
0
0
0
0
0
0
null
null
0
0.013889
null
null
0.226852
0
0
0
null
0
0
0
1
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
1
0
0
0
0
0
0
0
0
8
79c87069a7de3a0031b84ece57ba9c912f146abd
2,351
py
Python
dynamic_json/json_wrappers.py
childsish/dynamic-json
3a37caba373a4da8c4eb40c5ac11c88e09875451
[ "MIT" ]
1
2021-02-08T16:41:55.000Z
2021-02-08T16:41:55.000Z
dynamic_json/json_wrappers.py
childsish/dynamic-json
3a37caba373a4da8c4eb40c5ac11c88e09875451
[ "MIT" ]
null
null
null
dynamic_json/json_wrappers.py
childsish/dynamic-json
3a37caba373a4da8c4eb40c5ac11c88e09875451
[ "MIT" ]
null
null
null
from collections.abc import Mapping, Sequence class JsonDict(dict): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) super().__setattr__('_root', self) def __getattr__(self, key): if key in self: return self[key] return super().__getattribute__(key) def __setattr__(self, key, value): self[key] = value def __getitem__(self, key): v = super().__getitem__(key) if isinstance(v, str): v = v.format(**super().__getattribute__('_root')) return v def __setitem__(self, key, value): if isinstance(value, Mapping) and not isinstance(value, JsonDict): value = JsonDict(value) value.set_as_root(super().__getattribute__('_root')) elif isinstance(value, Sequence) and not isinstance(value, (str, JsonList)): value = JsonList(value) value.set_as_root(super().__getattribute__('_root')) super().__setitem__(key, value) def set_as_root(self, root=None): if root is not None: super().__setattr__('_root', root) for k, v in self.items(): if hasattr(v, 'set_as_root'): v.set_as_root(super().__getattribute__('_root')) class JsonList(list): ROOT_NAME = 'root' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) super().__setattr__('_root', {JsonList.ROOT_NAME: self}) def __getitem__(self, key): v = super().__getitem__(key) if isinstance(v, str): v = v.format(**super().__getattribute__('_root')) return v def __setitem__(self, key, value): if isinstance(value, Mapping) and not isinstance(value, JsonDict): value = JsonDict(value) value.set_as_root(super().__getattribute__('_root')) elif isinstance(value, Sequence) and not isinstance(value, (str, JsonList)): value = JsonList(value) value.set_as_root(super().__getattribute__('_root')) super().__setitem__(key, value) def set_as_root(self, root=None): if root is not None: super().__setattr__('_root', root) for v in self: if hasattr(v, 'set_as_root'): v.set_as_root(super().__getattribute__('_root'))
34.072464
84
0.594641
271
2,351
4.634686
0.162362
0.039809
0.071656
0.066879
0.816879
0.816879
0.816879
0.816879
0.816879
0.816879
0
0
0.272225
2,351
68
85
34.573529
0.734074
0
0
0.740741
0
0
0.03658
0
0
0
0
0
0
1
0.185185
false
0
0.018519
0
0.333333
0
0
0
0
null
0
0
0
1
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
7
79c9c303a7d16e879d6f35f7bb708f6f2fdecba8
102,604
py
Python
usr/lib64/python2.6/site-packages/libsvn/client.py
devop-mmcgrath/openshift-svn-cartridge
6cfe801adcdb68186a8c420b420ff6c0ccaadbb5
[ "Apache-2.0" ]
2
2017-09-28T15:02:43.000Z
2018-02-09T05:52:33.000Z
usr/lib64/python2.6/site-packages/libsvn/client.py
devop-mmcgrath/openshift-svn-cartridge
6cfe801adcdb68186a8c420b420ff6c0ccaadbb5
[ "Apache-2.0" ]
null
null
null
usr/lib64/python2.6/site-packages/libsvn/client.py
devop-mmcgrath/openshift-svn-cartridge
6cfe801adcdb68186a8c420b420ff6c0ccaadbb5
[ "Apache-2.0" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. # This file is compatible with both classic and new-style classes. import _client import new new_instancemethod = new.instancemethod def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'PySwigObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static) or hasattr(self,name): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) import core import delta import wc import ra def svn_client_version(*args): """svn_client_version() -> svn_version_t""" return apply(_client.svn_client_version, args) def svn_client_get_simple_prompt_provider(*args): """ svn_client_get_simple_prompt_provider(svn_auth_provider_object_t provider, svn_auth_simple_prompt_func_t prompt_func, int retry_limit, apr_pool_t pool) """ return apply(_client.svn_client_get_simple_prompt_provider, args) def svn_client_get_username_prompt_provider(*args): """ svn_client_get_username_prompt_provider(svn_auth_provider_object_t provider, svn_auth_username_prompt_func_t prompt_func, int retry_limit, apr_pool_t pool) """ return apply(_client.svn_client_get_username_prompt_provider, args) def svn_client_get_simple_provider(*args): """svn_client_get_simple_provider(svn_auth_provider_object_t provider, apr_pool_t pool)""" return apply(_client.svn_client_get_simple_provider, args) def svn_client_get_username_provider(*args): """svn_client_get_username_provider(svn_auth_provider_object_t provider, apr_pool_t pool)""" return apply(_client.svn_client_get_username_provider, args) def svn_client_get_ssl_server_trust_file_provider(*args): """svn_client_get_ssl_server_trust_file_provider(svn_auth_provider_object_t provider, apr_pool_t pool)""" return apply(_client.svn_client_get_ssl_server_trust_file_provider, args) def svn_client_get_ssl_client_cert_file_provider(*args): """svn_client_get_ssl_client_cert_file_provider(svn_auth_provider_object_t provider, apr_pool_t pool)""" return apply(_client.svn_client_get_ssl_client_cert_file_provider, args) def svn_client_get_ssl_client_cert_pw_file_provider(*args): """svn_client_get_ssl_client_cert_pw_file_provider(svn_auth_provider_object_t provider, apr_pool_t pool)""" return apply(_client.svn_client_get_ssl_client_cert_pw_file_provider, args) def svn_client_get_ssl_server_trust_prompt_provider(*args): """ svn_client_get_ssl_server_trust_prompt_provider(svn_auth_provider_object_t provider, svn_auth_ssl_server_trust_prompt_func_t prompt_func, apr_pool_t pool) """ return apply(_client.svn_client_get_ssl_server_trust_prompt_provider, args) def svn_client_get_ssl_client_cert_prompt_provider(*args): """ svn_client_get_ssl_client_cert_prompt_provider(svn_auth_provider_object_t provider, svn_auth_ssl_client_cert_prompt_func_t prompt_func, int retry_limit, apr_pool_t pool) """ return apply(_client.svn_client_get_ssl_client_cert_prompt_provider, args) def svn_client_get_ssl_client_cert_pw_prompt_provider(*args): """ svn_client_get_ssl_client_cert_pw_prompt_provider(svn_auth_provider_object_t provider, svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func, int retry_limit, apr_pool_t pool) """ return apply(_client.svn_client_get_ssl_client_cert_pw_prompt_provider, args) def svn_client_proplist_item_dup(*args): """svn_client_proplist_item_dup( item, apr_pool_t pool)""" return apply(_client.svn_client_proplist_item_dup, args) class svn_client_commit_info_t: """Proxy of C svn_client_commit_info_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_commit_info_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_commit_info_t, name) __repr__ = _swig_repr __swig_setmethods__["revision"] = _client.svn_client_commit_info_t_revision_set __swig_getmethods__["revision"] = _client.svn_client_commit_info_t_revision_get __swig_setmethods__["date"] = _client.svn_client_commit_info_t_date_set __swig_getmethods__["date"] = _client.svn_client_commit_info_t_date_get __swig_setmethods__["author"] = _client.svn_client_commit_info_t_author_set __swig_getmethods__["author"] = _client.svn_client_commit_info_t_author_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_commit_info_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_client_commit_info_t""" this = apply(_client.new_svn_client_commit_info_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_client_commit_info_t __del__ = lambda self : None; svn_client_commit_info_t_swigregister = _client.svn_client_commit_info_t_swigregister svn_client_commit_info_t_swigregister(svn_client_commit_info_t) SVN_CLIENT_COMMIT_ITEM_ADD = _client.SVN_CLIENT_COMMIT_ITEM_ADD SVN_CLIENT_COMMIT_ITEM_DELETE = _client.SVN_CLIENT_COMMIT_ITEM_DELETE SVN_CLIENT_COMMIT_ITEM_TEXT_MODS = _client.SVN_CLIENT_COMMIT_ITEM_TEXT_MODS SVN_CLIENT_COMMIT_ITEM_PROP_MODS = _client.SVN_CLIENT_COMMIT_ITEM_PROP_MODS SVN_CLIENT_COMMIT_ITEM_IS_COPY = _client.SVN_CLIENT_COMMIT_ITEM_IS_COPY SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN = _client.SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN class svn_client_commit_item3_t: """Proxy of C svn_client_commit_item3_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_commit_item3_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_commit_item3_t, name) __repr__ = _swig_repr __swig_setmethods__["path"] = _client.svn_client_commit_item3_t_path_set __swig_getmethods__["path"] = _client.svn_client_commit_item3_t_path_get __swig_setmethods__["kind"] = _client.svn_client_commit_item3_t_kind_set __swig_getmethods__["kind"] = _client.svn_client_commit_item3_t_kind_get __swig_setmethods__["url"] = _client.svn_client_commit_item3_t_url_set __swig_getmethods__["url"] = _client.svn_client_commit_item3_t_url_get __swig_setmethods__["revision"] = _client.svn_client_commit_item3_t_revision_set __swig_getmethods__["revision"] = _client.svn_client_commit_item3_t_revision_get __swig_setmethods__["copyfrom_url"] = _client.svn_client_commit_item3_t_copyfrom_url_set __swig_getmethods__["copyfrom_url"] = _client.svn_client_commit_item3_t_copyfrom_url_get __swig_setmethods__["copyfrom_rev"] = _client.svn_client_commit_item3_t_copyfrom_rev_set __swig_getmethods__["copyfrom_rev"] = _client.svn_client_commit_item3_t_copyfrom_rev_get __swig_setmethods__["state_flags"] = _client.svn_client_commit_item3_t_state_flags_set __swig_getmethods__["state_flags"] = _client.svn_client_commit_item3_t_state_flags_get __swig_setmethods__["incoming_prop_changes"] = _client.svn_client_commit_item3_t_incoming_prop_changes_set __swig_getmethods__["incoming_prop_changes"] = _client.svn_client_commit_item3_t_incoming_prop_changes_get __swig_setmethods__["outgoing_prop_changes"] = _client.svn_client_commit_item3_t_outgoing_prop_changes_set __swig_getmethods__["outgoing_prop_changes"] = _client.svn_client_commit_item3_t_outgoing_prop_changes_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_commit_item3_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_client_commit_item3_t""" this = apply(_client.new_svn_client_commit_item3_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_client_commit_item3_t __del__ = lambda self : None; svn_client_commit_item3_t_swigregister = _client.svn_client_commit_item3_t_swigregister svn_client_commit_item3_t_swigregister(svn_client_commit_item3_t) class svn_client_commit_item2_t: """Proxy of C svn_client_commit_item2_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_commit_item2_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_commit_item2_t, name) __repr__ = _swig_repr __swig_setmethods__["path"] = _client.svn_client_commit_item2_t_path_set __swig_getmethods__["path"] = _client.svn_client_commit_item2_t_path_get __swig_setmethods__["kind"] = _client.svn_client_commit_item2_t_kind_set __swig_getmethods__["kind"] = _client.svn_client_commit_item2_t_kind_get __swig_setmethods__["url"] = _client.svn_client_commit_item2_t_url_set __swig_getmethods__["url"] = _client.svn_client_commit_item2_t_url_get __swig_setmethods__["revision"] = _client.svn_client_commit_item2_t_revision_set __swig_getmethods__["revision"] = _client.svn_client_commit_item2_t_revision_get __swig_setmethods__["copyfrom_url"] = _client.svn_client_commit_item2_t_copyfrom_url_set __swig_getmethods__["copyfrom_url"] = _client.svn_client_commit_item2_t_copyfrom_url_get __swig_setmethods__["copyfrom_rev"] = _client.svn_client_commit_item2_t_copyfrom_rev_set __swig_getmethods__["copyfrom_rev"] = _client.svn_client_commit_item2_t_copyfrom_rev_get __swig_setmethods__["state_flags"] = _client.svn_client_commit_item2_t_state_flags_set __swig_getmethods__["state_flags"] = _client.svn_client_commit_item2_t_state_flags_get __swig_setmethods__["wcprop_changes"] = _client.svn_client_commit_item2_t_wcprop_changes_set __swig_getmethods__["wcprop_changes"] = _client.svn_client_commit_item2_t_wcprop_changes_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_commit_item2_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_client_commit_item2_t""" this = apply(_client.new_svn_client_commit_item2_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_client_commit_item2_t __del__ = lambda self : None; svn_client_commit_item2_t_swigregister = _client.svn_client_commit_item2_t_swigregister svn_client_commit_item2_t_swigregister(svn_client_commit_item2_t) class svn_client_commit_item_t: """Proxy of C svn_client_commit_item_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_commit_item_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_commit_item_t, name) __repr__ = _swig_repr __swig_setmethods__["path"] = _client.svn_client_commit_item_t_path_set __swig_getmethods__["path"] = _client.svn_client_commit_item_t_path_get __swig_setmethods__["kind"] = _client.svn_client_commit_item_t_kind_set __swig_getmethods__["kind"] = _client.svn_client_commit_item_t_kind_get __swig_setmethods__["url"] = _client.svn_client_commit_item_t_url_set __swig_getmethods__["url"] = _client.svn_client_commit_item_t_url_get __swig_setmethods__["revision"] = _client.svn_client_commit_item_t_revision_set __swig_getmethods__["revision"] = _client.svn_client_commit_item_t_revision_get __swig_setmethods__["copyfrom_url"] = _client.svn_client_commit_item_t_copyfrom_url_set __swig_getmethods__["copyfrom_url"] = _client.svn_client_commit_item_t_copyfrom_url_get __swig_setmethods__["state_flags"] = _client.svn_client_commit_item_t_state_flags_set __swig_getmethods__["state_flags"] = _client.svn_client_commit_item_t_state_flags_get __swig_setmethods__["wcprop_changes"] = _client.svn_client_commit_item_t_wcprop_changes_set __swig_getmethods__["wcprop_changes"] = _client.svn_client_commit_item_t_wcprop_changes_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_commit_item_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_client_commit_item_t""" this = apply(_client.new_svn_client_commit_item_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_client_commit_item_t __del__ = lambda self : None; svn_client_commit_item_t_swigregister = _client.svn_client_commit_item_t_swigregister svn_client_commit_item_t_swigregister(svn_client_commit_item_t) def svn_client_commit_item3_create(*args): """svn_client_commit_item3_create(apr_pool_t pool) -> svn_client_commit_item3_t""" return apply(_client.svn_client_commit_item3_create, args) def svn_client_commit_item_create(*args): """svn_client_commit_item_create(svn_client_commit_item3_t item, apr_pool_t pool) -> svn_error_t""" return apply(_client.svn_client_commit_item_create, args) def svn_client_commit_item3_dup(*args): """svn_client_commit_item3_dup(svn_client_commit_item3_t item, apr_pool_t pool) -> svn_client_commit_item3_t""" return apply(_client.svn_client_commit_item3_dup, args) def svn_client_commit_item2_dup(*args): """svn_client_commit_item2_dup(svn_client_commit_item2_t item, apr_pool_t pool) -> svn_client_commit_item2_t""" return apply(_client.svn_client_commit_item2_dup, args) svn_client_diff_summarize_kind_normal = _client.svn_client_diff_summarize_kind_normal svn_client_diff_summarize_kind_added = _client.svn_client_diff_summarize_kind_added svn_client_diff_summarize_kind_modified = _client.svn_client_diff_summarize_kind_modified svn_client_diff_summarize_kind_deleted = _client.svn_client_diff_summarize_kind_deleted class svn_client_diff_summarize_t: """Proxy of C svn_client_diff_summarize_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_diff_summarize_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_diff_summarize_t, name) __repr__ = _swig_repr __swig_setmethods__["path"] = _client.svn_client_diff_summarize_t_path_set __swig_getmethods__["path"] = _client.svn_client_diff_summarize_t_path_get __swig_setmethods__["summarize_kind"] = _client.svn_client_diff_summarize_t_summarize_kind_set __swig_getmethods__["summarize_kind"] = _client.svn_client_diff_summarize_t_summarize_kind_get __swig_setmethods__["prop_changed"] = _client.svn_client_diff_summarize_t_prop_changed_set __swig_getmethods__["prop_changed"] = _client.svn_client_diff_summarize_t_prop_changed_get __swig_setmethods__["node_kind"] = _client.svn_client_diff_summarize_t_node_kind_set __swig_getmethods__["node_kind"] = _client.svn_client_diff_summarize_t_node_kind_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_diff_summarize_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_client_diff_summarize_t""" this = apply(_client.new_svn_client_diff_summarize_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_client_diff_summarize_t __del__ = lambda self : None; svn_client_diff_summarize_t_swigregister = _client.svn_client_diff_summarize_t_swigregister svn_client_diff_summarize_t_swigregister(svn_client_diff_summarize_t) def svn_client_diff_summarize_dup(*args): """svn_client_diff_summarize_dup(svn_client_diff_summarize_t diff, apr_pool_t pool) -> svn_client_diff_summarize_t""" return apply(_client.svn_client_diff_summarize_dup, args) class svn_client_ctx_t: """Proxy of C svn_client_ctx_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_ctx_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_ctx_t, name) __repr__ = _swig_repr __swig_setmethods__["auth_baton"] = _client.svn_client_ctx_t_auth_baton_set __swig_getmethods__["auth_baton"] = _client.svn_client_ctx_t_auth_baton_get __swig_setmethods__["notify_func"] = _client.svn_client_ctx_t_notify_func_set __swig_getmethods__["notify_func"] = _client.svn_client_ctx_t_notify_func_get __swig_setmethods__["notify_baton"] = _client.svn_client_ctx_t_notify_baton_set __swig_getmethods__["notify_baton"] = _client.svn_client_ctx_t_notify_baton_get __swig_setmethods__["log_msg_func"] = _client.svn_client_ctx_t_log_msg_func_set __swig_getmethods__["log_msg_func"] = _client.svn_client_ctx_t_log_msg_func_get __swig_setmethods__["log_msg_baton"] = _client.svn_client_ctx_t_log_msg_baton_set __swig_getmethods__["log_msg_baton"] = _client.svn_client_ctx_t_log_msg_baton_get __swig_setmethods__["config"] = _client.svn_client_ctx_t_config_set __swig_getmethods__["config"] = _client.svn_client_ctx_t_config_get __swig_setmethods__["cancel_func"] = _client.svn_client_ctx_t_cancel_func_set __swig_getmethods__["cancel_func"] = _client.svn_client_ctx_t_cancel_func_get __swig_setmethods__["cancel_baton"] = _client.svn_client_ctx_t_cancel_baton_set __swig_getmethods__["cancel_baton"] = _client.svn_client_ctx_t_cancel_baton_get __swig_setmethods__["notify_func2"] = _client.svn_client_ctx_t_notify_func2_set __swig_getmethods__["notify_func2"] = _client.svn_client_ctx_t_notify_func2_get __swig_setmethods__["notify_baton2"] = _client.svn_client_ctx_t_notify_baton2_set __swig_getmethods__["notify_baton2"] = _client.svn_client_ctx_t_notify_baton2_get __swig_setmethods__["log_msg_func2"] = _client.svn_client_ctx_t_log_msg_func2_set __swig_getmethods__["log_msg_func2"] = _client.svn_client_ctx_t_log_msg_func2_get __swig_setmethods__["log_msg_baton2"] = _client.svn_client_ctx_t_log_msg_baton2_set __swig_getmethods__["log_msg_baton2"] = _client.svn_client_ctx_t_log_msg_baton2_get __swig_setmethods__["progress_func"] = _client.svn_client_ctx_t_progress_func_set __swig_getmethods__["progress_func"] = _client.svn_client_ctx_t_progress_func_get __swig_setmethods__["progress_baton"] = _client.svn_client_ctx_t_progress_baton_set __swig_getmethods__["progress_baton"] = _client.svn_client_ctx_t_progress_baton_get __swig_setmethods__["log_msg_func3"] = _client.svn_client_ctx_t_log_msg_func3_set __swig_getmethods__["log_msg_func3"] = _client.svn_client_ctx_t_log_msg_func3_get __swig_setmethods__["log_msg_baton3"] = _client.svn_client_ctx_t_log_msg_baton3_set __swig_getmethods__["log_msg_baton3"] = _client.svn_client_ctx_t_log_msg_baton3_get __swig_setmethods__["mimetypes_map"] = _client.svn_client_ctx_t_mimetypes_map_set __swig_getmethods__["mimetypes_map"] = _client.svn_client_ctx_t_mimetypes_map_get __swig_setmethods__["conflict_func"] = _client.svn_client_ctx_t_conflict_func_set __swig_getmethods__["conflict_func"] = _client.svn_client_ctx_t_conflict_func_get __swig_setmethods__["conflict_baton"] = _client.svn_client_ctx_t_conflict_baton_set __swig_getmethods__["conflict_baton"] = _client.svn_client_ctx_t_conflict_baton_get __swig_setmethods__["client_name"] = _client.svn_client_ctx_t_client_name_set __swig_getmethods__["client_name"] = _client.svn_client_ctx_t_client_name_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_ctx_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_client_ctx_t""" this = apply(_client.new_svn_client_ctx_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_client_ctx_t __del__ = lambda self : None; svn_client_ctx_t_swigregister = _client.svn_client_ctx_t_swigregister svn_client_ctx_t_swigregister(svn_client_ctx_t) def svn_client_create_context(*args): """svn_client_create_context(svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t""" return apply(_client.svn_client_create_context, args) SVN_CLIENT_AUTH_USERNAME = _client.SVN_CLIENT_AUTH_USERNAME SVN_CLIENT_AUTH_PASSWORD = _client.SVN_CLIENT_AUTH_PASSWORD def svn_client_args_to_target_array(*args): """ svn_client_args_to_target_array(apr_array_header_t targets_p, apr_getopt_t os, apr_array_header_t known_targets, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_args_to_target_array, args) def svn_client_checkout3(*args): """ svn_client_checkout3(svn_revnum_t result_rev, char URL, char path, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_depth_t depth, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_checkout3, args) def svn_client_checkout2(*args): """ svn_client_checkout2(svn_revnum_t result_rev, char URL, char path, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t recurse, svn_boolean_t ignore_externals, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_checkout2, args) def svn_client_checkout(*args): """ svn_client_checkout(svn_revnum_t result_rev, char URL, char path, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_checkout, args) def svn_client_update3(*args): """ svn_client_update3(apr_array_header_t result_revs, apr_array_header_t paths, svn_opt_revision_t revision, svn_depth_t depth, svn_boolean_t depth_is_sticky, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_update3, args) def svn_client_update2(*args): """ svn_client_update2(apr_array_header_t result_revs, apr_array_header_t paths, svn_opt_revision_t revision, svn_boolean_t recurse, svn_boolean_t ignore_externals, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_update2, args) def svn_client_update(*args): """ svn_client_update(svn_revnum_t result_rev, char path, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_update, args) def svn_client_switch2(*args): """ svn_client_switch2(svn_revnum_t result_rev, char path, char url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_depth_t depth, svn_boolean_t depth_is_sticky, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_switch2, args) def svn_client_switch(*args): """ svn_client_switch(svn_revnum_t result_rev, char path, char url, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_switch, args) def svn_client_add4(*args): """ svn_client_add4(char path, svn_depth_t depth, svn_boolean_t force, svn_boolean_t no_ignore, svn_boolean_t add_parents, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_add4, args) def svn_client_add3(*args): """ svn_client_add3(char path, svn_boolean_t recursive, svn_boolean_t force, svn_boolean_t no_ignore, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_add3, args) def svn_client_add2(*args): """ svn_client_add2(char path, svn_boolean_t recursive, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_add2, args) def svn_client_add(*args): """ svn_client_add(char path, svn_boolean_t recursive, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_add, args) def svn_client_mkdir3(*args): """ svn_client_mkdir3(svn_commit_info_t commit_info_p, apr_array_header_t paths, svn_boolean_t make_parents, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_mkdir3, args) def svn_client_mkdir2(*args): """ svn_client_mkdir2(svn_commit_info_t commit_info_p, apr_array_header_t paths, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_mkdir2, args) def svn_client_mkdir(*args): """ svn_client_mkdir(svn_client_commit_info_t commit_info_p, apr_array_header_t paths, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_mkdir, args) def svn_client_delete3(*args): """ svn_client_delete3(svn_commit_info_t commit_info_p, apr_array_header_t paths, svn_boolean_t force, svn_boolean_t keep_local, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_delete3, args) def svn_client_delete2(*args): """ svn_client_delete2(svn_commit_info_t commit_info_p, apr_array_header_t paths, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_delete2, args) def svn_client_delete(*args): """ svn_client_delete(svn_client_commit_info_t commit_info_p, apr_array_header_t paths, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_delete, args) def svn_client_import3(*args): """ svn_client_import3(svn_commit_info_t commit_info_p, char path, char url, svn_depth_t depth, svn_boolean_t no_ignore, svn_boolean_t ignore_unknown_node_types, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_import3, args) def svn_client_import2(*args): """ svn_client_import2(svn_commit_info_t commit_info_p, char path, char url, svn_boolean_t nonrecursive, svn_boolean_t no_ignore, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_import2, args) def svn_client_import(*args): """ svn_client_import(svn_client_commit_info_t commit_info_p, char path, char url, svn_boolean_t nonrecursive, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_import, args) def svn_client_commit4(*args): """ svn_client_commit4(svn_commit_info_t commit_info_p, apr_array_header_t targets, svn_depth_t depth, svn_boolean_t keep_locks, svn_boolean_t keep_changelists, apr_array_header_t changelists, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_commit4, args) def svn_client_commit3(*args): """ svn_client_commit3(svn_commit_info_t commit_info_p, apr_array_header_t targets, svn_boolean_t recurse, svn_boolean_t keep_locks, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_commit3, args) def svn_client_commit2(*args): """ svn_client_commit2(svn_client_commit_info_t commit_info_p, apr_array_header_t targets, svn_boolean_t recurse, svn_boolean_t keep_locks, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_commit2, args) def svn_client_commit(*args): """ svn_client_commit(svn_client_commit_info_t commit_info_p, apr_array_header_t targets, svn_boolean_t nonrecursive, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_commit, args) def svn_client_status4(*args): """ svn_client_status4(svn_revnum_t result_rev, char path, svn_opt_revision_t revision, svn_wc_status_func3_t status_func, void status_baton, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t update, svn_boolean_t no_ignore, svn_boolean_t ignore_externals, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_status4, args) def svn_client_status3(*args): """ svn_client_status3(svn_revnum_t result_rev, char path, svn_opt_revision_t revision, svn_wc_status_func2_t status_func, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t update, svn_boolean_t no_ignore, svn_boolean_t ignore_externals, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_status3, args) def svn_client_status2(*args): """ svn_client_status2(svn_revnum_t result_rev, char path, svn_opt_revision_t revision, svn_wc_status_func2_t status_func, svn_boolean_t recurse, svn_boolean_t get_all, svn_boolean_t update, svn_boolean_t no_ignore, svn_boolean_t ignore_externals, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_status2, args) def svn_client_status(*args): """ svn_client_status(svn_revnum_t result_rev, char path, svn_opt_revision_t revision, svn_wc_status_func_t status_func, svn_boolean_t recurse, svn_boolean_t get_all, svn_boolean_t update, svn_boolean_t no_ignore, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_status, args) def svn_client_log5(*args): """ svn_client_log5(apr_array_header_t targets, svn_opt_revision_t peg_revision, apr_array_header_t revision_ranges, int limit, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history, svn_boolean_t include_merged_revisions, apr_array_header_t revprops, svn_log_entry_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_log5, args) def svn_client_log4(*args): """ svn_client_log4(apr_array_header_t targets, svn_opt_revision_t peg_revision, svn_opt_revision_t start, svn_opt_revision_t end, int limit, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history, svn_boolean_t include_merged_revisions, apr_array_header_t revprops, svn_log_entry_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_log4, args) def svn_client_log3(*args): """ svn_client_log3(apr_array_header_t targets, svn_opt_revision_t peg_revision, svn_opt_revision_t start, svn_opt_revision_t end, int limit, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history, svn_log_message_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_log3, args) def svn_client_log2(*args): """ svn_client_log2(apr_array_header_t targets, svn_opt_revision_t start, svn_opt_revision_t end, int limit, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history, svn_log_message_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_log2, args) def svn_client_log(*args): """ svn_client_log(apr_array_header_t targets, svn_opt_revision_t start, svn_opt_revision_t end, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history, svn_log_message_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_log, args) def svn_client_blame4(*args): """ svn_client_blame4(char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t start, svn_opt_revision_t end, svn_diff_file_options_t diff_options, svn_boolean_t ignore_mime_type, svn_boolean_t include_merged_revisions, svn_client_blame_receiver2_t receiver, void receiver_baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_blame4, args) def svn_client_blame3(*args): """ svn_client_blame3(char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t start, svn_opt_revision_t end, svn_diff_file_options_t diff_options, svn_boolean_t ignore_mime_type, svn_client_blame_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_blame3, args) def svn_client_blame2(*args): """ svn_client_blame2(char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t start, svn_opt_revision_t end, svn_client_blame_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_blame2, args) def svn_client_blame(*args): """ svn_client_blame(char path_or_url, svn_opt_revision_t start, svn_opt_revision_t end, svn_client_blame_receiver_t receiver, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_blame, args) def svn_client_diff4(*args): """ svn_client_diff4(apr_array_header_t diff_options, char path1, svn_opt_revision_t revision1, char path2, svn_opt_revision_t revision2, char relative_to_dir, svn_depth_t depth, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, svn_boolean_t ignore_content_type, char header_encoding, apr_file_t outfile, apr_file_t errfile, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff4, args) def svn_client_diff3(*args): """ svn_client_diff3(apr_array_header_t diff_options, char path1, svn_opt_revision_t revision1, char path2, svn_opt_revision_t revision2, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, svn_boolean_t ignore_content_type, char header_encoding, apr_file_t outfile, apr_file_t errfile, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff3, args) def svn_client_diff2(*args): """ svn_client_diff2(apr_array_header_t diff_options, char path1, svn_opt_revision_t revision1, char path2, svn_opt_revision_t revision2, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, svn_boolean_t ignore_content_type, apr_file_t outfile, apr_file_t errfile, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff2, args) def svn_client_diff(*args): """ svn_client_diff(apr_array_header_t diff_options, char path1, svn_opt_revision_t revision1, char path2, svn_opt_revision_t revision2, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, apr_file_t outfile, apr_file_t errfile, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff, args) def svn_client_diff_peg4(*args): """ svn_client_diff_peg4(apr_array_header_t diff_options, char path, svn_opt_revision_t peg_revision, svn_opt_revision_t start_revision, svn_opt_revision_t end_revision, char relative_to_dir, svn_depth_t depth, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, svn_boolean_t ignore_content_type, char header_encoding, apr_file_t outfile, apr_file_t errfile, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_peg4, args) def svn_client_diff_peg3(*args): """ svn_client_diff_peg3(apr_array_header_t diff_options, char path, svn_opt_revision_t peg_revision, svn_opt_revision_t start_revision, svn_opt_revision_t end_revision, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, svn_boolean_t ignore_content_type, char header_encoding, apr_file_t outfile, apr_file_t errfile, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_peg3, args) def svn_client_diff_peg2(*args): """ svn_client_diff_peg2(apr_array_header_t diff_options, char path, svn_opt_revision_t peg_revision, svn_opt_revision_t start_revision, svn_opt_revision_t end_revision, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, svn_boolean_t ignore_content_type, apr_file_t outfile, apr_file_t errfile, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_peg2, args) def svn_client_diff_peg(*args): """ svn_client_diff_peg(apr_array_header_t diff_options, char path, svn_opt_revision_t peg_revision, svn_opt_revision_t start_revision, svn_opt_revision_t end_revision, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t no_diff_deleted, apr_file_t outfile, apr_file_t errfile, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_peg, args) def svn_client_diff_summarize2(*args): """ svn_client_diff_summarize2(char path1, svn_opt_revision_t revision1, char path2, svn_opt_revision_t revision2, svn_depth_t depth, svn_boolean_t ignore_ancestry, apr_array_header_t changelists, svn_client_diff_summarize_func_t summarize_func, void summarize_baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_summarize2, args) def svn_client_diff_summarize(*args): """ svn_client_diff_summarize(char path1, svn_opt_revision_t revision1, char path2, svn_opt_revision_t revision2, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_client_diff_summarize_func_t summarize_func, void summarize_baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_summarize, args) def svn_client_diff_summarize_peg2(*args): """ svn_client_diff_summarize_peg2(char path, svn_opt_revision_t peg_revision, svn_opt_revision_t start_revision, svn_opt_revision_t end_revision, svn_depth_t depth, svn_boolean_t ignore_ancestry, apr_array_header_t changelists, svn_client_diff_summarize_func_t summarize_func, void summarize_baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_summarize_peg2, args) def svn_client_diff_summarize_peg(*args): """ svn_client_diff_summarize_peg(char path, svn_opt_revision_t peg_revision, svn_opt_revision_t start_revision, svn_opt_revision_t end_revision, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_client_diff_summarize_func_t summarize_func, void summarize_baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_diff_summarize_peg, args) def svn_client_merge3(*args): """ svn_client_merge3(char source1, svn_opt_revision_t revision1, char source2, svn_opt_revision_t revision2, char target_wcpath, svn_depth_t depth, svn_boolean_t ignore_ancestry, svn_boolean_t force, svn_boolean_t record_only, svn_boolean_t dry_run, apr_array_header_t merge_options, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_merge3, args) def svn_client_merge2(*args): """ svn_client_merge2(char source1, svn_opt_revision_t revision1, char source2, svn_opt_revision_t revision2, char target_wcpath, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t force, svn_boolean_t dry_run, apr_array_header_t merge_options, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_merge2, args) def svn_client_merge(*args): """ svn_client_merge(char source1, svn_opt_revision_t revision1, char source2, svn_opt_revision_t revision2, char target_wcpath, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t force, svn_boolean_t dry_run, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_merge, args) def svn_client_merge_reintegrate(*args): """ svn_client_merge_reintegrate(char source, svn_opt_revision_t peg_revision, char target_wcpath, svn_boolean_t dry_run, apr_array_header_t merge_options, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_merge_reintegrate, args) def svn_client_merge_peg3(*args): """ svn_client_merge_peg3(char source, apr_array_header_t ranges_to_merge, svn_opt_revision_t peg_revision, char target_wcpath, svn_depth_t depth, svn_boolean_t ignore_ancestry, svn_boolean_t force, svn_boolean_t record_only, svn_boolean_t dry_run, apr_array_header_t merge_options, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_merge_peg3, args) def svn_client_merge_peg2(*args): """ svn_client_merge_peg2(char source, svn_opt_revision_t revision1, svn_opt_revision_t revision2, svn_opt_revision_t peg_revision, char target_wcpath, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t force, svn_boolean_t dry_run, apr_array_header_t merge_options, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_merge_peg2, args) def svn_client_merge_peg(*args): """ svn_client_merge_peg(char source, svn_opt_revision_t revision1, svn_opt_revision_t revision2, svn_opt_revision_t peg_revision, char target_wcpath, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t force, svn_boolean_t dry_run, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_merge_peg, args) def svn_client_suggest_merge_sources(*args): """ svn_client_suggest_merge_sources(apr_array_header_t suggestions, char path_or_url, svn_opt_revision_t peg_revision, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_suggest_merge_sources, args) def svn_client_mergeinfo_get_merged(*args): """ svn_client_mergeinfo_get_merged(apr_hash_t mergeinfo, char path_or_url, svn_opt_revision_t peg_revision, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_mergeinfo_get_merged, args) def svn_client_mergeinfo_log_merged(*args): """ svn_client_mergeinfo_log_merged(char path_or_url, svn_opt_revision_t peg_revision, char merge_source_path_or_url, svn_opt_revision_t src_peg_revision, svn_log_entry_receiver_t receiver, svn_boolean_t discover_changed_paths, apr_array_header_t revprops, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_mergeinfo_log_merged, args) def svn_client_mergeinfo_log_eligible(*args): """ svn_client_mergeinfo_log_eligible(char path_or_url, svn_opt_revision_t peg_revision, char merge_source_path_or_url, svn_opt_revision_t src_peg_revision, svn_log_entry_receiver_t receiver, svn_boolean_t discover_changed_paths, apr_array_header_t revprops, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_mergeinfo_log_eligible, args) def svn_client_cleanup(*args): """svn_client_cleanup(char dir, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t""" return apply(_client.svn_client_cleanup, args) def svn_client_relocate(*args): """ svn_client_relocate(char dir, char from, char to, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_relocate, args) def svn_client_revert2(*args): """ svn_client_revert2(apr_array_header_t paths, svn_depth_t depth, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_revert2, args) def svn_client_revert(*args): """ svn_client_revert(apr_array_header_t paths, svn_boolean_t recursive, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_revert, args) def svn_client_resolved(*args): """ svn_client_resolved(char path, svn_boolean_t recursive, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_resolved, args) def svn_client_resolve(*args): """ svn_client_resolve(char path, svn_depth_t depth, svn_wc_conflict_choice_t conflict_choice, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_resolve, args) class svn_client_copy_source_t: """Proxy of C svn_client_copy_source_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_copy_source_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_copy_source_t, name) __repr__ = _swig_repr __swig_setmethods__["path"] = _client.svn_client_copy_source_t_path_set __swig_getmethods__["path"] = _client.svn_client_copy_source_t_path_get __swig_setmethods__["revision"] = _client.svn_client_copy_source_t_revision_set __swig_getmethods__["revision"] = _client.svn_client_copy_source_t_revision_get __swig_setmethods__["peg_revision"] = _client.svn_client_copy_source_t_peg_revision_set __swig_getmethods__["peg_revision"] = _client.svn_client_copy_source_t_peg_revision_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_copy_source_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_client_copy_source_t""" this = apply(_client.new_svn_client_copy_source_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_client_copy_source_t __del__ = lambda self : None; svn_client_copy_source_t_swigregister = _client.svn_client_copy_source_t_swigregister svn_client_copy_source_t_swigregister(svn_client_copy_source_t) def svn_client_copy5(*args): """ svn_client_copy5(svn_commit_info_t commit_info_p, apr_array_header_t sources, char dst_path, svn_boolean_t copy_as_child, svn_boolean_t make_parents, svn_boolean_t ignore_externals, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_copy5, args) def svn_client_copy4(*args): """ svn_client_copy4(svn_commit_info_t commit_info_p, apr_array_header_t sources, char dst_path, svn_boolean_t copy_as_child, svn_boolean_t make_parents, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_copy4, args) def svn_client_copy3(*args): """ svn_client_copy3(svn_commit_info_t commit_info_p, char src_path, svn_opt_revision_t src_revision, char dst_path, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_copy3, args) def svn_client_copy2(*args): """ svn_client_copy2(svn_commit_info_t commit_info_p, char src_path, svn_opt_revision_t src_revision, char dst_path, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_copy2, args) def svn_client_copy(*args): """ svn_client_copy(svn_client_commit_info_t commit_info_p, char src_path, svn_opt_revision_t src_revision, char dst_path, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_copy, args) def svn_client_move5(*args): """ svn_client_move5(svn_commit_info_t commit_info_p, apr_array_header_t src_paths, char dst_path, svn_boolean_t force, svn_boolean_t move_as_child, svn_boolean_t make_parents, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_move5, args) def svn_client_move4(*args): """ svn_client_move4(svn_commit_info_t commit_info_p, char src_path, char dst_path, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_move4, args) def svn_client_move3(*args): """ svn_client_move3(svn_commit_info_t commit_info_p, char src_path, char dst_path, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_move3, args) def svn_client_move2(*args): """ svn_client_move2(svn_client_commit_info_t commit_info_p, char src_path, char dst_path, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_move2, args) def svn_client_move(*args): """ svn_client_move(svn_client_commit_info_t commit_info_p, char src_path, svn_opt_revision_t src_revision, char dst_path, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_move, args) def svn_client_propset3(*args): """ svn_client_propset3(svn_commit_info_t commit_info_p, char propname, svn_string_t propval, char target, svn_depth_t depth, svn_boolean_t skip_checks, svn_revnum_t base_revision_for_url, apr_array_header_t changelists, apr_hash_t revprop_table, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_propset3, args) def svn_client_propset2(*args): """ svn_client_propset2(char propname, svn_string_t propval, char target, svn_boolean_t recurse, svn_boolean_t skip_checks, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_propset2, args) def svn_client_propset(*args): """ svn_client_propset(char propname, svn_string_t propval, char target, svn_boolean_t recurse, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_propset, args) def svn_client_revprop_set2(*args): """ svn_client_revprop_set2(char propname, svn_string_t propval, svn_string_t original_propval, char URL, svn_opt_revision_t revision, svn_revnum_t set_rev, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_revprop_set2, args) def svn_client_revprop_set(*args): """ svn_client_revprop_set(char propname, svn_string_t propval, char URL, svn_opt_revision_t revision, svn_revnum_t set_rev, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_revprop_set, args) def svn_client_propget3(*args): """ svn_client_propget3(apr_hash_t props, char propname, char target, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_revnum_t actual_revnum, svn_depth_t depth, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_propget3, args) def svn_client_propget2(*args): """ svn_client_propget2(apr_hash_t props, char propname, char target, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_propget2, args) def svn_client_propget(*args): """ svn_client_propget(apr_hash_t props, char propname, char target, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_propget, args) def svn_client_revprop_get(*args): """ svn_client_revprop_get(char propname, svn_string_t propval, char URL, svn_opt_revision_t revision, svn_revnum_t set_rev, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_revprop_get, args) def svn_client_proplist3(*args): """ svn_client_proplist3(char target, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_depth_t depth, apr_array_header_t changelists, svn_proplist_receiver_t receiver, void receiver_baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_proplist3, args) def svn_client_proplist2(*args): """ svn_client_proplist2(apr_array_header_t props, char target, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_proplist2, args) def svn_client_proplist(*args): """ svn_client_proplist(apr_array_header_t props, char target, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_proplist, args) def svn_client_revprop_list(*args): """ svn_client_revprop_list(apr_hash_t props, char URL, svn_opt_revision_t revision, svn_revnum_t set_rev, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_revprop_list, args) def svn_client_export4(*args): """ svn_client_export4(svn_revnum_t result_rev, char from, char to, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t overwrite, svn_boolean_t ignore_externals, svn_depth_t depth, char native_eol, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_export4, args) def svn_client_export3(*args): """ svn_client_export3(svn_revnum_t result_rev, char from, char to, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t overwrite, svn_boolean_t ignore_externals, svn_boolean_t recurse, char native_eol, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_export3, args) def svn_client_export2(*args): """ svn_client_export2(svn_revnum_t result_rev, char from, char to, svn_opt_revision_t revision, svn_boolean_t force, char native_eol, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_export2, args) def svn_client_export(*args): """ svn_client_export(svn_revnum_t result_rev, char from, char to, svn_opt_revision_t revision, svn_boolean_t force, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_export, args) def svn_client_list2(*args): """ svn_client_list2(char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_depth_t depth, apr_uint32_t dirent_fields, svn_boolean_t fetch_locks, svn_client_list_func_t list_func, void baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_list2, args) def svn_client_list(*args): """ svn_client_list(char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t recurse, apr_uint32_t dirent_fields, svn_boolean_t fetch_locks, svn_client_list_func_t list_func, void baton, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_list, args) def svn_client_ls3(*args): """ svn_client_ls3(apr_hash_t dirents, apr_hash_t locks, char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_ls3, args) def svn_client_ls2(*args): """ svn_client_ls2(apr_hash_t dirents, char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_ls2, args) def svn_client_ls(*args): """ svn_client_ls(apr_hash_t dirents, char path_or_url, svn_opt_revision_t revision, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_ls, args) def svn_client_cat2(*args): """ svn_client_cat2(svn_stream_t out, char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_cat2, args) def svn_client_cat(*args): """ svn_client_cat(svn_stream_t out, char path_or_url, svn_opt_revision_t revision, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_cat, args) def svn_client_add_to_changelist(*args): """ svn_client_add_to_changelist(apr_array_header_t paths, char changelist, svn_depth_t depth, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_add_to_changelist, args) def svn_client_remove_from_changelists(*args): """ svn_client_remove_from_changelists(apr_array_header_t paths, svn_depth_t depth, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_remove_from_changelists, args) def svn_client_get_changelists(*args): """ svn_client_get_changelists(char path, apr_array_header_t changelists, svn_depth_t depth, svn_changelist_receiver_t callback_func, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_get_changelists, args) def svn_client_lock(*args): """ svn_client_lock(apr_array_header_t targets, char comment, svn_boolean_t steal_lock, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_lock, args) def svn_client_unlock(*args): """ svn_client_unlock(apr_array_header_t targets, svn_boolean_t break_lock, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_unlock, args) class svn_info_t: """Proxy of C svn_info_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_info_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_info_t, name) __repr__ = _swig_repr __swig_setmethods__["URL"] = _client.svn_info_t_URL_set __swig_getmethods__["URL"] = _client.svn_info_t_URL_get __swig_setmethods__["rev"] = _client.svn_info_t_rev_set __swig_getmethods__["rev"] = _client.svn_info_t_rev_get __swig_setmethods__["kind"] = _client.svn_info_t_kind_set __swig_getmethods__["kind"] = _client.svn_info_t_kind_get __swig_setmethods__["repos_root_URL"] = _client.svn_info_t_repos_root_URL_set __swig_getmethods__["repos_root_URL"] = _client.svn_info_t_repos_root_URL_get __swig_setmethods__["repos_UUID"] = _client.svn_info_t_repos_UUID_set __swig_getmethods__["repos_UUID"] = _client.svn_info_t_repos_UUID_get __swig_setmethods__["last_changed_rev"] = _client.svn_info_t_last_changed_rev_set __swig_getmethods__["last_changed_rev"] = _client.svn_info_t_last_changed_rev_get __swig_setmethods__["last_changed_date"] = _client.svn_info_t_last_changed_date_set __swig_getmethods__["last_changed_date"] = _client.svn_info_t_last_changed_date_get __swig_setmethods__["last_changed_author"] = _client.svn_info_t_last_changed_author_set __swig_getmethods__["last_changed_author"] = _client.svn_info_t_last_changed_author_get __swig_setmethods__["lock"] = _client.svn_info_t_lock_set __swig_getmethods__["lock"] = _client.svn_info_t_lock_get __swig_setmethods__["has_wc_info"] = _client.svn_info_t_has_wc_info_set __swig_getmethods__["has_wc_info"] = _client.svn_info_t_has_wc_info_get __swig_setmethods__["schedule"] = _client.svn_info_t_schedule_set __swig_getmethods__["schedule"] = _client.svn_info_t_schedule_get __swig_setmethods__["copyfrom_url"] = _client.svn_info_t_copyfrom_url_set __swig_getmethods__["copyfrom_url"] = _client.svn_info_t_copyfrom_url_get __swig_setmethods__["copyfrom_rev"] = _client.svn_info_t_copyfrom_rev_set __swig_getmethods__["copyfrom_rev"] = _client.svn_info_t_copyfrom_rev_get __swig_setmethods__["text_time"] = _client.svn_info_t_text_time_set __swig_getmethods__["text_time"] = _client.svn_info_t_text_time_get __swig_setmethods__["prop_time"] = _client.svn_info_t_prop_time_set __swig_getmethods__["prop_time"] = _client.svn_info_t_prop_time_get __swig_setmethods__["checksum"] = _client.svn_info_t_checksum_set __swig_getmethods__["checksum"] = _client.svn_info_t_checksum_get __swig_setmethods__["conflict_old"] = _client.svn_info_t_conflict_old_set __swig_getmethods__["conflict_old"] = _client.svn_info_t_conflict_old_get __swig_setmethods__["conflict_new"] = _client.svn_info_t_conflict_new_set __swig_getmethods__["conflict_new"] = _client.svn_info_t_conflict_new_get __swig_setmethods__["conflict_wrk"] = _client.svn_info_t_conflict_wrk_set __swig_getmethods__["conflict_wrk"] = _client.svn_info_t_conflict_wrk_get __swig_setmethods__["prejfile"] = _client.svn_info_t_prejfile_set __swig_getmethods__["prejfile"] = _client.svn_info_t_prejfile_get __swig_setmethods__["changelist"] = _client.svn_info_t_changelist_set __swig_getmethods__["changelist"] = _client.svn_info_t_changelist_get __swig_setmethods__["depth"] = _client.svn_info_t_depth_set __swig_getmethods__["depth"] = _client.svn_info_t_depth_get __swig_setmethods__["working_size"] = _client.svn_info_t_working_size_set __swig_getmethods__["working_size"] = _client.svn_info_t_working_size_get __swig_setmethods__["size"] = _client.svn_info_t_size_set __swig_getmethods__["size"] = _client.svn_info_t_size_get __swig_setmethods__["size64"] = _client.svn_info_t_size64_set __swig_getmethods__["size64"] = _client.svn_info_t_size64_get __swig_setmethods__["working_size64"] = _client.svn_info_t_working_size64_set __swig_getmethods__["working_size64"] = _client.svn_info_t_working_size64_get __swig_setmethods__["tree_conflict"] = _client.svn_info_t_tree_conflict_set __swig_getmethods__["tree_conflict"] = _client.svn_info_t_tree_conflict_get def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_info_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __init__(self, *args): """__init__(self) -> svn_info_t""" this = apply(_client.new_svn_info_t, args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _client.delete_svn_info_t __del__ = lambda self : None; svn_info_t_swigregister = _client.svn_info_t_swigregister svn_info_t_swigregister(svn_info_t) def svn_info_dup(*args): """svn_info_dup(svn_info_t info, apr_pool_t pool) -> svn_info_t""" return apply(_client.svn_info_dup, args) def svn_client_info2(*args): """ svn_client_info2(char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_info_receiver_t receiver, svn_depth_t depth, apr_array_header_t changelists, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_info2, args) def svn_client_info(*args): """ svn_client_info(char path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t revision, svn_info_receiver_t receiver, svn_boolean_t recurse, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_info, args) def svn_client_url_from_path(*args): """svn_client_url_from_path(char url, char path_or_url, apr_pool_t pool) -> svn_error_t""" return apply(_client.svn_client_url_from_path, args) def svn_client_root_url_from_path(*args): """svn_client_root_url_from_path(char url, char path_or_url, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t""" return apply(_client.svn_client_root_url_from_path, args) def svn_client_uuid_from_url(*args): """svn_client_uuid_from_url(char uuid, char url, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t""" return apply(_client.svn_client_uuid_from_url, args) def svn_client_uuid_from_path(*args): """ svn_client_uuid_from_path(char uuid, char path, svn_wc_adm_access_t adm_access, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_uuid_from_path, args) def svn_client_open_ra_session(*args): """ svn_client_open_ra_session(svn_ra_session_t session, char url, svn_client_ctx_t ctx, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_open_ra_session, args) def svn_proplist_invoke_receiver(*args): """ svn_proplist_invoke_receiver(svn_proplist_receiver_t _obj, void baton, char path, apr_hash_t prop_hash, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_proplist_invoke_receiver, args) def svn_client_invoke_get_commit_log3(*args): """ svn_client_invoke_get_commit_log3(svn_client_get_commit_log3_t _obj, char log_msg, char tmp_file, apr_array_header_t commit_items, void baton, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_invoke_get_commit_log3, args) def svn_client_invoke_get_commit_log2(*args): """ svn_client_invoke_get_commit_log2(svn_client_get_commit_log2_t _obj, char log_msg, char tmp_file, apr_array_header_t commit_items, void baton, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_invoke_get_commit_log2, args) def svn_client_invoke_get_commit_log(*args): """ svn_client_invoke_get_commit_log(svn_client_get_commit_log_t _obj, char log_msg, char tmp_file, apr_array_header_t commit_items, void baton, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_invoke_get_commit_log, args) def svn_client_invoke_blame_receiver2(*args): """ svn_client_invoke_blame_receiver2(svn_client_blame_receiver2_t _obj, void baton, apr_int64_t line_no, svn_revnum_t revision, char author, char date, svn_revnum_t merged_revision, char merged_author, char merged_date, char merged_path, char line, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_invoke_blame_receiver2, args) def svn_client_invoke_blame_receiver(*args): """ svn_client_invoke_blame_receiver(svn_client_blame_receiver_t _obj, void baton, apr_int64_t line_no, svn_revnum_t revision, char author, char date, char line, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_invoke_blame_receiver, args) def svn_client_invoke_diff_summarize_func(*args): """ svn_client_invoke_diff_summarize_func(svn_client_diff_summarize_func_t _obj, svn_client_diff_summarize_t diff, void baton, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_invoke_diff_summarize_func, args) def svn_client_invoke_list_func(*args): """ svn_client_invoke_list_func(svn_client_list_func_t _obj, void baton, char path, svn_dirent_t dirent, svn_lock_t lock, char abs_path, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_client_invoke_list_func, args) def svn_changelist_invoke_receiver(*args): """ svn_changelist_invoke_receiver(svn_changelist_receiver_t _obj, void baton, char path, char changelist, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_changelist_invoke_receiver, args) def svn_info_invoke_receiver(*args): """ svn_info_invoke_receiver(svn_info_receiver_t _obj, void baton, char path, svn_info_t info, apr_pool_t pool) -> svn_error_t """ return apply(_client.svn_info_invoke_receiver, args) class svn_proplist_receiver_t: """Proxy of C svn_proplist_receiver_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_proplist_receiver_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_proplist_receiver_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_proplist_receiver_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_proplist_invoke_receiver(self, *args) svn_proplist_receiver_t_swigregister = _client.svn_proplist_receiver_t_swigregister svn_proplist_receiver_t_swigregister(svn_proplist_receiver_t) class svn_client_get_commit_log3_t: """Proxy of C svn_client_get_commit_log3_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_get_commit_log3_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_get_commit_log3_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_get_commit_log3_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_client_invoke_get_commit_log3(self, *args) svn_client_get_commit_log3_t_swigregister = _client.svn_client_get_commit_log3_t_swigregister svn_client_get_commit_log3_t_swigregister(svn_client_get_commit_log3_t) class svn_client_get_commit_log2_t: """Proxy of C svn_client_get_commit_log2_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_get_commit_log2_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_get_commit_log2_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_get_commit_log2_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_client_invoke_get_commit_log2(self, *args) svn_client_get_commit_log2_t_swigregister = _client.svn_client_get_commit_log2_t_swigregister svn_client_get_commit_log2_t_swigregister(svn_client_get_commit_log2_t) class svn_client_get_commit_log_t: """Proxy of C svn_client_get_commit_log_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_get_commit_log_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_get_commit_log_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_get_commit_log_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_client_invoke_get_commit_log(self, *args) svn_client_get_commit_log_t_swigregister = _client.svn_client_get_commit_log_t_swigregister svn_client_get_commit_log_t_swigregister(svn_client_get_commit_log_t) class svn_client_blame_receiver2_t: """Proxy of C svn_client_blame_receiver2_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_blame_receiver2_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_blame_receiver2_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_blame_receiver2_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_client_invoke_blame_receiver2(self, *args) svn_client_blame_receiver2_t_swigregister = _client.svn_client_blame_receiver2_t_swigregister svn_client_blame_receiver2_t_swigregister(svn_client_blame_receiver2_t) class svn_client_blame_receiver_t: """Proxy of C svn_client_blame_receiver_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_blame_receiver_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_blame_receiver_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_blame_receiver_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_client_invoke_blame_receiver(self, *args) svn_client_blame_receiver_t_swigregister = _client.svn_client_blame_receiver_t_swigregister svn_client_blame_receiver_t_swigregister(svn_client_blame_receiver_t) class svn_client_diff_summarize_func_t: """Proxy of C svn_client_diff_summarize_func_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_diff_summarize_func_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_diff_summarize_func_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_diff_summarize_func_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_client_invoke_diff_summarize_func(self, *args) svn_client_diff_summarize_func_t_swigregister = _client.svn_client_diff_summarize_func_t_swigregister svn_client_diff_summarize_func_t_swigregister(svn_client_diff_summarize_func_t) class svn_client_list_func_t: """Proxy of C svn_client_list_func_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_client_list_func_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_client_list_func_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_client_list_func_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_client_invoke_list_func(self, *args) svn_client_list_func_t_swigregister = _client.svn_client_list_func_t_swigregister svn_client_list_func_t_swigregister(svn_client_list_func_t) class svn_changelist_receiver_t: """Proxy of C svn_changelist_receiver_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_changelist_receiver_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_changelist_receiver_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_changelist_receiver_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_changelist_invoke_receiver(self, *args) svn_changelist_receiver_t_swigregister = _client.svn_changelist_receiver_t_swigregister svn_changelist_receiver_t_swigregister(svn_changelist_receiver_t) class svn_info_receiver_t: """Proxy of C svn_info_receiver_t struct""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, svn_info_receiver_t, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, svn_info_receiver_t, name) def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def set_parent_pool(self, parent_pool=None): """Create a new proxy object for svn_info_receiver_t""" import libsvn.core, weakref self.__dict__["_parent_pool"] = \ parent_pool or libsvn.core.application_pool; if self.__dict__["_parent_pool"]: self.__dict__["_is_valid"] = weakref.ref( self.__dict__["_parent_pool"]._is_valid) def assert_valid(self): """Assert that this object is using valid pool memory""" if "_is_valid" in self.__dict__: assert self.__dict__["_is_valid"](), "Variable has already been deleted" def __getattr__(self, name): """Get an attribute from this object""" self.assert_valid() value = _swig_getattr(self, self.__class__, name) members = self.__dict__.get("_members") if members is not None: old_value = members.get(name) if (old_value is not None and value is not None and value is not old_value): try: value.__dict__.update(old_value.__dict__) except AttributeError: pass if hasattr(value, "assert_valid"): value.assert_valid() return value def __setattr__(self, name, value): """Set an attribute on this object""" self.assert_valid() self.__dict__.setdefault("_members",{})[name] = value return _swig_setattr(self, self.__class__, name, value) def __call__(self, *args): return svn_info_invoke_receiver(self, *args) svn_info_receiver_t_swigregister = _client.svn_info_receiver_t_swigregister svn_info_receiver_t_swigregister(svn_info_receiver_t) SWIG_SVN_INFO_SIZE_UNKNOWN = _client.SWIG_SVN_INFO_SIZE_UNKNOWN svn_swig_py_cancel_func = _client.svn_swig_py_cancel_func svn_swig_py_get_commit_log_func = _client.svn_swig_py_get_commit_log_func svn_swig_py_notify_func = _client.svn_swig_py_notify_func
39.600154
146
0.738431
14,850
102,604
4.452121
0.027407
0.115709
0.061938
0.032444
0.894667
0.848595
0.798878
0.771425
0.739405
0.70867
0
0.004779
0.180237
102,604
2,590
147
39.615444
0.781253
0.002017
0
0.508885
1
0
0.065873
0.001331
0
0
0
0
0.087237
0
null
null
0.015347
0.024233
null
null
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
1
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
5c1a77127e714bbe04a40a8a0efe5d0cd884c2f5
113
py
Python
backend/config.py
mattj241/Trivia_API
9e7ab06997df7a3be4daffc3385116178bc78c86
[ "MIT" ]
null
null
null
backend/config.py
mattj241/Trivia_API
9e7ab06997df7a3be4daffc3385116178bc78c86
[ "MIT" ]
null
null
null
backend/config.py
mattj241/Trivia_API
9e7ab06997df7a3be4daffc3385116178bc78c86
[ "MIT" ]
null
null
null
import os def init_env_vars(): os.environ['DB_USER'] = 'postgres' os.environ['DB_PASSWORD'] = 'marshall'
22.6
42
0.672566
16
113
4.5
0.75
0.25
0.305556
0
0
0
0
0
0
0
0
0
0.159292
113
5
42
22.6
0.757895
0
0
0
0
0
0.298246
0
0
0
0
0
0
1
0.25
true
0.25
0.25
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
1
1
1
0
0
0
0
0
7
a51b80710fc2a236f6a7065d6603b2abcdd9093f
8,744
py
Python
tests/integration/transformers/test_numerical.py
HDI-Project/RDT
f1648d10346f4e431957aca65e25a00879a5d419
[ "MIT" ]
8
2018-06-20T22:59:07.000Z
2019-02-19T08:48:53.000Z
tests/integration/transformers/test_numerical.py
HDI-Project/RDT
f1648d10346f4e431957aca65e25a00879a5d419
[ "MIT" ]
63
2018-06-20T22:08:37.000Z
2019-12-16T18:57:08.000Z
tests/integration/transformers/test_numerical.py
HDI-Project/RDT
f1648d10346f4e431957aca65e25a00879a5d419
[ "MIT" ]
5
2018-11-06T16:45:48.000Z
2020-01-02T13:41:07.000Z
import numpy as np import pandas as pd from rdt.transformers.numerical import ClusterBasedNormalizer, FloatFormatter, GaussianNormalizer class TestFloatFormatter: def test_model_missing_values(self): data = pd.DataFrame([1, 2, 1, 2, np.nan, 1], columns=['a']) column = 'a' nt = FloatFormatter( missing_value_replacement='mean', model_missing_values=True, ) nt.fit(data, column) transformed = nt.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (6, 2) assert list(transformed.iloc[:, 1]) == [0, 0, 0, 0, 1, 0] reverse = nt.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=2) def test_not_model_missing_values(self): data = pd.DataFrame([1, 2, 1, 2, np.nan, 1], columns=['a']) column = 'a' nt = FloatFormatter(model_missing_values=False) nt.fit(data, column) transformed = nt.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (6, 1) reverse = nt.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=2) def test_int(self): data = pd.DataFrame([1, 2, 1, 2, 1], columns=['a']) column = 'a' nt = FloatFormatter() nt.fit(data, column) transformed = nt.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (5, 1) reverse = nt.reverse_transform(transformed) assert list(reverse['a']) == [1, 2, 1, 2, 1] def test_int_nan_not_model_missing_values(self): data = pd.DataFrame([1, 2, 1, 2, 1, np.nan], columns=['a']) column = 'a' nt = FloatFormatter() nt.fit(data, column) transformed = nt.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (6, 1) reverse = nt.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=2) class TestGaussianNormalizer: def test_stats(self): data = pd.DataFrame(np.random.normal(loc=4, scale=4, size=1000), columns=['a']) column = 'a' ct = GaussianNormalizer() ct.fit(data, column) transformed = ct.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (1000, 1) np.testing.assert_almost_equal(transformed['a.value'].mean(), 0, decimal=1) np.testing.assert_almost_equal(transformed['a.value'].std(), 1, decimal=1) reverse = ct.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=1) def test_model_missing_values(self): data = pd.DataFrame([1, 2, 1, 2, np.nan, 1], columns=['a']) column = 'a' ct = GaussianNormalizer(model_missing_values=True) ct.fit(data, column) transformed = ct.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (6, 2) assert list(transformed.iloc[:, 1]) == [0, 0, 0, 0, 1, 0] reverse = ct.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=2) def test_not_model_missing_values(self): random_state = np.random.get_state() np.random.set_state(np.random.RandomState(6).get_state()) data = pd.DataFrame([1, 2, 1, 2, np.nan, 1], columns=['a']) column = 'a' ct = GaussianNormalizer(model_missing_values=False) ct.fit(data, column) transformed = ct.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (6, 1) reverse = ct.reverse_transform(transformed) expected = pd.DataFrame([1, 2, 1, np.nan, np.nan, 1], columns=['a']) pd.testing.assert_frame_equal(reverse, expected) np.random.set_state(random_state) def test_int(self): data = pd.DataFrame([1, 2, 1, 2, 1], columns=['a']) column = 'a' ct = GaussianNormalizer() ct.fit(data, column) transformed = ct.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (5, 1) reverse = ct.reverse_transform(transformed) assert list(reverse['a']) == [1, 2, 1, 2, 1] def test_int_nan(self): data = pd.DataFrame([1, 2, 1, 2, 1, np.nan], columns=['a']) column = 'a' ct = GaussianNormalizer(model_missing_values=True) ct.fit(data, column) transformed = ct.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (6, 2) reverse = ct.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=2) class TestClusterBasedNormalizer: def generate_data(self): data1 = np.random.normal(loc=5, scale=1, size=100) data2 = np.random.normal(loc=-5, scale=1, size=100) data = np.concatenate([data1, data2]) return pd.DataFrame(data, columns=['col']) def test_dataframe(self): data = self.generate_data() column = 'col' bgmm_transformer = ClusterBasedNormalizer() bgmm_transformer.fit(data, column) transformed = bgmm_transformer.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (200, 2) assert all(isinstance(x, float) for x in transformed['col.normalized']) assert all(isinstance(x, float) for x in transformed['col.component']) reverse = bgmm_transformer.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=1) def test_some_nulls(self): random_state = np.random.get_state() np.random.set_state(np.random.RandomState(10).get_state()) data = self.generate_data() mask = np.random.choice([1, 0], data.shape, p=[.1, .9]).astype(bool) data[mask] = np.nan column = 'col' bgmm_transformer = ClusterBasedNormalizer(model_missing_values=True) bgmm_transformer.fit(data, column) transformed = bgmm_transformer.transform(data) assert isinstance(transformed, pd.DataFrame) assert transformed.shape == (200, 3) assert all(isinstance(x, float) for x in transformed['col.normalized']) assert all(isinstance(x, float) for x in transformed['col.component']) assert all(isinstance(x, float) for x in transformed['col.is_null']) reverse = bgmm_transformer.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=1) np.random.set_state(random_state) def test_data_different_sizes(self): data = np.concatenate([ np.random.normal(loc=5, scale=1, size=100), np.random.normal(loc=100, scale=1, size=500), ]) data = pd.DataFrame(data, columns=['col']) column = 'col' bgmm_transformer = ClusterBasedNormalizer() bgmm_transformer.fit(data, column) transformed = bgmm_transformer.transform(data) assert isinstance(transformed, pd.DataFrame) assert all(isinstance(x, float) for x in transformed['col.normalized']) assert all(isinstance(x, float) for x in transformed['col.component']) reverse = bgmm_transformer.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=1) def test_multiple_components(self): random_state = np.random.get_state() np.random.set_state(np.random.RandomState(10).get_state()) data = np.concatenate([ np.random.normal(loc=5, scale=0.02, size=300), np.random.normal(loc=-4, scale=0.1, size=1000), np.random.normal(loc=-180, scale=3, size=1500), np.random.normal(loc=100, scale=10, size=500), ]) data = pd.DataFrame(data, columns=['col']) data = data.sample(frac=1).reset_index(drop=True) column = 'col' bgmm_transformer = ClusterBasedNormalizer() bgmm_transformer.fit(data, column) transformed = bgmm_transformer.transform(data) assert isinstance(transformed, pd.DataFrame) assert all(isinstance(x, float) for x in transformed['col.normalized']) assert all(isinstance(x, float) for x in transformed['col.component']) reverse = bgmm_transformer.reverse_transform(transformed) np.testing.assert_array_almost_equal(reverse, data, decimal=1) np.random.set_state(random_state)
35.689796
97
0.641926
1,078
8,744
5.081633
0.106679
0.052209
0.00931
0.056955
0.865462
0.846477
0.822746
0.822746
0.803395
0.760679
0
0.027346
0.234675
8,744
244
98
35.836066
0.791243
0
0
0.752809
0
0
0.020471
0
0
0
0
0
0.280899
1
0.078652
false
0
0.016854
0
0.117978
0
0
0
0
null
0
0
0
1
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
7
eb9e8e28fc8b178cb17120bdf7f8c033665aa472
5,454
py
Python
Python 3 Programming/course 3/course_3_project.py
ElizaLo/Practice-Python
81cc82b4fbe68c13647f18ea659c7ef1025ec951
[ "MIT" ]
5
2020-07-20T10:57:28.000Z
2021-12-09T01:54:59.000Z
Python 3 Programming/course 3/course_3_project.py
ElizaLo/Practice
81cc82b4fbe68c13647f18ea659c7ef1025ec951
[ "MIT" ]
1
2020-10-02T15:26:57.000Z
2020-10-02T15:26:57.000Z
Python 3 Programming/course 3/course_3_project.py
ElizaLo/Practice
81cc82b4fbe68c13647f18ea659c7ef1025ec951
[ "MIT" ]
5
2020-06-06T14:16:01.000Z
2021-01-27T17:38:32.000Z
import requests_with_caching import json def get_movies_from_tastedive(title): url = 'https://tastedive.com/api/similar' param = {} param['q']= title param['type']= 'movies' param['limit']= 5 this_page_cache = requests_with_caching.get(url, params=param) return json.loads(this_page_cache.text) # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages get_movies_from_tastedive("Bridesmaids") get_movies_from_tastedive("Black Panther") import requests_with_caching import json def get_movies_from_tastedive(title): url = 'https://tastedive.com/api/similar' param = {} param['q']= title param['type']= 'movies' param['limit']= 5 this_page_cache = requests_with_caching.get(url, params=param) return json.loads(this_page_cache.text) def extract_movie_titles(d): return [i['Name'] for i in d['Similar']['Results']] # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages #extract_movie_titles(get_movies_from_tastedive("Tony Bennett")) #extract_movie_titles(get_movies_from_tastedive("Black Panther")) import requests_with_caching import json def get_movies_from_tastedive(title): url = 'https://tastedive.com/api/similar' param = {} param['q']= title param['type']= 'movies' param['limit']= 5 this_page_cache = requests_with_caching.get(url, params=param) return json.loads(this_page_cache.text) def extract_movie_titles(d): return [i['Name'] for i in d['Similar']['Results']] def get_related_titles(lst): l = [] for title in lst: movies = get_movies_from_tastedive(title) titles = extract_movie_titles(movies) l1 = [l.append(movie) for movie in titles if movie not in l] return l # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages #extract_movie_titles(get_movies_from_tastedive("Tony Bennett")) #extract_movie_titles(get_movies_from_tastedive("Black Panther")) # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages #get_related_titles(["Black Panther", "Captain Marvel"]) # get_related_titles([]) import requests_with_caching import json def get_movie_data(movie_title): url = 'http://www.omdbapi.com/' param = {'t': movie_title, 'r': 'json'} this_page_cache = requests_with_caching.get(url, params=param) return json.loads(this_page_cache.text) # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages # get_movie_data("Venom") # get_movie_data("Baby Mama") import requests_with_caching import json def get_movie_data(movie_title): url = 'http://www.omdbapi.com/' param = {'t': movie_title, 'r': 'json'} this_page_cache = requests_with_caching.get(url, params=param) #print(json.loads(this_page_cache.text)) return json.loads(this_page_cache.text) def get_movie_rating(d): movie_ratings = d['Ratings'] for rate in movie_ratings: if rate['Source'] == 'Rotten Tomatoes': print(rate['Value']) return int(rate['Value'][:-1]) return 0 # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages #get_movie_data("Black Panther") #get_movie_data("Baby Mama") #get_movie_data('Deadpool 2') # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages # get_movie_rating(get_movie_data("Deadpool 2")) import requests_with_caching import json def get_movies_from_tastedive(title): url = 'https://tastedive.com/api/similar' param = {} param['q']= title param['type']= 'movies' param['limit']= 5 this_page_cache = requests_with_caching.get(url, params=param) return json.loads(this_page_cache.text) def extract_movie_titles(d): return [i['Name'] for i in d['Similar']['Results']] def get_related_titles(lst): l = [] for title in lst: movies = get_movies_from_tastedive(title) titles = extract_movie_titles(movies) l1 = [l.append(movie) for movie in titles if movie not in l] return l def get_movie_data(movie_title): url = 'http://www.omdbapi.com/' param = {'t': movie_title, 'r': 'json'} this_page_cache = requests_with_caching.get(url, params=param) #print(json.loads(this_page_cache.text)) return json.loads(this_page_cache.text) def get_movie_rating(d): movie_ratings = d['Ratings'] for rate in movie_ratings: if rate['Source'] == 'Rotten Tomatoes': print(rate['Value']) return int(rate['Value'][:-1]) return 0 def get_sorted_recommendations(lst_movie_titles): new_lst = get_related_titles(lst_movie_titles) new_d = {} for title in new_lst: data = get_movie_data(title) rate = get_movie_rating(data) new_d[title] = rate #print(new_d) return [i[0] for i in sorted(new_d.items(), key=lambda item: (item[1], item[0]), reverse=True)] # some invocations that we use in the automated tests; uncomment these if you are getting errors and want better error messages # get_sorted_recommendations(["Bridesmaids", "Sherlock Holmes"])
30.640449
127
0.715438
801
5,454
4.654182
0.128589
0.034335
0.055794
0.070815
0.898605
0.876609
0.876609
0.876609
0.876609
0.876609
0
0.003337
0.175834
5,454
177
128
30.813559
0.826029
0.307481
0
0.902913
0
0
0.116533
0
0
0
0
0
0
1
0.145631
false
0
0.116505
0.029126
0.427184
0.019417
0
0
0
null
0
0
0
1
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
7
eba4c6f7c4f94f626457879b7e1885eea47df875
6,209
py
Python
eparhiapp/models.py
varkon/eparhiaodua
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
2
2018-04-24T10:41:11.000Z
2018-04-24T10:41:15.000Z
eparhiapp/models.py
varkon/eparhia
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
null
null
null
eparhiapp/models.py
varkon/eparhia
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.utils import timezone from tinymce.models import HTMLField from filebrowser.fields import FileBrowseField from eparhiapp.apps import transliterate # Create your models here. class Patriarch(models.Model): title = models.CharField(max_length=255, verbose_name='Заголовок') annonce = HTMLField(verbose_name='Анонс (не обовьязково - зараз не використовується)', null = True, blank = True) body = HTMLField(verbose_name='Повний текст') link = models.CharField(max_length=255, verbose_name='Посилання', unique=True, blank=True, default="patriarch") author = models.ForeignKey('auth.User', on_delete=models.CASCADE) created_date = models.DateTimeField( default=timezone.now) published_date = models.DateTimeField( blank=True, null=True) class Meta: verbose_name = 'Патриарх' verbose_name_plural = 'Патриарх' # this is not needed for create link def save(self, *args, **kwargs): self.createlink() super(Patriarch, self).save(*args, **kwargs) def publish(self): self.published_date = timezone.now() if (self.link == ""): self.link = transliterate(self.title) self.save() def createlink(self): if (self.link == ""): self.link = transliterate(self.title) def __str__(self): return self.title class Archbishop(models.Model): title = models.CharField(max_length=255, verbose_name='Заголовок') annonce = HTMLField(verbose_name='Анонс (не обовьязково - зараз не використовується)', null = True, blank = True) body = HTMLField(verbose_name='Повний текст') link = models.CharField(max_length=255, verbose_name='Посилання', unique=True, blank=True, default = "archbishop") author = models.ForeignKey('auth.User', on_delete=models.CASCADE) created_date = models.DateTimeField( default=timezone.now) published_date = models.DateTimeField( blank=True, null=True) class Meta: verbose_name = 'Єпископ' verbose_name_plural = 'Єпископи' # this is not needed for create link def save(self, *args, **kwargs): self.createlink() super(Archbishop, self).save(*args, **kwargs) def publish(self): self.published_date = timezone.now() if (self.link == ""): self.link = transliterate(self.title) self.save() def createlink(self): if (self.link == ""): self.link = transliterate(self.title) def __str__(self): return self.title class Primat(models.Model): title = models.CharField(max_length=255, verbose_name='Заголовок') annonce = HTMLField(verbose_name='Анонс (не обовьязково - зараз не використовується)', null = True, blank = True) body = HTMLField(verbose_name='Повний текст') link = models.CharField(max_length=255, verbose_name='Посилання', unique=True, blank=True, default = "primat") author = models.ForeignKey('auth.User', on_delete=models.CASCADE) created_date = models.DateTimeField( default=timezone.now) published_date = models.DateTimeField( blank=True, null=True) class Meta: verbose_name = 'Предстоятель' verbose_name_plural = 'Предстоятелі' # this is not needed for create link def save(self, *args, **kwargs): self.createlink() super(Primat, self).save(*args, **kwargs) def publish(self): self.published_date = timezone.now() if (self.link == ""): self.link = transliterate(self.title) self.save() def createlink(self): if (self.link == ""): self.link = transliterate(self.title) def __str__(self): return self.title class About(models.Model): title = models.CharField(max_length=255, verbose_name='Заголовок') annonce = HTMLField(verbose_name='Анонс (не обовьязково - зараз не використовується)', null = True, blank = True) body = HTMLField(verbose_name='Повний текст') link = models.CharField(max_length=255, verbose_name='Посилання', unique=True, blank=True, default="about") author = models.ForeignKey('auth.User', on_delete=models.CASCADE) created_date = models.DateTimeField( default=timezone.now) published_date = models.DateTimeField( blank=True, null=True) class Meta: verbose_name = 'Контакт' verbose_name_plural = 'Контакти' # this is not needed for create link def save(self, *args, **kwargs): self.createlink() super(About, self).save(*args, **kwargs) def publish(self): self.published_date = timezone.now() if (self.link == ""): self.link = transliterate(self.title) self.save() def createlink(self): if (self.link == ""): self.link = transliterate(self.title) def __str__(self): return self.title class Benefactor(models.Model): title = models.CharField(max_length=255, verbose_name='Заголовок') annonce = HTMLField(verbose_name='Анонс (не обовьязково - зараз не використовується)', null=True, blank=True) body = HTMLField(verbose_name='Повний текст') link = models.CharField(max_length=255, verbose_name='Посилання', unique=True, blank=True, default="benefactors") author = models.ForeignKey('auth.User', on_delete=models.CASCADE) created_date = models.DateTimeField( default=timezone.now) published_date = models.DateTimeField( blank=True, null=True) class Meta: verbose_name = 'Благодійник' verbose_name_plural = 'Благодійники' # this is not needed for create link def save(self, *args, **kwargs): self.createlink() super(Benefactor, self).save(*args, **kwargs) def publish(self): self.published_date = timezone.now() if (self.link == ""): self.link = transliterate(self.title) self.save() def createlink(self): if (self.link == ""): self.link = transliterate(self.title) def __str__(self): return self.title
35.890173
121
0.647769
709
6,209
5.552891
0.125529
0.08382
0.04572
0.06096
0.876302
0.876302
0.876302
0.876302
0.876302
0.876302
0
0.00631
0.234337
6,209
173
122
35.890173
0.821834
0.03205
0
0.777778
0
0
0.096436
0
0
0
0
0
0
1
0.148148
false
0
0.037037
0.037037
0.555556
0
0
0
0
null
0
0
0
1
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
1
0
0
8
ebda3c319179615be181d793f3d044d74518c9f0
1,200
py
Python
appCore/apps/replica/uploads.py
jadedgamer/alifewellplayed.com
b7b3dee8d3b9526c7cfe77078570a29394ef7e76
[ "MIT" ]
4
2017-04-22T11:03:01.000Z
2018-01-16T22:28:15.000Z
appCore/apps/replica/uploads.py
alifewellplayed/alifewellplayed.com
b7b3dee8d3b9526c7cfe77078570a29394ef7e76
[ "MIT" ]
10
2017-04-06T19:54:42.000Z
2017-11-07T06:53:10.000Z
appCore/apps/replica/uploads.py
alifewellplayed/alifewellplayed.com
b7b3dee8d3b9526c7cfe77078570a29394ef7e76
[ "MIT" ]
1
2017-12-14T12:49:40.000Z
2017-12-14T12:49:40.000Z
import datetime def upload_css(instance, filename): ext = filename.split('.')[-1] filename = "%s.%s" % (instance.slug, ext) path = 'css/%s/%s' % (instance.id, filename) return path def upload_media(instance, filename): ext = filename.split('.')[-1] filename = "%s.%s" % (instance.slug, ext) date = instance.date_created datepath_path = datetime.date.today().strftime("%Y/%m/%d") path = 'media/%s/%s/%s' % (datepath_path, instance.id, filename) #overwrite_existing(path) return path def upload_media_md(instance, filename): ext = filename.split('.')[-1] filename = "%s_md.%s" % (instance.slug, ext) date = instance.date_created datepath_path = datetime.date.today().strftime("%Y/%m/%d") path = 'media/%s/%s/%s' % (datepath_path, instance.id, filename) #overwrite_existing(path) return path def upload_media_sm(instance, filename): ext = filename.split('.')[-1] filename = "%s_sm.%s" % (instance.slug, ext) date = instance.date_created datepath_path = datetime.date.today().strftime("%Y/%m/%d") path = 'media/%s/%s/%s' % (datepath_path, instance.id, filename) #overwrite_existing(path) return path
34.285714
68
0.644167
159
1,200
4.735849
0.176101
0.023904
0.10093
0.143426
0.918991
0.887118
0.887118
0.887118
0.775564
0.775564
0
0.00404
0.175
1,200
34
69
35.294118
0.756566
0.06
0
0.703704
0
0
0.093333
0
0
0
0
0
0
1
0.148148
false
0
0.037037
0
0.333333
0
0
0
0
null
0
0
0
1
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
7
ccfaf51f2e72691e9b679a536ac64db983269d8c
12,175
py
Python
An Empirical Comparison of Supervised Learning Algorithms/utils.py
syeehyn/Machine-Learning-in-Practice
97ce9f767fa1d291a03b3b39899965382b5e88cf
[ "MIT" ]
1
2019-08-07T02:34:22.000Z
2019-08-07T02:34:22.000Z
An Empirical Comparison of Supervised Learning Algorithms/utils.py
syeehyn/Machine-Learning-in-Practice
97ce9f767fa1d291a03b3b39899965382b5e88cf
[ "MIT" ]
null
null
null
An Empirical Comparison of Supervised Learning Algorithms/utils.py
syeehyn/Machine-Learning-in-Practice
97ce9f767fa1d291a03b3b39899965382b5e88cf
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV import matplotlib.pyplot as plt import warnings warnings.filterwarnings('ignore') import seaborn as sns from sklearn.metrics import accuracy_score from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn import preprocessing def classifier_compare(X, y, clf_1, clf_2, clf_3, split_size): def draw_heatmap_linear(acc, acc_desc, C_list, parameter): plt.figure(figsize = (2,4)) ax = sns.heatmap(acc, annot=True, fmt='.3f', yticklabels = C_list, xticklabels=[]) ax.collections[0].colorbar.set_label("accuracy") ax.set(ylabel=parameter) plt.title(acc_desc + ' w.r.t '+ parameter) sns.set_style("whitegrid", {'axes.grid' : False}) plt.show() _df = pd.DataFrame(index = [type(clf_1[0]).__name__, type(clf_2[0]).__name__, type(clf_3[0]).__name__]) partitions = [str(int(i * 100)) + '/' + str(int(100 - i * 100)) for i in split_size] clf_1_final = {i : {} for i in partitions} clf_2_final = {i : {} for i in partitions} clf_3_final = {i : {} for i in partitions} for i in split_size: key = str(int(i * 100)) + '/' + str(int(100 - i * 100)) clf_1_result = {'train': [], 'validation': [], 'test' : [],'best_params': []} clf_2_result = {'train': [], 'validation': [], 'test' : [],'best_params': []} clf_3_result = {'train': [], 'validation': [], 'test' : [],'best_params': []} training_acc_clf_1, validation_acc_clf_1, testing_acc_clf_1 = [], [], [] training_acc_clf_2, validation_acc_clf_2, testing_acc_clf_2 = [], [], [] training_acc_clf_3, validation_acc_clf_3, testing_acc_clf_3 = [], [], [] best_param_1, best_param_2, best_param_3= [], [], [] for rs in range(3): # split data X_train, X_test, Y_train, Y_test = train_test_split(X, y, test_size = i, random_state = rs) # cv on the data clf = GridSearchCV(clf_1[0], clf_1[1], return_train_score= True, cv = 5, n_jobs= -1) clf.fit(X_train, Y_train) train_scores = clf.cv_results_['mean_train_score'] val_scores = clf.cv_results_['mean_test_score'] # append trainnig validation and testing accuarcy training_acc_clf_1.append(train_scores[clf.best_index_]) validation_acc_clf_1.append(val_scores[clf.best_index_]) best_param_1.append(clf.best_params_) Y_pred = clf.predict(X_test) testing_acc_clf_1.append(accuracy_score(Y_test, Y_pred)) # draw heatmap draw_heatmap_linear(train_scores.reshape(-1,1), \ type(clf_1[0]).__name__ + "train accuracy", \ list(clf_1[1].values())[0],\ list(clf_1[1].keys())[0]) draw_heatmap_linear(val_scores.reshape(-1,1), \ type(clf_1[0]).__name__ + "val accuracy",\ list(clf_1[1].values())[0],\ list(clf_1[1].keys())[0]) clf = GridSearchCV(clf_2[0], clf_2[1], return_train_score= True, cv = 5, n_jobs= -1) clf.fit(X_train, Y_train) train_scores = clf.cv_results_['mean_train_score'] val_scores = clf.cv_results_['mean_test_score'] # append trainnig validation and testing accuarcy training_acc_clf_2.append(train_scores[clf.best_index_]) validation_acc_clf_2.append(val_scores[clf.best_index_]) best_param_2.append(clf.best_params_) Y_pred = clf.predict(X_test) testing_acc_clf_2.append(accuracy_score(Y_test, Y_pred)) # draw heatmap draw_heatmap_linear(train_scores.reshape(-1,1), \ type(clf_2[0]).__name__ + "train accuracy", \ list(clf_2[1].values())[0], \ list(clf_2[1].keys())[0]) draw_heatmap_linear(val_scores.reshape(-1,1), \ type(clf_2[0]).__name__ + "val accuracy", \ list(clf_2[1].values())[0], \ list(clf_2[1].keys())[0]) # decision tree part # cv on the data clf = GridSearchCV(clf_3[0], clf_3[1], return_train_score= True, cv = 5, n_jobs= -1) clf.fit(X_train, Y_train) train_scores = clf.cv_results_['mean_train_score'] val_scores = clf.cv_results_['mean_test_score'] # append trainnig validation and testing accuarcy training_acc_clf_3.append(train_scores[clf.best_index_]) validation_acc_clf_3.append(val_scores[clf.best_index_]) best_param_3.append(clf.best_params_) Y_pred = clf.predict(X_test) testing_acc_clf_3.append(accuracy_score(Y_test, Y_pred)) # draw heatmap draw_heatmap_linear(train_scores.reshape(-1,1), \ type(clf_3[0]).__name__ + "train accuracy", \ list(clf_3[1].values())[0], \ list(clf_3[1].keys())[0]) draw_heatmap_linear(val_scores.reshape(-1,1), \ type(clf_3[0]).__name__ + "val accuracy", \ list(clf_3[1].values())[0], \ list(clf_3[1].keys())[0]) clf_1_result['train'] = training_acc_clf_1 clf_1_result['validation'] = validation_acc_clf_1 clf_1_result['test'] = testing_acc_clf_1 clf_1_result['best_params'] = best_param_1 clf_2_result['train'] = training_acc_clf_2 clf_2_result['validation'] = validation_acc_clf_2 clf_2_result['test'] = testing_acc_clf_2 clf_2_result['best_params'] = best_param_2 clf_3_result['train'] = training_acc_clf_3 clf_3_result['validation'] = validation_acc_clf_3 clf_3_result['test'] = testing_acc_clf_3 clf_3_result['best_params'] = best_param_3 clf_1_final[key] = clf_1_result clf_2_final[key] = clf_2_result clf_3_final[key] = clf_3_result return {type(clf_1[0]).__name__: clf_1_final, type(clf_2[0]).__name__: clf_2_final, type(clf_3[0]).__name__: clf_3_final} def generate_results(output): df = pd.Series(output).apply(lambda x: pd.DataFrame(x).T) out = df.iloc[0].append(df.iloc[1]).append(df.iloc[2]) new_ind = pd.Series([i for i in out.index]) + pd.Series([ ' RF', ' RF', ' RF', ' LOGREG ', ' LOGREG ', ' LOGREG ', ' BST-DT ', ' BST-DT ', ' BST-DT ' ]) out.index = new_ind out['best_params'] = out['best_params']\ .apply(lambda x: {list(x[0].keys())[0] : pd.Series([list(i.values())[0] for i in x]).unique().tolist()}) out['mean_train_acc'] = out['train'].apply(lambda x: round(np.mean(x),4)) out['mean_validation_acc'] = out['validation'].apply(lambda x: round(np.mean(x),4)) out['mean_test_acc'] = out['test'].apply(lambda x: round(np.mean(x),4)) out['train_acc_var'] = out['train'].apply(lambda x: round(np.std(x)**2,4)) out['test_acc_var'] = out['test'].apply(lambda x: round(np.std(x)**2,4)) out = out[['mean_train_acc','mean_validation_acc', 'mean_test_acc',\ 'train_acc_var', 'test_acc_var', 'best_params']] return out def classifier_compare_var(X, y, clf_1, clf_2, clf_3, split_size): _df = pd.DataFrame(index = [type(clf_1[0]).__name__, type(clf_2[0]).__name__, type(clf_3[0]).__name__]) partitions = [str(int(i * 100)) + '/' + str(int(100 - i * 100)) for i in split_size] clf_1_final = {i : {} for i in partitions} clf_2_final = {i : {} for i in partitions} clf_3_final = {i : {} for i in partitions} for i in split_size: key = str(int(i * 100)) + '/' + str(int(100 - i * 100)) clf_1_result = {'train': [], 'validation': [], 'test' : [],'best_params': []} clf_2_result = {'train': [], 'validation': [], 'test' : [],'best_params': []} clf_3_result = {'train': [], 'validation': [], 'test' : [],'best_params': []} training_acc_clf_1, validation_acc_clf_1, testing_acc_clf_1 = [], [], [] training_acc_clf_2, validation_acc_clf_2, testing_acc_clf_2 = [], [], [] training_acc_clf_3, validation_acc_clf_3, testing_acc_clf_3 = [], [], [] best_param_1, best_param_2, best_param_3= [], [], [] for rs in range(3): # split data X_train, X_test, Y_train, Y_test = train_test_split(X, y, test_size = i, random_state = rs) # cv on the data clf = GridSearchCV(clf_1[0], clf_1[1], return_train_score= True, cv = 5, n_jobs= -1) clf.fit(X_train, Y_train) train_scores = clf.cv_results_['mean_train_score'] val_scores = clf.cv_results_['mean_test_score'] # append trainnig validation and testing accuarcy training_acc_clf_1.append(train_scores[clf.best_index_]) validation_acc_clf_1.append(val_scores[clf.best_index_]) best_param_1.append(clf.best_params_) Y_pred = clf.predict(X_test) testing_acc_clf_1.append(accuracy_score(Y_test, Y_pred)) clf = GridSearchCV(clf_2[0], clf_2[1], return_train_score= True, cv = 5, n_jobs= -1) clf.fit(X_train, Y_train) train_scores = clf.cv_results_['mean_train_score'] val_scores = clf.cv_results_['mean_test_score'] # append trainnig validation and testing accuarcy training_acc_clf_2.append(train_scores[clf.best_index_]) validation_acc_clf_2.append(val_scores[clf.best_index_]) best_param_2.append(clf.best_params_) Y_pred = clf.predict(X_test) testing_acc_clf_2.append(accuracy_score(Y_test, Y_pred)) # decision tree part # cv on the data clf = GridSearchCV(clf_3[0], clf_3[1], return_train_score= True, cv = 5, n_jobs= -1) clf.fit(X_train, Y_train) train_scores = clf.cv_results_['mean_train_score'] val_scores = clf.cv_results_['mean_test_score'] # append trainnig validation and testing accuarcy training_acc_clf_3.append(train_scores[clf.best_index_]) validation_acc_clf_3.append(val_scores[clf.best_index_]) best_param_3.append(clf.best_params_) Y_pred = clf.predict(X_test) testing_acc_clf_3.append(accuracy_score(Y_test, Y_pred)) clf_1_result['train'] = training_acc_clf_1 clf_1_result['validation'] = validation_acc_clf_1 clf_1_result['test'] = testing_acc_clf_1 clf_1_result['best_params'] = best_param_1 clf_2_result['train'] = training_acc_clf_2 clf_2_result['validation'] = validation_acc_clf_2 clf_2_result['test'] = testing_acc_clf_2 clf_2_result['best_params'] = best_param_2 clf_3_result['train'] = training_acc_clf_3 clf_3_result['validation'] = validation_acc_clf_3 clf_3_result['test'] = testing_acc_clf_3 clf_3_result['best_params'] = best_param_3 clf_1_final[key] = clf_1_result clf_2_final[key] = clf_2_result clf_3_final[key] = clf_3_result return {type(clf_1[0]).__name__: clf_1_final, type(clf_2[0]).__name__: clf_2_final, type(clf_3[0]).__name__: clf_3_final}
50.729167
108
0.589815
1,672
12,175
3.881579
0.086124
0.049923
0.038829
0.033282
0.82265
0.813097
0.809399
0.804777
0.804777
0.794915
0
0.03519
0.28345
12,175
240
109
50.729167
0.708735
0.036632
0
0.744898
0
0
0.079406
0
0
0
0
0
0
1
0.020408
false
0
0.071429
0
0.107143
0
0
0
0
null
0
0
0
1
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
7
69296eef6fbfd45d3870738b8f837c229c8917ba
71
py
Python
py/lukai/test_lukai.py
d4l3k/lukai
d9bce91a98367cb4daa8d99421885aa2816499ad
[ "MIT" ]
23
2017-09-11T21:04:47.000Z
2022-03-22T14:36:19.000Z
py/lukai/test_lukai.py
d4l3k/lukai
d9bce91a98367cb4daa8d99421885aa2816499ad
[ "MIT" ]
10
2019-12-16T20:59:48.000Z
2022-02-09T23:44:30.000Z
py/lukai/test_lukai.py
d4l3k/lukai
d9bce91a98367cb4daa8d99421885aa2816499ad
[ "MIT" ]
4
2018-05-31T20:29:22.000Z
2019-03-15T02:45:14.000Z
import lukai from lukai import tfjs, saver def test_lukai(): pass
11.833333
29
0.732394
11
71
4.636364
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.211268
71
5
30
14.2
0.910714
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
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
1
1
1
1
0
1
0
0
7
694ce35005ca2c17552ba55642f5fd40323a6b69
81,163
py
Python
GenerateComparisonPresentation.py
atranel/resqdb
76b8a5089732ae63c867b734c5053908687122bc
[ "MIT" ]
null
null
null
GenerateComparisonPresentation.py
atranel/resqdb
76b8a5089732ae63c867b734c5053908687122bc
[ "MIT" ]
null
null
null
GenerateComparisonPresentation.py
atranel/resqdb
76b8a5089732ae63c867b734c5053908687122bc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ File name: GenerateComparisonPresentation.py Package: resq Written by: Marie Jankujova - jankujova.marie@fnusa.cz on 11-2018 Version: v1.0 Version comment: The first version of script which generate comaparison into presentation in PPTX format. Description: This script is used to generate comparison charts into presentation. """ import pandas as pd import sys import os import sqlite3 from datetime import datetime, date import math import pytz import xlsxwriter import csv from pptx import Presentation from pptx.chart.data import CategoryChartData, ChartData from pptx.enum.shapes import MSO_SHAPE from pptx.enum.chart import XL_CHART_TYPE, XL_TICK_MARK, XL_TICK_LABEL_POSITION, XL_LEGEND_POSITION, XL_LABEL_POSITION from pptx.enum.text import MSO_AUTO_SIZE from pptx.util import Cm, Pt, Inches from pptx.dml.color import RGBColor from pptx.enum.dml import MSO_LINE from pptx.oxml.xmlchemy import OxmlElement class GeneratePeriodCompPresentation: """ The class generating comparison graphs for nationally samples between two periods of times. :param ndf1: the dataframe containing calculated statistics for the first period :type ndf1: pandas dataframe :param ndf2: the dataframe containing calculated statistics for the second period :type ndf2: pandas dataframe :param name1: the name of the 1st period, eg. 2017 :type name1: str :param name2: the name of the 2nd period, eg. 2017 :type name2: str """ def __init__(self, ndf1, ndf2, name1, name2): self.ndf1 = ndf1 self.ndf2 = ndf2 self.name1 = name1 self.name2 = name2 # Get absolute path to the database. script_dir = os.path.dirname(__file__) filename = "resq.db" self.abs_db_path = os.path.join(script_dir, "database", filename) master_pptx = "countries_comparison.pptx" self.master = os.path.normpath(os.path.join(script_dir, "backgrounds", master_pptx)) self._generate_graphs() def _generate_graphs(self): """ The function generating graphs into the presentation. The final name of the presentation is comparison_two_periods.pptx. """ prs = Presentation(self.master) # Read template presentation first_slide = prs.slides[0] shape = first_slide.shapes[5] text_frame = shape.text_frame first_slide_text = "Data Comparison" # Set title p = text_frame.paragraphs[0] run = p.add_run() run.text = first_slide_text font = run.font font.name = 'Calibri Light' font.size = Pt(26) font.color.rgb = RGBColor(250,250,250) # if (self.country_name in ['Ukraine', 'Poland'] and len(df) > 2): # main_col = 'Site ID' # else: main_col = 'Site Name' ######################## #### TOTAL PATIENTS #### ######################## column_name = 'Total Patients' # Nationally df tmp_ndf1 = self.ndf1[[main_col, column_name]] tmp_ndf1 = tmp_ndf1.sort_values([column_name], ascending = True) # Site-level df tmp_ndf2 = self.ndf2[[main_col, column_name]] tmp_ndf2 = tmp_ndf2.sort_values([column_name], ascending=True) # Merge dataframes tmp_df = pd.merge(tmp_ndf1, tmp_ndf2, how='right', on=['Site Name']) tmp_df.fillna(0, inplace=True) tmp_df = tmp_df.sort_values([main_col], ascending=True) title = "Total patients enrolled" legend = [self.name1, self.name2] GeneratePeriodCompGraph(df=tmp_df, presentation=prs, column_name=column_name, title=title, number_of_series=len(legend), legend=legend) ########################################### #### PATIENTS RECEIVING RECANALIZATION #### ########################################### column_name = '% patients recanalized' # Nationally df tmp_ndf1 = self.ndf1[[main_col, column_name]] tmp_ndf1 = tmp_ndf1.sort_values([column_name], ascending = True) # Site-level df tmp_ndf2 = self.ndf2[[main_col, column_name]] tmp_ndf2 = tmp_ndf2.sort_values([column_name], ascending=True) # Merge dataframes tmp_df = pd.merge(tmp_ndf1, tmp_ndf2, how='right', on=['Site Name']) tmp_df.fillna(0, inplace=True) tmp_df = tmp_df.sort_values([main_col], ascending=True) title = "% patients receiving recanalization procedures" subtitle = "Calculated out of number of IS" legend = [self.name1, self.name2] GeneratePeriodCompGraph(df=tmp_df, presentation=prs, column_name=column_name, title=title, subtitle=subtitle, number_of_series=len(legend), legend=legend) ############################## #### MEDIAN DTN (MINUTES) #### ############################## column_name = 'Median DTN (minutes)' # Nationally df tmp_ndf1 = self.ndf1[[main_col, column_name]] tmp_ndf1 = tmp_ndf1.sort_values([column_name], ascending = True) # Site-level df tmp_ndf2 = self.ndf2[[main_col, column_name]] tmp_ndf2 = tmp_ndf2.sort_values([column_name], ascending=True) # Merge dataframes tmp_df = pd.merge(tmp_ndf1, tmp_ndf2, how='right', on=['Site Name']) tmp_df.fillna(0, inplace=True) tmp_df = tmp_df.sort_values([main_col], ascending=True) title = "Median Door-to-Needle Time (DTN), in minutes" legend = [self.name1, self.name2] GeneratePeriodCompGraph(df=tmp_df, presentation=prs, column_name=column_name, title=title, number_of_series=len(legend), legend=legend) ############################## #### MEDIAN DTG (MINUTES) #### ############################## column_name = 'Median DTG (minutes)' # Nationally df tmp_ndf1 = self.ndf1[[main_col, column_name]] tmp_ndf1 = tmp_ndf1.sort_values([column_name], ascending = True) # Site-level df tmp_ndf2 = self.ndf2[[main_col, column_name]] tmp_ndf2 = tmp_ndf2.sort_values([column_name], ascending=True) # Merge dataframes tmp_df = pd.merge(tmp_ndf1, tmp_ndf2, how='right', on=['Site Name']) tmp_df.fillna(0, inplace=True) tmp_df = tmp_df.sort_values([main_col], ascending=True) title = "Median Door-to-Needle Time (DTG), in minutes" legend = [self.name1, self.name2] GeneratePeriodCompGraph(df=tmp_df, presentation=prs, column_name=column_name, title=title, number_of_series=len(legend), legend=legend) # set pptx output name (for cz it'll be presentation_CZ.pptx) working_dir = os.getcwd() pptx = "comparison_two_periods.pptx" presentation_path = os.path.normpath(os.path.join(working_dir, pptx)) prs.save(presentation_path) class GeneratePeriodCompGraph: """ The class generating comparison graphs for given periods . :param df: the temporary dataframe created in :class:`resqdb.GenerateComparisonPresentation.GeneratePeriodCompPresentation` class :type df: pandas dataframe :param presentation: the presentation opened in :class:`resqdb.GenerateComparisonPresentation.GeneratePeriodCompPresentation` class :type presentation: Presentation object :param column_name: the name of column which data should be shown in the graph :type column_name: str :param title: the title of the graph :type title: str :param subtitle: the subtitle of the graph :type subtitle: str :param number_of_series: the number of columns to be shown (stacked graphs) :type number_of_series: int :param legend: the legend if the graph is stacked :type legend: list of strings """ def __init__(self, df, presentation, column_name, title, subtitle="", number_of_series=0, legend=None): self.df = df self.presentation = presentation self.title = title self.column_name = column_name self.number_of_series = number_of_series self.font_name = 'Roboto' self.legend = legend self.subtitle = subtitle self.category_font_size = Pt(10) self.data_label_font_size = Pt(11) self.categories_column = 'Site Name' self._create_column_clustered_barplot() def _get_length_of_legend(self, legend): """ The function adjusting the number of letters in legend to quess the number of columns in the legend! :param legend: the names of legend :type legend: list :returns: the adjusted number of letters """ count = 0 for i in legend: count = count + len(i) return count def _create_column_clustered_barplot(self): """ The function creating the clustered barplot. """ maximum = 0 column_names = self.df.columns.tolist() index = column_names.index(self.categories_column) # Add slide to presentation (layout 11 is our custom layout where only title 'Agency FB', color: RGBColor(43, 88, 173) and size:24 is set) slide = self.presentation.slides.add_slide(self.presentation.slide_layouts[11]) # Get title object title_placeholders = slide.shapes.title title_placeholders.text = self.title # If subtitle is not set, remove placeholder for the subtitle from page. if self.subtitle == "": subtitle = slide.placeholders[1] sp = subtitle.element sp.getparent().remove(sp) else: subtitle = slide.placeholders[1] subtitle.text = self.subtitle # 1st chart (left side) - nationally sample chart_data = ChartData() chart_data.categories = self.df[self.categories_column].tolist() # Add data in each category chart_data.add_series(self.legend[0], self.df[column_names[index+1]].tolist()) if (self.number_of_series >= 2): chart_data.add_series(self.legend[1], self.df[column_names[index+2]].tolist()) # Set margins. specs = { 'height': Cm(16.5), 'width': Cm(32), 'left': Cm(0.7), 'top': Cm(2) } chart = slide.shapes.add_chart( XL_CHART_TYPE.COLUMN_CLUSTERED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart # Get series of chart series = chart.series[0] # Get plot plot = chart.plots[0] plot.gap_width = 220 plot.overlap = -25 # Set for each bar same color plot.vary_by_categories = False # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = self.category_font_size tick_labels.font.name = self.font_name # Don't show major gridlines value_axis.has_major_gridlines = True value_axis.major_gridlines.format.line.color.rgb = RGBColor(217, 217, 217) value_axis.major_gridlines.format.line.width = Pt(0.5) value_axis.major_tick_mark = XL_TICK_MARK.NONE value_axis.format.line.color.rgb = RGBColor(217, 217, 217) # Set range of axis #value_axis.maximum_scale = ndf_maximum value_axis.minimum_scale = 0 # Value for y-axis (change font size, name, and other things) category_axis = chart.category_axis category_axis.format.line.color.rgb = RGBColor(217, 217, 217) # Delete tick marks category_axis.major_tick_mark = XL_TICK_MARK.NONE #category_axis.major_unit = 1 category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name # Set legend chart.has_legend = True chart.legend.position = XL_LEGEND_POSITION.BOTTOM chart.legend.include_in_layout = False chart.legend.font.name = self.font_name class GenerateCountriesCompPresentation: """ The class creating presentation with the comparison between national samples and site samples in one period. :param ndf: the calculated statistics for the national samples :type ndf: pandas dataframe :param sldf: the calculated statistics for the site samples :type sldf: pandas dataframe :param name: the name of the period, eg. 2017 :type name: str :param samples: the list of countries which should be colored by different color in the main graphs :type samples: list of string """ def __init__(self, ndf, sldf, name="", samples=[]): self.ndf = ndf self.sldf = sldf self.name = name # Get absolute path to the database. script_dir = os.path.dirname(__file__) #<-- absolute dir the script is in filename = "resq.db" self.abs_db_path = os.path.join(script_dir, "database", filename) master_pptx = "countries_comparison.pptx" self.master = os.path.normpath(os.path.join(script_dir, "backgrounds", master_pptx)) def select_country(value): """ The function obtaining the country name from the package pytz based on the country code. :param value: the country code :type value: str :returns: the country name """ if value == "UZB": value = 'UZ' country_name = pytz.country_names[value] return country_name # If country is used as site, the country name is selected from countries dictionary by country code. : if len(samples) > 0: self.nationally_countries = [] for i in range(0, len(samples)): country = select_country(samples[i]) self.nationally_countries.append(country) self._generate_graphs() def _generate_graphs(self): """ The function generating graphs into the presentation! """ prs = Presentation(self.master) # Read the template presentation first_slide = prs.slides[0] shape = first_slide.shapes[5] text_frame = shape.text_frame first_slide_text = "Data Comparison" p = text_frame.paragraphs[0] run = p.add_run() run.text = first_slide_text font = run.font font.name = 'Century Gothic' font.size = Pt(20) font.color.rgb = RGBColor(250,250,250) # if (self.country_name in ['Ukraine', 'Poland'] and len(df) > 2): # main_col = 'Site ID' # else: main_col = 'Site Name' ######################## #### TOTAL PATIENTS #### ######################## column_name = 'Total Patients' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) # combine them to one dataframe tmp_df = tmp_ndf.append(tmp_sldf) tmp_df = tmp_df.sort_values([column_name], ascending=True) title = 'Total number of cases - admission date in {}'.format(self.name) GenerateCountriesCompGraphs(ndf=tmp_df, sldf=None, presentation=prs, title=title, column_name=column_name) ######################## #### TOTAL PATIENTS #### ######################## column_name = 'Total Patients' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) # combine them to one dataframe tmp_df = tmp_ndf.append(tmp_sldf) tmp_df = tmp_df.sort_values([column_name], ascending=True) title = 'Total number of cases - admission date in {}'.format(self.name) GenerateCountriesCompGraphs(ndf=tmp_df, sldf=None, presentation=prs, title=title, column_name=column_name, samples=self.nationally_countries) ############################ #### MEDIAN PATIENT AGE #### ############################ column_name = 'Median patient age' title = 'Median patient age' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name) ############### # STROKE TYPE # ############### column_name = '% stroke type - ischemic stroke' legend = ['ischemic', 'transient ischemic attack', 'intracerebral hemorrhage', 'subarrachnoid hemorrhage', 'cerebral venous thrombosis', 'undetermined'] tmp_ndf = self.ndf[[main_col, '% stroke type - ischemic stroke', '% stroke type - transient ischemic attack', '% stroke type - intracerebral hemorrhage', '% stroke type - subarrachnoid hemorrhage', '% stroke type - cerebral venous thrombosis', '% stroke type - undetermined stroke']] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) tmp_sldf = self.sldf[[main_col, '% stroke type - ischemic stroke', '% stroke type - transient ischemic attack', '% stroke type - intracerebral hemorrhage', '% stroke type - subarrachnoid hemorrhage', '% stroke type - cerebral venous thrombosis', '% stroke type - undetermined stroke']] tmp_sldf = tmp_sldf.sort_values([column_name], ascending = True) title = "Stroke type, ordered by % ischemic stroke" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, legend=legend, number_of_series=len(legend), graph_type='stacked') ####################### ### DEPARTMENT TYPE ### ####################### column_name = '% department type - neurology' legend = ['neurology', 'neurosurgery', 'anesthesiology resuscitation critical care', 'internal medicine', 'geriatrics', 'other'] tmp_ndf = self.ndf[[main_col, '% department type - neurology', '% department type - neurosurgery', '% department type - anesthesiology/resuscitation/critical care', '% department type - internal medicine', '% department type - geriatrics', '% department type - Other']] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) tmp_sldf = self.sldf[[main_col, '% department type - neurology', '% department type - neurosurgery', '% department type - anesthesiology/resuscitation/critical care', '% department type - internal medicine', '% department type - geriatrics', '% department type - Other']] tmp_sldf = tmp_sldf.sort_values([column_name], ascending = True) title = "Department type, ordered by % neurology" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, legend=legend, number_of_series=len(legend), graph_type='stacked') ################################### ### HOSPITALIZATION DESTINATION ### ################################### column_name = '% patients hospitalized in stroke unit / ICU' legend = ['% stroke unit / ICU', '% monitored bed with telemetry', '% standard bed'] tmp_ndf = self.ndf[[main_col, '% patients hospitalized in stroke unit / ICU', '% patients hospitalized in monitored bed with telemetry', '% patients hospitalized in standard bed']] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) tmp_sldf = self.sldf[[main_col, '% patients hospitalized in stroke unit / ICU', '% patients hospitalized in monitored bed with telemetry', '% patients hospitalized in standard bed']] tmp_sldf = tmp_sldf.sort_values([column_name], ascending = True) title = "Hospitalization type, ordered by % stroke unit" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, legend=legend, number_of_series=len(legend), graph_type='stacked') ########################## ### CT / MRI performed ### ########################## column_name = '% CT/MRI - performed' legend = ['% performed', '% performed within 1 hour after admission'] tmp_ndf = self.ndf[[main_col, '% CT/MRI - performed', '% CT/MRI - Performed within 1 hour after admission']] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) tmp_sldf = self.sldf[[main_col, '% CT/MRI - performed', '% CT/MRI - Performed within 1 hour after admission']] tmp_sldf = tmp_sldf.sort_values([column_name], ascending = True) title = "% patients receiving CT / MRI" subtitle = "- Calculated out of number of IS + ICH + TIA + CVT -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, legend=legend, number_of_series=len(legend), graph_type='grouped', subtitle=subtitle) ############################ # RECANALIZATION TREATMENT # ############################ """ column_name = '% recanalization procedures - IV tPa' legend = ['IV tPa', 'IV tPa + endovascular treatment', 'endovascular treatment', 'IV tPa + another centre for endovascular treatment'] tmp_ndf = self.ndf[[main_col, '% patients recanalized', '% recanalization procedures - IV tPa', '% recanalization procedures - IV tPa + endovascular treatment', '% recanalization procedures - Endovascular treatment alone', '% recanalization procedures - IV tPa + referred to another centre for endovascular treatment']] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) tmp_sldf = self.sldf[[main_col, '% patients recanalized', '% recanalization procedures - IV tPa', '% recanalization procedures - IV tPa + endovascular treatment', '% recanalization procedures - Endovascular treatment alone', '% recanalization procedures - IV tPa + referred to another centre for endovascular treatment']] tmp_sldf = tmp_sldf.sort_values([column_name], ascending = True) title = "% patients receiving recanalization procedures" subtitle = "- Calculated out of number of IS -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, legend=legend, number_of_series=len(legend), graph_type='stacked', subtitle=subtitle) """ column_name = '% patients recanalized' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% patients receiving recanalization procedures" subtitle = "- Calculated out of number of IS -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name) column_name = '% IV tPa' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% patients receiving thrombolysis" subtitle = "- Calculated out of number of IS -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name) column_name = '% TBY' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% patients receiving mechanical thrombectomy" subtitle = "- Calculated out of number of IS -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name) ################ # % median DTN # ################ column_name = 'Median DTN (minutes)' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = False) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=False) title = "Median Door-to-Needle Time (DTN), in minutes" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name) ####################### # dysphagia screening # ####################### column_name = '% dysphagia screening - Guss test' column_names = ['% dysphagia screening - Guss test', '% dysphagia screening - Other test', '% dysphagia screening - Another centre', '% dysphagia screening - Unable to test'] legend = ['% GUSS test', '% Other test', '% Another centre', '% Unable to test'] tmp_ndf = self.ndf[[main_col, '% dysphagia screening - Guss test', '% dysphagia screening - Other test', '% dysphagia screening - Another centre', '% dysphagia screening - Unable to test']] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) tmp_sldf = self.sldf[[main_col, '% dysphagia screening - Guss test', '% dysphagia screening - Other test', '% dysphagia screening - Another centre', '% dysphagia screening - Unable to test']] tmp_sldf = tmp_sldf.sort_values([column_name], ascending = True) title = "% patients screened for dysphagia, ordered by % GUSS test" subtitle = "- Calculated out of number of IS + ICH + CVT -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, legend=legend, number_of_series=len(legend), graph_type='stacked', subtitle=subtitle) ################################# # % ASSESSED FOR REHABILITATION # ################################# column_name = '% patients assessed for rehabilitation - Yes' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% patients assessed for rehabilitation within 72 hrs after admission" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name) ################################## # CAROTID ARTERIES IMAGING - YES # ################################## column_name = '% carotid arteries imaging - Yes' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% patients receiving carotid arteries imaging" subtitle = "- Calculated out of number of IS + TIA -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, subtitle=subtitle) ################################## # PRESCRIPTION OF ANTICOAGULANTS # ################################## # column_name = '% patients prescribed anticoagulants with aFib with CVT' column_name = '% patients prescribed anticoagulants with aFib' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "Prescription of anticoagulants for patients with atrial fibrillation" subtitle = "- Calculated out of number of patients with atrial fibrillation discharge alive -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, subtitle=subtitle) ################################### # PRESCRIPTION OF ANTITHROMBOTICS # ################################### column_name = '% patients prescribed antithrombotics with aFib' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "Prescription of antithrombotics for patients with atrial fibrillation" subtitle = "- Calculated out of number of patients with atrial fibrillation discharge alive -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, subtitle=subtitle) ########################## # DISCHARGE WITH STATINS # ########################## column_name = '% patients prescribed statins - Yes' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% patients discharged on statins" subtitle = "- Calculated out of number of IS + TIA -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, subtitle=subtitle) ############################################################# # % ANTIHYPERTENSIVE MEDICATION PRESCRIBED out of all cases # ############################################################# column_name = '% prescribed antihypertensives - Yes' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% patients prescribed antihypertensives at discharge" subtitle = "- Calculated out of number of patients discharged alive -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, column_name=column_name, subtitle=subtitle) ########################################################### # % RECOMMENDED TO A CEREBROVASCULAR EXPERT - RECOMMENDED # ########################################################### column_name = '% recommended to a cerebrovascular expert - Recommended' # Nationally df tmp_ndf = self.ndf[[main_col, column_name]] tmp_ndf = tmp_ndf.sort_values([column_name], ascending = True) # Site-level df tmp_sldf = self.sldf[[main_col, column_name]] tmp_sldf = tmp_sldf.sort_values([column_name], ascending=True) title = "% recommended to a cerebrovascular expert" subtitle = "- Calculated out of number of total patients -" GenerateCountriesCompGraphs(ndf=tmp_ndf, sldf=tmp_sldf, presentation=prs, title=title, subtitle=subtitle, column_name=column_name) # set pptx output name (for cz it'll be presentation_CZ.pptx) working_dir = os.getcwd() pptx = "comparison.pptx" presentation_path = os.path.normpath(os.path.join(working_dir, pptx)) prs.save(presentation_path) class GenerateCountriesCompGraphs: """ The class generating comparison graphs in presentation for nationally samples vs. site samples. :param ndf: the calculated statistics for the national samples :type ndf: pandas dataframe :param presentation: the opened presentation document :type presentation: Presentation object :param column_name: the name of column to be included in the graph :type column_name: str :param title: the title of the slide :type title: str :param sldf: the calculated statistics for the site samples, can be `None` if Total Patients graph is generated :type sldf: pandas dataframe :param subtitle: the subtitle of the slide :type subtitle: str :param graph_type: the type of graph to be generated (normal barplot or stacked barplot) :type graph_type: str :param number_of_series: the number of columns included in the stacked barplot :type number_of_series: int :param legend: the list of values in the legend :type legend: list :param samples: the list of countries which should be displayed with different color :type samples: list of string """ def __init__(self, ndf, presentation, column_name, title, sldf=None, subtitle="", graph_type=None, number_of_series=0, legend=None, samples=None): self.ndf = ndf self.sldf = sldf self.presentation = presentation self.ndf_title = "Nationally representative sample" self.sldf_title = "Site-level representative sample" self.title = title self.column_name = column_name self.number_of_series = number_of_series self.legend = legend self.subtitle = subtitle self.samples = samples self.font_name = 'Century Gothic' self.category_font_size = Pt(10) self.data_label_font_size = Pt(11) self.categories_column = 'Site Name' # Check type of graph if (graph_type == 'stacked'): self._create_stacked_barplot() elif (graph_type == 'grouped'): self._create_grouped_barplot() else: self._create_barplot() def _get_length_of_legend(self, legend): """ The function adjusting the number of letters in legend to quess the number of columns in the legend! """ count = 0 for i in legend: count = count + len(i) return count def _create_barplot(self): """ The function generating into the presentation the normal barplot. """ maximum = 0 # If graph is in %, set maximum valut to 100. if '%' in self.title.lower(): ndf_maximum = 100 sldf_maximum = 100 elif "total number of cases" in self.title.lower(): ndf_maximum = round((max(self.ndf[self.column_name].tolist())),1) else: ndf_maximum = round((max(self.ndf[self.column_name].tolist())),1) sldf_maximum = round((max(self.sldf[self.column_name].tolist())),1) # Add slide to presentation (layout 11 is our custom layout where only title 'Agency FB', color: RGBColor(43, 88, 173) and size:24 is set) slide = self.presentation.slides.add_slide(self.presentation.slide_layouts[11]) # Get title object title_placeholders = slide.shapes.title # Set title title_placeholders.text = self.title # If subtitle is not set, then delete placeholder for subtitle in the slide. if self.subtitle == "": subtitle = slide.placeholders[1] sp = subtitle.element sp.getparent().remove(sp) else: subtitle = slide.placeholders[1] subtitle.text = self.subtitle # 1st chart (left side) - nationally sample chart_data = ChartData() chart_data.categories = self.ndf[self.categories_column].tolist() chart_data.add_series(self.column_name, self.ndf[self.column_name].tolist()) if "total number of cases" in self.title.lower(): # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(32), 'left': Cm(0.7), 'top': Cm(2) } else: # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(0.5), 'top': Cm(2) } chart = slide.shapes.add_chart( XL_CHART_TYPE.BAR_CLUSTERED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart # Get series of chart series = chart.series[0] # If graphs for whole country are generated, set for bar with country with red color # else set to blue color (same color as title uses) if "total number of cases" in self.title.lower() and self.samples is not None: site_names = self.ndf[self.categories_column].tolist() for idx, point in enumerate(series.points): fill = point.format.fill fill.solid() if (site_names[idx] in self.samples): fill.fore_color.rgb = RGBColor(128,0,0) else: fill.fore_color.rgb = RGBColor(43, 88, 173) else: fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(43, 88, 173) # Get plot plot = chart.plots[0] # Set for each bar same color plot.vary_by_categories = False # Show data labels and set font plot.has_data_labels = True data_labels = plot.data_labels data_labels.font.size = self.data_label_font_size data_labels.font.bold = True data_labels.font.name = self.font_name # Change color of graph title and set color gray if "total number of cases" not in self.title.lower(): chart_text = chart.chart_title.text_frame chart_text.text = self.ndf_title chart_text.paragraphs[0].font.size = Pt(18) chart_text.paragraphs[0].font.color.rgb = RGBColor(89, 89, 89) # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = self.category_font_size tick_labels.font.name = self.font_name # Don't show major gridlines value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = False # Set range of axis value_axis.maximum_scale = ndf_maximum value_axis.minimum_scale = 0 # Value for y-axis (change font size, name, and other things) category_axis = chart.category_axis # Delete tick marks category_axis.major_tick_mark = XL_TICK_MARK.NONE category_axis.major_unit = 1 category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name if "total number of cases" not in self.title.lower(): # 2nd graph (right side) - site-level samples chart_data = ChartData() chart_data.categories = self.sldf[self.categories_column].tolist() chart_data.add_series(self.column_name, self.sldf[self.column_name].tolist()) # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(2) } chart = slide.shapes.add_chart( XL_CHART_TYPE.BAR_CLUSTERED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart # Get series of chart series = chart.series[0] fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(43, 88, 173) # Get plot plot = chart.plots[0] # Set for each bar same color plot.vary_by_categories = False # Show data labels and set font plot.has_data_labels = True data_labels = plot.data_labels data_labels.font.size = self.data_label_font_size data_labels.font.bold = True data_labels.font.name = self.font_name # Change color of graph title and set color gray chart_text = chart.chart_title.text_frame chart_text.text = self.sldf_title chart_text.paragraphs[0].font.size = Pt(18) chart_text.paragraphs[0].font.color.rgb = RGBColor(89, 89, 89) # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = self.category_font_size tick_labels.font.name = self.font_name # Don't show major gridlines value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = False # Set range of axis value_axis.maximum_scale = sldf_maximum value_axis.minimum_scale = 0 # Value for y-axis (change font size, name, and other things) category_axis = chart.category_axis # Delete tick marks category_axis.major_tick_mark = XL_TICK_MARK.NONE category_axis.major_unit = 1 category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name def _create_stacked_barplot(self): """ The function generating into the presentation the stacked barplot. """ # Calculate length of legend (in case that legend is too long, make smaller font size) count = self._get_length_of_legend(self.legend) # Get column names of dataframe column_names = self.ndf.columns.tolist() index = column_names.index(self.column_name) # Add new slide into presentation slide = self.presentation.slides.add_slide(self.presentation.slide_layouts[11]) title_placeholders = slide.shapes.title title_placeholders.text = self.title if self.subtitle == "": subtitle = slide.placeholders[1] sp = subtitle.element sp.getparent().remove(sp) else: subtitle = slide.placeholders[1] subtitle.text = self.subtitle # 1st dataframe (nationally sample) chart_data = ChartData() chart_data.categories = self.ndf[self.categories_column].tolist() # Add data in each category chart_data.add_series(self.legend[0], self.ndf[column_names[index]].tolist()) if (self.number_of_series >= 2): chart_data.add_series(self.legend[1], self.ndf[column_names[index+1]].tolist()) if (self.number_of_series >= 3): chart_data.add_series(self.legend[2], self.ndf[column_names[index+2]].tolist()) if (self.number_of_series >= 4): chart_data.add_series(self.legend[3], self.ndf[column_names[index+3]].tolist()) if (self.number_of_series >= 5): chart_data.add_series(self.legend[4], self.ndf[column_names[index+4]].tolist()) if (self.number_of_series >= 6): chart_data.add_series(self.legend[5], self.ndf[column_names[index+5]].tolist()) if (self.number_of_series >= 7): chart_data.add_series(self.legend[6], self.ndf[column_names[index+6]].tolist()) if (self.number_of_series >= 8): chart_data.add_series(self.legend[7], self.ndf[column_names[index+7]].tolist()) # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(0.5), 'top': Cm(2) } chart = slide.shapes.add_chart( XL_CHART_TYPE.BAR_STACKED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart series = chart.series[0] # If graphs for whole country are generated, set for bar with country with red color # else set to blue color (same color as title uses) fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(43, 88, 173) if (self.number_of_series >= 5): series = chart.series[4] fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(80, 137, 188) # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = Pt(11) tick_labels.font.name = self.font_name value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = True value_axis.major_gridlines.format.line.dash_style = MSO_LINE.DASH value_axis.major_gridlines.format.line.width = Pt(0.5) value_axis.maximum_scale = 100 category_axis = chart.category_axis category_axis.major_tick_mark = XL_TICK_MARK.NONE category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name category_labels.tickLblSkip = 1 # 2nd dataframe (nationally sample) # Get column names of dataframe column_names = self.sldf.columns.tolist() index = column_names.index(self.column_name) chart_data = ChartData() chart_data.categories = self.sldf[self.categories_column].tolist() # Add data in each category chart_data.add_series(self.legend[0], self.sldf[column_names[index]].tolist()) if (self.number_of_series >= 2): chart_data.add_series(self.legend[1], self.sldf[column_names[index+1]].tolist()) if (self.number_of_series >= 3): chart_data.add_series(self.legend[2], self.sldf[column_names[index+2]].tolist()) if (self.number_of_series >= 4): chart_data.add_series(self.legend[3], self.sldf[column_names[index+3]].tolist()) if (self.number_of_series >= 5): chart_data.add_series(self.legend[4], self.sldf[column_names[index+4]].tolist()) if (self.number_of_series >= 6): chart_data.add_series(self.legend[5], self.sldf[column_names[index+5]].tolist()) if (self.number_of_series >= 7): chart_data.add_series(self.legend[6], self.sldf[column_names[index+6]].tolist()) if (self.number_of_series >= 8): chart_data.add_series(self.legend[7], self.sldf[column_names[index+7]].tolist()) # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(2) } chart = slide.shapes.add_chart( XL_CHART_TYPE.BAR_STACKED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart series = chart.series[0] # If graphs for whole country are generated, set for bar with country with red color # else set to blue color (same color as title uses) fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(43, 88, 173) if (self.number_of_series >= 5): series = chart.series[4] fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(80, 137, 188) # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = Pt(11) tick_labels.font.name = self.font_name value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = True value_axis.major_gridlines.format.line.dash_style = MSO_LINE.DASH value_axis.major_gridlines.format.line.width = Pt(0.5) value_axis.maximum_scale = 100 category_axis = chart.category_axis category_axis.major_tick_mark = XL_TICK_MARK.NONE category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name category_labels.tickLblSkip = 1 # Set legend chart.has_legend = True chart.legend.position = XL_LEGEND_POSITION.BOTTOM chart.legend.include_in_layout = False chart.legend.font.name = self.font_name if (count > 180 or 'antithrombotics prescribed' in self.title.lower()): chart.legend.font.size = Pt(11) else: chart.legend.font.size = Pt(12) def _create_grouped_barplot(self): """ The function generating into the presentation the grouped barplot. """ # Calculate length of legend (in case that legend is too long, make smaller font size) count = self._get_length_of_legend(self.legend) # Get column names of dataframe column_names = self.ndf.columns.tolist() index = column_names.index(self.column_name) # Add new slide into presentation slide = self.presentation.slides.add_slide(self.presentation.slide_layouts[11]) title_placeholders = slide.shapes.title title_placeholders.text = self.title if self.subtitle == "": subtitle = slide.placeholders[1] sp = subtitle.element sp.getparent().remove(sp) else: subtitle = slide.placeholders[1] subtitle.text = self.subtitle # 1st dataframe (nationally sample) chart_data = ChartData() chart_data.categories = self.ndf[self.categories_column].tolist() # Add data in each category chart_data.add_series(self.legend[0], self.ndf[column_names[index]].tolist()) chart_data.add_series(self.legend[1], self.ndf[column_names[index+1]].tolist()) # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(0.5), 'top': Cm(2) } chart = slide.shapes.add_chart( XL_CHART_TYPE.BAR_CLUSTERED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart series = chart.series[0] # If graphs for whole country are generated, set for bar with country with red color # else set to blue color (same color as title uses) fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(43, 88, 173) if (self.number_of_series >= 5): series = chart.series[4] fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(80, 137, 188) # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = Pt(11) tick_labels.font.name = self.font_name value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = True value_axis.major_gridlines.format.line.dash_style = MSO_LINE.DASH value_axis.major_gridlines.format.line.width = Pt(0.5) value_axis.maximum_scale = 100 category_axis = chart.category_axis category_axis.major_tick_mark = XL_TICK_MARK.NONE category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name category_labels.tickLblSkip = 1 # 2nd dataframe (nationally sample) # Calculate length of legend (in case that legend is too long, make smaller font size) count = self._get_length_of_legend(self.legend) # Get column names of dataframe column_names = self.sldf.columns.tolist() index = column_names.index(self.column_name) chart_data = ChartData() chart_data.categories = self.sldf[self.categories_column].tolist() # Add data in each category chart_data.add_series(self.legend[0], self.sldf[column_names[index]].tolist()) chart_data.add_series(self.legend[1], self.sldf[column_names[index+1]].tolist()) # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(2) } chart = slide.shapes.add_chart( XL_CHART_TYPE.BAR_CLUSTERED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart series = chart.series[0] # If graphs for whole country are generated, set for bar with country with red color # else set to blue color (same color as title uses) fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(43, 88, 173) if (self.number_of_series >= 5): series = chart.series[4] fill = series.format.fill fill.solid() fill.fore_color.rgb = RGBColor(80, 137, 188) # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = Pt(11) tick_labels.font.name = self.font_name value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = True value_axis.major_gridlines.format.line.dash_style = MSO_LINE.DASH value_axis.major_gridlines.format.line.width = Pt(0.5) value_axis.maximum_scale = 100 category_axis = chart.category_axis category_axis.major_tick_mark = XL_TICK_MARK.NONE category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name category_labels.tickLblSkip = 1 # Set legend chart.has_legend = True chart.legend.position = XL_LEGEND_POSITION.BOTTOM chart.legend.include_in_layout = False chart.legend.font.name = self.font_name class GenerateYearsCompPresentation: """ The class creating presentation with graphs representing country comparison through all years in the dataset (eg. 2016, 2017, 2018, 2019). :param df: the dataframe with calculated statistics per years or period :type df: pandas dataframe :param name: the name of the presentation :type name: str """ def __init__(self, df, name): self.df = df self.name = name # Get absolute path to the database. script_dir = os.path.dirname(__file__) master_pptx = "countries_comparison.pptx" self.master = os.path.normpath(os.path.join(script_dir, "backgrounds", master_pptx)) self._generate_graphs() def _generate_graphs(self): """Generate graphs into presentation (pptx).""" prs = Presentation(self.master) first_slide = prs.slides[0] shape = first_slide.shapes[5] text_frame = shape.text_frame first_slide_text = "Data Comparison" p = text_frame.paragraphs[0] run = p.add_run() run.text = first_slide_text font = run.font font.name = 'Calibri Light' font.size = Pt(26) font.color.rgb = RGBColor(250,250,250) # if (self.country_name in ['Ukraine', 'Poland'] and len(df) > 2): # main_col = 'Site ID' # else: main_col = 'Site Name' # main_col = "Site Name" years = ', '.join(map(str, self.df[main_col].tolist())) title = "Temporal trends - {}".format(years) titles = [] graph_types = [] legend = [] # Total patients and median age graphst) column_name = 'Total Patients' df = self.df[[main_col, column_name]] titles.append("Total Patients") graph_types.append("normal") column_name = 'Median patient age' df1 = self.df[[main_col, column_name]] titles.append("Median patient age") graph_types.append("normal") GenerateYearsCompGraphs(df=df, df1=df1, presentation=prs, title=title, titles=titles, graph_types=graph_types) legends = [] titles = [] graph_types = [] ### DEPARTMENT TYPE ### legend = ['neurology', 'neurosurgery', 'anesthesiology resuscitation critical care', 'internal medicine', 'geriatrics', 'other'] legends.append(legend) titles.append("Department type (%)") graph_types.append("stacked") df = self.df[[main_col, '% department type - neurology', '% department type - neurosurgery', '% department type - anesthesiology/resuscitation/critical care', '% department type - internal medicine', '% department type - geriatrics', '% department type - Other']] ### HOSPITALIZATION DESTINATION ### legend = ['stroke unit', 'monitored bed with telemetry', 'standard bed'] legends.append(legend) titles.append("Hospitalization type (%)") graph_types.append("stacked") df1 = self.df[[main_col, '% patients hospitalized in stroke unit / ICU', '% patients hospitalized in monitored bed with telemetry', '% patients hospitalized in standard bed']] ### REHABILIATION ### column_name = '% patients assessed for rehabilitation - Yes' df2 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("Assessed for rehabilitation (%)") graph_types.append("normal") GenerateYearsCompGraphs(df=df, df1=df1, df2=df2, presentation=prs, title=title, titles=titles, graph_types=graph_types, legends=legends) legends = [] titles = [] graph_types = [] # STROKE TYPE # legend = ['ischemic', 'transient ischemic attack', 'intracerebral hemorrhage', 'subarrachnoid hemorrhage', 'cerebral venous thrombosis', 'undetermined'] legends.append(legend) titles.append("Stroke type (%)") graph_types.append("stacked") df = self.df[[main_col, '% stroke type - ischemic stroke', '% stroke type - transient ischemic attack', '% stroke type - intracerebral hemorrhage', '% stroke type - subarrachnoid hemorrhage', '% stroke type - cerebral venous thrombosis', '% stroke type - undetermined stroke']] # CT/MRI performed # column_name = '% CT/MRI - performed' df1 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("CT/MRI (%)") graph_types.append("normal") # patients recanalized column_name = '% patients recanalized' df2 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("% patients recanalized") graph_types.append("normal") GenerateYearsCompGraphs(df=df, df1=df1, df2=df2, presentation=prs, title=title, titles=titles, graph_types=graph_types, legends=legends) legends = [] titles = [] graph_types = [] # RECANALIZATION PROCEDURES # legend = ['IV tPa', 'IV tPa + endovascular treatment', 'endovascular treatment', 'IV tPa + another centre for endovascular treatment'] legends.append(legend) titles.append("Recanalization procedures (%)") df = self.df[[main_col, '% recanalization procedures - IV tPa', '% recanalization procedures - IV tPa + endovascular treatment', '% recanalization procedures - Endovascular treatment alone', '% recanalization procedures - IV tPa + referred to another centre for endovascular treatment']] graph_types.append("stacked") # MEDIAN DTN # column_name = 'Median DTN (minutes)' df1 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("Median DTN (minutes)") graph_types.append("normal") # MEDIAN DTN # column_name = 'Median DTG (minutes)' df2 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("Median DTG (minutes)") graph_types.append("normal") GenerateYearsCompGraphs(df=df, df1=df1, df2=df2, presentation=prs, title=title, titles=titles, graph_types=graph_types, legends=legends) legends = [] titles = [] graph_types = [] # DYSPHAGIA SCREENING # column_name = '% dysphagia screening - Guss test' legend = ['GUSS test', 'Other test', 'Another centre'] legends.append(legend) titles.append("Dysphagia screening (%)") graph_types.append("stacked") df = self.df[[main_col, '% dysphagia screening - Guss test', '% dysphagia screening - Other test', '% dysphagia screening - Another centre']] # CAROTID ARTERIES IMAGING # column_name = '% carotid arteries imaging - Yes' df1 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("Carotid arteries imaging (%)") graph_types.append("normal") # % RECOMMENDED TO A CEREBROVASCULAR EXPERT - RECOMMENDED # column_name = '% recommended to a cerebrovascular expert - Recommended' df2 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("Recommended to a cerebrovascular \nexpert (%)") graph_types.append("normal") GenerateYearsCompGraphs(df=df, df1=df1, df2=df2, presentation=prs, title=title, titles=titles, graph_types=graph_types, legends=legends) legends = [] titles = [] graph_types = [] # PRESCRIBED ANTIPLATELETS # column_name = '% patients prescribed antiplatelets without aFib' df = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("% patients prescribed antiplatelets without aFib") graph_types.append("normal") # % PATIENTS PRESCRIBED ANTICOAGULANTS WITH AFIB # column_name = '% patients prescribed anticoagulants with aFib' df1 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("% patients prescribed anticoagulants with aFib") graph_types.append("normal") # % PATIENTS PRESCRIBED ANTITHROMBOTICS WITH AFIB # column_name = '% patients prescribed antithrombotics with aFib' df2 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("% patients prescribed antithrombotics with aFib") graph_types.append("normal") # % PATIENTS PRESCRIBED ANTICOAGULANTS WITH AFIB (HOME) # column_name = '% afib patients discharged home with anticoagulants' df3 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("% aFib patients discharged home with anticoagulants") graph_types.append("normal") GenerateYearsCompGraphs(df=df, df1=df1, df2=df2, df3=df3, presentation=prs, title=title, titles=titles, graph_types=graph_types, legends=legends) legends = [] titles = [] graph_types = [] # DISCHARGE WITH STATINS # column_name = '% patients prescribed statins - Yes' df = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("% patients prescribed statins") graph_types.append("normal") # % PATIENTS PRESCRIBED ANTICOAGULANTS WITH AFIB # column_name = '% prescribed antihypertensives - Yes' df1 = self.df[[main_col, column_name]] legend = [] legends.append(legend) titles.append("% patients prescribed antihypertensives") graph_types.append("normal") GenerateYearsCompGraphs(df=df, df1=df1, presentation=prs, title=title, titles=titles, graph_types=graph_types, legends=legends) # set pptx output name (for cz it'll be presentation_CZ.pptx) working_dir = os.getcwd() pptx = self.name + ".pptx" presentation_path = os.path.normpath(os.path.join(working_dir, pptx)) prs.save(presentation_path) class GenerateYearsCompGraphs: """ The class generating graphs into presentation for country per years. If only one dataframe is provided than one graph is created on slide, two graphs is two dataframes are provided etc. :param presentation: the opened presentation document :type presentation: Presentation object :param df: dataframe containing calculated statistics :type df: pandas dataframe :param df1: 2nd dataframe containing calculated statistics :type df1: pandas dataframe :param df2: 3rd dataframe containing calculated statistics :type df2: pandas dataframe :param df3: 4th dataframe containing calculated statistics :type df3: pandas dataframe :param title: the title of the slide :type title: str :param titles: the titles of each graph :type titles: list :param graph_types: the list of types of graphs :type graph_types: list :param legends: the nested list containing lists of legends :type legends: nested list :param outcome: `True` if outcome calculation should be included in the presentation :type outcome: bool """ def __init__(self, presentation, df, df1=None, df2=None, df3=None, title="", titles=None, graph_types=None, legends=[], outcome=False): self.df = df self.df1 = df1 self.df2 = df2 self.df3 = df3 self.presentation = presentation self.title = title self.titles = titles self.legends = legends self.num_graphs = 0 self.graph_types = graph_types self.font_name = 'Century Gothic' self.category_font_size = Pt(8) self.data_label_font_size = Pt(9) if outcome: self.categories_column = 'Patient Group' else: self.categories_column = 'Site Name' if df1 is not None: self.num_graphs += 1 if df2 is not None: self.num_graphs += 1 if df3 is not None: self.num_graphs += 1 # Add slide to presentation (layout 11 is our custom layout where only title 'Agency FB', color: RGBColor(43, 88, 173) and size:24 is set) self.slide = self.presentation.slides.add_slide(self.presentation.slide_layouts[12]) # Get title object title_placeholders = self.slide.shapes.title # Set title title_placeholders.text = self.title.upper() subtitle = self.slide.placeholders[1] sp = subtitle.element sp.getparent().remove(sp) self.colors = { 'blue': RGBColor(43, 88, 173), 'violet': RGBColor(76, 70, 127), 'orange': RGBColor(237, 145, 49), 'green': RGBColor(146, 208, 80), # 'dark_blue': RGBColor(37, 94, 145), 'yellow': RGBColor(255, 192, 0), 'grey': RGBColor(165, 165, 165) } if self.num_graphs == 0: if outcome: # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(32), 'left': Cm(0.5), 'top': Cm(2) } else: specs = { 'height': Cm(16.5), 'width': Cm(32), 'left': Cm(0.7), 'top': Cm(2) } self._create_plot(df=df, title=titles[0], specs=specs, graph_type=graph_types[0], ix=0) # If number of graph is equal to 1 (2 graphs on one slide) set specs that each graph will be on one half of slide page if self.num_graphs == 1: # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(0.5), 'top': Cm(2) } # Add chart on slide specs1 = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(2) } self._create_plot(df=df, title=titles[0], specs=specs, graph_type=graph_types[0], ix=0) self._create_plot(df=df1, title=titles[1], specs=specs1, graph_type=graph_types[1], ix=1) # If number of graph is equal to 2 (3 graphs on one slide) set specs that one graph will be on half of page, and two graphs on second half if self.num_graphs == 2: # Add chart on slide specs = { 'height': Cm(16.5), 'width': Cm(15.26), 'left': Cm(0.5), 'top': Cm(2) } # Add chart on slide specs1 = { 'height': Cm(8.25), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(2) } # Add chart on slide specs2 = { 'height': Cm(8.25), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(10.25) } self._create_plot(df=df, title=titles[0], specs=specs, graph_type=graph_types[0], ix=0) self._create_plot(df=df1, title=titles[1], specs=specs1, graph_type=graph_types[1], ix=1) self._create_plot(df=df2, title=titles[2], specs=specs2, graph_type=graph_types[2], ix=2) # If number of graph is equal to 3 (4 graphs on one slide) set specs that each graph will be put on quarter of page if self.num_graphs == 3: # Add chart on slide specs = { 'height': Cm(8.25), 'width': Cm(15.26), 'left': Cm(0.5), 'top': Cm(2) } specs1 = { 'height': Cm(8.25), 'width': Cm(15.26), 'left': Cm(0.5), 'top': Cm(10.25) } # Add chart on slide specs2 = { 'height': Cm(8.25), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(2) } # Add chart on slide specs3 = { 'height': Cm(8.25), 'width': Cm(15.26), 'left': Cm(17.5), 'top': Cm(10.25) } self._create_plot(df=df, title=titles[0], specs=specs, graph_type=graph_types[0], ix=0) self._create_plot(df=df1, title=titles[1], specs=specs1, graph_type=graph_types[1], ix=1) self._create_plot(df=df2, title=titles[2], specs=specs2, graph_type=graph_types[2], ix=2) self._create_plot(df=df3, title=titles[3], specs=specs3, graph_type=graph_types[3], ix=3) def _set_transparency(self, transparency, elm): """ The function set the transparency of the row. :param transparency: the transparency in % :type transparency: int :param elm: the element which transparency should be changed :type elm: format.line.color._xFill """ a = str(100 - transparency) + '196' alpha = OxmlElement('a:alpha') alpha.set('val', a) elm.srgbClr.append(alpha) def _create_plot(self, df, title, specs, graph_type, legend=None, ix=0): """ The function creating the new graph into the presentation based on the graph type. :param df: the dataframe with data to be shown :type df: pandas dataframe :param title: the title of the graph :type title: str :param specs: the position settings :type specs: dictionary :param graph_type: the type of graph (normal or stacked) :type graph_type: str :param legend: the list of values in legend based on columns (only for stacked barplot) :type legend: list :param ix: the index which legend should be used :type ix: int """ if graph_type == "normal": # Get column names of dataframe column_names = df.columns.tolist() index = column_names.index(self.categories_column) # 1st chart (left side) - nationally sample chart_data = ChartData() chart_data.categories = df[self.categories_column].tolist() chart_data.add_series(column_names[index+1], df[column_names[index+1]].tolist()) chart = self.slide.shapes.add_chart( XL_CHART_TYPE.COLUMN_CLUSTERED, specs['left'], specs['top'], specs['width'], specs['height'], chart_data).chart # Get series of chart series = chart.series[0] number_of_series = len(df[self.categories_column].tolist()) series.points[0].format.fill.solid() series.points[0].format.fill.fore_color.rgb = self.colors['blue'] if (number_of_series >= 2): series.points[1].format.fill.solid() series.points[1].format.fill.fore_color.rgb = self.colors['orange'] if (number_of_series >= 3): series.points[2].format.fill.solid() series.points[2].format.fill.fore_color.rgb = self.colors['green'] # Get plot plot = chart.plots[0] # Set for each bar same color plot.vary_by_categories = True # Show data labels and set font plot.has_data_labels = True data_labels = plot.data_labels data_labels.font.size = self.data_label_font_size data_labels.font.bold = True data_labels.font.name = self.font_name chart_text = chart.chart_title.text_frame chart_text.text = title chart_text.paragraphs[0].font.name = self.font_name chart_text.paragraphs[0].font.size = Pt(14) chart_text.paragraphs[0].font.color.rgb = RGBColor(89, 89, 89) # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = self.category_font_size tick_labels.font.name = self.font_name # Don't show major gridlines #value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = True value_axis.major_gridlines.format.line.color.rgb = RGBColor(217, 217, 217) value_axis.major_gridlines.format.line.width = Pt(0.5) # Set range of axis value_axis.minimum_scale = 0 values = df[column_names[index+1]].tolist() max_value = max(values) if '%' in title and max_value >= 90: value_axis.maximum_scale = 100 else: value_axis.maximum_scale = math.ceil(max_value / 10.0) * 10 value_axis.visible = False # Value for y-axis (change font size, name, and other things) category_axis = chart.category_axis # Delete tick marks category_axis.major_tick_mark = XL_TICK_MARK.NONE category_axis.major_unit = 1 category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name # Create stacked barplot else: # Get column names of dataframe column_names = df.columns.tolist() index = column_names.index(self.categories_column) + 1 legend = self.legends[ix] number_of_series = len(legend) # 1st dataframe (nationally sample) chart_data = ChartData() chart_data.categories = df[self.categories_column].tolist() # Add data in each category chart_data.add_series(legend[0], df[column_names[index]].tolist()) if (number_of_series >= 2): chart_data.add_series(legend[1], df[column_names[index+1]].tolist()) if (number_of_series >= 3): chart_data.add_series(legend[2], df[column_names[index+2]].tolist()) if (number_of_series >= 4): chart_data.add_series(legend[3], df[column_names[index+3]].tolist()) if (number_of_series >= 5): chart_data.add_series(legend[4], df[column_names[index+4]].tolist()) if (number_of_series >= 6): chart_data.add_series(legend[5], df[column_names[index+5]].tolist()) if (number_of_series >= 7): chart_data.add_series(legend[6], df[column_names[index+6]].tolist()) if (number_of_series >= 8): chart_data.add_series(legend[7], df[column_names[index+7]].tolist()) chart = self.slide.shapes.add_chart( XL_CHART_TYPE.COLUMN_STACKED, specs['left'],specs['top'], specs['width'],specs['height'], chart_data).chart series = chart.series[0] # Get series of chart chart.series[0].format.fill.solid() chart.series[0].format.fill.fore_color.rgb = self.colors['blue'] if (number_of_series >= 2): chart.series[1].format.fill.solid() chart.series[1].format.fill.fore_color.rgb = self.colors['orange'] if (number_of_series >= 3): chart.series[2].format.fill.solid() chart.series[2].format.fill.fore_color.rgb = self.colors['green'] if (number_of_series >= 4): chart.series[3].format.fill.solid() chart.series[3].format.fill.fore_color.rgb = self.colors['grey'] if (number_of_series >= 5): chart.series[4].format.fill.solid() chart.series[4].format.fill.fore_color.rgb = self.colors['violet'] if (number_of_series >= 6): chart.series[5].format.fill.solid() chart.series[5].format.fill.fore_color.rgb = self.colors['yellow'] # Value for x-axis (change font size, name, and other things) value_axis = chart.value_axis tick_labels = value_axis.tick_labels tick_labels.font.size = Pt(11) tick_labels.font.name = self.font_name value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE # Don't show major gridlines #value_axis.major_tick_mark = XL_TICK_MARK.OUTSIDE value_axis.has_major_gridlines = True value_axis.major_gridlines.format.line.color.rgb = RGBColor(217, 217, 217) value_axis.major_gridlines.format.line.width = Pt(0.5) # Set range of axis value_axis.minimum_scale = 0 value_axis.maximum_scale = 100 value_axis.visible = True # Set 100% transparency to value axis value_axis.format.line.color.rgb = RGBColor(0, 0, 0) solidFill = value_axis.format.line.color._xFill self._set_transparency(100, solidFill) category_axis = chart.category_axis category_axis.format.line.color.rgb = RGBColor(0, 0, 0) solidFill = category_axis.format.line.color._xFill self._set_transparency(100, solidFill) category_axis.major_tick_mark = XL_TICK_MARK.NONE category_labels = category_axis.tick_labels category_labels.font.size = self.category_font_size category_labels.font.name = self.font_name category_labels.tickLblSkip = 1 # Set legend chart.has_legend = True chart.legend.position = XL_LEGEND_POSITION.BOTTOM chart.legend.include_in_layout = False chart.legend.font.name = self.font_name chart.legend.font.size = Pt(14) chart_text = chart.chart_title.text_frame chart_text.text = title chart_text.paragraphs[0].font.size = Pt(18) chart_text.paragraphs[0].font.color.rgb = RGBColor(89, 89, 89)
42.582896
329
0.616032
9,859
81,163
4.896338
0.056294
0.04371
0.015951
0.01796
0.851304
0.811903
0.790918
0.762207
0.738487
0.720423
0
0.017273
0.268866
81,163
1,905
330
42.605249
0.796212
0.167034
0
0.741228
1
0
0.128649
0.003332
0
0
0
0
0
1
0.015789
false
0
0.015789
0
0.039474
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
15c66488040901a663574cbbc6754f80ac664ce9
266
py
Python
events/templatetags/events_tags.py
Engerrs/ckan.org
a5a9b63b0ca16cb5aa4f709f7a264b8f6c265158
[ "BSD-3-Clause" ]
1
2022-03-18T03:20:00.000Z
2022-03-18T03:20:00.000Z
events/templatetags/events_tags.py
Engerrs/ckan.org
a5a9b63b0ca16cb5aa4f709f7a264b8f6c265158
[ "BSD-3-Clause" ]
26
2021-07-07T08:42:42.000Z
2022-03-29T14:34:59.000Z
events/templatetags/events_tags.py
Engerrs/ckan.org
a5a9b63b0ca16cb5aa4f709f7a264b8f6c265158
[ "BSD-3-Clause" ]
3
2021-07-07T22:11:03.000Z
2021-09-15T18:19:10.000Z
from django import template register = template.Library() @register.simple_tag() def event_start(start_date): return start_date.strftime("%d %B %Y - %H:%M") @register.simple_tag() def event_start_date(start_date): return start_date.strftime("%d %B %Y")
19
50
0.721805
40
266
4.575
0.475
0.245902
0.185792
0.218579
0.710383
0.710383
0.382514
0.382514
0.382514
0
0
0
0.135338
266
13
51
20.461538
0.795652
0
0
0.25
0
0
0.090566
0
0
0
0
0
0
1
0.25
false
0
0.125
0.25
0.625
0
0
0
0
null
1
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
7
c614d702722e2565dd668a847c81682c44a0e825
38,846
py
Python
pysnmp/HUAWEI-L2VPN-OAM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/HUAWEI-L2VPN-OAM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/HUAWEI-L2VPN-OAM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module HUAWEI-L2VPN-OAM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-L2VPN-OAM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:33:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint") hwDatacomm, = mibBuilder.importSymbols("HUAWEI-MIB", "hwDatacomm") HWL2VpnVcEncapsType, = mibBuilder.importSymbols("HUAWEI-VPLS-EXT-MIB", "HWL2VpnVcEncapsType") ifName, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "ifName", "InterfaceIndexOrZero") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") ModuleIdentity, MibIdentifier, Gauge32, ObjectIdentity, Bits, TimeTicks, IpAddress, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, iso, Counter64, Integer32, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "MibIdentifier", "Gauge32", "ObjectIdentity", "Bits", "TimeTicks", "IpAddress", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "iso", "Counter64", "Integer32", "Unsigned32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") hwL2vpnOamTrap = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9)) hwL2vpnOamTrap.setRevisions(('2013-09-05 14:00', '2013-05-13 13:30', '2013-03-25 14:52',)) if mibBuilder.loadTexts: hwL2vpnOamTrap.setLastUpdated('201309051400Z') if mibBuilder.loadTexts: hwL2vpnOamTrap.setOrganization('Huawei Technologies Co.,Ltd.') hwL2Vpn = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119)) hwL2vpnOamTrapMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1)) hwL2vpnServiceType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("vpwsPw", 0), ("vplsPw", 1)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnServiceType.setStatus('current') hwL2vpnProtocolType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("static", 0), ("ldp", 1), ("bgp", 2)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnProtocolType.setStatus('current') hwL2vpnVcID = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 3), Unsigned32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnVcID.setStatus('current') hwL2vpnVcType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 4), HWL2VpnVcEncapsType()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnVcType.setStatus('current') hwL2vpnPeerAddr = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 5), IpAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnPeerAddr.setStatus('current') hwL2vpnIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 6), InterfaceIndexOrZero()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnIfIndex.setStatus('current') hwL2vpnPwMaster = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("primary", 1), ("second", 2)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnPwMaster.setStatus('current') hwL2vpnRmtSiteID = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 8), Unsigned32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnRmtSiteID.setStatus('current') hwL2vpnInLabel = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 9), Unsigned32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnInLabel.setStatus('current') hwL2vpnOutLabel = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 10), Unsigned32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnOutLabel.setStatus('current') hwL2vpnIfName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 11), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnIfName.setStatus('current') hwL2vpnVsiName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 1, 12), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwL2vpnVsiName.setStatus('current') hwL2vpnOamMIBTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2)) hwL2vpnOamDloc = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 1)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamDloc.setStatus('current') hwL2vpnOamDlocClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 2)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamDlocClear.setStatus('current') hwL2vpnOamSd1Near = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 3)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd1Near.setStatus('current') hwL2vpnOamSd1NearClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 4)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd1NearClear.setStatus('current') hwL2vpnOamRdi = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 5)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamRdi.setStatus('current') hwL2vpnOamRdiClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 6)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamRdiClear.setStatus('current') hwL2vpnOamMeg = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 7)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMeg.setStatus('current') hwL2vpnOamMegClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 8)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMegClear.setStatus('current') hwL2vpnOamMep = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 9)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMep.setStatus('current') hwL2vpnOamMepClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 10)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMepClear.setStatus('current') hwL2vpnOamPeriod = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 11)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamPeriod.setStatus('current') hwL2vpnOamPeriodClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 12)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamPeriodClear.setStatus('current') hwL2vpnOamAis = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 13)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamAis.setStatus('current') hwL2vpnOamAisClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 14)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamAisClear.setStatus('current') hwL2vpnOamSd2Near = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 15)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd2Near.setStatus('current') hwL2vpnOamSd2NearClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 16)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd2NearClear.setStatus('current') hwL2vpnOamLck = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 17)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamLck.setStatus('current') hwL2vpnOamLckClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 18)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamLckClear.setStatus('current') hwL2vpnOamCsf = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 19)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamCsf.setStatus('current') hwL2vpnOamCsfClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 20)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamCsfClear.setStatus('current') hwL2vpnOamExcess = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 21)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamExcess.setStatus('current') hwL2vpnOamExcessClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 22)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamExcessClear.setStatus('current') hwL2vpnOamMismatch = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 23)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMismatch.setStatus('current') hwL2vpnOamMismatchClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 24)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMismatchClear.setStatus('current') hwL2vpnOamMismerge = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 25)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMismerge.setStatus('current') hwL2vpnOamMismergeClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 26)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamMismergeClear.setStatus('current') hwL2vpnOamFail = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 27)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamFail.setStatus('current') hwL2vpnOamFailClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 28)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamFailClear.setStatus('current') hwL2vpnOamDbdi = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 29)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamDbdi.setStatus('current') hwL2vpnOamDbdiClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 30)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamDbdiClear.setStatus('current') hwL2vpnOamUnknown = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 31)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamUnknown.setStatus('current') hwL2vpnOamUnknownClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 32)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamUnknownClear.setStatus('current') hwL2vpnOamLocalLock = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 33)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamLocalLock.setStatus('current') hwL2vpnOamLocalLockClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 34)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamLocalLockClear.setStatus('current') hwL2vpnOamSd1Far = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 35)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd1Far.setStatus('current') hwL2vpnOamSd1FarClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 36)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd1FarClear.setStatus('current') hwL2vpnOamSd2Far = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 37)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd2Far.setStatus('current') hwL2vpnOamSd2FarClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 38)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamSd2FarClear.setStatus('current') hwL2vpnOamFdi = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 39)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamFdi.setStatus('current') hwL2vpnOamFdiClear = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 2, 40)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if mibBuilder.loadTexts: hwL2vpnOamFdiClear.setStatus('current') hwL2vpnOamConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 3)) hwL2vpnOamMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 3, 1)) hwL2vpnOamMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 3, 1, 1)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamGroup"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwL2vpnOamMIBCompliance = hwL2vpnOamMIBCompliance.setStatus('current') hwL2vpnOamGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 3, 2)) hwL2vpnOamGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 3, 2, 1)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnServiceType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnProtocolType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVcType"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPeerAddr"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfIndex"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnPwMaster"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnRmtSiteID"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnInLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOutLabel"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnIfName"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnVsiName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwL2vpnOamGroup = hwL2vpnOamGroup.setStatus('current') hwL2vpnOamNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 119, 9, 3, 2, 2)).setObjects(("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamDloc"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamDlocClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd1Near"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd1NearClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamRdi"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamRdiClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMeg"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMegClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMep"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMepClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamPeriod"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamPeriodClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamAis"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamAisClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd2Near"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd2NearClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamLck"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamLckClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamCsf"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamCsfClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamExcess"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamExcessClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMismatch"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMismatchClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMismerge"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamMismergeClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamFail"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamFailClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamDbdi"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamDbdiClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamUnknown"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamUnknownClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamLocalLock"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamLocalLockClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd1Far"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd1FarClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd2Far"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamSd2FarClear"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamFdi"), ("HUAWEI-L2VPN-OAM-MIB", "hwL2vpnOamFdiClear")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwL2vpnOamNotificationGroup = hwL2vpnOamNotificationGroup.setStatus('current') mibBuilder.exportSymbols("HUAWEI-L2VPN-OAM-MIB", hwL2vpnOamLocalLock=hwL2vpnOamLocalLock, hwL2vpnOutLabel=hwL2vpnOutLabel, hwL2vpnOamMismerge=hwL2vpnOamMismerge, hwL2vpnOamDbdi=hwL2vpnOamDbdi, hwL2vpnOamDlocClear=hwL2vpnOamDlocClear, hwL2vpnProtocolType=hwL2vpnProtocolType, hwL2vpnOamFailClear=hwL2vpnOamFailClear, hwL2Vpn=hwL2Vpn, hwL2vpnOamMIBTraps=hwL2vpnOamMIBTraps, hwL2vpnOamFail=hwL2vpnOamFail, hwL2vpnServiceType=hwL2vpnServiceType, hwL2vpnOamAisClear=hwL2vpnOamAisClear, hwL2vpnOamMIBCompliance=hwL2vpnOamMIBCompliance, hwL2vpnOamMep=hwL2vpnOamMep, hwL2vpnOamSd2Near=hwL2vpnOamSd2Near, hwL2vpnVsiName=hwL2vpnVsiName, hwL2vpnRmtSiteID=hwL2vpnRmtSiteID, hwL2vpnOamLck=hwL2vpnOamLck, hwL2vpnIfName=hwL2vpnIfName, hwL2vpnOamExcess=hwL2vpnOamExcess, hwL2vpnOamSd1NearClear=hwL2vpnOamSd1NearClear, hwL2vpnOamMeg=hwL2vpnOamMeg, hwL2vpnOamSd2NearClear=hwL2vpnOamSd2NearClear, hwL2vpnOamMIBCompliances=hwL2vpnOamMIBCompliances, hwL2vpnOamGroups=hwL2vpnOamGroups, hwL2vpnOamRdi=hwL2vpnOamRdi, hwL2vpnOamMismatchClear=hwL2vpnOamMismatchClear, hwL2vpnInLabel=hwL2vpnInLabel, hwL2vpnOamTrap=hwL2vpnOamTrap, hwL2vpnOamMegClear=hwL2vpnOamMegClear, hwL2vpnOamPeriod=hwL2vpnOamPeriod, hwL2vpnOamRdiClear=hwL2vpnOamRdiClear, hwL2vpnOamAis=hwL2vpnOamAis, hwL2vpnPeerAddr=hwL2vpnPeerAddr, hwL2vpnOamUnknown=hwL2vpnOamUnknown, hwL2vpnOamDloc=hwL2vpnOamDloc, hwL2vpnOamUnknownClear=hwL2vpnOamUnknownClear, hwL2vpnOamCsfClear=hwL2vpnOamCsfClear, hwL2vpnPwMaster=hwL2vpnPwMaster, hwL2vpnOamTrapMIBObjects=hwL2vpnOamTrapMIBObjects, PYSNMP_MODULE_ID=hwL2vpnOamTrap, hwL2vpnOamSd2Far=hwL2vpnOamSd2Far, hwL2vpnOamPeriodClear=hwL2vpnOamPeriodClear, hwL2vpnOamFdi=hwL2vpnOamFdi, hwL2vpnOamGroup=hwL2vpnOamGroup, hwL2vpnVcID=hwL2vpnVcID, hwL2vpnOamDbdiClear=hwL2vpnOamDbdiClear, hwL2vpnOamSd1Far=hwL2vpnOamSd1Far, hwL2vpnOamSd1FarClear=hwL2vpnOamSd1FarClear, hwL2vpnOamMepClear=hwL2vpnOamMepClear, hwL2vpnOamMismatch=hwL2vpnOamMismatch, hwL2vpnOamSd1Near=hwL2vpnOamSd1Near, hwL2vpnOamLckClear=hwL2vpnOamLckClear, hwL2vpnOamMismergeClear=hwL2vpnOamMismergeClear, hwL2vpnOamConformance=hwL2vpnOamConformance, hwL2vpnOamCsf=hwL2vpnOamCsf, hwL2vpnOamFdiClear=hwL2vpnOamFdiClear, hwL2vpnOamExcessClear=hwL2vpnOamExcessClear, hwL2vpnOamLocalLockClear=hwL2vpnOamLocalLockClear, hwL2vpnOamSd2FarClear=hwL2vpnOamSd2FarClear, hwL2vpnIfIndex=hwL2vpnIfIndex, hwL2vpnVcType=hwL2vpnVcType, hwL2vpnOamNotificationGroup=hwL2vpnOamNotificationGroup)
273.56338
2,411
0.731349
4,410
38,846
6.441723
0.049887
0.207934
0.264644
0.321353
0.722226
0.701141
0.683258
0.677591
0.677591
0.677591
0
0.07495
0.061654
38,846
141
2,412
275.503546
0.704398
0.008598
0
0.022556
0
0
0.519596
0.007558
0
0
0
0
0
1
0
false
0
0.067669
0
0.067669
0
0
0
0
null
1
1
1
0
1
0
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
d66474144ba58d339f0033bfb94075f994b56334
24,323
py
Python
main.py
LiuCLab/multiphoton-selective-excitation
b93a61ec81cf216f71bcd68a94cdb192f4a401e7
[ "MIT" ]
null
null
null
main.py
LiuCLab/multiphoton-selective-excitation
b93a61ec81cf216f71bcd68a94cdb192f4a401e7
[ "MIT" ]
null
null
null
main.py
LiuCLab/multiphoton-selective-excitation
b93a61ec81cf216f71bcd68a94cdb192f4a401e7
[ "MIT" ]
null
null
null
"""main Main file to run to create figures 2-5 in the paper. All values are in SI units (m, s, T, etc) unless otherwise noted. Dependencies: sigpy (https://sigpy.readthedocs.io/en/latest/mri_rf.html) numpy scipy matplotlib Author: Victor Han Last Modified: 6/2/21 """ import numpy as np import sigpy as sp import sigpy.mri as mr import sigpy.mri.rf as rf import sigpy.plot as pl import scipy.signal as signal import matplotlib.pyplot as plt from scipy.special import * from scipy.integrate import odeint import matplotlib.gridspec as gridspec import csv from various_constants import * from pulse_generator_functions import * from simulation_functions import * from plotting_functions import * ################################################################# # Make Figure 2: equivalent single-photon, two-photon, and freq mod slice select # Make a grid of subplots and label the rows and columns fig = plt.figure(figsize=(20, 10)) cols = 2+SEQUENCE_PLOT_END # Number of columns used for pulse sequence plot outer = gridspec.GridSpec(4, cols, wspace=1, hspace=0.3) ax = plt.Subplot(fig, outer[cols]) t = ax.text(0.7,0.2, 'Single-Photon', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[2*cols]) t = ax.text(0.7,0.2, 'Two-Photon', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[3*cols]) t = ax.text(0.7,-0.1, 'Frequency Modulation', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[1:SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Pulse Sequence', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Simulation Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END+1]) t = ax.text(0.5,0, 'Experimental Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) # 2a) Make single photon version pulse = slr_pulse(N, TB, FA, name='2a') bz_pulse = np.zeros(N) gz_pulse = np.zeros(N) sim_duration = PULSE_DURATION*1.5 t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, np.zeros(N)) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[cols+1:cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz) if PRINT_MAX_VALS: print('2a max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[cols+SEQUENCE_PLOT_END+1], '2a.npy') # 2b) Make two-photon version pulse = slr_pulse(N, TB, FA, freq=FZ, phase=g*B1Z_AMP/(2*np.pi*FZ)-np.pi/2, name='2b') / (j1(g/(2*np.pi*FZ) * B1Z_AMP)) bz_pulse = B1Z_AMP * np.sin(2e-6*np.arange(N)*2*np.pi*FZ) t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[2*cols+1:2*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz) if PRINT_MAX_VALS: print('2b max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[2*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[2*cols+SEQUENCE_PLOT_END+1], '2b.npy') # 2c) Make frequency modulated version pulse = fm_pulse(N, TB, FA, FZ, B1Z_AMP, phase=g*B1Z_AMP/(2*np.pi*FZ)-np.pi/2, name='2c') bz_pulse = np.zeros(N) t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[3*cols+1:3*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz) if PRINT_MAX_VALS: print('2c max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[3*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[3*cols+SEQUENCE_PLOT_END+1], '2c.npy') plt.savefig("figure2.pdf") ################################################################# # Make Figure 3: slice shifting # Make a grid of subplots and label the rows and columns fig = plt.figure(figsize=(20, 10)) cols = 2+SEQUENCE_PLOT_END outer = gridspec.GridSpec(4, cols, wspace=1, hspace=0.3) ax = plt.Subplot(fig, outer[cols]) t = ax.text(0.7,0.3, r'$\omega_{xy}$ Shift', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[2*cols]) t = ax.text(0.7,0.2, r'Constant $B_{1z}$', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[3*cols]) t = ax.text(0.7,0.3, r'$\omega_{z}$ Shift', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[1:SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Pulse Sequence', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Simulation Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END+1]) t = ax.text(0.5,0, 'Experimental Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) # 3a) Shifting using wxy offset f_offset = 2*TB/PULSE_DURATION if PRINT_MAX_VALS: print('3 frequency offset: ' + str(f_offset)) pulse = slr_pulse(N, TB, FA, freq=(FZ-f_offset), phase=g*B1Z_AMP/(2*np.pi*FZ)-np.pi/2, name='3a') / (j1(g/(2*np.pi*FZ) * B1Z_AMP)) # this is actually increasing the frequency bz_pulse = B1Z_AMP * np.sin(2e-6*np.arange(N)*2*np.pi*FZ) t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[cols+1:cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz) if PRINT_MAX_VALS: print('3a max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[cols+SEQUENCE_PLOT_END+1], '3a.npy') # 3b) Shifting using constant B1z pulse = slr_pulse(N, TB, FA, freq=FZ, phase=g*B1Z_AMP/(2*np.pi*FZ)-np.pi/2, name='3b') / (j1(g/(2*np.pi*FZ) * B1Z_AMP)) bz_pulse = B1Z_AMP * np.sin(2e-6*np.arange(N)*2*np.pi*FZ) t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse, dc_value=-2*np.pi*f_offset/g) # subtract to get the same direction as adding wxy Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[2*cols+1:2*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz) if PRINT_MAX_VALS: print('3b max B1xy: ' + str(np.max(np.abs(pulse)))) print('3b rise-time: ' + str(SLICE_PEAK/SLEW_LIMIT)) if WRITE_WAVEFORM_FILES: make_b1z_csv(bz_pulse, SLICE_PEAK, PULSE_DURATION, '3b.csv', dc_value=-2*np.pi*f_offset/g) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION, 0, -2*np.pi*f_offset/g),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[2*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[2*cols+SEQUENCE_PLOT_END+1], '3b.npy') # 3c) Shifitng using wz offset pulse = slr_pulse(N, TB, FA, freq=FZ, phase=g*B1Z_AMP/(2*np.pi*FZ)-np.pi/2, name='3c') / (j1(g/(2*np.pi*(FZ+f_offset)) * B1Z_AMP)) # compensate for different wz freq bz_pulse = B1Z_AMP * np.sin(2e-6*np.arange(N)*2*np.pi*(FZ+f_offset)) t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[3*cols+1:3*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz) if PRINT_MAX_VALS: print('3c max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[3*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[3*cols+SEQUENCE_PLOT_END+1], '3c.npy') plt.savefig("figure3.pdf") ################################################################# # Make Figure 4: Modulation using B1z or B1xy # Make a grid of subplots and label the rows and columns fig = plt.figure(figsize=(20, 10)) cols = 2+SEQUENCE_PLOT_END outer = gridspec.GridSpec(4, cols, wspace=1, hspace=0.3) ax = plt.Subplot(fig, outer[cols]) t = ax.text(0.7,0.1, r'$B_{1xy}$ Mod Two-Photon', fontsize=CATEGORY_SIZE-2, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[2*cols]) t = ax.text(0.7,0.1, r'$B_{1z}$ Mod Two-Photon', fontsize=CATEGORY_SIZE-2, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[3*cols]) t = ax.text(0.7,0.1, 'Both Mod Two-Photon', fontsize=CATEGORY_SIZE-2, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[1:SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Pulse Sequence', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Simulation Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END+1]) t = ax.text(0.5,0, 'Experimental Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) # 4a) Two-photon slice selection using B1xy modulation pulse = slr_pulse(N_FIG4, TB_FIG4, FA, freq=FZ, name='4a') / (j1(g/(2*np.pi*FZ) * B1Z_AMP)) bz_pulse = -1*B1Z_AMP * np.cos(2e-6*np.arange(N_FIG4)*2*np.pi*FZ) sim_duration_fig4 = PULSE_DURATION_FIG4*1.5 if WRITE_WAVEFORM_FILES: write_rf_pulse_for_heartvista(pulse, '4a') t = np.linspace(0,sim_duration_fig4,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, gz_pulse) plot_waveform(fig, outer[cols+1:cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz, zoom_time=[5.9, 6.1]) if PRINT_MAX_VALS: print('4a max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration_fig4, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK_FIG4, PULSE_DURATION_FIG4),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[cols+SEQUENCE_PLOT_END+1], '4a.npy') # 4b) Two-photon slice selection using B1z modulation max_bessel_arg = g*B1Z_AMP/(2*np.pi*FZ) pulse = slr_pulse(N_FIG4, TB_FIG4, FA, freq=0) scale = np.max(np.abs(pulse)) / j1(max_bessel_arg) pulse = pulse / np.max(np.abs(pulse)) * j1(max_bessel_arg) pulse_bz1 = np.zeros(len(pulse)) from scipy.optimize import minimize def diff(x,a): yt = j1(x) return (yt - a )**2 for i in range(len(pulse)): res = minimize(diff, 0, args=(np.real(pulse[i])), bounds=[(-max_bessel_arg, max_bessel_arg)]) pulse_bz1[i] = res.x[0] bz_pulse = -1*pulse_bz1 * 2*np.pi*FZ/g * np.cos(2e-6*np.arange(N_FIG4)*2*np.pi*FZ) # lets make this a cos to get rid of phase differences if WRITE_WAVEFORM_FILES: make_b1z_csv(bz_pulse, SLICE_PEAK, PULSE_DURATION_FIG4, '4b.csv') pulse = np.zeros(len(pulse), dtype=complex) for i in range(len(pulse)): pulse[i] = scale * np.complex(np.cos(2e-6*i*2*np.pi*FZ), np.sin(2e-6*i*2*np.pi*FZ)) if WRITE_WAVEFORM_FILES: write_rf_pulse_for_heartvista(pulse, '4b') t = np.linspace(0,sim_duration_fig4,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, gz_pulse) plot_waveform(fig, outer[2*cols+1:2*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz, zoom_time=[5.9, 6.1]) if PRINT_MAX_VALS: print('4b max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration_fig4, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK_FIG4, PULSE_DURATION_FIG4),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[2*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[2*cols+SEQUENCE_PLOT_END+1], '4b.npy') # 4c) Two-photon slice selection using both B1xy and B1z modulation pulse = slr_pulse(N_FIG4, TB_FIG4, FA, freq=0) / j1(g/(2*np.pi*FZ) * B1Z_AMP) for i in range(len(pulse)): if i<N_FIG4/2: pulse[i] = scale else: bz_pulse[i] = -1*B1Z_AMP * np.cos(2e-6*i*2*np.pi*FZ) pulse[i] = pulse[i] * np.complex(np.cos(2e-6*i*2*np.pi*FZ), np.sin(2e-6*i*2*np.pi*FZ)) if WRITE_WAVEFORM_FILES: write_rf_pulse_for_heartvista(pulse, '4c') make_b1z_csv(bz_pulse, SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, '4c.csv') t = np.linspace(0,sim_duration_fig4,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK_FIG4, PULSE_DURATION_FIG4, gz_pulse) plot_waveform(fig, outer[3*cols+1:3*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz, zoom_time=[5.9, 6.1]) if PRINT_MAX_VALS: print('4c max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration_fig4, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK_FIG4, PULSE_DURATION_FIG4),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[3*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[3*cols+SEQUENCE_PLOT_END+1], '4c.npy') plt.savefig("figure4.pdf") ################################################################# # Make Figure 5: Multislice # Make a grid of subplots and label the rows and columns fig = plt.figure(figsize=(20, 10)) cols = 2+SEQUENCE_PLOT_END outer = gridspec.GridSpec(4, cols, wspace=1, hspace=0.3) ax = plt.Subplot(fig, outer[cols]) t = ax.text(0.7,0.0, 'Free Unequal Slices', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[2*cols]) t = ax.text(0.7,0.0, r'Naive $\omega_{xy}$ Shifting', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[3*cols]) t = ax.text(0.7,0.0, 'Shifted Multislice', fontsize=CATEGORY_SIZE, rotation=90) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[1:SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Pulse Sequence', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END]) t = ax.text(0.5,0, 'Simulation Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) ax = plt.Subplot(fig, outer[SEQUENCE_PLOT_END+1]) t = ax.text(0.5,0, 'Experimental Slice Profile', fontsize=CATEGORY_SIZE) t.set_ha('center') ax.axis("off") fig.add_subplot(ax) # 5a) Multiphoton multislice RF pulse using oscillating gradients acdc_ratio = 1.5 FZ = TB/PULSE_DURATION * 2 SLICE_PEAK = TB/PULSE_DURATION * 2*np.pi/g * 1/THICKNESS pulse = slr_pulse(N, TB, FA, name="5a") bz_pulse = np.zeros(N) gz_pulse = SLICE_PEAK * acdc_ratio * np.sin(2e-6*np.arange(N)*2*np.pi*FZ) sim_duration = 1.5 * PULSE_DURATION t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) # Now to save the gz waveform if WRITE_WAVEFORM_FILES: write_gz_pulse_for_heartvista(gz_pulse, SLICE_PEAK, PULSE_DURATION, '5a_gz') plot_waveform(fig, outer[cols+1:cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz, zoom_time=[2, 3.1]) if PRINT_MAX_VALS: print('5a max B1xy: ' + str(np.max(np.abs(pulse)))) print('5a max gz: ' + str(np.max(np.abs(Gz)))) print('5a time to RF start: ' + str(SLICE_PEAK/SLEW_LIMIT)) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION, acdc_ratio*SLICE_PEAK/(2*np.pi*FZ)),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[cols+SEQUENCE_PLOT_END+1], '5a.npy', ylim=[0,10000]) # Max y-value is decreased because higher receiver attenuation was used to not saturate the receiver # 5b) Shifting the slice via B1xy frequency alone does not work shift_f = FZ pulse = slr_pulse(N, TB, FA, freq=FZ, name="5b") t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[2*cols+1:2*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz, zoom_time=[2, 3.1]) if PRINT_MAX_VALS: print('5b max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION, acdc_ratio*SLICE_PEAK/(2*np.pi*FZ)),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[2*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[2*cols+SEQUENCE_PLOT_END+1], '5b.npy', ylim=[0,10000]) # Max y-value is decreased because higher receiver attenuation was used to not saturate the receiver # 5c) Shifting the slice via B1xy frequency and a B1z works B1Z_AMP = 2*np.pi*shift_f/g * acdc_ratio pulse = fm_pulse(N, TB, FA*j1(g*B1Z_AMP/(2*np.pi*FZ)), FZ, B1Z_AMP, phase=g*B1Z_AMP/(2*np.pi*FZ)-np.pi/2, name='5c') t = np.linspace(0,sim_duration,WAVEFORM_RES) RF = np.zeros(len(t), dtype=complex) B1z = np.zeros(len(t)) Gz = np.zeros(len(t)) for i in range(len(t)): RF[i] = bxy_waveform(t[i], SLICE_PEAK, PULSE_DURATION, pulse) B1z[i] = bz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, bz_pulse) Gz[i] = gz_waveform(t[i], SLICE_PEAK, PULSE_DURATION, gz_pulse) plot_waveform(fig, outer[3*cols+1:3*cols+SEQUENCE_PLOT_END], t, np.abs(RF), -1*np.angle(RF), B1z, Gz, zoom_time=[2, 3.1]) if PRINT_MAX_VALS: print('5c max B1xy: ' + str(np.max(np.abs(pulse)))) M = np.array([0, 0, M0]) t = np.linspace(0, sim_duration, 101) final_m = np.zeros(XRES, dtype=complex) x_vals = np.linspace(-XLIM,XLIM,XRES) for i in range(XRES): x = x_vals[i] y = 0 sol = odeint(bloch, M, t, args=(x, y, pulse, bz_pulse, gz_pulse, SLICE_PEAK, PULSE_DURATION, acdc_ratio*SLICE_PEAK/(2*np.pi*FZ)),atol=1e-7, rtol=1e-11, hmax=2e-6, mxstep=5000) final_m[i] = np.complex(sol[-1,0], sol[-1,1]) plot_sim(fig, outer[3*cols+SEQUENCE_PLOT_END], x_vals, np.abs(final_m), -1*np.angle(final_m)) plot_experiment(fig, outer[3*cols+SEQUENCE_PLOT_END+1], '5c.npy', ylim=[0,10000]) # Max y-value is decreased because higher receiver attenuation was used to not saturate the receiver plt.savefig("figure5.pdf") plt.show()
38.243711
182
0.690458
4,635
24,323
3.463215
0.062352
0.029903
0.048592
0.053451
0.873723
0.858647
0.843509
0.833603
0.824632
0.817655
0
0.040831
0.12297
24,323
635
183
38.303937
0.711654
0.072812
0
0.755144
0
0
0.048845
0
0
0
0
0
0
1
0.002058
false
0
0.032922
0
0.037037
0.032922
0
0
0
null
0
0
0
1
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
7
d69d3d8655a22218c8a71e8d7bbb8f0d0c00af07
61
py
Python
cscs-checks/libraries/boost/src/hello.py
mboisson/reframe
ebf0141596f19c7df60b59d8ad6211067f55b5e5
[ "BSD-3-Clause" ]
167
2017-11-14T20:37:28.000Z
2022-03-31T11:19:18.000Z
cscs-checks/libraries/boost/src/hello.py
mboisson/reframe
ebf0141596f19c7df60b59d8ad6211067f55b5e5
[ "BSD-3-Clause" ]
2,190
2017-06-14T12:48:13.000Z
2022-03-31T16:09:51.000Z
cscs-checks/libraries/boost/src/hello.py
victorusu/reframe
e98078a990e31a47604b06d674e4ee730c22cd44
[ "BSD-3-Clause" ]
83
2017-05-29T19:12:16.000Z
2022-03-18T09:49:21.000Z
import hello_boost_python print(hello_boost_python.greet())
15.25
33
0.852459
9
61
5.333333
0.666667
0.416667
0.666667
0
0
0
0
0
0
0
0
0
0.065574
61
3
34
20.333333
0.842105
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
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
1
0
7
ba505fb6e768b550d7dd051b4fa32758998f2285
84
py
Python
src/boofuzz_numbers/__init__.py
lucca-ruhland/boofuzz-numbers
76ecd5e7d1aa1bc02d5ba070078574968c33598f
[ "MIT" ]
null
null
null
src/boofuzz_numbers/__init__.py
lucca-ruhland/boofuzz-numbers
76ecd5e7d1aa1bc02d5ba070078574968c33598f
[ "MIT" ]
null
null
null
src/boofuzz_numbers/__init__.py
lucca-ruhland/boofuzz-numbers
76ecd5e7d1aa1bc02d5ba070078574968c33598f
[ "MIT" ]
null
null
null
from boofuzz_numbers.integer import s_int from boofuzz_numbers.float import s_float
28
41
0.880952
14
84
5
0.571429
0.314286
0.514286
0
0
0
0
0
0
0
0
0
0.095238
84
2
42
42
0.921053
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
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
7
ba52b2e8bbdb53a060492b6538bc96605c856c7d
155
py
Python
Python_proficiency_test/latex/codes/6.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
6
2020-04-24T08:16:51.000Z
2021-11-01T09:50:46.000Z
Python_proficiency_test/latex/codes/6.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
null
null
null
Python_proficiency_test/latex/codes/6.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
4
2021-02-17T20:21:31.000Z
2022-02-14T12:43:23.000Z
def foo(param1, *param2): print(param1) print(param2) def bar(param1, **param2): print(param1) print(param2) foo(1,2,3,4,5) bar(6,a=7,b=8)
17.222222
26
0.619355
28
155
3.428571
0.571429
0.25
0.354167
0.479167
0.708333
0.708333
0
0
0
0
0
0.125984
0.180645
155
8
27
19.375
0.629921
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0.5
1
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
8