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
52187f547ecadfeb484903a17a23a6767bc16f2f
638
py
Python
python/anyascii/_data/_225.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_225.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_225.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
b=' Ling Yan Dong Qi Tao Han Chi Song Quan Fung Han Hang Rou Qi Kai Yu Cha Cheng Yu Bing Cong Zhu Yu Mei Jue Liu Sao Yu Shuai Yuan Zhang Hong Shuai Chu Zhang San Xian Cui Meng Di Zhi Ao Xiu Pian Jiao Kuan Sa Xian Zha Dian Yi San Hui Shan Suot Chong Yi Xie Zhi Tiao Ping Xian Hang Xian Su Cuan Sau Sau Song Hei Xian You Yu Tai Jue Nang Dian Yi Bi At Gei Nai Xu Yi Ru Gong Yi Zhi Faan Zhi Xin Ji Xia Ruon Zhao Ne Xie Yi Yu Nham Tech Thit Fu She Yuan Fan Fu Wu Xi Hong Thoai Sau Ji Chang Lo Te Nguong Mo'
638
638
0.595611
119
638
3.193277
0.722689
0.031579
0
0
0
0
0
0
0
0
0
0
0.399687
638
1
638
638
0.992167
0
0
0
0
1
0.992175
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
5248cc19659be167976e22094deecc34faa509db
168
py
Python
committees/apps.py
meagles/site
c54a61a0e9e98788086d0d9300baebbcac7fb625
[ "MIT" ]
4
2021-08-16T23:42:50.000Z
2022-01-09T23:59:23.000Z
committees/apps.py
meagles/site
c54a61a0e9e98788086d0d9300baebbcac7fb625
[ "MIT" ]
29
2020-12-30T20:43:48.000Z
2022-03-23T01:57:32.000Z
committees/apps.py
meagles/site
c54a61a0e9e98788086d0d9300baebbcac7fb625
[ "MIT" ]
2
2021-08-20T01:18:07.000Z
2021-12-02T21:38:55.000Z
from django.apps import AppConfig class CommitteesConfig(AppConfig): name = "committees" def ready(self): import committees.signals.handlers # noqa
18.666667
50
0.714286
18
168
6.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.208333
168
8
51
21
0.902256
0.02381
0
0
0
0
0.061728
0
0
0
0
0
0
1
0.2
false
0
0.4
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
528e50e4766b02843541009e898fff909ac946b1
159
py
Python
python/DeepSeaVectorDraw/FillRule.py
akb825/DeepSea
fff790d0a472cf2f9f89de653e0b4470ce605d24
[ "Apache-2.0" ]
5
2018-11-17T23:13:22.000Z
2021-09-30T13:37:04.000Z
python/DeepSeaVectorDraw/FillRule.py
akb825/DeepSea
fff790d0a472cf2f9f89de653e0b4470ce605d24
[ "Apache-2.0" ]
null
null
null
python/DeepSeaVectorDraw/FillRule.py
akb825/DeepSea
fff790d0a472cf2f9f89de653e0b4470ce605d24
[ "Apache-2.0" ]
2
2019-09-23T12:23:35.000Z
2020-04-07T05:31:06.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: DeepSeaVectorDraw class FillRule(object): EvenOdd = 0 NonZero = 1
17.666667
68
0.742138
18
159
6.555556
1
0
0
0
0
0
0
0
0
0
0
0.015748
0.201258
159
8
69
19.875
0.913386
0.597484
0
0
1
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
8708079f7488a1cb8cca87ae4536eaf67560ffbc
12,436
py
Python
testing/test_users_endpoint.py
christopherthompson81/fastapi_demo
be6f2486ce810c9574fafb506a153560d1cbcd5e
[ "MIT" ]
5
2019-07-15T21:19:47.000Z
2021-08-07T16:37:25.000Z
testing/test_users_endpoint.py
christopherthompson81/fastapi_demo
be6f2486ce810c9574fafb506a153560d1cbcd5e
[ "MIT" ]
null
null
null
testing/test_users_endpoint.py
christopherthompson81/fastapi_demo
be6f2486ce810c9574fafb506a153560d1cbcd5e
[ "MIT" ]
1
2019-08-29T02:51:38.000Z
2019-08-29T02:51:38.000Z
''' Test FastAPI Demo /users ''' # Standard Imports import unittest # PyPi Imports # Local Imports from testing.TestFastAPI import TestFastAPI from utils.config_utils import get_config import utils.user_utils as user_utils ############################################################################### CONFIG = get_config('testing.cfg') TESTING = CONFIG['testing'] ############################################################################## # Testing class ############################################################################## class TestUsersEndpoint(TestFastAPI): '''Test Validator Functions''' def __init__(self, *args, **kwargs): #pylint: disable=W0235 super(TestUsersEndpoint, self).__init__(*args, **kwargs) self.remove_untaken_usernames() def __del__(self): self.remove_untaken_usernames() def remove_untaken_usernames(self): '''Clean up users created during user_creation tests''' untaken_usernames = ['untaken_username', 'untaken_username2', 'untaken_username3'] for untaken_username in untaken_usernames: user = user_utils.get_user_by_username(self.session, untaken_username) if user: user_utils.delete_user(self.session, user.user_id) def test_get_users(self): '''Test if REST API get:/users/ endpoint functions correctly''' test_dict = { 'http_method': 'get', 'path': '/users/', 'test_cases': [ { 'test_case_description': 'user_list_returned', 'http_status': 200, 'header_params': self.regular_token, 'message': 'User list not returned' } ] } self.template_test_endpoint_cases(test_dict=test_dict) def test_create_user(self): '''Test if REST API post:/users/ endpoint functions correctly''' test_dict = { 'http_method': 'post', 'path': '/users/', 'test_cases': [ { 'test_case_description': 'new_user_returned', 'http_status': 200, 'header_params': self.admin_token, 'body_params': { "username": "untaken_username", "first_name": "Test", "last_name": "User", "email": "untaken_username@test.ca", "password": "string" }, 'message': 'New user not returned' }, { 'test_case_description': 'insufficient_privilege', 'http_status': 403, 'expected_data': { 'detail': r'^Authenticated user lacks administrative privileges$' }, 'header_params': self.regular_token, 'body_params': { "username": 'untaken_username2', "first_name": "Test", "last_name": "User", "email": "untaken_username2@test.ca", "password": "string" }, 'message': 'Insufficient priviledge not returned' }, { 'test_case_description': 'username_unavailable', 'http_status': 409, 'expected_data': { 'detail': r'^Username already registered$' }, 'header_params': self.admin_token, 'body_params': { "username": TESTING['regular_user'], "first_name": "Test", "last_name": "User", "email": "untaken_username3@test.ca", "password": "string" }, 'message': 'Username was not rejected as duplicate' }, { 'test_case_description': 'invalid_email', 'http_status': 422, 'header_params': self.admin_token, 'body_params': { "username": 'untaken_username4', "first_name": "Test", "last_name": "User", "email": "bademail", "password": "string" }, 'message': 'Email was not rejected as badly formed' } ] } self.template_test_endpoint_cases(test_dict=test_dict) def test_get_user(self): '''Test if REST API get:/users/{user_id} endpoint functions correctly''' test_dict = { 'http_method': 'get', 'path': '/users/{user_id}', 'test_cases': [ { 'test_case_description': 'user_returned', 'http_status': 200, 'header_params': self.regular_token, 'path_params': {"user_id": self.regular_user.user_id}, 'message': 'User not returned' }, { 'test_case_description': 'no_such_user', 'http_status': 422, 'expected_data': { 'detail': r'^No such user_id$' }, 'header_params': self.regular_token, 'path_params': {"user_id": -1}, 'message': 'no_such_user error not returned' } ] } self.template_test_endpoint_cases(test_dict=test_dict) def test_update_user(self): '''Test if REST API put:/users/{user_id} endpoint functions correctly''' test_dict = { 'http_method': 'put', 'path': '/users/{user_id}', 'test_cases': [ { 'test_case_description': 'admin_updates_user', 'http_status': 200, 'header_params': self.admin_token, 'path_params': {"user_id": self.regular_user.user_id}, 'body_params': { "first_name": "Regular", "last_name": "User", "email": "regular_user@test.ca", }, 'message': 'User not updated' }, { 'test_case_description': 'insufficient_privilege', 'http_status': 403, 'expected_data': { 'detail': r'^Authenticated user lacks administrative privileges$' }, 'header_params': self.regular_token, 'path_params': {"user_id": self.inactive_user.user_id}, 'body_params': { "first_name": "Inactive", "last_name": "User", "email": "inactive_user@test.ca", }, 'message': 'Forbidden was not returned' }, { 'test_case_description': 'no_such_user', 'http_status': 422, 'expected_data': { 'detail': r'^No such user_id$' }, 'header_params': self.admin_token, 'path_params': {"user_id": -1}, 'body_params': { "first_name": "Test", "last_name": "User", "email": "untaken_username5@test.ca", }, 'message': 'no_such_user error not returned' } ] } self.template_test_endpoint_cases(test_dict=test_dict) def test_delete_user(self): '''Test if REST API delete:/users/{user_id} endpoint functions correctly''' test_user = self.get_test_user(TESTING['test_user'], TESTING['test_user_password']) # 403 is first because otherwise there would be no user for the 200 case to delete test_dict = { 'http_method': 'delete', 'path': '/users/{user_id}', 'test_cases': [ { 'test_case_description': 'insufficient_privilege', 'http_status': 403, 'expected_data': { 'detail': r'^Authenticated user lacks administrative privileges$' }, 'header_params': self.regular_token, 'path_params': {"user_id": test_user.user_id}, 'message': 'Forbidden was not returned' }, { 'test_case_description': 'admin_deletes_user', 'http_status': 200, 'header_params': self.admin_token, 'path_params': {"user_id": test_user.user_id}, 'message': 'User not deleted' }, { 'test_case_description': 'no_such_user', 'http_status': 422, 'expected_data': { 'detail': r'^No such user_id$' }, 'header_params': self.admin_token, 'path_params': {"user_id": -1}, 'message': 'no_such_user error not returned' } ] } self.template_test_endpoint_cases(test_dict=test_dict) def test_set_password(self): '''Test if REST API put:/users/{user_id}/set_password endpoint functions correctly''' test_user = self.get_test_user(TESTING['test_user'], TESTING['test_user_password']) test_token = self.get_authentication_token(TESTING['test_user'], 30) test_dict = { 'http_method': 'put', 'path': '/users/{user_id}/set_password', 'test_cases': [ { 'test_case_description': 'admin_sets_password', 'http_status': 200, 'header_params': self.admin_token, 'path_params': {"user_id": test_user.user_id}, 'query_params': {"password": "different_password"}, 'message': 'User password not changed' }, { 'test_case_description': 'user_sets_own_password', 'http_status': 200, 'header_params': test_token, 'path_params': {"user_id": test_user.user_id}, 'query_params': {"password": "different_password"}, 'message': 'Self-User password not changed' }, { 'test_case_description': 'insufficient_privilege', 'http_status': 403, 'expected_data': { 'detail': r'^Authenticated user lacks administrative privileges$' }, 'header_params': self.regular_token, 'path_params': {"user_id": test_user.user_id}, 'query_params': {"password": "different_password"}, 'message': 'Forbidden was not returned' }, { 'test_case_description': 'no_such_user', 'http_status': 422, 'expected_data': { 'detail': r'^No such user_id$' }, 'header_params': self.admin_token, 'path_params': {"user_id": -1}, 'query_params': {"password": "different_password"}, 'message': 'no_such_user error not returned' } ] } self.template_test_endpoint_cases(test_dict=test_dict) def test_set_admin(self): '''Test if REST API put:/users/{user_id}/set_admin endpoint functions correctly''' test_user = self.get_test_user(TESTING['test_user'], TESTING['test_user_password']) test_dict = { 'http_method': 'put', 'path': '/users/{user_id}/set_admin', 'test_cases': [ { 'test_case_description': 'admin_sets_admin', 'http_status': 200, 'header_params': self.admin_token, 'path_params': {"user_id": test_user.user_id}, 'query_params': {"admin": False}, 'message': 'User admin flag not changed' }, { 'test_case_description': 'insufficient_privilege', 'http_status': 403, 'expected_data': { 'detail': r'^Authenticated user lacks administrative privileges$' }, 'header_params': self.regular_token, 'path_params': {"user_id": test_user.user_id}, 'query_params': {"admin": False}, 'message': 'Forbidden was not returned' }, { 'test_case_description': 'admin_deprivileging', 'http_status': 403, 'expected_data': { 'detail': r'^You may not change your own administrative privileges or active status$' }, 'header_params': self.admin_token, 'path_params': {"user_id": self.admin_user.user_id}, 'query_params': {"admin": True}, 'message': 'Admin could change own admin privilege' }, { 'test_case_description': 'no_such_user', 'http_status': 422, 'expected_data': { 'detail': r'^No such user_id$' }, 'header_params': self.admin_token, 'path_params': {"user_id": -1}, 'query_params': {"admin": False}, 'message': 'no_such_user error not returned' } ] } self.template_test_endpoint_cases(test_dict=test_dict) def test_set_active(self): '''Test if REST API put:/users/{user_id}/set_active endpoint functions correctly''' test_user = self.get_test_user(TESTING['test_user'], TESTING['test_user_password']) test_dict = { 'http_method': 'put', 'path': '/users/{user_id}/set_active', 'test_cases': [ { 'test_case_description': 'admin_sets_active', 'http_status': 200, 'header_params': self.admin_token, 'path_params': {"user_id": test_user.user_id}, 'query_params': {"active": True}, 'message': 'User active flag not changed' }, { 'test_case_description': 'insufficient_privilege', 'http_status': 403, 'expected_data': { 'detail': r'^Authenticated user lacks administrative privileges$' }, 'header_params': self.regular_token, 'path_params': {"user_id": test_user.user_id}, 'query_params': {"active": True}, 'message': 'Forbidden was not returned' }, { 'test_case_description': 'admin_deprivileging', 'http_status': 403, 'expected_data': { 'detail': r'^You may not change your own administrative privileges or active status$' }, 'header_params': self.admin_token, 'path_params': {"user_id": self.admin_user.user_id}, 'query_params': {"active": True}, 'message': 'Admin could change own active state' }, { 'test_case_description': 'no_such_user', 'http_status': 422, 'expected_data': { 'detail': r'^No such user_id$' }, 'header_params': self.admin_token, 'path_params': {"user_id": -1}, 'query_params': {"active": False}, 'message': 'no_such_user error not returned' } ] } self.template_test_endpoint_cases(test_dict=test_dict) ####################################### # Bare main unit test function ####################################### if __name__ == '__main__': unittest.main()
30.935323
91
0.626488
1,433
12,436
5.098395
0.108863
0.043526
0.065015
0.052012
0.799343
0.766904
0.737887
0.688886
0.648919
0.601013
0
0.010085
0.202638
12,436
401
92
31.012469
0.726704
0.068028
0
0.543175
0
0
0.457594
0.07857
0
0
0
0
0
1
0.030641
false
0.050139
0.011142
0
0.044568
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
8743db7c4f6ee83f3403bfc8e913c68636119e68
115
py
Python
tests/__init__.py
yweweler/single-speaker-tts
04aa714e0ba79c932179cc45a0bbfaa28e768cc7
[ "MIT" ]
10
2018-10-25T07:08:14.000Z
2022-03-10T21:58:42.000Z
tests/__init__.py
yweweler/single-speaker-tts
04aa714e0ba79c932179cc45a0bbfaa28e768cc7
[ "MIT" ]
6
2018-11-16T14:31:10.000Z
2018-12-28T16:13:19.000Z
tests/__init__.py
yweweler/single-speaker-tts
04aa714e0ba79c932179cc45a0bbfaa28e768cc7
[ "MIT" ]
2
2019-01-09T10:36:58.000Z
2019-01-21T04:40:08.000Z
# -*- coding: utf-8 -*- """ Tests for the model. """ __author__ = 'Yves-Noel Weweler <y.weweler@fh-muenster.de>'
14.375
59
0.617391
16
115
4.1875
0.9375
0
0
0
0
0
0
0
0
0
0
0.010309
0.156522
115
7
60
16.428571
0.680412
0.373913
0
0
0
0
0.6875
0.40625
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
87790b728467db8899e40880da986551b27aeea5
145
py
Python
tests/units/common.py
rapidstack/RESTEasyCLI
f65fc86163c25f843a94341f09b20db28c1511d7
[ "MIT" ]
null
null
null
tests/units/common.py
rapidstack/RESTEasyCLI
f65fc86163c25f843a94341f09b20db28c1511d7
[ "MIT" ]
55
2019-01-01T12:03:58.000Z
2019-05-23T16:36:30.000Z
tests/units/common.py
sayanarijit/RESTEasyCLI
f65fc86163c25f843a94341f09b20db28c1511d7
[ "MIT" ]
5
2019-01-01T17:04:37.000Z
2019-03-02T17:59:49.000Z
import logging from resteasycli.lib.workspace import Workspace logger = logging.getLogger('test_logger') workspace = Workspace(logger=logger)
18.125
47
0.813793
17
145
6.882353
0.529412
0.25641
0
0
0
0
0
0
0
0
0
0
0.103448
145
7
48
20.714286
0.9
0
0
0
0
0
0.075862
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
5e55c527cdd312782bee9f1a890bb5c954149c7a
53,568
py
Python
sympy/integrals/rubi/rules/miscellaneous_integration.py
STALKER2010/sympy-bleeding-edge
81233029a9a30866747f6da2c0e9604d1681d474
[ "BSD-3-Clause" ]
2
2018-12-05T02:30:43.000Z
2020-11-14T01:43:15.000Z
sympy/integrals/rubi/rules/miscellaneous_integration.py
STALKER2010/sympy-bleeding-edge
81233029a9a30866747f6da2c0e9604d1681d474
[ "BSD-3-Clause" ]
1
2017-10-23T06:56:43.000Z
2017-10-23T06:56:43.000Z
sympy/integrals/rubi/rules/miscellaneous_integration.py
STALKER2010/sympy-bleeding-edge
81233029a9a30866747f6da2c0e9604d1681d474
[ "BSD-3-Clause" ]
1
2020-10-02T15:05:03.000Z
2020-10-02T15:05:03.000Z
from sympy.external import import_module matchpy = import_module("matchpy") from sympy.utilities.decorator import doctest_depends_on if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint from sympy.integrals.rubi.utility_function import (Int, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist) from sympy import Integral, S, sqrt from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (log, sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] _UseGamma = False def miscellaneous_integration(rubi): pattern1 = Pattern(Integral(u_*((x_*WC('b', S(1)) + WC('a', S(0)))**n_*WC('c', S(1)))**p_, x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda n, x, u: Not(MatchQ(u, Condition(x**Optional(Pattern(n1, Blank))*Optional(Pattern(v, Blank)), ZeroQ(n - n1 + S(-1))))))) rule1 = ReplacementRule(pattern1, lambda u, a, c, x, p, n, b : c**IntPart(p)*(c*(a + b*x)**n)**FracPart(p)*(a + b*x)**(-n*FracPart(p))*Int(u*(a + b*x)**(n*p), x)) rubi.add(rule1) pattern2 = Pattern(Integral(((d_*(x_*WC('b', S(1)) + WC('a', S(0))))**p_*WC('c', S(1)))**q_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda q: Not(IntegerQ(q)))) rule2 = ReplacementRule(pattern2, lambda u, a, d, c, q, x, p, b : (c*(d*(a + b*x))**p)**q*(a + b*x)**(-p*q)*Int(u*(a + b*x)**(p*q), x)) rubi.add(rule2) pattern3 = Pattern(Integral((((x_*WC('b', S(1)) + WC('a', S(0)))**n_*WC('d', S(1)))**p_*WC('c', S(1)))**q_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda q: Not(IntegerQ(q)))) rule3 = ReplacementRule(pattern3, lambda u, a, d, c, q, x, p, n, b : (c*(d*(a + b*x)**n)**p)**q*(a + b*x)**(-n*p*q)*Int(u*(a + b*x)**(n*p*q), x)) rubi.add(rule3) pattern4 = Pattern(Integral((F_*sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*WC('b', S(1))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + WC('f', S(0))) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda g, x: FreeQ(g, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda C, x: FreeQ(C, x)), CustomConstraint(lambda F, x: FreeQ(F, x)), CustomConstraint(lambda g, e: ZeroQ(e + g)), CustomConstraint(lambda f, d: ZeroQ(d + f + S(-2))), CustomConstraint(lambda d, C, e, A, f: ZeroQ(A*e**S(2) + C*d*f)), CustomConstraint(lambda B, d, C, e: ZeroQ(-B*e + S(2)*C*(d + S(-1))))) rule4 = ReplacementRule(pattern4, lambda B, a, g, d, C, c, e, F, n, A, x, f, b : g*Subst(Int((a + b*F(c*x))**n/x, x), x, sqrt(d + e*x)/sqrt(f + g*x))/C) rubi.add(rule4) pattern5 = Pattern(Integral((F_*sqrt(x_*WC('e', S(1)) + S(1))*WC('b', S(1))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + WC('A', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda g, x: FreeQ(g, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda C, x: FreeQ(C, x)), CustomConstraint(lambda F, x: FreeQ(F, x)), CustomConstraint(lambda g, e: ZeroQ(e + g)), CustomConstraint(lambda A, C, e: ZeroQ(A*e**S(2) + C))) rule5 = ReplacementRule(pattern5, lambda a, g, c, C, e, F, A, x, n, b : g*Subst(Int((a + b*F(c*x))**n/x, x), x, sqrt(e*x + S(1))/sqrt(g*x + S(1)))/C) rubi.add(rule5) pattern6 = Pattern(Integral((F_**(sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + WC('f', S(0))))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda g, x: FreeQ(g, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda C, x: FreeQ(C, x)), CustomConstraint(lambda F, x: FreeQ(F, x)), CustomConstraint(lambda g, e: ZeroQ(e + g)), CustomConstraint(lambda f, d: ZeroQ(d + f + S(-2))), CustomConstraint(lambda d, C, e, A, f: ZeroQ(A*e**S(2) + C*d*f)), CustomConstraint(lambda B, d, C, e: ZeroQ(-B*e + S(2)*C*(d + S(-1))))) rule6 = ReplacementRule(pattern6, lambda B, a, g, d, c, e, C, F, n, A, x, f, b : g*Subst(Int((F**(c*x)*b + a)**n/x, x), x, sqrt(d + e*x)/sqrt(f + g*x))/C) rubi.add(rule6) pattern7 = Pattern(Integral((F_**(sqrt(x_*WC('e', S(1)) + S(1))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + WC('A', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda g, x: FreeQ(g, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda C, x: FreeQ(C, x)), CustomConstraint(lambda F, x: FreeQ(F, x)), CustomConstraint(lambda g, e: ZeroQ(e + g)), CustomConstraint(lambda A, C, e: ZeroQ(A*e**S(2) + C))) rule7 = ReplacementRule(pattern7, lambda a, g, c, e, C, F, A, x, n, b : g*Subst(Int((F**(c*x)*b + a)**n/x, x), x, sqrt(e*x + S(1))/sqrt(g*x + S(1)))/C) rubi.add(rule7) pattern8 = Pattern(Integral(u_/y_, x_), CustomConstraint(lambda q, y, x: Not(FalseQ(q)))) def With8(y, x, u): q = DerivativeDivides(y, u, x) return q*log(RemoveContent(y, x)) rule8 = ReplacementRule(pattern8, lambda y, x, u : With8(y, x, u)) rubi.add(rule8) pattern9 = Pattern(Integral(u_/(w_*y_), x_), CustomConstraint(lambda w, x, y, q: Not(FalseQ(q)))) def With9(w, y, x, u): q = DerivativeDivides(w*y, u, x) return q*log(RemoveContent(w*y, x)) rule9 = ReplacementRule(pattern9, lambda w, y, x, u : With9(w, y, x, u)) rubi.add(rule9) pattern10 = Pattern(Integral(u_*y_**WC('m', S(1)), x_), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda m: NonzeroQ(m + S(1))), CustomConstraint(lambda q, y, m: Not(FalseQ(q)))) def With10(m, y, x, u): q = DerivativeDivides(y, u, x) return q*y**(m + S(1))/(m + S(1)) rule10 = ReplacementRule(pattern10, lambda m, y, x, u : With10(m, y, x, u)) rubi.add(rule10) pattern11 = Pattern(Integral(u_*y_**WC('m', S(1))*z_**WC('n', S(1)), x_), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda m: NonzeroQ(m + S(1))), CustomConstraint(lambda m, y, z, q: Not(FalseQ(q)))) def With11(u, m, z, x, n, y): q = DerivativeDivides(y*z, u*z**(-m + n), x) return q*y**(m + S(1))*z**(m + S(1))/(m + S(1)) rule11 = ReplacementRule(pattern11, lambda u, m, z, x, n, y : With11(u, m, z, x, n, y)) rubi.add(rule11) pattern12 = Pattern(Integral(u_, x_), CustomConstraint(lambda x, v, u: SimplerIntegrandQ(v, u, x))) def With12(x, u): v = SimplifyIntegrand(u, x) return Int(v, x) rule12 = ReplacementRule(pattern12, lambda x, u : With12(x, u)) #rubi.add(rule12) pattern13 = Pattern(Integral((sqrt(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1)) + sqrt(x_**WC('n', S(1))*WC('d', S(1)) + WC('c', S(0)))*WC('f', S(1)))**m_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda m: NegativeIntegerQ(m)), CustomConstraint(lambda f, b, d, e: ZeroQ(b*e**S(2) - d*f**S(2)))) rule13 = ReplacementRule(pattern13, lambda u, a, m, d, c, e, x, f, n, b : (a*e**S(2) - c*f**S(2))**m*Int(ExpandIntegrand(u*(e*sqrt(a + b*x**n) - f*sqrt(c + d*x**n))**(-m), x), x)) rubi.add(rule13) pattern14 = Pattern(Integral((sqrt(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1)) + sqrt(x_**WC('n', S(1))*WC('d', S(1)) + WC('c', S(0)))*WC('f', S(1)))**m_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda m: NegativeIntegerQ(m)), CustomConstraint(lambda f, c, e, a: ZeroQ(a*e**S(2) - c*f**S(2)))) rule14 = ReplacementRule(pattern14, lambda u, a, m, d, c, e, x, f, n, b : (b*e**S(2) - d*f**S(2))**m*Int(ExpandIntegrand(u*x**(m*n)*(e*sqrt(a + b*x**n) - f*sqrt(c + d*x**n))**(-m), x), x)) rubi.add(rule14) pattern15 = Pattern(Integral(u_**WC('m', S(1))*w_*(u_**n_*WC('a', S(1)) + v_)**WC('p', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p: IntegerQ(p)), CustomConstraint(lambda n: Not(PositiveQ(n))), CustomConstraint(lambda x, v: NFreeQ(v, x))) rule15 = ReplacementRule(pattern15, lambda w, u, a, m, v, x, p, n : Int(u**(m + n*p)*w*(a + u**(-n)*v)**p, x)) rubi.add(rule15) pattern16 = Pattern(Integral(u_*(v_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(y_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda b, n, y, q, c, m, x, a, d: Not(FalseQ(q)))) def With16(u, a, m, v, d, c, x, n, b, y): q = DerivativeDivides(y, u, x) return q*Subst(Int((a + b*x)**m*(c + d*x)**n, x), x, y) rule16 = ReplacementRule(pattern16, lambda u, a, m, v, d, c, x, n, b, y : With16(u, a, m, v, d, c, x, n, b, y)) rubi.add(rule16) pattern17 = Pattern(Integral(u_*(v_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(w_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*(y_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda b, n, y, q, e, p, c, m, x, a, d, f: Not(FalseQ(q)))) def With17(w, u, a, m, v, d, c, e, n, x, p, f, b, y): q = DerivativeDivides(y, u, x) return q*Subst(Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x), x, y) rule17 = ReplacementRule(pattern17, lambda w, u, a, m, v, d, c, e, n, x, p, f, b, y : With17(w, u, a, m, v, d, c, e, n, x, p, f, b, y)) rubi.add(rule17) pattern18 = Pattern(Integral(u_*(v_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(w_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*(y_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(z_*WC('h', S(1)) + WC('g', S(0)))**WC('q', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda g, x: FreeQ(g, x)), CustomConstraint(lambda h, x: FreeQ(h, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda z, y: ZeroQ(y - z)), CustomConstraint(lambda b, n, y, q, e, p, g, c, m, x, a, r, d, f, h: Not(FalseQ(r)))) def With18(w, u, a, m, g, v, d, c, e, q, h, z, n, x, p, f, b, y): r = DerivativeDivides(y, u, x) return r*Subst(Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x)**q, x), x, y) rule18 = ReplacementRule(pattern18, lambda w, u, a, m, g, v, d, c, e, q, h, z, n, x, p, f, b, y : With18(w, u, a, m, g, v, d, c, e, q, h, z, n, x, p, f, b, y)) rubi.add(rule18) pattern19 = Pattern(Integral((a_ + y_**n_*WC('b', S(1)))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda b, x, a, y, n, u, q: Not(FalseQ(q)))) def With19(u, a, n, x, y, b): q = DerivativeDivides(y, u, x) return a*Int(u, x) + b*q*Subst(Int(x**n, x), x, y) rule19 = ReplacementRule(pattern19, lambda u, a, n, x, y, b : With19(u, a, n, x, y, b)) rubi.add(rule19) pattern20 = Pattern(Integral((y_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p, b, x, a, n, y, q: Not(FalseQ(q)))) def With20(u, a, n, x, p, y, b): q = DerivativeDivides(y, u, x) return q*Subst(Int((a + b*x**n)**p, x), x, y) rule20 = ReplacementRule(pattern20, lambda u, a, n, x, p, y, b : With20(u, a, n, x, p, y, b)) rubi.add(rule20) pattern21 = Pattern(Integral(v_**WC('m', S(1))*(y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda b, n, y, v, q, p, m, x, a, r, u: Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))) & Not(FalseQ(Set(r, Divides(y**m, v**m, x)))))) def With21(u, a, m, v, n, x, p, y, b): q = Symbol('q') r = Symbol('r') return q*r*Subst(Int(x**m*(a + b*x**n)**p, x), x, y) rule21 = ReplacementRule(pattern21, lambda u, a, m, v, n, x, p, y, b : With21(u, a, m, v, n, x, p, y, b)) rubi.add(rule21) pattern22 = Pattern(Integral((v_**WC('n2', S(1))*WC('c', S(1)) + y_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda b, n, y, q, p, c, x, a: Not(FalseQ(q)))) def With22(n2, u, a, v, c, n, x, p, y, b): q = DerivativeDivides(y, u, x) return q*Subst(Int((a + b*x**n + c*x**(S(2)*n))**p, x), x, y) rule22 = ReplacementRule(pattern22, lambda n2, u, a, v, c, n, x, p, y, b : With22(n2, u, a, v, c, n, x, p, y, b)) rubi.add(rule22) pattern23 = Pattern(Integral((A_ + y_**n_*WC('B', S(1)))*(v_**n_*WC('b', S(1)) + w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda b, n, y, q, A, p, c, x, a, B: Not(FalseQ(q)))) def With23(w, B, n2, u, a, v, c, A, x, p, n, b, y): q = DerivativeDivides(y, u, x) return q*Subst(Int((A + B*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y) rule23 = ReplacementRule(pattern23, lambda w, B, n2, u, a, v, c, A, x, p, n, b, y : With23(w, B, n2, u, a, v, c, A, x, p, n, b, y)) rubi.add(rule23) pattern24 = Pattern(Integral((A_ + y_**n_*WC('B', S(1)))*(w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda n, y, q, A, p, c, x, a, B: Not(FalseQ(q)))) def With24(w, B, n2, u, a, c, n, A, x, p, y): q = DerivativeDivides(y, u, x) return q*Subst(Int((A + B*x**n)*(a + c*x**(S(2)*n))**p, x), x, y) rule24 = ReplacementRule(pattern24, lambda w, B, n2, u, a, c, n, A, x, p, y : With24(w, B, n2, u, a, c, n, A, x, p, y)) rubi.add(rule24) pattern25 = Pattern(Integral(v_**WC('m', S(1))*(w_**WC('n2', S(1))*WC('c', S(1)) + y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda b, n, y, v, q, p, c, m, x, a, r, u: Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))) & Not(FalseQ(Set(r, Divides(y**m, v**m, x)))))) def With25(w, n2, u, a, m, v, c, n, x, p, y, b): q = Symbol('q') r = Symbol('r') return q*r*Subst(Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y) rule25 = ReplacementRule(pattern25, lambda w, n2, u, a, m, v, c, n, x, p, y, b : With25(w, n2, u, a, m, v, c, n, x, p, y, b)) rubi.add(rule25) pattern26 = Pattern(Integral(z_**WC('m', S(1))*(A_ + y_**n_*WC('B', S(1)))*(v_**n_*WC('b', S(1)) + w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda b, n, y, q, A, p, c, m, x, a, r, u, z, B: Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))) & Not(FalseQ(Set(r, Divides(y**m, z**m, x)))))) def With26(w, B, n2, u, a, m, v, c, z, A, x, p, n, b, y): q = Symbol('q') r = Symbol('r') return q*r*Subst(Int(x**m*(A + B*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y) rule26 = ReplacementRule(pattern26, lambda w, B, n2, u, a, m, v, c, z, A, x, p, n, b, y : With26(w, B, n2, u, a, m, v, c, z, A, x, p, n, b, y)) rubi.add(rule26) pattern27 = Pattern(Integral(z_**WC('m', S(1))*(A_ + y_**n_*WC('B', S(1)))*(w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda n, y, q, A, p, c, m, x, a, r, u, z, B: Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))) & Not(FalseQ(Set(r, Divides(y**m, z**m, x)))))) def With27(w, B, n2, u, a, m, c, z, n, A, x, p, y): q = Symbol('q') r = Symbol('r') return q*r*Subst(Int(x**m*(A + B*x**n)*(a + c*x**(S(2)*n))**p, x), x, y) rule27 = ReplacementRule(pattern27, lambda w, B, n2, u, a, m, c, z, n, A, x, p, y : With27(w, B, n2, u, a, m, c, z, n, A, x, p, y)) rubi.add(rule27) pattern28 = Pattern(Integral((v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('p', S(1))*(y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda b, n, y, q, p, c, m, x, a, d: Not(FalseQ(q)))) def With28(u, a, m, v, d, c, x, p, n, b, y): q = DerivativeDivides(y, u, x) return q*Subst(Int((a + b*x**n)**m*(c + d*x**n)**p, x), x, y) rule28 = ReplacementRule(pattern28, lambda u, a, m, v, d, c, x, p, n, b, y : With28(u, a, m, v, d, c, x, p, n, b, y)) rubi.add(rule28) pattern29 = Pattern(Integral((v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('p', S(1))*(w_**n_*WC('f', S(1)) + WC('e', S(0)))**WC('q', S(1))*(y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda y, v: ZeroQ(-v + y)), CustomConstraint(lambda w, y: ZeroQ(-w + y)), CustomConstraint(lambda b, n, y, q, e, p, c, m, x, a, r, d, f: Not(FalseQ(r)))) def With29(w, u, a, m, v, d, c, e, q, n, x, p, f, b, y): r = DerivativeDivides(y, u, x) return r*Subst(Int((a + b*x**n)**m*(c + d*x**n)**p*(e + f*x**n)**q, x), x, y) rule29 = ReplacementRule(pattern29, lambda w, u, a, m, v, d, c, e, q, n, x, p, f, b, y : With29(w, u, a, m, v, d, c, e, q, n, x, p, f, b, y)) rubi.add(rule29) pattern30 = Pattern(Integral(F_**v_*u_, x_), CustomConstraint(lambda F, x: FreeQ(F, x)), CustomConstraint(lambda q, F, v: Not(FalseQ(q)))) def With30(F, u, x, v): q = DerivativeDivides(v, u, x) return F**v*q/log(F) rule30 = ReplacementRule(pattern30, lambda F, u, x, v : With30(F, u, x, v)) rubi.add(rule30) pattern31 = Pattern(Integral(F_**v_*u_*w_**WC('m', S(1)), x_), CustomConstraint(lambda F, x: FreeQ(F, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda w, v: ZeroQ(-v + w)), CustomConstraint(lambda F, m, x, v, q: Not(FalseQ(q)))) def With31(w, u, v, m, F, x): q = DerivativeDivides(v, u, x) return q*Subst(Int(F**x*x**m, x), x, v) rule31 = ReplacementRule(pattern31, lambda w, u, v, m, F, x : With31(w, u, v, m, F, x)) rubi.add(rule31) pattern32 = Pattern(Integral(u_*(a_ + v_**WC('p', S(1))*w_**WC('p', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p: IntegerQ(p)), ) def With32(w, u, a, m, v, x, p, b): c = u/(v*D(w, x) + w*D(v, x)) return c*Subst(Int((a + b*x**p)**m, x), x, v*w) rule32 = ReplacementRule(pattern32, lambda w, u, a, m, v, x, p, b : With32(w, u, a, m, v, x, p, b)) rubi.add(rule32) pattern33 = Pattern(Integral(u_*v_**WC('r', S(1))*(a_ + v_**WC('p', S(1))*w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda r, x: FreeQ(r, x)), CustomConstraint(lambda q, r, p: ZeroQ(p - q*(r + S(1)))), CustomConstraint(lambda r: NonzeroQ(r + S(1))), CustomConstraint(lambda r, p: IntegerQ(p/(r + S(1)))), ) def With33(w, u, v, m, a, r, q, x, p, b): c = u/(p*w*D(v, x) + q*v*D(w, x)) return c*p*Subst(Int((a + b*x**(p/(r + S(1))))**m, x), x, v**(r + S(1))*w)/(r + S(1)) rule33 = ReplacementRule(pattern33, lambda w, u, v, m, a, r, q, x, p, b : With33(w, u, v, m, a, r, q, x, p, b)) rubi.add(rule33) pattern34 = Pattern(Integral(u_*v_**WC('r', S(1))*w_**WC('s', S(1))*(a_ + v_**WC('p', S(1))*w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda r, x: FreeQ(r, x)), CustomConstraint(lambda s, x: FreeQ(s, x)), CustomConstraint(lambda q, s, r, p: ZeroQ(p*(s + S(1)) - q*(r + S(1)))), CustomConstraint(lambda r: NonzeroQ(r + S(1))), CustomConstraint(lambda r, p: IntegerQ(p/(r + S(1)))), ) def With34(w, u, v, m, a, s, r, q, x, p, b): c = u/(p*w*D(v, x) + q*v*D(w, x)) return c*p*Subst(Int((a + b*x**(p/(r + S(1))))**m, x), x, v**(r + S(1))*w**(s + S(1)))/(r + S(1)) rule34 = ReplacementRule(pattern34, lambda w, u, v, m, a, s, r, q, x, p, b : With34(w, u, v, m, a, s, r, q, x, p, b)) rubi.add(rule34) pattern35 = Pattern(Integral(u_*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda m, q, p: ZeroQ(p + q*(m*p + S(1)))), CustomConstraint(lambda p: IntegerQ(p)), CustomConstraint(lambda m: IntegerQ(m)), ) def With35(w, u, a, m, v, q, x, p, b): c = u/(p*w*D(v, x) - q*v*D(w, x)) return c*p*Subst(Int((a*x**p + b)**m, x), x, v*w**(m*q + S(1))) rule35 = ReplacementRule(pattern35, lambda w, u, a, m, v, q, x, p, b : With35(w, u, a, m, v, q, x, p, b)) rubi.add(rule35) pattern36 = Pattern(Integral(u_*v_**WC('r', S(1))*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda r, x: FreeQ(r, x)), CustomConstraint(lambda m, q, r, p: ZeroQ(p + q*(m*p + r + S(1)))), CustomConstraint(lambda q: IntegerQ(q)), CustomConstraint(lambda m: IntegerQ(m)), ) def With36(w, u, a, m, v, r, q, x, p, b): c = u/(p*w*D(v, x) - q*v*D(w, x)) return -c*q*Subst(Int((a + b*x**q)**m, x), x, v**(m*p + r + S(1))*w) rule36 = ReplacementRule(pattern36, lambda w, u, a, m, v, r, q, x, p, b : With36(w, u, a, m, v, r, q, x, p, b)) rubi.add(rule36) pattern37 = Pattern(Integral(u_*w_**WC('s', S(1))*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda s, x: FreeQ(s, x)), CustomConstraint(lambda m, q, s, p: ZeroQ(p*(s + S(1)) + q*(m*p + S(1)))), CustomConstraint(lambda s: NonzeroQ(s + S(1))), CustomConstraint(lambda s, q: IntegerQ(q/(s + S(1)))), CustomConstraint(lambda m: IntegerQ(m)), ) def With37(w, u, a, m, v, s, q, x, p, b): c = u/(p*w*D(v, x) - q*v*D(w, x)) return -c*q*Subst(Int((a + b*x**(q/(s + S(1))))**m, x), x, v**(m*p + S(1))*w**(s + S(1)))/(s + S(1)) rule37 = ReplacementRule(pattern37, lambda w, u, a, m, v, s, q, x, p, b : With37(w, u, a, m, v, s, q, x, p, b)) rubi.add(rule37) pattern38 = Pattern(Integral(u_*v_**WC('r', S(1))*w_**WC('s', S(1))*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda r, x: FreeQ(r, x)), CustomConstraint(lambda s, x: FreeQ(s, x)), CustomConstraint(lambda m, s, r, q, p: ZeroQ(p*(s + S(1)) + q*(m*p + r + S(1)))), CustomConstraint(lambda s: NonzeroQ(s + S(1))), CustomConstraint(lambda s, q: IntegerQ(q/(s + S(1)))), CustomConstraint(lambda m: IntegerQ(m)), ) def With38(w, u, a, m, v, s, r, q, x, p, b): c = u/(p*w*D(v, x) - q*v*D(w, x)) return -c*q*Subst(Int((a + b*x**(q/(s + S(1))))**m, x), x, v**(m*p + r + S(1))*w**(s + S(1)))/(s + S(1)) rule38 = ReplacementRule(pattern38, lambda w, u, a, m, v, s, r, q, x, p, b : With38(w, u, a, m, v, s, r, q, x, p, b)) rubi.add(rule38) pattern39 = Pattern(Integral(u_*x_**WC('m', S(1)), x_), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda m: NonzeroQ(m + S(1))), CustomConstraint(lambda m, x, u: FunctionOfQ(x**(m + S(1)), u, x))) rule39 = ReplacementRule(pattern39, lambda m, x, u : Subst(Int(SubstFor(x**(m + S(1)), u, x), x), x, x**(m + S(1)))/(m + S(1))) rubi.add(rule39) pattern40 = Pattern(Integral(u_, x_), CustomConstraint(lambda x, u, lst: Not(FalseQ(lst)) & SubstForFractionalPowerQ(u, Part(lst, S(3)), x))) def With40(x, u): lst = SubstForFractionalPowerOfLinear(u, x) return Part(lst, S(2))*Part(lst, S(4))*Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(3))**(1/Part(lst, S(2)))) rule40 = ReplacementRule(pattern40, lambda x, u : With40(x, u)) #rubi.add(rule40) pattern41 = Pattern(Integral(u_, x_), CustomConstraint(lambda lst, x: Not(FalseQ(lst)))) def With41(x, u): lst = SubstForFractionalPowerOfQuotientOfLinears(u, x) return Part(lst, S(2))*Part(lst, S(4))*Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(3))**(1/Part(lst, S(2)))) rule41 = ReplacementRule(pattern41, lambda x, u : With41(x, u)) #rubi.add(rule41) pattern42 = Pattern(Integral((v_**WC('m', S(1))*w_**WC('n', S(1))*z_**WC('q', S(1))*WC('a', S(1)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda x, v: NFreeQ(v, x)), CustomConstraint(lambda w, x: NFreeQ(w, x)), CustomConstraint(lambda z, x: NFreeQ(z, x))) rule42 = ReplacementRule(pattern42, lambda w, u, a, m, v, q, z, x, p, n : a**IntPart(p)*v**(-m*FracPart(p))*w**(-n*FracPart(p))*z**(-q*FracPart(p))*(a*v**m*w**n*z**q)**FracPart(p)*Int(u*v**(m*p)*w**(n*p)*z**(p*q), x)) rubi.add(rule42) pattern43 = Pattern(Integral((v_**WC('m', S(1))*w_**WC('n', S(1))*WC('a', S(1)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda x, v: NFreeQ(v, x)), CustomConstraint(lambda w, x: NFreeQ(w, x))) rule43 = ReplacementRule(pattern43, lambda w, v, u, m, a, x, p, n : a**IntPart(p)*v**(-m*FracPart(p))*w**(-n*FracPart(p))*(a*v**m*w**n)**FracPart(p)*Int(u*v**(m*p)*w**(n*p), x)) rubi.add(rule43) pattern44 = Pattern(Integral((v_**WC('m', S(1))*WC('a', S(1)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda x, v: NFreeQ(v, x)), CustomConstraint(lambda m, a: Not(EqQ(a, S(1)) & EqQ(m, S(1)))), CustomConstraint(lambda m, x, v: Not(EqQ(m, S(1)) & EqQ(v, x)))) rule44 = ReplacementRule(pattern44, lambda v, u, m, a, x, p : a**IntPart(p)*v**(-m*FracPart(p))*(a*v**m)**FracPart(p)*Int(u*v**(m*p), x)) rubi.add(rule44) pattern45 = Pattern(Integral((x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p: IntegerQ(p + S(1)/2)), CustomConstraint(lambda n: NegativeIntegerQ(n)), CustomConstraint(lambda x, u: Not(RationalFunctionQ(u, x)))) rule45 = ReplacementRule(pattern45, lambda u, a, x, p, n, b : FullSimplify(x**(-n/S(2))*sqrt(a + b*x**n)/sqrt(a*x**(-n) + b))*Int(u*x**(n*p)*(a*x**(-n) + b)**p, x)) rubi.add(rule45) pattern46 = Pattern(Integral((v_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda n: NegativeIntegerQ(n)), CustomConstraint(lambda x, v: BinomialQ(v, x)), CustomConstraint(lambda x, v: Not(LinearQ(v, x)))) rule46 = ReplacementRule(pattern46, lambda v, u, a, x, p, n, b : v**(-n*FracPart(p))*(a + b*v**n)**FracPart(p)*(a*v**(-n) + b)**(-FracPart(p))*Int(u*v**(n*p)*(a*v**(-n) + b)**p, x)) rubi.add(rule46) pattern47 = Pattern(Integral((v_**n_*x_**WC('m', S(1))*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda n: NegativeIntegerQ(n)), CustomConstraint(lambda x, v: BinomialQ(v, x))) rule47 = ReplacementRule(pattern47, lambda v, u, m, a, x, p, n, b : v**(-n*FracPart(p))*(a + b*v**n*x**m)**FracPart(p)*(a*v**(-n) + b*x**m)**(-FracPart(p))*Int(u*v**(n*p)*(a*v**(-n) + b*x**m)**p, x)) rubi.add(rule47) pattern48 = Pattern(Integral((x_**WC('r', S(1))*WC('a', S(1)) + x_**WC('s', S(1))*WC('b', S(1)))**m_*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda r, x: FreeQ(r, x)), CustomConstraint(lambda s, x: FreeQ(s, x)), CustomConstraint(lambda m: Not(IntegerQ(m))), CustomConstraint(lambda s, r: PosQ(-r + s)), CustomConstraint(lambda b, v, s, m, x, a, r, u: Not(EqQ(v, S(1))))) def With48(u, a, m, s, r, x, b): v = x**(-r*FracPart(m))*(a + b*x**(-r + s))**(-FracPart(m))*(a*x**r + b*x**s)**FracPart(m) return v*Int(u*x**(m*r)*(a + b*x**(-r + s))**m, x) rule48 = ReplacementRule(pattern48, lambda u, a, m, s, r, x, b : With48(u, a, m, s, r, x, b)) rubi.add(rule48) pattern49 = Pattern(Integral(u_/(a_ + x_**n_*WC('b', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda v, x: SumQ(v))) def With49(u, a, x, n, b): v = RationalFunctionExpand(u/(a + b*x**n), x) return Int(v, x) rule49 = ReplacementRule(pattern49, lambda u, a, x, n, b : With49(u, a, x, n, b)) rubi.add(rule49) pattern50 = Pattern(Integral(u_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda b, c, a: ZeroQ(-S(4)*a*c + b**S(2))), CustomConstraint(lambda p: IntegerQ(p)), CustomConstraint(lambda x, u: Not(AlgebraicFunctionQ(u, x)))) rule50 = ReplacementRule(pattern50, lambda n2, u, a, c, x, p, n, b : S(4)**(-p)*c**(-p)*Int(u*(b + S(2)*c*x**n)**(S(2)*p), x)) rubi.add(rule50) pattern51 = Pattern(Integral(u_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda b, c, a: ZeroQ(-S(4)*a*c + b**S(2))), CustomConstraint(lambda p: Not(IntegerQ(p))), CustomConstraint(lambda x, u: Not(AlgebraicFunctionQ(u, x)))) rule51 = ReplacementRule(pattern51, lambda n2, u, a, c, x, p, n, b : (b + S(2)*c*x**n)**(-S(2)*p)*(a + b*x**n + c*x**(S(2)*n))**p*Int(u*(b + S(2)*c*x**n)**(S(2)*p), x)) rubi.add(rule51) pattern52 = Pattern(Integral(u_/(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda v, x: SumQ(v))) def With52(n2, u, a, c, x, n, b): v = RationalFunctionExpand(u/(a + b*x**n + c*x**(S(2)*n)), x) return Int(v, x) rule52 = ReplacementRule(pattern52, lambda n2, u, a, c, x, n, b : With52(n2, u, a, c, x, n, b)) rubi.add(rule52) pattern53 = Pattern(Integral(WC('u', S(1))/(x_**WC('m', S(1))*WC('a', S(1)) + sqrt(x_**n_*WC('c', S(1)))*WC('b', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x))) rule53 = ReplacementRule(pattern53, lambda u, a, m, c, x, n, b : Int(u*(a*x**m - b*sqrt(c*x**n))/(a**S(2)*x**(S(2)*m) - b**S(2)*c*x**n), x)) rubi.add(rule53) pattern54 = Pattern(Integral(u_, x_), CustomConstraint(lambda lst, x: Not(FalseQ(lst)))) def With54(x, u): lst = FunctionOfLinear(u, x) return Dist(1/Part(lst, S(3)), Subst(Int(Part(lst, S(1)), x), x, x*Part(lst, S(3)) + Part(lst, S(2))), x) rule54 = ReplacementRule(pattern54, lambda x, u : With54(x, u)) #rubi.add(rule54) pattern55 = Pattern(Integral(u_/x_, x_), CustomConstraint(lambda u: NonsumQ(u)), CustomConstraint(lambda x, u: Not(RationalFunctionQ(u, x))), CustomConstraint(lambda lst, x: Not(FalseQ(lst)) & NonzeroQ(Part(lst, S(2))))) def With55(x, u): lst = PowerVariableExpn(u, S(0), x) return Subst(Int(NormalizeIntegrand(Part(lst, S(1))/x, x), x), x, (x*Part(lst, S(3)))**Part(lst, S(2)))/Part(lst, S(2)) rule55 = ReplacementRule(pattern55, lambda x, u : With55(x, u)) rubi.add(rule55) pattern56 = Pattern(Integral(u_*x_**WC('m', S(1)), x_), CustomConstraint(lambda m: IntegerQ(m)), CustomConstraint(lambda m: Unequal(m, S(-1))), CustomConstraint(lambda u: NonsumQ(u)), CustomConstraint(lambda m, x, u: Greater(m, S(0)) | Not(AlgebraicFunctionQ(u, x))), CustomConstraint(lambda lst, m, x: Not(FalseQ(lst)) & NonzeroQ(-m + Part(lst, S(2)) + S(-1)))) def With56(m, x, u): lst = PowerVariableExpn(u, m + S(1), x) return Subst(Int(NormalizeIntegrand(Part(lst, S(1))/x, x), x), x, (x*Part(lst, S(3)))**Part(lst, S(2)))/Part(lst, S(2)) rule56 = ReplacementRule(pattern56, lambda m, x, u : With56(m, x, u)) rubi.add(rule56) pattern57 = Pattern(Integral(u_*x_**m_, x_), CustomConstraint(lambda m: FractionQ(m)), ) def With57(m, x, u): k = Denominator(m) return k*Subst(Int(x**(k*(m + S(1)) + S(-1))*ReplaceAll(u, Rule(x, x**k)), x), x, x**(1/k)) rule57 = ReplacementRule(pattern57, lambda m, x, u : With57(m, x, u)) rubi.add(rule57) pattern58 = Pattern(Integral(u_, x_), CustomConstraint(lambda x, u: EulerIntegrandQ(u, x)), CustomConstraint(lambda lst, x: Not(FalseQ(lst)))) def With58(x, u): lst = FunctionOfSquareRootOfQuadratic(u, x) return S(2)*Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(2))) rule58 = ReplacementRule(pattern58, lambda x, u : With58(x, u)) #rubi.add(rule58) pattern59 = Pattern(Integral(1/(a_ + v_**S(2)*WC('b', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x))) rule59 = ReplacementRule(pattern59, lambda b, x, v, a : Int(Rt(-a/b, S(2))/(-v + Rt(-a/b, S(2))), x)/(S(2)*a) + Int(Rt(-a/b, S(2))/(v + Rt(-a/b, S(2))), x)/(S(2)*a)) rubi.add(rule59) pattern60 = Pattern(Integral(1/(a_ + v_**n_*WC('b', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda n: EvenQ(n)), CustomConstraint(lambda n: Greater(n, S(2)))) rule60 = ReplacementRule(pattern60, lambda v, a, x, n, b : Dist(S(2)/(a*n), Sum(Int((S(-1))**(S(4)*k/n)*Rt(-a/b, n/S(2))/((S(-1))**(S(4)*k/n)*Rt(-a/b, n/S(2)) - v**S(2)), x), List(k, S(1), n/S(2))), x)) rubi.add(rule60) pattern61 = Pattern(Integral(1/(a_ + v_**n_*WC('b', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda n: OddQ(n)), CustomConstraint(lambda n: Greater(n, S(1)))) rule61 = ReplacementRule(pattern61, lambda v, a, x, n, b : Dist(S(1)/(a*n), Sum(Int((S(-1))**(S(2)*k/n)*Rt(-a/b, n)/((S(-1))**(S(2)*k/n)*Rt(-a/b, n) - v), x), List(k, S(1), n)), x)) rubi.add(rule61) pattern62 = Pattern(Integral(v_/(a_ + u_**WC('n', S(1))*WC('b', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda u, x, v: PolynomialInQ(v, u, x))) rule62 = ReplacementRule(pattern62, lambda v, u, a, x, n, b : Int(ReplaceAll(ExpandIntegrand(PolynomialInSubst(v, u, x)/(a + b*x**n), x), Rule(x, u)), x)) rubi.add(rule62) pattern63 = Pattern(Integral(u_, x_), CustomConstraint(lambda u, v, x: UnsameQ(v, u))) def With63(x, u): v = NormalizeIntegrand(u, x) return Int(v, x) rule63 = ReplacementRule(pattern63, lambda x, u : With63(x, u)) rubi.add(rule63) pattern64 = Pattern(Integral(u_, x_), CustomConstraint(lambda v, x: SumQ(v))) def With64(x, u): v = ExpandIntegrand(u, x) return Int(v, x) rule64 = ReplacementRule(pattern64, lambda x, u : With64(x, u)) rubi.add(rule64) pattern65 = Pattern(Integral((x_**WC('m', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(x_**WC('n', S(1))*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1))*WC('u', S(1)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda m, x: FreeQ(m, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda q, x: FreeQ(q, x)), CustomConstraint(lambda d, a: ZeroQ(a + d)), CustomConstraint(lambda b, c: ZeroQ(b + c)), CustomConstraint(lambda m, n: ZeroQ(m + n)), CustomConstraint(lambda q, p: ZeroQ(p + q))) rule65 = ReplacementRule(pattern65, lambda u, a, m, d, c, q, x, p, n, b : x**(-m*p)*(a + b*x**m)**p*(c + d*x**n)**q*Int(u*x**(m*p), x)) rubi.add(rule65) pattern66 = Pattern(Integral(u_*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, x: FreeQ(n, x)), CustomConstraint(lambda p, x: FreeQ(p, x)), CustomConstraint(lambda n, n2: ZeroQ(-S(2)*n + n2)), CustomConstraint(lambda b, c, a: ZeroQ(-S(4)*a*c + b**S(2))), CustomConstraint(lambda p: IntegerQ(p + S(-1)/2))) rule66 = ReplacementRule(pattern66, lambda n2, u, a, c, x, p, n, b : (S(4)*c)**(-p + S(1)/2)*sqrt(a + b*x**n + c*x**(S(2)*n))*Int(u*(b + S(2)*c*x**n)**(S(2)*p), x)/(b + S(2)*c*x**n)) rubi.add(rule66) pattern67 = Pattern(Integral(u_, x_), CustomConstraint(lambda lst, x: Not(FalseQ(lst)))) def With67(x, u): lst = SubstForFractionalPowerOfLinear(u, x) return Part(lst, S(2))*Part(lst, S(4))*Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(3))**(1/Part(lst, S(2)))) rule67 = ReplacementRule(pattern67, lambda x, u : With67(x, u)) #rubi.add(rule67) pattern68 = Pattern(Integral(u_, x_)) rule68 = ReplacementRule(pattern68, lambda x, u : u) rubi.add(rule68) return rubi
126.938389
6,553
0.622685
9,113
53,568
3.619993
0.079776
0.296766
0.248204
0.041468
0.649398
0.626633
0.606839
0.580466
0.559308
0.549456
0
0.027297
0.148559
53,568
421
6,554
127.239905
0.695988
0.001792
0
0.116959
0
0
0.007425
0.00058
0
0
0
0
0
1
0.122807
false
0
0.032164
0
0.277778
0
0
0
0
null
1
1
0
0
0
0
0
0
0
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
4
5e82b5bae5e7c344fb75a9324b93b57300c4e4d6
93
py
Python
__main__.py
rhasspy/rhasspy-microphone-cli-hermes
490e9b6abbdc24f85d3dcb5a41fb0c4b8870099d
[ "MIT" ]
6
2020-04-23T21:21:40.000Z
2021-12-10T03:31:58.000Z
__main__.py
rhasspy/rhasspy-microphone-cli-hermes
490e9b6abbdc24f85d3dcb5a41fb0c4b8870099d
[ "MIT" ]
4
2020-01-05T18:59:12.000Z
2021-02-03T07:16:53.000Z
__main__.py
rhasspy/rhasspy-microphone-cli-hermes
490e9b6abbdc24f85d3dcb5a41fb0c4b8870099d
[ "MIT" ]
3
2020-01-04T20:12:13.000Z
2020-07-25T14:03:56.000Z
"""PyInstaller entry point""" from rhasspymicrophone_cli_hermes.__main__ import main main()
18.6
54
0.806452
11
93
6.272727
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.096774
93
4
55
23.25
0.821429
0.247312
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5e9f7728d00d629673005beae9848bdc1b711d6a
119
py
Python
docs/ui/examples/exampled94c1f7638d1fb8357480b1a642f29d5.py
okajun35/Flexx_translate_ja
d6aaf2d981623e69cd70d20761b6509ed5af304f
[ "MIT" ]
1
2022-03-09T03:35:56.000Z
2022-03-09T03:35:56.000Z
docs/ui/examples/exampled94c1f7638d1fb8357480b1a642f29d5.py
okajun35/Flexx_translate_ja
d6aaf2d981623e69cd70d20761b6509ed5af304f
[ "MIT" ]
null
null
null
docs/ui/examples/exampled94c1f7638d1fb8357480b1a642f29d5.py
okajun35/Flexx_translate_ja
d6aaf2d981623e69cd70d20761b6509ed5af304f
[ "MIT" ]
null
null
null
from flexx import app, ui class App(ui.Widget): def init(self): label = ui.Label(text='This is a label')
17
48
0.630252
20
119
3.75
0.75
0.133333
0
0
0
0
0
0
0
0
0
0
0.243697
119
7
48
17
0.833333
0
0
0
0
0
0.12605
0
0
0
0
0
0
1
0.25
false
0
0.25
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
0
0
0
0
1
0
0
4
5ebbb1d8eb3b679dc54175d675488778490dd6ae
110
py
Python
coupons/forms.py
chromium7/mangovodo
bd7625342ff4a669879a9b2b3b7b846a29981c3e
[ "MIT" ]
null
null
null
coupons/forms.py
chromium7/mangovodo
bd7625342ff4a669879a9b2b3b7b846a29981c3e
[ "MIT" ]
null
null
null
coupons/forms.py
chromium7/mangovodo
bd7625342ff4a669879a9b2b3b7b846a29981c3e
[ "MIT" ]
null
null
null
from django import forms class CouponApplyForm(forms.Form): code = forms.CharField(label='Coupon')
18.333333
43
0.718182
13
110
6.076923
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.181818
110
5
44
22
0.877778
0
0
0
0
0
0.057143
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
5ebf7437074d0ed998de9bc18a937885b8e8cad6
111
py
Python
miseq_portal/sample_merge/apps.py
BFSSI-Bioinformatics-Lab/miseq_portal
79a0dea0e35a07d86e044acc39c9407cdc128428
[ "MIT" ]
null
null
null
miseq_portal/sample_merge/apps.py
BFSSI-Bioinformatics-Lab/miseq_portal
79a0dea0e35a07d86e044acc39c9407cdc128428
[ "MIT" ]
null
null
null
miseq_portal/sample_merge/apps.py
BFSSI-Bioinformatics-Lab/miseq_portal
79a0dea0e35a07d86e044acc39c9407cdc128428
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SampleMergeConfig(AppConfig): name = 'miseq_portal.sample_merge'
18.5
38
0.792793
13
111
6.615385
0.923077
0
0
0
0
0
0
0
0
0
0
0
0.135135
111
5
39
22.2
0.895833
0
0
0
0
0
0.225225
0.225225
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
5ec699f54a238bfc104dd00b4d4973bb77d8d66e
60
py
Python
src/stories_pytest/__init__.py
proofit404/stories-pytest
e20a50afa42740e2bf0a19219853fcc3c33f0c15
[ "BSD-2-Clause" ]
null
null
null
src/stories_pytest/__init__.py
proofit404/stories-pytest
e20a50afa42740e2bf0a19219853fcc3c33f0c15
[ "BSD-2-Clause" ]
10
2020-12-04T17:37:51.000Z
2021-03-24T23:45:36.000Z
src/stories_pytest/__init__.py
proofit404/stories-pytest
e20a50afa42740e2bf0a19219853fcc3c33f0c15
[ "BSD-2-Clause" ]
null
null
null
"""Pytest reporter for stories executed during the test."""
30
59
0.75
8
60
5.625
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
60
1
60
60
0.865385
0.883333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
0dbf5b85e68269424c6ddac205e65c94dc590081
10,515
py
Python
PyObjCTest/test_nsobjcruntime.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
PyObjCTest/test_nsobjcruntime.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
PyObjCTest/test_nsobjcruntime.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
import sys import Foundation from PyObjCTools.TestSupport import TestCase, min_os_level import objc class TestNSObjCRuntime(TestCase): def testConstants(self): self.assertEqual(Foundation.NSQualityOfServiceUserInteractive, 0x21) self.assertEqual(Foundation.NSQualityOfServiceUserInitiated, 0x19) self.assertEqual(Foundation.NSQualityOfServiceUtility, 0x11) self.assertEqual(Foundation.NSQualityOfServiceBackground, 0x09) self.assertEqual(Foundation.NSQualityOfServiceDefault, -1) self.assertEqual(Foundation.NSFoundationVersionNumber10_0, 397.40) self.assertEqual(Foundation.NSFoundationVersionNumber10_1, 425.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_1_1, 425.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_1_2, 425.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_1_3, 425.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_1_4, 425.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2, 462.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_1, 462.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_2, 462.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_3, 462.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_4, 462.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_5, 462.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_6, 462.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_7, 462.70) self.assertEqual(Foundation.NSFoundationVersionNumber10_2_8, 462.70) self.assertEqual(Foundation.NSFoundationVersionNumber10_3, 500.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_1, 500.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_2, 500.30) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_3, 500.54) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_4, 500.56) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_5, 500.56) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_6, 500.56) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_7, 500.56) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_8, 500.56) self.assertEqual(Foundation.NSFoundationVersionNumber10_3_9, 500.58) self.assertEqual(Foundation.NSFoundationVersionNumber10_4, 567.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_1, 567.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_2, 567.12) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_3, 567.21) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_4_Intel, 567.23) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_4_PowerPC, 567.21) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_5, 567.25) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_6, 567.26) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_7, 567.27) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_8, 567.28) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_9, 567.29) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_10, 567.29) self.assertEqual(Foundation.NSFoundationVersionNumber10_4_11, 567.36) self.assertEqual(Foundation.NSFoundationVersionNumber10_5, 677.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_1, 677.10) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_2, 677.15) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_3, 677.19) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_4, 677.19) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_5, 677.21) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_6, 677.22) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_7, 677.24) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_8, 677.26) self.assertEqual(Foundation.NSFoundationVersionNumber10_6, 751.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_1, 751.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_2, 751.14) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_3, 751.21) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_4, 751.29) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_5, 751.42) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_6, 751.53) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_7, 751.53) self.assertEqual(Foundation.NSFoundationVersionNumber10_6_8, 751.62) self.assertEqual(Foundation.NSFoundationVersionNumber10_8, 945.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_8_1, 945.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_8_2, 945.11) self.assertEqual(Foundation.NSFoundationVersionNumber10_8_3, 945.16) self.assertEqual(Foundation.NSFoundationVersionNumber10_8_4, 945.18) self.assertEqual(Foundation.NSFoundationVersionNumber10_9, 1056) self.assertEqual(Foundation.NSFoundationVersionNumber10_9_1, 1056) self.assertEqual(Foundation.NSFoundationVersionNumber10_9_2, 1056.13) self.assertEqual(Foundation.NSFoundationVersionNumber10_10, 1151.16) self.assertEqual(Foundation.NSFoundationVersionNumber10_10_1, 1151.16) self.assertEqual(Foundation.NSFoundationVersionNumber10_10_2, 1152.14) self.assertEqual(Foundation.NSFoundationVersionNumber10_10_3, 1153.20) self.assertEqual(Foundation.NSFoundationVersionNumber10_10_4, 1153.20) self.assertEqual(Foundation.NSFoundationVersionNumber10_10_5, 1154) self.assertEqual(Foundation.NSFoundationVersionNumber10_10_Max, 1199) self.assertEqual(Foundation.NSFoundationVersionNumber10_11, 1252) self.assertEqual(Foundation.NSFoundationVersionNumber10_11_1, 1255.1) self.assertEqual(Foundation.NSFoundationVersionNumber10_11_2, 1256.1) self.assertEqual(Foundation.NSFoundationVersionNumber10_11_3, 1256.1) self.assertEqual(Foundation.NSFoundationVersionNumber10_11_4, 1258) self.assertEqual(Foundation.NSFoundationVersionNumber10_11_Max, 1299) self.assertIsInstance(Foundation.NSFoundationVersionNumber, float) self.assertIsInstance(Foundation.NSIntegerMax, int) self.assertIsInstance(Foundation.NSIntegerMin, int) self.assertIsInstance(Foundation.NSUIntegerMax, int) if sys.maxsize > 2 ** 32: self.assertEqual(Foundation.NSIntegerMax, 2 ** 63 - 1) self.assertEqual(Foundation.NSIntegerMin, -(2 ** 63)) self.assertEqual(Foundation.NSUIntegerMax, 2 ** 64 - 1) else: self.assertEqual(Foundation.NSIntegerMax, 2 ** 31 - 1) self.assertEqual(Foundation.NSIntegerMin, -(2 ** 31)) self.assertEqual(Foundation.NSUIntegerMax, 2 ** 32 - 1) self.assertTrue(objc.YES) self.assertFalse(objc.NO) self.assertEqual(Foundation.NSOrderedAscending, -1) self.assertEqual(Foundation.NSOrderedSame, 0) self.assertEqual(Foundation.NSOrderedDescending, 1) self.assertEqual(Foundation.NSNotFound, Foundation.NSIntegerMax) @min_os_level("10.6") def testConstants10_6(self): self.assertEqual(Foundation.NSFoundationVersionNumber10_5, 677.00) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_1, 677.10) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_2, 677.15) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_3, 677.19) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_4, 677.19) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_5, 677.21) self.assertEqual(Foundation.NSFoundationVersionNumber10_5_6, 677.22) self.assertEqual(Foundation.NSEnumerationConcurrent, 1 << 0) self.assertEqual(Foundation.NSEnumerationReverse, 1 << 1) self.assertEqual(Foundation.NSSortConcurrent, 1 << 0) self.assertEqual(Foundation.NSSortStable, 1 << 4) @min_os_level("10.7") def testConstants10_7(self): self.assertEqual(Foundation.NSFoundationVersionNumber10_7, 833.10) self.assertEqual(Foundation.NSFoundationVersionNumber10_7_1, 833.10) self.assertEqual(Foundation.NSFoundationVersionNumber10_7_2, 833.20) self.assertEqual(Foundation.NSFoundationVersionNumber10_7_3, 833.24) self.assertEqual(Foundation.NSFoundationVersionNumber10_7_4, 833.25) def testSelectorAccess(self): v = Foundation.NSStringFromSelector("description") self.assertIsInstance(v, str) self.assertEqual(v, "description") v = Foundation.NSSelectorFromString(b"description".decode("ascii")) self.assertIsInstance(v, str) self.assertEqual(v, "description") def testClassAccess(self): v = Foundation.NSStringFromClass(Foundation.NSObject) self.assertIsInstance(v, str) self.assertEqual(v, "NSObject") v = Foundation.NSClassFromString("NSDictionary") self.assertIsInstance(v, objc.objc_class) self.assertEqual(v, Foundation.NSDictionary) def testProtocolAccess(self): p = Foundation.NSProtocolFromString("NSObject") self.assertIsInstance(p, objc.formal_protocol) v = Foundation.NSStringFromProtocol(p) self.assertIsInstance(v, str) self.assertEqual(v, "NSObject") def testTypeInfo(self): rest, size, align = Foundation.NSGetSizeAndAlignment(b"ii", None, None) self.assertEqual(rest, b"i") self.assertIsInstance(size, int) self.assertIsInstance(align, int) def testMinMax(self): self.assertEqual(Foundation.MAX(1, 2), 2) self.assertEqual(Foundation.MAX(2, 1), 2) self.assertEqual(Foundation.MAX("a", "b"), "b") self.assertEqual(Foundation.MIN(1, 2), 1) self.assertEqual(Foundation.MIN(2, 1), 1) self.assertEqual(Foundation.MIN("a", "b"), "a") self.assertEqual(Foundation.ABS(1), 1) self.assertEqual(Foundation.ABS(-1), 1) self.assertEqual(Foundation.ABS(-1.0), 1.0) def testFunctions(self): self.assertArgIsPrintf(Foundation.NSLog, 0)
57.459016
84
0.755017
1,060
10,515
7.322642
0.142453
0.237696
0.376836
0.596238
0.747745
0.496264
0.435326
0.179979
0.124066
0.124066
0
0.099336
0.155587
10,515
182
85
57.774725
0.774862
0
0
0.134969
0
0
0.0097
0
0
0
0.001522
0
0.846626
1
0.055215
false
0
0.02454
0
0.08589
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
21a374d33597793ce6092aa1b985ca68e19749b2
627
py
Python
angr_platforms/risc_v/instrs_riscv/__init__.py
ulugbekna/angr-platforms
3f374b72e5a141f8b421050e3f800eef10175198
[ "BSD-2-Clause" ]
43
2017-09-21T23:26:50.000Z
2022-03-26T08:51:45.000Z
angr_platforms/risc_v/instrs_riscv/__init__.py
ulugbekna/angr-platforms
3f374b72e5a141f8b421050e3f800eef10175198
[ "BSD-2-Clause" ]
27
2017-09-29T00:00:46.000Z
2022-03-31T01:14:54.000Z
angr_platforms/risc_v/instrs_riscv/__init__.py
ulugbekna/angr-platforms
3f374b72e5a141f8b421050e3f800eef10175198
[ "BSD-2-Clause" ]
23
2017-10-06T19:29:25.000Z
2022-03-19T20:56:24.000Z
from pyvex.lifting.util import Type from bitstring import Bits import logging from .b_instr import * from .cb_instr import * from .ci_instr import * from .cj_instr import * from .cr_instr import * from .cs_instr import * from .i_instr import * from .j_instr import * from .misc_instr import * from .r_instr import * from .s_instr import * from .u_instr import * l = logging.getLogger(__name__) REGISTER_TYPE = Type.int_32 BYTE_TYPE = Type.int_8 INDEX_TYPE = Type.int_16 # Lots of things are going to be interpreted as signed immediates. Here's a quickie to load them def bits_to_signed_int(s): return Bits(bin=s).int
21.62069
96
0.763955
108
627
4.203704
0.472222
0.290749
0.363436
0
0
0
0
0
0
0
0
0.009524
0.162679
627
28
97
22.392857
0.855238
0.14992
0
0
0
0
0
0
0
0
0
0
0
1
0.047619
false
0
0.714286
0.047619
0.809524
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
21a5bca1717ca15b4bd38a52e306faa0743a0a16
22
py
Python
brilws/_version.py
xiezhen/brilws
e3652dd4506dff9d713184ff623b59bc11fbe2c7
[ "MIT" ]
1
2017-03-23T16:26:06.000Z
2017-03-23T16:26:06.000Z
brilws/_version.py
xiezhen/brilws
e3652dd4506dff9d713184ff623b59bc11fbe2c7
[ "MIT" ]
1
2017-03-24T15:02:20.000Z
2017-10-02T13:43:26.000Z
brilws/_version.py
xiezhen/brilws
e3652dd4506dff9d713184ff623b59bc11fbe2c7
[ "MIT" ]
1
2019-12-06T09:23:01.000Z
2019-12-06T09:23:01.000Z
__version__ = "3.6.6"
11
21
0.636364
4
22
2.5
0.75
0
0
0
0
0
0
0
0
0
0
0.157895
0.136364
22
1
22
22
0.368421
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
21cfb6e82d172ae3005d72b2b54e64bc31327a50
2,203
py
Python
phonenumbers/data/region_SV.py
ayushgoel/FixGoogleContacts
e49e58db6718bef8f95b6f767241605441c7fe41
[ "MIT" ]
2
2019-02-22T05:27:22.000Z
2020-12-30T19:33:18.000Z
phonenumbers/data/region_SV.py
ayushgoel/FixGoogleContacts
e49e58db6718bef8f95b6f767241605441c7fe41
[ "MIT" ]
null
null
null
phonenumbers/data/region_SV.py
ayushgoel/FixGoogleContacts
e49e58db6718bef8f95b6f767241605441c7fe41
[ "MIT" ]
null
null
null
"""Auto-generated file, do not edit by hand. SV metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_SV = PhoneMetadata(id='SV', country_code=503, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[267]\\d{7}|[89]\\d{6}(?:\\d{4})?', possible_number_pattern='\\d{7,8}|\\d{11}'), fixed_line=PhoneNumberDesc(national_number_pattern='2[1-6]\\d{6}', possible_number_pattern='\\d{8}', example_number='21234567'), mobile=PhoneNumberDesc(national_number_pattern='[67]\\d{7}', possible_number_pattern='\\d{8}', example_number='70123456'), toll_free=PhoneNumberDesc(national_number_pattern='800\\d{4}(?:\\d{4})?', possible_number_pattern='\\d{7}(?:\\d{4})?', example_number='8001234'), premium_rate=PhoneNumberDesc(national_number_pattern='900\\d{4}(?:\\d{4})?', possible_number_pattern='\\d{7}(?:\\d{4})?', example_number='9001234'), shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), personal_number=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), voip=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), pager=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), uan=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), emergency=PhoneNumberDesc(national_number_pattern='911', possible_number_pattern='\\d{3}', example_number='911'), voicemail=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), short_code=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), standard_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), no_international_dialling=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'), number_format=[NumberFormat(pattern='(\\d{4})(\\d{4})', format='\\1 \\2', leading_digits_pattern=['[267]']), NumberFormat(pattern='(\\d{3})(\\d{4})', format='\\1 \\2', leading_digits_pattern=['[89]']), NumberFormat(pattern='(\\d{3})(\\d{4})(\\d{4})', format='\\1 \\2 \\3', leading_digits_pattern=['[89]'])])
95.782609
152
0.736269
281
2,203
5.466192
0.256228
0.253906
0.175781
0.351563
0.579427
0.550781
0.523438
0.451172
0.412109
0.054688
0
0.047712
0.067635
2,203
22
153
100.136364
0.700097
0.024058
0
0
1
0
0.155317
0.026586
0
0
0
0
0
1
0
false
0
0.05
0
0.05
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1d07fd9ab2855fba2894487a55bbcaa39c58dae4
283
py
Python
bottleship/__init__.py
omtinez/bottleship
1f457f6519de744a54c95436a54ce64293e3d5c6
[ "MIT" ]
1
2017-06-28T14:04:32.000Z
2017-06-28T14:04:32.000Z
bottleship/__init__.py
omtinez/bottleship
1f457f6519de744a54c95436a54ce64293e3d5c6
[ "MIT" ]
1
2017-03-09T21:55:03.000Z
2017-03-09T21:55:03.000Z
bottleship/__init__.py
omtinez/bottleship
1f457f6519de744a54c95436a54ce64293e3d5c6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'Oscar Martinez' __email__ = 'omtinez@gmail.com' __version__ = '0.2.4' __all__ = ['BottleShip', 'data_encode', 'data_decode', 'data_is_encoded'] from bottle import * from .bottleship import BottleShip, data_encode, data_decode, data_is_encoded
28.3
77
0.734982
37
283
4.972973
0.648649
0.152174
0.217391
0.26087
0.467391
0.467391
0.467391
0.467391
0
0
0
0.016064
0.120141
283
9
78
31.444444
0.722892
0.074205
0
0
0
0
0.319231
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
df27e79d29dc7ec2b2f415ddea3a761c50da0157
2,069
py
Python
src/web/generator/migrations/0007_auto_20180312_2139.py
fossabot/SIStema
1427dda2082688a9482c117d0e24ad380fdc26a6
[ "MIT" ]
5
2018-03-08T17:22:27.000Z
2018-03-11T14:20:53.000Z
src/web/generator/migrations/0007_auto_20180312_2139.py
fossabot/SIStema
1427dda2082688a9482c117d0e24ad380fdc26a6
[ "MIT" ]
263
2018-03-08T18:05:12.000Z
2022-03-11T23:26:20.000Z
src/web/generator/migrations/0007_auto_20180312_2139.py
fossabot/SIStema
1427dda2082688a9482c117d0e24ad380fdc26a6
[ "MIT" ]
6
2018-03-12T19:48:19.000Z
2022-01-14T04:58:52.000Z
# Generated by Django 2.0.3 on 2018-03-12 21:39 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('generator', '0006_auto_20180309_1507'), ] operations = [ migrations.AlterModelOptions( name='alignmenttablestylecommand', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='cellformattingtablestylecommand', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='fonttablestylecommand', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='image', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='leadingtablestylecommand', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='linetablestylecommand', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='paddingtablestylecommand', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='pagebreak', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='paragraph', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='spacer', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='table', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='textcolortablestylecommand', options={'base_manager_name': 'objects'}, ), migrations.AlterModelOptions( name='valigntablestylecommand', options={'base_manager_name': 'objects'}, ), ]
31.348485
53
0.57274
145
2,069
7.972414
0.303448
0.303633
0.348616
0.247405
0.647924
0.622837
0.622837
0.622837
0
0
0
0.021663
0.308362
2,069
65
54
31.830769
0.786164
0.02175
0
0.661017
1
0
0.283877
0.108309
0
0
0
0
0
1
0
false
0
0.016949
0
0.067797
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
df334ddcb2dc57c3c88265c6aa993dbaf5f7b391
270
py
Python
Assignment3.py
senthilkumarIRTT/Python_WorkShop_First
a90746c533151255ec9eea564d14ce2fca21d68c
[ "BSD-2-Clause" ]
null
null
null
Assignment3.py
senthilkumarIRTT/Python_WorkShop_First
a90746c533151255ec9eea564d14ce2fca21d68c
[ "BSD-2-Clause" ]
null
null
null
Assignment3.py
senthilkumarIRTT/Python_WorkShop_First
a90746c533151255ec9eea564d14ce2fca21d68c
[ "BSD-2-Clause" ]
null
null
null
#List 1 a = ['physics','chemistry',2003,2009] #List 2 b = [1,2,3,4,5] #List 3 c = ["p","r","s"] a.insert(0,'Biology') b.insert(5,6) c.insert(1,"q") print(a,b,c) #Result #['Biology', 'physics', 'chemistry', 2003, 2009] [1, 2, 3, 4, 5, 6] ['p', 'q', 'r', 's']
20.769231
89
0.511111
53
270
2.603774
0.433962
0.231884
0.289855
0.347826
0.072464
0
0
0
0
0
0
0.152466
0.174074
270
12
90
22.5
0.466368
0.411111
0
0
0
0
0.190141
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
df38427211b380822c20c77d3e08135e65612ff2
195
py
Python
src/scheme_in.py
Searge/sicp
d1e389dcdb37090cbfa387bfc1397d4621ad4fba
[ "MIT" ]
1
2018-07-15T08:31:09.000Z
2018-07-15T08:31:09.000Z
src/scheme_in.py
Searge/sicp
d1e389dcdb37090cbfa387bfc1397d4621ad4fba
[ "MIT" ]
1
2018-06-30T09:39:43.000Z
2018-06-30T09:39:43.000Z
src/scheme_in.py
Searge/sicp
d1e389dcdb37090cbfa387bfc1397d4621ad4fba
[ "MIT" ]
null
null
null
def sum_squares(x, y): return add(square(x), square(y)) def print_square(x): print(square(x)) def percent_difference(x, y): difference = abs(x-y) return 100 * difference / x
21.666667
36
0.641026
31
195
3.935484
0.419355
0.04918
0.131148
0
0
0
0
0
0
0
0
0.019608
0.215385
195
8
37
24.375
0.777778
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0.142857
0.714286
0.285714
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
df3f6540e41bc88a61b3bb9d2ec458b9096a448e
1,190
py
Python
webnotes/tests/test_db.py
gangadhar-kadam/sapphite_lib
90cecbd53f781747d09d967ef5794fc8d77d3fe0
[ "MIT" ]
null
null
null
webnotes/tests/test_db.py
gangadhar-kadam/sapphite_lib
90cecbd53f781747d09d967ef5794fc8d77d3fe0
[ "MIT" ]
null
null
null
webnotes/tests/test_db.py
gangadhar-kadam/sapphite_lib
90cecbd53f781747d09d967ef5794fc8d77d3fe0
[ "MIT" ]
1
2018-10-26T01:06:38.000Z
2018-10-26T01:06:38.000Z
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals import unittest import webnotes from webnotes.test_runner import make_test_records class TestDB(unittest.TestCase): def test_get_value(self): webnotes.conn.sql("""delete from `tabProfile` where name not in ('Administrator', 'Guest')""") make_test_records("Profile") self.assertEquals(webnotes.conn.get_value("Profile", {"name": ["=", "Administrator"]}), "Administrator") self.assertEquals(webnotes.conn.get_value("Profile", {"name": ["like", "Admin%"]}), "Administrator") self.assertEquals(webnotes.conn.get_value("Profile", {"name": ["!=", "Guest"]}), "Administrator") from webnotes.utils import nowdate self.assertEquals(webnotes.conn.get_value("Profile", {"modified": ["<", nowdate()]}), "Administrator") self.assertEquals(webnotes.conn.get_value("Profile", {"modified": ["<=", nowdate()]}), "Administrator") self.assertEquals(webnotes.conn.get_value("Profile", {"modified": [">", nowdate()]}), "test1@example.com") self.assertEquals(webnotes.conn.get_value("Profile", {"modified": [">=", nowdate()]}), "test1@example.com")
47.6
109
0.709244
135
1,190
6.111111
0.37037
0.077576
0.203636
0.237576
0.551515
0.551515
0.551515
0.551515
0.494545
0.349091
0
0.005587
0.097479
1,190
25
110
47.6
0.76257
0.068067
0
0
0
0
0.275519
0
0
0
0
0
0.4375
1
0.0625
false
0
0.3125
0
0.4375
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
1
0
0
0
0
4
df71610a00e7d5be3d5a8f5d099b3fef9cf44705
98
py
Python
runvgg.py
sajith-rahim/not-hotdog
c2b8d43ad39bd4d6dc08479923398fd24a15e27b
[ "MIT" ]
null
null
null
runvgg.py
sajith-rahim/not-hotdog
c2b8d43ad39bd4d6dc08479923398fd24a15e27b
[ "MIT" ]
null
null
null
runvgg.py
sajith-rahim/not-hotdog
c2b8d43ad39bd4d6dc08479923398fd24a15e27b
[ "MIT" ]
null
null
null
from transfer_learn import train_model,transferVGG if __name__ == "__main__": transferVGG()
16.333333
50
0.765306
11
98
5.909091
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.153061
98
5
51
19.6
0.783133
0
0
0
0
0
0.081633
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
df7d89b4e034d429b72a14890d702824ba994943
87
py
Python
admin-commands/exceptions.py
pennlabs/django-admin-commands
935c2f7392e0a19cc97a15c152b93d4d20875a85
[ "MIT" ]
3
2020-03-01T18:10:41.000Z
2020-08-09T13:00:12.000Z
admin-commands/exceptions.py
pennlabs/django-admin-commands
935c2f7392e0a19cc97a15c152b93d4d20875a85
[ "MIT" ]
null
null
null
admin-commands/exceptions.py
pennlabs/django-admin-commands
935c2f7392e0a19cc97a15c152b93d4d20875a85
[ "MIT" ]
null
null
null
""" Exception for the admin-commands-app """ class CommandError(Exception): pass
14.5
44
0.701149
10
87
6.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
45
17.4
0.847222
0.413793
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
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
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
df84b2622df469318f66a86122a72925bada0c16
13,035
py
Python
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/openpyxl/packaging/tests/test_manifest.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
4
2018-07-04T17:20:12.000Z
2019-07-14T18:07:25.000Z
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/openpyxl/packaging/tests/test_manifest.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
null
null
null
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/openpyxl/packaging/tests/test_manifest.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
1
2018-09-03T03:02:06.000Z
2018-09-03T03:02:06.000Z
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl import pytest from io import BytesIO from zipfile import ZipFile from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml from openpyxl.xml.constants import ( ARC_CONTENT_TYPES, ARC_WORKBOOK, CONTYPES_NS, XLSM, XLSX, XLTM, XLTX, ) @pytest.fixture def FileExtension(): from ..manifest import FileExtension return FileExtension class TestFileExtension: def test_ctor(self, FileExtension): ext = FileExtension( ContentType="application/xml", Extension="xml" ) xml = tostring(ext.to_tree()) expected = """ <Default ContentType="application/xml" Extension="xml"/> """ diff = compare_xml(xml, expected) assert diff is None, diff def test_from_xml(self, FileExtension): src = """ <Default ContentType="application/xml" Extension="xml"/> """ node = fromstring(src) ext = FileExtension.from_tree(node) assert ext == FileExtension(ContentType="application/xml", Extension="xml") @pytest.fixture def Override(): from ..manifest import Override return Override class TestOverride: def test_ctor(self, Override): override = Override( ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml", PartName="/xl/workbook.xml" ) xml = tostring(override.to_tree()) expected = """ <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/> """ diff = compare_xml(xml, expected) assert diff is None, diff def test_from_xml(self, Override): src = """ <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/> """ node = fromstring(src) override = Override.from_tree(node) assert override == Override( ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml", PartName="/xl/workbook.xml" ) @pytest.fixture def Manifest(): from ..manifest import Manifest return Manifest class TestManifest: def test_ctor(self, Manifest): manifest = Manifest() xml = tostring(manifest.to_tree()) expected = """ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels" /> <Default ContentType="application/xml" Extension="xml" /> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" PartName="/xl/sharedStrings.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.theme+xml" PartName="/xl/theme/theme1.xml"/> <Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"/> </Types> """ diff = compare_xml(xml, expected) assert diff is None, diff def test_from_xml(self, datadir, Manifest): datadir.chdir() with open("manifest.xml") as src: node = fromstring(src.read()) manifest = Manifest.from_tree(node) assert len(manifest.Default) == 2 assert len(manifest.Override) == 10 def test_filenames(self, datadir, Manifest): datadir.chdir() with open("manifest.xml") as src: node = fromstring(src.read()) manifest = Manifest.from_tree(node) assert manifest.filenames == [ '/xl/workbook.xml', '/xl/worksheets/sheet1.xml', '/xl/chartsheets/sheet1.xml', '/xl/theme/theme1.xml', '/xl/styles.xml', '/xl/sharedStrings.xml', '/xl/drawings/drawing1.xml', '/xl/charts/chart1.xml', '/docProps/core.xml', '/docProps/app.xml', ] def test_exts(self, datadir, Manifest): datadir.chdir() with open("manifest.xml") as src: node = fromstring(src.read()) manifest = Manifest.from_tree(node) assert manifest.extensions == [ ('xml', 'application/xml'), ] def test_no_dupe_overrides(self, Manifest): manifest = Manifest() assert len(manifest.Override) == 6 manifest.Override.append("a") manifest.Override.append("a") assert len(manifest.Override) == 7 def test_no_dupe_types(self, Manifest): manifest = Manifest() assert len(manifest.Default) == 2 manifest.Default.append("a") manifest.Default.append("a") assert len(manifest.Default) == 3 class TestContentTypes: def test_workbook(self): from openpyxl import Workbook wb = Workbook() from ..manifest import write_content_types manifest = write_content_types(wb) xml = tostring(manifest.to_tree()) expected = """ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels" /> <Default ContentType="application/xml" Extension="xml" /> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" PartName="/xl/sharedStrings.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.theme+xml" PartName="/xl/theme/theme1.xml"/> <Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet1.xml"/> </Types> """ diff = compare_xml(xml, expected) assert diff is None, diff def test_chartsheet(self): from openpyxl import Workbook wb = Workbook() wb.create_chartsheet() from ..manifest import write_content_types manifest = write_content_types(wb) xml = tostring(manifest.to_tree()) expected = """ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels" /> <Default ContentType="application/xml" Extension="xml" /> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" PartName="/xl/sharedStrings.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.theme+xml" PartName="/xl/theme/theme1.xml"/> <Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet1.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml" PartName="/xl/chartsheets/sheet1.xml"/> </Types> """ diff = compare_xml(xml, expected) assert diff is None, diff def test_vba(self, datadir): from openpyxl import load_workbook from ..manifest import write_content_types datadir.chdir() wb = load_workbook('sample.xlsm', keep_vba=True) manifest = write_content_types(wb) partnames = [t.PartName for t in manifest.Override] expected = ['/xl/workbook.xml', '/xl/worksheets/sheet1.xml', '/xl/worksheets/sheet2.xml', '/xl/worksheets/sheet3.xml', '/xl/theme/theme1.xml', '/xl/styles.xml', '/docProps/core.xml', '/docProps/app.xml', '/xl/sharedStrings.xml'] assert partnames == expected @pytest.mark.lxml_required # for XPATH lookup @pytest.mark.parametrize("has_vba, as_template, content_type", [ (None, False, XLSX), (None, True, XLTX), (True, False, XLSM), (True, True, XLTM) ] ) def test_templates(self, has_vba, as_template, content_type, Manifest, Override): from openpyxl import Workbook from ..manifest import write_content_types wb = Workbook() if has_vba: archive = ZipFile(BytesIO(), "w") parts = [Override("/xl/workbook.xml", "")] m = Manifest(Override=parts) archive.writestr(ARC_CONTENT_TYPES, tostring(m.to_tree())) wb.vba_archive = archive manifest = write_content_types(wb, as_template=as_template) xml = tostring(manifest.to_tree()) root = fromstring(xml) node = root.find('{%s}Override[@PartName="/xl/workbook.xml"]'% CONTYPES_NS) assert node.get("ContentType") == content_type def test_comments(self, Manifest): from openpyxl import Workbook from ..manifest import write_content_types wb = Workbook() ws = wb.active ws._comment_count = 1 manifest = write_content_types(wb) xml = tostring(manifest.to_tree()) expected = """ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/> <Default ContentType="application/xml" Extension="xml"/> <Default ContentType="application/vnd.openxmlformats-officedocument.vmlDrawing" Extension="vml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" PartName="/xl/sharedStrings.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.theme+xml" PartName="/xl/theme/theme1.xml"/> <Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet1.xml"/> <Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml" PartName="/xl/comments1.xml"/> </Types> """ diff = compare_xml(xml, expected) assert diff is None, diff def test_media(self): from openpyxl import Workbook from ..manifest import write_content_types wb = Workbook() manifest = write_content_types(wb, exts=['xl/media/image1.png']) xml = tostring(manifest.Default[-1].to_tree()) expected = """<Default ContentType="image/png" Extension="png" />""" diff = compare_xml(xml, expected) assert diff is None, diff
41.778846
236
0.648715
1,310
13,035
6.379389
0.122901
0.121096
0.113677
0.177336
0.760321
0.7255
0.708867
0.663396
0.647601
0.647601
0
0.005191
0.231454
13,035
311
237
41.913183
0.829008
0.003759
0
0.558491
0
0.041509
0.52045
0.345606
0
0
0
0
0.071698
1
0.071698
false
0
0.083019
0
0.181132
0
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
df873f72bd175bb62cae9b186dcb8ebe176585ae
403
py
Python
midap_software/__init__.py
cap-lab/MidapSim
4f92a9f9413c29d7e1f37e863cce90ebdde8b420
[ "MIT" ]
2
2021-03-28T16:19:06.000Z
2022-02-26T08:58:33.000Z
midap_software/__init__.py
cap-lab/MidapSim
4f92a9f9413c29d7e1f37e863cce90ebdde8b420
[ "MIT" ]
null
null
null
midap_software/__init__.py
cap-lab/MidapSim
4f92a9f9413c29d7e1f37e863cce90ebdde8b420
[ "MIT" ]
1
2021-02-22T08:44:20.000Z
2021-02-22T08:44:20.000Z
from .analysis import * from .compiler import * from .control_info import * from .fmem_info import * from .layer_block import * from .layer_compiler import * from .midap_layer import * from .midap_model import * from .min_mem_access import * from .net_fuser import * from .partition import * from .pyramid import * from .static_estimator import * from .subnet_compiler import * from .time_line import *
25.1875
31
0.776675
57
403
5.280702
0.403509
0.465116
0.179402
0
0
0
0
0
0
0
0
0
0.148883
403
15
32
26.866667
0.877551
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
df938a9ef3c7f4bc156217ab2921686703311801
475
py
Python
microservices/helper_functions.py
scott-sattler/RESTful-project
8bb1c77ad8d8552fd5f179cfbe923e1b13d074a9
[ "MIT" ]
null
null
null
microservices/helper_functions.py
scott-sattler/RESTful-project
8bb1c77ad8d8552fd5f179cfbe923e1b13d074a9
[ "MIT" ]
null
null
null
microservices/helper_functions.py
scott-sattler/RESTful-project
8bb1c77ad8d8552fd5f179cfbe923e1b13d074a9
[ "MIT" ]
null
null
null
""" """ def construct_address(host, port, route, args): """ {host}:{port}{route}?{'&'.join(args)} :param str host: '172.0.0.1' :param str port: '5000' :param str route: '/store/file/here' :param list[str] args: ['a=b', 'c=d'] """ return f"http://{host}:{port}{route}?{'&'.join(args)}" # host = '172.0.0.1' # port = '5000' # route = '/store' # args = ['x=3', 'y=1'] # print(construct_address(host, port, route, args))
20.652174
58
0.515789
66
475
3.681818
0.439394
0.131687
0.213992
0.197531
0.526749
0.271605
0
0
0
0
0
0.060109
0.229474
475
22
59
21.590909
0.603825
0.608421
0
0
0
0
0.360656
0
0
0
0
0
0
1
0.5
false
0
0
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
10e5b4bed8f3bcda2c51fb1804a527e07277fafe
192
py
Python
lambdas/hello_world/src/lambda_function.py
nicor88/aws-ci-cd-lambda
26e94174b5160e954d1344e4653b61bfb0e5182f
[ "MIT" ]
null
null
null
lambdas/hello_world/src/lambda_function.py
nicor88/aws-ci-cd-lambda
26e94174b5160e954d1344e4653b61bfb0e5182f
[ "MIT" ]
null
null
null
lambdas/hello_world/src/lambda_function.py
nicor88/aws-ci-cd-lambda
26e94174b5160e954d1344e4653b61bfb0e5182f
[ "MIT" ]
null
null
null
import pandas import requests def lambda_handler(event, context): print('Hello World') print(requests.__version__) print(pandas.__version__) return {'output': 'hello world'}
19.2
36
0.71875
22
192
5.863636
0.636364
0.155039
0
0
0
0
0
0
0
0
0
0
0.171875
192
9
37
21.333333
0.811321
0
0
0
0
0
0.145833
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0
0.571429
0.428571
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
1
0
4
10f1045cc84ef1f58c7c8430e0518cb2308b7d4c
373
py
Python
Ar_Script/ar_280_进阶_类练习.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
Ar_Script/ar_280_进阶_类练习.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
1
2020-01-19T01:19:57.000Z
2020-01-19T01:19:57.000Z
Ar_Script/ar_280_进阶_类练习.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
class A: def __init__(self): print('A class call ') class B(A): def __init__(self): print('B class call') A.__init__(self) class C(A): def __init__(self): print('C class call') A.__init__(self) class D(B,C): def __init__(self): print('D class call') B.__init__(self) C.__init__(self) d=D()
17.761905
30
0.541555
54
373
3.148148
0.185185
0.376471
0.258824
0.376471
0.570588
0.270588
0
0
0
0
0
0
0.313673
373
21
31
17.761905
0.664063
0
0
0.352941
0
0
0.131016
0
0
0
0
0
0
1
0.235294
false
0
0
0
0.470588
0.235294
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
10f451c8c6e918547b7c895e9348d4eaab20d53a
114
py
Python
test.py
GuanzhaoLi/Super-Easy-CNN-Computer-Vison-GUI
d8c87eaf72fa5f40196729a4576a2d4f7e9be33a
[ "MIT" ]
null
null
null
test.py
GuanzhaoLi/Super-Easy-CNN-Computer-Vison-GUI
d8c87eaf72fa5f40196729a4576a2d4f7e9be33a
[ "MIT" ]
null
null
null
test.py
GuanzhaoLi/Super-Easy-CNN-Computer-Vison-GUI
d8c87eaf72fa5f40196729a4576a2d4f7e9be33a
[ "MIT" ]
null
null
null
def functionA(): print("This is a testing script") if __name__ == '__main__': functionA() #functionB()
14.25
34
0.640351
13
114
5
0.923077
0
0
0
0
0
0
0
0
0
0
0
0.210526
114
8
35
14.25
0.722222
0.096491
0
0
0
0
0.316832
0
0
0
0
0
0
1
0.25
true
0
0
0
0.25
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
8000356f6a273c399ec1d3d92af700e9221ce574
215
py
Python
track/__init__.py
seeing-things/track
a8faea4bad93948100347a4604f1f0b78edff616
[ "MIT" ]
4
2019-06-11T20:46:03.000Z
2019-10-28T17:52:45.000Z
track/__init__.py
bgottula/track
a8faea4bad93948100347a4604f1f0b78edff616
[ "MIT" ]
114
2017-06-05T06:51:22.000Z
2019-01-20T23:01:29.000Z
track/__init__.py
bgottula/track
a8faea4bad93948100347a4604f1f0b78edff616
[ "MIT" ]
null
null
null
"""Init for track package""" from .config import * from .gamepad import * from .mounts import * from .control import * from .telem import * from .laser import * from .plate_solve import * from .gps_client import *
19.545455
28
0.725581
30
215
5.133333
0.533333
0.454545
0
0
0
0
0
0
0
0
0
0
0.172093
215
10
29
21.5
0.865169
0.102326
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
800d2d22e169a74cf5afd20f6b9c76fc9fc2833c
95
py
Python
institutes/apps.py
vpalmerini/unicamp-api
aa8a140f8f6830264ba9ff06e3398ec28632105c
[ "MIT" ]
null
null
null
institutes/apps.py
vpalmerini/unicamp-api
aa8a140f8f6830264ba9ff06e3398ec28632105c
[ "MIT" ]
9
2019-12-04T23:47:52.000Z
2021-06-10T18:29:32.000Z
institutes/apps.py
vpalmerini/unicamp-api
aa8a140f8f6830264ba9ff06e3398ec28632105c
[ "MIT" ]
null
null
null
from django.apps import AppConfig class InstitutesConfig(AppConfig): name = 'institutes'
15.833333
34
0.768421
10
95
7.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.157895
95
5
35
19
0.9125
0
0
0
0
0
0.105263
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
339d7ba64cd0decbbcf8b863d7d4e09bc2b2fa3a
74
py
Python
Term 2/8/6-random.py
theseana/miniatur
eed89de0b1e0b96bb32067d5c049c6fd4ca5f872
[ "MIT" ]
1
2022-01-16T00:30:43.000Z
2022-01-16T00:30:43.000Z
Term 2/8/6-random.py
theseana/miniatur
eed89de0b1e0b96bb32067d5c049c6fd4ca5f872
[ "MIT" ]
null
null
null
Term 2/8/6-random.py
theseana/miniatur
eed89de0b1e0b96bb32067d5c049c6fd4ca5f872
[ "MIT" ]
null
null
null
import random random_number = random.randint(42, 99) print(random_number)
18.5
38
0.810811
11
74
5.272727
0.636364
0.413793
0
0
0
0
0
0
0
0
0
0.059701
0.094595
74
4
39
18.5
0.80597
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
33ad59262f86f94658ee19c80535f98279deda0e
47
py
Python
_/0349_09_Code/030.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_09_Code/030.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_09_Code/030.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
@ajax_login_required def ajax_delete(request):
15.666667
25
0.851064
7
47
5.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.06383
47
2
26
23.5
0.840909
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
33b347b2b6f3cb0f3aaaa7931925bd560b469b5d
204
py
Python
app/accounts/models.py
ground0state/cosmos
b938a5f3040ec3d544e06789ec99d1cb9d337bf5
[ "MIT" ]
null
null
null
app/accounts/models.py
ground0state/cosmos
b938a5f3040ec3d544e06789ec99d1cb9d337bf5
[ "MIT" ]
7
2020-06-05T22:31:02.000Z
2022-02-10T08:04:33.000Z
app/accounts/models.py
ground0state/cosmos
b938a5f3040ec3d544e06789ec99d1cb9d337bf5
[ "MIT" ]
null
null
null
from django.contrib.auth.models import AbstractUser from django.db import models class CustomUser(AbstractUser): """拡張ユーザーモデル""" class Meta(AbstractUser.Meta): db_table = 'custom_user'
20.4
51
0.730392
24
204
6.125
0.625
0.136054
0
0
0
0
0
0
0
0
0
0
0.171569
204
9
52
22.666667
0.869822
0.044118
0
0
0
0
0.058201
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
33da7833a7d4f2f500c365de453c4c31a24103f6
203
py
Python
gitsome_test/testdata/gitsome/lib/github3/search/tmp.py
rahman-mahmudur/PyART
36591cd10b2b7a560bbcb47a6cf744b72466f92a
[ "Apache-2.0" ]
null
null
null
gitsome_test/testdata/gitsome/lib/github3/search/tmp.py
rahman-mahmudur/PyART
36591cd10b2b7a560bbcb47a6cf744b72466f92a
[ "Apache-2.0" ]
null
null
null
gitsome_test/testdata/gitsome/lib/github3/search/tmp.py
rahman-mahmudur/PyART
36591cd10b2b7a560bbcb47a6cf744b72466f92a
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from ..models import GitHubCore from ..users import User class UserSearchResult(GitHubCore): def _update_attributes(self, data): reveal_type(result)
22.555556
39
0.778325
24
203
6.25
0.791667
0
0
0
0
0
0
0
0
0
0
0
0.157635
203
9
40
22.555556
0.877193
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
33dd20375934f67673c3349d4783e565c75cd3ba
4,895
py
Python
tests/test_validators.py
filwaitman/autosetup-py
e2275528d1a17af82e3563b6cc249d1bf22ec38f
[ "MIT" ]
2
2017-10-14T03:15:54.000Z
2018-02-28T15:50:16.000Z
tests/test_validators.py
filwaitman/autosetup-py
e2275528d1a17af82e3563b6cc249d1bf22ec38f
[ "MIT" ]
null
null
null
tests/test_validators.py
filwaitman/autosetup-py
e2275528d1a17af82e3563b6cc249d1bf22ec38f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import unittest from autosetup.validators import validate_module_name, validate_name, validate_email, validate_url class ValidateModuleNameTestCase(unittest.TestCase): def test_regular_chars(self): self.assertTrue(validate_module_name('potato')) self.assertTrue(validate_module_name('CrazyCapitalLETTER')) self.assertTrue(validate_module_name('z')) def test_numbers(self): self.assertTrue(validate_module_name('area51')) self.assertTrue(validate_module_name('hero2vilain')) self.assertFalse(validate_module_name('42isthwanswer')) self.assertFalse(validate_module_name('666')) def test_empty(self): self.assertFalse(validate_module_name('')) self.assertFalse(validate_module_name(' ')) def test_reserved_keywords(self): self.assertFalse(validate_module_name('for')) self.assertFalse(validate_module_name('if')) def test_special_chars(self): self.assertFalse(validate_module_name('money-o-rama')) self.assertFalse(validate_module_name('ImThe#1')) self.assertFalse(validate_module_name('Supercool!')) def test_builtins(self): # Although I disagree you actually *can* override those ones. self.assertTrue(validate_module_name('AssertionError')) self.assertTrue(validate_module_name('zip')) def test_restricted_builtins(self): self.assertFalse(validate_module_name('True')) self.assertFalse(validate_module_name('False')) self.assertFalse(validate_module_name('None')) class ValidateNameTestCase(unittest.TestCase): def test_regular_chars(self): self.assertTrue(validate_name('potato')) self.assertTrue(validate_name('CrazyCapitalLETTER')) self.assertTrue(validate_name('z')) def test_numbers(self): self.assertTrue(validate_name('area51')) self.assertTrue(validate_name('hero2vilain')) self.assertFalse(validate_name('42isthwanswer')) self.assertFalse(validate_name('666')) def test_empty(self): self.assertFalse(validate_name('')) self.assertFalse(validate_name(' ')) def test_reserved_keywords(self): self.assertTrue(validate_name('for')) # No reserved words since this is just the name. self.assertTrue(validate_name('if')) # No reserved words since this is just the name. def test_special_chars(self): self.assertTrue(validate_name('money-o-rama')) self.assertFalse(validate_name('ImThe#1')) self.assertFalse(validate_name('Supercool!')) def test_builtins(self): self.assertTrue(validate_name('AssertionError')) self.assertTrue(validate_name('zip')) def test_restricted_builtins(self): self.assertFalse(validate_name('True')) self.assertFalse(validate_name('False')) self.assertFalse(validate_name('None')) class ValidateEmailTestCase(unittest.TestCase): def test_common(self): self.assertTrue(validate_email('hamster@sloth.com')) self.assertTrue(validate_email('HAMSter@sloth.co.nz')) self.assertTrue(validate_email('hamster1995x0x0@sloth.com')) self.assertTrue(validate_email('hams.ter@sloth.com')) self.assertTrue(validate_email('hamster-king@sloth.com')) def test_empty(self): self.assertFalse(validate_email('')) self.assertFalse(validate_email(' ')) def test_malformed_emails(self): self.assertFalse(validate_email('hamsterslothcom')) self.assertFalse(validate_email('hamster@slothcom')) self.assertFalse(validate_email('hamster@sloth')) self.assertFalse(validate_email('hamster@')) self.assertFalse(validate_email('@sloth.com')) self.assertFalse(validate_email('hamster')) self.assertFalse(validate_email('hamster@@sloth.com')) self.assertFalse(validate_email('hamster@sloth..com')) self.assertFalse(validate_email('hamster.@sloth.com')) self.assertFalse(validate_email('hamster@.sloth.com')) self.assertFalse(validate_email('hamster@sloth.-com')) self.assertFalse(validate_email('hamster-@sloth.com')) self.assertFalse(validate_email('hamster@-sloth.com')) class ValidateUrlTestCase(unittest.TestCase): def test_common(self): self.assertTrue(validate_url('http://www.google.com')) self.assertTrue(validate_url('https://youtube.com/something/else')) def test_empty(self): self.assertFalse(validate_url('')) self.assertFalse(validate_url(' ')) def test_malformed_emails(self): self.assertFalse(validate_url('hamster')) self.assertFalse(validate_url('hamster.com')) self.assertFalse(validate_url('http')) self.assertFalse(validate_url('http://'))
39.475806
98
0.703575
543
4,895
6.110497
0.173112
0.189873
0.291139
0.126582
0.820976
0.545208
0.427065
0.332429
0.302893
0.16305
0
0.006149
0.169356
4,895
123
99
39.796748
0.809887
0.035751
0
0.301075
0
0
0.136585
0.009968
0
0
0
0
0.709677
1
0.215054
false
0
0.032258
0
0.290323
0
0
0
0
null
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
33dfb022275a336dcbdf5c41e425b964bb06fb19
71
py
Python
cmc/utils/__init__.py
Devansh3712/py-cmc
e3f9687914d92cd95bd5a7c04e6103345ba43a3d
[ "MIT" ]
2
2022-02-14T07:13:12.000Z
2022-02-14T07:20:34.000Z
cmc/utils/__init__.py
Devansh3712/py-cmc
e3f9687914d92cd95bd5a7c04e6103345ba43a3d
[ "MIT" ]
6
2022-02-21T10:50:43.000Z
2022-03-03T15:44:09.000Z
cmc/utils/__init__.py
Devansh3712/py-cmc
e3f9687914d92cd95bd5a7c04e6103345ba43a3d
[ "MIT" ]
2
2022-02-20T01:43:35.000Z
2022-03-13T09:34:51.000Z
#!/usr/bin/env python """Utility modules used by `cmc-py` library."""
17.75
47
0.661972
11
71
4.272727
1
0
0
0
0
0
0
0
0
0
0
0
0.126761
71
3
48
23.666667
0.758065
0.873239
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
33fc12a5fb3c458598fbe8b6e91795c8b6f38245
2,832
py
Python
python/test_gilded_rose.py
rdmagm062699/GildedRose-Refactoring-Kata
ff3e00d980a4ed4f0237278dfeabaf17da5d1d66
[ "MIT" ]
null
null
null
python/test_gilded_rose.py
rdmagm062699/GildedRose-Refactoring-Kata
ff3e00d980a4ed4f0237278dfeabaf17da5d1d66
[ "MIT" ]
null
null
null
python/test_gilded_rose.py
rdmagm062699/GildedRose-Refactoring-Kata
ff3e00d980a4ed4f0237278dfeabaf17da5d1d66
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest from gilded_rose import Item, GildedRose class GildedRoseTest(unittest.TestCase): def test_foo_quality_never_below_zero(self): items = [Item("foo", 0, 0)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual("foo", items[0].name) self.assertEqual(0, items[0].quality) def test_foo_quality_decreases_by_one(self): items = [Item("foo", 0, 1)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(0, items[0].quality) def test_foo_quality_decreases_twice_as_fast_after_sell_date(self): items = [Item("foo", -1, 2)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(0, items[0].quality) def test_foo_sellin_decreases_by_one(self): items = [Item("foo", 1, 1)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(0, items[0].sell_in) def test_aged_brie_increases_in_quality(self): items = [Item("Aged Brie", 1, 0)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(1, items[0].quality) def test_aged_brie_increases_in_quality_up_to_50(self): items = [Item("Aged Brie", 1, 50)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(50, items[0].quality) def test_sulfuras_does_not_decrease_in_quality(self): items = [Item("Sulfuras, Hand of Ragnaros", 1, 10)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(10, items[0].quality) def test_sulfuras_sellin_does_not_decreases(self): items = [Item("Sulfuras, Hand of Ragnaros", 1, 1)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(1, items[0].sell_in) def test_backstage_passes_quality_increases_by_two_ten_days_or_less(self): items = [Item("Backstage passes to a TAFKAL80ETC concert", 10, 3)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(5, items[0].quality) def test_backstage_passes_quality_increases_by_three_five_days_or_less(self): items = [Item("Backstage passes to a TAFKAL80ETC concert", 5, 3)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(6, items[0].quality) def test_backstage_passes_quality_drops_to_zero_after_concert(self): items = [Item("Backstage passes to a TAFKAL80ETC concert", 0, 3)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(0, items[0].quality) if __name__ == '__main__': unittest.main()
37.263158
81
0.676201
369
2,832
4.864499
0.192412
0.128134
0.079666
0.153203
0.841226
0.812813
0.750418
0.656825
0.570474
0.543175
0
0.026529
0.214689
2,832
75
82
37.76
0.780576
0.007415
0
0.42623
0
0
0.076896
0
0
0
0
0
0.196721
1
0.180328
false
0.098361
0.032787
0
0.229508
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
33febec20afa32e35ce6578a1c2fbb414679dfd2
447
py
Python
bottomline/blweb/utils.py
mcm219/BottomLine
db82eef403c79bffa3864c4db6bc336632abaca5
[ "MIT" ]
null
null
null
bottomline/blweb/utils.py
mcm219/BottomLine
db82eef403c79bffa3864c4db6bc336632abaca5
[ "MIT" ]
1
2021-06-14T02:20:40.000Z
2021-06-14T02:20:40.000Z
bottomline/blweb/utils.py
mcm219/BottomLine
db82eef403c79bffa3864c4db6bc336632abaca5
[ "MIT" ]
null
null
null
from blweb.models import VehicleMake, VehicleModel # # This module contains a variety of helper functions that can be used from # multiple places within the bottomline application. # # a helper function that returns the total number of vehicle makes def get_make_count(): return VehicleMake.objects.count() # a helper function that returns the total number of vehicle models def get_model_count(): return VehicleModel.objects.count()
26.294118
74
0.785235
63
447
5.507937
0.587302
0.040346
0.086455
0.10951
0.282421
0.282421
0.282421
0.282421
0.282421
0.282421
0
0
0.163311
447
16
75
27.9375
0.927807
0.568233
0
0
0
0
0
0
0
0
0
0
0
1
0.4
true
0
0.2
0.4
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
4
d5079abd39302ab580eb74c159cfc7aaf3582428
461
py
Python
ivy/functional/backends/jax/array_api/manipulation_functions.py
arxxv/ivy
740881dfefbdf658f6e395f1b3bc17ed4a77f650
[ "Apache-2.0" ]
null
null
null
ivy/functional/backends/jax/array_api/manipulation_functions.py
arxxv/ivy
740881dfefbdf658f6e395f1b3bc17ed4a77f650
[ "Apache-2.0" ]
null
null
null
ivy/functional/backends/jax/array_api/manipulation_functions.py
arxxv/ivy
740881dfefbdf658f6e395f1b3bc17ed4a77f650
[ "Apache-2.0" ]
null
null
null
# global import jax.numpy as jnp from typing import Union, Tuple, Optional, List # local from ivy.functional.backends.jax import JaxArray def roll(x: JaxArray, shift: Union[int, Tuple[int]], axis: Union[int, Tuple[int]]=None) -> JaxArray: return jnp.roll(x, shift, axis) # noinspection PyShadowingBuiltins def flip(x: JaxArray, axis: Optional[Union[int, Tuple[int], List[int]]] = None)\ -> JaxArray: return jnp.flip(x, axis=axis)
25.611111
100
0.689805
65
461
4.892308
0.430769
0.075472
0.122642
0.150943
0.150943
0
0
0
0
0
0
0
0.177874
461
17
101
27.117647
0.83905
0.097614
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.222222
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
1d53adbd20b342d44fafca51420f5d6f85bb9376
3,186
py
Python
dl/state.py
eric-erki/catalyst
0f90fa30705ac5e450a358fb6548739ddb7db83c
[ "MIT" ]
null
null
null
dl/state.py
eric-erki/catalyst
0f90fa30705ac5e450a358fb6548739ddb7db83c
[ "MIT" ]
null
null
null
dl/state.py
eric-erki/catalyst
0f90fa30705ac5e450a358fb6548739ddb7db83c
[ "MIT" ]
null
null
null
from collections import defaultdict from torchnet import meter from catalyst.utils.factory import UtilsFactory from catalyst.utils.misc import FrozenClass class RunnerState(FrozenClass): """ An object that is used to pass internal state during train/valid/infer. """ def __init__(self, **kwargs): # special info self.device = None self.loader_mode = None self.reset_step = kwargs.get("reset_step", False) # data pipeline self.input = None self.output = None # counters self.loader_len = 0 self.batch_size = 0 self.step = 0 self.epoch = 0 # metrics self.lr = defaultdict(lambda: 0) self.momentum = defaultdict(lambda: 0) self.loss = defaultdict(lambda: 0) self.batch_metrics = defaultdict(lambda: 0) self.epoch_metrics = defaultdict( lambda: defaultdict(lambda: meter.AverageValueMeter())) self.valid_metrics = None self.best_metrics = None # other self.is_train = False for k, v in kwargs.items(): setattr(self, k, v) self._freeze() @staticmethod def on_stage_init_pre(model, stage): pass @staticmethod def on_stage_init_post(model, stage): pass @staticmethod def on_train_start_pre(state): pass @staticmethod def on_train_start_post(state): pass @staticmethod def on_train_end_pre(state): pass @staticmethod def on_train_end_post(state): pass @staticmethod def on_infer_start_pre(state): pass @staticmethod def on_infer_start_post(state): pass @staticmethod def on_infer_end_pre(state): pass @staticmethod def on_infer_end_post(state): pass @staticmethod def on_epoch_start_pre(state): pass @staticmethod def on_epoch_start_post(state): pass @staticmethod def on_epoch_end_pre(state): pass @staticmethod def on_epoch_end_post(state): state.epoch_metrics = defaultdict( lambda: defaultdict(lambda: meter.AverageValueMeter())) @staticmethod def on_loader_start_pre(state): pass @staticmethod def on_loader_start_post(state): pass @staticmethod def on_loader_end_pre(state): lm = state.loader_mode state.epoch_metrics[lm] = { key: UtilsFactory.get_val_from_metric(value) for key, value in state.epoch_metrics[lm].items() } @staticmethod def on_loader_end_post(state): if state.reset_step: state.step = None @staticmethod def on_batch_start_pre(state): state.batch_metrics = defaultdict(lambda: 0) @staticmethod def on_batch_start_post(state): pass @staticmethod def on_batch_end_pre(state): pass @staticmethod def on_batch_end_post(state): lm = state.loader_mode for key, value in state.batch_metrics.items(): state.epoch_metrics[lm][key].add(value) state.step += state.batch_size
22.43662
75
0.624608
379
3,186
5.002639
0.21372
0.174051
0.197257
0.188291
0.58597
0.417194
0.375527
0.07173
0
0
0
0.00402
0.297238
3,186
141
76
22.595745
0.842787
0.038293
0
0.421569
0
0
0.003285
0
0
0
0
0
0
1
0.22549
false
0.166667
0.039216
0
0.27451
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
1d656fa6fbb4b68a95bd4b39174a62149cc47189
109
py
Python
functions/python/body-json.py
swiftycloud/swifty.todoapp
1a36c6e6f1af4584a8c0151e15e9ffcf2453f8c1
[ "MIT" ]
5
2018-11-08T17:07:43.000Z
2019-04-23T15:18:31.000Z
functions/python/body-json.py
swiftycloud/swifty.todoapp
1a36c6e6f1af4584a8c0151e15e9ffcf2453f8c1
[ "MIT" ]
null
null
null
functions/python/body-json.py
swiftycloud/swifty.todoapp
1a36c6e6f1af4584a8c0151e15e9ffcf2453f8c1
[ "MIT" ]
3
2018-11-08T17:07:47.000Z
2020-11-22T00:20:38.000Z
import json def Main(req): o = json.loads(req.body.encode()) return { "status": o["status"] }, None
18.166667
42
0.605505
16
109
4.125
0.75
0
0
0
0
0
0
0
0
0
0
0
0.201835
109
5
43
21.8
0.758621
0
0
0
0
0
0.110092
0
0
0
0
0
0
1
0.25
false
0
0.25
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
0
0
0
0
1
0
0
4
1d785a0394f90f75ba6e4ffe52cc117708415e18
63
py
Python
pdpython_model/sarsa_run.py
seifely/pdpython
41410ca2807509caf32794bef57e7e210dcbce6f
[ "MIT" ]
null
null
null
pdpython_model/sarsa_run.py
seifely/pdpython
41410ca2807509caf32794bef57e7e210dcbce6f
[ "MIT" ]
null
null
null
pdpython_model/sarsa_run.py
seifely/pdpython
41410ca2807509caf32794bef57e7e210dcbce6f
[ "MIT" ]
null
null
null
from pdpython_model.sarsa_server import server server.launch()
21
46
0.857143
9
63
5.777778
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.079365
63
3
47
21
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
d53119f8513eb2e65084ddd76716698cfe1ffcca
97
py
Python
test/__init__.py
jacklinquan/gradio
70981c3732246d56a7fb9c85cef66c514150b46a
[ "Apache-2.0" ]
5,481
2019-05-27T06:18:02.000Z
2022-03-31T20:33:43.000Z
test/__init__.py
jacklinquan/gradio
70981c3732246d56a7fb9c85cef66c514150b46a
[ "Apache-2.0" ]
652
2019-06-18T20:16:03.000Z
2022-03-31T19:36:16.000Z
test/__init__.py
jacklinquan/gradio
70981c3732246d56a7fb9c85cef66c514150b46a
[ "Apache-2.0" ]
366
2019-07-03T00:32:02.000Z
2022-03-31T11:32:01.000Z
# To run the tests, simply navigate to the outer directory and run `python -m unittest discover`
48.5
96
0.773196
16
97
4.6875
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.175258
97
1
97
97
0.9375
0.969072
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d548c2a86da7890e87e3003c7dfa3a8306fc2f79
297
py
Python
Web3/FullStack_DeFi_App/scripts/local_test.py
C-Mierez/Web3-Solidity
6a24f9cf87dc303c8e9e74e4e895bf306940afb3
[ "MIT" ]
1
2022-02-02T21:46:45.000Z
2022-02-02T21:46:45.000Z
Web3/FullStack_DeFi_App/scripts/local_test.py
C-Mierez/Web3-Solidity
6a24f9cf87dc303c8e9e74e4e895bf306940afb3
[ "MIT" ]
null
null
null
Web3/FullStack_DeFi_App/scripts/local_test.py
C-Mierez/Web3-Solidity
6a24f9cf87dc303c8e9e74e4e895bf306940afb3
[ "MIT" ]
null
null
null
from scripts.deploy import deploy_farm, deploy_stonk_token from scripts.add_allowed_tokens import add_allowed_tokens from scripts.update_front_end_config import update_front_end_config def main(): deploy_stonk_token() deploy_farm() add_allowed_tokens() update_front_end_config()
27
67
0.824916
43
297
5.209302
0.372093
0.147321
0.214286
0.267857
0
0
0
0
0
0
0
0
0.124579
297
10
68
29.7
0.861538
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
true
0
0.375
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
d57ac1b9fcf709eff732a2b535d3cf5e75a88fb7
705
py
Python
src/grid.py
jtobarmartinez/MAS2122-T2P1
a33b6e19c511d27225706634ce67f57194d97afe
[ "MIT" ]
null
null
null
src/grid.py
jtobarmartinez/MAS2122-T2P1
a33b6e19c511d27225706634ce67f57194d97afe
[ "MIT" ]
null
null
null
src/grid.py
jtobarmartinez/MAS2122-T2P1
a33b6e19c511d27225706634ce67f57194d97afe
[ "MIT" ]
11
2022-01-05T09:13:15.000Z
2022-01-05T09:18:16.000Z
import math as m class Tessellation(object): def __init__(self, type, xsize, ysize, zsize): self.type = type self.xsize = xsize self.ysize = ysize self.zsize = zsize def create_base_grid(self): return base_grid def base_brep(self): pass def get_vertices(self): return verts def get_centroid(self): return centroid def calc_vec_from_centroid_vert(self): return vec def create_vert_plane(self): return plane def create_cutter_srf(self): return cutter def truncate(self): return module def tessellate(self): return modules
18.552632
50
0.590071
84
705
4.738095
0.416667
0.201005
0
0
0
0
0
0
0
0
0
0
0.346099
705
38
51
18.552632
0.863341
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0.04
0.04
0.32
0.8
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
d585d170c78c3fd5fe874959056370d8bc42a40d
75
py
Python
nyoka/PMML44/behaviors/addItem.py
maxibor/nyoka
19f480eee608035aa5fba368c96d4143bc2f5710
[ "Apache-2.0" ]
71
2020-08-24T07:59:56.000Z
2022-03-21T08:36:35.000Z
nyoka/PMML43Ext/behaviors/addItem.py
Chiragasourabh/nyoka
44003b5dc500b18d3a2b2c6ed6fc4db217e2d2c0
[ "Apache-2.0" ]
16
2020-09-02T10:27:36.000Z
2022-03-31T05:37:12.000Z
nyoka/PMML43Ext/behaviors/addItem.py
Chiragasourabh/nyoka
44003b5dc500b18d3a2b2c6ed6fc4db217e2d2c0
[ "Apache-2.0" ]
16
2020-09-17T15:01:33.000Z
2022-03-28T03:13:25.000Z
self.Item.append(value) self.numberOfItems = len(self.Item)
37.5
43
0.626667
9
75
5.222222
0.666667
0.340426
0
0
0
0
0
0
0
0
0
0
0.253333
75
2
43
37.5
0.839286
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
633cbb79ebf38b30a6991807fd6916be222ba69e
90
py
Python
Ask_Wiki/apps.py
Q3333/Ask_and_Wiki
1a81088491836ee6624801c8fae7f542ed17e975
[ "MIT" ]
null
null
null
Ask_Wiki/apps.py
Q3333/Ask_and_Wiki
1a81088491836ee6624801c8fae7f542ed17e975
[ "MIT" ]
null
null
null
Ask_Wiki/apps.py
Q3333/Ask_and_Wiki
1a81088491836ee6624801c8fae7f542ed17e975
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AskWikiConfig(AppConfig): name = 'Ask_Wiki'
15
33
0.755556
11
90
6.090909
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.166667
90
5
34
18
0.893333
0
0
0
0
0
0.088889
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
635cd2040e82c47b5633e93e5f27ae569d15dfa7
214
py
Python
Sumit Awasthi/W2Q10.py
asumit499/Python-BootCamp
0b99f9cb862189d13ad291eac12a8be6c46357f5
[ "MIT" ]
4
2022-03-20T10:59:53.000Z
2022-03-25T18:28:04.000Z
Sumit Awasthi/W2Q10.py
asumit499/Python-BootCamp
0b99f9cb862189d13ad291eac12a8be6c46357f5
[ "MIT" ]
null
null
null
Sumit Awasthi/W2Q10.py
asumit499/Python-BootCamp
0b99f9cb862189d13ad291eac12a8be6c46357f5
[ "MIT" ]
15
2022-03-12T11:49:10.000Z
2022-03-15T06:22:55.000Z
year = int(input("Enter year: ")) if year % 400 == 0: print('Entered year is a leap year.') elif year % 100 != 0 and year % 4 == 0: print('Entered year is a leap year.') else: print('Not a leap year.')
26.75
41
0.593458
37
214
3.432432
0.486486
0.11811
0.212598
0.267717
0.440945
0.440945
0.440945
0.440945
0
0
0
0.061728
0.242991
214
7
42
30.571429
0.722222
0
0
0.285714
0
0
0.392523
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
636ecc14865968c8804c60e97e39a64878c9b654
248
py
Python
neurokit2/data/__init__.py
danibene/NeuroKit
df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a
[ "MIT" ]
1
2022-03-20T21:09:34.000Z
2022-03-20T21:09:34.000Z
neurokit2/data/__init__.py
danibene/NeuroKit
df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a
[ "MIT" ]
null
null
null
neurokit2/data/__init__.py
danibene/NeuroKit
df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a
[ "MIT" ]
null
null
null
"""Submodule for NeuroKit.""" from .data import data from .read_acqknowledge import read_acqknowledge from .read_bitalino import read_bitalino from .write_csv import write_csv __all__ = ["read_acqknowledge", "read_bitalino", "data", "write_csv"]
27.555556
69
0.790323
33
248
5.545455
0.363636
0.262295
0
0
0
0
0
0
0
0
0
0
0.108871
248
8
70
31
0.828054
0.092742
0
0
0
0
0.196347
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
63980f17de962c2cbf1e3fea3c2edf226398d7e5
134
py
Python
python/testData/inspections/PyTypeCheckerInspection/BuiltinBaseClass.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyTypeCheckerInspection/BuiltinBaseClass.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyTypeCheckerInspection/BuiltinBaseClass.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def test(): class MyInt(int): pass def f(x): """ :type x: MyInt """ i = MyInt(2) f(i)
13.4
22
0.358209
17
134
2.823529
0.647059
0
0
0
0
0
0
0
0
0
0
0.014286
0.477612
134
9
23
14.888889
0.671429
0.104478
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.166667
0
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
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
63a04123680062d9a41be913fa553d655f368a8e
196
py
Python
src/spaceone/inventory/model/compute_instance/data/compartment.py
spaceone-dev/plugin-oracle-cloud-service-inven-collector
555dac75b69ebc9ea0f778d69e81407a88be1853
[ "Apache-2.0" ]
2
2021-02-22T07:08:17.000Z
2021-04-19T10:16:28.000Z
src/spaceone/inventory/model/compute_instance/data/compartment.py
spaceone-dev/plugin-oracle-cloud-service-inven-collector
555dac75b69ebc9ea0f778d69e81407a88be1853
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/model/compute_instance/data/compartment.py
spaceone-dev/plugin-oracle-cloud-service-inven-collector
555dac75b69ebc9ea0f778d69e81407a88be1853
[ "Apache-2.0" ]
4
2021-02-08T02:21:57.000Z
2021-06-25T02:28:35.000Z
from schematics import Model from schematics.types import StringType class Compartment(Model): compartment_name = StringType() compartment_id = StringType() tenancy_id = StringType()
24.5
39
0.770408
21
196
7.047619
0.52381
0.189189
0
0
0
0
0
0
0
0
0
0
0.163265
196
8
40
24.5
0.902439
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
63aa058802c97d2e70b1586ad8d3cfbdb99c3ccb
503
py
Python
core/components/base.py
ChrisLR/BasicDungeonRL
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
[ "MIT" ]
3
2017-10-28T11:28:38.000Z
2018-09-12T09:47:00.000Z
core/components/base.py
ChrisLR/BasicDungeonRL
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
[ "MIT" ]
null
null
null
core/components/base.py
ChrisLR/BasicDungeonRL
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
[ "MIT" ]
null
null
null
class Component(object): """Base class for components""" NAME = "base_component" def __init__(self): self.host = None self.properties = {} def on_register(self, host): self.host = host def on_unregister(self): self.host = None def round_update(self): pass def minute_update(self): pass def hours_update(self): pass def days_update(self): pass def handle_message(self, message): pass
17.344828
38
0.578529
59
503
4.728814
0.40678
0.114695
0.200717
0.243728
0
0
0
0
0
0
0
0
0.326044
503
28
39
17.964286
0.823009
0.049702
0
0.368421
0
0
0.029661
0
0
0
0
0
0
1
0.421053
false
0.263158
0
0
0.526316
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
63ba9037d7974767ad05b8dcd0304bafa7413f14
408
py
Python
src/osdk_manager/operator/__init__.py
jharmison-redhat/osdk-manager
e0df8e213800eced636d05b146dccf0f83178894
[ "BSD-2-Clause" ]
1
2020-10-09T18:00:03.000Z
2020-10-09T18:00:03.000Z
src/osdk_manager/operator/__init__.py
jharmison-redhat/osdk-manager
e0df8e213800eced636d05b146dccf0f83178894
[ "BSD-2-Clause" ]
1
2020-10-09T16:05:53.000Z
2020-10-09T16:05:53.000Z
src/osdk_manager/operator/__init__.py
jharmison-redhat/osdk-manager
e0df8e213800eced636d05b146dccf0f83178894
[ "BSD-2-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-2-Clause """osdk-manager Operator scaffolding functionality. Manage osdk and opm binary installation, and help to scaffold, release, and version Operator SDK-based Kubernetes operators. This subpackage includes the classes and modules required to scaffold, build, validate, and push Operator-related repositories and images. """ from .operator import Operator # noqa: F401
34
77
0.801471
54
408
6.055556
0.777778
0.061162
0
0
0
0
0
0
0
0
0
0.011299
0.132353
408
11
78
37.090909
0.912429
0.892157
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
63bbaf691a72efcbf21346aabf3b27a5e4429512
1,056
py
Python
core/migrations/0003_auto_20200410_1315.py
nikita03565/esearch
be7879691d8ff80b95d7e9bf7c41581fe1208bd9
[ "Apache-2.0" ]
null
null
null
core/migrations/0003_auto_20200410_1315.py
nikita03565/esearch
be7879691d8ff80b95d7e9bf7c41581fe1208bd9
[ "Apache-2.0" ]
7
2020-06-06T11:41:01.000Z
2021-06-14T17:00:34.000Z
core/migrations/0003_auto_20200410_1315.py
nikita03565/esearch
be7879691d8ff80b95d7e9bf7c41581fe1208bd9
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.11 on 2020-04-10 13:15 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0002_auto_20200407_1931'), ] operations = [ migrations.AlterModelOptions( name='city', options={'ordering': ['id']}, ), migrations.AlterModelOptions( name='country', options={'ordering': ['id']}, ), migrations.AlterModelOptions( name='desire', options={'ordering': ['id']}, ), migrations.AlterModelOptions( name='district', options={'ordering': ['id']}, ), migrations.AlterModelOptions( name='friendship', options={'ordering': ['id']}, ), migrations.AlterModelOptions( name='location', options={'ordering': ['id']}, ), migrations.AlterModelOptions( name='street', options={'ordering': ['id']}, ), ]
25.142857
48
0.501894
77
1,056
6.844156
0.467532
0.358634
0.411765
0.3074
0.54649
0.54649
0
0
0
0
0
0.046512
0.348485
1,056
41
49
25.756098
0.719477
0.043561
0
0.6
1
0
0.144841
0.022817
0
0
0
0
0
1
0
false
0
0.028571
0
0.114286
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
63bfcbac1658d2c62e159f1cbd26c401345ca629
213
py
Python
src/utils/misc.py
shoaibahmed/pl-cnn
e41bb0c4e36907d33c2701d53d6fff0ac308d031
[ "MIT" ]
8
2017-02-19T20:19:18.000Z
2020-05-23T03:06:08.000Z
src/utils/misc.py
oval-group/pl-cnn
75f06630c755168771d049b7dbca300a21f27267
[ "MIT" ]
null
null
null
src/utils/misc.py
oval-group/pl-cnn
75f06630c755168771d049b7dbca300a21f27267
[ "MIT" ]
5
2017-04-07T14:35:11.000Z
2020-03-12T19:11:16.000Z
import sys def flush_last_line(to_flush=1): for _ in range(to_flush): sys.stdout.write("\033[F") # back to previous line sys.stdout.write("\033[K") # clear line sys.stdout.flush()
21.3
59
0.619718
33
213
3.848485
0.575758
0.212598
0.220472
0.267717
0
0
0
0
0
0
0
0.043478
0.244131
213
9
60
23.666667
0.745342
0.150235
0
0
0
0
0.067416
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8932fdb162eda91704bd1980306825be13584953
2,171
py
Python
k3proc/setup.py
drmingdrmer/gift
de8fa1176ebc5be15baf47822b057dabb8756016
[ "Apache-2.0" ]
null
null
null
k3proc/setup.py
drmingdrmer/gift
de8fa1176ebc5be15baf47822b057dabb8756016
[ "Apache-2.0" ]
null
null
null
k3proc/setup.py
drmingdrmer/gift
de8fa1176ebc5be15baf47822b057dabb8756016
[ "Apache-2.0" ]
null
null
null
# DO NOT EDIT!!! built with `python _building/build_setup.py` import setuptools setuptools.setup( name="k3proc", packages=["k3proc"], version="0.2.11", license='MIT', description='easy to use `Popen`', long_description="# k3proc\n\n[![Build Status](https://travis-ci.com/pykit3/k3proc.svg?branch=master)](https://travis-ci.com/pykit3/k3proc)\n![Python package](https://github.com/pykit3/k3proc/workflows/Python%20package/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/k3proc/badge/?version=stable)](https://k3proc.readthedocs.io/en/stable/?badge=stable)\n[![Package](https://img.shields.io/pypi/pyversions/k3proc)](https://pypi.org/project/k3proc)\n\neasy to use `Popen`\n\nk3proc is a component of [pykit3] project: a python3 toolkit set.\n\n\nk3proc is utility to create sub process.\n\nExecute a shell script::\n\n >>> returncode, out, err = k3proc.shell_script('ls / | grep bin')\n\nRun a command::\n\n # Unlike the above snippet, following statement does not start an sh process.\n returncode, out, err = k3proc.command('ls', 'a*', cwd='/usr/local')\n\n\n\n\n# Install\n\n```\npip install k3proc\n```\n\n# Synopsis\n\n```python\n>>> returncode, out, err = k3proc.shell_script('ls / | grep bin')\n\n```\n\n# Author\n\nZhang Yanpo (张炎泼) <drdr.xp@gmail.com>\n\n# Copyright and License\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>\n\n\n[pykit3]: https://github.com/pykit3", long_description_content_type="text/markdown", author='Zhang Yanpo', author_email='drdr.xp@gmail.com', url='https://github.com/pykit3/k3proc', keywords=['subprocess', 'popen'], python_requires='>=3.0', install_requires=['semantic_version~=2.8.5', 'jinja2~=2.11.2', 'PyYAML~=5.3.1', 'sphinx~=3.3.1', 'k3ut~=0.1.7'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Topic :: Software Development :: Libraries', ] + ['Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: PyPy'], )
90.458333
1,252
0.683095
321
2,171
4.582555
0.442368
0.024473
0.014276
0.040789
0.181509
0.130523
0.092454
0.092454
0.059823
0.059823
0
0.032529
0.122064
2,171
23
1,253
94.391304
0.739244
0.027176
0
0
1
0.047619
0.808057
0.085782
0
0
0
0
0
1
0
true
0
0.047619
0
0.047619
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8952b467bab133b82722f45328e534afebb60a35
2,274
py
Python
serial_scripts/ha/test_ha_node_failures.py
lmadhusudhanan/contrail-test
bd39ff19da06a20bd79af8c25e3cde07375577cf
[ "Apache-2.0" ]
null
null
null
serial_scripts/ha/test_ha_node_failures.py
lmadhusudhanan/contrail-test
bd39ff19da06a20bd79af8c25e3cde07375577cf
[ "Apache-2.0" ]
1
2021-06-01T22:19:48.000Z
2021-06-01T22:19:48.000Z
serial_scripts/ha/test_ha_node_failures.py
lmadhusudhanan/contrail-test
bd39ff19da06a20bd79af8c25e3cde07375577cf
[ "Apache-2.0" ]
null
null
null
from base import HABaseTest from common import isolated_creds import time from tcutils.wrappers import preposttest_wrapper from tcutils.util import skip_because import test class TestHANode(HABaseTest): @classmethod def setUpClass(cls): super(TestHANode, cls).setUpClass() @test.attr(type=['ha']) @preposttest_wrapper @skip_because(ha_setup = False) def test_ha_reboot(self): time.sleep(120) ret = self.ha_reboot_test([self.inputs.cfgm_ips[0],self.inputs.cfgm_ips[1]]) time.sleep(30) return ret @preposttest_wrapper @skip_because(ha_setup = False) def test_ha_cold_reboot(self): time.sleep(120) ret = self.ha_cold_reboot_test([self.inputs.cfgm_ips[0],self.inputs.cfgm_ips[1]]) time.sleep(30) return ret @preposttest_wrapper @skip_because(ha_setup = False) def test_ha_cold_shutdown(self): time.sleep(120) ret = self.ha_cold_shutdown_test([self.inputs.cfgm_ips[0],self.inputs.cfgm_ips[1]]) time.sleep(30) return ret @preposttest_wrapper @skip_because(ha_setup = False) def test_ha_isolate(self): ret = self.ha_isolate_test([self.inputs.cfgm_control_ips[0],self.inputs.cfgm_control_ips[1]]) time.sleep(120) return ret @preposttest_wrapper def test_ha_cold_reboot_computes(self): time.sleep(120) ret = self.ha_reboot_all_test(self.inputs.compute_ips,mode='ipmi') time.sleep(30) return ret @preposttest_wrapper def test_ha_reboot_computes(self): time.sleep(120) ret = self.ha_reboot_all_test(self.inputs.compute_ips,mode='reboot') time.sleep(30) return ret # @preposttest_wrapper # def test_ha_cold_reboot_all(self): # time.sleep(120) # ips = self.inputs.compute_ips + [self.inputs.cfgm_ips[1],self.inputs.cfgm_ips[2]] # ret = self.ha_reboot_all_test(ips,mode='ipmi') # return ret # @preposttest_wrapper # def test_ha_reboot_all(self): # time.sleep(120) # ips = self.inputs.compute_ips + [self.inputs.cfgm_ips[1],self.inputs.cfgm_ips[2]] # ret = self.ha_reboot_all_test(ips,mode='reboot') # return ret #end HA node failure tests
29.921053
101
0.673263
320
2,274
4.525
0.16875
0.110497
0.116022
0.117403
0.756906
0.723066
0.723066
0.723066
0.632597
0.60221
0
0.025828
0.216799
2,274
75
102
30.32
0.787198
0.224274
0
0.54
0
0
0.006873
0
0
0
0
0
0
1
0.14
false
0
0.12
0
0.4
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
89b50f12b4eef5fd1aaf4467460667a92e6fd0ca
61
py
Python
startbro.py
Bafomet666/Bigbro
ae41c1f48b38e28e3e688cfe02ad5152147521f4
[ "BSD-2-Clause" ]
48
2020-10-10T17:09:23.000Z
2022-03-22T10:42:16.000Z
startbro.py
Bafomet666/Bigbro
ae41c1f48b38e28e3e688cfe02ad5152147521f4
[ "BSD-2-Clause" ]
3
2021-01-15T06:07:41.000Z
2022-02-11T09:50:53.000Z
startbro.py
Bafomet666/Bigbro
ae41c1f48b38e28e3e688cfe02ad5152147521f4
[ "BSD-2-Clause" ]
12
2020-10-16T22:48:16.000Z
2021-11-16T01:06:10.000Z
import os os.system("python3 bigbro.py -t manual -k start")
15.25
49
0.721311
11
61
4
0.909091
0
0
0
0
0
0
0
0
0
0
0.019231
0.147541
61
3
50
20.333333
0.826923
0
0
0
0
0
0.590164
0
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
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
982714b722f1ce818c0b5e3cb794d8a713df1cd0
343
py
Python
evaluators/dialog/language/__init__.py
kaniblu/vhda
35941097ef552568c29f66cc55d8ce1927f34978
[ "MIT" ]
3
2021-01-12T05:43:20.000Z
2021-03-05T17:03:06.000Z
evaluators/dialog/language/__init__.py
kaniblu/vhda
35941097ef552568c29f66cc55d8ce1927f34978
[ "MIT" ]
null
null
null
evaluators/dialog/language/__init__.py
kaniblu/vhda
35941097ef552568c29f66cc55d8ce1927f34978
[ "MIT" ]
null
null
null
__all__ = ["BLEUEvaluator", "DistinctEvaluator", "SentLengthEvaluator", "RougeEvaluator", "EmbeddingEvaluator", "WordEntropyEvaluator", "LanguageNoveltyEvaluator"] from .bleu import * from .distinct import * from .length import * from .rouge import * from .embedding import * from .entropy import * from .novel import *
28.583333
74
0.717201
29
343
8.344828
0.586207
0.247934
0
0
0
0
0
0
0
0
0
0
0.174927
343
11
75
31.181818
0.855124
0
0
0
0
0
0.364431
0.069971
0
0
0
0
0
1
0
false
0
0.7
0
0.7
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
9827f0f6b5e8c880435608f404d59aeb6880cdce
12,881
py
Python
tests/components/demo/test_vacuum.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
tests/components/demo/test_vacuum.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
tests/components/demo/test_vacuum.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""The tests for the Demo vacuum platform.""" import pytest from openpeerpower.components import vacuum from openpeerpower.components.demo.vacuum import ( DEMO_VACUUM_BASIC, DEMO_VACUUM_COMPLETE, DEMO_VACUUM_MINIMAL, DEMO_VACUUM_MOST, DEMO_VACUUM_NONE, DEMO_VACUUM_STATE, FAN_SPEEDS, ) from openpeerpower.components.vacuum import ( ATTR_BATTERY_LEVEL, ATTR_COMMAND, ATTR_FAN_SPEED, ATTR_FAN_SPEED_LIST, ATTR_PARAMS, ATTR_STATUS, DOMAIN, SERVICE_SEND_COMMAND, SERVICE_SET_FAN_SPEED, STATE_CLEANING, STATE_DOCKED, STATE_IDLE, STATE_PAUSED, STATE_RETURNING, ) from openpeerpower.const import ( ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES, CONF_PLATFORM, STATE_OFF, STATE_ON, ) from openpeerpower.setup import async_setup_component from tests.common import async_mock_service from tests.components.vacuum import common ENTITY_VACUUM_BASIC = f"{DOMAIN}.{DEMO_VACUUM_BASIC}".lower() ENTITY_VACUUM_COMPLETE = f"{DOMAIN}.{DEMO_VACUUM_COMPLETE}".lower() ENTITY_VACUUM_MINIMAL = f"{DOMAIN}.{DEMO_VACUUM_MINIMAL}".lower() ENTITY_VACUUM_MOST = f"{DOMAIN}.{DEMO_VACUUM_MOST}".lower() ENTITY_VACUUM_NONE = f"{DOMAIN}.{DEMO_VACUUM_NONE}".lower() ENTITY_VACUUM_STATE = f"{DOMAIN}.{DEMO_VACUUM_STATE}".lower() @pytest.fixture(autouse=True) async def setup_demo_vacuum(opp): """Initialize setup demo vacuum.""" assert await async_setup_component(opp, DOMAIN, {DOMAIN: {CONF_PLATFORM: "demo"}}) await opp.async_block_till_done() async def test_supported_features(opp): """Test vacuum supported features.""" state = opp.states.get(ENTITY_VACUUM_COMPLETE) assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 2047 assert state.attributes.get(ATTR_STATUS) == "Charging" assert state.attributes.get(ATTR_BATTERY_LEVEL) == 100 assert state.attributes.get(ATTR_FAN_SPEED) == "medium" assert state.attributes.get(ATTR_FAN_SPEED_LIST) == FAN_SPEEDS assert state.state == STATE_OFF state = opp.states.get(ENTITY_VACUUM_MOST) assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 219 assert state.attributes.get(ATTR_STATUS) == "Charging" assert state.attributes.get(ATTR_BATTERY_LEVEL) == 100 assert state.attributes.get(ATTR_FAN_SPEED) is None assert state.attributes.get(ATTR_FAN_SPEED_LIST) is None assert state.state == STATE_OFF state = opp.states.get(ENTITY_VACUUM_BASIC) assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 195 assert state.attributes.get(ATTR_STATUS) == "Charging" assert state.attributes.get(ATTR_BATTERY_LEVEL) == 100 assert state.attributes.get(ATTR_FAN_SPEED) is None assert state.attributes.get(ATTR_FAN_SPEED_LIST) is None assert state.state == STATE_OFF state = opp.states.get(ENTITY_VACUUM_MINIMAL) assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 3 assert state.attributes.get(ATTR_STATUS) is None assert state.attributes.get(ATTR_BATTERY_LEVEL) is None assert state.attributes.get(ATTR_FAN_SPEED) is None assert state.attributes.get(ATTR_FAN_SPEED_LIST) is None assert state.state == STATE_OFF state = opp.states.get(ENTITY_VACUUM_NONE) assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 0 assert state.attributes.get(ATTR_STATUS) is None assert state.attributes.get(ATTR_BATTERY_LEVEL) is None assert state.attributes.get(ATTR_FAN_SPEED) is None assert state.attributes.get(ATTR_FAN_SPEED_LIST) is None assert state.state == STATE_OFF state = opp.states.get(ENTITY_VACUUM_STATE) assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == 13436 assert state.state == STATE_DOCKED assert state.attributes.get(ATTR_BATTERY_LEVEL) == 100 assert state.attributes.get(ATTR_FAN_SPEED) == "medium" assert state.attributes.get(ATTR_FAN_SPEED_LIST) == FAN_SPEEDS async def test_methods(opp): """Test if methods call the services as expected.""" opp.states.async_set(ENTITY_VACUUM_BASIC, STATE_ON) await opp.async_block_till_done() assert vacuum.is_on(opp, ENTITY_VACUUM_BASIC) opp.states.async_set(ENTITY_VACUUM_BASIC, STATE_OFF) await opp.async_block_till_done() assert not vacuum.is_on(opp, ENTITY_VACUUM_BASIC) await common.async_turn_on(opp, ENTITY_VACUUM_COMPLETE) assert vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) await common.async_turn_off(opp, ENTITY_VACUUM_COMPLETE) assert not vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) await common.async_toggle(opp, ENTITY_VACUUM_COMPLETE) assert vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) await common.async_start_pause(opp, ENTITY_VACUUM_COMPLETE) assert not vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) await common.async_start_pause(opp, ENTITY_VACUUM_COMPLETE) assert vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) await common.async_stop(opp, ENTITY_VACUUM_COMPLETE) assert not vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) state = opp.states.get(ENTITY_VACUUM_COMPLETE) assert state.attributes.get(ATTR_BATTERY_LEVEL) < 100 assert state.attributes.get(ATTR_STATUS) != "Charging" await common.async_locate(opp, ENTITY_VACUUM_COMPLETE) state = opp.states.get(ENTITY_VACUUM_COMPLETE) assert "I'm over here" in state.attributes.get(ATTR_STATUS) await common.async_return_to_base(opp, ENTITY_VACUUM_COMPLETE) state = opp.states.get(ENTITY_VACUUM_COMPLETE) assert "Returning home" in state.attributes.get(ATTR_STATUS) await common.async_set_fan_speed( opp, FAN_SPEEDS[-1], entity_id=ENTITY_VACUUM_COMPLETE ) state = opp.states.get(ENTITY_VACUUM_COMPLETE) assert state.attributes.get(ATTR_FAN_SPEED) == FAN_SPEEDS[-1] await common.async_clean_spot(opp, entity_id=ENTITY_VACUUM_COMPLETE) state = opp.states.get(ENTITY_VACUUM_COMPLETE) assert "spot" in state.attributes.get(ATTR_STATUS) assert state.state == STATE_ON await common.async_start(opp, ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state == STATE_CLEANING await common.async_pause(opp, ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state == STATE_PAUSED await common.async_stop(opp, ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state == STATE_IDLE state = opp.states.get(ENTITY_VACUUM_STATE) assert state.attributes.get(ATTR_BATTERY_LEVEL) < 100 assert state.state != STATE_DOCKED await common.async_return_to_base(opp, ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state == STATE_RETURNING await common.async_set_fan_speed(opp, FAN_SPEEDS[-1], entity_id=ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.attributes.get(ATTR_FAN_SPEED) == FAN_SPEEDS[-1] await common.async_clean_spot(opp, entity_id=ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state == STATE_CLEANING async def test_unsupported_methods(opp): """Test service calls for unsupported vacuums.""" opp.states.async_set(ENTITY_VACUUM_NONE, STATE_ON) await opp.async_block_till_done() assert vacuum.is_on(opp, ENTITY_VACUUM_NONE) await common.async_turn_off(opp, ENTITY_VACUUM_NONE) assert vacuum.is_on(opp, ENTITY_VACUUM_NONE) await common.async_stop(opp, ENTITY_VACUUM_NONE) assert vacuum.is_on(opp, ENTITY_VACUUM_NONE) opp.states.async_set(ENTITY_VACUUM_NONE, STATE_OFF) await opp.async_block_till_done() assert not vacuum.is_on(opp, ENTITY_VACUUM_NONE) await common.async_turn_on(opp, ENTITY_VACUUM_NONE) assert not vacuum.is_on(opp, ENTITY_VACUUM_NONE) await common.async_toggle(opp, ENTITY_VACUUM_NONE) assert not vacuum.is_on(opp, ENTITY_VACUUM_NONE) # Non supported methods: await common.async_start_pause(opp, ENTITY_VACUUM_NONE) assert not vacuum.is_on(opp, ENTITY_VACUUM_NONE) await common.async_locate(opp, ENTITY_VACUUM_NONE) state = opp.states.get(ENTITY_VACUUM_NONE) assert state.attributes.get(ATTR_STATUS) is None await common.async_return_to_base(opp, ENTITY_VACUUM_NONE) state = opp.states.get(ENTITY_VACUUM_NONE) assert state.attributes.get(ATTR_STATUS) is None await common.async_set_fan_speed(opp, FAN_SPEEDS[-1], entity_id=ENTITY_VACUUM_NONE) state = opp.states.get(ENTITY_VACUUM_NONE) assert state.attributes.get(ATTR_FAN_SPEED) != FAN_SPEEDS[-1] await common.async_clean_spot(opp, entity_id=ENTITY_VACUUM_BASIC) state = opp.states.get(ENTITY_VACUUM_BASIC) assert "spot" not in state.attributes.get(ATTR_STATUS) assert state.state == STATE_OFF # VacuumEntity should not support start and pause methods. opp.states.async_set(ENTITY_VACUUM_COMPLETE, STATE_ON) await opp.async_block_till_done() assert vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) await common.async_pause(opp, ENTITY_VACUUM_COMPLETE) assert vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) opp.states.async_set(ENTITY_VACUUM_COMPLETE, STATE_OFF) await opp.async_block_till_done() assert not vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) await common.async_start(opp, ENTITY_VACUUM_COMPLETE) assert not vacuum.is_on(opp, ENTITY_VACUUM_COMPLETE) # StateVacuumEntity does not support on/off await common.async_turn_on(opp, entity_id=ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state != STATE_CLEANING await common.async_turn_off(opp, entity_id=ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state != STATE_RETURNING await common.async_toggle(opp, entity_id=ENTITY_VACUUM_STATE) state = opp.states.get(ENTITY_VACUUM_STATE) assert state.state != STATE_CLEANING async def test_services(opp): """Test vacuum services.""" # Test send_command send_command_calls = async_mock_service(opp, DOMAIN, SERVICE_SEND_COMMAND) params = {"rotate": 150, "speed": 20} await common.async_send_command( opp, "test_command", entity_id=ENTITY_VACUUM_BASIC, params=params ) assert len(send_command_calls) == 1 call = send_command_calls[-1] assert call.domain == DOMAIN assert call.service == SERVICE_SEND_COMMAND assert call.data[ATTR_ENTITY_ID] == ENTITY_VACUUM_BASIC assert call.data[ATTR_COMMAND] == "test_command" assert call.data[ATTR_PARAMS] == params # Test set fan speed set_fan_speed_calls = async_mock_service(opp, DOMAIN, SERVICE_SET_FAN_SPEED) await common.async_set_fan_speed( opp, FAN_SPEEDS[0], entity_id=ENTITY_VACUUM_COMPLETE ) assert len(set_fan_speed_calls) == 1 call = set_fan_speed_calls[-1] assert call.domain == DOMAIN assert call.service == SERVICE_SET_FAN_SPEED assert call.data[ATTR_ENTITY_ID] == ENTITY_VACUUM_COMPLETE assert call.data[ATTR_FAN_SPEED] == FAN_SPEEDS[0] async def test_set_fan_speed(opp): """Test vacuum service to set the fan speed.""" group_vacuums = ",".join( [ENTITY_VACUUM_BASIC, ENTITY_VACUUM_COMPLETE, ENTITY_VACUUM_STATE] ) old_state_basic = opp.states.get(ENTITY_VACUUM_BASIC) old_state_complete = opp.states.get(ENTITY_VACUUM_COMPLETE) old_state_state = opp.states.get(ENTITY_VACUUM_STATE) await common.async_set_fan_speed(opp, FAN_SPEEDS[0], entity_id=group_vacuums) new_state_basic = opp.states.get(ENTITY_VACUUM_BASIC) new_state_complete = opp.states.get(ENTITY_VACUUM_COMPLETE) new_state_state = opp.states.get(ENTITY_VACUUM_STATE) assert old_state_basic == new_state_basic assert ATTR_FAN_SPEED not in new_state_basic.attributes assert old_state_complete != new_state_complete assert old_state_complete.attributes[ATTR_FAN_SPEED] == FAN_SPEEDS[1] assert new_state_complete.attributes[ATTR_FAN_SPEED] == FAN_SPEEDS[0] assert old_state_state != new_state_state assert old_state_state.attributes[ATTR_FAN_SPEED] == FAN_SPEEDS[1] assert new_state_state.attributes[ATTR_FAN_SPEED] == FAN_SPEEDS[0] async def test_send_command(opp): """Test vacuum service to send a command.""" group_vacuums = ",".join([ENTITY_VACUUM_BASIC, ENTITY_VACUUM_COMPLETE]) old_state_basic = opp.states.get(ENTITY_VACUUM_BASIC) old_state_complete = opp.states.get(ENTITY_VACUUM_COMPLETE) await common.async_send_command( opp, "test_command", params={"p1": 3}, entity_id=group_vacuums ) new_state_basic = opp.states.get(ENTITY_VACUUM_BASIC) new_state_complete = opp.states.get(ENTITY_VACUUM_COMPLETE) assert old_state_basic == new_state_basic assert old_state_complete != new_state_complete assert new_state_complete.state == STATE_ON assert ( new_state_complete.attributes[ATTR_STATUS] == "Executing test_command({'p1': 3})" )
37.99705
88
0.761897
1,843
12,881
4.982637
0.066739
0.13721
0.080366
0.098225
0.795492
0.775019
0.763258
0.719482
0.638353
0.600566
0
0.005569
0.1496
12,881
338
89
38.109467
0.832755
0.015449
0
0.417323
0
0
0.0273
0.013811
0
0
0
0
0.397638
1
0
false
0
0.031496
0
0.031496
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
983954ff1417b2e4285041f7a767f6a97496ae8c
6,336
py
Python
avalanche/evaluation/metric_definitions.py
lrzpellegrini/avalanche_pre_public
522019a55ce08b92c1ec74b508a8ea6ae8751dfd
[ "MIT" ]
12
2021-04-16T15:49:59.000Z
2022-02-27T18:04:58.000Z
avalanche/evaluation/metric_definitions.py
lrzpellegrini/avalanche_pre_public
522019a55ce08b92c1ec74b508a8ea6ae8751dfd
[ "MIT" ]
null
null
null
avalanche/evaluation/metric_definitions.py
lrzpellegrini/avalanche_pre_public
522019a55ce08b92c1ec74b508a8ea6ae8751dfd
[ "MIT" ]
2
2021-06-22T04:11:52.000Z
2021-11-12T03:27:18.000Z
################################################################################ # Copyright (c) 2021 ContinualAI. # # Copyrights licensed under the MIT License. # # See the accompanying LICENSE file for terms. # # # # Date: 30-12-2020 # # Author(s): Lorenzo Pellegrini # # E-mail: contact@continualai.org # # Website: www.continualai.org # ################################################################################ from abc import ABC, abstractmethod from typing import TypeVar, Optional, Dict, TYPE_CHECKING from typing_extensions import Protocol from avalanche.training.strategy_callbacks import StrategyCallbacks if TYPE_CHECKING: from .metric_results import MetricResult from avalanche.training.plugins import PluggableStrategy TResult = TypeVar('TResult') TAggregated = TypeVar('TAggregated', bound='PluginMetric') class Metric(Protocol[TResult]): """ Definition of a metric. A metric exposes methods to reset the internal counters as well as a method used to retrieve the result. The specific metric implementation exposes ways to update the metric state. Usually, standalone metrics like :class:`Sum`, :class:`Mean`, :class:`Accuracy`, ... expose an `update` method. On the other hand, metrics that are to be used by using the :class:`EvaluationPlugin` usually update their value by receiving events from the plugin (see the :class:`PluginMetric` class for more details). """ def result(self) -> Optional[TResult]: """ Obtains the value of the metric. :return: The value of the metric. """ pass def reset(self) -> None: """ Resets the metric internal state. :return: None. """ pass class PluginMetric(Metric[TResult], StrategyCallbacks['MetricResult'], ABC): """ A kind of metric that can be used by the :class:`EvaluationPlugin`. This class leaves the implementation of the `result` and `reset` methods to child classes while providing an empty implementation of the callbacks invoked by the :class:`EvaluationPlugin`. Subclasses should implement the `result`, `reset` and the desired callbacks to compute the specific metric. This class also provides a utility method, `_next_x_position`, which can be used to label each metric value with its appropriate "x" position in the plot. """ def __init__(self): """ Creates an instance of a plugin metric. Child classes can safely invoke this (super) constructor as the first experience. """ super().__init__() self._metric_x_counters: Dict[str, int] = dict() @abstractmethod def result(self) -> Optional[TResult]: pass @abstractmethod def reset(self) -> None: pass def before_training(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def before_training_exp(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def adapt_train_dataset(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def before_training_epoch(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def before_training_iteration(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def before_forward(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def after_forward(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def before_backward(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def after_backward(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def after_training_iteration(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def before_update(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def after_update(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def after_training_epoch(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def after_training_exp(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def after_training(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def before_eval(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def adapt_eval_dataset(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def before_eval_exp(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def after_eval_exp(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def after_eval(self, strategy: 'PluggableStrategy') -> 'MetricResult': pass def before_eval_iteration(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def before_eval_forward(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def after_eval_forward(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def after_eval_iteration(self, strategy: 'PluggableStrategy') \ -> 'MetricResult': pass def _next_x_position(self, metric_name: str, initial_x: int = 0) -> int: """ Utility method that can be used to get the next "x" position of a metric value (given its name). :param metric_name: The metric value name. :param initial_x: The initial "x" value. Defaults to 0. :return: The next "x" value to use. """ if metric_name not in self._metric_x_counters: self._metric_x_counters[metric_name] = initial_x x_result = self._metric_x_counters[metric_name] self._metric_x_counters[metric_name] += 1 return x_result __all__ = ['Metric', 'PluginMetric']
32.829016
80
0.59959
629
6,336
5.901431
0.27345
0.04903
0.1875
0.265086
0.453125
0.427802
0.404364
0.372306
0.10722
0.068966
0
0.003322
0.287405
6,336
192
81
33
0.818826
0.330808
0
0.505495
0
0
0.200797
0
0
0
0
0
0
1
0.32967
false
0.307692
0.065934
0
0.428571
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
986abfec0016d9a91395fdcc9aa396e35640d324
251
py
Python
tests/emmet-api/materials/test_hint_scheme.py
acrutt/emmet
e98100c9932f145a3ad3087ddb7aa9b779d9a191
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/emmet-api/materials/test_hint_scheme.py
acrutt/emmet
e98100c9932f145a3ad3087ddb7aa9b779d9a191
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/emmet-api/materials/test_hint_scheme.py
acrutt/emmet
e98100c9932f145a3ad3087ddb7aa9b779d9a191
[ "BSD-3-Clause-LBNL" ]
null
null
null
from emmet.api.routes.materials.hint_scheme import MaterialsHintScheme def test_materials_hint_scheme(): scheme = MaterialsHintScheme() assert scheme.generate_hints({"criteria": {"nelements": 3}}) == { "hint": {"nelements": 1} }
27.888889
70
0.697211
26
251
6.538462
0.692308
0.152941
0.223529
0
0
0
0
0
0
0
0
0.009524
0.163347
251
8
71
31.375
0.8
0
0
0
1
0
0.119522
0
0
0
0
0
0.166667
1
0.166667
false
0
0.166667
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
987bd6dcf76212142a7e0071d8f78a560c0c3c79
116
py
Python
terrascript/provider/esxi.py
bkez322/python-terrascript
7779a9d0c65b7f4b463746c84a4f181dd895a849
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/provider/esxi.py
bkez322/python-terrascript
7779a9d0c65b7f4b463746c84a4f181dd895a849
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/provider/esxi.py
bkez322/python-terrascript
7779a9d0c65b7f4b463746c84a4f181dd895a849
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/provider/esxi.py import terrascript class esxi(terrascript.Provider): pass __all__ = ["esxi"]
11.6
33
0.732759
13
116
6.230769
0.615385
0.469136
0
0
0
0
0
0
0
0
0
0
0.155172
116
9
34
12.888889
0.826531
0.241379
0
0
0
0
0.046512
0
0
0
0
0
0
1
0
false
0.25
0.25
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
98b6e19d72e81c5372a4f4be2c73247ffa2b0bc8
338
py
Python
pymx/IRbuilder/SSAbuilder/optimizer/heap.py
cla7aye15I4nd/Pymx
a294e196ad0510171ede15e947a89539485a28f3
[ "MIT" ]
3
2020-03-29T23:58:28.000Z
2020-05-29T12:27:54.000Z
pymx/IRbuilder/SSAbuilder/optimizer/heap.py
cla7aye15I4nd/Pymx
a294e196ad0510171ede15e947a89539485a28f3
[ "MIT" ]
null
null
null
pymx/IRbuilder/SSAbuilder/optimizer/heap.py
cla7aye15I4nd/Pymx
a294e196ad0510171ede15e947a89539485a28f3
[ "MIT" ]
null
null
null
import heapq class Heap: def __init__(self): self.data = [] def push(self, val): heapq.heappush(self.data, val) def pop(self): return heapq.heappop(self.data) def top(self): return self.data[0] if self.data else None def empty(self): return len(self.data) == 0
18.777778
50
0.56213
46
338
4.043478
0.456522
0.258065
0.11828
0
0
0
0
0
0
0
0
0.008734
0.322485
338
17
51
19.882353
0.803493
0
0
0
0
0
0
0
0
0
0
0
0
1
0.416667
false
0
0.083333
0.25
0.833333
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
7f29e9e83eee60c6849d41a4ca13b3348d35562e
647
py
Python
lib/factual/query/read.py
jholkeboer/check-me-in
98a9b4146c57b56a42e0e106e1de479f6ce6df96
[ "Apache-2.0" ]
null
null
null
lib/factual/query/read.py
jholkeboer/check-me-in
98a9b4146c57b56a42e0e106e1de479f6ce6df96
[ "Apache-2.0" ]
null
null
null
lib/factual/query/read.py
jholkeboer/check-me-in
98a9b4146c57b56a42e0e106e1de479f6ce6df96
[ "Apache-2.0" ]
null
null
null
from .base import Base class Read(Base): def __init__(self, api, path, params): self.response = None Base.__init__(self, api, path, params, 'GET') def data(self): return self.get_response()['data'] def total_row_count(self): return self.get_response()['total_row_count'] def included_rows(self): return self.get_response()['included_rows'] def user(self, user): return self._copy({'user': user}) def get_response(self): if not self.response: self.response = self.api.get(self) return self.response def _copy(self, params): pass
23.962963
53
0.615147
84
647
4.5
0.309524
0.132275
0.148148
0.134921
0.309524
0
0
0
0
0
0
0
0.262751
647
26
54
24.884615
0.792453
0
0
0
0
0
0.060278
0
0
0
0
0
0
1
0.368421
false
0.052632
0.052632
0.210526
0.736842
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
7f5719442d968fcc5cc06ecae8cae9d48b573749
107
py
Python
pyews/__main__.py
swimlane/pyews
61cc60226b347a881ce653acc7af276c26b37de9
[ "MIT" ]
26
2019-05-04T03:02:53.000Z
2022-02-04T14:56:30.000Z
pyews/__main__.py
swimlane/pyews
61cc60226b347a881ce653acc7af276c26b37de9
[ "MIT" ]
14
2019-07-30T15:32:27.000Z
2022-02-10T20:49:44.000Z
pyews/__main__.py
swimlane/pyews
61cc60226b347a881ce653acc7af276c26b37de9
[ "MIT" ]
12
2019-10-18T14:14:09.000Z
2021-11-15T09:29:30.000Z
import fire from pyews import EWS def main(): fire.Fire(EWS()) if __name__ == "__main__": main()
11.888889
26
0.635514
15
107
4
0.6
0
0
0
0
0
0
0
0
0
0
0
0.224299
107
8
27
13.375
0.722892
0
0
0
0
0
0.074766
0
0
0
0
0
0
1
0.166667
true
0
0.333333
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
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
7f92d1180025fe9eaa61a98ab99d128020168e6e
151
py
Python
apps/grupo/models.py
emilioeiji/gestao_gbareru
2f3d196c2f511910cba2857062725b817547896a
[ "CC0-1.0" ]
null
null
null
apps/grupo/models.py
emilioeiji/gestao_gbareru
2f3d196c2f511910cba2857062725b817547896a
[ "CC0-1.0" ]
null
null
null
apps/grupo/models.py
emilioeiji/gestao_gbareru
2f3d196c2f511910cba2857062725b817547896a
[ "CC0-1.0" ]
null
null
null
from django.db import models class Grupo(models.Model): grupo = models.CharField(max_length=1) def __str__(self): return self.grupo
16.777778
42
0.695364
21
151
4.761905
0.761905
0.22
0
0
0
0
0
0
0
0
0
0.008403
0.211921
151
8
43
18.875
0.831933
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
4
7fa57c26a64b9d2f0e9e30780c4ef846d1b5fb9e
587
py
Python
cui/register/Main.py
trysrv/GitHub.Upload.UserRegister.Update.SshKey.201704081527
b0a40f95b39ea2bb243715702eecbe5d04d12e99
[ "CC0-1.0" ]
null
null
null
cui/register/Main.py
trysrv/GitHub.Upload.UserRegister.Update.SshKey.201704081527
b0a40f95b39ea2bb243715702eecbe5d04d12e99
[ "CC0-1.0" ]
null
null
null
cui/register/Main.py
trysrv/GitHub.Upload.UserRegister.Update.SshKey.201704081527
b0a40f95b39ea2bb243715702eecbe5d04d12e99
[ "CC0-1.0" ]
null
null
null
#!python3 #encoding:utf-8 import cui.register.command.Inserter import cui.register.command.Deleter import cui.register.command.Updater class Main: def __init__(self, path_dir_db): self.path_dir_db = path_dir_db def Insert(self, args): inserter = cui.register.command.Inserter.Inserter() return inserter.Insert(args) def Update(self, args): updater = cui.register.command.Updater.Updater() return updater.Update(args) def Delete(self, args): deleter = cui.register.command.Deleter.Deleter() deleter.Delete(args)
26.681818
59
0.696763
75
587
5.32
0.32
0.165414
0.270677
0.180451
0
0
0
0
0
0
0
0.004237
0.195911
587
21
60
27.952381
0.841102
0.037479
0
0
0
0
0
0
0
0
0
0
0
1
0.266667
false
0
0.2
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
7faf5f8502009c49b4536a7957b42609f9de0f2d
679
py
Python
EPIC_LS/LeastSquares/__init__.py
frortega/EPIC_LS
68474df6253afaa6127fce88faa682b245cc347a
[ "BSD-3-Clause" ]
5
2021-06-12T11:18:48.000Z
2021-08-24T13:58:43.000Z
EPIC_LS/LeastSquares/__init__.py
frortega/EPIC_LS
68474df6253afaa6127fce88faa682b245cc347a
[ "BSD-3-Clause" ]
null
null
null
EPIC_LS/LeastSquares/__init__.py
frortega/EPIC_LS
68474df6253afaa6127fce88faa682b245cc347a
[ "BSD-3-Clause" ]
1
2021-08-06T15:20:55.000Z
2021-08-06T15:20:55.000Z
# -*- coding: utf-8 -*- """ Francisco Hernán Ortega Culaciati ortega.francisco@uchile.cl frortega@gmail.com Departamento de Geofísica - FCFM Universidad de Chile 2020 Modifications: October 2021 - Adds non negative least squares """ from .LeastSquares import least_squares, least_squares_cov, least_squares_weights from .LeastSquaresReg import least_squares_reg_weights, least_squares_reg_cov from .LeastSquaresNonNeg import least_squares_non_neg, least_squares_non_neg_weights,\ least_squares_non_neg_cov from .LeastSquaresRegNonNeg import least_squares_reg_weights_non_neg, \ least_squares_reg_cov_non_neg
32.333333
86
0.764359
84
679
5.797619
0.440476
0.271047
0.147844
0.110883
0.11499
0
0
0
0
0
0
0.016245
0.184094
679
20
87
33.95
0.862816
0.332842
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
f6afcaa522df3a812851cd82a2affc8ec3421c0a
16,700
py
Python
conformation/null_model.py
ks8/conformation
f470849d5b7b90dc5a65bab8a536de1d57c1021a
[ "MIT" ]
null
null
null
conformation/null_model.py
ks8/conformation
f470849d5b7b90dc5a65bab8a536de1d57c1021a
[ "MIT" ]
null
null
null
conformation/null_model.py
ks8/conformation
f470849d5b7b90dc5a65bab8a536de1d57c1021a
[ "MIT" ]
null
null
null
""" Null model for predicting pairwise distances based on minimum path length between pairs of atoms. """ import itertools import json from logging import Logger import matplotlib.pyplot as plt import numpy as np import os import pickle # noinspection PyUnresolvedReferences from rdkit import Chem # noinspection PyUnresolvedReferences from rdkit.Chem import AllChem, rdMolTransforms, rdmolops from sklearn.model_selection import train_test_split # noinspection PyPackageRequirements from tap import Tap import torch from tqdm import tqdm from conformation.dataloader import DataLoader from conformation.dataset import GraphDataset class Args(Tap): """ System arguments. """ data_dir: str # Path to data directory data_path: str # Path to metadata file uid_path: str # Path to uid file save_dir: str # Directory to save information batch_size: int = 10 # Batch size def null_model(args: Args, logger: Logger) -> None: """ Predict atomic distances for a molecule based on minimum path length between pairs of atoms. :param args: System arguments. :param logger: Logger. :return: None. """ # Set up logger debug, info = logger.debug, logger.info debug("loading data") metadata = json.load(open(args.data_path)) train_metadata, remaining_metadata = train_test_split(metadata, test_size=0.2, random_state=0) validation_metadata, test_metadata = train_test_split(remaining_metadata, test_size=0.5, random_state=0) train_data = GraphDataset(train_metadata) val_data = GraphDataset(validation_metadata) test_data = GraphDataset(test_metadata) train_data_length, val_data_length, test_data_length = len(train_data), len(val_data), len(test_data) debug('train size = {:,} | val size = {:,} | test size = {:,}'.format( train_data_length, val_data_length, test_data_length) ) # Convert to iterator train_data = DataLoader(train_data, args.batch_size) test_data = DataLoader(test_data, args.batch_size) # Loss func and optimizer loss_func = torch.nn.MSELoss() # Uid dictionary uid_dict = pickle.load(open(args.uid_path, "rb")) # Null model 0: use the average inter-atomic distance between all pairs of atoms across all molecules # to predict any pairwise distance # Compute average inter-atomic distance across all atoms and all molecules debug("training null model 0") avg_distances = [] for _, _, files in os.walk(args.data_dir): for f in files: distances = np.load(os.path.join(args.data_dir, f)) avg_distances.append(np.mean(distances[:, 0])) avg_distances = np.array(avg_distances) avg_distance = avg_distances.mean() # Test null model 0 on the test set debug("testing null model 0") with torch.no_grad(): loss_sum, batch_count = 0, 0 for batch in tqdm(test_data, total=len(test_data)): targets = batch.y.unsqueeze(1) preds = torch.zeros_like(targets) # Use the all-atom all-molecule average distance as the prediction for each pair of atoms for i in range(preds.shape[0]): preds[i] = avg_distance loss = loss_func(preds, targets) loss = torch.sqrt_(loss) loss_sum += loss.item() batch_count += 1 loss_avg = loss_sum / batch_count debug("Test error avg = {:.4e}".format(loss_avg)) # Null model 1: compute the average distance between pairs of atoms across all molecules conditioned # on shortest path length, and use that to predict the distance between atoms with a given shortest # path length. debug("training null model 1") true_distances = [] shortest_paths = [] path_dict = dict() with torch.no_grad(): for batch in tqdm(train_data, total=len(train_data)): targets = batch.y[:, 0].unsqueeze(1) targets_aux = targets.cpu().numpy() # Collect the distance between each pair of atoms for i in range(targets_aux.shape[0]): true_distances.append(targets_aux[i][0]) # Compute the shortest path between each pair of atoms for i in range(batch.uid.shape[0]): uid = batch.uid[i].item() # Get the uid smiles = uid_dict[uid] # Access the SMILES via the uid mol = Chem.MolFromSmiles(smiles) # Create a molecule object mol = Chem.AddHs(mol) # Iterate through all pairs of atoms in the molecule and compute the shortest path length for m, n in itertools.combinations(list(np.arange(mol.GetNumAtoms())), 2): shortest_paths.append(len(rdmolops.GetShortestPath(mol, int(m), int(n))) - 1) # Convert the lists of atomic distances and shortest paths to numpy arrays true_distances = np.array(true_distances) shortest_paths = np.array(shortest_paths) # Create a dictionary for which the keys are shortest path lengths and the values are the average # distance between pairs of atoms in the train set which have that shortest path length for i in range(shortest_paths.shape[0]): if shortest_paths[i] in path_dict: path_dict[shortest_paths[i]].append(true_distances[i]) else: path_dict[shortest_paths[i]] = [] path_dict[shortest_paths[i]].append(true_distances[i]) for key in path_dict: path_dict[key] = np.array(path_dict[key]).mean() # Test null model 1 debug("testing null model 1") path_lengths = [] losses = [] loss_func_aux = torch.nn.MSELoss(reduction='none') # Use to analyze individual losses with torch.no_grad(): loss_sum, batch_count = 0, 0 for batch in tqdm(test_data, total=len(test_data)): targets = batch.y[:, 0].unsqueeze(1) preds = [] # Loop through each molecule for i in range(batch.uid.shape[0]): uid = batch.uid[i].item() smiles = uid_dict[uid] mol = Chem.MolFromSmiles(smiles) mol = Chem.AddHs(mol) # Predict distance based on shortest path length for each pair of atoms, keeping track # of both the predictions and the shortest path lengths for m, n in itertools.combinations(list(np.arange(mol.GetNumAtoms())), 2): preds.append(path_dict[len(rdmolops.GetShortestPath(mol, int(m), int(n))) - 1]) path_lengths.append(len(rdmolops.GetShortestPath(mol, int(m), int(n))) - 1) preds = torch.tensor(np.array(preds)).unsqueeze(1) loss = loss_func(preds, targets) loss = torch.sqrt_(loss) loss_aux = torch.sqrt_(loss_func_aux(preds, targets)) loss_aux = loss_aux.cpu().numpy() for i in range(loss_aux.shape[0]): losses.append(loss_aux[i][0]) loss_sum += loss.item() batch_count += 1 loss_avg = loss_sum / batch_count debug("Test error avg = {:.4e}".format(loss_avg)) # Plot loss as a function of shortest path length path_lengths = np.array(path_lengths) losses = np.array(losses) plt.plot(path_lengths, losses, 'bo', markersize=0.5) plt.title("Error vs Path Length") plt.ylabel("|True - Predicted|") plt.xlabel("Shortest Path") plt.savefig(os.path.join(args.save_dir, "null-model-1-error-vs-path")) # Save errors np.save(os.path.join(args.save_dir, "null-model-1-errors"), losses) # # Null model 2: compute the average distance between pairs of atoms across all molecules conditioned # on shortest path length as well as atom types, and use that to predict the distance between atoms with a # given shortest path length and pair of atom types. debug("training null model 2") true_distances = [] shortest_paths = [] path_dict = dict() with torch.no_grad(): for batch in tqdm(train_data, total=len(train_data)): targets = batch.y[:, 0].unsqueeze(1) targets_aux = targets.cpu().numpy() for i in range(targets_aux.shape[0]): true_distances.append(targets_aux[i][0]) for i in range(batch.uid.shape[0]): uid = batch.uid[i].item() smiles = uid_dict[uid] mol = Chem.MolFromSmiles(smiles) mol = Chem.AddHs(mol) # Iterate through all pairs of atoms in the molecule and compute the shortest path length # as well as the atom types, and concatenate that info to create the dictionary key for m, n in itertools.combinations(list(np.arange(mol.GetNumAtoms())), 2): atom_a = str(mol.GetAtoms()[int(m)].GetSymbol()) atom_b = str(mol.GetAtoms()[int(n)].GetSymbol()) path_len = len(rdmolops.GetShortestPath(mol, int(m), int(n))) - 1 key = ''.join(sorted([atom_a, atom_b])) + str(path_len) shortest_paths.append(key) true_distances = np.array(true_distances) for i in range(len(shortest_paths)): if shortest_paths[i] in path_dict: path_dict[shortest_paths[i]].append(true_distances[i]) else: path_dict[shortest_paths[i]] = [true_distances[i]] for key in path_dict: path_dict[key] = np.array(path_dict[key]).mean() # Test null model 2 debug("testing null model 2") path_lengths = [] losses = [] loss_func_aux = torch.nn.MSELoss(reduction='none') with torch.no_grad(): loss_sum, batch_count = 0, 0 for batch in tqdm(test_data, total=len(test_data)): targets = batch.y[:, 0].unsqueeze(1) preds = [] for i in range(batch.uid.shape[0]): uid = batch.uid[i].item() smiles = uid_dict[uid] mol = Chem.MolFromSmiles(smiles) mol = Chem.AddHs(mol) # Predict distance based on shortest path length and atom types for each pair of atoms, # keeping track of both the predictions and the shortest path lengths for m, n in itertools.combinations(list(np.arange(mol.GetNumAtoms())), 2): atom_a = str(mol.GetAtoms()[int(m)].GetSymbol()) atom_b = str(mol.GetAtoms()[int(n)].GetSymbol()) path_len = len(rdmolops.GetShortestPath(mol, int(m), int(n))) - 1 key = ''.join(sorted([atom_a, atom_b])) + str(path_len) preds.append(path_dict[key]) path_lengths.append(path_len) preds = torch.tensor(np.array(preds)).unsqueeze(1) loss = loss_func(preds, targets) loss = torch.sqrt_(loss) loss_aux = torch.sqrt_(loss_func_aux(preds, targets)) loss_aux = loss_aux.cpu().numpy() for i in range(loss_aux.shape[0]): losses.append(loss_aux[i][0]) loss_sum += loss.item() batch_count += 1 loss_avg = loss_sum / batch_count debug("Test error avg = {:.4e}".format(loss_avg)) path_lengths = np.array(path_lengths) losses = np.array(losses) plt.plot(path_lengths, losses, 'bo', markersize=0.5) plt.title("Error vs Path Length") plt.ylabel("|True - Predicted|") plt.xlabel("Shortest Path") plt.savefig(os.path.join(args.save_dir, "null-model-2-error-vs-path")) np.save(os.path.join(args.save_dir, "null-model-2-errors"), losses) # Null model 3: compute the average distance between pairs of atoms across all molecules conditioned # on shortest path length as well as all atom types along that specific path, and use that to predict the distance # between atoms with a given shortest path length and sequence of atom types. debug("training null model 3") null_model_2_path_dict = path_dict true_distances = [] shortest_paths = [] path_dict = dict() with torch.no_grad(): for batch in tqdm(train_data, total=len(train_data)): targets = batch.y[:, 0].unsqueeze(1) targets_aux = targets.cpu().numpy() for i in range(targets_aux.shape[0]): true_distances.append(targets_aux[i][0]) for i in range(batch.uid.shape[0]): uid = batch.uid[i].item() smiles = uid_dict[uid] mol = Chem.MolFromSmiles(smiles) mol = Chem.AddHs(mol) # Iterate through all pairs of atoms in the molecule and compute the shortest path length # as well as the sequence of atom types, and concatenate that info to create the dictionary key for m, n in itertools.combinations(list(np.arange(mol.GetNumAtoms())), 2): atoms = [] path = rdmolops.GetShortestPath(mol, int(m), int(n)) path_len = len(path) - 1 for j in range(path_len + 1): atoms.append(mol.GetAtoms()[path[j]].GetSymbol()) key = ''.join(atoms) shortest_paths.append(key) true_distances = np.array(true_distances) for i in range(len(shortest_paths)): if shortest_paths[i] in path_dict: path_dict[shortest_paths[i]].append(true_distances[i]) else: array = [true_distances[i]] path_dict[shortest_paths[i]] = array path_dict[shortest_paths[i][::-1]] = array for key in path_dict: path_dict[key] = np.array(path_dict[key]).mean() # Test null model 3 debug("testing null model 3") path_lengths = [] losses = [] loss_func_aux = torch.nn.MSELoss(reduction='none') with torch.no_grad(): loss_sum, batch_count = 0, 0 for batch in tqdm(test_data, total=len(test_data)): targets = batch.y[:, 0].unsqueeze(1) preds = [] for i in range(batch.uid.shape[0]): uid = batch.uid[i].item() smiles = uid_dict[uid] mol = Chem.MolFromSmiles(smiles) mol = Chem.AddHs(mol) # Predict distance based on shortest path length and atom types for each pair of atoms, # keeping track of both the predictions and the shortest path lengths for m, n in itertools.combinations(list(np.arange(mol.GetNumAtoms())), 2): atoms = [] path = rdmolops.GetShortestPath(mol, int(m), int(n)) path_len = len(path) - 1 for j in range(path_len + 1): atoms.append(mol.GetAtoms()[path[j]].GetSymbol()) key = ''.join(atoms) if key in shortest_paths: preds.append(path_dict[key]) else: atom_a = str(mol.GetAtoms()[int(m)].GetSymbol()) atom_b = str(mol.GetAtoms()[int(n)].GetSymbol()) path_len = len(rdmolops.GetShortestPath(mol, int(m), int(n))) - 1 key = ''.join(sorted([atom_a, atom_b])) + str(path_len) preds.append(null_model_2_path_dict[key]) path_lengths.append(path_len) preds = torch.tensor(np.array(preds)).unsqueeze(1) loss = loss_func(preds, targets) loss = torch.sqrt_(loss) loss_aux = torch.sqrt_(loss_func_aux(preds, targets)) loss_aux = loss_aux.cpu().numpy() for i in range(loss_aux.shape[0]): losses.append(loss_aux[i][0]) loss_sum += loss.item() batch_count += 1 loss_avg = loss_sum / batch_count debug("Test error avg = {:.4e}".format(loss_avg)) path_lengths = np.array(path_lengths) losses = np.array(losses) plt.plot(path_lengths, losses, 'bo', markersize=0.5) plt.title("Error vs Path Length") plt.ylabel("|True - Predicted|") plt.xlabel("Shortest Path") plt.savefig(os.path.join(args.save_dir, "null-model-3-error-vs-path")) np.save(os.path.join(args.save_dir, "null-model-3-errors"), losses)
46.260388
119
0.596527
2,181
16,700
4.433746
0.100413
0.023992
0.009928
0.018201
0.723888
0.712616
0.703723
0.693071
0.690383
0.660807
0
0.009236
0.29982
16,700
360
120
46.388889
0.817754
0.187246
0
0.718412
0
0
0.048048
0.005949
0
0
0
0
0
1
0.00361
false
0
0.054152
0
0.079422
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f6e02907d31f56b4720586ec71abdc83db3b5fca
1,192
py
Python
Scripts/TestParsers/IntegrationTests/PytestTestParser_IntegrationTest.py
davidbrownell/v3-Common_Environment
8f42f256e573cbd83cbf9813db9958025ddf12f2
[ "BSL-1.0" ]
null
null
null
Scripts/TestParsers/IntegrationTests/PytestTestParser_IntegrationTest.py
davidbrownell/v3-Common_Environment
8f42f256e573cbd83cbf9813db9958025ddf12f2
[ "BSL-1.0" ]
1
2018-06-08T06:45:16.000Z
2018-06-08T06:45:16.000Z
Scripts/TestParsers/IntegrationTests/PytestTestParser_IntegrationTest.py
davidbrownell/v3-Common_Environment
8f42f256e573cbd83cbf9813db9958025ddf12f2
[ "BSL-1.0" ]
1
2018-06-08T04:15:17.000Z
2018-06-08T04:15:17.000Z
# ---------------------------------------------------------------------- # | # | PytestTestParser_IntegrationTest.py # | # | David Brownell <db@DavidBrownell.com> # | 2021-07-08 10:01:36 # | # ---------------------------------------------------------------------- # | # | Copyright David Brownell 2021-22 # | Distributed under the Boost Software License, Version 1.0. See # | accompanying file LICENSE_1_0.txt or copy at # | http://www.boost.org/LICENSE_1_0.txt. # | # ---------------------------------------------------------------------- """Verifies that PytestTestParser is executing and extracting data properly""" import os import CommonEnvironment # ---------------------------------------------------------------------- _script_fullpath = CommonEnvironment.ThisFullpath() _script_dir, _script_name = os.path.split(_script_fullpath) # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- def TestFunc(a, b): return a + b def test_Benchmarks(benchmark): assert benchmark(TestFunc, 10, 20) == 30
36.121212
79
0.412752
89
1,192
5.370787
0.719101
0.012552
0.037657
0.050209
0
0
0
0
0
0
0
0.032193
0.166107
1,192
32
80
37.25
0.448692
0.677013
0
0
0
0
0
0
0
0
0
0
0.125
1
0.25
false
0
0.25
0.125
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
100c4035bfe36a1cf42ba922bf7560e9ca282ab8
43
py
Python
thrombo_cytosis/__init__.py
ezrider/thrombo-cytosis
95cb58bc962460d6361a05b6cc94797de97e9610
[ "Apache-2.0" ]
null
null
null
thrombo_cytosis/__init__.py
ezrider/thrombo-cytosis
95cb58bc962460d6361a05b6cc94797de97e9610
[ "Apache-2.0" ]
null
null
null
thrombo_cytosis/__init__.py
ezrider/thrombo-cytosis
95cb58bc962460d6361a05b6cc94797de97e9610
[ "Apache-2.0" ]
null
null
null
from .data import * __version__ = "0.0.1"
10.75
21
0.651163
7
43
3.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0.085714
0.186047
43
3
22
14.333333
0.6
0
0
0
0
0
0.119048
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
10125ce53c16774a451f433ed7eddf8d0e3859be
375
py
Python
sommelier/steps/__init__.py
Cobalt0s/sommelier
d64943a5d7be4ecdf08aa18e9f184b757e408425
[ "MIT" ]
null
null
null
sommelier/steps/__init__.py
Cobalt0s/sommelier
d64943a5d7be4ecdf08aa18e9f184b757e408425
[ "MIT" ]
null
null
null
sommelier/steps/__init__.py
Cobalt0s/sommelier
d64943a5d7be4ecdf08aa18e9f184b757e408425
[ "MIT" ]
null
null
null
from sommelier.api_mock import APIMockManager from sommelier.identifier_registry import IdentifierRegistry from sommelier.page_navigation import PaginationNavigator from sommelier.response_validation import ResponseValidator identifier_registry = IdentifierRegistry() response_validator = ResponseValidator(identifier_registry) pagination_navigator = PaginationNavigator()
37.5
60
0.893333
35
375
9.342857
0.514286
0.159021
0.214067
0
0
0
0
0
0
0
0
0
0.072
375
9
61
41.666667
0.939655
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
101b0e609c1c265f499b5be0dbfc6ad1ffa43a6b
242
py
Python
mfobs/__init__.py
mnfienen/modflow-obs
320cf7b62bc0182c6bee270acf85782ba6037e6f
[ "BSD-3-Clause" ]
null
null
null
mfobs/__init__.py
mnfienen/modflow-obs
320cf7b62bc0182c6bee270acf85782ba6037e6f
[ "BSD-3-Clause" ]
1
2021-12-29T13:48:01.000Z
2021-12-29T16:07:42.000Z
mfobs/__init__.py
mnfienen/modflow-obs
320cf7b62bc0182c6bee270acf85782ba6037e6f
[ "BSD-3-Clause" ]
2
2021-12-28T23:06:20.000Z
2021-12-29T16:42:47.000Z
from ._version import get_versions __version__ = get_versions()['version'] del get_versions from mfobs.heads import get_head_obs from mfobs.obs import get_spatial_differences, get_temporal_differences from mfobs.swflows import get_flux_obs
26.888889
71
0.85124
36
242
5.277778
0.416667
0.189474
0.189474
0
0
0
0
0
0
0
0
0
0.099174
242
8
72
30.25
0.87156
0
0
0
0
0
0.029046
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
63e51453de16df92d543cc2e08d3b1e9c9e6169f
274
py
Python
{{cookiecutter.app_name}}/urls.py
rickydunlop/cookiecutter-django-app-template-drf-haystack
8ea9034c371950628b3d312639964753899c8c5d
[ "MIT" ]
null
null
null
{{cookiecutter.app_name}}/urls.py
rickydunlop/cookiecutter-django-app-template-drf-haystack
8ea9034c371950628b3d312639964753899c8c5d
[ "MIT" ]
null
null
null
{{cookiecutter.app_name}}/urls.py
rickydunlop/cookiecutter-django-app-template-drf-haystack
8ea9034c371950628b3d312639964753899c8c5d
[ "MIT" ]
null
null
null
# from django.conf.urls import include, url from rest_framework import routers from .views import {{ cookiecutter.model_name }}ViewSet router = routers.SimpleRouter() router.register(r'{{ cookiecutter.app_name }}', {{ cookiecutter.model_name }}ViewSet) urlpatterns = [ ]
24.909091
85
0.762774
33
274
6.212121
0.636364
0.165854
0.204878
0.273171
0
0
0
0
0
0
0
0
0.116788
274
10
86
27.4
0.847107
0.149635
0
0
0
0
0.116883
0.090909
0
0
0
0
0
0
null
null
0
0.333333
null
null
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
63e6a75de8f53f70b54021d3fcd2aa2cf66230cc
1,770
py
Python
GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/lib/tests/test_ufunclike.py
miguelsousa/robothon
f2ac88884e04a6e77f79c91e1709ab8c84f46043
[ "MIT" ]
7
2015-02-23T15:14:42.000Z
2021-07-09T16:14:19.000Z
GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/lib/tests/test_ufunclike.py
miguelsousa/robothon
f2ac88884e04a6e77f79c91e1709ab8c84f46043
[ "MIT" ]
null
null
null
GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/lib/tests/test_ufunclike.py
miguelsousa/robothon
f2ac88884e04a6e77f79c91e1709ab8c84f46043
[ "MIT" ]
1
2017-06-21T19:53:21.000Z
2017-06-21T19:53:21.000Z
""" >>> import numpy.core as nx >>> import numpy.lib.ufunclike as U Test fix: >>> a = nx.array([[1.0, 1.1, 1.5, 1.8], [-1.0, -1.1, -1.5, -1.8]]) >>> U.fix(a) array([[ 1., 1., 1., 1.], [-1., -1., -1., -1.]]) >>> y = nx.zeros(a.shape, float) >>> U.fix(a, y) array([[ 1., 1., 1., 1.], [-1., -1., -1., -1.]]) >>> y array([[ 1., 1., 1., 1.], [-1., -1., -1., -1.]]) Test isposinf, isneginf, sign >>> a = nx.array([nx.Inf, -nx.Inf, nx.NaN, 0.0, 3.0, -3.0]) >>> U.isposinf(a) array([ True, False, False, False, False, False], dtype=bool) >>> U.isneginf(a) array([False, True, False, False, False, False], dtype=bool) >>> olderr = nx.seterr(invalid='ignore') >>> nx.sign(a) array([ 1., -1., 0., 0., 1., -1.]) >>> olderr = nx.seterr(**olderr) Same thing with an output array: >>> y = nx.zeros(a.shape, bool) >>> U.isposinf(a, y) array([ True, False, False, False, False, False], dtype=bool) >>> y array([ True, False, False, False, False, False], dtype=bool) >>> U.isneginf(a, y) array([False, True, False, False, False, False], dtype=bool) >>> y array([False, True, False, False, False, False], dtype=bool) >>> olderr = nx.seterr(invalid='ignore') >>> nx.sign(a, y) array([ True, True, False, False, True, True], dtype=bool) >>> olderr = nx.seterr(**olderr) >>> y array([ True, True, False, False, True, True], dtype=bool) Now log2: >>> a = nx.array([4.5, 2.3, 6.5]) >>> U.log2(a) array([ 2.169925 , 1.20163386, 2.70043972]) >>> 2**_ array([ 4.5, 2.3, 6.5]) >>> y = nx.zeros(a.shape, float) >>> U.log2(a, y) array([ 2.169925 , 1.20163386, 2.70043972]) >>> y array([ 2.169925 , 1.20163386, 2.70043972]) """ from numpy.testing import * def test(): return rundocs() if __name__ == "__main__": run_module_suite()
26.029412
66
0.553107
293
1,770
3.303754
0.197952
0.055785
0.061983
0.061983
0.693182
0.664256
0.664256
0.570248
0.489669
0.489669
0
0.098417
0.179096
1,770
67
67
26.41791
0.567791
0.929379
0
0
0
0
0.068966
0
0
0
0
0
0
1
0.2
true
0
0.2
0.2
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
1
1
0
0
4
63ffd8a5b268e2cbef052b16587f6cbc7954ff2a
87
py
Python
leases/apps.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
3
2020-10-13T07:58:48.000Z
2020-12-22T09:41:50.000Z
leases/apps.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
422
2018-10-25T10:57:05.000Z
2022-03-30T05:47:14.000Z
leases/apps.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
1
2020-04-03T07:38:03.000Z
2020-04-03T07:38:03.000Z
from django.apps import AppConfig class LeasesConfig(AppConfig): name = "leases"
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
120a67d554885020b9aaf7740d6acfb7f1025d4a
107
py
Python
test/test_args.py
atupilojon/-resources--pytest
eae62b54828bb82dc534b37d9b46b83cb6d31c03
[ "MIT" ]
null
null
null
test/test_args.py
atupilojon/-resources--pytest
eae62b54828bb82dc534b37d9b46b83cb6d31c03
[ "MIT" ]
null
null
null
test/test_args.py
atupilojon/-resources--pytest
eae62b54828bb82dc534b37d9b46b83cb6d31c03
[ "MIT" ]
null
null
null
from pytest import mark @mark.arguments def check_passing_data(data): assert data == 'argparse_test'
15.285714
34
0.757009
15
107
5.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.158879
107
6
35
17.833333
0.866667
0
0
0
0
0
0.121495
0
0
0
0
0
0.25
1
0.25
false
0.25
0.25
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
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
121c085df1bd2c43518260bc7277abad8380d566
66
py
Python
article_entity/__init__.py
shispt/article-entity
cf39ebf25da188202fcaf1a930b865abaa482611
[ "MIT" ]
4
2017-06-15T14:12:15.000Z
2020-04-14T08:02:36.000Z
article_entity/__init__.py
shispt/article-entity
cf39ebf25da188202fcaf1a930b865abaa482611
[ "MIT" ]
1
2017-06-15T09:01:42.000Z
2017-06-15T09:01:42.000Z
article_entity/__init__.py
shispt/article-entity
cf39ebf25da188202fcaf1a930b865abaa482611
[ "MIT" ]
null
null
null
__version__ = '0.1.1' from .article_entity import article_entity
16.5
42
0.787879
10
66
4.6
0.7
0.565217
0
0
0
0
0
0
0
0
0
0.051724
0.121212
66
3
43
22
0.741379
0
0
0
0
0
0.075758
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
12571ea625116608fef23ba1de0f5941702934f3
675
py
Python
trybox/model/hints/console_hint.py
sophilabs/trybox
d7989cd3b7119791e80e33af67ad4ea828204286
[ "MIT" ]
1
2019-03-06T11:37:27.000Z
2019-03-06T11:37:27.000Z
trybox/model/hints/console_hint.py
sophilabs/trybox
d7989cd3b7119791e80e33af67ad4ea828204286
[ "MIT" ]
null
null
null
trybox/model/hints/console_hint.py
sophilabs/trybox
d7989cd3b7119791e80e33af67ad4ea828204286
[ "MIT" ]
null
null
null
from hint import Hint class ConsoleHint(Hint): serialize = ('trybox.model.hints.ConsoleHint', [],) def __init__(self, title, tooltip, description): super(ConsoleHint, self).__init__(title, tooltip, description) class RunCommandConsoleHint(ConsoleHint): serialize = ('trybox.model.hints.RunCommandConsoleHint', ['command'],) def __init__(self, title, tooltip, description, command): super(RunCommandConsoleHint, self).__init__(title, tooltip, description) self._command = command @property def command(self): return self._command def validate(self, context): return context.run_command(self._command)
29.347826
80
0.705185
68
675
6.705882
0.338235
0.105263
0.201754
0.109649
0.285088
0.149123
0
0
0
0
0
0
0.182222
675
23
81
29.347826
0.826087
0
0
0
0
0
0.113905
0.10355
0
0
0
0
0
1
0.266667
false
0
0.066667
0.133333
0.733333
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
89f205bddcc9887a4046863ffd4c0c1f1f64be15
542
py
Python
tests/test_experiment.py
jckantor/TClab
a975c36d68ccbc3c0f6dade4ae99c0abc3271f81
[ "Apache-2.0" ]
5
2020-08-24T00:53:19.000Z
2022-01-27T09:34:12.000Z
tests/test_experiment.py
jckantor/TClab
a975c36d68ccbc3c0f6dade4ae99c0abc3271f81
[ "Apache-2.0" ]
70
2018-01-13T09:32:19.000Z
2021-07-11T14:35:49.000Z
tests/test_experiment.py
hrg-hgzy/TCLab
ba1615c34f740adccad112a046ecec888e23d858
[ "Apache-2.0" ]
16
2018-01-13T04:25:41.000Z
2022-02-21T19:34:20.000Z
import pytest from tclab.experiment import Experiment, runexperiment def test_constructor(): e = Experiment(connected=False, plot=False) def test_experiment_context(): with Experiment(connected=False, plot=False) as experiment: pass def test_experiment_run(): with Experiment(connected=False, plot=False, time=5) as experiment: for t in experiment.clock(): pass def test_runexperiment(): def function(t, lab): pass runexperiment(function, connected=False, plot=False, time=5)
20.846154
71
0.704797
66
542
5.69697
0.393939
0.074468
0.191489
0.244681
0.37234
0.284574
0
0
0
0
0
0.00463
0.202952
542
25
72
21.68
0.865741
0
0
0.2
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.2
0.133333
0
0.466667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
d63562ce7f150aa93fc0a61b0cf5d55752052a8d
203
py
Python
easyric/__init__.py
HowcanoeWang/EasyRIC
a3420bc7b1e0f1013411565cf0e66dd2d2ba5371
[ "MIT" ]
12
2021-01-25T07:11:52.000Z
2022-02-14T11:57:03.000Z
easyric/__init__.py
HowcanoeWang/EasyRIC
a3420bc7b1e0f1013411565cf0e66dd2d2ba5371
[ "MIT" ]
null
null
null
easyric/__init__.py
HowcanoeWang/EasyRIC
a3420bc7b1e0f1013411565cf0e66dd2d2ba5371
[ "MIT" ]
null
null
null
from easyric.objects import ( Pix4D ) from easyric.io.plot import ( draw_polygon_on_img, draw_polygon_on_imgs ) __all__ = ['Pix4D', 'draw_polygon_on_img', 'draw_polygon_on_imgs']
18.454545
57
0.699507
28
203
4.5
0.464286
0.349206
0.412698
0.253968
0.52381
0.52381
0.52381
0.52381
0
0
0
0.012422
0.206897
203
11
57
18.454545
0.770186
0
0
0
0
0
0.215686
0
0
0
0
0
0
1
0
false
0
0.222222
0
0.222222
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c3b468e5157eb7d863e12711ae8a28a718c477ea
644
py
Python
vault_init/errors.py
jynolen/vault-init
2345c428505402e24052a2c7d25db72e92aa4ebb
[ "Apache-2.0" ]
3
2020-10-26T14:21:59.000Z
2020-10-28T13:56:10.000Z
vault_init/errors.py
jynolen/vault-init
2345c428505402e24052a2c7d25db72e92aa4ebb
[ "Apache-2.0" ]
null
null
null
vault_init/errors.py
jynolen/vault-init
2345c428505402e24052a2c7d25db72e92aa4ebb
[ "Apache-2.0" ]
1
2020-10-26T14:22:05.000Z
2020-10-26T14:22:05.000Z
class VaultInitError(Exception): pass class NotEnoughtKeysError(VaultInitError): def __init__(self, mandatory_count, used_count): self.mandatory = mandatory_count self.used = used_count def __str__(self): return f'NotEnoughKeys excepted {self.mandatory}, used {self.used}' class BadKeysProvided(VaultInitError): def __str__(self): return 'Provided keys cannot unseal vault server' class BadInitParameterValue(VaultInitError): def __init__(self, message): self.message = message def __str__(self): return f'Unable to init vault server - reason given ${self.message}'
28
76
0.71118
71
644
6.112676
0.408451
0.117512
0.069124
0.110599
0.078341
0
0
0
0
0
0
0
0.204969
644
22
77
29.272727
0.847656
0
0
0.1875
0
0
0.241433
0
0
0
0
0
0
1
0.3125
false
0.0625
0
0.1875
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
c3bd8b419643f55ed08b61ff7c939c31b3115311
49
py
Python
useless_bot/cogs/arcade/__init__.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
useless_bot/cogs/arcade/__init__.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
useless_bot/cogs/arcade/__init__.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
from .arcade import Arcade __all__ = ["Arcade"]
12.25
26
0.714286
6
49
5.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.163265
49
3
27
16.333333
0.756098
0
0
0
0
0
0.122449
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
c3fad8eb731aabe24778ab0c6dcae5d2a8d6b5fc
172
py
Python
test.py
yvesf/pyinflux
8f54b1960e2050536f34f091c1de291febd486df
[ "MIT" ]
null
null
null
test.py
yvesf/pyinflux
8f54b1960e2050536f34f091c1de291febd486df
[ "MIT" ]
null
null
null
test.py
yvesf/pyinflux
8f54b1960e2050536f34f091c1de291febd486df
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import unittest from pyinflux import client, parser, test if __name__ == '__main__': unittest.TextTestRunner().run(unittest.findTestCases(test))
28.666667
63
0.767442
21
172
5.904762
0.809524
0
0
0
0
0
0
0
0
0
0
0.006536
0.110465
172
6
63
28.666667
0.803922
0.122093
0
0
0
0
0.05298
0
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
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
7f00f0f6c3dc29b94fdbadf3b84ec1488dc8b749
25
py
Python
vnpy/__init__.py
dylan1521/vnpy
dd064d924fa6121d841704daf4bcb1ed9f3493e2
[ "MIT" ]
null
null
null
vnpy/__init__.py
dylan1521/vnpy
dd064d924fa6121d841704daf4bcb1ed9f3493e2
[ "MIT" ]
null
null
null
vnpy/__init__.py
dylan1521/vnpy
dd064d924fa6121d841704daf4bcb1ed9f3493e2
[ "MIT" ]
null
null
null
__version__ = "2.1.6"
5
21
0.56
4
25
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.24
25
4
22
6.25
0.368421
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7f242f800ad5e6e61838d6114ba14c5b5ae38de5
446
py
Python
Desafios/Ex-026.py
LuckyCards/Curso-Python3
b39c7b2645220c71c35012f16c102428053fee25
[ "MIT" ]
1
2021-04-06T16:14:43.000Z
2021-04-06T16:14:43.000Z
Desafios/Ex-026.py
LuckyCards/Curso-Python3
b39c7b2645220c71c35012f16c102428053fee25
[ "MIT" ]
null
null
null
Desafios/Ex-026.py
LuckyCards/Curso-Python3
b39c7b2645220c71c35012f16c102428053fee25
[ "MIT" ]
null
null
null
from unidecode import unidecode #removedor de acentuações :) print(f'\033[33m{"—"*30:^30}\033[m') print(f'\033[36m{"EXERCÍCIO Nº 26":^30}\033[m') print(f'\033[33m{"—"*30:^30}\033[m') frase = str(unidecode(input('Digite uma frase: '))).strip().upper() print(f'Quantas letras A? {frase.count("A")}') print(f'\033[1mPrimeira\033[m aparição da letra A: {frase.find("A") + 1}') print(f'\033[1mUltima\033[m aparição da letra A: {frase.rfind("A") + 1}')
55.75
74
0.665919
80
446
3.7375
0.45
0.120401
0.150502
0.080268
0.35786
0.35786
0.307692
0.140468
0.140468
0
0
0.127451
0.085202
446
8
75
55.75
0.60049
0.060538
0
0.25
0
0.25
0.644391
0.174224
0
0
0
0
0
1
0
false
0
0.125
0
0.125
0.75
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
6143dadeb95d833016a363d0f7ab9d19711d5206
225
py
Python
tests/ChromeDriverBenchmarkTest.py
hiroshitoda/WebDriverBenchmark.py
74b643b9f299436ef6fb50741a60f04c0c69cf8c
[ "Apache-2.0" ]
null
null
null
tests/ChromeDriverBenchmarkTest.py
hiroshitoda/WebDriverBenchmark.py
74b643b9f299436ef6fb50741a60f04c0c69cf8c
[ "Apache-2.0" ]
null
null
null
tests/ChromeDriverBenchmarkTest.py
hiroshitoda/WebDriverBenchmark.py
74b643b9f299436ef6fb50741a60f04c0c69cf8c
[ "Apache-2.0" ]
null
null
null
import unittest from selenium import webdriver from tests import Base class ChromeDriverBenchmarkTest(Base.Base): def getDriver(self): return webdriver.Chrome() if __name__ == "__main__": unittest.main()
16.071429
43
0.733333
25
225
6.28
0.68
0
0
0
0
0
0
0
0
0
0
0
0.186667
225
13
44
17.307692
0.857924
0
0
0
0
0
0.035556
0
0
0
0
0
0
1
0.125
false
0
0.375
0.125
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
6145f4f995cec17b8a9714a2d11e17db61cffd1d
277
py
Python
buzzbrewclub/notifications/urls.py
tim-schilling/buzzbrewclub
4851975e880875d686ff4645817a42a4fdef240e
[ "MIT" ]
null
null
null
buzzbrewclub/notifications/urls.py
tim-schilling/buzzbrewclub
4851975e880875d686ff4645817a42a4fdef240e
[ "MIT" ]
5
2020-06-06T01:02:29.000Z
2021-06-10T19:32:37.000Z
buzzbrewclub/notifications/urls.py
tim-schilling/buzzbrewclub
4851975e880875d686ff4645817a42a4fdef240e
[ "MIT" ]
null
null
null
from django.urls import path from buzzbrewclub.notifications.views import ( notification_settings_update_view, ) app_name = 'notifications' urlpatterns = [ path('settings/~update/', view=notification_settings_update_view, name='settings_update'), ]
21.307692
48
0.732852
29
277
6.724138
0.517241
0.287179
0.276923
0.307692
0
0
0
0
0
0
0
0
0.173285
277
12
49
23.083333
0.851528
0
0
0
0
0
0.162455
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
614b183fcda4d7b79012728d3fae728aa1377cb1
239
py
Python
tests/tasks.py
knowsuchagency/klaxon
2275287ab4a4461314d66ab575050da9675e0478
[ "Apache-2.0" ]
76
2019-02-12T16:00:46.000Z
2022-02-07T07:06:51.000Z
tests/tasks.py
knowsuchagency/klaxon
2275287ab4a4461314d66ab575050da9675e0478
[ "Apache-2.0" ]
4
2020-01-08T04:15:07.000Z
2021-04-30T20:28:29.000Z
tests/tasks.py
knowsuchagency/klaxon
2275287ab4a4461314d66ab575050da9675e0478
[ "Apache-2.0" ]
4
2020-01-01T12:30:20.000Z
2021-09-22T03:55:35.000Z
from invoke import task from klaxon.invoke import klaxonify @task @klaxonify def succeed(c): ... @task @klaxonify def fail_normally(c): raise ValueError("derp") @task @klaxonify def fail_badly(c): raise SystemExit("oof")
11.380952
35
0.707113
32
239
5.21875
0.53125
0.233533
0.287425
0.239521
0
0
0
0
0
0
0
0
0.179916
239
20
36
11.95
0.852041
0
0
0.428571
0
0
0.029289
0
0
0
0
0
0
1
0.214286
false
0
0.142857
0
0.357143
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
6152ee9d66c28685e1acad3556b511dff734e8bf
246
py
Python
tests/__init__.py
brycedrennan/swagger_spec_validator
dc03f20cd4b2140dba967226821afc56defdf915
[ "Apache-2.0" ]
100
2015-01-22T17:37:32.000Z
2021-11-08T10:29:56.000Z
tests/__init__.py
brycedrennan/swagger_spec_validator
dc03f20cd4b2140dba967226821afc56defdf915
[ "Apache-2.0" ]
144
2015-01-21T21:03:14.000Z
2022-01-05T11:51:28.000Z
tests/__init__.py
brycedrennan/swagger_spec_validator
dc03f20cd4b2140dba967226821afc56defdf915
[ "Apache-2.0" ]
81
2015-01-15T21:47:35.000Z
2021-09-30T08:55:08.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os TESTS_BASE_PATH = os.path.abspath(os.path.dirname(__file__))
24.6
60
0.813008
34
246
5.147059
0.558824
0.228571
0.365714
0
0
0
0
0
0
0
0
0.004587
0.113821
246
9
61
27.333333
0.798165
0.085366
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0.166667
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
6183d2b95a26481c52e9e152fe1a754fa25b3cb9
229
py
Python
awardsapp/serializers.py
ndonyemark/le_prix
51ec6e9d4687cc3478f2895eb34f205e2a1e29d7
[ "MIT" ]
null
null
null
awardsapp/serializers.py
ndonyemark/le_prix
51ec6e9d4687cc3478f2895eb34f205e2a1e29d7
[ "MIT" ]
6
2021-03-30T13:33:52.000Z
2022-03-12T00:34:21.000Z
awardsapp/serializers.py
ndonyemark/le_prix
51ec6e9d4687cc3478f2895eb34f205e2a1e29d7
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import ApiProfile class ProfileSerializer(serializers.ModelSerializer): class Meta: model = ApiProfile fields = ['id', 'username', 'bio', 'profile_picture']
32.714286
61
0.729258
23
229
7.173913
0.782609
0
0
0
0
0
0
0
0
0
0
0
0.179039
229
7
61
32.714286
0.87766
0
0
0
0
0
0.121739
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
61b49dcb4ffd5107cbaab0dc673b4a5601c728ac
7,967
py
Python
tests/test_api/test_ebel/test_drugbank.py
e-bel/ebel
778f135d73a62038caf9cf83f2259f19d806a3ca
[ "MIT" ]
1
2022-02-24T13:15:33.000Z
2022-02-24T13:15:33.000Z
tests/test_api/test_ebel/test_drugbank.py
e-bel/ebel
778f135d73a62038caf9cf83f2259f19d806a3ca
[ "MIT" ]
4
2021-09-16T07:20:22.000Z
2022-01-14T10:27:30.000Z
tests/test_api/test_ebel/test_drugbank.py
e-bel/ebel
778f135d73a62038caf9cf83f2259f19d806a3ca
[ "MIT" ]
null
null
null
"""DrugBank API unit tests.""" from .conftest import format_response_data from .constants import RESULTS, NUM_RESULTS, PAGE_SIZE class TestDrugbank: def test_get_by_id(self, client): response = client.get( 'api/v1/drugbank/by_id?drugbank_id=DB00843', content_type='application/json' ) output = format_response_data(response) expected_results = { # Only check a subset "cas_number": "120014-06-4", "drugbank_id": "DB00843", "name": "Donepezil", } assert isinstance(output, dict) assert all([output[key] == value for key, value in expected_results.items()]) def test_get_drugbank(self, client): response = client.get( 'api/v1/drugbank?drugbank_id=DB00843&name=Donepezil&description=%25Aricept%25&cas_number=120014-06-4&unii=8SSC91326P&state=solid&indication=%25mild%20to%20moderate%20Alzheimer%E2%80%99s%20Disease%25&pharmacodynamics=%25inhibiting%25&toxicity=%25rat%20oral%20LD50%25&metabolism=%25CYP3A4%25&absorption=%25gastrointestinal%20tract%25&half_life=%25hours%25&route_of_elimination=%25urine%25&volume_of_distribution=%25mg%20dose%25&clearance=%25plasma%25&mechanism_of_action=%25cognitive%20and%20behavioral%20decline%25&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_results = { # Only check a subset "cas_number": "120014-06-4", "drugbank_id": "DB00843", "name": "Donepezil", } assert output[NUM_RESULTS] == 1 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert all([hit[key] == value for key, value in expected_results.items()]) def test_get_interaction(self, client): response = client.get( 'api/v1/drugbank/interaction?drugbank_id=DB06605&name=Apixaban&description=%25hemorrhage%25&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_cols = ("description", "drugbank_id", "interactor_drugbank_id", "name") assert output[NUM_RESULTS] >= 150 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert all([col in hit for col in expected_cols]) assert hit["name"] == "Apixaban" def test_get_pathway(self, client): response = client.get( 'api/v1/drugbank/pathway?drugbank_id=DB00114&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_cols = ("drugbank_id", "smpdb_id") assert output[NUM_RESULTS] == 30 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert all([col in hit for col in expected_cols]) assert hit["drugbank_id"] == "DB00114" def test_get_status(self, client): response = client.get( 'api/v1/drugbank/status?drugbank_id=DB06605&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_results = { "drugbank_id": "DB06605", "smpdb_id": "approved" } assert output[NUM_RESULTS] == 1 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert hit == expected_results def test_get_patent(self, client): response = client.get( 'api/v1/drugbank/patent?drugbank_id=DB00843&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_cols = ("approved", "country", "drugbank_id", "expires", "number", "pediatric_extension") assert output[NUM_RESULTS] == 19 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert all([col in hit for col in expected_cols]) assert hit["drugbank_id"] == "DB00843" def test_get_external_identifier(self, client): response = client.get( 'api/v1/drugbank/external_identifier?drugbank_id=DB00114&resource=BindingDB&identifier=50118216&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_results = { "drugbank_id": "DB00114", "identifier": "50118216", "resource": "BindingDB" } assert output[NUM_RESULTS] == 1 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert hit == expected_results def test_get_reference(self, client): response = client.get( 'api/v1/drugbank/reference?drugbank_id=DB06605&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_cols = ("drugbank_id", "pmid") assert output[NUM_RESULTS] == 2 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert all([col in hit for col in expected_cols]) assert hit["drugbank_id"] == "DB06605" assert hit["pmid"] == 18832478 def test_get_target(self, client): response = client.get( 'api/v1/drugbank/target?drugbank_id=DB06605&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_results = { "action": "inhibitor", "drugbank_id": "DB06605", "known_action": "yes", "uniprot": "P00742" } assert output[NUM_RESULTS] == 1 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert hit == expected_results def test_get_product_name(self, client): response = client.get( 'api/v1/drugbank/product_name?drugbank_id=DB06605&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_cols = ("drugbank_id", "name") assert output[NUM_RESULTS] == 3 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert all([col in hit for col in expected_cols]) assert hit["drugbank_id"] == "DB06605" def test_get_synonym(self, client): response = client.get( 'api/v1/drugbank/synonym?drugbank_id=DB06605&page_size=10&page=1', content_type='application/json' ) output = format_response_data(response) expected_cols = ("drugbank_id", "synonym") assert output[NUM_RESULTS] == 3 assert output[PAGE_SIZE] == 10 results = output[RESULTS] assert isinstance(results, list) hit = results[0] assert isinstance(hit, dict) assert all([col in hit for col in expected_cols]) assert hit["drugbank_id"] == "DB06605" synonyms = set([x["synonym"] for x in results]) assert all([syn in synonyms for syn in ("Apixaban", "apixabán", "apixabanum")])
40.441624
547
0.625957
917
7,967
5.263904
0.160305
0.058007
0.041434
0.054692
0.719702
0.709758
0.709758
0.701471
0.610317
0.610317
0
0.056321
0.262332
7,967
196
548
40.647959
0.765016
0.008159
0
0.629834
0
0.016575
0.251045
0.160101
0
0
0
0
0.331492
1
0.060773
false
0
0.01105
0
0.077348
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
61c5b8dbdc0e9e24a5b6bb01326a309383aa341c
671
py
Python
referentiel/models/simple_glpi_manager.py
ZuluPro/snafu
dbd79da4617db315ba7e76a0af6805cc3b1cbae2
[ "BSD-3-Clause" ]
1
2017-12-13T20:28:32.000Z
2017-12-13T20:28:32.000Z
referentiel/models/simple_glpi_manager.py
ZuluPro/snafu
dbd79da4617db315ba7e76a0af6805cc3b1cbae2
[ "BSD-3-Clause" ]
null
null
null
referentiel/models/simple_glpi_manager.py
ZuluPro/snafu
dbd79da4617db315ba7e76a0af6805cc3b1cbae2
[ "BSD-3-Clause" ]
null
null
null
from django.db.models import Manager class SimpleGLPI_Manager(Manager): def __init__(self, *args, **kwargs): self.type = kwargs['type'] del kwargs['type'] super(SimpleGLPI_Manager, self).__init__(*args, **kwargs) def web_filter(self, GET): return self.get_query_set().filter(name__icontains=GET['q']) def glpi_list(self): """List objects from GLPI.""" from sendim.glpi_manager import GLPI_Manager GLPI_Manager = GLPI_Manager() return GLPI_Manager.list(self.type) def glpi_get(self, glpi_id): """Get object from GLPI.""" from sendim.glpi_manager import GLPI_Manager GLPI_Manager = GLPI_Manager() return GLPI_Manager.get(self.type, glpi_id)
29.173913
62
0.742176
98
671
4.785714
0.316327
0.234542
0.127932
0.187633
0.362473
0.362473
0.362473
0.362473
0.362473
0.362473
0
0
0.129657
671
22
63
30.5
0.803082
0.067064
0
0.25
0
0
0.014634
0
0
0
0
0
0
1
0.25
false
0
0.1875
0.0625
0.6875
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
61c8d07fcbcb6f44d37bc461e466d778910369f1
54
py
Python
other/jsc2021_a.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
other/jsc2021_a.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
other/jsc2021_a.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
X, Y, Z = map(int, input().split()) print((Y*Z-1)//X)
18
35
0.518519
12
54
2.333333
0.75
0.142857
0
0
0
0
0
0
0
0
0
0.021277
0.12963
54
2
36
27
0.574468
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
4ee1253bb56338a24b88744e84495128724dfc07
328
py
Python
Basic/the_list.py
silence0201/Learn-Python
662da7c0e74221cedb445ba17d5cb1cd3af41c86
[ "MIT" ]
1
2018-05-30T01:38:23.000Z
2018-05-30T01:38:23.000Z
Basic/the_list.py
silence0201/Learn-Python
662da7c0e74221cedb445ba17d5cb1cd3af41c86
[ "MIT" ]
null
null
null
Basic/the_list.py
silence0201/Learn-Python
662da7c0e74221cedb445ba17d5cb1cd3af41c86
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- classmates = ['Michael', 'Bob', 'Tracy'] print('classmates=',classmethod) print('len(classmates) =',len(classmates)) print('classmates[0]',classmates[0]) print('classmates[1]',classmates[1]) print('classmates[-1]',classmates[-1]) classmates.pop() print('classmates=',classmates)
25.230769
42
0.692073
39
328
5.820513
0.435897
0.330396
0.277533
0.229075
0.237885
0
0
0
0
0
0
0.026144
0.067073
328
12
43
27.333333
0.715686
0.131098
0
0
0
0
0.332155
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
f62afd152959effee1f71506cd131523e7d94aa4
2,073
py
Python
gmail_client/models/__init__.py
CanopyIQ/gmail_client
5af519cf6d350f2b2645b85fe9692811f7a9feeb
[ "MIT" ]
null
null
null
gmail_client/models/__init__.py
CanopyIQ/gmail_client
5af519cf6d350f2b2645b85fe9692811f7a9feeb
[ "MIT" ]
null
null
null
gmail_client/models/__init__.py
CanopyIQ/gmail_client
5af519cf6d350f2b2645b85fe9692811f7a9feeb
[ "MIT" ]
null
null
null
# coding: utf-8 """ Gmail Access Gmail mailboxes including sending user email. OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import models into model package from .auto_forwarding import AutoForwarding from .batch_delete_messages_request import BatchDeleteMessagesRequest from .batch_modify_messages_request import BatchModifyMessagesRequest from .draft import Draft from .filter import Filter from .filter_action import FilterAction from .filter_criteria import FilterCriteria from .forwarding_address import ForwardingAddress from .history import History from .history_label_added import HistoryLabelAdded from .history_label_removed import HistoryLabelRemoved from .history_message_added import HistoryMessageAdded from .history_message_deleted import HistoryMessageDeleted from .imap_settings import ImapSettings from .label import Label from .list_drafts_response import ListDraftsResponse from .list_filters_response import ListFiltersResponse from .list_forwarding_addresses_response import ListForwardingAddressesResponse from .list_history_response import ListHistoryResponse from .list_labels_response import ListLabelsResponse from .list_messages_response import ListMessagesResponse from .list_send_as_response import ListSendAsResponse from .list_smime_info_response import ListSmimeInfoResponse from .list_threads_response import ListThreadsResponse from .message import Message from .message_part import MessagePart from .message_part_body import MessagePartBody from .message_part_header import MessagePartHeader from .modify_message_request import ModifyMessageRequest from .modify_thread_request import ModifyThreadRequest from .pop_settings import PopSettings from .profile import Profile from .send_as import SendAs from .smime_info import SmimeInfo from .smtp_msa import SmtpMsa from .thread import Thread from .vacation_settings import VacationSettings from .watch_request import WatchRequest from .watch_response import WatchResponse
37.017857
79
0.867824
247
2,073
7.036437
0.421053
0.080552
0.025892
0
0
0
0
0
0
0
0
0.001075
0.10275
2,073
55
80
37.690909
0.933333
0.095996
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
f6738d8b62aeff3f1fc41f1cf40e386f4d6f4e83
91
py
Python
djwaiter/apps.py
mrgaolei/django-waiter
20f782060c85276a98cbd5b965d5ef8d2fba2679
[ "MIT" ]
null
null
null
djwaiter/apps.py
mrgaolei/django-waiter
20f782060c85276a98cbd5b965d5ef8d2fba2679
[ "MIT" ]
null
null
null
djwaiter/apps.py
mrgaolei/django-waiter
20f782060c85276a98cbd5b965d5ef8d2fba2679
[ "MIT" ]
null
null
null
from django.apps import AppConfig class DjwaiterConfig(AppConfig): name = 'djwaiter'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
9c9bb053162ab3e49bac7213ff4db2d1a9864a61
164
py
Python
vizdoomaze/envs/vizdoomazethree14.py
fanyuzeng/Vizdoomaze
5b444f2d861c908c4d96ae374bcce660d364f22e
[ "MIT" ]
3
2020-09-25T16:00:49.000Z
2020-10-29T10:32:30.000Z
vizdoomaze/envs/vizdoomazethree14.py
fanyuzeng/Vizdoomaze
5b444f2d861c908c4d96ae374bcce660d364f22e
[ "MIT" ]
null
null
null
vizdoomaze/envs/vizdoomazethree14.py
fanyuzeng/Vizdoomaze
5b444f2d861c908c4d96ae374bcce660d364f22e
[ "MIT" ]
1
2021-12-17T07:50:47.000Z
2021-12-17T07:50:47.000Z
from vizdoomaze.envs.vizdoomenv import VizdoomEnv class vizdoomazeThree14(VizdoomEnv): def __init__(self): super(vizdoomazeThree14, self).__init__(67)
27.333333
51
0.77439
17
164
7
0.705882
0
0
0
0
0
0
0
0
0
0
0.042553
0.140244
164
6
51
27.333333
0.801418
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4