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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2fdc4623180df16635760047b5d6376c39c033c6 | 796 | py | Python | tests/python/test_serial_execution.py | kxxt/taichi | 15f39b79c258080f1e34fcbdc29646d9ced0a4fe | [
"MIT"
] | 11,699 | 2020-01-09T03:02:46.000Z | 2022-03-31T20:59:08.000Z | tests/python/test_serial_execution.py | kxxt/taichi | 15f39b79c258080f1e34fcbdc29646d9ced0a4fe | [
"MIT"
] | 3,589 | 2020-01-09T03:18:25.000Z | 2022-03-31T19:06:42.000Z | tests/python/test_serial_execution.py | kxxt/taichi | 15f39b79c258080f1e34fcbdc29646d9ced0a4fe | [
"MIT"
] | 1,391 | 2020-01-09T03:02:54.000Z | 2022-03-31T08:44:29.000Z | import taichi as ti
@ti.test(arch=ti.cpu, cpu_max_num_threads=1)
def test_serial_range_for():
n = 1024 * 32
s = ti.field(dtype=ti.i32, shape=n)
counter = ti.field(dtype=ti.i32, shape=())
@ti.kernel
def fill_range():
counter[None] = 0
for i in range(n):
s[ti.atomic_add(counter[None], 1)] = i
fill_range()
for i in range(n):
assert s[i] == i
@ti.test(arch=ti.cpu, cpu_max_num_threads=1)
def test_serial_struct_for():
n = 1024 * 32
s = ti.field(dtype=ti.i32, shape=n)
counter = ti.field(dtype=ti.i32, shape=())
@ti.kernel
def fill_struct():
counter[None] = 0
for i in s:
s[ti.atomic_add(counter[None], 1)] = i
fill_struct()
for i in range(n):
assert s[i] == i
| 20.947368 | 50 | 0.572864 | 133 | 796 | 3.293233 | 0.255639 | 0.027397 | 0.109589 | 0.127854 | 0.885845 | 0.872146 | 0.789954 | 0.789954 | 0.789954 | 0.561644 | 0 | 0.045296 | 0.278894 | 796 | 37 | 51 | 21.513514 | 0.71777 | 0 | 0 | 0.703704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074074 | 1 | 0.148148 | false | 0 | 0.037037 | 0 | 0.185185 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
2ff74c115a3c4fa90b6c267946a977855e2a702b | 3,599 | py | Python | day11/day11.py | Gramet/adventofcode2020 | 2817e585a9363228e1706d2bbc0f3a3f9e17ebca | [
"MIT"
] | null | null | null | day11/day11.py | Gramet/adventofcode2020 | 2817e585a9363228e1706d2bbc0f3a3f9e17ebca | [
"MIT"
] | null | null | null | day11/day11.py | Gramet/adventofcode2020 | 2817e585a9363228e1706d2bbc0f3a3f9e17ebca | [
"MIT"
] | null | null | null | from copy import deepcopy
with open("input", "r") as f:
lines = f.readlines()
dict_seat = {".": -1, "L": 0, "#": 1}
def change_seats(mat):
mat_cop = deepcopy(mat)
for row in range(1, len(mat) - 1):
for col in range(1, len(mat[row]) - 1):
num_neigh = 0
num_neigh += (
0 if mat_cop[row - 1][col - 1] == -1 else mat_cop[row - 1][col - 1]
)
num_neigh += 0 if mat_cop[row - 1][col] == -1 else mat_cop[row - 1][col]
num_neigh += (
0 if mat_cop[row - 1][col + 1] == -1 else mat_cop[row - 1][col + 1]
)
num_neigh += 0 if mat_cop[row][col - 1] == -1 else mat_cop[row][col - 1]
num_neigh += 0 if mat_cop[row][col + 1] == -1 else mat_cop[row][col + 1]
num_neigh += (
0 if mat_cop[row + 1][col - 1] == -1 else mat_cop[row + 1][col - 1]
)
num_neigh += 0 if mat_cop[row + 1][col] == -1 else mat_cop[row + 1][col]
num_neigh += (
0 if mat_cop[row + 1][col + 1] == -1 else mat_cop[row + 1][col + 1]
)
if mat_cop[row][col] == 0 and num_neigh == 0:
mat[row][col] = 1
elif mat_cop[row][col] == 1 and num_neigh >= 4:
mat[row][col] = 0
return mat
def find_nearest(mat, row, col, dir_row, dir_col):
dir_row_ori = dir_row
dir_col_ori = dir_col
while True:
if (
row + dir_row == len(mat)
or row + dir_row == -1
or col + dir_col == len(mat[row])
or col + dir_col == -1
):
return 0
if mat[row + dir_row][col + dir_col] == -1:
dir_row += dir_row_ori
dir_col += dir_col_ori
else:
return mat[row + dir_row][col + dir_col]
def change_seats_far(mat):
mat_cop = deepcopy(mat)
for row in range(1, len(mat) - 1):
for col in range(1, len(mat[row]) - 1):
num_neigh = 0
num_neigh += find_nearest(mat_cop, row, col, -1, -1)
num_neigh += find_nearest(mat_cop, row, col, -1, 0)
num_neigh += find_nearest(mat_cop, row, col, -1, 1)
num_neigh += find_nearest(mat_cop, row, col, 0, -1)
num_neigh += find_nearest(mat_cop, row, col, 0, 1)
num_neigh += find_nearest(mat_cop, row, col, 1, -1)
num_neigh += find_nearest(mat_cop, row, col, 1, 0)
num_neigh += find_nearest(mat_cop, row, col, 1, 1)
if mat_cop[row][col] == 0 and num_neigh == 0:
mat[row][col] = 1
elif mat_cop[row][col] == 1 and num_neigh >= 5:
mat[row][col] = 0
return mat
mat = [[-1] * (len(lines[0].strip("\n")) + 2)]
for line in lines:
mat.append([-1] + [dict_seat[x] for x in line.strip("\n")] + [-1])
mat.append([-1] * (len(lines[0].strip("\n")) + 2))
num_floor = -sum(sum(row) for row in mat)
for cnt in range(1000):
if mat == change_seats(deepcopy(mat)):
break
else:
mat = change_seats(deepcopy(mat))
print(mat)
print(cnt)
num_occ = sum(sum(row) for row in mat) + num_floor
print(num_occ)
# Part 2
mat = [[-1] * (len(lines[0].strip("\n")) + 2)]
for line in lines:
mat.append([-1] + [dict_seat[x] for x in line.strip("\n")] + [-1])
mat.append([-1] * (len(lines[0].strip("\n")) + 2))
for cnt in range(1000):
if mat == change_seats_far(deepcopy(mat)):
break
else:
mat = change_seats_far(deepcopy(mat))
print(cnt)
num_occ = sum(sum(row) for row in mat) + num_floor
print(num_occ)
| 31.570175 | 84 | 0.514865 | 578 | 3,599 | 3.029412 | 0.102076 | 0.102798 | 0.143918 | 0.109652 | 0.827527 | 0.821245 | 0.791548 | 0.717304 | 0.717304 | 0.679612 | 0 | 0.045286 | 0.32509 | 3,599 | 113 | 85 | 31.849558 | 0.675587 | 0.001667 | 0 | 0.455556 | 0 | 0 | 0.005848 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033333 | false | 0 | 0.011111 | 0 | 0.088889 | 0.055556 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
640b4bc4755cb6f9ef4aa438134fdc5061b708bb | 15,792 | py | Python | 11 - Extra-- sonos snips voice app/tests/services/deezer/test_deezer_search.py | RedaMastouri/marvis | 75e90a66d0746f12ba6231a4cab16ab40b42928e | [
"MIT"
] | 1 | 2021-12-29T08:44:34.000Z | 2021-12-29T08:44:34.000Z | 11 - Extra-- sonos snips voice app/tests/services/deezer/test_deezer_search.py | RedaMastouri/marvis | 75e90a66d0746f12ba6231a4cab16ab40b42928e | [
"MIT"
] | null | null | null | 11 - Extra-- sonos snips voice app/tests/services/deezer/test_deezer_search.py | RedaMastouri/marvis | 75e90a66d0746f12ba6231a4cab16ab40b42928e | [
"MIT"
] | null | null | null | import mock, pytest
import requests
from snipssonos.entities.album import Album
from snipssonos.entities.artist import Artist
from snipssonos.entities.device import Device
from snipssonos.entities.track import Track
from snipssonos.services.deezer.music_search_and_play_service import DeezerMusicSearchService
from snipssonos.services.node.query_builder import NodeQueryBuilder
from snipssonos.exceptions import MusicSearchProviderConnectionError
BASE_ENDPOINT = "http://localhost:5005"
@pytest.fixture
def connected_device():
return Device(
name="Anthony's Sonos",
identifier="RINCON_XXXX",
volume=10
)
@pytest.fixture
def deezer_music_search_service():
connected_device = Device(
name="Anthony's Sonos",
identifier="RINCON_XXXX",
volume=10
)
mock_device_discovery_service = mock.Mock()
mock_device_discovery_service.get.return_value = connected_device
deezer = DeezerMusicSearchService(mock_device_discovery_service)
return deezer
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_music_search_provider_raises_exception_for_wrong_query_to_deezer_api(mock_requests, mock_response,
deezer_music_search_service):
mock_response.ok = False
mock_requests.get.return_value = mock_response
search_query = deezer_music_search_service.query_builder \
.add_track_result_type() \
.add_track_filter("Track") \
.generate_search_query()
with pytest.raises(MusicSearchProviderConnectionError) as e:
deezer_music_search_service.execute_query(search_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_music_search_provider_raises_exception_for_wrong_query_to_deezer_api(mock_requests,
deezer_music_search_service):
mock_requests.get.side_effect = requests.exceptions.ConnectionError
search_query = deezer_music_search_service.query_builder \
.add_track_result_type() \
.add_track_filter("Track") \
.generate_search_query()
with pytest.raises(MusicSearchProviderConnectionError) as e:
deezer_music_search_service.execute_query(search_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_album(mock_requests, mock_response, deezer_music_search_service,
connected_device):
# query builder
# execute query
result = deezer_music_search_service.search_album("favourite album")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"album", "favourite album")
mock_requests.get.assert_called_with(expected_query)
assert len(result) == 1
assert isinstance(result[0], Album)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_album_for_artist(mock_requests, mock_response, deezer_music_search_service, connected_device):
result = deezer_music_search_service.search_album_for_artist("favourite album", "favourite artist")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"album", 'album:"favourite album":artist:"favourite artist"')
mock_requests.get.assert_called_with(expected_query)
assert len(result) == 1
assert isinstance(result[0], Album)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_album_in_playlist(mock_requests, mock_response, deezer_music_search_service, connected_device):
result = deezer_music_search_service.search_album_in_playlist("favourite album", "vibing")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"album", "favourite album")
mock_requests.get.assert_called_with(expected_query)
assert len(result) == 1
assert isinstance(result[0], Album)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_album_for_artist_and_for_playlist(mock_requests, mock_response, deezer_music_search_service,
connected_device):
result = deezer_music_search_service.search_album_for_artist_and_for_playlist("favourite album", "favourite artist",
"balling")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"album", 'album:"favourite album":artist:"favourite artist"')
mock_requests.get.assert_called_with(expected_query)
assert len(result) == 1
assert isinstance(result[0], Album)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_track(mock_requests, mock_response, deezer_music_search_service, connected_device):
result = deezer_music_search_service.search_track("my fav track")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", "my fav track")
mock_requests.get.assert_called_with(expected_query)
assert len(result) == 1
assert isinstance(result[0], Track)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_track_for_artist(mock_requests, mock_response, deezer_music_search_service, connected_device):
result = deezer_music_search_service.search_track_for_artist("my fav track", "my fav artist")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", 'track:"my fav track":artist:"my fav artist"')
mock_requests.get.assert_called_with(expected_query)
assert len(result) == 1
assert isinstance(result[0], Track)
assert len(result[0].artists) > 0
assert isinstance(result[0].artists[0], Artist)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_track_for_album(mock_requests, mock_response, deezer_music_search_service, connected_device):
result = deezer_music_search_service.search_track_for_album("my fav track", "a very good album")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", 'track:"my fav track":album:"a very good album"')
mock_requests.get.assert_called_with(expected_query)
assert len(result) == 1
assert isinstance(result[0], Track)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_track_for_playlist(mock_requests, mock_response, deezer_music_search_service, connected_device):
deezer_music_search_service.search_track_for_playlist("my fav track", "a very good playlist")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", "my fav track")
mock_requests.get.assert_called_with(expected_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def search_track_for_album_and_for_artist(mock_requests, mock_response, deezer_music_search_service, connected_device):
deezer_music_search_service.search_track_for_album_and_for_artist("my fav track", "a very good album",
"my fav artist")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", "my fav track my fav artist")
mock_requests.get.assert_called_with(expected_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def search_track_for_album_and_for_playlist(mock_requests, mock_response, deezer_music_search_service,
connected_device):
deezer_music_search_service.search_track_for_album_and_for_playlist("my fav track", "a very good album",
"good vibes")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", "my fav track")
mock_requests.get.assert_called_with(expected_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def search_track_for_album_and_for_playlist(mock_requests, mock_response, deezer_music_search_service,
connected_device):
deezer_music_search_service.search_track_for_artist_and_for_playlist("my fav track", "a very good artist",
"good vibes")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", "my fav track a very good artist")
mock_requests.get.assert_called_with(expected_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def search_track_for_album_and_for_artist_and_for_playlist(mock_requests, mock_response, deezer_music_search_service,
connected_device):
deezer_music_search_service.search_track_for_artist_and_for_playlist("my fav track", "a nice album",
"a very good artist", "good vibes")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", "my fav track a very good artist")
mock_requests.get.assert_called_with(expected_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_artist_for_playlist(mock_requests, mock_response, deezer_music_search_service, connected_device):
deezer_music_search_service.search_artist_for_playlist("my fav artist", "a playlist a used to like")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"song", "my fav artist")
mock_requests.get.assert_called_with(expected_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_search_playlist(mock_requests, mock_response, deezer_music_search_service, connected_device):
deezer_music_search_service.search_playlist("good vibesssss")
expected_query = "{}/{}/musicsearch/{}/{}/{}".format(BASE_ENDPOINT, connected_device.name, "deezer",
"playlist", "good vibesssss")
mock_requests.get.assert_called_with(expected_query)
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests.Response')
@mock.patch('snipssonos.services.deezer.music_search_and_play_service.requests')
def test_error_raised_on_request(mock_requests, mock_response, deezer_music_search_service, connected_device):
mock_response.ok = False
mock_requests.get.return_value = mock_response
with pytest.raises(MusicSearchProviderConnectionError):
deezer_music_search_service.search_playlist("good vibesssss")
def test_method_dispatch_album_in_playlist_to_album(deezer_music_search_service):
deezer_music_search_service.search_album = mock.Mock()
deezer_music_search_service.search_album_in_playlist("album_name", "playlist_name")
deezer_music_search_service.search_album.assert_called()
def test_method_dispatch_album_for_artist_in_playlist_to_album_for_artist(deezer_music_search_service):
deezer_music_search_service.search_album_for_artist = mock.Mock()
deezer_music_search_service.search_album_for_artist_and_for_playlist("album_name", "artist_name", "playlist_name")
deezer_music_search_service.search_album_for_artist.assert_called()
def test_method_dispatch_track_for_playlist_to_track(deezer_music_search_service):
deezer_music_search_service.search_track = mock.Mock()
deezer_music_search_service.search_track_for_playlist("track_name", "playlist_name")
deezer_music_search_service.search_track.assert_called()
def test_method_dispatch_track_for_album_and_for_artist_to_track_for_artist(deezer_music_search_service):
deezer_music_search_service.search_track_for_artist = mock.Mock()
deezer_music_search_service.search_track_for_album_and_for_artist("track_name", "album_name", "artist_name")
deezer_music_search_service.search_track_for_artist.assert_called()
def test_method_dispatch_track_for_album_and_for_playlist_to_track(deezer_music_search_service):
deezer_music_search_service.search_track = mock.Mock()
deezer_music_search_service.search_track_for_album_and_for_playlist("track_name", "album_name", "artist_name")
deezer_music_search_service.search_track.assert_called()
def test_method_dispatch_search_track_for_artist_and_for_playlist_to_search_track_for_artist(
deezer_music_search_service):
deezer_music_search_service.search_track_for_artist = mock.Mock()
deezer_music_search_service.search_track_for_artist_and_for_playlist("track_name", "artist_name", "playlist_name")
deezer_music_search_service.search_track_for_artist.assert_called()
def test_method_dispatch_track_for_album_and_for_artist_and_for_playlist_to_track_for_artist(
deezer_music_search_service):
deezer_music_search_service.search_track_for_artist = mock.Mock()
deezer_music_search_service.search_track_for_album_and_for_artist_and_for_playlist("track", "album_name", "artist",
"playlist_name")
deezer_music_search_service.search_track_for_artist.assert_called()
| 52.816054 | 120 | 0.725367 | 1,878 | 15,792 | 5.653355 | 0.054313 | 0.104644 | 0.158519 | 0.146934 | 0.897994 | 0.892437 | 0.883583 | 0.871998 | 0.846944 | 0.835829 | 0 | 0.00201 | 0.180914 | 15,792 | 298 | 121 | 52.993289 | 0.818786 | 0.00171 | 0 | 0.627358 | 0 | 0 | 0.247684 | 0.171362 | 0 | 0 | 0 | 0 | 0.174528 | 1 | 0.122642 | false | 0 | 0.042453 | 0.004717 | 0.174528 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
64383b037bb9caf75b6abb2e393daf1c191bf197 | 25 | py | Python | spharpy/transforms/__init__.py | mberz/spharpy | e74c30c297dd9ad887e7345c836a515daa6f21f4 | [
"MIT"
] | null | null | null | spharpy/transforms/__init__.py | mberz/spharpy | e74c30c297dd9ad887e7345c836a515daa6f21f4 | [
"MIT"
] | null | null | null | spharpy/transforms/__init__.py | mberz/spharpy | e74c30c297dd9ad887e7345c836a515daa6f21f4 | [
"MIT"
] | null | null | null | from .rotations import *
| 12.5 | 24 | 0.76 | 3 | 25 | 6.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 25 | 1 | 25 | 25 | 0.904762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
ff267516e3c30ea6f478b8a0ca0a032c5808f8f2 | 2,987 | py | Python | ApiGen.py | dans98/Sublime-ApiGen | 38be40b7003d8bf0592cb38b7f1f38f9a1e0e249 | [
"BSD-3-Clause"
] | 3 | 2015-05-25T18:53:04.000Z | 2017-05-18T14:57:09.000Z | ApiGen.py | dans98/Sublime-ApiGen | 38be40b7003d8bf0592cb38b7f1f38f9a1e0e249 | [
"BSD-3-Clause"
] | 2 | 2015-08-03T03:28:33.000Z | 2016-02-10T21:57:46.000Z | ApiGen.py | dans98/Sublime-ApiGen | 38be40b7003d8bf0592cb38b7f1f38f9a1e0e249 | [
"BSD-3-Clause"
] | null | null | null | import sys, os
import sublime, sublime_plugin
import ApiGen.ApiGenHelper as ag
class ApiGenShowConsoleCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.window().run_command("show_panel", {"panel": 'console'})
ag.startLine()
class ApiGenBaseClass(sublime_plugin.TextCommand):
def is_enabled(self):
return ag.canRun()
class ApiGenSelfupdateCommand(ApiGenBaseClass):
def run(self, edit):
self.view.run_command('api_gen_show_console')
ag.activate()
args = ['selfupdate']
sublime.set_timeout_async(lambda : ag.runApiGen(args), 0)
class ApiGenVersionCommand(ApiGenBaseClass):
def run(self, edit):
self.view.run_command('api_gen_show_console')
ag.activate()
args = ['-v']
sublime.set_timeout_async(lambda : ag.runApiGen(args), 0)
class ApiGenGenerateCommand(ApiGenBaseClass):
def run(self, edit):
path = self.view.file_name()
if path == None:
return
ag.activate()
self.view.run_command('api_gen_show_console')
config = ag.getConfigFile(path)
if config != '':
print('Processing will proceed using ' + config)
args = ['generate', '--config', config]
additionalArgs = ag.settings.get('additionalGenerateArgs', [])
args.extend(additionalArgs)
sublime.set_timeout_async(lambda : ag.runApiGen(args), 0)
else:
print('No config file could not be found!')
ag.endLine()
ag.deactivate()
class ApiGenFreeformCommand(ApiGenBaseClass):
def run(self, edit):
ag.activate()
window = self.view.window()
window.show_input_panel('ApiGen Arguments', '', self.done, None, self.cancel)
def done(self, args):
self.view.run_command('api_gen_show_console')
args = [args]
sublime.set_timeout_async(lambda : ag.runApiGen(args), 0)
def cancel(self):
ag.deactivate()
class ApiGenGenerateFreeformCommand(ApiGenBaseClass):
def run(self, edit):
ag.activate()
window = self.view.window()
window.show_input_panel('ApiGen Arguments', '', self.done, None, self.cancel)
def done(self, args):
path = self.view.file_name()
if path == None:
return
ag.activate()
self.view.run_command('api_gen_show_console')
config = ag.getConfigFile(path)
if config != '':
print('Processing will proceed using ' + config)
args = ['generate', '--config', config, args]
additionalArgs = ag.settings.get('additionalGenerateArgs', [])
args.extend(additionalArgs)
sublime.set_timeout_async(lambda : ag.runApiGen(args), 0)
else:
print('No config file could not be found!')
ag.endLine()
ag.deactivate()
def cancel(self):
ag.deactivate()
| 32.11828 | 85 | 0.611985 | 323 | 2,987 | 5.529412 | 0.232198 | 0.044793 | 0.033595 | 0.047032 | 0.780515 | 0.736282 | 0.723964 | 0.723964 | 0.704367 | 0.679731 | 0 | 0.002295 | 0.270506 | 2,987 | 92 | 86 | 32.467391 | 0.817347 | 0 | 0 | 0.746667 | 0 | 0 | 0.12387 | 0.014731 | 0 | 0 | 0 | 0 | 0 | 1 | 0.146667 | false | 0 | 0.04 | 0.013333 | 0.32 | 0.053333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ff359720aaa5e08faf23730bd5afdac7bd7850ef | 48 | py | Python | app/test/__init__.py | toshiks/number_recognizer | 5dee9da830d1a790578eceb923ebf7ffc776339b | [
"MIT"
] | null | null | null | app/test/__init__.py | toshiks/number_recognizer | 5dee9da830d1a790578eceb923ebf7ffc776339b | [
"MIT"
] | null | null | null | app/test/__init__.py | toshiks/number_recognizer | 5dee9da830d1a790578eceb923ebf7ffc776339b | [
"MIT"
] | null | null | null | from .recognize_numbers import RecognizeNumbers
| 24 | 47 | 0.895833 | 5 | 48 | 8.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 48 | 1 | 48 | 48 | 0.954545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
442262ef099551daf830ddb5e764ab89a2b59750 | 27 | py | Python | caffeination/__init__.py | neisor/caffeination | ef8d76d43b8e47b9833828d224bae79fad19fa32 | [
"MIT"
] | null | null | null | caffeination/__init__.py | neisor/caffeination | ef8d76d43b8e47b9833828d224bae79fad19fa32 | [
"MIT"
] | null | null | null | caffeination/__init__.py | neisor/caffeination | ef8d76d43b8e47b9833828d224bae79fad19fa32 | [
"MIT"
] | null | null | null | from caffeination import *
| 13.5 | 26 | 0.814815 | 3 | 27 | 7.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 27 | 1 | 27 | 27 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
4427d2e07d69f79a133e859003206e50f4130d20 | 104 | py | Python | app/submit/__init__.py | nycrecords/GPP | 7b7d1a26f6b1cbde051a0a0642407f9aa36e5b2e | [
"Apache-2.0"
] | null | null | null | app/submit/__init__.py | nycrecords/GPP | 7b7d1a26f6b1cbde051a0a0642407f9aa36e5b2e | [
"Apache-2.0"
] | 1 | 2021-03-20T00:32:17.000Z | 2021-03-20T00:32:17.000Z | app/submit/__init__.py | nycrecords/GPP | 7b7d1a26f6b1cbde051a0a0642407f9aa36e5b2e | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint
submit_views = Blueprint('submit', __name__)
from app.submit import views
| 17.333333 | 44 | 0.798077 | 14 | 104 | 5.571429 | 0.571429 | 0.384615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134615 | 104 | 5 | 45 | 20.8 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0.057692 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0.666667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
445457f2da1556b0da1831413209e9f51a23296f | 161 | py | Python | bin/test.py | malachi-iot/garageopener | 129d245ad81e8261dd1f70c9ac79ad89615419ce | [
"MIT"
] | null | null | null | bin/test.py | malachi-iot/garageopener | 129d245ad81e8261dd1f70c9ac79ad89615419ce | [
"MIT"
] | 1 | 2017-02-01T06:01:11.000Z | 2017-02-01T06:01:11.000Z | bin/test.py | malachi-iot/garageopener | 129d245ad81e8261dd1f70c9ac79ad89615419ce | [
"MIT"
] | null | null | null | #!/usr/bin/python
#from click import click
import click
import os
os.environ['x'] = '100000'
if click.confirm("test", default='Y'):
click.echo("Did it")
| 14.636364 | 38 | 0.664596 | 25 | 161 | 4.28 | 0.72 | 0.308411 | 0.299065 | 0.411215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.044118 | 0.15528 | 161 | 10 | 39 | 16.1 | 0.742647 | 0.248447 | 0 | 0 | 0 | 0 | 0.151261 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
925c4610f83ae9df679077db8e66ca7ebae3558b | 6,486 | py | Python | thesis_visfunc.py | EloyRD/ThesisExp | dfb890708e95d23cc68ff79b0858630c12aa940d | [
"Unlicense"
] | null | null | null | thesis_visfunc.py | EloyRD/ThesisExp | dfb890708e95d23cc68ff79b0858630c12aa940d | [
"Unlicense"
] | null | null | null | thesis_visfunc.py | EloyRD/ThesisExp | dfb890708e95d23cc68ff79b0858630c12aa940d | [
"Unlicense"
] | null | null | null | from matplotlib import cm
from matplotlib import gridspec
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
def EA_fitn_dev(fitness_res, run_s, min_f=0):
fitness_s = fitness_res.copy()
fitness_s.reset_index()
fitness_s = fitness_s[fitness_s['run'] == run_s]
fitness_s = fitness_s.drop('run', axis=1)
fitness_s = fitness_s.set_index('generation')
fitness_s.loc[:, fitness_s.columns.difference(['fitness_std'])].plot()
plt.xlim(0, None)
plt.ylim(min_f, None)
fitness_s.plot(y='fitness_std')
plt.xlim(0, None)
def EA_plt_land(f, domain, point, steps, a=30, b=-60, imgsize=(15, 10), min_f='None', ratio_w=1.5, ln=1):
(x_min, x_max, y_min, y_max) = domain
(x_plot, y_plot) = point
# Create arrays
# # meshgrid produces all combinations of given x and y
x = np.linspace(x_min, x_max, steps)
y = np.linspace(y_min, y_max, steps)
X, Y = np.meshgrid(x, y) # combine all x with all y
# # Applying the function
Z = f(X, Y)
# Set up the axes with gridspec
fig = plt.figure(figsize=imgsize)
gs = gridspec.GridSpec(1, 2, width_ratios=[ratio_w, 1])
ax = fig.add_subplot(gs[0], projection='3d')
ay = fig.add_subplot(gs[1])
# Plotting the surface
# # Some values for the surface plot
norm = plt.Normalize(Z.min(), Z.max())
colors = cm.viridis(norm(Z))
rcount, ccount, _ = colors.shape
ax.view_init(a, b) # Visualization angles
# # Plotting points
ax.scatter(x_plot, y_plot, f(x_plot, y_plot),
color='r', s=20, label='Minima')
# # Plotting surface
surf = ax.plot_surface(X, Y, Z, rcount=rcount,
ccount=ccount, facecolors=colors, shade=False)
surf.set_facecolor((0, 0, 0, 0))
if min_f != 'None':
ax.set_zlim(bottom=min_f)
ax.set_xlabel('gen_x')
ax.set_ylabel('gen_y')
ax.set_zlabel('fitness')
# ax.set_aspect('auto')
ax.autoscale_view(True, True, True, True)
ax.legend()
# Plotting level curves
# # Plotting points
ay.scatter(x_plot, y_plot, color='r', s=20, label='Minima')
# # Plotting contour
levels = 15
CS = ay.contour(X, Y, Z, levels, cmap='viridis', linewidths=ln)
ay.clabel(CS, inline=True, fontsize=8)
ay.set_xlabel('gen_x')
ay.set_ylabel('gen_y')
# ay.set_aspect('auto')
ay.autoscale_view(True, True, True)
ay.legend()
# adjusting
plt.tight_layout()
plt.show()
def EA_plt_pop(f, domain, steps, genera_res, run_s, gen_s, a=30, b=-60, imgsize=(15, 10), min_f='None', ratio_w=1.5, ln=1):
query = (genera_res['function'] == 'population') & (
genera_res['generation'] == gen_s) & (genera_res['run'] == run_s)
population_s = genera_res[query]
xp = population_s['gen_x'].values
yp = population_s['gen_y'].values
zp = population_s['fitness'].values
(x_min, x_max, y_min, y_max) = domain
# Create arrays
# meshgrid produces all combinations of given x and y
x = np.linspace(x_min, x_max, steps)
y = np.linspace(y_min, y_max, steps)
X, Y = np.meshgrid(x, y) # combine all x with all y
# Applying the function
Z = f(X, Y)
# Set up the axes with gridspec
fig = plt.figure(figsize=imgsize)
gs = gridspec.GridSpec(1, 2, width_ratios=[ratio_w, 1])
ax = fig.add_subplot(gs[0], projection='3d')
ay = fig.add_subplot(gs[1])
# Plotting the surface
ax.view_init(a, b)
# # Plotting points
ax.scatter(xp, yp, zp, color='r', s=20, label='population')
# # Plotting surface
ax.plot_surface(X, Y, Z, cmap='viridis', alpha=0.3, linewidth=0)
if min_f != 'None':
ax.set_zlim(bottom=min_f)
ax.set_xlabel('gen_x')
ax.set_ylabel('gen_y')
ax.set_zlabel('fitness')
# ax.set_aspect('auto')
ax.autoscale_view(True, True, True, True)
ax.legend()
# Plotting level curves
# # Plotting points
ay.scatter(xp, yp, color='r', s=20, label='population')
# # Plotting contour
levels = 15
ay.contour(X, Y, Z, levels, cmap='viridis', linewidths=ln)
ay.set_xlabel('gen_x')
ay.set_ylabel('gen_y')
# ay.set_aspect('auto')
ay.autoscale_view(True, True, True)
ay.legend()
# adjusting
plt.tight_layout()
plt.show()
def EA_plt_gen(f, domain, steps, genera_res, run_s, gen_s, a=30, b=-60, imgsize=(15, 10), min_f='None', ratio_w=1.5, ln=1):
query = (genera_res['function'] == 'population') & (
genera_res['generation'] == gen_s) & (genera_res['run'] == run_s)
population_s = genera_res[query]
xp = population_s['gen_x'].values
yp = population_s['gen_y'].values
zp = population_s['fitness'].values
query = (genera_res['function'] == 'progeny') & (
genera_res['generation'] == gen_s) & (genera_res['run'] == run_s)
progeny_s = genera_res[query]
xg = progeny_s['gen_x'].values
yg = progeny_s['gen_y'].values
zg = progeny_s['fitness'].values
(x_min, x_max, y_min, y_max) = domain
# Create arrays
# meshgrid produces all combinations of given x and y
x = np.linspace(x_min, x_max, steps)
y = np.linspace(y_min, y_max, steps)
X, Y = np.meshgrid(x, y) # combine all x with all y
# Applying the function
Z = f(X, Y)
# Set up the axes with gridspec
fig = plt.figure(figsize=imgsize)
gs = gridspec.GridSpec(1, 2, width_ratios=[ratio_w, 1])
ax = fig.add_subplot(gs[0], projection='3d')
ay = fig.add_subplot(gs[1])
# Plotting the surface
ax.view_init(a, b)
# # Plotting points
ax.scatter(xp, yp, zp, color='r', s=20, label='population')
ax.scatter(xg, yg, zg, color='g', s=17.5, label='progeny')
# # Plotting surface
ax.plot_surface(X, Y, Z, cmap='viridis', alpha=0.3, linewidth=0)
if min_f != 'None':
ax.set_zlim(bottom=min_f)
ax.set_xlabel('gen_x')
ax.set_ylabel('gen_y')
ax.set_zlabel('fitness')
# ax.set_aspect('auto')
ax.autoscale_view(True, True, True, True)
ax.legend()
# Plotting level curves
# # Plotting points
ay.scatter(xp, yp, color='r', s=20, label='population')
ay.scatter(xg, yg, color='g', s=17.5, label='progeny')
# # Plotting contour
levels = 15
ay.contour(X, Y, Z, levels, cmap='viridis', linewidths=ln)
ay.set_xlabel('gen_x')
ay.set_ylabel('gen_y')
# ay.set_aspect('auto')
ay.autoscale_view(True, True, True)
ay.legend()
# adjusting
plt.tight_layout()
plt.show() | 32.592965 | 123 | 0.629356 | 1,026 | 6,486 | 3.80117 | 0.15692 | 0.007692 | 0.027692 | 0.012308 | 0.794872 | 0.778718 | 0.774615 | 0.774615 | 0.763333 | 0.757692 | 0 | 0.018128 | 0.217545 | 6,486 | 199 | 124 | 32.592965 | 0.750345 | 0.15202 | 0 | 0.725191 | 0 | 0 | 0.073332 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.030534 | false | 0 | 0.038168 | 0 | 0.068702 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
2ba339a53c90d9b88c52b589ebc67c6f6e7dea88 | 393 | py | Python | models/__init__.py | nguyenxuanhoi2903/SRSF_summarization | 3d19e6b7669e0b22bab533fc637a434f379ed392 | [
"MIT"
] | 1 | 2020-10-08T09:10:55.000Z | 2020-10-08T09:10:55.000Z | models/__init__.py | nguyenxuanhoi2903/SRSF_summarization | 3d19e6b7669e0b22bab533fc637a434f379ed392 | [
"MIT"
] | null | null | null | models/__init__.py | nguyenxuanhoi2903/SRSF_summarization | 3d19e6b7669e0b22bab533fc637a434f379ed392 | [
"MIT"
] | null | null | null | from models.BasicModule import BasicModule
from models.RNN_RNN import RNN_RNN
from models.SRSF_RNN_RNN_V2 import SRSF_RNN_RNN_V2
from models.SRSF_CNN_RNN import SRSF_CNN_RNN
from models.SRS2F_RNN_RNN import SRS2F_RNN_RNN
from models.SRSF_RNN_RNN_V3 import SRSF_RNN_RNN_V3
from models.SRSF_RNN_RNN_V4 import SRSF_RNN_RNN_V4
from models.CNN_RNN import CNN_RNN
from models.AttnRNN import AttnRNN
| 39.3 | 50 | 0.885496 | 75 | 393 | 4.24 | 0.16 | 0.188679 | 0.188679 | 0.160377 | 0.226415 | 0.163522 | 0.163522 | 0 | 0 | 0 | 0 | 0.022409 | 0.091603 | 393 | 9 | 51 | 43.666667 | 0.868347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2bafa48043fca71c18f543448c3419ecffff35ea | 30 | py | Python | zquery/__init__.py | shane-breeze/zquery | f3cca7c29cc83178e6cbab293d45af14473adbf6 | [
"MIT"
] | null | null | null | zquery/__init__.py | shane-breeze/zquery | f3cca7c29cc83178e6cbab293d45af14473adbf6 | [
"MIT"
] | null | null | null | zquery/__init__.py | shane-breeze/zquery | f3cca7c29cc83178e6cbab293d45af14473adbf6 | [
"MIT"
] | null | null | null | from .process_tables import *
| 15 | 29 | 0.8 | 4 | 30 | 5.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 30 | 1 | 30 | 30 | 0.884615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2bd668c85d48fd55bb0ca58dbb3063963326772a | 37 | py | Python | pydapper/mssql/__init__.py | samnimoh/pydapper | 28e02a82339c4373aae043483868c84946e4aca9 | [
"MIT"
] | 19 | 2022-01-19T15:30:57.000Z | 2022-03-10T15:15:56.000Z | pydapper/mssql/__init__.py | samnimoh/pydapper | 28e02a82339c4373aae043483868c84946e4aca9 | [
"MIT"
] | 17 | 2022-01-19T06:23:35.000Z | 2022-03-06T17:09:25.000Z | pydapper/mssql/__init__.py | samnimoh/pydapper | 28e02a82339c4373aae043483868c84946e4aca9 | [
"MIT"
] | 2 | 2022-02-05T02:18:02.000Z | 2022-02-17T08:39:54.000Z | from .pymssql import PymssqlCommands
| 18.5 | 36 | 0.864865 | 4 | 37 | 8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108108 | 37 | 1 | 37 | 37 | 0.969697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
a60b502cac4ad29a3f09a054f6dbf4369ba9e5b9 | 2,120 | py | Python | src/day3_test.py | nlasheras/aoc-2021 | 17af9108e2f907747c9aca784e52c80e81949845 | [
"MIT"
] | null | null | null | src/day3_test.py | nlasheras/aoc-2021 | 17af9108e2f907747c9aca784e52c80e81949845 | [
"MIT"
] | null | null | null | src/day3_test.py | nlasheras/aoc-2021 | 17af9108e2f907747c9aca784e52c80e81949845 | [
"MIT"
] | null | null | null | import unittest
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import
from day3 import *
class BinaryDiagnosticExampleTest(unittest.TestCase):
"""Unit tests for Day 3 using the problem example input."""
def setUp(self):
self.bits, self.bit_length = read_input("input3_test.txt")
def test_gamma(self):
gamma = part1_calculate_gamma(self.bits, self.bit_length)
self.assertEqual(bin(gamma), "0b10110")
epsilon = part1_calculate_epsilon(gamma, self.bit_length)
self.assertEqual(bin(epsilon), "0b1001")
def test_oxigen(self):
oxigen = part2_calculate_oxygen(self.bits, self.bit_length, True)
self.assertEqual(bin(oxigen), "0b10111")
def test_co2(self):
co2 = part2_calculate_oxygen(self.bits, self.bit_length, False)
self.assertEqual(bin(co2), "0b1010")
class BinaryDiagnosticMyInputTest(unittest.TestCase):
"""Unit tests for Day 3 using my puzzle input."""
def setUp(self):
self.bits, self.bit_length = read_input("input3.txt")
def test_gamma(self):
gamma = part1_calculate_gamma(self.bits, self.bit_length)
self.assertEqual(bin(gamma), "0b10010010110")
epsilon = part1_calculate_epsilon(gamma, self.bit_length)
self.assertEqual(bin(epsilon), "0b101101101001")
def test_answer1(self):
gamma = part1_calculate_gamma(self.bits, self.bit_length)
epsilon = part1_calculate_epsilon(gamma, self.bit_length)
self.assertEqual(gamma*epsilon, 3429254)
def test_oxigen(self):
oxigen = part2_calculate_oxygen(self.bits, self.bit_length, True)
self.assertEqual(bin(oxigen), "0b10110111111")
def test_co2(self):
co2 = part2_calculate_oxygen(self.bits, self.bit_length, False)
self.assertEqual(bin(co2), "0b111001011110")
def test_answer2(self):
oxigen = part2_calculate_oxygen(self.bits, self.bit_length, True)
co2 = part2_calculate_oxygen(self.bits, self.bit_length, False)
self.assertEqual(co2*oxigen, 5410338)
if __name__ == '__main__':
unittest.main()
| 36.551724 | 73 | 0.698113 | 264 | 2,120 | 5.390152 | 0.231061 | 0.068869 | 0.127899 | 0.115952 | 0.756852 | 0.756852 | 0.756852 | 0.756852 | 0.704849 | 0.704849 | 0 | 0.065812 | 0.190094 | 2,120 | 57 | 74 | 37.192982 | 0.762959 | 0.079717 | 0 | 0.5 | 0 | 0 | 0.058277 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.25 | false | 0 | 0.05 | 0 | 0.35 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
a64827e9b7432995fe9f6251f80255727a57c0b7 | 3,028 | py | Python | mozillians/users/migrations/0047_auto_20200925_0405.py | mozilla/vouched-mozillians | 88fca9aea0ab1e173cbc33776aa388b956859559 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T12:17:34.000Z | 2020-10-27T12:17:34.000Z | mozillians/users/migrations/0047_auto_20200925_0405.py | akatsoulas/vouched-mozillians | 6dcfaf61518ff038403b2b3e06ad9b813135b287 | [
"BSD-3-Clause"
] | 5 | 2020-09-28T19:04:19.000Z | 2020-10-27T19:48:31.000Z | mozillians/users/migrations/0047_auto_20200925_0405.py | akatsoulas/vouched-mozillians | 6dcfaf61518ff038403b2b3e06ad9b813135b287 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T08:55:10.000Z | 2020-09-24T10:40:58.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.25 on 2020-09-25 11:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0046_auto_20200923_0630'),
]
operations = [
migrations.RemoveField(
model_name='userprofile',
name='bio',
),
migrations.RemoveField(
model_name='userprofile',
name='city',
),
migrations.RemoveField(
model_name='userprofile',
name='country',
),
migrations.RemoveField(
model_name='userprofile',
name='geo_city',
),
migrations.RemoveField(
model_name='userprofile',
name='geo_country',
),
migrations.RemoveField(
model_name='userprofile',
name='geo_region',
),
migrations.RemoveField(
model_name='userprofile',
name='lat',
),
migrations.RemoveField(
model_name='userprofile',
name='lng',
),
migrations.RemoveField(
model_name='userprofile',
name='photo',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_bio',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_city',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_country',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_geo_city',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_geo_country',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_geo_region',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_photo',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_region',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_story_link',
),
migrations.RemoveField(
model_name='userprofile',
name='privacy_timezone',
),
migrations.RemoveField(
model_name='userprofile',
name='region',
),
migrations.RemoveField(
model_name='userprofile',
name='story_link',
),
migrations.RemoveField(
model_name='userprofile',
name='timezone',
),
migrations.RemoveField(
model_name='userprofile',
name='title',
),
migrations.AlterField(
model_name='externalaccount',
name='type',
field=models.CharField(max_length=30, verbose_name='Account Type'),
),
]
| 26.79646 | 79 | 0.516513 | 228 | 3,028 | 6.653509 | 0.236842 | 0.142386 | 0.394199 | 0.454845 | 0.818062 | 0.818062 | 0.729071 | 0.520765 | 0.08174 | 0 | 0 | 0.018977 | 0.373514 | 3,028 | 112 | 80 | 27.035714 | 0.780706 | 0.022787 | 0 | 0.673077 | 1 | 0 | 0.185047 | 0.007781 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.009615 | 0 | 0.038462 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 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 | 6 |
a67bede3ad18972acb4cd05ddff127fb2e7201ed | 47 | py | Python | frappe_notification/frappe_notification/controllers/channels/__init__.py | leam-tech/frappe_notification | 79e40f2c541d86d714a0b8d48b87f32b2f85076a | [
"MIT"
] | null | null | null | frappe_notification/frappe_notification/controllers/channels/__init__.py | leam-tech/frappe_notification | 79e40f2c541d86d714a0b8d48b87f32b2f85076a | [
"MIT"
] | null | null | null | frappe_notification/frappe_notification/controllers/channels/__init__.py | leam-tech/frappe_notification | 79e40f2c541d86d714a0b8d48b87f32b2f85076a | [
"MIT"
] | null | null | null | from .get_channels import get_channels # noqa
| 23.5 | 46 | 0.808511 | 7 | 47 | 5.142857 | 0.714286 | 0.611111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148936 | 47 | 1 | 47 | 47 | 0.9 | 0.085106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
a6867508e805dfec3fae917e2cff9bdeea3af8a2 | 30 | py | Python | my_core/auth/__init__.py | Xerrex/ak-Blog | 8e1c3ad5ce0c1a542be1a7361e3b8ac4d72ba76b | [
"MIT"
] | null | null | null | my_core/auth/__init__.py | Xerrex/ak-Blog | 8e1c3ad5ce0c1a542be1a7361e3b8ac4d72ba76b | [
"MIT"
] | 3 | 2021-06-01T23:50:16.000Z | 2021-07-06T16:17:00.000Z | my_core/auth/__init__.py | Xerrex/ak-Blog | 8e1c3ad5ce0c1a542be1a7361e3b8ac4d72ba76b | [
"MIT"
] | null | null | null | from .routes import auth_bp
| 7.5 | 27 | 0.766667 | 5 | 30 | 4.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 30 | 3 | 28 | 10 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
470a49223903802390e1050772963eb4c62209e5 | 40,946 | py | Python | iter8_analytics/api/analytics/endpoints/examples.py | mtoslalibu/iter8-analytics | d66ad1b0533edc4f4471890c08cb9ea8002c70c7 | [
"Apache-2.0"
] | null | null | null | iter8_analytics/api/analytics/endpoints/examples.py | mtoslalibu/iter8-analytics | d66ad1b0533edc4f4471890c08cb9ea8002c70c7 | [
"Apache-2.0"
] | null | null | null | iter8_analytics/api/analytics/endpoints/examples.py | mtoslalibu/iter8-analytics | d66ad1b0533edc4f4471890c08cb9ea8002c70c7 | [
"Apache-2.0"
] | null | null | null | import copy
eip_example = {
'start_time': "2020-04-03T12:55:50.568Z",
'iteration_number': 1,
'service_name': "reviews",
"metric_specs": {
"counter_metrics": [
{
"id": "iter8_request_count",
"query_template": "sum(increase(istio_requests_total{reporter='source'}[$interval])) by ($version_labels)"
},
{
"id": "iter8_total_latency",
"query_template": "sum(increase(istio_request_duration_milliseconds_sum{reporter='source'}[$interval])) by ($version_labels)"
},
{
"id": "iter8_error_count",
"query_template": "sum(increase(istio_requests_total{response_code=~'5..',reporter='source'}[$interval])) by ($version_labels)",
"preferred_direction": "lower"
},
{
"id": "conversion_count",
"query_template": "sum(increase(newsletter_signups[$interval])) by ($version_labels)"
},
],
"ratio_metrics": [
{
"id": "iter8_mean_latency",
"numerator": "iter8_total_latency",
"denominator": "iter8_request_count",
"preferred_direction": "lower",
"zero_to_one": False
},
{
"id": "iter8_error_rate",
"numerator": "iter8_error_count",
"denominator": "iter8_request_count",
"preferred_direction": "lower",
"zero_to_one": True
},
{
"id": "conversion_rate",
"numerator": "conversion_count",
"denominator": "iter8_request_count",
"preferred_direction": "higher",
"zero_to_one": True
}
]},
"criteria": [
{
"id": "0",
"metric_id": "iter8_mean_latency",
"is_reward": False,
"threshold": {
"type": "absolute",
"value": 25
}
}
],
"baseline": {
"id": "reviews_base",
"version_labels": {
'destination_service_namespace': "default",
'destination_workload': "reviews-v1"
}
},
"candidates": [
{
"id": "reviews_candidate",
"version_labels": {
'destination_service_namespace': "default",
'destination_workload': "reviews-v2"
}
}
]
}
ar_example = {
'timestamp': "2020-04-03T12:59:50.568Z",
'baseline_assessment': {
"id": "reviews_base",
"request_count": 500,
"win_probability": 0.1,
"criterion_assessments": [
{
"id": "0",
"metric_id": "iter8_mean_latency",
"statistics": {
"value": 0.005,
"ratio_statistics": {
"improvement_over_baseline": {
'lower': 2.3,
'upper': 5.0
},
"probability_of_beating_baseline": .82,
"probability_of_being_best_version": 0.1,
"credible_interval": {
'lower': 22,
'upper': 28
}
}
},
"threshold_assessment": {
"threshold_breached": False,
"probability_of_satisfying_threshold": 0.8
}
}
]
},
'candidate_assessments': [
{
"id": "reviews_candidate",
"request_count": 1500,
"win_probability": 0.11,
"criterion_assessments": [
{
"id": "0",
"metric_id": "iter8_mean_latency",
"statistics": {
"value": 0.1005,
"ratio_statistics": {
"sample_size": 1500,
"improvement_over_baseline": {
'lower': 12.3,
'upper': 15.0
},
"probability_of_beating_baseline": .182,
"probability_of_being_best_version": 0.1,
"credible_interval": {
'lower': 122,
'upper': 128
}
}
},
"threshold_assessment": {
"threshold_breached": True,
"probability_of_satisfying_threshold": 0.180
}
}
]
}
],
'traffic_split_recommendation': {
'unif': {
'reviews_base': 50.0,
'reviews_candidate': 50.0
}
},
'winner_assessment': {
'winning_version_found': False
},
'status': ["all_ok"]
}
reviews_example = {
"start_time": "2020-05-17T12:55:50.568Z",
"service_name": "reviews",
"metric_specs": {
"counter_metrics": [
{
"id": "iter8_request_count",
"query_template": "sum(increase(istio_requests_total{reporter='source'}[$interval])) by ($version_labels)"
},
{
"id": "iter8_total_latency",
"query_template": "sum(increase(istio_request_duration_milliseconds_sum{reporter='source'}[$interval])) by ($version_labels)"
},
{
"id": "iter8_error_count",
"query_template": "sum(increase(istio_requests_total{response_code=~'5..',reporter='source'}[$interval])) by ($version_labels)",
"preferred_direction": "lower"
}
],
"ratio_metrics": [
{
"id": "iter8_mean_latency",
"numerator": "iter8_total_latency",
"denominator": "iter8_request_count",
"preferred_direction": "lower"
}
]
},
"criteria": [
{
"id": "0",
"metric_id": "iter8_error_count",
"is_reward": False,
"threshold": {
"type": "absolute",
"value": 25
}
},
{
"id": "1",
"metric_id": "iter8_mean_latency",
"is_reward": False,
"threshold": {
"type": "absolute",
"value": 500
}
}
],
"baseline": {
"id": "reviews_base",
"version_labels": {
"destination_service_namespace": "bookinfo-iter8",
"destination_workload": "reviews-v2"
}
},
"candidates": [
{
"id": "reviews_candidate",
"version_labels": {
"destination_service_namespace": "bookinfo-iter8",
"destination_workload": "reviews-v3"
}
}
]
}
last_state = {
"aggregated_counter_metrics": {
"reviews_candidate": {
"iter8_request_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
},
"iter8_error_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
},
"iter8_total_latency": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
}
},
"reviews_base": {
"iter8_request_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
},
"iter8_error_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
},
"iter8_total_latency": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
}
}
},
"aggregated_ratio_metrics": {
"reviews_candidate": {
"iter8_mean_latency": {
"value": None,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
}
},
"reviews_base": {
"iter8_mean_latency": {
"value": None,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
}
}
},
"ratio_max_mins": {
"iter8_mean_latency": {
"minimum": None,
"maximum": None
}
}
}
partial_last_state = {
"aggregated_counter_metrics": {
"reviews_candidate": {
"iter8_request_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
},
"iter8_error_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
}
},
"reviews_base": {
"iter8_request_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
},
"iter8_error_count": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
},
"iter8_total_latency": {
"value": 0,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
}
}
},
"aggregated_ratio_metrics": {
"reviews_candidate": {
"iter8_mean_latency": {
"value": None,
"timestamp": "2020-05-19T11:41:51.474487+00:00",
"status": "no versions in prometheus response"
}
}
},
"ratio_max_mins": {
"iter8_mean_latency": {
"minimum": None,
"maximum": None
}
}
}
last_state_with_ratio_max_mins = copy.deepcopy(last_state)
last_state_with_ratio_max_mins["ratio_max_mins"] = {
"iter8_mean_latency": {
"minimum": 1.5,
"maximum": 20
}
}
reviews_example_with_last_state = {
"start_time": "2020-05-17T12:55:50.568Z",
"service_name": "reviews",
"metric_specs": {
"counter_metrics": [
{
"id": "iter8_request_count",
"query_template": "sum(increase(istio_requests_total{reporter='source'}[$interval])) by ($version_labels)"
},
{
"id": "iter8_total_latency",
"query_template": "sum(increase(istio_request_duration_milliseconds_sum{reporter='source'}[$interval])) by ($version_labels)"
},
{
"id": "iter8_error_count",
"query_template": "sum(increase(istio_requests_total{response_code=~'5..',reporter='source'}[$interval])) by ($version_labels)",
"preferred_direction": "lower"
}
],
"ratio_metrics": [
{
"id": "iter8_mean_latency",
"numerator": "iter8_total_latency",
"denominator": "iter8_request_count",
"preferred_direction": "lower"
}
]
},
"criteria": [
{
"id": "0",
"metric_id": "iter8_error_count",
"is_reward": False,
"threshold": {
"type": "absolute",
"value": 25
}
},
{
"id": "1",
"metric_id": "iter8_mean_latency",
"is_reward": False,
"threshold": {
"type": "absolute",
"value": 500
}
}
],
"baseline": {
"id": "reviews_base",
"version_labels": {
"destination_service_namespace": "bookinfo-iter8",
"destination_workload": "reviews-v2"
}
},
"candidates": [
{
"id": "reviews_candidate",
"version_labels": {
"destination_service_namespace": "bookinfo-iter8",
"destination_workload": "reviews-v3"
}
}
],
"last_state": copy.deepcopy(last_state)
}
reviews_example_with_partial_last_state = copy.deepcopy(
reviews_example_with_last_state)
reviews_example_with_partial_last_state["last_state"] = copy.deepcopy(
partial_last_state)
reviews_example_with_ratio_max_mins = copy.deepcopy(
reviews_example_with_last_state)
reviews_example_with_ratio_max_mins["last_state"] = copy.deepcopy(
last_state_with_ratio_max_mins)
eip_with_invalid_ratio = copy.deepcopy(reviews_example_with_ratio_max_mins)
eip_with_invalid_ratio["metric_specs"]["ratio_metrics"].append({
"id": "iter8_invalid_latency",
"numerator": "iter8_total_invalid_latency",
"denominator": "iter8_request_count",
"preferred_direction": "lower"
})
eip_with_invalid_ratio["criteria"].append({
"id": "2",
"metric_id": "iter8_invalid_latency",
"is_reward": False,
"threshold": {
"type": "absolute",
"value": 500
}
})
eip_with_unknown_metric_in_criterion = copy.deepcopy(
reviews_example_with_ratio_max_mins)
eip_with_unknown_metric_in_criterion["criteria"].append({
"id": "2",
"metric_id": "iter8_invalid_latency",
"is_reward": False,
"threshold": {
"type": "absolute",
"value": 500
}
})
eip_with_percentile = {
"name": "productpage-abn-test",
"start_time": "2020-07-17T20:05:02-04:00",
"service_name": "productpage",
"iteration_number": 1,
"metric_specs": {
"counter_metrics": [{
"name": "iter8_request_count",
"query_template": "sum(increase(istio_requests_total{reporter='source'}[$interval])) by ($version_labels)"
}, {
"name": "iter8_total_latency",
"query_template": "(sum(increase(istio_request_duration_milliseconds_sum{reporter='source'}[$interval])) by ($version_labels))"
}, {
"name": "iter8_error_count",
"preferred_direction": "lower",
"query_template": "sum(increase(istio_requests_total{response_code=~'5..',reporter='source'}[$interval])) by ($version_labels)"
}, {
"name": "books_purchased_total",
"preferred_direction": "higher",
"query_template": "sum(increase(number_of_books_purchased_total{}[$interval])) by ($version_labels)"
}, {
"name": "500_ms_latency_count",
"preferred_direction": "higher",
"query_template": "(sum(increase(istio_request_duration_milliseconds_bucket{le='500',reporter='source'}[$interval])) by ($version_labels))"
}],
"ratio_metrics": [{
"name": "iter8_mean_latency",
"numerator": "iter8_total_latency",
"denominator": "iter8_request_count",
"preferred_direction": "lower"
}, {
"name": "iter8_error_rate",
"numerator": "iter8_error_count",
"denominator": "iter8_request_count",
"preferred_direction": "lower",
"zero_to_one": True
}, {
"name": "mean_books_purchased",
"numerator": "books_purchased_total",
"denominator": "iter8_request_count",
"preferred_direction": "higher"
}, {
"name": "500_ms_latency_percentile",
"numerator": "500_ms_latency_count",
"denominator": "iter8_request_count",
"preferred_direction": "higher",
"zero_to_one": True
}]
},
"criteria": [{
"id": "0",
"metric_id": "500_ms_latency_percentile",
"is_reward": False,
"threshold": {
"threshold_type": "absolute",
"value": 0.99
}
}, {
"id": "1",
"metric_id": "iter8_error_rate",
"is_reward": False,
"threshold": {
"threshold_type": "absolute",
"value": 0.0001
}
}],
"baseline": {
"id": "productpage-v1",
"version_labels": {
"destination_service_namespace": "kubecon-demo",
"destination_workload": "productpage-v1"
}
},
"candidates": [{
"id": "productpage-v2",
"version_labels": {
"destination_service_namespace": "kubecon-demo",
"destination_workload": "productpage-v2"
}
}, {
"id": "productpage-v3",
"version_labels": {
"destination_service_namespace": "kubecon-demo",
"destination_workload": "productpage-v3"
}
}],
"last_state": {},
"traffic_control": {
"max_increment": 2,
"strategy": "progressive"
}
}
reviews_example_without_request_count = copy.deepcopy(reviews_example)
del reviews_example_without_request_count["criteria"][1]
del reviews_example_without_request_count["metric_specs"]["counter_metrics"][0]
del reviews_example_without_request_count["metric_specs"]["ratio_metrics"][0]
eip_with_assessment = {
"name": "productpage-abn-test",
"start_time": "2020-07-20T17:19:13-04:00",
"service_name": "productpage",
"iteration_number": 17,
"metric_specs": {
"counter_metrics": [{
"name": "iter8_request_count",
"query_template": "sum(increase(istio_requests_total{reporter='source',job='istio-mesh'}[$interval])) by ($version_labels)"
}, {
"name": "iter8_total_latency",
"query_template": "(sum(increase(istio_request_duration_seconds_sum{reporter='source',job='istio-mesh'}[$interval])) by ($version_labels))*1000"
}, {
"name": "iter8_error_count",
"preferred_direction": "lower",
"query_template": "sum(increase(istio_requests_total{response_code=~'5..',reporter='source',job='istio-mesh'}[$interval])) by ($version_labels)"
}, {
"name": "books_purchased_total",
"query_template": "sum(increase(number_of_books_purchased_total{}[$interval])) by ($version_labels)"
}, {
"name": "le_500_ms_latency_request_count",
"query_template": "(sum(increase(istio_request_duration_seconds_bucket{le='0.5',reporter='source',job='istio-mesh'}[$interval])) by ($version_labels))"
}],
"ratio_metrics": [{
"name": "iter8_mean_latency",
"numerator": "iter8_total_latency",
"denominator": "iter8_request_count",
"preferred_direction": "lower"
}, {
"name": "iter8_error_rate",
"numerator": "iter8_error_count",
"denominator": "iter8_request_count",
"zero_to_one": True,
"preferred_direction": "lower"
}, {
"name": "mean_books_purchased",
"numerator": "books_purchased_total",
"denominator": "iter8_request_count",
"preferred_direction": "higher"
}, {
"name": "500_ms_latency_percentile",
"numerator": "le_500_ms_latency_request_count",
"denominator": "iter8_request_count",
"zero_to_one": True,
"preferred_direction": "higher"
}]
},
"criteria": [{
"id": "iter8_mean_latency",
"metric_id": "iter8_mean_latency",
"is_reward": False,
"threshold": {
"threshold_type": "absolute",
"value": 1500
}
}, {
"id": "iter8_error_rate",
"metric_id": "iter8_error_rate",
"is_reward": False,
"threshold": {
"threshold_type": "absolute",
"value": 0.05
}
}, {
"id": "500_ms_latency_percentile",
"metric_id": "500_ms_latency_percentile",
"is_reward": False,
"threshold": {
"threshold_type": "absolute",
"value": 0.9
}
}, {
"id": "mean_books_purchased",
"metric_id": "mean_books_purchased",
"is_reward": True
}],
"baseline": {
"id": "productpage-v1",
"version_labels": {
"destination_workload": "productpage-v1",
"destination_workload_namespace": "kubecon-demo"
}
},
"candidates": [{
"id": "productpage-v2",
"version_labels": {
"destination_workload": "productpage-v2",
"destination_workload_namespace": "kubecon-demo"
}
}, {
"id": "productpage-v3",
"version_labels": {
"destination_workload": "productpage-v3",
"destination_workload_namespace": "kubecon-demo"
}
}],
"last_state": {
"aggregated_counter_metrics": {
"productpage-v1": {
"books_purchased_total": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.001436+00:00",
"value": 2675.060869565217
},
"iter8_error_count": {
"status": "no versions in prometheus response",
"timestamp": "2020-07-20T21:25:00.726973+00:00",
"value": 0
},
"iter8_request_count": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.500394+00:00",
"value": 1100.9376796274955
},
"iter8_total_latency": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.608216+00:00",
"value": 116867.79877397961
},
"le_500_ms_latency_request_count": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.880245+00:00",
"value": 1066.2376477633036
}
},
"productpage-v2": {
"books_purchased_total": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.001436+00:00",
"value": 43495.340441392604
},
"iter8_error_count": {
"status": "no versions in prometheus response",
"timestamp": "2020-07-20T21:25:00.726973+00:00",
"value": 0
},
"iter8_request_count": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.500394+00:00",
"value": 1103.040681252753
},
"iter8_total_latency": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.608216+00:00",
"value": 1513982.9278989176
},
"le_500_ms_latency_request_count": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.880245+00:00",
"value": 270.2396902763801
}
},
"productpage-v3": {
"books_purchased_total": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.001436+00:00",
"value": 15931.255805285438
},
"iter8_error_count": {
"status": "no versions in prometheus response",
"timestamp": "2020-07-20T21:25:00.726973+00:00",
"value": 0
},
"iter8_request_count": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.500394+00:00",
"value": 1084.1133447970965
},
"iter8_total_latency": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.608216+00:00",
"value": 98910.32374279092
},
"le_500_ms_latency_request_count": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:00.880245+00:00",
"value": 1074.6497084334599
}
}
},
"aggregated_ratio_metrics": {
"productpage-v1": {
"500_ms_latency_percentile": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.488586+00:00",
"value": 0.9684813840907572
},
"iter8_error_rate": {
"status": "zeroed ratio",
"timestamp": "2020-07-20T21:25:01.342217+00:00",
"value": 0
},
"iter8_mean_latency": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.118267+00:00",
"value": 106.15296481951826
},
"mean_books_purchased": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.617785+00:00",
"value": 2.422820076378882
}
},
"productpage-v2": {
"500_ms_latency_percentile": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.488586+00:00",
"value": 0.24499521628654852
},
"iter8_error_rate": {
"status": "zeroed ratio",
"timestamp": "2020-07-20T21:25:01.342217+00:00",
"value": 0
},
"iter8_mean_latency": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.118267+00:00",
"value": 1372.5540260033258
},
"mean_books_purchased": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.617785+00:00",
"value": 39.38968647171404
}
},
"productpage-v3": {
"500_ms_latency_percentile": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.488586+00:00",
"value": 0.9912706209096545
},
"iter8_error_rate": {
"status": "zeroed ratio",
"timestamp": "2020-07-20T21:25:01.342217+00:00",
"value": 0
},
"iter8_mean_latency": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.118267+00:00",
"value": 91.23614631023943
},
"mean_books_purchased": {
"status": "all_ok",
"timestamp": "2020-07-20T21:25:01.617785+00:00",
"value": 14.679574964516965
}
}
},
"ratio_max_mins": {
"500_ms_latency_percentile": {
"maximum": 0.9912706209096545,
"minimum": 0.16666650018723458
},
"iter8_error_rate": {
"maximum": 0,
"minimum": 0
},
"iter8_mean_latency": {
"maximum": 1507.8847318570406,
"minimum": 91.23614631023943
},
"mean_books_purchased": {
"maximum": 39.693079869958254,
"minimum": 2.2894643119744784
}
}
},
"traffic_control": {
"max_increment": 25,
"strategy": "progressive"
}
}
eip_with_relative_assessments = {
"name": "productpage-abn-test",
"start_time": "2020-07-20T17:19:13-04:00",
"service_name": "productpage",
"iteration_number": 10,
"metric_specs": {
"counter_metrics": [{
"name": "iter8_request_count",
"query_template": "sum(increase(istio_requests_total{reporter='source',job='istio-mesh'}[$interval])) by ($version_labels)"
}, {
"name": "iter8_total_latency",
"query_template": "(sum(increase(istio_request_duration_seconds_sum{reporter='source',job='istio-mesh'}[$interval])) by ($version_labels))*1000"
}, {
"name": "iter8_error_count",
"preferred_direction": "lower",
"query_template": "sum(increase(istio_requests_total{response_code=~'5..',reporter='source',job='istio-mesh'}[$interval])) by ($version_labels)"
}, {
"name": "books_purchased_total",
"query_template": "sum(increase(number_of_books_purchased_total{}[$interval])) by ($version_labels)"
}, {
"name": "le_500_ms_latency_request_count",
"query_template": "(sum(increase(istio_request_duration_seconds_bucket{le='0.5',reporter='source',job='istio-mesh'}[$interval])) by ($version_labels))"
}, {
"name": "le_inf_latency_request_count",
"query_template": "(sum(increase(istio_request_duration_seconds_bucket{le='+Inf',reporter='source',job='istio-mesh'}[$interval])) by ($version_labels))"
}],
"ratio_metrics": [{
"name": "iter8_mean_latency",
"numerator": "iter8_total_latency",
"denominator": "iter8_request_count",
"preferred_direction": "lower"
}, {
"name": "iter8_error_rate",
"numerator": "iter8_error_count",
"denominator": "iter8_request_count",
"zero_to_one": True,
"preferred_direction": "lower"
}, {
"name": "mean_books_purchased",
"numerator": "books_purchased_total",
"denominator": "iter8_request_count",
"preferred_direction": "higher"
}, {
"name": "500_ms_latency_percentile",
"numerator": "le_500_ms_latency_request_count",
"denominator": "le_inf_latency_request_count",
"zero_to_one": True,
"preferred_direction": "higher"
}]
},
"criteria": [{
"id": "0",
"metric_id": "iter8_mean_latency",
"is_reward": False,
"threshold": {
"threshold_type": "relative",
"value": 1.6
}
}, {
"id": "1",
"metric_id": "iter8_error_rate",
"is_reward": False,
"threshold": {
"threshold_type": "absolute",
"value": 0.05
}
}, {
"id": "2",
"metric_id": "500_ms_latency_percentile",
"is_reward": False,
"threshold": {
"threshold_type": "absolute",
"value": 0.9
}
}, {
"id": "3",
"metric_id": "mean_books_purchased",
"is_reward": True
}],
"baseline": {
"id": "productpage-v1",
"version_labels": {
"destination_workload": "productpage-v1",
"destination_workload_namespace": "kubecon-demo"
}
},
"candidates": [{
"id": "productpage-v2",
"version_labels": {
"destination_workload": "productpage-v2",
"destination_workload_namespace": "kubecon-demo"
}
}, {
"id": "productpage-v3",
"version_labels": {
"destination_workload": "productpage-v3",
"destination_workload_namespace": "kubecon-demo"
}
}],
"last_state": {
"aggregated_counter_metrics": {
"productpage-v2": {
"iter8_request_count": {
"value": 182.72228233137372,
"timestamp": "2020-07-24T19:06:46.480713+00:00",
"status": "all_ok"
},
"iter8_total_latency": {
"value": 46004.62497939324,
"timestamp": "2020-07-24T19:06:46.651545+00:00",
"status": "all_ok"
},
"iter8_error_count": {
"value": 0.0,
"timestamp": "2020-07-24T19:06:46.761778+00:00",
"status": "no versions in prometheus response"
},
"le_500_ms_latency_request_count": {
"value": 142.99993165455655,
"timestamp": "2020-07-24T19:06:46.866789+00:00",
"status": "all_ok"
},
"le_inf_latency_request_count": {
"value": 183.0447820092769,
"timestamp": "2020-07-24T19:06:46.970240+00:00",
"status": "all_ok"
},
"books_purchased_total": {
"value": 7574.673001453327,
"timestamp": "2020-07-24T19:06:47.083212+00:00",
"status": "all_ok"
}
},
"productpage-v3": {
"iter8_request_count": {
"value": 250.8062866067991,
"timestamp": "2020-07-24T19:06:46.480713+00:00",
"status": "all_ok"
},
"iter8_total_latency": {
"value": 8916.643818970602,
"timestamp": "2020-07-24T19:06:46.651545+00:00",
"status": "all_ok"
},
"iter8_error_count": {
"value": 0.0,
"timestamp": "2020-07-24T19:06:46.761778+00:00",
"status": "no versions in prometheus response"
},
"le_500_ms_latency_request_count": {
"value": 251.24778563480407,
"timestamp": "2020-07-24T19:06:46.866789+00:00",
"status": "all_ok"
},
"le_inf_latency_request_count": {
"value": 251.37112870529108,
"timestamp": "2020-07-24T19:06:46.970240+00:00",
"status": "all_ok"
},
"books_purchased_total": {
"value": 3749.5571026679177,
"timestamp": "2020-07-24T19:06:47.083212+00:00",
"status": "all_ok"
}
},
"productpage-v1": {
"iter8_request_count": {
"value": 297.23328959973264,
"timestamp": "2020-07-24T19:06:46.480713+00:00",
"status": "all_ok"
},
"iter8_total_latency": {
"value": 9922.352942341287,
"timestamp": "2020-07-24T19:06:46.651545+00:00",
"status": "all_ok"
},
"iter8_error_count": {
"value": 0.0,
"timestamp": "2020-07-24T19:06:46.761778+00:00",
"status": "no versions in prometheus response"
},
"le_500_ms_latency_request_count": {
"value": 297.23328959973264,
"timestamp": "2020-07-24T19:06:46.866789+00:00",
"status": "all_ok"
},
"le_inf_latency_request_count": {
"value": 297.23328959973264,
"timestamp": "2020-07-24T19:06:46.970240+00:00",
"status": "all_ok"
},
"books_purchased_total": {
"value": 765.8520108620773,
"timestamp": "2020-07-24T19:06:47.083212+00:00",
"status": "all_ok"
}
}
},
"aggregated_ratio_metrics": {
"productpage-v2": {
"iter8_mean_latency": {
"value": 251.62472741382498,
"timestamp": "2020-07-24T19:06:47.199408+00:00",
"status": "all_ok"
},
"iter8_error_rate": {
"value": 0.0,
"timestamp": "2020-07-24T19:06:47.316578+00:00",
"status": "zeroed ratio"
},
"500_ms_latency_percentile": {
"value": 0.7815247494177242,
"timestamp": "2020-07-24T19:06:47.425152+00:00",
"status": "all_ok"
},
"mean_books_purchased": {
"value": 41.262452494397415,
"timestamp": "2020-07-24T19:06:47.535450+00:00",
"status": "all_ok"
}
},
"productpage-v3": {
"iter8_mean_latency": {
"value": 35.5249257408403,
"timestamp": "2020-07-24T19:06:47.199408+00:00",
"status": "all_ok"
},
"iter8_error_rate": {
"value": 0.0,
"timestamp": "2020-07-24T19:06:47.316578+00:00",
"status": "zeroed ratio"
},
"500_ms_latency_percentile": {
"value": 1.0,
"timestamp": "2020-07-24T19:06:47.425152+00:00",
"status": "all_ok"
},
"mean_books_purchased": {
"value": 14.906850702730225,
"timestamp": "2020-07-24T19:06:47.535450+00:00",
"status": "all_ok"
}
},
"productpage-v1": {
"iter8_mean_latency": {
"value": 33.382374348792354,
"timestamp": "2020-07-24T19:06:47.199408+00:00",
"status": "all_ok"
},
"iter8_error_rate": {
"value": 0.0,
"timestamp": "2020-07-24T19:06:47.316578+00:00",
"status": "zeroed ratio"
},
"500_ms_latency_percentile": {
"value": 1.0,
"timestamp": "2020-07-24T19:06:47.425152+00:00",
"status": "all_ok"
},
"mean_books_purchased": {
"value": 2.565821648611445,
"timestamp": "2020-07-24T19:06:47.535450+00:00",
"status": "all_ok"
}
}
},
"ratio_max_mins": {
"iter8_mean_latency": {
"minimum": 26.50646096293112,
"maximum": 251.62472741382498
},
"iter8_error_rate": {
"minimum": 0.0,
"maximum": 0.0
},
"500_ms_latency_percentile": {
"minimum": 0.7733402047764519,
"maximum": 1.0
},
"mean_books_purchased": {
"minimum": 0.0,
"maximum": 70.77637942479375
}
},
"traffic_split_recommendation": {
"progressive": {
"productpage-v2": 32,
"productpage-v3": 35,
"productpage-v1": 33
},
"top_2": {
"productpage-v2": 34,
"productpage-v3": 33,
"productpage-v1": 33
},
"uniform": {
"productpage-v2": 34,
"productpage-v3": 33,
"productpage-v1": 33
},
"top_1_lts": {
"productpage-v2": 32,
"productpage-v3": 35,
"productpage-v1": 33
},
"top_2_lts": {
"productpage-v2": 34,
"productpage-v3": 33,
"productpage-v1": 33
},
"exp3": {
"productpage-v2": 34,
"productpage-v3": 33,
"productpage-v1": 33
}
}
},
"traffic_control": {
"max_increment": 25,
"strategy": "progressive"
}
}
| 35.917544 | 164 | 0.46703 | 3,460 | 40,946 | 5.234393 | 0.088439 | 0.051681 | 0.047209 | 0.033129 | 0.865662 | 0.848766 | 0.835404 | 0.818784 | 0.792944 | 0.772238 | 0 | 0.130053 | 0.395887 | 40,946 | 1,139 | 165 | 35.949078 | 0.602118 | 0 | 0 | 0.635797 | 0 | 0.008905 | 0.44207 | 0.166952 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.00089 | 0 | 0.00089 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
470e96ac500ef0ae4dfff76e6d39cd38f079527f | 7,174 | py | Python | VMIwithDRL/src/implementation/optimizer/AllocationOptimizer.py | juan-carvajal/VMIwithDRL | d47f9d82d69fc02604c23a55e67223f28643fcef | [
"MIT"
] | null | null | null | VMIwithDRL/src/implementation/optimizer/AllocationOptimizer.py | juan-carvajal/VMIwithDRL | d47f9d82d69fc02604c23a55e67223f28643fcef | [
"MIT"
] | null | null | null | VMIwithDRL/src/implementation/optimizer/AllocationOptimizer.py | juan-carvajal/VMIwithDRL | d47f9d82d69fc02604c23a55e67223f28643fcef | [
"MIT"
] | null | null | null | # Import PuLP modeler functions
from pulp import *
import numpy as np
class AllocationOptimizer():
def __init__(self, II, A, D, CV, CF,R,H):
self.II = II
self.A = A
self.D = D
self.CV = CV
self.CF = CF
self.M = 1000000
self.R=list(range(R))
self.H=list(range(H))
def allocate(self):
# self.R = list(range(5))
# H = list(range(4))
RX = list(range(len(self.R)))
prob = LpProblem("LPOptimizationProblem", LpMinimize)
x = pulp.LpVariable.matrix("x", (self.H, RX), 0, None, LpInteger)
I0 = pulp.LpVariable.dicts("I0", self.H, 0, None, LpInteger)
F = pulp.LpVariable.dicts("Fh", self.H, 0, None, LpInteger)
YI0 = pulp.LpVariable.dicts("YI0h", self.H, 0, 1, LpInteger)
YF = pulp.LpVariable.dicts("YFh", self.H, 0, 1, LpInteger)
cov = lpSum([I0[h] * self.CV for (h) in self.H])
cof = lpSum([F[h] * self.CF for (h) in self.H])
# The objective function is added to 'prob' first
prob += cov + cof
for h in self.H:
prob += -self.II[h][1] - x[h][0] + self.D[h] <= self.M * YI0[h]
for h in self.H:
prob += self.II[h][1] + x[h][0] - self.D[h] <= self.M * (1 - YI0[h])
for h in self.H:
prob += I0[h] >= 0
for h in self.H:
prob += I0[h] >= self.II[h][1] + x[h][0] - self.D[h]
for h in self.H:
prob += I0[h] <= self.M * (1 - YI0[h])
for h in self.H:
prob += I0[h] <= self.II[h][1] + x[h][0] - self.D[h] + self.M * YI0[h]
########################################
for h in self.H:
prob += -self.D[h] + lpSum([self.II[h][r] for (r) in self.R]) + lpSum([x[h][r] for (r) in self.R]) <= self.M * YF[h]
for h in self.H:
prob += self.D[h] - lpSum([self.II[h][r] for (r) in self.R]) - lpSum([x[h][r] for (r) in self.R]) <= self.M * (1 - YF[h])
for h in self.H:
prob += F[h] >= 0
for h in self.H:
prob += F[h] >= self.D[h] - lpSum([self.II[h][r] for (r) in self.R]) - lpSum([x[h][r] for (r) in self.R]), "Const" + str(h)
for h in self.H:
prob += F[h] <= self.M * (1 - YF[h])
for h in self.H:
prob += F[h] <= self.D[h] - lpSum([self.II[h][r] for (r) in self.R]) - lpSum([x[h][r] for (r) in self.R]) + self.M * YF[h]
for h in self.H:
prob += F[h] <= 0.25 * lpSum([F[h1] for (h1) in self.H])
for r in self.R:
print(r , self.A[r])
print(type(self.A[r] >= lpSum([x[h][r] for (h) in self.H])))
prob += self.A[r] >= lpSum([x[h][r] for (h) in self.H])
prob += (lpSum([self.II[0][r] for (r) in self.R]) + lpSum([x[0][r] for (r) in self.R])) / self.D[0] == (
lpSum([self.II[1][r] for (r) in self.R]) + lpSum([x[1][r] for (r) in self.R])) / self.D[1]
prob += (lpSum([self.II[1][r] for (r) in self.R]) + lpSum([x[1][r] for (r) in self.R])) / self.D[1] == (
lpSum([self.II[2][r] for (r) in self.R]) + lpSum([x[2][r] for (r) in self.R])) / self.D[2]
prob += (lpSum([self.II[2][r] for (r) in self.R]) + lpSum([x[2][r] for (r) in self.R])) / self.D[2] <= (
lpSum([self.II[3][r] for (r) in self.R]) + lpSum([x[3][r] for (r) in self.R])) / self.D[3]
# The problem data is written to an .lp file
prob.writeLP("LPPooblem.lp")
# The problem is solved using PuLP's choice of Solver
prob.solve()
# The status of the solution is printed to the screen
#print("Status:", LpStatus[prob.status])
# for r in self.R:
# for h in self.H:
# print ("x" + str(h) + str(r), x[h][r].varValue)
# The optimised objective function value is printed to the screen
#print ("costo total = ", value(prob.objective))
#print(type(x[0][0]))
return x
# Create the 'prob' variable to contain the problem data
# R = list(range(5))
# H = list(range(4))
# RX = list(range(5))
#
# II = [[0, 0, 0, 0],
# [2, 1, 1, 3],
# [0, 0, 2, 5],
# [3, 3, 2, 1],
# [0, 3, 5, 1]]
#
#
# D = [5,10,15,20]
#
# A = [6,7,8,9,10]
#
# M=1000000;
#
# CF = 100
# CV = 10
#
# prob = LpProblem("LPOptimizationProblem",LpMinimize)
#
# x = pulp.LpVariable.matrix("x", (RX,H),0,None,LpInteger)
# I0 = pulp.LpVariable.dicts("I0", H,0,None,LpInteger)
# F = pulp.LpVariable.dicts("Fh", H,0,None,LpInteger)
# YI0 = pulp.LpVariable.dicts("YI0h", H,0,1,LpInteger)
# YF = pulp.LpVariable.dicts("YFh", H,0,1,LpInteger)
#
# cov = lpSum([I0[h]*CV for (h) in H])
# cof = lpSum([F[h]*CF for (h) in H])
#
# # The objective function is added to 'prob' first
# prob += cov+cof
#
# for h in H:
# prob += -II[1][h] -x[0][h] +D[h]<=M*YI0[h]
#
# for h in H:
# prob += II[1][h]+x[0][h]-D[h]<=M*(1-YI0[h])
#
# for h in H:
# prob += I0[h]>=0
#
# for h in H:
# prob += I0[h]>= II[1][h]+x[0][h]-D[h]
#
# for h in H:
# prob += I0[h]<= M*(1-YI0[h])
#
# for h in H:
# prob += I0[h]<= II[1][h]+x[0][h]-D[h]+M*YI0[h]
#
# ########################################
#
# for h in H:
# prob += -D[h] + lpSum([II[r][h] for (r) in R]) + lpSum([x[r][h] for (r) in R]) <= M*YF[h]
#
# for h in H:
# prob += D[h] - lpSum([II[r][h] for (r) in R]) - lpSum([x[r][h] for (r) in R])<= M*(1-YF[h])
#
# for h in H:
# prob += F[h]>=0
#
# for h in H:
# prob += F[h]>= D[h] - lpSum([II[r][h] for (r) in R]) - lpSum([x[r][h] for (r) in R]),"Const" + str(h)
#
# for h in H:
# prob += F[h]<= M*(1-YF[h])
#
# for h in H:
# prob += F[h]<= D[h] - lpSum([II[r][h] for (r) in R]) - lpSum([x[r][h] for (r) in R]) + M*YF[h]
#
# for h in H:
# prob += F[h]<= 0.25*lpSum([F[h1] for (h1) in H])
#
# for r in R:
# prob += A[r] == lpSum([x[r][h] for (h) in H])
#
#
#
# prob += (lpSum([II[r][0] for (r) in R])+lpSum([x[r][0] for (r) in R]))/D[0] == (lpSum([II[r][1] for (r) in R])+lpSum([x[r][1] for (r) in R]))/D[1]
# prob += (lpSum([II[r][1] for (r) in R])+lpSum([x[r][1] for (r) in R]))/D[1] == (lpSum([II[r][2] for (r) in R])+lpSum([x[r][2] for (r) in R]))/D[2]
# prob += (lpSum([II[r][2] for (r) in R])+lpSum([x[r][2] for (r) in R]))/D[2] <= (lpSum([II[r][3] for (r) in R])+lpSum([x[r][3] for (r) in R]))/D[3]
#
#
# # The problem data is written to an .lp file
# prob.writeLP("LPPooblem.lp")
#
# # The problem is solved using PuLP's choice of Solver
# prob.solve()
#
# # The status of the solution is printed to the screen
# print ("Status:", LpStatus[prob.status])
#
# # Each of the variables is printed with it's resolved optimum value
#
# for r in R:
# for h in H:
# print ("x" + str(r) + str(h), x[r][h].varValue)
#
# # The optimised objective function value is printed to the screen
# print ("costo total = ", value(prob.objective))
# II = [[0, 0, 0, 0],
# [2, 1, 1, 3],
# [0, 0, 2, 5],
# [3, 3, 2, 1],
# [0, 3, 5, 1]]
II =[[0,2,0,3,0],[0,1,0,3,3],[0,1,2,2,5],[0,3,5,1,1]]
D = [5,10,15,20]
A = [6,7,8,9,10]
M=1000000;
CF = 100
CV = 10
R=5
H=4
a = AllocationOptimizer(II,A,D,CV,CF,R,H)
print(a.allocate()) | 30.922414 | 148 | 0.484946 | 1,341 | 7,174 | 2.59135 | 0.082774 | 0.050647 | 0.075971 | 0.063309 | 0.843741 | 0.818417 | 0.803453 | 0.783885 | 0.721151 | 0.617554 | 0 | 0.045845 | 0.270282 | 7,174 | 232 | 149 | 30.922414 | 0.617956 | 0.455394 | 0 | 0.180556 | 0 | 0 | 0.013517 | 0.005677 | 0 | 0 | 0 | 0 | 0 | 1 | 0.027778 | false | 0 | 0.027778 | 0 | 0.083333 | 0.041667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
5b30a508ea22374794ead405926cfa89f2d5ba61 | 116 | py | Python | cqbot/pojo/__init__.py | Wzp-2008/CQBot | f9be2c290573adafa24650f5502de89aa315b306 | [
"MIT"
] | null | null | null | cqbot/pojo/__init__.py | Wzp-2008/CQBot | f9be2c290573adafa24650f5502de89aa315b306 | [
"MIT"
] | null | null | null | cqbot/pojo/__init__.py | Wzp-2008/CQBot | f9be2c290573adafa24650f5502de89aa315b306 | [
"MIT"
] | null | null | null | from .Command import *
from .User import *
from .Message import *
from .Errors import *
from .ReactionInfo import *
| 19.333333 | 27 | 0.741379 | 15 | 116 | 5.733333 | 0.466667 | 0.465116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172414 | 116 | 5 | 28 | 23.2 | 0.895833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
5b62dacf230a43265660ebc8448aef97950a41df | 372 | py | Python | patient/mysite/patients/utils.py | easycui/CancerPatientData | d461bbd805326e6acb9a05efaf15089ba4485d91 | [
"MIT"
] | null | null | null | patient/mysite/patients/utils.py | easycui/CancerPatientData | d461bbd805326e6acb9a05efaf15089ba4485d91 | [
"MIT"
] | null | null | null | patient/mysite/patients/utils.py | easycui/CancerPatientData | d461bbd805326e6acb9a05efaf15089ba4485d91 | [
"MIT"
] | null | null | null | def condition():
return ['min_PSA','max_PSA','min_prostate_vol','max_prostate_vol','min_lesion_size','max_lesion_size',
'min_sector','max_sector','min_PIRADS_score','max_PIRADS_score','min_GLEASON_score','max_GLEASON_score']
def attrs():
return ['patient_ID','PSA','prostate_vol',
'lesion_size','sector','PIRADS_score','GLEASON_score'] | 53.142857 | 120 | 0.701613 | 50 | 372 | 4.72 | 0.34 | 0.139831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123656 | 372 | 7 | 121 | 53.142857 | 0.723926 | 0 | 0 | 0 | 0 | 0 | 0.613941 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0 | 0.333333 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
5b7e7ee1536240d6aca7b0a0ba57f2731b45186e | 61,448 | py | Python | PyCommon/modules/Simulator/hpLCPSimul2.py | hpgit/HumanFoot | f9a1a341b7c43747bddcd5584b8c98a0d1ac2973 | [
"Apache-2.0"
] | null | null | null | PyCommon/modules/Simulator/hpLCPSimul2.py | hpgit/HumanFoot | f9a1a341b7c43747bddcd5584b8c98a0d1ac2973 | [
"Apache-2.0"
] | null | null | null | PyCommon/modules/Simulator/hpLCPSimul2.py | hpgit/HumanFoot | f9a1a341b7c43747bddcd5584b8c98a0d1ac2973 | [
"Apache-2.0"
] | null | null | null | # import Optimization.csLCPLemkeSolver as lcp
# import Optimization.csLCPDantzigSolver as lcpD
from cvxopt import matrix as cvxMatrix
from cvxopt import solvers as cvxSolvers
# from openopt import LCP as openLCP
from PyCommon.modules.ArticulatedBody import ysJacobian as yjc
from PyCommon.modules.Util import ysPythonEx as ype
from PyCommon.modules.Math import mmMath as mm
from PyCommon.modules.VirtualPhysics import LieGroup as VPL
import numpy as np
import numpy.linalg as npl
import math
# import scipy.optimize as spopt
from PyCommon.modules.Optimization import csQPOASES as qpos
import time
from copy import deepcopy
# import cvxpy as cvx
# for hinting
from PyCommon.modules.Motion import ysMotion as ym
from PyCommon.modules.Simulator import csVpModel_py as cvp
from PyCommon.modules.Simulator import csVpWorld_py as cvw
def makeFrictionCone(skeleton, world, model, bodyIDsToCheck, numFrictionBases):
"""
:param skeleton: ym.JointSkeleton
:param world: cvw.VpWorld
:param model: cvp.VpControlModel
:param bodyIDsToCheck: list[int]
:param numFrictionBases: int
:return:
"""
cVpBodyIds, cPositions, cPositionsLocal, cVelocities = world.getContactPoints(bodyIDsToCheck)
N = None
D = None
E = None
cNum = len(cVpBodyIds)
if cNum == 0:
return len(cVpBodyIds), cVpBodyIds, cPositions, cPositionsLocal, cVelocities, None, None, None, None, None
d = [None]*numFrictionBases
DOFs = model.getDOFs()
Jic = yjc.makeEmptyJacobian(DOFs, 1)
jointPositions = model.getJointPositionsGlobal()
jointPositions[0] = model.getBodyPositionGlobal(0)
# jointAxeses = model.getDOFAxeses()
# body0Ori = model.getBodyOrientationGlobal(0)
# for i in range(3):
# jointAxeses[0][i] = body0Ori.T[i]
# jointAxeses[0][i+3] = body0Ori.T[i]
# jointAxeses = model.getBodyRootDOFAxeses()
jointAxeses = model.getBodyRootJointAngJacobiansGlobal()
# totalDOF = model.getTotalDOF()
# qdot_0 = ype.makeFlatList(totalDOF)
# # ype.flatten(model.getDOFVelocitiesLocal(), qdot_0)
# # bodyGenVelLocal = model.getBodyGenVelLocal(0)
# #
# # for i in range(3):
# # qdot_0[i] = bodyGenVelLocal[i+3]
# # qdot_0[i+3] = bodyGenVelLocal[i]
# ype.flatten(model.getBodyRootDOFVelocitiesLocal(), qdot_0)
for vpidx in range(len(cVpBodyIds)):
bodyidx = model.id2index(cVpBodyIds[vpidx])
contactJointMasks = [yjc.getLinkJointMask(skeleton, bodyidx)]
# yjc.computeLocalRootJacobian(Jic, DOFs, jointPositions, jointAxeses, [cPositions[vpidx]], contactJointMasks)
yjc.computeControlModelJacobian(Jic, DOFs, jointPositions, jointAxeses, [cPositions[vpidx]], contactJointMasks)
n = np.array([[0., 1., 0., 0., 0., 0.]]).T
JTn = Jic.T.dot(n)
if N is None:
JTN = JTn.copy()
N = n.copy()
else:
JTN = np.hstack((JTN, JTn))
N = np.hstack((N, n))
cVel = cVelocities[vpidx]
offsetAngle = np.arctan2(cVel[2], cVel[0])
offsetAngle = 0.
for i in range(numFrictionBases):
d[i] = np.array([[math.cos((2.*math.pi*i)/numFrictionBases), 0., math.sin((2.*math.pi*i)/numFrictionBases)
, 0., 0., 0.
]]).T
for i in range(numFrictionBases):
JTd = Jic.T.dot(d[i])
if D is None:
JTD = JTd.copy()
D = d[i].copy()
else:
JTD = np.hstack((JTD, JTd))
D = np.hstack((D, d[i]))
E = np.zeros((cNum*numFrictionBases, cNum))
for cIdx in range(cNum):
for fcIdx in range(numFrictionBases):
E[cIdx*numFrictionBases + fcIdx][cIdx] = 1.
return len(cVpBodyIds), cVpBodyIds, cPositions, cPositionsLocal, cVelocities, JTN, JTD, E, N, D
def repairForces(forces, contactPositions):
for idx in range(0, len(forces)):
force = forces[idx]
if force[1] < 0.:
force[0] = 0.
force[2] = 0.
force[1] = 0.
# force[1] = -contactPositions[idx][1]*2000.
# elif force[1] > 10000.:
# ratio = 10000./force[1]
# force *= ratio
# if force[1]*force[1] < force[2]*force[2] + force[0]*force[0] :
# norm = math.sqrt(force[0] * force[0] + force[2]*force[2])
# force[0] /= norm
# force[2] /= norm
pass
def normalizeMatrix(A, b):
for i in range(A.shape[0]):
n = npl.norm(A[0])
A[0] /= n
b[0] /= n
def setTimeStamp(timeStamp, timeIndex, prevTime):
if timeIndex == 0:
prevTime = time.time()
if len(timeStamp) < timeIndex + 1:
timeStamp.append(0.)
curTime = time.time()
timeStamp[timeIndex] += curTime - prevTime
prevTime = curTime
timeIndex += 1
return timeStamp, timeIndex, prevTime
def getLCPMatrix(world, model, invM, invMc, mu, tau, contactNum, contactPositions, JTN, JTD, E, factor=1.):
totalDOF = model.getTotalDOF()
h = world.GetTimeStep()
invh = 1./h
mus = mu * np.eye(contactNum)
temp_NM = JTN.T.dot(invM)
temp_DM = JTD.T.dot(invM)
# pdb.set_trace()
# A =[ A11, A12, 0]
# [ A21, A22, E]
# [ mus, -E.T, 0]
A11 = h*temp_NM.dot(JTN)
A12 = h*temp_NM.dot(JTD)
A21 = h*temp_DM.dot(JTN)
A22 = h*temp_DM.dot(JTD)
A = factor * np.concatenate(
(
np.concatenate((A11, A12, np.zeros((A11.shape[0], E.shape[1]))), axis=1),
np.concatenate((A21, A22, E), axis=1),
h * np.concatenate((mus, -E.T, np.zeros((mus.shape[0], E.shape[1]))), axis=1),
), axis=0
)
# A = A + 0.1*np.eye(A.shape[0])
qdot_0 = ype.makeFlatList(model.getTotalDOF())
# # ype.flatten(model.getDOFVelocitiesLocal(), qdot_0)
# # bodyGenVelLocal = model.getBodyGenVelLocal(0)
# # for i in range(3):
# # qdot_0[i] = bodyGenVelLocal[i+3]
# # qdot_0[i+3] = bodyGenVelLocal[i]
# ype.flatten(model.getBodyRootDOFVelocitiesLocal(), qdot_0)
ype.flatten(model.getBodyRootDOFFirstDerivs(), qdot_0)
qdot_0 = np.asarray(qdot_0)
if tau is None:
tau = np.zeros(np.shape(qdot_0))
# non-penentration condition
# b1 = N.T.dot(qdot_0 - h*invMc) + h*temp_NM.dot(tau)
# improved non-penentration condition : add position condition
penDepth = 0.003
bPenDepth = np.zeros(A11.shape[0])
for i in range(contactNum):
if abs(contactPositions[i][1]) > penDepth:
bPenDepth[i] = contactPositions[i][1] + penDepth
b1 = JTN.T.dot(qdot_0 - h*invMc) + h*temp_NM.dot(tau) + 0.05 * invh * bPenDepth
b2 = JTD.T.dot(qdot_0 - h*invMc) + h*temp_DM.dot(tau)
b3 = np.zeros(mus.shape[0])
b = np.hstack((np.hstack((b1, b2)), b3)) * factor
return A, b
def getLCPMatrixHD(world, model, invM, invMc, mu, ddth, contactNum, contactPositions, JTN, JTD, E, factor=1.):
totalDOF = model.getTotalDOF()
h = world.GetTimeStep()
invh = 1./h
mus = mu * np.eye(contactNum)
M_small = np.dot(invM[:6, 6:], npl.inv(invM[6:, 6:]))
M_tilde = invM[:6, :] - np.dot(M_small, invM[6:, :])
# temp_NMtilde = np.dot(JTN.T, np.concatenate((M_tilde, np.zeros((JTN.shape[0]-M_tilde.shape[0], M_tilde.shape[1]))), axis=0))
# temp_DMtilde = np.dot(JTD.T, np.concatenate((M_tilde, np.zeros((JTD.shape[0]-M_tilde.shape[0], M_tilde.shape[1]))), axis=0))
temp_NMtilde = np.dot(JTN[:6, :].T, M_tilde)
temp_DMtilde = np.dot(JTD[:6, :].T, M_tilde)
A11 = h*temp_NMtilde.dot(JTN)
A12 = h*temp_NMtilde.dot(JTD)
A21 = h*temp_DMtilde.dot(JTN)
A22 = h*temp_DMtilde.dot(JTD)
A = factor * np.concatenate(
(
np.concatenate((A11, A12, np.zeros((A11.shape[0], E.shape[1]))), axis=1),
np.concatenate((A21, A22, E), axis=1),
0.001*h * np.concatenate((mus, -E.T, np.zeros((mus.shape[0], E.shape[1]))), axis=1),
), axis=0
)
# A = A + 0.1*np.eye(A.shape[0])
qdot_0 = ype.makeFlatList(totalDOF)
# ype.flatten(model.getDOFVelocitiesLocal(), qdot_0)
# # bodyGenVelLocal = model.getBodyGenVelLocal(0)
# # for i in range(3):
# # qdot_0[i] = bodyGenVelLocal[i+3]
# # qdot_0[i+3] = bodyGenVelLocal[i]
# ype.flatten(model.getBodyRootDOFVelocitiesLocal(), qdot_0)
ype.flatten(model.getBodyRootDOFFirstDerivs(), qdot_0)
qdot_0 = np.asarray(qdot_0)
if ddth is None:
ddth = np.zeros(np.shape(qdot_0))
# non-penentration condition
# b1 = N.T.dot(qdot_0 - h*invMc) + h*temp_NM.dot(tau)
# improved non-penentration condition : add position condition
penDepth = 0.003
bPenDepth = np.zeros(A11.shape[0])
for i in range(contactNum):
if abs(contactPositions[i][1]) > penDepth:
bPenDepth[i] = contactPositions[i][1] + penDepth
M = npl.inv(invM)
b1 = JTN.T.dot(qdot_0) \
- h*np.dot(temp_NMtilde, np.dot(M, invMc)) \
+ h*np.dot(JTN.T, np.dot(np.concatenate((M_small, np.eye(M_small.shape[1])), axis=0), ddth)) \
+ 0.05 * invh * bPenDepth
b2 = JTD.T.dot(qdot_0) \
- h*np.dot(temp_DMtilde, np.dot(M, invMc)) \
+ h*np.dot(JTD.T, np.dot(np.concatenate((M_small, np.eye(M_small.shape[1])), axis=0), ddth))
b3 = np.zeros(mus.shape[0])
b = np.hstack((np.hstack((b1, b2)), b3)) * factor
return A, b
def getLCPMatrixGenHD(world, model, invM, invMc, mu, ddth, tau, contactNum, contactPositions, contactVelocities, JTN, JTD, E, factor=1., hdAccMask=None):
if hdAccMask is None:
hdAccMask = [True]*invM.shape[0]
hdAccMask[:6] = [False]*6
rearr_idx = np.array([i for i,x in enumerate(hdAccMask) if not x]+[i for i,x in enumerate(hdAccMask) if x])
# for torque term, invM has to be rearranged both column and row
invMtorReArr = (invM[:, rearr_idx])[rearr_idx, :]
# JTN and JTD have to be rearranged row
JTNreArr = JTN[rearr_idx, :]
JTDreArr = JTD[rearr_idx, :]
invMcReArr = invMc[rearr_idx]
ddthReArr = np.array(ddth)[rearr_idx]
tauReArr = np.array(tau)[rearr_idx]
# TODO:
totalTorDOF = len(hdAccMask) - sum(hdAccMask)
totalDOF = model.getTotalDOF()
h = world.GetTimeStep()
invh = 1./h
mus = mu * np.eye(contactNum)
# print invMtorReArr
M_small = np.dot(invMtorReArr[:totalTorDOF, totalTorDOF:], npl.inv(invMtorReArr[totalTorDOF:, totalTorDOF:]))
M_tilde = invMtorReArr[:totalTorDOF, :] - np.dot(M_small, invMtorReArr[totalTorDOF:, :])
M_schur = invMtorReArr[:totalTorDOF, :totalTorDOF] - np.dot(M_small, invMtorReArr[totalTorDOF:, :totalTorDOF])
temp_NMtilde = np.dot(JTNreArr[:totalTorDOF].T, M_tilde)
temp_DMtilde = np.dot(JTDreArr[:totalTorDOF].T, M_tilde)
A11 = h*temp_NMtilde.dot(JTNreArr)
A12 = h*temp_NMtilde.dot(JTDreArr)
A21 = h*temp_DMtilde.dot(JTNreArr)
A22 = h*temp_DMtilde.dot(JTDreArr)
A = factor * np.concatenate(
(
np.concatenate((A11, A12, np.zeros((A11.shape[0], E.shape[1]))), axis=1),
np.concatenate((A21, A22, E), axis=1),
h * np.concatenate((mus, -E.T, np.zeros((mus.shape[0], E.shape[1]))), axis=1),
), axis=0
)
# A = A + 0.1*np.eye(A.shape[0])
qdot_0 = ype.makeFlatList(totalDOF)
ype.flatten(model.getBodyRootDOFFirstDerivs(), qdot_0)
qdot_0 = np.asarray(qdot_0)
if ddth is None:
ddth = np.zeros(np.shape(qdot_0))
# non-penentration condition
# b1 = N.T.dot(qdot_0 - h*invMc) + h*temp_NM.dot(tau)
# improved non-penentration condition : add position condition
# penDepth = 0.003
penDepth = 0.005
bPenDepth = np.zeros(A11.shape[0])
for i in range(contactNum):
if abs(contactPositions[i][1]) > penDepth:
bPenDepth[i] = contactPositions[i][1] + penDepth
# additional friction
fricVel = 0.01
bFricVel = np.zeros(A21.shape[0])
for i in range(contactNum):
vel = fricVel * mm.normalize2(np.array([contactVelocities[i][0], 0, contactVelocities[i][2]]))
if abs(contactVelocities[i][0]*contactVelocities[i][0]+contactVelocities[i][2]*contactVelocities[i][2]) > fricVel*fricVel:
for j in range(8):
dBasis = np.array([[math.cos(2.*math.pi*j/8.), 0., math.sin(2.*math.pi*j/8.)]])
bFricVel[8*i + j] = np.dot(dBasis, vel)
b1 = JTN.T.dot(qdot_0) \
+ h*np.dot(JTNreArr.T, np.hstack((np.dot(M_small, ddthReArr[totalTorDOF:]), ddthReArr[totalTorDOF:]))) \
+ h*np.dot(JTN[:totalTorDOF].T, np.dot(M_schur, tauReArr[:totalTorDOF]) - invMcReArr[:totalTorDOF] + np.dot(M_small, invMcReArr[totalTorDOF:])) \
+ 0.05* invh * bPenDepth
b2 = JTD.T.dot(qdot_0) \
+ h*np.dot(JTDreArr.T, np.hstack((np.dot(M_small, ddthReArr[totalTorDOF:]), ddthReArr[totalTorDOF:]))) \
+ h*np.dot(JTD[:totalTorDOF].T, np.dot(M_schur, tauReArr[:totalTorDOF]) - invMcReArr[:totalTorDOF] + np.dot(M_small, invMcReArr[totalTorDOF:])) \
+ 0.0 * invh * bFricVel
b3 = np.zeros(mus.shape[0])
b = np.hstack((np.hstack((b1, b2)), b3)) * factor
return A, b
def calcLCPForces(motion, world, model, bodyIDsToCheck, mu, tau=None, numFrictionBases=8, solver='qp'):
timeStamp = []
timeIndex = 0
prevTime = time.time()
# model = VpControlModel
contactNum, bodyIDs, contactPositions, contactPositionsLocal, contactVelocities, JTN, JTD, E, N, D\
= makeFrictionCone(motion[0].skeleton, world, model, bodyIDsToCheck, numFrictionBases)
if contactNum == 0:
return bodyIDs, contactPositions, contactPositionsLocal, None, None
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
totalDOF = model.getTotalDOF()
invM = np.zeros((totalDOF, totalDOF))
invMc = np.zeros(totalDOF)
invM, invMc = model.getInverseEquationOfMotion()
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
# pdb.set_trace()
# A =[ A11, A12, 0]
# [ A21, A22, E]
# [ mus, -E.T, 0]
factor = 1.
A, b = getLCPMatrix(world, model, invM, invMc, mu, tau, contactNum, contactPositions, JTN, JTD, E, factor)
# lo = np.zeros(A.shape[0])
lo = 0.*np.ones(A.shape[0])
hi = 1000000. * np.ones(A.shape[0])
x = 0.*np.ones(A.shape[0])
# normalizeMatrix(A, b)
# print A[0]
if solver == 'bulletLCP':
# solve using bullet LCP solver
lcpSolver = lcp.LemkeSolver()
# lcpSolver = lcpD.DantzigSolver()
lcpSolver.solve(A.shape[0], A, b, x, lo, hi)
if solver == 'openOptLCP':
# solve using openOpt LCP solver
# p = openLCP(A, b)
# r = p.solve('lcpsolve')
# f_opt, x_opt = r.ff, r.xf
# w, x = x_opt[x_opt.size/2:], x_opt[:x_opt.size/2]
pass
if solver == 'nqp':
# solve using cvxopt Nonlinear Optimization with linear constraint
Acp = cvxMatrix(A)
bcp = cvxMatrix(b)
Hcp = cvxMatrix(A+A.T)
Gcp = cvxMatrix(np.vstack((-A, -np.eye(A.shape[0]))))
hcp = cvxMatrix(np.hstack((b.T, np.zeros(A.shape[0]))))
def F(xin=None, z=None):
if xin is None:
return 0, cvxMatrix(1., (A.shape[1], 1))
for j in range(len(np.array(xin))):
if xin[j] < 0.:
return None, None
f = xin.T*(Acp*xin+bcp)
# TODO:
# check!!!
Df = Hcp*xin + bcp
if z is None:
return f, Df.T
H = Hcp
return f, Df.T, H
solution = cvxSolvers.cp(F, Gcp, hcp)
xcp = np.array(solution['x']).flatten()
x = xcp.copy()
if solver == 'qp':
# solve using cvxopt QP
# if True:
try:
Aqp = cvxMatrix(A+A.T)
bqp = cvxMatrix(b)
Gqp = cvxMatrix(np.vstack((-A, -np.eye(A.shape[0]))))
hqp = cvxMatrix(np.hstack((b.T, np.zeros(A.shape[0]))))
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
cvxSolvers.options['show_progress'] = False
cvxSolvers.options['maxiters'] = 100
# cvxSolvers.options['kktreg'] = 1e-6
# cvxSolvers.options['refinement'] = 10
solution = cvxSolvers.qp(Aqp, bqp, Gqp, hqp)
xqp = np.array(solution['x']).flatten()
# xqp = np.array(cvxSolvers.qp(Aqp, bqp, Gqp, hqp)['x']).flatten()
x = xqp.copy()
# print x.shape[0]
# print "x: ", x
# zqp = np.dot(A,x)+b
# print "z: ", zqp
# print "El: ", np.dot(E, x[contactNum + numFrictionBases*contactNum:])
# print "Ep: ", np.dot(E.T, x[contactNum:contactNum + numFrictionBases*contactNum])
# print "force value: ", np.dot(x, zqp)
except:
# print e
pass
if solver == 'qpOASES':
# solve using qpOASES
QQ = A+A.T
pp = b
# GG = np.vstack((A, np.eye(A.shape[0])))
# hh = np.hstack((-b.T, np.zeros(A.shape[0])))
GG = A.copy()
hh = -b
# bp::list qp(const object &H, const object &g, const object &A, const object &lb, const object &ub, const object &lbA, const object ubA, int nWSR)
lb = [0.]*A.shape[0]
xqpos = qpos.qp(QQ, pp, GG, lb, None, hh, None, 1000, False, "NONE")
x = np.array(xqpos)
zqp = np.dot(A,x)+b
print(np.dot(x, zqp))
# print xqpos
# x = xqpos.copy()
pass
normalForce = x[:contactNum]
tangenForce = x[contactNum:contactNum + numFrictionBases*contactNum]
# tangenForce = np.zeros_like(x[contactNum:contactNum + numFrictionBases*contactNum])
minTangenVel = x[contactNum + numFrictionBases*contactNum:]
# print minTangenVel
tangenForceDual = (np.dot(A,x)+b)[contactNum:contactNum+numFrictionBases*contactNum]
# print "hehe:", (np.dot(A,x)+b)[contactNum:contactNum+numFrictionBases*contactNum]
# print "hihi:", tangenForce
# print np.dot(tangenForce, tangenForceDual)
forces = []
for cIdx in range(contactNum):
force = np.zeros(3)
force[1] = normalForce[cIdx]
# contactTangenForce = tangenForce[8*cIdx:8*(cIdx+1)]
contactTangenForceDual = tangenForceDual[8*cIdx:8*(cIdx+1)]
for fcIdx in range(numFrictionBases):
d = np.array((math.cos(2.*math.pi*fcIdx/numFrictionBases), 0., math.sin(2.*math.pi*fcIdx/numFrictionBases)))
force += tangenForce[cIdx*numFrictionBases + fcIdx] * d
# minBasisIdx = np.argmin(contactTangenForceDual)
# d = np.array((math.cos((2.*math.pi*minBasisIdx)/numFrictionBases), 0., math.sin((2.*math.pi*minBasisIdx)/numFrictionBases)))
# force += tangenForce[cIdx*numFrictionBases + minBasisIdx] * d
forces.append(force)
# repairForces(forces, contactPositions)
# print forces
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
# debug
__HP__DEBUG__= True
if __HP__DEBUG__ and len(bodyIDs) ==4:
vpidx = 3
DOFs = model.getDOFs()
Jic = yjc.makeEmptyJacobian(DOFs, 1)
qdot_0 = ype.makeFlatList(totalDOF)
ype.flatten(model.getBodyRootDOFFirstDerivs(), qdot_0)
jointAxeses = model.getBodyRootJointAngJacobiansGlobal()
bodyidx = model.id2index(bodyIDs[vpidx])
contactJointMasks = [yjc.getLinkJointMask(motion[0].skeleton, bodyidx)]
jointPositions = model.getJointPositionsGlobal()
jointPositions[0] = model.getBodyPositionGlobal(0)
# yjc.computeLocalRootJacobian(Jic, DOFs, jointPositions, jointAxeses, [contactPositions[vpidx]], contactJointMasks)
yjc.computeControlModelJacobian(Jic, DOFs, jointPositions, jointAxeses, [contactPositions[vpidx]], contactJointMasks)
h = world.GetTimeStep()
vv = np.dot(Jic, qdot_0) - h * np.dot(Jic, invMc) + h * np.dot(Jic, np.dot(invM, tau))
for vpidxx in range(len(bodyIDs)):
bodyidx = model.id2index(bodyIDs[vpidxx])
contactJointMasks = [yjc.getLinkJointMask(motion[0].skeleton, bodyidx)]
yjc.computeControlModelJacobian(Jic, DOFs, jointPositions, jointAxeses, [contactPositions[vpidxx]], contactJointMasks)
vv += h * np.dot(Jic, np.dot(invM, np.dot(Jic[:3].T, forces[vpidxx])))
print("vv:", vv[:3])
return bodyIDs, contactPositions, contactPositionsLocal, forces, timeStamp
def calcLCPForcesHD(motion, world, model, bodyIDsToCheck, mu, ddth, tau, numFrictionBases=8, solver='qp', hdAccMask=None):
timeStamp = []
timeIndex = 0
prevTime = time.time()
# model = VpControlModel
contactNum, bodyIDs, contactPositions, contactPositionsLocal, contactVelocities, JTN, JTD, E, N, D \
= makeFrictionCone(motion[0].skeleton, world, model, bodyIDsToCheck, numFrictionBases)
if contactNum == 0:
# if contactNum <= 2:
return [], [], [], None, None
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
totalDOF = model.getTotalDOF()
# invM = np.zeros((totalDOF, totalDOF))
# invMc = np.zeros(totalDOF)
invM, invMc = model.getInverseEquationOfMotion()
# print "skew"
# print invM-invM.T
# print "invM"
# print invM
# print "M"
# print npl.inv(invM)
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
# pdb.set_trace()
# A =[ A11, A12, 0]
# [ A21, A22, E]
# [ mus, -E.T, 0]
factor = 1.
# A, b = getLCPMatrixHD(world, model, invM, invMc, mu, ddth[6:], contactNum, contactPositions, JTN, JTD, E, factor)
A, b = getLCPMatrixGenHD(world, model, invM, invMc, mu, ddth, tau, contactNum, contactPositions, contactVelocities, JTN, JTD, E, factor, hdAccMask)
# lo = np.zeros(A.shape[0])
lo = 0.*np.ones(A.shape[0])
hi = 1000000. * np.ones(A.shape[0])
x = 0.*np.ones(A.shape[0])
# normalizeMatrix(A, b)
# print A[0]
if solver == 'bulletLCP':
# solve using bullet LCP solver
lcpSolver = lcp.LemkeSolver()
# lcpSolver = lcpD.DantzigSolver()
lcpSolver.solve(A.shape[0], A, b, x, lo, hi)
if solver == 'openOptLCP':
# solve using openOpt LCP solver
# p = openLCP(A, b)
# r = p.solve('lcpsolve')
# f_opt, x_opt = r.ff, r.xf
# w, x = x_opt[x_opt.size/2:], x_opt[:x_opt.size/2]
pass
if solver == 'nqp':
# solve using cvxopt Nonlinear Optimization with linear constraint
Acp = cvxMatrix(A)
bcp = cvxMatrix(b)
Hcp = cvxMatrix(A+A.T)
Gcp = cvxMatrix(np.vstack((-A, -np.eye(A.shape[0]))))
hcp = cvxMatrix(np.hstack((b.T, np.zeros(A.shape[0]))))
def F(xin=None, z=None):
if xin is None:
return 0, cvxMatrix(1., (A.shape[1], 1))
for j in range(len(np.array(xin))):
if xin[j] < 0.:
return None, None
f = xin.T*(Acp*xin+bcp)
# TODO:
# check!!!
Df = Hcp*xin + bcp
if z is None:
return f, Df.T
H = Hcp
return f, Df.T, H
solution = cvxSolvers.cp(F, Gcp, hcp)
xcp = np.array(solution['x']).flatten()
x = xcp.copy()
if solver == 'qp':
# solve using cvxopt QP
# if True:
try:
Aqp = cvxMatrix(A+A.T)
bqp = cvxMatrix(b)
Gqp = cvxMatrix(np.vstack((-A, -np.eye(A.shape[0]))))
hqp = cvxMatrix(np.hstack((b.T, np.zeros(A.shape[0]))))
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
cvxSolvers.options['show_progress'] = False
cvxSolvers.options['maxiters'] = 100
# cvxSolvers.options['kktreg'] = 1e-6
# cvxSolvers.options['refinement'] = 10
solution = cvxSolvers.qp(Aqp, bqp, Gqp, hqp)
xqp = np.array(solution['x']).flatten()
# xqp = np.array(cvxSolvers.qp(Aqp, bqp, Gqp, hqp)['x']).flatten()
x = xqp.copy()
# print x.shape[0]
# print "x: ", x
# zqp = np.dot(A,x)+b
# print "z: ", zqp
# print "El: ", np.dot(E, x[contactNum + numFrictionBases*contactNum:])
# print "Ep: ", np.dot(E.T, x[contactNum:contactNum + numFrictionBases*contactNum])
# print "force value: ", np.dot(x, zqp)
except:
# print e
pass
if solver == 'qpOASES':
# solve using qpOASES
QQ = A+A.T
pp = b
# GG = np.vstack((A, np.eye(A.shape[0])))
# hh = np.hstack((-b.T, np.zeros(A.shape[0])))
GG = A.copy()
hh = -b
# bp::list qp(const object &H, const object &g, const object &A, const object &lb, const object &ub, const object &lbA, const object ubA, int nWSR)
lb = [0.]*A.shape[0]
xqpos = qpos.qp(QQ, pp, GG, lb, None, hh, None, 1000, False, "NONE")
x = np.array(xqpos)
zqp = np.dot(A,x)+b
print(np.dot(x, zqp))
# print xqpos
# x = xqpos.copy()
pass
normalForce = x[:contactNum]
tangenForce = x[contactNum:contactNum + numFrictionBases*contactNum]
# tangenForce = np.zeros_like(x[contactNum:contactNum + numFrictionBases*contactNum])
minTangenVel = x[contactNum + numFrictionBases*contactNum:]
tangenForceDual = (np.dot(A,x)+b)[contactNum:contactNum+numFrictionBases*contactNum]
forces = []
for cIdx in range(contactNum):
force = np.zeros(3)
force[1] = normalForce[cIdx]
# if(tangentialRelVel < _lockingVel)
# frictionForce *= tangentialRelVel/_lockingVel;
tangenVel = deepcopy(contactVelocities[cIdx])
tangenVel[1] = 0.
tangenRatio = npl.norm(tangenVel)/0.02
# for fcIdx in range(numFrictionBases):
# d = np.array((math.cos(2.*math.pi*fcIdx/numFrictionBases), 0., math.sin(2.*math.pi*fcIdx/numFrictionBases)))
# force += tangenForce[cIdx*numFrictionBases + fcIdx] * d
# # if tangenRatio > 1.:
# # force += tangenForce[cIdx*numFrictionBases + fcIdx] * d
# # else:
# # force += tangenForce[cIdx*numFrictionBases + fcIdx] * d * tangenRatio
contactTangenForceDual = tangenForceDual[8*cIdx:8*(cIdx+1)]
# for fcIdx in range(numFrictionBases):
# d = np.array((math.cos(2.*math.pi*fcIdx/numFrictionBases), 0., math.sin(2.*math.pi*fcIdx/numFrictionBases)))
# force += tangenForce[cIdx*numFrictionBases + fcIdx] * d
minBasisIdx = np.argmin(contactTangenForceDual)
d = np.array((math.cos((2.*math.pi*minBasisIdx)/numFrictionBases), 0., math.sin((2.*math.pi*minBasisIdx)/numFrictionBases)))
force += tangenForce[cIdx*numFrictionBases + minBasisIdx] * d
forces.append(force)
# repairForces(forces, contactPositions)
# print forces
timeStamp, timeIndex, prevTime = setTimeStamp(timeStamp, timeIndex, prevTime)
return bodyIDs, contactPositions, contactPositionsLocal, forces, timeStamp
def calcLCPControl(motion, world, model, bodyIDsToCheck, mu, totalForce, weights, tau0=None, numFrictionBases=8):
# tau0 = None
# model = VpControlModel
# numFrictionBases = 8
contactNum, bodyIDs, contactPositions, contactPositionsLocal, contactVelocities, JTN, JTD, E, N, D \
= makeFrictionCone(motion[0].skeleton, world, model, bodyIDsToCheck, numFrictionBases)
if contactNum == 0:
return bodyIDs, contactPositions, contactPositionsLocal, None, None
wLCP = weights[0]
wTorque = weights[1]
wForce = weights[2]
totalDOF = model.getTotalDOF()
invM = np.zeros((totalDOF, totalDOF))
invMc = np.zeros(totalDOF)
model.getInverseEquationOfMotion(invM, invMc)
# Jc = np.zeros(())
# N = np.zeros(())
# D = np.zeros(())
# E = np.zeros(())
M = npl.inv(invM)
c = np.dot(M, invMc)
Mtmp = np.dot(M, M.T)+np.eye(M.shape[0])
# Mtmp[:6, :6] -= np.eye(6)
pinvM = npl.inv(Mtmp)
pinvM0 = np.dot(M.T, pinvM)
pinvM1 = -pinvM
h = world.GetTimeStep()
invh = 1./h
mus = mu * np.eye(contactNum)
temp_NM = JTN.T.dot(pinvM0)
temp_DM = JTD.T.dot(pinvM0)
A11 = h*temp_NM.dot(JTN)
A12 = h*temp_NM.dot(JTD)
A21 = h*temp_DM.dot(JTN)
A22 = h*temp_DM.dot(JTD)
factor = 1.
# A, b = getLCPMatrix(world, model, pinvM0, c, mu, tau0, contactNum, contactPositions, JTN, JTD, E, factor)
A1 = np.concatenate((A11, A12, np.zeros((A11.shape[0], E.shape[1]))), axis=1)
A2 = np.concatenate((A21, A22, E), axis=1)
A3 = np.concatenate((mus, -E.T, np.zeros((mus.shape[0], E.shape[1]))), axis=1)
A = np.concatenate((A1,
A2,
A3), axis=0) * factor
# A = 0.01 * np.eye(A.shape[0])*factor
# print npl.eigvals(A+A.T)
# npl.eigvals(A+A.T)
# bx= h * (M*qdot_0 + tau - c)
# b =[N.T * Jc * invM * kx]
# [D.T * Jc * invM * kx]
# [0]
qdot_0 = ype.makeFlatList(totalDOF)
ype.flatten(model.getBodyRootDOFVelocitiesLocal(), qdot_0)
qdot_0 = np.asarray(qdot_0)
if tau0 is None:
tau0 = np.zeros(np.shape(qdot_0))
# non-penentration condition
# b1 = N.T.dot(qdot_0 - h*invMc) + h*temp_NM.dot(tau)
# improved non-penentration condition : add position condition
penDepth = 0.003
bPenDepth = np.zeros(A1.shape[0])
for i in range(contactNum):
if abs(contactPositions[i][1]) > penDepth:
bPenDepth[i] = contactPositions[i][1] + penDepth
b1 = JTN.T.dot(qdot_0) + h*temp_NM.dot(tau0 - c) #+ 0.5*invh*bPenDepth
b2 = JTD.T.dot(qdot_0) + h*temp_DM.dot(tau0 - c)
b3 = np.zeros(mus.shape[0])
b = np.hstack((np.hstack((b1, b2)), b3)) * factor
# lo = np.zeros(A.shape[0])
lo = 0.*np.ones(A.shape[0])
hi = 1000000. * np.ones(A.shape[0])
x = 100.*np.ones(A.shape[0])
# normalizeMatrix(A, b)
# for torque equality constraints computation
modelCom = model.getCOM()
rcN = np.zeros((3, N.shape[1]))
rcD = np.zeros((3, D.shape[1]))
for cIdx in range(len(contactPositions)):
r = contactPositions[cIdx] - modelCom
rcN[:3, cIdx] = np.cross(r, N[:3, cIdx])
for fbIdx in range(numFrictionBases):
dIdx = numFrictionBases * cIdx + fbIdx
rcD[:3, dIdx] = np.cross(r, D[:3, dIdx])
if True:
# if True:
try:
# Qqp = cvxMatrix(A+A.T)
# pqp = cvxMatrix(b)
# Qtauqp = np.hstack((np.dot(pinvM1[:6], np.hstack((JTN, JTD))), np.zeros_like(N[:6])))
# ptauqp = np.dot(pinvM1[:6], (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0[:6])
# Qqp = cvxMatrix(2.*A + wTorque * np.dot(Qtauqp.T, Qtauqp))
# pqp = cvxMatrix(b + wTorque * np.dot(ptauqp.T, Qtauqp))
Qfqp = np.concatenate((N[:3], D[:3], np.zeros_like(N[:3])), axis=1)
pfqp = -totalForce[:3]
Qfqp = np.concatenate((N[1:2], D[1:2], np.zeros_like(N[1:2])), axis=1)
pfqp = -totalForce[1:2]
# TODO:
# add tau norm term ||tau||^2
# and momentum derivative term
QtauNormqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
ptauNormqp = np.dot(pinvM1, (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0)
QqNormqp = np.hstack((np.dot(pinvM0, np.hstack((JTN, JTD))), np.zeros((pinvM0.shape[0], N.shape[1]))))
pqNormqp = np.dot(pinvM0, (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0)
# Qqp = cvxMatrix(2.*A + wTorque * np.dot(Qfqp.T, Qfqp) + np.dot(QqNormqp.T, QqNormqp))
# pqp = cvxMatrix(b + wTorque * np.dot(pfqp.T, Qfqp) + np.dot(pqNormqp.T, QqNormqp))
Qqp = cvxMatrix(2.*A + wForce * np.dot(Qfqp.T, Qfqp) + wTorque * np.dot(QtauNormqp.T, QtauNormqp))
pqp = cvxMatrix(b + wForce * np.dot(pfqp.T, Qfqp) + wTorque * np.dot(ptauNormqp.T, QtauNormqp))
# Qqp = cvxMatrix(2.*A + wForce * np.dot(Qfqp.T, Qfqp) )
# pqp = cvxMatrix(b + wForce * np.dot(pfqp.T, Qfqp))
equalConstForce = False
G = np.vstack((-A, -np.eye(A.shape[0])))
hnp = np.hstack((b.T, np.zeros(A.shape[0])))
if False and not equalConstForce:
constMu = .1
constFric = totalForce[1]*constMu
totalForceMat = np.concatenate((N, D, np.zeros_like(N)), axis=1)
G = np.concatenate((G, totalForceMat[:3], totalForceMat[:3]), axis=0)
G[-6] *= -1.
G[-5] *= -1.
G[-4] *= -1.
hnp = np.hstack((hnp, np.zeros(6)))
hnp[-6] = -totalForce[0] - constFric
hnp[-5] = -totalForce[1] * .9
hnp[-4] = -totalForce[2] - constFric
hnp[-3] = totalForce[0] + constFric
hnp[-2] = totalForce[1] * 1.1
hnp[-1] = totalForce[2] + constFric
# G = np.vstack((G, np.hstack((np.ones((2, N.shape[1])), np.zeros((2, D.shape[1]+N.shape[1]))))))
# G[-2] *= -1.
# hnp = np.hstack((hnp, np.zeros(2)))
# hnp[-2] = -totalForce[1] * .9
# hnp[-1] = totalForce[1] * 1.1
# root torque 0 condition as inequality constraint
Atauqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
btauqp = np.dot(pinvM1, (np.asarray(c)-np.asarray(tau0))) - np.array(tau0)
# G = np.concatenate((G, -Atauqp, Atauqp), axis=0)
# hnp = np.hstack((hnp, np.hstack((-btauqp, btauqp))))
# hnp[-2*pinvM1.shape[0]:] += 1. * np.ones(2*pinvM1.shape[0])
Gqp = cvxMatrix(G)
hqp = cvxMatrix(hnp)
# check correctness of equality constraint
# tau = np.dot(pinvM1, -c + tau0 + np.dot(JTN, normalForce) + np.dot(JTD, tangenForce))
# tau = pinvM1*JTN*theta + pinvM1*JTD*phi + pinvM1*tau0 - pinvM1*b + tau0
Atauqp = np.hstack((np.dot(pinvM1[:6], np.hstack((JTN, JTD))), np.zeros_like(N[:6])))
btauqp = np.dot(pinvM1[:6], (np.asarray(c)-np.asarray(tau0))) - np.asarray(tau0[:6])
# Atauqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
# btauqp = np.dot(pinvM1, (np.asarray(c)-np.asarray(tau0))) - np.asarray(tau0)
AextTorqp = np.concatenate((rcN, rcD, np.zeros_like(N[:3])), axis=1)
bextTorqp = totalForce[3:]
# Atauqp = np.vstack((Atauqp, AextTorqp))
# btauqp = np.hstack((btauqp, bextTorqp))
if equalConstForce:
Atauqp = cvxMatrix(np.vstack((np.concatenate((N[1:2], D[1:2], np.zeros(N[1:2].shape))), Atauqp)))
btauqp = cvxMatrix(np.hstack((np.array(totalForce[1]), btauqp)))
# Atauqp = cvxMatrix(np.vstack((np.concatenate((N[1:2], D[1:2], np.zeros(N[1:2].shape), AextTorqp)), Atauqp)))
# btauqp = cvxMatrix(np.concatenate((np.array(totalForce[1]), bextTorqp, btauqp), axis=1))
Aqp = cvxMatrix(Atauqp)
bqp = cvxMatrix(btauqp)
cvxSolvers.options['show_progress'] = False
cvxSolvers.options['maxiters'] = 100
cvxSolvers.options['refinement'] = 1
xqp = np.array(cvxSolvers.qp(Qqp, pqp, Gqp, hqp, Aqp, bqp)['x']).flatten()
# xqp = np.asarray(cvxSolvers.qp(Qqp, pqp, Gqp, hqp)['x']).flatten()
# print "x: ", x
# zqp = np.dot(A, xqp).T + b
# print "QP z: ", np.dot(xqp, zqp)
# if np.dot(xqp, zqp) < np.dot(x, z):
x = xqp.copy()
except:
# print('LCPControl!!', e)
pass
normalForce = x[:contactNum]
tangenForce = x[contactNum:contactNum + numFrictionBases*contactNum]
minTangenVel = x[contactNum + numFrictionBases*contactNum:]
tau = np.dot(pinvM1, -c + tau0 + np.dot(JTN, normalForce) + np.dot(JTD, tangenForce)) + np.array(tau0)
forces = []
for cIdx in range(contactNum):
force = np.zeros(3)
force[1] = normalForce[cIdx]
for fcIdx in range(numFrictionBases):
d = np.array((math.cos(2.*math.pi*fcIdx/numFrictionBases), 0., math.sin(2.*math.pi*fcIdx/numFrictionBases)))
force += tangenForce[cIdx*numFrictionBases + fcIdx] * d
# print force
forces.append(force)
# repairForces(forces, contactPositions)
# print forces
return bodyIDs, contactPositions, contactPositionsLocal, forces, tau
def calcLCPbasicControl(motion, world, model, bodyIDsToCheck, mu, totalForce, weights, tau0=None, numFrictionBases=8):
# tau0 = None
# model = VpControlModel
# numFrictionBases = 8
contactNum, bodyIDs, contactPositions, contactPositionsLocal, contactVelocities, JTN, JTD, E, N, D \
= makeFrictionCone(motion[0].skeleton, world, model, bodyIDsToCheck, numFrictionBases)
if contactNum == 0:
return bodyIDs, contactPositions, contactPositionsLocal, None, None
wLCP = weights[0]
wTorque = weights[1]
wForce = weights[2]
totalDOF = model.getTotalDOF()
invM = np.zeros((totalDOF, totalDOF))
invMc = np.zeros(totalDOF)
model.getInverseEquationOfMotion(invM, invMc)
# M = npl.inv(invM)
# c = np.dot(M, invMc)
# Mtmp = np.dot(M, M.T)+np.eye(M.shape[0])
# Mtmp[:6, :6] -= np.eye(6)
# pinvM = npl.inv(Mtmp)
h = world.GetTimeStep()
invh = 1./h
mus = mu * np.eye(contactNum)
temp_NM = JTN.T.dot(invM)
temp_DM = JTD.T.dot(invM)
A00 = np.eye(totalDOF)
A10 = h*temp_NM
A11 = h*temp_NM.dot(JTN)
A12 = h*temp_NM.dot(JTD)
A20 = h*temp_DM
A21 = h*temp_DM.dot(JTN)
A22 = h*temp_DM.dot(JTD)
factor = 1.
# A, b = getLCPMatrix(world, model, pinvM0, c, mu, tau0, contactNum, contactPositions, JTN, JTD, E, factor)
# A0 = np.concatenate((A00, np.zeros((A00.shape[0], A11.shape[1]+A12.shape[1]+E.shape[1]))), axis=1)
A0 = np.zeros((A00.shape[0], A00.shape[1] + A11.shape[1]+A12.shape[1]+E.shape[1]))
A1 = np.concatenate((A10, A11, A12, np.zeros((A11.shape[0], E.shape[1]))), axis=1)
A2 = np.concatenate((A20, A21, A22, E), axis=1)
A3 = np.concatenate((np.zeros((mus.shape[0], A00.shape[1])), 1.*mus, -1.*E.T, np.zeros((mus.shape[0], E.shape[1]))), axis=1)
A_ori = np.concatenate((A0,
wLCP*A1,
wLCP*A2,
wLCP*A3), axis=0) * factor
A = A_ori.copy()
# A = A_ori + 0.01 * np.eye(A_ori.shape[0])*factor
# bx= h * (M*qdot_0 + tau - c)
# b =[N.T * Jc * invM * kx]
# [D.T * Jc * invM * kx]
# [0]
qdot_0 = ype.makeFlatList(totalDOF)
ype.flatten(model.getBodyRootDOFVelocitiesLocal(), qdot_0)
qdot_0 = np.asarray(qdot_0)
if tau0 is None:
tau0 = np.zeros(np.shape(qdot_0))
# non-penentration condition
# b1 = N.T.dot(qdot_0 - h*invMc) + h*temp_NM.dot(tau)
# improved non-penentration condition : add position condition
penDepth = 0.003
bPenDepth = np.zeros(A1.shape[0])
for i in range(contactNum):
if abs(contactPositions[i][1]) > penDepth:
bPenDepth[i] = contactPositions[i][1] + penDepth
b0 = np.zeros(A00.shape[0])
b1 = JTN.T.dot(qdot_0 - h*invMc)# + 0.5*invh*bPenDepth
b2 = JTD.T.dot(qdot_0 - h*invMc)
b3 = np.zeros(mus.shape[0])
b = np.hstack((wTorque*b0, wLCP*np.hstack((np.hstack((b1, b2)), b3)))) * factor
x = 100.*np.ones(A.shape[0])
zqp = np.zeros(A.shape[0])
Qfqp = None
pfqp = None
# for torque equality constraints computation
modelCom = model.getCOM()
rcN = np.zeros((3, N.shape[1]))
rcD = np.zeros((3, D.shape[1]))
for cIdx in range(len(contactPositions)):
r = contactPositions[cIdx] - modelCom
rcN[:3, cIdx] = np.cross(r, N[:3, cIdx])
for fbIdx in range(numFrictionBases):
dIdx = numFrictionBases * cIdx + fbIdx
rcD[:3, dIdx] = np.cross(r, D[:3, dIdx])
if True:
# if True:
try:
# Qqp = cvxMatrix(A+A.T)
# pqp = cvxMatrix(b)
# Qtauqp = np.hstack((np.dot(pinvM1[:6], np.hstack((JTN, JTD))), np.zeros_like(N[:6])))
# ptauqp = np.dot(pinvM1[:6], (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0[:6])
Qtauqp = np.hstack((np.eye(totalDOF), np.zeros((A00.shape[0], A11.shape[1]+A12.shape[1]+E.shape[1]))))
ptauqp = np.zeros(totalDOF)
Q2dotqp = np.hstack((np.dot(invM, np.concatenate((wTorque* np.eye(totalDOF), JTN, JTD), axis=1)), np.zeros((A0.shape[0], E.shape[1])) ))
p2dotqp = -invMc.copy()
# Qqp = cvxMatrix(2.*A + wTorque * np.dot(Qtauqp.T, Qtauqp))
# pqp = cvxMatrix(b + wTorque * np.dot(ptauqp.T, Qtauqp))
Qfqp = np.concatenate((np.zeros((3, totalDOF)), N[:3], D[:3], np.zeros_like(N[:3])), axis=1)
pfqp = -totalForce[:3]
# Qfqp = np.concatenate((np.zeros((1, totalDOF)),N[1:2], D[1:2], np.zeros_like(N[1:2])), axis=1)
# pfqp = -totalForce[1:2]
# TODO:
# add momentum term
# QtauNormqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
# ptauNormqp = np.dot(pinvM1, (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0)
# QqNormqp = np.hstack((np.dot(pinvM0, np.hstack((JTN, JTD))), np.zeros((pinvM0.shape[0], N.shape[1]))))
# pqNormqp = np.dot(pinvM0, (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0)
# Qqp = cvxMatrix(2.*A + wTorque * np.dot(Qfqp.T, Qfqp) + np.dot(QqNormqp.T, QqNormqp))
# pqp = cvxMatrix(b + wTorque * np.dot(pfqp.T, Qfqp) + np.dot(pqNormqp.T, QqNormqp))
# Qqp = cvxMatrix(2.*A + wForce * np.dot(Qfqp.T, Qfqp) + wTorque * np.dot(QtauNormqp.T, QtauNormqp))
# pqp = cvxMatrix(b + wForce * np.dot(pfqp.T, Qfqp) + wTorque * np.dot(ptauNormqp.T, QtauNormqp))
# objective : LCP
Qqp = cvxMatrix(A+A.T )
pqp = cvxMatrix(b)
QQ = A+A.T
pp = b.copy()
# objective : torque
if True:
Qqp += cvxMatrix(wTorque * np.dot(Qtauqp.T, Qtauqp) )
pqp += cvxMatrix(wTorque * np.dot(ptauqp.T, Qtauqp))
QQ += wTorque * np.dot(Qtauqp.T, Qtauqp)
pp += wTorque * np.dot(ptauqp.T, Qtauqp)
# objective : q2dot
if False:
Qqp += cvxMatrix(wTorque * np.dot(Q2dotqp.T, Q2dotqp) )
pqp += cvxMatrix(wTorque * np.dot(p2dotqp.T, Q2dotqp))
QQ += wTorque * np.dot(Q2dotqp.T, Q2dotqp)
pp += wTorque * np.dot(p2dotqp.T, Q2dotqp)
# objective : force
if True:
Qqp += cvxMatrix(wForce * np.dot(Qfqp.T, Qfqp) )
pqp += cvxMatrix(wForce * np.dot(pfqp.T, Qfqp))
QQ += wForce * np.dot(Qfqp.T, Qfqp)
pp += wForce * np.dot(pfqp.T, Qfqp)
equalConstForce = False
G = np.vstack((-A[totalDOF:], -np.eye(A.shape[0])[totalDOF:]))
hnp = np.hstack((b[totalDOF:].T, np.zeros(A.shape[0])[totalDOF:]))
# G = np.vstack((-A_ori[totalDOF:], -np.eye(A_ori.shape[0])[totalDOF:]))
# hnp = np.hstack((b[totalDOF:].T, np.zeros(A_ori.shape[0])[totalDOF:]))
if False and not equalConstForce:
# 3direction
# if not equalConstForce:
constMu = .1
constFric = totalForce[1]*constMu
totalForceMat = np.concatenate((np.zeros((6, totalDOF)), N, D, np.zeros_like(N)), axis=1)
G = np.concatenate((G, -totalForceMat[:3], totalForceMat[:3]), axis=0)
hnp = np.hstack((hnp, np.zeros(6)))
hnp[-6] = -totalForce[0] - constFric
hnp[-5] = -totalForce[1] * 0.9
hnp[-4] = -totalForce[2] - constFric
hnp[-3] = totalForce[0] + constFric
hnp[-2] = totalForce[1] * 1.1
hnp[-1] = totalForce[2] + constFric
if False and not equalConstForce:
# just normal direction
# if not equalConstForce:
constMu = .1
constFric = totalForce[1]*constMu
totalForceMat = np.concatenate((np.zeros((6, totalDOF)), N, D, np.zeros_like(N)), axis=1)
G = np.concatenate((G, -totalForceMat[1:2], totalForceMat[1:2]), axis=0)
hnp = np.hstack((hnp, np.zeros(2)))
hnp[-2] = -totalForce[1] * 0.9
hnp[-1] = totalForce[1] * 1.1
# G = np.vstack((G, np.hstack((np.ones((2, N.shape[1])), np.zeros((2, D.shape[1]+N.shape[1]))))))
# G[-2] *= -1.
# hnp = np.hstack((hnp, np.zeros(2)))
# hnp[-2] = -totalForce[1] * .9
# hnp[-1] = totalForce[1] * 1.1
# root torque 0 condition as inequality constraint
# Atauqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
# btauqp = np.dot(pinvM1, (np.asarray(c)-np.asarray(tau0))) - np.array(tau0)
# G = np.concatenate((G, -Atauqp, Atauqp), axis=0)
# hnp = np.hstack((hnp, np.hstack((-btauqp, btauqp))))
# hnp[-2*pinvM1.shape[0]:] += 1. * np.ones(2*pinvM1.shape[0])
Gqp = cvxMatrix(G)
hqp = cvxMatrix(hnp)
# check correctness of equality constraint
# tau = np.dot(pinvM1, -c + tau0 + np.dot(JTN, normalForce) + np.dot(JTD, tangenForce))
# tau = pinvM1*JTN*theta + pinvM1*JTD*phi + pinvM1*tau0 - pinvM1*b + tau0
# Atauqp = np.hstack((np.dot(pinvM1[:6], np.hstack((JTN, JTD))), np.zeros_like(N[:6])))
# btauqp = np.dot(pinvM1[:6], (np.asarray(c)-np.asarray(tau0))) - np.asarray(tau0[:6])
# Atauqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
# btauqp = np.dot(pinvM1, (np.asarray(c)-np.asarray(tau0))) - np.asarray(tau0)
Atauqp = np.hstack((np.eye(6), np.zeros((6, A.shape[1]-6))))
btauqp = np.zeros((6))
AextTorqp = np.concatenate((rcN, rcD, np.zeros_like(N[:3])), axis=1)
bextTorqp = totalForce[3:]
# Atauqp = np.vstack((Atauqp, AextTorqp))
# btauqp = np.hstack((btauqp, bextTorqp))
if equalConstForce:
Atauqp = cvxMatrix(np.vstack((np.concatenate((N[1:2], D[1:2], np.zeros(N[1:2].shape))), Atauqp)))
btauqp = cvxMatrix(np.hstack((np.array(totalForce[1]), btauqp)))
# Atauqp = cvxMatrix(np.vstack((np.concatenate((N[1:2], D[1:2], np.zeros(N[1:2].shape), AextTorqp)), Atauqp)))
# btauqp = cvxMatrix(np.concatenate((np.array(totalForce[1]), bextTorqp, btauqp), axis=1))
Aqp = cvxMatrix(Atauqp)
bqp = cvxMatrix(btauqp)
cvxSolvers.options['show_progress'] = False
cvxSolvers.options['maxiters'] = 100
cvxSolvers.options['refinement'] = 1
cvxSolvers.options['kktsolver'] = "robust"
xqp = np.array(cvxSolvers.qp(Qqp, pqp, Gqp, hqp, Aqp, bqp)['x']).flatten()
x = xqp.copy()
# print "x: ", x
# zqp = np.dot(A_ori, xqp) + b
# zqp = np.dot(A, xqp) + b
# print "QP z: ", np.dot(xqp, zqp)
# if np.dot(xqp, zqp) < np.dot(x, z):
# bp::list qp(const object &H, const object &g, const object &A, const object &lb, const object &ub, const object &lbA, const object ubA, int nWSR)
# print qpos.qp
# lb = [-1000.]*(totalDOF-6)
# lb.extend([0.]*(A.shape[0]-totalDOF))
# xqpos = qpos.qp(QQ[6:, 6:], pp[6:], G[:, 6:], lb, None, None, hnp, 200, False, "NONE")
# xtmp = [0.]*6
# xtmp.extend(xqpos[:])
# x = np.array(xtmp)
# lb = [-1000.]*totalDOF
# lb.extend([0.]*(A.shape[0]-totalDOF))
# xqpos = qpos.qp(QQ, pp, G, lb, None, None, hnp, 200, False, "NONE")
# x = np.array(xqpos)
zqp = np.dot(A, x) + b
'''
cons = []
# for ii in range(A.shape[0]):
# cons.append({'type': 'eq',
# 'fun' : lambda xx: np.dot(Atauqp[i], xx)
# #,'jac' : lambda xx: Atauqp[i]
# })
for ii in range(G.shape[0]):
cons.append({'type':'ineq',
'fun' : lambda xx: -np.dot(G[:,6:][i], xx)+hnp[i]
#,'jac' : lambda xx: -G[i]
})
L-BFGS-B
TNC
COBYLA
SLSQP
res = spopt.minimize(lambda xx: np.dot(xx, .5*np.dot(QQ[6:, 6:], xx)+pp[6:]), xqp[6:],
# jac=lambda xx: np.dot(np.dot(QQ, xx)+pp),
method='SLSQP', constraints=cons, options={'disp': True})
# res = spopt.minimize(lambda xx: np.dot(xx, .5*np.dot(QQ, xx)+pp) , xqp)
print res.x
# print res.hess
# print res.message
'''
except:
# print 'LCPbasicControl!!', e
pass
def refine(xx):
for i in range(len(xx)):
if xx[i] < 0.001:
xx[i] = 0.
return xx
tau = x[:totalDOF]
normalForce = x[totalDOF:totalDOF+contactNum]
tangenForce = x[totalDOF+contactNum:totalDOF+contactNum + numFrictionBases*contactNum]
minTangenVel = x[totalDOF+contactNum + numFrictionBases*contactNum:]
# for i in range(len(tau)):
# tau[i] = 10.*x[i]
# print np.array(tau)
# zqp = np.dot(A, x)+b
lcpValue = np.dot(x[totalDOF:], zqp[totalDOF:])
tauValue = np.dot(tau, tau)
Q2dotqpx = np.dot(Q2dotqp, x)+p2dotqp
q2dotValue = np.dot(Q2dotqpx, Q2dotqpx)
Qfqpx = np.dot(Qfqp, x)+pfqp
forceValue = np.dot(Qfqpx, Qfqpx)
print("LCP value: ", wLCP, lcpValue/wLCP, lcpValue)
print("tau value: ", wTorque, tauValue, wTorque*tauValue)
# print "q2dot value: ", wTorque, q2dotValue, wTorque*q2dotValue
print("For value: ", wForce, forceValue, wForce*forceValue)
# print "x: ", x[totalDOF:]
# print "z: ", zqp[totalDOF:]
# print "b: ", b[totalDOF:]
# print "elevalue: ", np.multiply(x[totalDOF:], zqp[totalDOF:])
forces = []
for cIdx in range(contactNum):
force = np.zeros(3)
force[1] = normalForce[cIdx]
for fcIdx in range(numFrictionBases):
d = np.array((math.cos(2.*math.pi*fcIdx/numFrictionBases), 0., math.sin(2.*math.pi*fcIdx/numFrictionBases)))
force += tangenForce[cIdx*numFrictionBases + fcIdx] * d
# print force
forces.append(force)
# repairForces(forces, contactPositions)
# print forces
return bodyIDs, contactPositions, contactPositionsLocal, forces, tau
def calcLCPbasicControl2(motion, world, model, bodyIDsToCheck, mu, totalForce, wForce, wTorque, tau0=None, numFrictionBases=8):
# tau0 = None
# model = VpControlModel
# numFrictionBases = 8
contactNum, bodyIDs, contactPositions, contactPositionsLocal, contactVelocities, JTN, JTD, E, N, D \
= makeFrictionCone(motion[0].skeleton, world, model, bodyIDsToCheck, numFrictionBases)
if contactNum == 0:
return bodyIDs, contactPositions, contactPositionsLocal, None, None
totalDOF = model.getTotalDOF()
invM = np.zeros((totalDOF, totalDOF))
invMc = np.zeros(totalDOF)
model.getInverseEquationOfMotion(invM, invMc)
# Jc = np.zeros(())
# N = np.zeros(())
# D = np.zeros(())
# E = np.zeros(())
M = npl.inv(invM)
c = np.dot(M, invMc)
Mtmp = np.dot(M, M.T)+np.eye(M.shape[0])
# Mtmp[:6, :6] -= np.eye(6)
pinvM = npl.inv(Mtmp)
h = world.GetTimeStep()
invh = 1./h
mus = mu * np.eye(contactNum)
temp_NM = JTN.T.dot(pinvM)
temp_DM = JTD.T.dot(pinvM)
A10 = wTorque * np.eye(totalDOF)
A20 = h*temp_NM
A21 = h*temp_NM.dot(JTN)
A22 = h*temp_NM.dot(JTD)
A30 = h*temp_DM
A31 = h*temp_DM.dot(JTN)
A32 = h*temp_DM.dot(JTD)
factor = 1.
# A, b = getLCPMatrix(world, model, pinvM0, c, mu, tau0, contactNum, contactPositions, JTN, JTD, E, factor)
A1 = np.concatenate((A10, np.zeros((A10.shape[0], A21.shape[1]+A22.shape[1]+E.shape[1]))), axis=1)
A2 = np.concatenate((A20, A21, A22, np.zeros((A21.shape[0], E.shape[1]))), axis=1)
A3 = np.concatenate((A30, A31, A32, E), axis=1)
A4 = np.concatenate((np.zeros((mus.shape[0], A10.shape[1])), mus, -E.T, np.zeros((mus.shape[0], E.shape[1]))), axis=1)
A0 = np.zeros_like(A1)
A = np.concatenate((A0, A1, A2, A3, A4), axis=0) * factor
# A = 0.01 * np.eye(A.shape[0])*factor
# bx= h * (M*qdot_0 + tau - c)
# b =[N.T * Jc * invM * kx]
# [D.T * Jc * invM * kx]
# [0]
qdot_0 = ype.makeFlatList(totalDOF)
ype.flatten(model.getBodyRootDOFVelocitiesLocal(), qdot_0)
qdot_0 = np.asarray(qdot_0)
if tau0 is None:
tau0 = np.zeros(np.shape(qdot_0))
# non-penentration condition
# b1 = N.T.dot(qdot_0 - h*invMc) + h*temp_NM.dot(tau)
# improved non-penentration condition : add position condition
penDepth = 0.003
bPenDepth = np.zeros(A1.shape[0])
for i in range(contactNum):
if abs(contactPositions[i][1]) > penDepth:
bPenDepth[i] = contactPositions[i][1] + penDepth
b0 = np.zeros(A00.shape[0])
b1 = JTN.T.dot(qdot_0) - h*temp_NM.dot(c) + 0.5*invh*bPenDepth
b2 = JTD.T.dot(qdot_0) - h*temp_DM.dot(c)
b3 = np.zeros(mus.shape[0])
b = np.hstack((b0, np.hstack((np.hstack((b1, b2)), b3)))) * factor
x = 100.*np.ones(A.shape[0])
# for torque equality constraints computation
modelCom = model.getCOM()
rcN = np.zeros((3, N.shape[1]))
rcD = np.zeros((3, D.shape[1]))
for cIdx in range(len(contactPositions)):
r = contactPositions[cIdx] - modelCom
rcN[:3, cIdx] = np.cross(r, N[:3, cIdx])
for fbIdx in range(numFrictionBases):
dIdx = numFrictionBases * cIdx + fbIdx
rcD[:3, dIdx] = np.cross(r, D[:3, dIdx])
if True:
try:
# Qqp = cvxMatrix(A+A.T)
# pqp = cvxMatrix(b)
# Qtauqp = np.hstack((np.dot(pinvM1[:6], np.hstack((JTN, JTD))), np.zeros_like(N[:6])))
# ptauqp = np.dot(pinvM1[:6], (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0[:6])
# Qqp = cvxMatrix(2.*A + wTorque * np.dot(Qtauqp.T, Qtauqp))
# pqp = cvxMatrix(b + wTorque * np.dot(ptauqp.T, Qtauqp))
Qfqp = np.concatenate((np.zeros((3, totalDOF)), N[:3], D[:3], np.zeros_like(N[:3])), axis=1)
pfqp = -totalForce[:3]
# Qfqp = np.concatenate((np.zeros((1, totalDOF)),N[1:2], D[1:2], np.zeros_like(N[1:2])), axis=1)
# pfqp = -totalForce[1:2]
# TODO:
# add momentum term
# QtauNormqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
# ptauNormqp = np.dot(pinvM1, (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0)
# QqNormqp = np.hstack((np.dot(pinvM0, np.hstack((JTN, JTD))), np.zeros((pinvM0.shape[0], N.shape[1]))))
# pqNormqp = np.dot(pinvM0, (-np.asarray(c)+np.asarray(tau0))) + np.asarray(tau0)
# Qqp = cvxMatrix(2.*A + wTorque * np.dot(Qfqp.T, Qfqp) + np.dot(QqNormqp.T, QqNormqp))
# pqp = cvxMatrix(b + wTorque * np.dot(pfqp.T, Qfqp) + np.dot(pqNormqp.T, QqNormqp))
# Qqp = cvxMatrix(2.*A + wForce * np.dot(Qfqp.T, Qfqp) + wTorque * np.dot(QtauNormqp.T, QtauNormqp))
# pqp = cvxMatrix(b + wForce * np.dot(pfqp.T, Qfqp) + wTorque * np.dot(ptauNormqp.T, QtauNormqp))
Qqp = cvxMatrix(2.*A + wForce * np.dot(Qfqp.T, Qfqp) )
pqp = cvxMatrix(b + wForce * np.dot(pfqp.T, Qfqp))
equalConstForce = False
G = np.vstack((-A[totalDOF:], -np.eye(A.shape[0])[totalDOF:]))
hnp = np.hstack((b[totalDOF:].T, np.zeros(A.shape[0])[totalDOF:]))
if False and not equalConstForce:
constMu = .1
constFric = totalForce[1]*constMu
totalForceMat = np.concatenate((N, D, np.zeros_like(N)), axis=1)
G = np.concatenate((G, totalForceMat[:3], totalForceMat[:3]), axis=0)
G[-6] *= -1.
G[-5] *= -1.
G[-4] *= -1.
hnp = np.hstack((hnp, np.zeros(6)))
hnp[-6] = -totalForce[0] - constFric
hnp[-5] = -totalForce[1] * .9
hnp[-4] = -totalForce[2] - constFric
hnp[-3] = totalForce[0] + constFric
hnp[-2] = totalForce[1] * 1.1
hnp[-1] = totalForce[2] + constFric
# G = np.vstack((G, np.hstack((np.ones((2, N.shape[1])), np.zeros((2, D.shape[1]+N.shape[1]))))))
# G[-2] *= -1.
# hnp = np.hstack((hnp, np.zeros(2)))
# hnp[-2] = -totalForce[1] * .9
# hnp[-1] = totalForce[1] * 1.1
# root torque 0 condition as inequality constraint
# Atauqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
# btauqp = np.dot(pinvM1, (np.asarray(c)-np.asarray(tau0))) - np.array(tau0)
# G = np.concatenate((G, -Atauqp, Atauqp), axis=0)
# hnp = np.hstack((hnp, np.hstack((-btauqp, btauqp))))
# hnp[-2*pinvM1.shape[0]:] += 1. * np.ones(2*pinvM1.shape[0])
Gqp = cvxMatrix(G)
hqp = cvxMatrix(hnp)
# check correctness of equality constraint
# tau = np.dot(pinvM1, -c + tau0 + np.dot(JTN, normalForce) + np.dot(JTD, tangenForce))
# tau = pinvM1*JTN*theta + pinvM1*JTD*phi + pinvM1*tau0 - pinvM1*b + tau0
# Atauqp = np.hstack((np.dot(pinvM1[:6], np.hstack((JTN, JTD))), np.zeros_like(N[:6])))
# btauqp = np.dot(pinvM1[:6], (np.asarray(c)-np.asarray(tau0))) - np.asarray(tau0[:6])
# Atauqp = np.hstack((np.dot(pinvM1, np.hstack((JTN, JTD))), np.zeros((pinvM1.shape[0], N.shape[1]))))
# btauqp = np.dot(pinvM1, (np.asarray(c)-np.asarray(tau0))) - np.asarray(tau0)
Atauqp = np.hstack((np.eye(6), np.zeros((6, A.shape[1]-6))))
btauqp = np.zeros((6))
AextTorqp = np.concatenate((rcN, rcD, np.zeros_like(N[:3])), axis=1)
bextTorqp = totalForce[3:]
# Atauqp = np.vstack((Atauqp, AextTorqp))
# btauqp = np.hstack((btauqp, bextTorqp))
if equalConstForce:
Atauqp = cvxMatrix(np.vstack((np.concatenate((N[1:2], D[1:2], np.zeros(N[1:2].shape))), Atauqp)))
btauqp = cvxMatrix(np.hstack((np.array(totalForce[1]), btauqp)))
# Atauqp = cvxMatrix(np.vstack((np.concatenate((N[1:2], D[1:2], np.zeros(N[1:2].shape), AextTorqp)), Atauqp)))
# btauqp = cvxMatrix(np.concatenate((np.array(totalForce[1]), bextTorqp, btauqp), axis=1))
Aqp = cvxMatrix(Atauqp)
bqp = cvxMatrix(btauqp)
cvxSolvers.options['show_progress'] = False
cvxSolvers.options['maxiters'] = 100
cvxSolvers.options['refinement'] = 1
xqp = np.array(cvxSolvers.qp(Qqp, pqp, Gqp, hqp, Aqp, bqp)['x']).flatten()
# xqp = np.asarray(cvxSolvers.qp(Qqp, pqp, Gqp, hqp)['x']).flatten()
# print "x: ", x
# zqp = np.dot(A, xqp).T + b
# print "QP z: ", np.dot(xqp, zqp)
# if np.dot(xqp, zqp) < np.dot(x, z):
x = xqp.copy()
except:
# print 'LCPControl!!', e
pass
tau = x[:totalDOF]
normalForce = x[totalDOF:totalDOF+contactNum]
tangenForce = x[totalDOF+contactNum:totalDOF+contactNum + numFrictionBases*contactNum]
minTangenVel = x[totalDOF+contactNum + numFrictionBases*contactNum:]
forces = []
for cIdx in range(contactNum):
force = np.zeros(3)
force[1] = normalForce[cIdx]
for fcIdx in range(numFrictionBases):
d = np.array((math.cos(2.*math.pi*fcIdx/numFrictionBases), 0., math.sin(2.*math.pi*fcIdx/numFrictionBases)))
force += tangenForce[cIdx*numFrictionBases + fcIdx] * d
# print force
forces.append(force)
# repairForces(forces, contactPositions)
# print forces
return bodyIDs, contactPositions, contactPositionsLocal, forces, tau
| 38.940431 | 159 | 0.567488 | 7,978 | 61,448 | 4.342692 | 0.058285 | 0.026554 | 0.009294 | 0.00788 | 0.84434 | 0.815967 | 0.799746 | 0.764735 | 0.741875 | 0.738527 | 0 | 0.032568 | 0.271954 | 61,448 | 1,577 | 160 | 38.965124 | 0.741869 | 0.289285 | 0 | 0.67205 | 0 | 0 | 0.006334 | 0 | 0 | 0 | 0 | 0.001268 | 0 | 1 | 0.018634 | false | 0.012422 | 0.018634 | 0 | 0.068323 | 0.007453 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f350429f1fd3045200b22c2a7fb2ba1e93b603be | 30 | py | Python | dataset/__init__.py | genisplaja/tf-diffwave | 32b0b403e7ca157f015f9af9f7dcdfa79e312a6a | [
"MIT"
] | 23 | 2020-09-29T08:38:09.000Z | 2022-03-16T03:00:44.000Z | dataset/__init__.py | genisplaja/tf-diffwave | 32b0b403e7ca157f015f9af9f7dcdfa79e312a6a | [
"MIT"
] | 1 | 2020-10-03T08:36:48.000Z | 2020-10-03T08:36:48.000Z | dataset/__init__.py | genisplaja/tf-diffwave | 32b0b403e7ca157f015f9af9f7dcdfa79e312a6a | [
"MIT"
] | 7 | 2020-09-29T19:11:53.000Z | 2022-01-06T14:29:21.000Z | from .ljspeech import LJSpeech | 30 | 30 | 0.866667 | 4 | 30 | 6.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 30 | 1 | 30 | 30 | 0.962963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f35348d993471f770f1a3ed461777b9ee8ca9166 | 27 | py | Python | examples/folsom/__init__.py | quaquel/ptreeopt | d4df26ecd877185b0a8c02c8ecbd3c73e54f6f52 | [
"MIT"
] | 26 | 2017-02-27T01:30:19.000Z | 2022-02-23T07:26:46.000Z | examples/folsom/__init__.py | quaquel/ptreeopt | d4df26ecd877185b0a8c02c8ecbd3c73e54f6f52 | [
"MIT"
] | 8 | 2018-06-28T15:52:49.000Z | 2021-09-27T15:49:50.000Z | examples/folsom/__init__.py | quaquel/ptreeopt | d4df26ecd877185b0a8c02c8ecbd3c73e54f6f52 | [
"MIT"
] | 5 | 2018-03-31T12:48:00.000Z | 2021-09-22T16:36:59.000Z | from .folsom import Folsom
| 13.5 | 26 | 0.814815 | 4 | 27 | 5.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 27 | 1 | 27 | 27 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f3866dafcf049d111f597aabaa3bf7cdad5fed08 | 394 | py | Python | src/batter.py | codingaudrey/SoftBallStrategeSimulator | b0dc74984c1a0ff285b8403263740ac06d0199fc | [
"MIT"
] | null | null | null | src/batter.py | codingaudrey/SoftBallStrategeSimulator | b0dc74984c1a0ff285b8403263740ac06d0199fc | [
"MIT"
] | null | null | null | src/batter.py | codingaudrey/SoftBallStrategeSimulator | b0dc74984c1a0ff285b8403263740ac06d0199fc | [
"MIT"
] | null | null | null | from hit_distribution import HitDistribution
from ball_in_play import BallInPlay
class Batter:
def __init__(self, hit_distribution: HitDistribution, name=""):
self.hit_distribution = hit_distribution
def swing(self, count=1) -> list[BallInPlay]:
return self.hit_distribution.generate_balls_in_play(count)
def __repr__(self):
return self.hit_distribution
| 28.142857 | 67 | 0.751269 | 48 | 394 | 5.770833 | 0.479167 | 0.32491 | 0.274368 | 0.180505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003077 | 0.175127 | 394 | 13 | 68 | 30.307692 | 0.849231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.222222 | 0.222222 | 0.888889 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
f3acb8e550509a11a76dc6b91e9497c9482f3199 | 10,853 | py | Python | DCS325 Distributed System/Distributed File System/file_server/file_server_pb2_grpc.py | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | 1 | 2021-12-17T23:09:00.000Z | 2021-12-17T23:09:00.000Z | DCS325 Distributed System/Distributed File System/file_server/file_server_pb2_grpc.py | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | null | null | null | DCS325 Distributed System/Distributed File System/file_server/file_server_pb2_grpc.py | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | 1 | 2021-08-03T23:42:06.000Z | 2021-08-03T23:42:06.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import file_server_pb2 as file__server__pb2
class file_serverStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.pwd = channel.unary_unary(
'/file_server/pwd',
request_serializer=file__server__pb2.stringMes.SerializeToString,
response_deserializer=file__server__pb2.stringMes.FromString,
)
self.ls = channel.unary_unary(
'/file_server/ls',
request_serializer=file__server__pb2.id.SerializeToString,
response_deserializer=file__server__pb2.stringMes.FromString,
)
self.cd = channel.unary_unary(
'/file_server/cd',
request_serializer=file__server__pb2.stringMes.SerializeToString,
response_deserializer=file__server__pb2.fs_reply.FromString,
)
self.mkdir = channel.unary_unary(
'/file_server/mkdir',
request_serializer=file__server__pb2.stringMes.SerializeToString,
response_deserializer=file__server__pb2.fs_reply.FromString,
)
self.rm = channel.unary_unary(
'/file_server/rm',
request_serializer=file__server__pb2.stringMes.SerializeToString,
response_deserializer=file__server__pb2.fs_reply.FromString,
)
self.upload = channel.unary_unary(
'/file_server/upload',
request_serializer=file__server__pb2.upRequest.SerializeToString,
response_deserializer=file__server__pb2.fs_reply.FromString,
)
self.download = channel.unary_unary(
'/file_server/download',
request_serializer=file__server__pb2.downRequest.SerializeToString,
response_deserializer=file__server__pb2.bufferMes.FromString,
)
class file_serverServicer(object):
"""Missing associated documentation comment in .proto file."""
def pwd(self, request, context):
"""Get the current path of the server
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ls(self, request, context):
"""List files and sub-dirs in the current dir
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def cd(self, request, context):
"""Create a new dir
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def mkdir(self, request, context):
"""Upload a file to a given path
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def rm(self, request, context):
"""Remove a file or an empty dir
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def upload(self, request, context):
"""Change current dir
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def download(self, request, context):
"""Download a file from a given path
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_file_serverServicer_to_server(servicer, server):
rpc_method_handlers = {
'pwd': grpc.unary_unary_rpc_method_handler(
servicer.pwd,
request_deserializer=file__server__pb2.stringMes.FromString,
response_serializer=file__server__pb2.stringMes.SerializeToString,
),
'ls': grpc.unary_unary_rpc_method_handler(
servicer.ls,
request_deserializer=file__server__pb2.id.FromString,
response_serializer=file__server__pb2.stringMes.SerializeToString,
),
'cd': grpc.unary_unary_rpc_method_handler(
servicer.cd,
request_deserializer=file__server__pb2.stringMes.FromString,
response_serializer=file__server__pb2.fs_reply.SerializeToString,
),
'mkdir': grpc.unary_unary_rpc_method_handler(
servicer.mkdir,
request_deserializer=file__server__pb2.stringMes.FromString,
response_serializer=file__server__pb2.fs_reply.SerializeToString,
),
'rm': grpc.unary_unary_rpc_method_handler(
servicer.rm,
request_deserializer=file__server__pb2.stringMes.FromString,
response_serializer=file__server__pb2.fs_reply.SerializeToString,
),
'upload': grpc.unary_unary_rpc_method_handler(
servicer.upload,
request_deserializer=file__server__pb2.upRequest.FromString,
response_serializer=file__server__pb2.fs_reply.SerializeToString,
),
'download': grpc.unary_unary_rpc_method_handler(
servicer.download,
request_deserializer=file__server__pb2.downRequest.FromString,
response_serializer=file__server__pb2.bufferMes.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'file_server', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class file_server(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def pwd(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/file_server/pwd',
file__server__pb2.stringMes.SerializeToString,
file__server__pb2.stringMes.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ls(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/file_server/ls',
file__server__pb2.id.SerializeToString,
file__server__pb2.stringMes.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def cd(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/file_server/cd',
file__server__pb2.stringMes.SerializeToString,
file__server__pb2.fs_reply.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def mkdir(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/file_server/mkdir',
file__server__pb2.stringMes.SerializeToString,
file__server__pb2.fs_reply.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def rm(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/file_server/rm',
file__server__pb2.stringMes.SerializeToString,
file__server__pb2.fs_reply.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def upload(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/file_server/upload',
file__server__pb2.upRequest.SerializeToString,
file__server__pb2.fs_reply.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def download(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/file_server/download',
file__server__pb2.downRequest.SerializeToString,
file__server__pb2.bufferMes.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
| 39.900735 | 87 | 0.6272 | 1,028 | 10,853 | 6.26751 | 0.11284 | 0.093124 | 0.088779 | 0.061462 | 0.847897 | 0.76781 | 0.753686 | 0.712401 | 0.686171 | 0.643489 | 0 | 0.00575 | 0.294941 | 10,853 | 271 | 88 | 40.04797 | 0.836252 | 0.061918 | 0 | 0.63964 | 1 | 0 | 0.059342 | 0.004161 | 0 | 0 | 0 | 0 | 0 | 1 | 0.072072 | false | 0 | 0.009009 | 0.031532 | 0.126126 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1b061d1dfc8e2dd43ebe273b4dae4b374b3c5af6 | 89 | py | Python | time_out.py | simonholmes001/structure_prediction- | 6468267b9973422c169fb0a25a27f62e89b85d3d | [
"BSD-3-Clause"
] | null | null | null | time_out.py | simonholmes001/structure_prediction- | 6468267b9973422c169fb0a25a27f62e89b85d3d | [
"BSD-3-Clause"
] | null | null | null | time_out.py | simonholmes001/structure_prediction- | 6468267b9973422c169fb0a25a27f62e89b85d3d | [
"BSD-3-Clause"
] | null | null | null | import time
print("TIME OUT")
time.sleep(30)
print("TIME OUT FINISHED, lets get going")
| 14.833333 | 42 | 0.730337 | 15 | 89 | 4.333333 | 0.666667 | 0.276923 | 0.369231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025974 | 0.134831 | 89 | 5 | 43 | 17.8 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0.460674 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 0.5 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
1b1b103cef1a2994f50df1730042a0ed7620ba8e | 36,119 | py | Python | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/generated/commands.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/generated/commands.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/generated/commands.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=too-many-statements
# pylint: disable=too-many-locals
# pylint: disable=bad-continuation
# pylint: disable=line-too-long
from msgraph.cli.core.commands import CliCommandType
from azext_usersfunctions_v1_0.generated._client_factory import (
cf_user_activity,
cf_user_calendar_calendar_view_calendar,
cf_user_calendar_calendar_view_instance,
cf_user_calendar_calendar_view,
cf_user_calendar_event_calendar,
cf_user_calendar_event_instance,
cf_user_calendar_event,
cf_user_calendar,
cf_user_calendar_group_calendar_calendar_view_calendar,
cf_user_calendar_group_calendar_calendar_view_instance,
cf_user_calendar_group_calendar_calendar_view,
cf_user_calendar_group_calendar_event_calendar,
cf_user_calendar_group_calendar_event_instance,
cf_user_calendar_group_calendar_event,
cf_user_calendar_group_calendar,
cf_user_calendar_calendar_view_calendar,
cf_user_calendar_calendar_view_instance,
cf_user_calendar_calendar_view,
cf_user_calendar_event_calendar,
cf_user_calendar_event_instance,
cf_user_calendar_event,
cf_user_calendar,
cf_user_calendar_view_calendar_calendar_view,
cf_user_calendar_view_calendar_event,
cf_user_calendar_view_calendar,
cf_user_calendar_view_instance,
cf_user_calendar_view,
cf_user_contact_folder_child_folder,
cf_user_contact_folder_contact,
cf_user_contact_folder,
cf_user_contact,
cf_user_event_calendar_calendar_view,
cf_user_event_calendar_event,
cf_user_event_calendar,
cf_user_event_instance,
cf_user_event,
cf_user_mail_folder_child_folder,
cf_user_mail_folder_message,
cf_user_mail_folder,
cf_user_managed_app_registration,
cf_user_message,
cf_user,
cf_user_onenote_notebook_section_group_section_page,
cf_user_onenote_notebook_section_page,
cf_user_onenote_notebook,
cf_user_onenote_page,
cf_user_onenote_page_parent_notebook_section_group_section_page,
cf_user_onenote_page_parent_notebook_section_page,
cf_user_onenote_page_parent_section_page,
cf_user_onenote_section_group_parent_notebook_section_page,
cf_user_onenote_section_group_section_page,
cf_user_onenote_section_page,
cf_user_outlook,
)
usersfunctions_v1_0_user_activity = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_activities_operations#UsersActivitiesOperations.{}',
client_factory=cf_user_activity,
)
usersfunctions_v1_0_user_calendar_calendar_view_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_calendar_view_calendar_operations#UsersCalendarCalendarViewCalendarOperations.{}',
client_factory=cf_user_calendar_calendar_view_calendar,
)
usersfunctions_v1_0_user_calendar_calendar_view_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_calendar_view_instances_operations#UsersCalendarCalendarViewInstancesOperations.{}',
client_factory=cf_user_calendar_calendar_view_instance,
)
usersfunctions_v1_0_user_calendar_calendar_view = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_calendar_view_operations#UsersCalendarCalendarViewOperations.{}',
client_factory=cf_user_calendar_calendar_view,
)
usersfunctions_v1_0_user_calendar_event_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_events_calendar_operations#UsersCalendarEventsCalendarOperations.{}',
client_factory=cf_user_calendar_event_calendar,
)
usersfunctions_v1_0_user_calendar_event_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_events_instances_operations#UsersCalendarEventsInstancesOperations.{}',
client_factory=cf_user_calendar_event_instance,
)
usersfunctions_v1_0_user_calendar_event = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_events_operations#UsersCalendarEventsOperations.{}',
client_factory=cf_user_calendar_event,
)
usersfunctions_v1_0_user_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_operations#UsersCalendarOperations.{}',
client_factory=cf_user_calendar,
)
usersfunctions_v1_0_user_calendar_group_calendar_calendar_view_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_groups_calendars_calendar_view_calendar_operations#UsersCalendarGroupsCalendarsCalendarViewCalendarOperations.{}',
client_factory=cf_user_calendar_group_calendar_calendar_view_calendar,
)
usersfunctions_v1_0_user_calendar_group_calendar_calendar_view_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_groups_calendars_calendar_view_instances_operations#UsersCalendarGroupsCalendarsCalendarViewInstancesOperations.{}',
client_factory=cf_user_calendar_group_calendar_calendar_view_instance,
)
usersfunctions_v1_0_user_calendar_group_calendar_calendar_view = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_groups_calendars_calendar_view_operations#UsersCalendarGroupsCalendarsCalendarViewOperations.{}',
client_factory=cf_user_calendar_group_calendar_calendar_view,
)
usersfunctions_v1_0_user_calendar_group_calendar_event_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_groups_calendars_events_calendar_operations#UsersCalendarGroupsCalendarsEventsCalendarOperations.{}',
client_factory=cf_user_calendar_group_calendar_event_calendar,
)
usersfunctions_v1_0_user_calendar_group_calendar_event_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_groups_calendars_events_instances_operations#UsersCalendarGroupsCalendarsEventsInstancesOperations.{}',
client_factory=cf_user_calendar_group_calendar_event_instance,
)
usersfunctions_v1_0_user_calendar_group_calendar_event = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_groups_calendars_events_operations#UsersCalendarGroupsCalendarsEventsOperations.{}',
client_factory=cf_user_calendar_group_calendar_event,
)
usersfunctions_v1_0_user_calendar_group_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_groups_calendars_operations#UsersCalendarGroupsCalendarsOperations.{}',
client_factory=cf_user_calendar_group_calendar,
)
usersfunctions_v1_0_user_calendar_calendar_view_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendars_calendar_view_calendar_operations#UsersCalendarsCalendarViewCalendarOperations.{}',
client_factory=cf_user_calendar_calendar_view_calendar,
)
usersfunctions_v1_0_user_calendar_calendar_view_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendars_calendar_view_instances_operations#UsersCalendarsCalendarViewInstancesOperations.{}',
client_factory=cf_user_calendar_calendar_view_instance,
)
usersfunctions_v1_0_user_calendar_calendar_view = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendars_calendar_view_operations#UsersCalendarsCalendarViewOperations.{}',
client_factory=cf_user_calendar_calendar_view,
)
usersfunctions_v1_0_user_calendar_event_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendars_events_calendar_operations#UsersCalendarsEventsCalendarOperations.{}',
client_factory=cf_user_calendar_event_calendar,
)
usersfunctions_v1_0_user_calendar_event_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendars_events_instances_operations#UsersCalendarsEventsInstancesOperations.{}',
client_factory=cf_user_calendar_event_instance,
)
usersfunctions_v1_0_user_calendar_event = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendars_events_operations#UsersCalendarsEventsOperations.{}',
client_factory=cf_user_calendar_event,
)
usersfunctions_v1_0_user_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendars_operations#UsersCalendarsOperations.{}',
client_factory=cf_user_calendar,
)
usersfunctions_v1_0_user_calendar_view_calendar_calendar_view = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_view_calendar_calendar_view_operations#UsersCalendarViewCalendarCalendarViewOperations.{}',
client_factory=cf_user_calendar_view_calendar_calendar_view,
)
usersfunctions_v1_0_user_calendar_view_calendar_event = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_view_calendar_events_operations#UsersCalendarViewCalendarEventsOperations.{}',
client_factory=cf_user_calendar_view_calendar_event,
)
usersfunctions_v1_0_user_calendar_view_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_view_calendar_operations#UsersCalendarViewCalendarOperations.{}',
client_factory=cf_user_calendar_view_calendar,
)
usersfunctions_v1_0_user_calendar_view_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_view_instances_operations#UsersCalendarViewInstancesOperations.{}',
client_factory=cf_user_calendar_view_instance,
)
usersfunctions_v1_0_user_calendar_view = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_calendar_view_operations#UsersCalendarViewOperations.{}',
client_factory=cf_user_calendar_view,
)
usersfunctions_v1_0_user_contact_folder_child_folder = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_contact_folders_child_folders_operations#UsersContactFoldersChildFoldersOperations.{}',
client_factory=cf_user_contact_folder_child_folder,
)
usersfunctions_v1_0_user_contact_folder_contact = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_contact_folders_contacts_operations#UsersContactFoldersContactsOperations.{}',
client_factory=cf_user_contact_folder_contact,
)
usersfunctions_v1_0_user_contact_folder = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_contact_folders_operations#UsersContactFoldersOperations.{}',
client_factory=cf_user_contact_folder,
)
usersfunctions_v1_0_user_contact = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_contacts_operations#UsersContactsOperations.{}',
client_factory=cf_user_contact,
)
usersfunctions_v1_0_user_event_calendar_calendar_view = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_events_calendar_calendar_view_operations#UsersEventsCalendarCalendarViewOperations.{}',
client_factory=cf_user_event_calendar_calendar_view,
)
usersfunctions_v1_0_user_event_calendar_event = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_events_calendar_events_operations#UsersEventsCalendarEventsOperations.{}',
client_factory=cf_user_event_calendar_event,
)
usersfunctions_v1_0_user_event_calendar = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_events_calendar_operations#UsersEventsCalendarOperations.{}',
client_factory=cf_user_event_calendar,
)
usersfunctions_v1_0_user_event_instance = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_events_instances_operations#UsersEventsInstancesOperations.{}',
client_factory=cf_user_event_instance,
)
usersfunctions_v1_0_user_event = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_events_operations#UsersEventsOperations.{}',
client_factory=cf_user_event,
)
usersfunctions_v1_0_user_mail_folder_child_folder = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_mail_folders_child_folders_operations#UsersMailFoldersChildFoldersOperations.{}',
client_factory=cf_user_mail_folder_child_folder,
)
usersfunctions_v1_0_user_mail_folder_message = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_mail_folders_messages_operations#UsersMailFoldersMessagesOperations.{}',
client_factory=cf_user_mail_folder_message,
)
usersfunctions_v1_0_user_mail_folder = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_mail_folders_operations#UsersMailFoldersOperations.{}',
client_factory=cf_user_mail_folder,
)
usersfunctions_v1_0_user_managed_app_registration = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_managed_app_registrations_operations#UsersManagedAppRegistrationsOperations.{}',
client_factory=cf_user_managed_app_registration,
)
usersfunctions_v1_0_user_message = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_messages_operations#UsersMessagesOperations.{}',
client_factory=cf_user_message,
)
usersfunctions_v1_0_user = CliCommandType(
operations_tmpl=(
'azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_operations#UsersOperations.{}'
),
client_factory=cf_user,
)
usersfunctions_v1_0_user_onenote_notebook_section_group_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_notebooks_section_groups_sections_pages_operations#UsersOnenoteNotebooksSectionGroupsSectionsPagesOperations.{}',
client_factory=cf_user_onenote_notebook_section_group_section_page,
)
usersfunctions_v1_0_user_onenote_notebook_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_notebooks_sections_pages_operations#UsersOnenoteNotebooksSectionsPagesOperations.{}',
client_factory=cf_user_onenote_notebook_section_page,
)
usersfunctions_v1_0_user_onenote_notebook = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_notebooks_operations#UsersOnenoteNotebooksOperations.{}',
client_factory=cf_user_onenote_notebook,
)
usersfunctions_v1_0_user_onenote_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_pages_operations#UsersOnenotePagesOperations.{}',
client_factory=cf_user_onenote_page,
)
usersfunctions_v1_0_user_onenote_page_parent_notebook_section_group_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_pages_parent_notebook_section_groups_sections_pages_operations#UsersOnenotePagesParentNotebookSectionGroupsSectionsPagesOperations.{}',
client_factory=cf_user_onenote_page_parent_notebook_section_group_section_page,
)
usersfunctions_v1_0_user_onenote_page_parent_notebook_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_pages_parent_notebook_sections_pages_operations#UsersOnenotePagesParentNotebookSectionsPagesOperations.{}',
client_factory=cf_user_onenote_page_parent_notebook_section_page,
)
usersfunctions_v1_0_user_onenote_page_parent_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_pages_parent_section_pages_operations#UsersOnenotePagesParentSectionPagesOperations.{}',
client_factory=cf_user_onenote_page_parent_section_page,
)
usersfunctions_v1_0_user_onenote_section_group_parent_notebook_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_section_groups_parent_notebook_sections_pages_operations#UsersOnenoteSectionGroupsParentNotebookSectionsPagesOperations.{}',
client_factory=cf_user_onenote_section_group_parent_notebook_section_page,
)
usersfunctions_v1_0_user_onenote_section_group_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_section_groups_sections_pages_operations#UsersOnenoteSectionGroupsSectionsPagesOperations.{}',
client_factory=cf_user_onenote_section_group_section_page,
)
usersfunctions_v1_0_user_onenote_section_page = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_onenote_sections_pages_operations#UsersOnenoteSectionsPagesOperations.{}',
client_factory=cf_user_onenote_section_page,
)
usersfunctions_v1_0_user_outlook = CliCommandType(
operations_tmpl='azext_usersfunctions_v1_0.vendored_sdks.usersfunctions.operations._users_outlook_operations#UsersOutlookOperations.{}',
client_factory=cf_user_outlook,
)
def load_command_table(self, _):
with self.command_group(
'usersfunctions user-activity', usersfunctions_v1_0_user_activity, client_factory=cf_user_activity
) as g:
g.custom_command('recent', 'usersfunctions_user_activity_recent')
with self.command_group(
'usersfunctions user-calendar-calendar-view-calendar',
usersfunctions_v1_0_user_calendar_calendar_view_calendar,
client_factory=cf_user_calendar_calendar_view_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role',
'usersfunctions_user_calendar_calendar_view_calendar_allowed_calendar_sharing_role',
)
with self.command_group(
'usersfunctions user-calendar-calendar-view-instance',
usersfunctions_v1_0_user_calendar_calendar_view_instance,
client_factory=cf_user_calendar_calendar_view_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_calendar_view_instance_delta')
with self.command_group(
'usersfunctions user-calendar-calendar-view',
usersfunctions_v1_0_user_calendar_calendar_view,
client_factory=cf_user_calendar_calendar_view,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_calendar_view_delta')
with self.command_group(
'usersfunctions user-calendar-event-calendar',
usersfunctions_v1_0_user_calendar_event_calendar,
client_factory=cf_user_calendar_event_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role', 'usersfunctions_user_calendar_event_calendar_allowed_calendar_sharing_role'
)
with self.command_group(
'usersfunctions user-calendar-event-instance',
usersfunctions_v1_0_user_calendar_event_instance,
client_factory=cf_user_calendar_event_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_event_instance_delta')
with self.command_group(
'usersfunctions user-calendar-event',
usersfunctions_v1_0_user_calendar_event,
client_factory=cf_user_calendar_event,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_event_delta')
with self.command_group(
'usersfunctions user-calendar', usersfunctions_v1_0_user_calendar, client_factory=cf_user_calendar
) as g:
g.custom_command('allowed-calendar-sharing-role', 'usersfunctions_user_calendar_allowed_calendar_sharing_role')
with self.command_group(
'usersfunctions user-calendar-group-calendar-calendar-view-calendar',
usersfunctions_v1_0_user_calendar_group_calendar_calendar_view_calendar,
client_factory=cf_user_calendar_group_calendar_calendar_view_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role',
'usersfunctions_user_calendar_group_calendar_calendar_view_calendar_allowed_calendar_sharing_role',
)
with self.command_group(
'usersfunctions user-calendar-group-calendar-calendar-view-instance',
usersfunctions_v1_0_user_calendar_group_calendar_calendar_view_instance,
client_factory=cf_user_calendar_group_calendar_calendar_view_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_group_calendar_calendar_view_instance_delta')
with self.command_group(
'usersfunctions user-calendar-group-calendar-calendar-view',
usersfunctions_v1_0_user_calendar_group_calendar_calendar_view,
client_factory=cf_user_calendar_group_calendar_calendar_view,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_group_calendar_calendar_view_delta')
with self.command_group(
'usersfunctions user-calendar-group-calendar-event-calendar',
usersfunctions_v1_0_user_calendar_group_calendar_event_calendar,
client_factory=cf_user_calendar_group_calendar_event_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role',
'usersfunctions_user_calendar_group_calendar_event_calendar_allowed_calendar_sharing_role',
)
with self.command_group(
'usersfunctions user-calendar-group-calendar-event-instance',
usersfunctions_v1_0_user_calendar_group_calendar_event_instance,
client_factory=cf_user_calendar_group_calendar_event_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_group_calendar_event_instance_delta')
with self.command_group(
'usersfunctions user-calendar-group-calendar-event',
usersfunctions_v1_0_user_calendar_group_calendar_event,
client_factory=cf_user_calendar_group_calendar_event,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_group_calendar_event_delta')
with self.command_group(
'usersfunctions user-calendar-group-calendar',
usersfunctions_v1_0_user_calendar_group_calendar,
client_factory=cf_user_calendar_group_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role', 'usersfunctions_user_calendar_group_calendar_allowed_calendar_sharing_role'
)
with self.command_group(
'usersfunctions user-calendar-calendar-view-calendar',
usersfunctions_v1_0_user_calendar_calendar_view_calendar,
client_factory=cf_user_calendar_calendar_view_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role',
'usersfunctions_user_calendar_calendar_view_calendar_allowed_calendar_sharing_role',
)
with self.command_group(
'usersfunctions user-calendar-calendar-view-instance',
usersfunctions_v1_0_user_calendar_calendar_view_instance,
client_factory=cf_user_calendar_calendar_view_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_calendar_view_instance_delta')
with self.command_group(
'usersfunctions user-calendar-calendar-view',
usersfunctions_v1_0_user_calendar_calendar_view,
client_factory=cf_user_calendar_calendar_view,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_calendar_view_delta')
with self.command_group(
'usersfunctions user-calendar-event-calendar',
usersfunctions_v1_0_user_calendar_event_calendar,
client_factory=cf_user_calendar_event_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role', 'usersfunctions_user_calendar_event_calendar_allowed_calendar_sharing_role'
)
with self.command_group(
'usersfunctions user-calendar-event-instance',
usersfunctions_v1_0_user_calendar_event_instance,
client_factory=cf_user_calendar_event_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_event_instance_delta')
with self.command_group(
'usersfunctions user-calendar-event',
usersfunctions_v1_0_user_calendar_event,
client_factory=cf_user_calendar_event,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_event_delta')
with self.command_group(
'usersfunctions user-calendar', usersfunctions_v1_0_user_calendar, client_factory=cf_user_calendar
) as g:
g.custom_command('allowed-calendar-sharing-role', 'usersfunctions_user_calendar_allowed_calendar_sharing_role')
with self.command_group(
'usersfunctions user-calendar-view-calendar-calendar-view',
usersfunctions_v1_0_user_calendar_view_calendar_calendar_view,
client_factory=cf_user_calendar_view_calendar_calendar_view,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_view_calendar_calendar_view_delta')
with self.command_group(
'usersfunctions user-calendar-view-calendar-event',
usersfunctions_v1_0_user_calendar_view_calendar_event,
client_factory=cf_user_calendar_view_calendar_event,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_view_calendar_event_delta')
with self.command_group(
'usersfunctions user-calendar-view-calendar',
usersfunctions_v1_0_user_calendar_view_calendar,
client_factory=cf_user_calendar_view_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role', 'usersfunctions_user_calendar_view_calendar_allowed_calendar_sharing_role'
)
with self.command_group(
'usersfunctions user-calendar-view-instance',
usersfunctions_v1_0_user_calendar_view_instance,
client_factory=cf_user_calendar_view_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_view_instance_delta')
with self.command_group(
'usersfunctions user-calendar-view',
usersfunctions_v1_0_user_calendar_view,
client_factory=cf_user_calendar_view,
) as g:
g.custom_command('delta', 'usersfunctions_user_calendar_view_delta')
with self.command_group(
'usersfunctions user-contact-folder-child-folder',
usersfunctions_v1_0_user_contact_folder_child_folder,
client_factory=cf_user_contact_folder_child_folder,
) as g:
g.custom_command('delta', 'usersfunctions_user_contact_folder_child_folder_delta')
with self.command_group(
'usersfunctions user-contact-folder-contact',
usersfunctions_v1_0_user_contact_folder_contact,
client_factory=cf_user_contact_folder_contact,
) as g:
g.custom_command('delta', 'usersfunctions_user_contact_folder_contact_delta')
with self.command_group(
'usersfunctions user-contact-folder',
usersfunctions_v1_0_user_contact_folder,
client_factory=cf_user_contact_folder,
) as g:
g.custom_command('delta', 'usersfunctions_user_contact_folder_delta')
with self.command_group(
'usersfunctions user-contact', usersfunctions_v1_0_user_contact, client_factory=cf_user_contact
) as g:
g.custom_command('delta', 'usersfunctions_user_contact_delta')
with self.command_group(
'usersfunctions user-event-calendar-calendar-view',
usersfunctions_v1_0_user_event_calendar_calendar_view,
client_factory=cf_user_event_calendar_calendar_view,
) as g:
g.custom_command('delta', 'usersfunctions_user_event_calendar_calendar_view_delta')
with self.command_group(
'usersfunctions user-event-calendar-event',
usersfunctions_v1_0_user_event_calendar_event,
client_factory=cf_user_event_calendar_event,
) as g:
g.custom_command('delta', 'usersfunctions_user_event_calendar_event_delta')
with self.command_group(
'usersfunctions user-event-calendar',
usersfunctions_v1_0_user_event_calendar,
client_factory=cf_user_event_calendar,
) as g:
g.custom_command(
'allowed-calendar-sharing-role', 'usersfunctions_user_event_calendar_allowed_calendar_sharing_role'
)
with self.command_group(
'usersfunctions user-event-instance',
usersfunctions_v1_0_user_event_instance,
client_factory=cf_user_event_instance,
) as g:
g.custom_command('delta', 'usersfunctions_user_event_instance_delta')
with self.command_group(
'usersfunctions user-event', usersfunctions_v1_0_user_event, client_factory=cf_user_event
) as g:
g.custom_command('delta', 'usersfunctions_user_event_delta')
with self.command_group(
'usersfunctions user-mail-folder-child-folder',
usersfunctions_v1_0_user_mail_folder_child_folder,
client_factory=cf_user_mail_folder_child_folder,
) as g:
g.custom_command('delta', 'usersfunctions_user_mail_folder_child_folder_delta')
with self.command_group(
'usersfunctions user-mail-folder-message',
usersfunctions_v1_0_user_mail_folder_message,
client_factory=cf_user_mail_folder_message,
) as g:
g.custom_command('delta', 'usersfunctions_user_mail_folder_message_delta')
with self.command_group(
'usersfunctions user-mail-folder', usersfunctions_v1_0_user_mail_folder, client_factory=cf_user_mail_folder
) as g:
g.custom_command('delta', 'usersfunctions_user_mail_folder_delta')
with self.command_group(
'usersfunctions user-managed-app-registration',
usersfunctions_v1_0_user_managed_app_registration,
client_factory=cf_user_managed_app_registration,
) as g:
g.custom_command(
'show-user-id-with-flagged-app-registration',
'usersfunctions_user_managed_app_registration_show_user_id_with_flagged_app_registration',
)
with self.command_group(
'usersfunctions user-message', usersfunctions_v1_0_user_message, client_factory=cf_user_message
) as g:
g.custom_command('delta', 'usersfunctions_user_message_delta')
with self.command_group('usersfunctions user', usersfunctions_v1_0_user, client_factory=cf_user) as g:
g.custom_command('delta', 'usersfunctions_user_delta')
g.custom_command('reminder-view', 'usersfunctions_user_reminder_view')
g.custom_command(
'show-managed-app-diagnostic-statuses', 'usersfunctions_user_show_managed_app_diagnostic_statuses'
)
g.custom_command('show-managed-app-policy', 'usersfunctions_user_show_managed_app_policy')
with self.command_group(
'usersfunctions user-onenote-notebook-section-group-section-page',
usersfunctions_v1_0_user_onenote_notebook_section_group_section_page,
client_factory=cf_user_onenote_notebook_section_group_section_page,
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_notebook_section_group_section_page_preview')
with self.command_group(
'usersfunctions user-onenote-notebook-section-page',
usersfunctions_v1_0_user_onenote_notebook_section_page,
client_factory=cf_user_onenote_notebook_section_page,
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_notebook_section_page_preview')
with self.command_group(
'usersfunctions user-onenote-notebook',
usersfunctions_v1_0_user_onenote_notebook,
client_factory=cf_user_onenote_notebook,
) as g:
g.custom_command('show-recent-notebook', 'usersfunctions_user_onenote_notebook_show_recent_notebook')
with self.command_group(
'usersfunctions user-onenote-page', usersfunctions_v1_0_user_onenote_page, client_factory=cf_user_onenote_page
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_page_preview')
with self.command_group(
'usersfunctions user-onenote-page-parent-notebook-section-group-section-page',
usersfunctions_v1_0_user_onenote_page_parent_notebook_section_group_section_page,
client_factory=cf_user_onenote_page_parent_notebook_section_group_section_page,
) as g:
g.custom_command(
'preview', 'usersfunctions_user_onenote_page_parent_notebook_section_group_section_page_preview'
)
with self.command_group(
'usersfunctions user-onenote-page-parent-notebook-section-page',
usersfunctions_v1_0_user_onenote_page_parent_notebook_section_page,
client_factory=cf_user_onenote_page_parent_notebook_section_page,
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_page_parent_notebook_section_page_preview')
with self.command_group(
'usersfunctions user-onenote-page-parent-section-page',
usersfunctions_v1_0_user_onenote_page_parent_section_page,
client_factory=cf_user_onenote_page_parent_section_page,
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_page_parent_section_page_preview')
with self.command_group(
'usersfunctions user-onenote-section-group-parent-notebook-section-page',
usersfunctions_v1_0_user_onenote_section_group_parent_notebook_section_page,
client_factory=cf_user_onenote_section_group_parent_notebook_section_page,
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_section_group_parent_notebook_section_page_preview')
with self.command_group(
'usersfunctions user-onenote-section-group-section-page',
usersfunctions_v1_0_user_onenote_section_group_section_page,
client_factory=cf_user_onenote_section_group_section_page,
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_section_group_section_page_preview')
with self.command_group(
'usersfunctions user-onenote-section-page',
usersfunctions_v1_0_user_onenote_section_page,
client_factory=cf_user_onenote_section_page,
) as g:
g.custom_command('preview', 'usersfunctions_user_onenote_section_page_preview')
with self.command_group(
'usersfunctions user-outlook', usersfunctions_v1_0_user_outlook, client_factory=cf_user_outlook
) as g:
g.custom_command('supported-language', 'usersfunctions_user_outlook_supported_language')
g.custom_command('supported-time-zone-ee48', 'usersfunctions_user_outlook_supported_time_zone_ee48')
g.custom_command('supported-time-zones51-c6', 'usersfunctions_user_outlook_supported_time_zones51_c6')
with self.command_group('usersfunctions_v1_0', is_experimental=True):
pass
| 46.30641 | 237 | 0.818267 | 4,143 | 36,119 | 6.534395 | 0.044412 | 0.080674 | 0.101101 | 0.082225 | 0.865174 | 0.830858 | 0.797244 | 0.768802 | 0.720412 | 0.680223 | 0 | 0.010395 | 0.115756 | 36,119 | 779 | 238 | 46.365854 | 0.837247 | 0.015781 | 0 | 0.457711 | 0 | 0 | 0.403546 | 0.366568 | 0 | 0 | 0 | 0 | 0 | 1 | 0.001658 | false | 0.001658 | 0.003317 | 0 | 0.004975 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1b3f34326625b4689c7e00359d28646107aaed81 | 5,714 | py | Python | api/tests/tests_api_views.py | Nels885/csd_dashboard | aa5a3b970c50a2a93af722f962bd87c3728f233c | [
"MIT"
] | null | null | null | api/tests/tests_api_views.py | Nels885/csd_dashboard | aa5a3b970c50a2a93af722f962bd87c3728f233c | [
"MIT"
] | null | null | null | api/tests/tests_api_views.py | Nels885/csd_dashboard | aa5a3b970c50a2a93af722f962bd87c3728f233c | [
"MIT"
] | null | null | null | from django.urls import reverse
from rest_framework.test import APITestCase, APIClient
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
class ApiTestCase(APITestCase):
def setUp(self):
self.client = APIClient()
User.objects.create_user(username='toto', password='totopassword')
admin = User.objects.create_superuser(username='admin', password='adminpassword', email='admin@test.com')
self.authError = {"detail": "Informations d'authentification non fournies."}
self.token = Token.objects.get(user=admin)
def login(self, user='user'):
if user == 'admin':
self.client.login(username='admin', password='adminpassword')
else:
self.client.login(username='toto', password='totopassword')
def api_view_list(self, url):
response = self.client.get(url, format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get(url + '?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 4)
self.assertEqual(response.data, {"count": 0, "next": None, "previous": None, "results": []})
def test_documentation_view(self):
response = self.client.get(reverse('api:doc'))
self.assertEqual(response.status_code, 200)
def test_unlock_list(self):
self.api_view_list(reverse('api:unlock-list'))
def test_prog_list(self):
response = self.client.get(reverse('api:prog-list'), format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get('/api/prog/?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 4)
self.assertEqual(response.data, {"count": 0, "next": None, "previous": None, "results": []})
def test_cal_list(self):
response = self.client.get(reverse('api:cal-list'), format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get('/api/cal/?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 4)
self.assertEqual(response.data, {"count": 0, "next": None, "previous": None, "results": []})
def test_batch_list(self):
response = self.client.get(reverse('api:reman_batch-list'), format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get('/api/reman/batch/?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 4)
self.assertEqual(response.data, {"count": 0, "next": None, "previous": None, "results": []})
def test_checkout_list(self):
response = self.client.get(reverse('api:reman_checkout-list'), format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get('/api/reman/checkout/?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 4)
self.assertEqual(response.data, {"count": 0, "next": None, "previous": None, "results": []})
def test_repair_list(self):
response = self.client.get(reverse('api:reman_repair-list'), format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get('/api/reman/repair/?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 4)
self.assertEqual(response.data, {"count": 0, "next": None, "previous": None, "results": []})
def test_ecurefbase_list(self):
response = self.client.get(reverse('api:reman_ecurefbase-list'), format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get('/api/reman/ecurefbase/?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 4)
self.assertEqual(response.data, {"count": 0, "next": None, "previous": None, "results": []})
def test_nac_license_view(self):
response = self.client.get(reverse('api:nac_license'), format='json')
self.assertEqual(response.status_code, 401)
self.assertEqual(response.data, self.authError)
# Identification with Token
response = self.client.get('/api/nac-license/?auth_token={}'.format(self.token), format='json')
self.assertEqual(response.status_code, 500)
self.assertEqual(len(response.data), 1)
self.assertEqual(response.data, {"error": "Request failed"})
def test_thermal_chamber_measure_list(self):
self.api_view_list(reverse('api:tools_tc_measure-list'))
def test_bga_time_list(self):
self.api_view_list(reverse('api:tools_bga_time-list'))
| 46.836066 | 113 | 0.672734 | 689 | 5,714 | 5.474601 | 0.130624 | 0.163043 | 0.20122 | 0.094645 | 0.764051 | 0.74894 | 0.739396 | 0.739396 | 0.68929 | 0.622481 | 0 | 0.014082 | 0.179734 | 5,714 | 121 | 114 | 47.223141 | 0.790698 | 0.036227 | 0 | 0.426966 | 0 | 0 | 0.148599 | 0.059658 | 0 | 0 | 0 | 0 | 0.460674 | 1 | 0.157303 | false | 0.044944 | 0.044944 | 0 | 0.213483 | 0 | 0 | 0 | 0 | null | 0 | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1b57e0d3d7beed21089d1b58dad68cab905d263d | 11,095 | py | Python | test/test_eofunc.py | dimaclimate/geocat-comp | dcb55e22d69d96762b683652cf83f6b9ef4fcc38 | [
"Apache-2.0"
] | 76 | 2019-09-20T20:13:45.000Z | 2022-03-30T22:50:13.000Z | test/test_eofunc.py | albernsrya/geocat-comp | 17e1e0129477b0a0d5671e949ed3bc2729ec8784 | [
"Apache-2.0"
] | 154 | 2019-07-24T20:02:27.000Z | 2022-03-29T20:32:20.000Z | test/test_eofunc.py | albernsrya/geocat-comp | 17e1e0129477b0a0d5671e949ed3bc2729ec8784 | [
"Apache-2.0"
] | 34 | 2019-07-18T20:02:38.000Z | 2022-03-31T13:40:22.000Z | import sys
from abc import ABCMeta
from unittest import TestCase
import numpy as np
import numpy.testing as nt
# from dask.array.tests.test_xarray import xr
import xarray as xr
# Import from directory structure if coverage test, or from installed
# packages otherwise
if "--cov" in str(sys.argv):
from src.geocat.comp import eofunc, eofunc_eofs, eofunc_pcs, eofunc_ts
else:
from geocat.comp import eofunc, eofunc_eofs, eofunc_pcs, eofunc_ts
class BaseEOFTestClass(metaclass=ABCMeta):
_sample_data_eof = []
# _sample_data[ 0 ]
_sample_data_eof.append([[[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11],
[12, 13, 14, 15]],
[[16, 17, 18, 19], [20, 21, 22, 23],
[24, 25, 26, 27], [28, 29, 30, 31]],
[[32, 33, 34, 35], [36, 37, 38, 39],
[40, 41, 42, 43], [44, 45, 46, 47]],
[[48, 49, 50, 51], [52, 53, 54, 55],
[56, 57, 58, 59], [60, 61, 62, 63]]])
# _sample_data[ 1 ]
_sample_data_eof.append(np.arange(64, dtype='double').reshape((4, 4, 4)))
# _sample_data[ 2 ]
tmp_data = np.asarray([
0, 1, -99, -99, 4, -99, 6, -99, 8, 9, 10, -99, 12, -99, 14, 15, 16, -99,
18, -99, 20, 21, 22, -99, 24, 25, 26, 27, 28, -99, 30, -99, 32, 33, 34,
35, 36, -99, 38, 39, 40, -99, 42, -99, 44, 45, 46, -99, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
],
dtype='double').reshape((4, 4, 4))
_sample_data_eof.append(tmp_data)
# _sample_data[ 3 ]
tmp_data = np.asarray([
0, 1, -99, -99, 4, -99, 6, -99, 8, 9, 10, -99, 12, -99, 14, 15, 16, -99,
18, -99, 20, 21, 22, -99, 24, 25, 26, 27, 28, -99, 30, -99, 32, 33, 34,
35, 36, -99, 38, 39, 40, -99, 42, -99, 44, 45, 46, -99, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
],
dtype='double').reshape((4, 4, 4))
tmp_data[tmp_data == -99] = np.nan
_sample_data_eof.append(tmp_data)
# _sample_data[ 4 ]
_sample_data_eof.append(np.arange(64, dtype='int64').reshape((4, 4, 4)))
try:
_nc_ds = xr.open_dataset("eofunc_dataset.nc")
except:
_nc_ds = xr.open_dataset("test/eofunc_dataset.nc")
_num_attrs = 4
expected_output = np.full((1, 4, 4), 0.25)
expected_eigen_val_time_dim_2 = 26.66666
expected_eigen_val_time_dim_1 = 426.66666
expected_eigen_val_time_dim_0 = 6826.66667
class Test_eof(TestCase, BaseEOFTestClass):
def test_eof_00(self):
data = self._sample_data_eof[0]
results = eofunc_eofs(data, neofs=1, time_dim=2)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_2,
attrs['eigenvalues'].values[0], 5)
def test_eof_deprecated(self):
data = self._sample_data_eof[0]
results = eofunc(data, neval=1)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_2,
attrs['eigenvalues'].values[0], 5)
def test_eof_01(self):
data = self._sample_data_eof[1]
results = eofunc_eofs(data, neofs=1, time_dim=2)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_2,
attrs['eigenvalues'].values[0], 5)
def test_eof_02(self):
data = self._sample_data_eof[1]
results = eofunc_eofs(data, neofs=1, time_dim=2)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_2,
attrs['eigenvalues'].values[0], 5)
def test_eof_14(self):
data = self._sample_data_eof[4]
results = eofunc_eofs(data, neofs=1, time_dim=2)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_2,
attrs['eigenvalues'].values[0], 5)
def test_eof_15(self):
data = np.asarray(self._sample_data_eof[0])
data = np.transpose(data, axes=(2, 1, 0))
dims = [f"dim_{i}" for i in range(data.ndim)]
dims[0] = 'time'
data = xr.DataArray(data,
dims=dims,
attrs={
"prop1": "prop1",
"prop2": 2
})
results = eofunc_eofs(data, neofs=1)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_2,
attrs['eigenvalues'].values[0], 5)
nt.assert_equal(False, ("prop1" in attrs))
nt.assert_equal(False, ("prop2" in attrs))
# TODO: Maybe revisited to add time_dim support for Xarray in addition to numpy inputs
# def test_eof_15_time_dim(self):
#
# data = np.asarray(self._sample_data_eof[0])
#
# dims = [f"dim_{i}" for i in range(data.ndim)]
# dims[2] = 'time'
#
# data = xr.DataArray(
# data,
# dims=dims,
# attrs={"prop1": "prop1",
# "prop2": 2,
# }
# )
#
# results = eofunc_eofs(data, num_eofs=1, time_dim=2)
# eof = results.data
# attrs = results.attrs
#
# nt.assert_equal(self.expected_output.shape, results.shape)
#
# nt.assert_array_almost_equal(self.expected_output, eof, 5)
#
# nt.assert_equal(self._num_attrs + 2, len(attrs))
#
# # self.assertAlmostEqual(5.33333, attrs['eval_transpose'][0], 4)
# # self.assertAlmostEqual(100.0, attrs['pcvar'][0], 1)
# self.assertAlmostEqual(26.66666, attrs['eigenvalues'].values[0], 4)
# # self.assertEqual("covariance", attrs['matrix'])
# # self.assertEqual("transpose", attrs['method'])
# self.assertFalse("prop1" in attrs)
# self.assertFalse("prop2" in attrs)
def test_eof_16(self):
data = np.asarray(self._sample_data_eof[0])
data = np.transpose(data, axes=(2, 1, 0))
dims = [f"dim_{i}" for i in range(data.ndim)]
dims[0] = 'time'
data = xr.DataArray(data,
dims=dims,
attrs={
"prop1": "prop1",
"prop2": 2,
})
results = eofunc_eofs(data, 1, meta=True)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs + 2, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_2,
attrs['eigenvalues'].values[0], 5)
nt.assert_equal(True, ("prop1" in attrs))
nt.assert_equal(True, ("prop2" in attrs))
nt.assert_equal("prop1", attrs["prop1"])
nt.assert_equal(2, attrs["prop2"])
def test_eof_n_01(self):
data = self._sample_data_eof[1]
results = eofunc_eofs(data, neofs=1, time_dim=1)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_1,
attrs['eigenvalues'].values[0], 5)
def test_eof_n_03(self):
data = self._sample_data_eof[1]
results = eofunc_eofs(data, 1, time_dim=0)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_0,
attrs['eigenvalues'].values[0], 5)
def test_eof_n_03_1(self):
data = self._sample_data_eof[1]
results = eofunc_eofs(data, 1, time_dim=0)
eof = results.data
attrs = results.attrs
nt.assert_equal(self.expected_output.shape, results.shape)
nt.assert_array_almost_equal(self.expected_output, eof, 5)
nt.assert_equal(self._num_attrs, len(attrs))
nt.assert_almost_equal(self.expected_eigen_val_time_dim_0,
attrs['eigenvalues'].values[0], 5)
class Test_eof_ts(TestCase, BaseEOFTestClass):
def test_01(self):
sst = self._nc_ds.sst
evec = self._nc_ds.evec
expected_tsout = self._nc_ds.tsout
actual_tsout = eofunc_pcs(sst, npcs=5)
nt.assert_equal(actual_tsout.shape, expected_tsout.shape)
nt.assert_array_almost_equal(actual_tsout, expected_tsout.data, 3)
def test_01_deprecated(self):
sst = self._nc_ds.sst
evec = self._nc_ds.evec
expected_tsout = self._nc_ds.tsout
actual_tsout = eofunc_ts(sst, evec, time_dim=0)
nt.assert_equal(actual_tsout.shape, expected_tsout.shape)
nt.assert_array_almost_equal(actual_tsout, expected_tsout.data, 3)
def test_02(self):
sst = self._nc_ds.sst
evec = self._nc_ds.evec
expected_tsout = self._nc_ds.tsout
actual_tsout = eofunc_pcs(sst, npcs=5, meta=True)
nt.assert_equal(actual_tsout.shape, expected_tsout.shape)
nt.assert_array_almost_equal(actual_tsout, expected_tsout.data, 3)
nt.assert_equal(actual_tsout.coords["time"].data,
sst.coords["time"].data)
| 33.020833 | 90 | 0.585219 | 1,516 | 11,095 | 4.027045 | 0.127968 | 0.073382 | 0.068141 | 0.061261 | 0.804914 | 0.788534 | 0.761835 | 0.761835 | 0.734644 | 0.718428 | 0 | 0.073872 | 0.291122 | 11,095 | 335 | 91 | 33.119403 | 0.702352 | 0.113655 | 0 | 0.659898 | 0 | 0 | 0.027789 | 0.002248 | 0 | 0 | 0 | 0.002985 | 0.269036 | 1 | 0.06599 | false | 0 | 0.040609 | 0 | 0.162437 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1bba58961c22387ce00fb37bb33a92b583f04b69 | 121 | py | Python | coco_assistant/utils/__init__.py | philipsgithub/COCO-Assistant | 45db9d7a6c410d8aa51fc4e0fd83a11e65d4ce04 | [
"MIT"
] | null | null | null | coco_assistant/utils/__init__.py | philipsgithub/COCO-Assistant | 45db9d7a6c410d8aa51fc4e0fd83a11e65d4ce04 | [
"MIT"
] | null | null | null | coco_assistant/utils/__init__.py | philipsgithub/COCO-Assistant | 45db9d7a6c410d8aa51fc4e0fd83a11e65d4ce04 | [
"MIT"
] | null | null | null | from .anchors import generate_anchors
from .det2seg import det2seg
from .remapper import CatRemapper
from .misc import *
| 24.2 | 37 | 0.826446 | 16 | 121 | 6.1875 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019048 | 0.132231 | 121 | 4 | 38 | 30.25 | 0.92381 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1bc06b671318e9fe85bd2321c4a98ad46d748286 | 48 | py | Python | pypgdelta/construct/__init__.py | SindreOsnes/pypgdelta | 00234903a4e3c1c61ac5cc295133b6a69334fbeb | [
"MIT"
] | null | null | null | pypgdelta/construct/__init__.py | SindreOsnes/pypgdelta | 00234903a4e3c1c61ac5cc295133b6a69334fbeb | [
"MIT"
] | null | null | null | pypgdelta/construct/__init__.py | SindreOsnes/pypgdelta | 00234903a4e3c1c61ac5cc295133b6a69334fbeb | [
"MIT"
] | null | null | null | from ._construct import construct_configuration
| 24 | 47 | 0.895833 | 5 | 48 | 8.2 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 48 | 1 | 48 | 48 | 0.931818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1bce854aa29156739103835948dfa716f1d378ee | 43 | py | Python | NodeDefender/mqtt/message/command/__init__.py | CTSNE/NodeDefender | 24e19f53a27d3b53e599cba8b1448f8f16c0bd5e | [
"MIT"
] | 4 | 2016-09-23T17:51:05.000Z | 2017-03-14T02:52:26.000Z | NodeDefender/mqtt/message/command/__init__.py | CTSNE/NodeDefender | 24e19f53a27d3b53e599cba8b1448f8f16c0bd5e | [
"MIT"
] | 1 | 2016-09-22T11:32:33.000Z | 2017-11-14T10:00:24.000Z | NodeDefender/mqtt/message/command/__init__.py | CTSNE/NodeDefender | 24e19f53a27d3b53e599cba8b1448f8f16c0bd5e | [
"MIT"
] | 4 | 2016-10-09T19:05:16.000Z | 2020-05-14T04:00:30.000Z | def event(topic, payload):
return True
| 14.333333 | 26 | 0.697674 | 6 | 43 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.209302 | 43 | 2 | 27 | 21.5 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
59f2eb2d3f0472dfe59f80ee6db0355dd4597f57 | 29 | py | Python | kozip/__init__.py | HeekangPark/KoZIP | ece3826eb5fbf842ef2545ce2215fbd4f2e7516e | [
"MIT"
] | null | null | null | kozip/__init__.py | HeekangPark/KoZIP | ece3826eb5fbf842ef2545ce2215fbd4f2e7516e | [
"MIT"
] | null | null | null | kozip/__init__.py | HeekangPark/KoZIP | ece3826eb5fbf842ef2545ce2215fbd4f2e7516e | [
"MIT"
] | null | null | null | from kozip.KoZIP import KoZIP | 29 | 29 | 0.862069 | 5 | 29 | 5 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 29 | 1 | 29 | 29 | 0.961538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
940414298d2e059b326bd4c4358b2101df946124 | 84 | py | Python | tests/helper.py | ncuhome/flask-restaction | bd358f84937c494e6cc55d20c57693da4384dc98 | [
"MIT"
] | 135 | 2015-09-06T07:37:59.000Z | 2021-11-08T09:39:50.000Z | tests/helper.py | ncuhome/flask-restaction | bd358f84937c494e6cc55d20c57693da4384dc98 | [
"MIT"
] | 17 | 2015-09-15T05:36:56.000Z | 2018-12-13T03:49:49.000Z | tests/helper.py | ncuhome/flask-restaction | bd358f84937c494e6cc55d20c57693da4384dc98 | [
"MIT"
] | 17 | 2015-09-11T06:59:00.000Z | 2020-09-29T15:07:32.000Z | import json
def resp_json(resp):
return json.loads(resp.data.decode("utf-8"))
| 14 | 48 | 0.702381 | 14 | 84 | 4.142857 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013889 | 0.142857 | 84 | 5 | 49 | 16.8 | 0.791667 | 0 | 0 | 0 | 0 | 0 | 0.059524 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
94352d7425ec0855841350885be20831990b0ad0 | 19 | py | Python | extra/src/autogluon/extra/contrib/__init__.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 4,462 | 2019-12-09T17:41:07.000Z | 2022-03-31T22:00:41.000Z | extra/src/autogluon/extra/contrib/__init__.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 1,408 | 2019-12-09T17:48:59.000Z | 2022-03-31T20:24:12.000Z | extra/src/autogluon/extra/contrib/__init__.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 623 | 2019-12-10T02:04:18.000Z | 2022-03-20T17:11:01.000Z | from . import enas
| 9.5 | 18 | 0.736842 | 3 | 19 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.210526 | 19 | 1 | 19 | 19 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
9458e498d7d559eee3464df45294bc320f667a0c | 33 | py | Python | plugins/org_pandoc_reader/__init__.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | 13 | 2020-01-27T09:02:25.000Z | 2022-01-20T07:45:26.000Z | plugins/org_pandoc_reader/__init__.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | 29 | 2020-03-22T06:57:57.000Z | 2022-01-24T22:46:42.000Z | plugins/org_pandoc_reader/__init__.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | 6 | 2020-07-10T00:13:30.000Z | 2022-01-26T08:22:33.000Z | from .org_pandoc_reader import *
| 16.5 | 32 | 0.818182 | 5 | 33 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 33 | 1 | 33 | 33 | 0.862069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
946c360b5cf6c0a5bc20d2650c387619720d28c4 | 22 | py | Python | ros/geometry2/tf2_kdl/src/tf2_kdl/__init__.py | numberen/apollo-platform | 8f359c8d00dd4a98f56ec2276c5663cb6c100e47 | [
"Apache-2.0"
] | 742 | 2017-07-05T02:49:36.000Z | 2022-03-30T12:55:43.000Z | TrekBot_WS/install_isolated/lib/python2.7/dist-packages/tf2_kdl/__init__.py | Rafcin/TrekBot | d3dc63e6c16a040b16170f143556ef358018b7da | [
"Unlicense"
] | 73 | 2017-07-06T12:50:51.000Z | 2022-03-07T08:07:07.000Z | TrekBot_WS/install_isolated/lib/python2.7/dist-packages/tf2_kdl/__init__.py | Rafcin/TrekBot | d3dc63e6c16a040b16170f143556ef358018b7da | [
"Unlicense"
] | 425 | 2017-07-04T22:03:29.000Z | 2022-03-29T06:59:06.000Z | from tf2_kdl import *
| 11 | 21 | 0.772727 | 4 | 22 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.055556 | 0.181818 | 22 | 1 | 22 | 22 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
848ca50316b5c04f9b9fe7d0f792a8648e4c83dd | 15,029 | py | Python | 03_posenet/02_posenet_v2/01_float32/06_float16_quantization_mobilenet.py | khanfarhan10/PINTO_model_zoo | 4cad2e506d8c0fb604aa7b5f84115a840ab59ba1 | [
"MIT"
] | 1,529 | 2019-12-11T13:36:23.000Z | 2022-03-31T18:38:27.000Z | 03_posenet/02_posenet_v2/01_float32/06_float16_quantization_mobilenet.py | khanfarhan10/PINTO_model_zoo | 4cad2e506d8c0fb604aa7b5f84115a840ab59ba1 | [
"MIT"
] | 200 | 2020-01-06T09:24:42.000Z | 2022-03-31T17:29:08.000Z | 03_posenet/02_posenet_v2/01_float32/06_float16_quantization_mobilenet.py | khanfarhan10/PINTO_model_zoo | 4cad2e506d8c0fb604aa7b5f84115a840ab59ba1 | [
"MIT"
] | 288 | 2020-02-21T14:56:02.000Z | 2022-03-30T03:00:35.000Z | ### tensorflow==2.2.0-rc3
import tensorflow as tf
import numpy as np
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_8_225')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_8_225_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_8_225_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_8_257')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_8_257_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_8_257_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_8_321')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_8_321_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_8_321_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_8_385')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_8_385_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_8_385_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_8_513')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_8_513_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_8_513_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_16_225')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_16_225_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_16_225_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_16_257')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_16_257_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_16_257_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_16_321')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_16_321_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_16_321_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_16_385')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_16_385_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_16_385_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm050_16_513')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm050_16_513_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm050_16_513_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_8_225')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_8_225_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_8_225_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_8_257')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_8_257_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_8_257_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_8_321')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_8_321_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_8_321_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_8_385')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_8_385_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_8_385_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_8_513')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_8_513_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_8_513_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_16_225')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_16_225_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_16_225_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_16_257')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_16_257_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_16_257_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_16_321')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_16_321_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_16_321_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_16_385')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_16_385_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_16_385_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm075_16_513')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm075_16_513_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm075_16_513_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_8_225')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_8_225_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_8_225_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_8_257')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_8_257_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_8_257_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_8_321')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_8_321_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_8_321_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_8_385')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_8_385_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_8_385_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_8_513')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_8_513_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_8_513_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_16_225')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_16_225_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_16_225_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_16_257')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_16_257_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_16_257_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_16_321')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_16_321_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_16_321_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_16_385')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_16_385_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_16_385_float16_quant.tflite")
# Weight Quantization - Input/Output=float32
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model_posenet_mobilenetv1_dm100_16_513')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
with open('posenet_mobilenetv1_dm100_16_513_float16_quant.tflite', 'wb') as w:
w.write(tflite_quant_model)
print("Weight Quantization complete! - posenet_mobilenetv1_dm100_16_513_float16_quant.tflite") | 53.867384 | 100 | 0.836782 | 2,023 | 15,029 | 5.830944 | 0.024716 | 0.137335 | 0.081384 | 0.073754 | 0.995677 | 0.995677 | 0.995677 | 0.995677 | 0.993896 | 0.993896 | 0 | 0.071948 | 0.066871 | 15,029 | 279 | 101 | 53.867384 | 0.769181 | 0.087231 | 0 | 0.566038 | 0 | 0 | 0.400073 | 0.325539 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.009434 | 0 | 0.009434 | 0.141509 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
84a1dc128db01162139f58a34175fb30da23de04 | 80 | py | Python | python_generator/__init__.py | GabrielAmare/PythonGenerator | a50338045a253eeaba36d0e44069ca38741d4f97 | [
"MIT"
] | null | null | null | python_generator/__init__.py | GabrielAmare/PythonGenerator | a50338045a253eeaba36d0e44069ca38741d4f97 | [
"MIT"
] | null | null | null | python_generator/__init__.py | GabrielAmare/PythonGenerator | a50338045a253eeaba36d0e44069ca38741d4f97 | [
"MIT"
] | null | null | null | """
python_generator :
tool to generate python code
"""
from .base import *
| 13.333333 | 32 | 0.675 | 10 | 80 | 5.3 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2125 | 80 | 5 | 33 | 16 | 0.84127 | 0.6375 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
84ee4cd931791ec1a48b40e95a055f44fd36ba65 | 400 | py | Python | image_gallery/website/paths.py | rqroz/django_image_gallery | 95ecd154d46e0439997b4ddb9cc440a33cd6563e | [
"MIT"
] | null | null | null | image_gallery/website/paths.py | rqroz/django_image_gallery | 95ecd154d46e0439997b4ddb9cc440a33cd6563e | [
"MIT"
] | null | null | null | image_gallery/website/paths.py | rqroz/django_image_gallery | 95ecd154d46e0439997b4ddb9cc440a33cd6563e | [
"MIT"
] | null | null | null | import os
def url_user_img(instance, filename):
return 'users/%d/profile/%s'%(instance.user.pk, filename.encode('utf-8'))
def url_gallery_img(instance, filename):
return 'gallery/users/%d/uploads/%s'%(instance.user.pk, filename.encode('utf-8'))
def url_gallery_thumbnail(instance, filename):
return 'gallery/users/%d/uploads/thumbnails/%s'%(instance.user.pk, filename.encode('utf-8'))
| 36.363636 | 96 | 0.7325 | 59 | 400 | 4.864407 | 0.355932 | 0.062718 | 0.229965 | 0.156794 | 0.728223 | 0.728223 | 0.728223 | 0.43554 | 0.320557 | 0.320557 | 0 | 0.008219 | 0.0875 | 400 | 10 | 97 | 40 | 0.778082 | 0 | 0 | 0 | 0 | 0 | 0.2475 | 0.1625 | 0 | 0 | 0 | 0 | 0 | 1 | 0.428571 | false | 0 | 0.142857 | 0.428571 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
84fe1d9ed1ef5a9cdd1effbbe697e2f39f6366b9 | 173 | py | Python | grasshopperfund/tags/urls.py | yemi33/grasshopperfund | ad7bbb3d5b2ea4ec2b58ed8df7a368218bf9783e | [
"MIT"
] | null | null | null | grasshopperfund/tags/urls.py | yemi33/grasshopperfund | ad7bbb3d5b2ea4ec2b58ed8df7a368218bf9783e | [
"MIT"
] | null | null | null | grasshopperfund/tags/urls.py | yemi33/grasshopperfund | ad7bbb3d5b2ea4ec2b58ed8df7a368218bf9783e | [
"MIT"
] | 1 | 2020-12-10T03:17:11.000Z | 2020-12-10T03:17:11.000Z | from django.urls import path, include
from . import views
urlpatterns = [
path('filter/<str:tagname>', views.filter_campaigns_from_tags, name='filter-campaigns-from-tags')] | 34.6 | 98 | 0.780347 | 24 | 173 | 5.5 | 0.583333 | 0.227273 | 0.287879 | 0.348485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.086705 | 173 | 5 | 98 | 34.6 | 0.835443 | 0 | 0 | 0 | 0 | 0 | 0.264368 | 0.149425 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
ca212fdca54f5d3ee3fe0f844136a59500b13e69 | 11,479 | py | Python | blog/views.py | dnaranjo89/djangae-test | d52ebc135978b43b1c8c0aeddbd0dd2802c81376 | [
"Apache-2.0"
] | null | null | null | blog/views.py | dnaranjo89/djangae-test | d52ebc135978b43b1c8c0aeddbd0dd2802c81376 | [
"Apache-2.0"
] | null | null | null | blog/views.py | dnaranjo89/djangae-test | d52ebc135978b43b1c8c0aeddbd0dd2802c81376 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from blog.models import *
from blog.forms import ArticleForm, CommentForm
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
def index(request):
filter_category = request.GET.get("category", "All")
if filter_category and filter_category != "All":
category_key = Category.all().filter('name =', filter_category).get()
article_list = Article.all().filter('category =', category_key)
else:
article_list = Article.all()
context_dict = {'articles': article_list, 'category': filter_category}
return render(request, 'index.html', context_dict)
def panel(request):
article_list = Article.all()
context_dict = {'articles': article_list}
return render(request, 'panel.html', context_dict)
def new_article(request):
"""
Add a new article to the DB
"""
form = ArticleForm()
if request.method == 'POST':
form = ArticleForm(request.POST)
if form.validate():
article = Article()
form.populate_obj(article)
article.put()
return redirect('index')
context_dict = {'form': form}
return render(request, 'new_article.html', context_dict)
def display_article(request, article_id):
# Get the details of the article
article_id = int(article_id)
article = Article.get_by_id(article_id)
article.views += 1
article.put()
# Create empty form for new comments
comment_form = CommentForm(article=article)
context_dict = {'article_id': article_id, 'article': article, 'comment_form': comment_form}
# Get the Article's comments (if exist)
comments_list = Comment.all().filter('article =', article)
if comments_list.count() > 0:
context_dict['comments_list'] = comments_list
return render(request, 'display_article.html', context_dict)
def edit_article(request, article_id):
if request.method == 'POST':
article_form = ArticleForm(request.POST)
context_dict = {'article_form': article_form}
if article_form.validate():
article = Article()
article_form.populate_obj(article)
article.put()
return redirect('index')
else:
# Get the details of the article
article_id = int(article_id)
article = Article.get_by_id(article_id)
article_form = ArticleForm(obj=article)
context_dict = {'article_form': article_form}
return render(request, 'edit_article.html', context_dict)
def send_comment(request, article_id):
if request.method == 'POST':
comment_form = CommentForm(request.POST)
if comment_form.validate():
comment = Comment()
comment_form.populate_obj(comment)
comment.put()
return redirect(reverse('display_article', kwargs={'article_id': article_id}))
def populate(request):
"""
Populates the database with some Categories and Articles
"""
cat1 = add_category('Awesome stuff')
add_article(category=cat1,
title="Article1",
image="img/1.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
add_article(category=cat1,
title="Article2",
image="img/2.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
add_article(category=cat1,
title="Article3",
image="img/3.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
cat2 = add_category("Colourful stuff",
)
add_article(category=cat2,
title="Article4",
image="img/4.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
add_article(category=cat2,
title="Article5",
image="img/5.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
add_article(category=cat2,
title="Article6",
image="img/6.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
cat3 = add_category("Plain stuff")
add_article(category=cat3,
title="Article7",
image="img/7.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
add_article(category=cat3,
title="Article8",
image="img/8.jpg",
body="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
)
return redirect('index')
def add_article(category, title, image, body, views=0):
a = Article(category=category, title=title, image=image, body=body, views=views).put()
return a
def add_category(name):
c = Category(name=name).put()
return c | 72.651899 | 889 | 0.736388 | 1,528 | 11,479 | 5.477749 | 0.132199 | 0.013381 | 0.019355 | 0.01147 | 0.795341 | 0.775627 | 0.767742 | 0.759379 | 0.759379 | 0.747192 | 0 | 0.003298 | 0.207596 | 11,479 | 158 | 890 | 72.651899 | 0.916887 | 0.019165 | 0 | 0.321739 | 0 | 0.069565 | 0.654997 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.078261 | false | 0 | 0.043478 | 0 | 0.217391 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ca6b628f2b7d240b54ac890f139cf54fe1eda0dc | 8,165 | py | Python | aiogram/contrib/middlewares/logging.py | balki/aiogram | 5aa34625c6436a595d22ba933279a21eafc38eb5 | [
"MIT"
] | null | null | null | aiogram/contrib/middlewares/logging.py | balki/aiogram | 5aa34625c6436a595d22ba933279a21eafc38eb5 | [
"MIT"
] | null | null | null | aiogram/contrib/middlewares/logging.py | balki/aiogram | 5aa34625c6436a595d22ba933279a21eafc38eb5 | [
"MIT"
] | null | null | null | import logging
import time
from aiogram import types
from aiogram.dispatcher.middlewares import BaseMiddleware
HANDLED_STR = ['Unhandled', 'Handled']
class LoggingMiddleware(BaseMiddleware):
def __init__(self, logger=__name__):
if not isinstance(logger, logging.Logger):
logger = logging.getLogger(logger)
self.logger = logger
super(LoggingMiddleware, self).__init__()
def check_timeout(self, obj):
start = obj.conf.get('_start', None)
if start:
del obj.conf['_start']
return round((time.time() - start) * 1000)
return -1
async def on_pre_process_update(self, update: types.Update, data: dict):
update.conf['_start'] = time.time()
self.logger.debug(f"Received update [ID:{update.update_id}]")
async def on_post_process_update(self, update: types.Update, result, data: dict):
timeout = self.check_timeout(update)
if timeout > 0:
self.logger.info(f"Process update [ID:{update.update_id}]: [success] (in {timeout} ms)")
async def on_pre_process_message(self, message: types.Message, data: dict):
self.logger.info(f"Received message [ID:{message.message_id}] in chat [{message.chat.type}:{message.chat.id}]")
async def on_post_process_message(self, message: types.Message, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"message [ID:{message.message_id}] in chat [{message.chat.type}:{message.chat.id}]")
async def on_pre_process_edited_message(self, edited_message, data: dict):
self.logger.info(f"Received edited message [ID:{edited_message.message_id}] "
f"in chat [{edited_message.chat.type}:{edited_message.chat.id}]")
async def on_post_process_edited_message(self, edited_message, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"edited message [ID:{edited_message.message_id}] "
f"in chat [{edited_message.chat.type}:{edited_message.chat.id}]")
async def on_pre_process_channel_post(self, channel_post: types.Message, data: dict):
self.logger.info(f"Received channel post [ID:{channel_post.message_id}] "
f"in channel [ID:{channel_post.chat.id}]")
async def on_post_process_channel_post(self, channel_post: types.Message, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"channel post [ID:{channel_post.message_id}] "
f"in chat [{channel_post.chat.type}:{channel_post.chat.id}]")
async def on_pre_process_edited_channel_post(self, edited_channel_post: types.Message, data: dict):
self.logger.info(f"Received edited channel post [ID:{edited_channel_post.message_id}] "
f"in channel [ID:{edited_channel_post.chat.id}]")
async def on_post_process_edited_channel_post(self, edited_channel_post: types.Message, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"edited channel post [ID:{edited_channel_post.message_id}] "
f"in channel [ID:{edited_channel_post.chat.id}]")
async def on_pre_process_inline_query(self, inline_query: types.InlineQuery, data: dict):
self.logger.info(f"Received inline query [ID:{inline_query.id}] "
f"from user [ID:{inline_query.from_user.id}]")
async def on_post_process_inline_query(self, inline_query: types.InlineQuery, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"inline query [ID:{inline_query.id}] "
f"from user [ID:{inline_query.from_user.id}]")
async def on_pre_process_chosen_inline_result(self, chosen_inline_result: types.ChosenInlineResult, data: dict):
self.logger.info(f"Received chosen inline result [Inline msg ID:{chosen_inline_result.inline_message_id}] "
f"from user [ID:{chosen_inline_result.from_user.id}] "
f"result [ID:{chosen_inline_result.result_id}]")
async def on_post_process_chosen_inline_result(self, chosen_inline_result, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"chosen inline result [Inline msg ID:{chosen_inline_result.inline_message_id}] "
f"from user [ID:{chosen_inline_result.from_user.id}] "
f"result [ID:{chosen_inline_result.result_id}]")
async def on_pre_process_callback_query(self, callback_query: types.CallbackQuery, data: dict):
if callback_query.message:
if callback_query.message.from_user:
self.logger.info(f"Received callback query [ID:{callback_query.id}] "
f"in chat [{callback_query.message.chat.type}:{callback_query.message.chat.id}] "
f"from user [ID:{callback_query.message.from_user.id}]")
else:
self.logger.info(f"Received callback query [ID:{callback_query.id}] "
f"in chat [{callback_query.message.chat.type}:{callback_query.message.chat.id}]")
else:
self.logger.info(f"Received callback query [ID:{callback_query.id}] "
f"from inline message [ID:{callback_query.inline_message_id}] "
f"from user [ID:{callback_query.from_user.id}]")
async def on_post_process_callback_query(self, callback_query, results, data: dict):
if callback_query.message:
if callback_query.message.from_user:
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"callback query [ID:{callback_query.id}] "
f"in chat [{callback_query.message.chat.type}:{callback_query.message.chat.id}] "
f"from user [ID:{callback_query.message.from_user.id}]")
else:
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"callback query [ID:{callback_query.id}] "
f"in chat [{callback_query.message.chat.type}:{callback_query.message.chat.id}]")
else:
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"callback query [ID:{callback_query.id}] "
f"from inline message [ID:{callback_query.inline_message_id}] "
f"from user [ID:{callback_query.from_user.id}]")
async def on_pre_process_shipping_query(self, shipping_query: types.ShippingQuery, data: dict):
self.logger.info(f"Received shipping query [ID:{shipping_query.id}] "
f"from user [ID:{shipping_query.from_user.id}]")
async def on_post_process_shipping_query(self, shipping_query, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"shipping query [ID:{shipping_query.id}] "
f"from user [ID:{shipping_query.from_user.id}]")
async def on_pre_process_pre_checkout_query(self, pre_checkout_query: types.PreCheckoutQuery, data: dict):
self.logger.info(f"Received pre-checkout query [ID:{pre_checkout_query.id}] "
f"from user [ID:{pre_checkout_query.from_user.id}]")
async def on_post_process_pre_checkout_query(self, pre_checkout_query, results, data: dict):
self.logger.debug(f"{HANDLED_STR[bool(len(results))]} "
f"pre-checkout query [ID:{pre_checkout_query.id}] "
f"from user [ID:{pre_checkout_query.from_user.id}]")
async def on_pre_process_error(self, update, error, data: dict):
timeout = self.check_timeout(update)
if timeout > 0:
self.logger.info(f"Process update [ID:{update.update_id}]: [failed] (in {timeout} ms)")
| 57.5 | 119 | 0.626699 | 1,042 | 8,165 | 4.677543 | 0.074856 | 0.090685 | 0.049241 | 0.046779 | 0.874231 | 0.863972 | 0.804473 | 0.779032 | 0.71112 | 0.645671 | 0 | 0.001148 | 0.253399 | 8,165 | 141 | 120 | 57.907801 | 0.798392 | 0 | 0 | 0.469027 | 0 | 0.017699 | 0.388487 | 0.276546 | 0 | 0 | 0 | 0 | 0 | 1 | 0.017699 | false | 0 | 0.035398 | 0 | 0.079646 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ca8a4f909b7e3d82bf7ed79cb20c32112fb5e8eb | 86 | py | Python | applications/MappingApplication/mpi_extension/MPIExtension.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 778 | 2017-01-27T16:29:17.000Z | 2022-03-30T03:01:51.000Z | applications/MappingApplication/mpi_extension/MPIExtension.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 6,634 | 2017-01-15T22:56:13.000Z | 2022-03-31T15:03:36.000Z | applications/MappingApplication/mpi_extension/MPIExtension.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 224 | 2017-02-07T14:12:49.000Z | 2022-03-06T23:09:34.000Z | import KratosMultiphysics.TrilinosApplication
from KratosMappingMPIExtension import *
| 28.666667 | 45 | 0.906977 | 6 | 86 | 13 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.069767 | 86 | 2 | 46 | 43 | 0.975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
04658f7a226a05085d32ee45506b5ed479b8d935 | 39,412 | py | Python | tests/test_composite.py | JoyMonteiro/sympl | c8bee914651824360a46bf71119dd87a93a07219 | [
"BSD-3-Clause"
] | 46 | 2017-01-05T00:21:18.000Z | 2022-03-05T12:20:39.000Z | tests/test_composite.py | JoyMonteiro/sympl | c8bee914651824360a46bf71119dd87a93a07219 | [
"BSD-3-Clause"
] | 47 | 2017-03-27T13:37:31.000Z | 2022-02-02T07:14:22.000Z | tests/test_composite.py | JoyMonteiro/sympl | c8bee914651824360a46bf71119dd87a93a07219 | [
"BSD-3-Clause"
] | 11 | 2017-01-27T23:03:34.000Z | 2020-06-22T20:05:49.000Z | import pytest
import unittest
import mock
from sympl import (
TendencyComponent, DiagnosticComponent, Monitor, TendencyComponentComposite, DiagnosticComponentComposite,
MonitorComposite, SharedKeyError, DataArray, InvalidPropertyDictError
)
from sympl._core.units import units_are_compatible
def same_list(list1, list2):
return (len(list1) == len(list2) and all(
[item in list2 for item in list1] + [item in list1 for item in list2]))
class MockTendencyComponent(TendencyComponent):
input_properties = None
diagnostic_properties = None
tendency_properties = None
def __init__(
self, input_properties, diagnostic_properties, tendency_properties,
diagnostic_output, tendency_output, **kwargs):
self.input_properties = input_properties
self.diagnostic_properties = diagnostic_properties
self.tendency_properties = tendency_properties
self._diagnostic_output = diagnostic_output
self._tendency_output = tendency_output
self.times_called = 0
self.state_given = None
super(MockTendencyComponent, self).__init__(**kwargs)
def array_call(self, state):
self.times_called += 1
self.state_given = state
return self._tendency_output, self._diagnostic_output
class MockDiagnosticComponent(DiagnosticComponent):
input_properties = None
diagnostic_properties = None
def __init__(
self, input_properties, diagnostic_properties, diagnostic_output,
**kwargs):
self.input_properties = input_properties
self.diagnostic_properties = diagnostic_properties
self._diagnostic_output = diagnostic_output
self.times_called = 0
self.state_given = None
super(MockDiagnosticComponent, self).__init__(**kwargs)
def array_call(self, state):
self.times_called += 1
self.state_given = state
return self._diagnostic_output
class MockEmptyTendencyComponent(TendencyComponent):
input_properties = {}
diagnostic_properties = {}
tendency_properties = {}
def __init__(self, **kwargs):
super(MockEmptyTendencyComponent, self).__init__(**kwargs)
def array_call(self, state):
return {}, {}
class MockEmptyTendencyComponent2(TendencyComponent):
input_properties = {}
diagnostic_properties = {}
tendency_properties = {}
def __init__(self, **kwargs):
super(MockEmptyTendencyComponent2, self).__init__(**kwargs)
def array_call(self, state):
return {}, {}
class MockEmptyDiagnosticComponent(DiagnosticComponent):
input_properties = {}
diagnostic_properties = {}
def __init__(self, **kwargs):
super(MockEmptyDiagnosticComponent, self).__init__(**kwargs)
def array_call(self, state):
return {}
class MockMonitor(Monitor):
def store(self, state):
return
def test_empty_prognostic_composite():
prognostic_composite = TendencyComponentComposite()
state = {'air_temperature': 273.15}
tendencies, diagnostics = prognostic_composite(state)
assert len(tendencies) == 0
assert len(diagnostics) == 0
assert isinstance(tendencies, dict)
assert isinstance(diagnostics, dict)
@mock.patch.object(MockEmptyTendencyComponent, '__call__')
def test_prognostic_composite_calls_one_prognostic(mock_call):
mock_call.return_value = ({'air_temperature': 0.5}, {'foo': 50.})
prognostic_composite = TendencyComponentComposite(MockEmptyTendencyComponent())
state = {'air_temperature': 273.15}
tendencies, diagnostics = prognostic_composite(state)
assert mock_call.called
assert tendencies == {'air_temperature': 0.5}
assert diagnostics == {'foo': 50.}
@mock.patch.object(MockEmptyTendencyComponent, '__call__')
def test_prognostic_composite_calls_two_prognostics(mock_call):
mock_call.return_value = ({'air_temperature': 0.5}, {})
prognostic_composite = TendencyComponentComposite(
MockEmptyTendencyComponent(), MockEmptyTendencyComponent())
state = {'air_temperature': 273.15}
tendencies, diagnostics = prognostic_composite(state)
assert mock_call.called
assert mock_call.call_count == 2
assert tendencies == {'air_temperature': 1.}
assert diagnostics == {}
def test_empty_diagnostic_composite():
diagnostic_composite = DiagnosticComponentComposite()
state = {'air_temperature': 273.15}
diagnostics = diagnostic_composite(state)
assert len(diagnostics) == 0
assert isinstance(diagnostics, dict)
@mock.patch.object(MockEmptyDiagnosticComponent, '__call__')
def test_diagnostic_composite_calls_one_diagnostic(mock_call):
mock_call.return_value = {'foo': 50.}
diagnostic_composite = DiagnosticComponentComposite(MockEmptyDiagnosticComponent())
state = {'air_temperature': 273.15}
diagnostics = diagnostic_composite(state)
assert mock_call.called
assert diagnostics == {'foo': 50.}
def test_empty_monitor_collection():
# mainly we're testing that nothing errors
monitor_collection = MonitorComposite()
state = {'air_temperature': 273.15}
monitor_collection.store(state)
@mock.patch.object(MockMonitor, 'store')
def test_monitor_collection_calls_one_monitor(mock_store):
mock_store.return_value = None
monitor_collection = MonitorComposite(MockMonitor())
state = {'air_temperature': 273.15}
monitor_collection.store(state)
assert mock_store.called
@mock.patch.object(MockMonitor, 'store')
def test_monitor_collection_calls_two_monitors(mock_store):
mock_store.return_value = None
monitor_collection = MonitorComposite(MockMonitor(), MockMonitor())
state = {'air_temperature': 273.15}
monitor_collection.store(state)
assert mock_store.called
assert mock_store.call_count == 2
def test_prognostic_composite_cannot_use_diagnostic():
try:
TendencyComponentComposite(MockEmptyDiagnosticComponent())
except TypeError:
pass
except Exception as err:
raise err
else:
raise AssertionError('TypeError should have been raised')
def test_diagnostic_composite_cannot_use_prognostic():
try:
DiagnosticComponentComposite(MockEmptyTendencyComponent())
except TypeError:
pass
except Exception as err:
raise err
else:
raise AssertionError('TypeError should have been raised')
@mock.patch.object(MockEmptyDiagnosticComponent, '__call__')
def test_diagnostic_composite_call(mock_call):
mock_call.return_value = {'foo': 5.}
state = {'bar': 10.}
diagnostics = DiagnosticComponentComposite(MockEmptyDiagnosticComponent())
new_state = diagnostics(state)
assert list(state.keys()) == ['bar']
assert state['bar'] == 10.
assert list(new_state.keys()) == ['foo']
assert new_state['foo'] == 5.
@mock.patch.object(MockEmptyTendencyComponent, '__call__')
@mock.patch.object(MockEmptyTendencyComponent2, '__call__')
def test_prognostic_component_handles_units_when_combining(mock_call, mock2_call):
mock_call.return_value = ({
'eastward_wind': DataArray(1., attrs={'units': 'm/s'})}, {})
mock2_call.return_value = ({
'eastward_wind': DataArray(50., attrs={'units': 'cm/s'})}, {})
prognostic1 = MockEmptyTendencyComponent()
prognostic2 = MockEmptyTendencyComponent2()
composite = TendencyComponentComposite(prognostic1, prognostic2)
tendencies, diagnostics = composite({})
assert tendencies['eastward_wind'].to_units('m/s').values.item() == 1.5
def test_diagnostic_composite_single_component_input():
input_properties = {
'input1': {
'dims': ['dim1'],
'units': 'm',
},
'input2': {
'dims': ['dim2'],
'units': 'm/s'
},
}
diagnostic_properties = {}
diagnostic_output = {}
diagnostic = MockDiagnosticComponent(
input_properties, diagnostic_properties, diagnostic_output)
composite = DiagnosticComponentComposite(diagnostic)
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
def test_diagnostic_composite_single_component_diagnostic():
input_properties = {}
diagnostic_properties = {
'diag1': {
'dims': ['lon'],
'units': 'km',
},
'diag2': {
'dims': ['lon'],
'units': 'degK',
},
}
diagnostic_output = {}
diagnostic = MockDiagnosticComponent(
input_properties, diagnostic_properties, diagnostic_output)
composite = DiagnosticComponentComposite(diagnostic)
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
def test_diagnostic_composite_single_empty_component():
input_properties = {}
diagnostic_properties = {}
diagnostic_output = {}
diagnostic = MockDiagnosticComponent(
input_properties, diagnostic_properties, diagnostic_output)
composite = DiagnosticComponentComposite(diagnostic)
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
def test_diagnostic_composite_single_full_component():
input_properties = {
'input1': {
'dims': ['dim1'],
'units': 'm',
},
'input2': {
'dims': ['dim2'],
'units': 'm/s'
},
}
diagnostic_properties = {
'diag1': {
'dims': ['lon'],
'units': 'km',
},
'diag2': {
'dims': ['lon'],
'units': 'degK',
},
}
diagnostic_output = {}
diagnostic = MockDiagnosticComponent(
input_properties, diagnostic_properties, diagnostic_output)
composite = DiagnosticComponentComposite(diagnostic)
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
def test_diagnostic_composite_single_component_no_dims_on_diagnostic():
input_properties = {
'diag1': {
'dims': ['dim1'],
'units': 'm',
},
}
diagnostic_properties = {
'diag1': {
'units': 'km',
},
}
diagnostic_output = {}
diagnostic = MockDiagnosticComponent(
input_properties, diagnostic_properties, diagnostic_output)
composite = DiagnosticComponentComposite(diagnostic)
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
def test_diagnostic_composite_single_component_missing_dims_on_diagnostic():
input_properties = {}
diagnostic_properties = {
'diag1': {
'units': 'km',
},
}
diagnostic_output = {}
try:
diagnostic = MockDiagnosticComponent(
input_properties, diagnostic_properties, diagnostic_output)
DiagnosticComponentComposite(diagnostic)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_diagnostic_composite_two_components_no_overlap():
diagnostic1 = MockDiagnosticComponent(
input_properties={
'input1': {
'dims': ['dim1'],
'units': 'm',
},
},
diagnostic_properties={
'diag1': {
'dims': ['lon'],
'units': 'km',
},
},
diagnostic_output={}
)
diagnostic2 = MockDiagnosticComponent(
input_properties={
'input2': {
'dims': ['dim2'],
'units': 'm/s'
},
},
diagnostic_properties={
'diag2': {
'dims': ['lon'],
'units': 'degK',
},
},
diagnostic_output={}
)
composite = DiagnosticComponentComposite(diagnostic1, diagnostic2)
input_properties = {
'input1': {
'dims': ['dim1'],
'units': 'm',
},
'input2': {
'dims': ['dim2'],
'units': 'm/s'
},
}
diagnostic_properties = {
'diag1': {
'dims': ['lon'],
'units': 'km',
},
'diag2': {
'dims': ['lon'],
'units': 'degK',
},
}
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
def test_diagnostic_composite_two_components_overlap_input():
diagnostic1 = MockDiagnosticComponent(
input_properties={
'input1': {
'dims': ['dim1'],
'units': 'm',
},
'input2': {
'dims': ['dim2'],
'units': 'm/s'
},
},
diagnostic_properties={
'diag1': {
'dims': ['lon'],
'units': 'km',
},
},
diagnostic_output={}
)
diagnostic2 = MockDiagnosticComponent(
input_properties={
'input1': {
'dims': ['dim1'],
'units': 'm',
},
'input2': {
'dims': ['dim2'],
'units': 'm/s'
},
},
diagnostic_properties={
'diag2': {
'dims': ['lon'],
'units': 'degK',
},
},
diagnostic_output={}
)
composite = DiagnosticComponentComposite(diagnostic1, diagnostic2)
input_properties = {
'input1': {
'dims': ['dim1'],
'units': 'm',
},
'input2': {
'dims': ['dim2'],
'units': 'm/s'
},
}
diagnostic_properties = {
'diag1': {
'dims': ['lon'],
'units': 'km',
},
'diag2': {
'dims': ['lon'],
'units': 'degK',
},
}
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
def test_diagnostic_composite_two_components_overlap_diagnostic():
diagnostic1 = MockDiagnosticComponent(
input_properties={},
diagnostic_properties={
'diag1': {
'dims': ['lon'],
'units': 'km',
},
},
diagnostic_output={}
)
diagnostic2 = MockDiagnosticComponent(
input_properties={},
diagnostic_properties={
'diag1': {
'dims': ['lon'],
'units': 'km',
},
},
diagnostic_output={}
)
try:
DiagnosticComponentComposite(diagnostic1, diagnostic2)
except SharedKeyError:
pass
else:
raise AssertionError('Should have raised SharedKeyError')
def test_diagnostic_composite_two_components_incompatible_input_dims():
diagnostic1 = MockDiagnosticComponent(
input_properties={
'input1': {
'dims': ['dim1'],
'units': 'm',
}
},
diagnostic_properties={},
diagnostic_output={}
)
diagnostic2 = MockDiagnosticComponent(
input_properties={
'input1': {
'dims': ['dim2'],
'units': 'm',
}
},
diagnostic_properties={},
diagnostic_output={}
)
try:
composite = DiagnosticComponentComposite(diagnostic1, diagnostic2)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_diagnostic_composite_two_components_incompatible_input_units():
diagnostic1 = MockDiagnosticComponent(
input_properties={
'input1': {
'dims': ['dim1'],
'units': 'm',
}
},
diagnostic_properties={},
diagnostic_output={}
)
diagnostic2 = MockDiagnosticComponent(
input_properties={
'input1': {
'dims': ['dim1'],
'units': 's',
}
},
diagnostic_properties={},
diagnostic_output={}
)
try:
DiagnosticComponentComposite(diagnostic1, diagnostic2)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_prognostic_composite_single_input():
prognostic = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1'],
'units': 'm',
}
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_prognostic_composite_single_diagnostic():
prognostic = MockTendencyComponent(
input_properties={},
diagnostic_properties={
'diag1': {
'dims': ['dims2'],
'units': '',
}
},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_prognostic_composite_single_tendency():
prognostic = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_prognostic_composite_implicit_dims():
prognostic = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == {
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
}
def test_two_prognostic_composite_implicit_dims():
prognostic = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic, prognostic2)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == {
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
}
def test_prognostic_composite_explicit_dims():
prognostic = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_two_prognostic_composite_explicit_dims():
prognostic = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic, prognostic2)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_two_prognostic_composite_explicit_and_implicit_dims():
prognostic = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic, prognostic2)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_prognostic_composite_explicit_dims_not_in_input():
prognostic = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_two_prognostic_composite_incompatible_dims():
prognostic = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
'input2': {
'dims': ['dims3', 'dims1'],
'units': 'degK'
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
'input2': {
'dims': ['dims3', 'dims1'],
'units': 'degK / day'
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims3', 'dims1'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
try:
TendencyComponentComposite(prognostic, prognostic2)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_two_prognostic_composite_compatible_dims():
prognostic = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
'input2': {
'dims': ['dims1', 'dims2'],
'units': 'degK'
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
'input2': {
'dims': ['dims1', 'dims2'],
'units': 'degK'
}
},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dims1', 'dims2'],
'units': 'degK / day',
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic, prognostic2)
assert composite.input_properties == prognostic.input_properties
assert composite.diagnostic_properties == prognostic.diagnostic_properties
assert composite.tendency_properties == prognostic.tendency_properties
def test_prognostic_composite_two_components_input():
prognostic1 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
'input2': {
'dims': ['dims1'],
'units': 'm',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
'input3': {
'dims': ['dims2'],
'units': '',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic1, prognostic2)
input_properties = {
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
'input2': {
'dims': ['dims1'],
'units': 'm',
},
'input3': {
'dims': ['dims2'],
'units': '',
},
}
diagnostic_properties = {}
tendency_properties = {}
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
assert composite.tendency_properties == tendency_properties
def test_prognostic_composite_two_components_swapped_input_dims():
prognostic1 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims2', 'dims1'],
'units': 'degK',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic1, prognostic2)
diagnostic_properties = {}
tendency_properties = {}
assert (composite.input_properties == prognostic1.input_properties or
composite.input_properties == prognostic2.input_properties)
assert composite.diagnostic_properties == diagnostic_properties
assert composite.tendency_properties == tendency_properties
def test_prognostic_composite_two_components_incompatible_input_dims():
prognostic1 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims3'],
'units': 'degK',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
try:
TendencyComponentComposite(prognostic1, prognostic2)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_prognostic_composite_two_components_incompatible_input_units():
prognostic1 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'degK',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'm',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
try:
TendencyComponentComposite(prognostic1, prognostic2)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_prognostic_composite_two_components_compatible_input_units():
prognostic1 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'km',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={
'input1': {
'dims': ['dims1', 'dims2'],
'units': 'cm',
},
},
diagnostic_properties={},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic1, prognostic2)
assert 'input1' in composite.input_properties.keys()
assert composite.input_properties['input1']['dims'] == ['dims1', 'dims2']
assert units_are_compatible(composite.input_properties['input1']['units'], 'm')
def test_prognostic_composite_two_components_tendency():
prognostic1 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim1'],
'units': 'm/s',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim1'],
'units': 'm/s'
},
'tend2': {
'dims': ['dim1'],
'units': 'degK/s'
}
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic1, prognostic2)
input_properties = {}
diagnostic_properties = {}
tendency_properties = {
'tend1': {
'dims': ['dim1'],
'units': 'm/s'
},
'tend2': {
'dims': ['dim1'],
'units': 'degK/s'
}
}
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
assert composite.tendency_properties == tendency_properties
def test_prognostic_composite_two_components_tendency_incompatible_dims():
prognostic1 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim1'],
'units': 'm/s',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim2'],
'units': 'm/s'
},
'tend2': {
'dims': ['dim1'],
'units': 'degK/s'
}
},
diagnostic_output={},
tendency_output={},
)
try:
TendencyComponentComposite(prognostic1, prognostic2)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_prognostic_composite_two_components_tendency_incompatible_units():
prognostic1 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim1'],
'units': 'm/s',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim1'],
'units': 'degK/s'
},
'tend2': {
'dims': ['dim1'],
'units': 'degK/s'
}
},
diagnostic_output={},
tendency_output={},
)
try:
TendencyComponentComposite(prognostic1, prognostic2)
except InvalidPropertyDictError:
pass
else:
raise AssertionError('Should have raised InvalidPropertyDictError')
def test_prognostic_composite_two_components_tendency_compatible_units():
prognostic1 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim1'],
'units': 'km/s',
}
},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={},
diagnostic_properties={},
tendency_properties={
'tend1': {
'dims': ['dim1'],
'units': 'm/day'
},
},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic1, prognostic2)
assert 'tend1' in composite.tendency_properties.keys()
assert composite.tendency_properties['tend1']['dims'] == ['dim1']
assert units_are_compatible(composite.tendency_properties['tend1']['units'], 'm/s')
def test_prognostic_composite_two_components_diagnostic():
prognostic1 = MockTendencyComponent(
input_properties={},
diagnostic_properties={
'diag1': {
'dims': ['dim1'],
'units': 'm',
}
},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={},
diagnostic_properties={
'diag2': {
'dims': ['dim2'],
'units': 'm',
}
},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
composite = TendencyComponentComposite(prognostic1, prognostic2)
input_properties = {}
diagnostic_properties = {
'diag1': {
'dims': ['dim1'],
'units': 'm',
},
'diag2': {
'dims': ['dim2'],
'units': 'm',
},
}
tendency_properties = {}
assert composite.input_properties == input_properties
assert composite.diagnostic_properties == diagnostic_properties
assert composite.tendency_properties == tendency_properties
def test_prognostic_composite_two_components_overlapping_diagnostic():
prognostic1 = MockTendencyComponent(
input_properties={},
diagnostic_properties={
'diag1': {
'dims': ['dim1'],
'units': 'm',
}
},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
prognostic2 = MockTendencyComponent(
input_properties={},
diagnostic_properties={
'diag1': {
'dims': ['dim1'],
'units': 'm',
}
},
tendency_properties={},
diagnostic_output={},
tendency_output={},
)
try:
TendencyComponentComposite(prognostic1, prognostic2)
except SharedKeyError:
pass
else:
raise AssertionError('Should have raised SharedKeyError')
if __name__ == '__main__':
pytest.main([__file__])
| 29.633083 | 110 | 0.572364 | 2,893 | 39,412 | 7.505358 | 0.056343 | 0.084972 | 0.062175 | 0.068254 | 0.872288 | 0.862156 | 0.834293 | 0.806429 | 0.78506 | 0.76217 | 0 | 0.014967 | 0.311732 | 39,412 | 1,329 | 111 | 29.65538 | 0.785483 | 0.001015 | 0 | 0.69403 | 0 | 0 | 0.086182 | 0.004877 | 0 | 0 | 0 | 0 | 0.080431 | 1 | 0.047264 | false | 0.00995 | 0.004146 | 0.004146 | 0.072968 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
046d0cd0c6595d5de8cbddf485ee842ab2d307b5 | 87 | py | Python | concurrency_limit/__init__.py | beachmachine/python-concurrency-limit | 071cc0d6173ce6741a4846dd8e96e21947b837af | [
"MIT"
] | null | null | null | concurrency_limit/__init__.py | beachmachine/python-concurrency-limit | 071cc0d6173ce6741a4846dd8e96e21947b837af | [
"MIT"
] | 1 | 2021-11-13T09:18:12.000Z | 2021-11-13T09:18:12.000Z | concurrency_limit/__init__.py | beachmachine/python-concurrency-limit | 071cc0d6173ce6741a4846dd8e96e21947b837af | [
"MIT"
] | 1 | 2022-01-19T15:56:32.000Z | 2022-01-19T15:56:32.000Z | from .configuration import *
from .context_managers import *
from .exceptions import *
| 21.75 | 31 | 0.793103 | 10 | 87 | 6.8 | 0.6 | 0.294118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.137931 | 87 | 3 | 32 | 29 | 0.906667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b6c6abfbde15876e14747bfb677a2db61690bd0d | 61 | py | Python | tushare/stock/__init__.py | ritou11/tushare | 274393e0078f9a90ded060ac305b528a6a7743dd | [
"BSD-3-Clause"
] | null | null | null | tushare/stock/__init__.py | ritou11/tushare | 274393e0078f9a90ded060ac305b528a6a7743dd | [
"BSD-3-Clause"
] | null | null | null | tushare/stock/__init__.py | ritou11/tushare | 274393e0078f9a90ded060ac305b528a6a7743dd | [
"BSD-3-Clause"
] | null | null | null | import tushare.stock.indictor
import tushare.stock.trendline
| 20.333333 | 30 | 0.868852 | 8 | 61 | 6.625 | 0.625 | 0.490566 | 0.679245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.065574 | 61 | 2 | 31 | 30.5 | 0.929825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
b6d06d342ce8ee61265aab66de26ce659fc8c9cc | 109 | py | Python | UNIVESPalgortimo_1/novo.py | joaorobsonR/algoritmo1 | 9e6ef6ee8967b771d20d7ebf96478412b0a7940f | [
"MIT"
] | null | null | null | UNIVESPalgortimo_1/novo.py | joaorobsonR/algoritmo1 | 9e6ef6ee8967b771d20d7ebf96478412b0a7940f | [
"MIT"
] | null | null | null | UNIVESPalgortimo_1/novo.py | joaorobsonR/algoritmo1 | 9e6ef6ee8967b771d20d7ebf96478412b0a7940f | [
"MIT"
] | null | null | null | def media(n1, n2, n3):
m = (3/(1/((n1 + n2 + n3) + 4))) - 4
return m
print(media(n1=1, n2=2, n3=3))
| 18.166667 | 40 | 0.46789 | 23 | 109 | 2.217391 | 0.521739 | 0.27451 | 0.235294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 0.266055 | 109 | 5 | 41 | 21.8 | 0.4375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.5 | 0.25 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
b6d07d1a23edce1ab0416dbcc8eb1259960b298f | 97 | py | Python | unravel/admin/document_version_admin.py | cofiem/logomachy | fed77dc4b821f25a60fd9b9474c232107fe98f53 | [
"Apache-2.0"
] | null | null | null | unravel/admin/document_version_admin.py | cofiem/logomachy | fed77dc4b821f25a60fd9b9474c232107fe98f53 | [
"Apache-2.0"
] | 1 | 2017-10-29T08:16:02.000Z | 2017-10-30T14:19:59.000Z | unravel/admin/document_version_admin.py | cofiem/logomachy | fed77dc4b821f25a60fd9b9474c232107fe98f53 | [
"Apache-2.0"
] | null | null | null | from unravel.admin.base_admin import BaseAdmin
class DocumentVersionAdmin(BaseAdmin):
pass
| 16.166667 | 46 | 0.814433 | 11 | 97 | 7.090909 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134021 | 97 | 5 | 47 | 19.4 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
b6d795c6fc84abe25e7f3a4ad5e0524c4347df9d | 135 | py | Python | build_gpcr/management/commands/build_human_proteins.py | pszgaspar/protwis | 4989a67175ef3c95047d795c843cf6b9cf4141fa | [
"Apache-2.0"
] | 21 | 2016-01-20T09:33:14.000Z | 2021-12-20T19:19:45.000Z | build_gpcr/management/commands/build_human_proteins.py | pszgaspar/protwis | 4989a67175ef3c95047d795c843cf6b9cf4141fa | [
"Apache-2.0"
] | 75 | 2016-02-26T16:29:58.000Z | 2022-03-21T12:35:13.000Z | build_gpcr/management/commands/build_human_proteins.py | pszgaspar/protwis | 4989a67175ef3c95047d795c843cf6b9cf4141fa | [
"Apache-2.0"
] | 77 | 2016-01-22T08:44:26.000Z | 2022-02-01T15:54:56.000Z | from build.management.commands.build_human_proteins import Command as BuildHumanProteins
class Command(BuildHumanProteins):
pass
| 22.5 | 88 | 0.844444 | 15 | 135 | 7.466667 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 135 | 5 | 89 | 27 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
f3e75fd8b32d9f103c274536ea9a039ed9b43298 | 135 | py | Python | Beta/Sum of factorials with letters.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | Beta/Sum of factorials with letters.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | Beta/Sum of factorials with letters.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | import re
from math import factorial
def factorial_sum(string):
return sum(factorial(int(i)) for i in re.split(r'\D+',string) if i) | 33.75 | 71 | 0.733333 | 25 | 135 | 3.92 | 0.68 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140741 | 135 | 4 | 71 | 33.75 | 0.844828 | 0 | 0 | 0 | 0 | 0 | 0.022059 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.5 | 0.25 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
edf47dcbe5fd6cce589a4d508f2fa4dd1e22b015 | 1,430 | py | Python | fullScaleTest.py | schlesg/OpenDDSBenchmark | bafde0be66477888c335737facb07e9e4c10fc33 | [
"MIT"
] | 1 | 2021-03-26T09:52:12.000Z | 2021-03-26T09:52:12.000Z | fullScaleTest.py | schlesg/OpenDDSBenchmark | bafde0be66477888c335737facb07e9e4c10fc33 | [
"MIT"
] | null | null | null | fullScaleTest.py | schlesg/OpenDDSBenchmark | bafde0be66477888c335737facb07e9e4c10fc33 | [
"MIT"
] | null | null | null | import subprocess
import os
# print(os.getcwd())
# os.chdir("build/")
commandList = []
commandList.append("./initiator --Trans shmem.ini --SubTopic dummy --PubTopic MS1 --msgLength 5000 --roundtripCount 0 --pubName Dummy --updateRate 100") #C1
commandList.append("./initiator --Trans shmem.ini --SubTopic dummy --PubTopic MS1 --msgLength 5000 --roundtripCount 0 --pubName Dummy --updateRate 100") #C2
commandList.append("./initiator --Trans shmem.ini --SubTopic dummy --PubTopic MS1 --msgLength 5000 --roundtripCount 0 --pubName Dummy --updateRate 100") #C3
commandList.append("./initiator --Trans shmem.ini --SubTopic dummy --PubTopic MS1 --msgLength 5000 --roundtripCount 0 --pubName Dummy --updateRate 100") #C4
commandList.append("./echoer --Trans shmem.ini --SubTopic MS1 --PubTopic MS2 ") #MS1
commandList.append("./echoer --Trans shmem.ini --SubTopic MS2 --PubTopic C5 ") #MS2
commandList.append("./echoer --Trans shmem.ini --SubTopic C5 --PubTopic dummy ") #GW1
commandList.append("./echoer --Trans shmem.ini --SubTopic C5 --PubTopic dummy ") #GW2
commandList.append("./echoer --Trans shmem.ini --SubTopic C5 --PubTopic dummy ") #GW3
# commandList.append("./initiator --SubTopic C5 --Trans shmem.ini --PubTopic MS1 --msgLength 5000") #C5
for command in commandList:
subprocess.Popen(command.split(), cwd="build/")
input("Press Enter to shutdown...\n")
os.system("pkill -f echoer")
os.system("pkill -f initiator")
| 55 | 156 | 0.727972 | 181 | 1,430 | 5.751381 | 0.270718 | 0.163305 | 0.12488 | 0.181556 | 0.700288 | 0.700288 | 0.700288 | 0.615754 | 0.615754 | 0.615754 | 0 | 0.046311 | 0.109091 | 1,430 | 25 | 157 | 57.2 | 0.770801 | 0.112587 | 0 | 0.411765 | 0 | 0.235294 | 0.696414 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.117647 | 0 | 0.117647 | 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 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
611116b7ae209f49d5b6fdc2ee7568bb102985ae | 13,018 | py | Python | csv_cti/blueprints/web_api/views/agents.py | Osmond1689/csv-cti | 84be8241e9ba50f495b23775eb153e4129845474 | [
"MIT"
] | null | null | null | csv_cti/blueprints/web_api/views/agents.py | Osmond1689/csv-cti | 84be8241e9ba50f495b23775eb153e4129845474 | [
"MIT"
] | null | null | null | csv_cti/blueprints/web_api/views/agents.py | Osmond1689/csv-cti | 84be8241e9ba50f495b23775eb153e4129845474 | [
"MIT"
] | null | null | null | from csv_cti.blueprints.web_api import web_api
from flask import request,current_app,render_template
from csv_cti.blueprints.op.md5_token import encrypt_md5
from csv_cti.blueprints.op.agents import Agents_op
from csv_cti.blueprints.op.redis import redis_client
#websocket
# @web_api.route('/agents-status/',methods=['GET'])
# def agents_status():
# return render_template('socket.html')
#agents
@web_api.route('/agents-add/',methods=['POST'])
def agents_add():
return_data={}
r_token=request.json.get('token')
if r_token in encrypt_md5(current_app.config['MD5_KEY']):
r_data=request.json.get('data')
'''
{
"token":"aecsv_cti@88tech.net",
"data":
[{
"name":"50008", //必选
"instance_id":"", //可选,默认single_box
"uuid":"", //可选
"type":"", //可选 默认callback
"contact":"50008", //必选-分机号
"status":"", //可选 默认 On_break
"state":"", //可选 默认 Waitting
"group":"C68" //必选
"password":"" //新增
//判断重复
}]
}
'''
try:
Agents_op.add(r_data)
except Exception as e:
current_app.logger.debug("/agents-add/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
current_app.logger.info("/agents-add/ 添加成功")
return_data['msg']='Add OK'
return return_data,200
else:
return_data['msg']='Auth Fail'
return return_data,401
@web_api.route('/agents-rm/',methods=['POST'])
def agents_rm():
return_data={}
r_token=request.json.get('token')
if r_token in encrypt_md5(current_app.config['MD5_KEY']):
r_data=request.json.get('data')
'''
{
"token":"97d5fc0bdfc499fc8a008199cab1be53",
"data":[{
"name":xxx,必选参数
"group":xxxx,必选参数
}]
}
'''
try:
Agents_op.remove(r_data)
except Exception as e:
current_app.logger.debug("/agents-rm/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
current_app.logger.info("/agents-rm/ 删除成功")
return_data['msg']='Remove OK'
return return_data,200
else:
return_data['msg']='Auth Fail'
return return_data,401
#agent密码修改接口
@web_api.route('/agents-list/',methods=['POST'])
def agents_list():
return_data={}
r_token=request.json.get('token')
if r_token in encrypt_md5(current_app.config['MD5_KEY']):
r_data=request.json.get('data')
'''
{
"token":"aecsv_cti@88tech.net",
"data"://留空字符串查所有
{
"name":"osmond",//可选
"group":"C68"//可选
}
}
'''
try:
list=Agents_op.query(r_data)
except Exception as e:
current_app.logger.debug("/agents-list/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
current_app.logger.info("/agents-list/ 查询成功")
return_data['msg']='Query OK'
return_data['data']=list[0:-1]
return_data['total']=list[-1]
return_data['page_size']=r_data['page_size']
return_data['page_index']=r_data['page_index']
return return_data,200
else:
return_data['msg']='Auth Fail'
return return_data,401
@web_api.route('/agents-login/',methods=['POST'])
def agents_login():
'''
{
"token":"aecsv_cti@88tech.net",
"data":
{
"agent":"osmond",
"ip":"",
"agent-passwd:"",//md5加密,由用户手动输入
"group":"P91"
}
}
'''
return_data={}
r_token=request.json.get('token')
if r_token in encrypt_md5(current_app.config['MD5_KEY']):
r_data=request.json.get('data')
login_data={"group":r_data.get('group'),"name":r_data.get('agent'),"page_index":1,"page_size":10}
try:
list=Agents_op.query(login_data)
except Exception as e:
current_app.logger.debug("/agents-login/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
if not list[0]:
current_app.logger.info("/agents-status/ %s 查询失败,座席号不存在",r_data.get('agent'))
return_data['msg']='Agent Does Not Exist'
return return_data,404
else:
real_agent_passwd=list[0].get('password')
if r_data.get('agent_password')==real_agent_passwd:
return_data['msg']='Login OK'
return return_data,200
else:
current_app.logger.info("/agents-status/ %s 查询状态失败,密码错误",r_data.get('agent'))
return_data['msg']='Agent Password Error'
return return_data,402
else:
return_data['msg']='Auth Fail'
return return_data,401
@web_api.route('/agents-bind/',methods=['POST'])
def agents_bind():
return_data={}
r_token=request.json.get('token')
if r_token in encrypt_md5(current_app.config['MD5_KEY']):
r_data=request.json.get('data')
if r_data.get('agent') and r_data.get('ext') and r_data.get('group') and r_data.get('agent_password'):
'''
{
"token":"aecsv_cti@88tech.net",
"data":
{
"ip":"",
"agent":"osmond",
"ext":"50001",
"group":"C68",
"agent_password":"",
"ack":'1'//可选
}
}
'''
login_data={"group":r_data.get('group'),"name":r_data.get('agent'),"page_index":1,"page_size":10}
try:
list=Agents_op.query(login_data)
except Exception as e:
current_app.logger.debug("/agents-login/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
if not list[0]:
current_app.logger.info("/agents-login/ %s 签入失败,座席号不存在",r_data.get('agent'))
return_data['msg']='Agent Does Not Exist'
return return_data,404
else:
real_agent_passwd=list[0].get('password')
if r_data.get('agent_password')==real_agent_passwd:
if redis_client.exists(r_data.get('ext')+'_ext') and r_data.get('ack') != '1':
return_data['msg']='The extension number has been bound'
return_data['data']={'agent':redis_client.lrange(r_data.get('ext')+'_ext',0,-1)[1].decode('utf-8'),'ip':redis_client.lrange(r_data.get('ext')+'_ext',0,-1)[0].decode('utf-8')}
return return_data,403
else:
try:
Agents_op.login(r_data)
except Exception as e:
current_app.logger.debug("/agents-login/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
ip=request.remote_addr
#避免key重复,当座席号和分机号一致时就会出现重复
redis_client.hset(r_data.get('agent')+'_agent',r_data.get('agent'),r_data.get('ext'))
redis_client.lpush(r_data.get('ext')+'_ext',r_data.get('agent'),ip)
current_app.logger.info("/agents-login/ %s 签入成功",r_data.get('agent'))
return_data['msg']='Bind OK'
return return_data,200
else:
current_app.logger.info("/agents-Bind/ %s 签入失败,密码错误",r_data.get('agent'))
return_data['msg']='Agent Password Error'
return return_data,402
else:
return_data['msg']='Missing parameters'
current_app.logger.info('Bind 确少参数')
return return_data,502
else:
return_data['msg']='Auth Fail'
return return_data,401
@web_api.route('/agents-unbind/',methods=['POST'])
def agents_unbind():
return_data={}
r_token=request.json.get('token')
if r_token in encrypt_md5(current_app.config['MD5_KEY']):
r_data=request.json.get('data')
'''
{
"token":"aecsv_cti@88tech.net",
"data":
{
"agent":"osmond",//可选
"group":"C68"//可选
}
}
'''
login_data={"group":r_data.get('group'),"name":r_data.get('agent'),"page_index":1,"page_size":10}
try:
list=Agents_op.query(login_data)
except Exception as e:
current_app.logger.debug("/agents-logout/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
if not list[0]:
current_app.logger.info("/agents-logout/ %s 签出失败,座席号不存在",r_data.get('agent'))
return_data['msg']='Agent Does Not Exist'
return return_data,404
else:
real_agent_passwd=list[0].get('password')
if r_data.get('agent_password')==real_agent_passwd:
try:
Agents_op.logout(r_data)
except Exception as e:
current_app.logger.debug("/agents-out/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
current_app.logger.info("/agents-out/ 签出成功")
try:
ext=redis_client.hget(r_data.get('agent')+'_agent',r_data.get('agent')).decode('utf-8')
except AttributeError:
return_data['msg']='Agent Not Logged In'
return return_data,404
else:
redis_client.hdel(r_data.get('agent')+'_agent',r_data.get('agent'))
redis_client.delete(ext+'_ext')
return_data['msg']='Logout OK'
return return_data,200
else:
current_app.logger.info("/agents-logout/ %s 签出失败,密码错误",r_data.get('agent'))
return_data['msg']='Agent Password Error'
return return_data,402
else:
return_data['msg']='Auth Fail'
return return_data,401
@web_api.route('/agents-status/',methods=['POST'])
def agents_status():
'''
{
"token":"aecsv_cti@88tech.net",
"data":
{
"agent":"osmond",
"ip":"",
"agent-passwd:"",//md5加密,由用户手动输入
"group":"P91"
}
}
'''
return_data={}
r_token=request.json.get('token')
if r_token in encrypt_md5(current_app.config['MD5_KEY']):
r_data=request.json.get('data')
login_data={"group":r_data.get('group'),"name":r_data.get('agent'),"page_index":1,"page_size":10}
try:
list=Agents_op.query(login_data)
except Exception as e:
current_app.logger.debug("/agents-login/ 数据库操作失败:%s",e)
return_data['msg']='Voice abnormal, Please contact the Voice engineer'
return return_data,500
else:
if not list[0]:
current_app.logger.info("/agents-status/ %s 查询失败,座席号不存在",r_data.get('agent'))
return_data['msg']='Agent Does Not Exist'
return return_data,404
else:
real_agent_passwd=list[0].get('password')
if r_data.get('agent_password')==real_agent_passwd:
ip=request.remote_addr
if redis_client.hexists(r_data.get('agent')+'_agent',r_data.get('agent')):
ext=redis_client.hget(r_data.get('agent')+'_agent',r_data.get('agent')).decode('utf-8')
last_ip=redis_client.lrange(ext+'_ext',0,-1)[0].decode('utf-8')
redis_client.lset(ext+'_ext',0,ip)
return_data['msg']='Already Login'
return_data['data']={'agent':r_data.get('agent'),'ext':ext,'ip':last_ip}
return return_data,200
else:
return_data['msg']='Not Found'
return return_data,406
else:
current_app.logger.info("/agents-status/ %s 查询状态失败,密码错误",r_data.get('agent'))
return_data['msg']='Agent Password Error'
return return_data,402
else:
return_data['msg']='Auth Fail'
return return_data,401 | 39.093093 | 194 | 0.534875 | 1,545 | 13,018 | 4.302913 | 0.110032 | 0.12485 | 0.051745 | 0.06062 | 0.762635 | 0.72864 | 0.715102 | 0.705475 | 0.690584 | 0.676594 | 0 | 0.024782 | 0.321171 | 13,018 | 333 | 195 | 39.093093 | 0.727509 | 0.043478 | 0 | 0.702586 | 0 | 0 | 0.204643 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.030172 | false | 0.056034 | 0.021552 | 0 | 0.202586 | 0.017241 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
b6171742c86ce49637ef80addc95e714d1693b2f | 71 | py | Python | core/policy/__init__.py | deepcs233/DI-drive | ade3c9dadca29530f20ab49b526ba32818ea804b | [
"Apache-2.0"
] | null | null | null | core/policy/__init__.py | deepcs233/DI-drive | ade3c9dadca29530f20ab49b526ba32818ea804b | [
"Apache-2.0"
] | null | null | null | core/policy/__init__.py | deepcs233/DI-drive | ade3c9dadca29530f20ab49b526ba32818ea804b | [
"Apache-2.0"
] | null | null | null | from .auto_policy import AutoPolicy
from .coil_policy import CILPolicy
| 23.666667 | 35 | 0.859155 | 10 | 71 | 5.9 | 0.7 | 0.40678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.112676 | 71 | 2 | 36 | 35.5 | 0.936508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b67725e2a9293930ac84ba6127d04b66d25aae14 | 182 | py | Python | ippgtoolbox/benchmark/__init__.py | BeCuriousS/ippg-toolbox | 74b58459d038e2a77f0b51b33de372f3f9afd2a6 | [
"MIT"
] | null | null | null | ippgtoolbox/benchmark/__init__.py | BeCuriousS/ippg-toolbox | 74b58459d038e2a77f0b51b33de372f3f9afd2a6 | [
"MIT"
] | null | null | null | ippgtoolbox/benchmark/__init__.py | BeCuriousS/ippg-toolbox | 74b58459d038e2a77f0b51b33de372f3f9afd2a6 | [
"MIT"
] | null | null | null | from .benchmarkAlgorithms import BenchmarkAlgorithms
from .benchmarkSettings import *
from .benchmarkMetrics import BenchmarkMetrics
from .processExtraction import ProcessExtraction
| 36.4 | 52 | 0.884615 | 15 | 182 | 10.733333 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.087912 | 182 | 4 | 53 | 45.5 | 0.96988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b6a4170cc87a380731e043bbf17705ce247e22bc | 5,188 | py | Python | tests/test_adapters.py | leoninekev/mlsquare | ff9442c6e155cd8c891adb4ecdc80cad38a50506 | [
"MIT"
] | null | null | null | tests/test_adapters.py | leoninekev/mlsquare | ff9442c6e155cd8c891adb4ecdc80cad38a50506 | [
"MIT"
] | null | null | null | tests/test_adapters.py | leoninekev/mlsquare | ff9442c6e155cd8c891adb4ecdc80cad38a50506 | [
"MIT"
] | null | null | null | import keras
# import onnxruntime
import pytest
import numpy as np
from scipy import stats
from sklearn.linear_model import LogisticRegression, LinearRegression
from mlsquare import registry
from test_architectures import _load_classification_data, _load_regression_data
def _run_adapter(dataset_loader, proxy_model, mock_adapt, primal_model):
x_train, x_test, y_train, y_test = dataset_loader()
model = mock_adapt(proxy_model, primal_model)
params = {'optimizer':{'grid_search':['adam', 'nadam']}}
epochs = 300
batch_size = 50
trained_model = model.fit(x_train, y_train, params=params, epochs=epochs, batch_size=batch_size)
score = model.score(x_test, y_test)
_pred = model.predict(x_test)
assert isinstance(trained_model, keras.engine.sequential.Sequential)
assert 0 <= score[1] <=1
def test_sklearn_keras_classifier_basic_functionality():
primal_model = LogisticRegression()
proxy_model, mock_adapt = registry[('sklearn', 'LogisticRegression')]['default']
model = mock_adapt(proxy_model, primal_model)
assert hasattr(model, 'fit') == True
assert hasattr(model, 'score') == True
assert hasattr(model, 'save') == True
@pytest.mark.xfail() # Cross check why this is failing in circleCI.
def test_sklearn_keras_classifier_test_methods_with_params():
primal_model = LogisticRegression()
proxy_model, mock_adapt = registry[('sklearn', 'LogisticRegression')]['default']
_run_adapter(_load_classification_data, proxy_model, mock_adapt, primal_model)
# def test_sklearn_keras_classifier_test_save():
# primal_model = LogisticRegression()
# proxy_model, mock_adapt = registry[('sklearn', 'LogisticRegression')]['default']
# x_train, x_test, y_train, _ = _load_classification_data()
# model = mock_adapt(proxy_model, primal_model)
# epochs = 300
# batch_size = 50
# _trained_model = model.fit(x_train, y_train, epochs=epochs, batch_size=batch_size)
# model.save('test_onnx')
# # onnx_model = onnx.load("test_onnx.onnx")
# sess = onnxruntime.InferenceSession('test_onnx.onnx')
# input_name = sess.get_inputs()[0].name
# output_name = sess.get_outputs()[0].name
# x_test = x_test.values.astype(np.float32)
# result_as_proba = sess.run([output_name], {input_name: x_test})
# result_as_classes = (result_as_proba[0]>0.6).astype(np.int)
# keras_model_pred = model.predict(x_test)
# result_as_classes += 1
# keras_model_pred += 1
# _, p_value = stats.chisquare(result_as_classes, keras_model_pred)
# assert p_value > 0.9
def test_sklearn_keras_classifier_with_inappropriate_params():
primal_model = LogisticRegression()
proxy_model, mock_adapt = registry[('sklearn', 'LogisticRegression')]['default']
x_train, _, y_train, _ = _load_classification_data()
model = mock_adapt(proxy_model, primal_model)
params = [{'optimizer':{'grid_search':['adam', 'nadam']}}]
with pytest.raises(TypeError) as _:
_trained_model = model.fit(x_train, y_train, params=params)
def test_sklearn_keras_regressor_basic_functionality():
primal_model = LinearRegression()
proxy_model, mock_adapt = registry[('sklearn', 'LinearRegression')]['default']
model = mock_adapt(proxy_model, primal_model)
assert hasattr(model, 'fit') == True
assert hasattr(model, 'score') == True
assert hasattr(model, 'save') == True
@pytest.mark.xfail()
def test_sklearn_keras_regressor_test_methods_with_params():
primal_model = LinearRegression()
proxy_model, mock_adapt = registry[('sklearn', 'LinearRegression')]['default']
_run_adapter(_load_regression_data, proxy_model, mock_adapt, primal_model)
def test_sklearn_keras_regressor_with_inappropriate_params():
primal_model = LinearRegression()
proxy_model, mock_adapt = registry[('sklearn', 'LinearRegression')]['default']
x_train, _, y_train, _ = _load_regression_data()
model = mock_adapt(proxy_model, primal_model)
params = [{'optimizer':{'grid_search':['adam', 'nadam']}}]
with pytest.raises(TypeError) as _:
_trained_model = model.fit(x_train, y_train, params=params)
# @pytest.mark.xfail()
# def test_sklearn_keras_regressor_test_save():
# # Rewrite this test. This should not be non-deterministic.
# primal_model = LinearRegression()
# proxy_model, mock_adapt = registry[('sklearn', 'LinearRegression')]['default']
# x_train, x_test, y_train, _ = _load_regression_data()
# model = mock_adapt(proxy_model, primal_model)
# epochs = 300
# batch_size = 50
# _trained_model = model.fit(x_train, y_train, epochs=epochs, batch_size=batch_size)
# model.save('test_onnx')
# # onnx_model = onnx.load("test_onnx.onnx")
# sess = onnxruntime.InferenceSession('test_onnx.onnx')
# input_name = sess.get_inputs()[0].name
# output_name = sess.get_outputs()[0].name
# x_test = x_test.values.astype(np.float32)
# result = sess.run([output_name], {input_name: x_test})
# # result_as_classes = (result_as_proba[0]>0.6).astype(np.int)
# keras_model_pred = model.predict(x_test)
# _, p_value = stats.ttest_rel(result[0], keras_model_pred)
# assert p_value[0] < 0.1
| 44.34188 | 100 | 0.725328 | 672 | 5,188 | 5.22619 | 0.162202 | 0.051253 | 0.071754 | 0.05951 | 0.818622 | 0.77164 | 0.730068 | 0.714692 | 0.711845 | 0.689351 | 0 | 0.009081 | 0.150925 | 5,188 | 116 | 101 | 44.724138 | 0.788195 | 0.398805 | 0 | 0.534483 | 0 | 0 | 0.096743 | 0 | 0 | 0 | 0 | 0 | 0.137931 | 1 | 0.12069 | false | 0 | 0.12069 | 0 | 0.241379 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
fcbdd7ba608236b18795e6d89a80987b5cb5d1ff | 60 | py | Python | pyislands/ga/__init__.py | sglumac/pyislands | a5eaceb68a0f21bd8bc8586fdf8cf0d9b7a0134f | [
"MIT"
] | null | null | null | pyislands/ga/__init__.py | sglumac/pyislands | a5eaceb68a0f21bd8bc8586fdf8cf0d9b7a0134f | [
"MIT"
] | null | null | null | pyislands/ga/__init__.py | sglumac/pyislands | a5eaceb68a0f21bd8bc8586fdf8cf0d9b7a0134f | [
"MIT"
] | null | null | null | import pyislands.ga.steady
import pyislands.ga.generational
| 20 | 32 | 0.866667 | 8 | 60 | 6.5 | 0.625 | 0.576923 | 0.653846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.066667 | 60 | 2 | 33 | 30 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
fcc7e3da847cda0e7254337f13c0d0507e2d9869 | 107 | py | Python | dabstract/dataset/__init__.py | magics-tech/dabstract-1 | 9f7a2d99d0dff1df5c2f90c82b1eecc9c42c2c24 | [
"MIT"
] | 7 | 2020-11-04T13:21:01.000Z | 2021-12-14T13:08:04.000Z | dabstract/dataset/__init__.py | magics-tech/dabstract-1 | 9f7a2d99d0dff1df5c2f90c82b1eecc9c42c2c24 | [
"MIT"
] | null | null | null | dabstract/dataset/__init__.py | magics-tech/dabstract-1 | 9f7a2d99d0dff1df5c2f90c82b1eecc9c42c2c24 | [
"MIT"
] | 2 | 2020-11-26T09:25:23.000Z | 2021-09-22T12:05:14.000Z | from .dataset import *
from .select import *
from .helpers import *
from .dbs import *
from .xval import *
| 17.833333 | 22 | 0.719626 | 15 | 107 | 5.133333 | 0.466667 | 0.519481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.186916 | 107 | 5 | 23 | 21.4 | 0.885057 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fcd8f9979e250774a440fe70c2d85244b94a49bf | 34 | py | Python | wsgi.py | awecx/PyDocTeur | 47188f7263661a40775e3b45cf611d88d7c9297b | [
"MIT"
] | null | null | null | wsgi.py | awecx/PyDocTeur | 47188f7263661a40775e3b45cf611d88d7c9297b | [
"MIT"
] | null | null | null | wsgi.py | awecx/PyDocTeur | 47188f7263661a40775e3b45cf611d88d7c9297b | [
"MIT"
] | null | null | null | from pydocteur import application
| 17 | 33 | 0.882353 | 4 | 34 | 7.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117647 | 34 | 1 | 34 | 34 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fce74d8b95ebf428a5d0f5594e650785258002ff | 53,131 | py | Python | docs.py | akraccoon/cbd2.api.full | b837ad0f949a5508569758005a8aa5ec2d310143 | [
"Apache-2.0"
] | null | null | null | docs.py | akraccoon/cbd2.api.full | b837ad0f949a5508569758005a8aa5ec2d310143 | [
"Apache-2.0"
] | null | null | null | docs.py | akraccoon/cbd2.api.full | b837ad0f949a5508569758005a8aa5ec2d310143 | [
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
import json
import os
from datetime import timedelta, datetime
from uuid import uuid4
import openprocurement.api.tests.base as base_test
from openprocurement.api.tests.base import test_tender_data, test_bids, PrefixedRequestClass
from openprocurement.api.models import get_now
from openprocurement.api.tests.tender import BaseTenderWebTest
from webtest import TestApp
now = datetime.now()
bid = {
"data": {
"tenderers": [
{
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33"
},
"contactPoint": {
"email": "soleksuk@gmail.com",
"name": "Сергій Олексюк",
"telephone": "+380 (432) 21-69-30"
},
"identifier": {
"scheme": u"UA-EDR",
"id": u"00137256",
"uri": u"http://www.sc.gov.ua/"
},
"name": "ДКП «Школяр»"
}
],
"status": "draft",
"value": {
"amount": 500
}
}
}
bid2 = {
"data": {
"tenderers": [
{
"address": {
"countryName": "Україна",
"locality": "м. Львів",
"postalCode": "79013",
"region": "м. Львів",
"streetAddress": "вул. Островського, 34"
},
"contactPoint": {
"email": "aagt@gmail.com",
"name": "Андрій Олексюк",
"telephone": "+380 (322) 91-69-30"
},
"identifier": {
"scheme": u"UA-EDR",
"id": u"00137226",
"uri": u"http://www.sc.gov.ua/"
},
"name": "ДКП «Книга»"
}
],
"value": {
"amount": 499
}
}
}
question = {
"data": {
"author": {
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33"
},
"contactPoint": {
"email": "soleksuk@gmail.com",
"name": "Сергій Олексюк",
"telephone": "+380 (432) 21-69-30"
},
"identifier": {
"id": "00137226",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"scheme": "UA-EDR",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Школяр»"
},
"description": "Просимо додати таблицю потрібної калорійності харчування",
"title": "Калорійність"
}
}
answer = {
"data": {
"answer": "Таблицю додано в файлі \"Kalorijnist.xslx\""
}
}
cancellation = {
'data': {
'reason': 'cancellation reason'
}
}
test_max_uid = uuid4().hex
test_tender_maximum_data = {
"title": u"футляри до державних нагород",
"title_en": u"Cases with state awards",
"title_ru": u"футляры к государственным наградам",
"procuringEntity": {
"name": u"Державне управління справами",
"identifier": {
"scheme": u"UA-EDR",
"id": u"00037256",
"uri": u"http://www.dus.gov.ua/"
},
"address": {
"countryName": u"Україна",
"postalCode": u"01220",
"region": u"м. Київ",
"locality": u"м. Київ",
"streetAddress": u"вул. Банкова, 11, корпус 1"
},
"contactPoint": {
"name": u"Державне управління справами",
"telephone": u"0440000000"
},
'kind': 'general'
},
"value": {
"amount": 500,
"currency": u"UAH"
},
"minimalStep": {
"amount": 35,
"currency": u"UAH"
},
"items": [
{
"id": test_max_uid,
"description": u"футляри до державних нагород",
"description_en": u"Cases with state awards",
"description_ru": u"футляры к государственным наградам",
"classification": {
"scheme": u"CPV",
"id": u"44617100-9",
"description": u"Cartons"
},
"additionalClassifications": [
{
"scheme": u"ДКПП",
"id": u"17.21.1",
"description": u"папір і картон гофровані, паперова й картонна тара"
}
],
"unit": {
"name": u"item",
"code": u"44617100-9"
},
"quantity": 5
}
],
"enquiryPeriod": {
"endDate": (now + timedelta(days=7)).isoformat()
},
"tenderPeriod": {
"endDate": (now + timedelta(days=14)).isoformat()
},
"procurementMethodType": "belowThreshold",
"mode": u"test",
"features": [
{
"code": "OCDS-123454-AIR-INTAKE",
"featureOf": "item",
"relatedItem": test_max_uid,
"title": u"Потужність всмоктування",
"title_en": "Air Intake",
"description": u"Ефективна потужність всмоктування пилососа, в ватах (аероватах)",
"enum": [
{
"value": 0.1,
"title": u"До 1000 Вт"
},
{
"value": 0.15,
"title": u"Більше 1000 Вт"
}
]
},
{
"code": "OCDS-123454-YEARS",
"featureOf": "tenderer",
"title": u"Років на ринку",
"title_en": "Years trading",
"description": u"Кількість років, які організація учасник працює на ринку",
"enum": [
{
"value": 0.05,
"title": u"До 3 років"
},
{
"value": 0.1,
"title": u"Більше 3 років, менше 5 років"
},
{
"value": 0.15,
"title": u"Більше 5 років"
}
]
}
]
}
test_complaint_data = {'data':
{
'title': 'complaint title',
'description': 'complaint description',
'author': bid["data"]["tenderers"][0]
}
}
class DumpsTestAppwebtest(TestApp):
def do_request(self, req, status=None, expect_errors=None):
req.headers.environ["HTTP_HOST"] = "api-sandbox.openprocurement.org"
if hasattr(self, 'file_obj') and not self.file_obj.closed:
self.file_obj.write(req.as_bytes(True))
self.file_obj.write("\n")
if req.body:
try:
self.file_obj.write(
'\n' + json.dumps(json.loads(req.body), indent=2, ensure_ascii=False).encode('utf8'))
self.file_obj.write("\n")
except:
pass
self.file_obj.write("\n")
resp = super(DumpsTestAppwebtest, self).do_request(req, status=status, expect_errors=expect_errors)
if hasattr(self, 'file_obj') and not self.file_obj.closed:
headers = [(n.title(), v)
for n, v in resp.headerlist
if n.lower() != 'content-length']
headers.sort()
self.file_obj.write(str('\n%s\n%s\n') % (
resp.status,
str('\n').join([str('%s: %s') % (n, v) for n, v in headers]),
))
if resp.testbody:
try:
self.file_obj.write('\n' + json.dumps(json.loads(resp.testbody), indent=2, ensure_ascii=False).encode('utf8'))
except:
pass
self.file_obj.write("\n\n")
return resp
class TenderResourceTest(BaseTenderWebTest):
initial_data = test_tender_data
initial_bids = test_bids
docservice = True
def setUp(self):
self.app = DumpsTestAppwebtest(
"config:tests.ini", relative_to=os.path.dirname(base_test.__file__))
self.app.RequestClass = PrefixedRequestClass
self.app.authorization = ('Basic', ('broker', ''))
self.couchdb_server = self.app.app.registry.couchdb_server
self.db = self.app.app.registry.db
if self.docservice:
self.setUpDS()
self.app.app.registry.docservice_url = 'http://public.docs-sandbox.openprocurement.org'
def generate_docservice_url(self):
return super(TenderResourceTest, self).generate_docservice_url().replace('/localhost/', '/public.docs-sandbox.openprocurement.org/')
def test_docs_2pc(self):
# Creating tender in draft status
#
data = test_tender_data.copy()
data['status'] = 'draft'
with open('docs/source/tutorial/tender-post-2pc.http', 'w') as self.app.file_obj:
response = self.app.post_json(
'/tenders?opt_pretty=1', {"data": data})
self.assertEqual(response.status, '201 Created')
tender = response.json['data']
self.tender_id = tender['id']
owner_token = response.json['access']['token']
# switch to 'active.enquiries'
with open('docs/source/tutorial/tender-patch-2pc.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}?acc_token={}'.format(tender['id'], owner_token),
{'data': {"status": 'active.enquiries'}})
self.assertEqual(response.status, '200 OK')
def test_docs_tutorial(self):
request_path = '/tenders?opt_pretty=1'
# Exploring basic rules
#
with open('docs/source/tutorial/tender-listing.http', 'w') as self.app.file_obj:
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.get('/tenders')
self.assertEqual(response.status, '200 OK')
self.app.file_obj.write("\n")
with open('docs/source/tutorial/tender-post-attempt.http', 'w') as self.app.file_obj:
response = self.app.post(request_path, 'data', status=415)
self.assertEqual(response.status, '415 Unsupported Media Type')
self.app.authorization = ('Basic', ('broker', ''))
with open('docs/source/tutorial/tender-post-attempt-json.http', 'w') as self.app.file_obj:
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.post(
request_path, 'data', content_type='application/json', status=422)
self.assertEqual(response.status, '422 Unprocessable Entity')
# Creating tender
#
with open('docs/source/tutorial/tender-post-attempt-json-data.http', 'w') as self.app.file_obj:
response = self.app.post_json(
'/tenders?opt_pretty=1', {"data": test_tender_data})
self.assertEqual(response.status, '201 Created')
tender = response.json['data']
owner_token = response.json['access']['token']
with open('docs/source/tutorial/blank-tender-view.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}'.format(tender['id']))
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/initial-tender-listing.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders')
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/create-tender-procuringEntity.http', 'w') as self.app.file_obj:
response = self.app.post_json(
'/tenders?opt_pretty=1', {"data": test_tender_maximum_data})
self.assertEqual(response.status, '201 Created')
response = self.app.post_json('/tenders?opt_pretty=1', {"data": test_tender_data})
self.assertEqual(response.status, '201 Created')
with open('docs/source/tutorial/tender-listing-after-procuringEntity.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders')
self.assertEqual(response.status, '200 OK')
self.app.authorization = ('Basic', ('broker', ''))
# Modifying tender
#
tenderPeriod_endDate = get_now() + timedelta(days=15, seconds=10)
with open('docs/source/tutorial/patch-items-value-periods.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}?acc_token={}'.format(tender['id'], owner_token), {'data':
{
"tenderPeriod": {
"endDate": tenderPeriod_endDate.isoformat()
}
}
})
with open('docs/source/tutorial/tender-listing-after-patch.http', 'w') as self.app.file_obj:
self.app.authorization = None
response = self.app.get(request_path)
self.assertEqual(response.status, '200 OK')
self.app.authorization = ('Basic', ('broker', ''))
self.tender_id = tender['id']
# Setting Bid guarantee
#
with open('docs/source/tutorial/set-bid-guarantee.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}?acc_token={}'.format(
self.tender_id, owner_token), {"data": {"guarantee": {"amount": 8, "currency": "USD"}}})
self.assertEqual(response.status, '200 OK')
self.assertIn('guarantee', response.json['data'])
# Uploading documentation
#
with open('docs/source/tutorial/upload-tender-notice.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/documents?acc_token={}'.format(self.tender_id, owner_token),
{'data': {
'title': u'Notice.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
doc_id = response.json["data"]["id"]
with open('docs/source/tutorial/tender-documents.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/documents/{}'.format(
self.tender_id, doc_id))
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/tender-document-add-documentType.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/documents/{}?acc_token={}'.format(
self.tender_id, doc_id, owner_token), {"data": {"documentType": "technicalSpecifications"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/tender-document-edit-docType-desc.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/documents/{}?acc_token={}'.format(
self.tender_id, doc_id, owner_token), {"data": {"description": "document description modified"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/upload-award-criteria.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/documents?acc_token={}'.format(self.tender_id, owner_token),
{'data': {
'title': u'AwardCriteria.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
doc_id = response.json["data"]["id"]
with open('docs/source/tutorial/tender-documents-2.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/documents'.format(
self.tender_id))
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/update-award-criteria.http', 'w') as self.app.file_obj:
response = self.app.put_json('/tenders/{}/documents/{}?acc_token={}'.format(self.tender_id, doc_id, owner_token),
{'data': {
'title': u'AwardCriteria-2.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/tender-documents-3.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/documents'.format(
self.tender_id))
self.assertEqual(response.status, '200 OK')
# Enquiries
#
with open('docs/source/tutorial/ask-question.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/questions'.format(
self.tender_id), question, status=201)
question_id = response.json['data']['id']
self.assertEqual(response.status, '201 Created')
with open('docs/source/tutorial/answer-question.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/questions/{}?acc_token={}'.format(
self.tender_id, question_id, owner_token), answer, status=200)
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/list-question.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/questions'.format(
self.tender_id))
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/get-answer.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/questions/{}'.format(
self.tender_id, question_id))
self.assertEqual(response.status, '200 OK')
# Registering bid
#
self.set_status('active.tendering')
self.app.authorization = ('Basic', ('broker', ''))
bids_access = {}
with open('docs/source/tutorial/register-bidder.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/bids'.format(
self.tender_id), bid)
bid1_id = response.json['data']['id']
bids_access[bid1_id] = response.json['access']['token']
self.assertEqual(response.status, '201 Created')
with open('docs/source/tutorial/activate-bidder.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/bids/{}?acc_token={}'.format(
self.tender_id, bid1_id, bids_access[bid1_id]), {"data": {"status": "active"}})
self.assertEqual(response.status, '200 OK')
# Proposal Uploading
#
with open('docs/source/tutorial/upload-bid-proposal.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/bids/{}/documents?acc_token={}'.format(self.tender_id, bid1_id, bids_access[bid1_id]),
{'data': {
'title': u'Proposal.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/tutorial/bidder-documents.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/bids/{}/documents?acc_token={}'.format(
self.tender_id, bid1_id, bids_access[bid1_id]))
self.assertEqual(response.status, '200 OK')
# Second bidder registration
#
with open('docs/source/tutorial/register-2nd-bidder.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/bids'.format(
self.tender_id), bid2)
bid2_id = response.json['data']['id']
bids_access[bid2_id] = response.json['access']['token']
self.assertEqual(response.status, '201 Created')
# Auction
#
self.set_status('active.auction')
self.app.authorization = ('Basic', ('auction', ''))
patch_data = {
'auctionUrl': u'http://auction-sandbox.openprocurement.org/tenders/{}'.format(self.tender_id),
'bids': [
{
"id": bid1_id,
"participationUrl": u'http://auction-sandbox.openprocurement.org/tenders/{}?key_for_bid={}'.format(self.tender_id, bid1_id)
},
{
"id": bid2_id,
"participationUrl": u'http://auction-sandbox.openprocurement.org/tenders/{}?key_for_bid={}'.format(self.tender_id, bid2_id)
}
]
}
response = self.app.patch_json('/tenders/{}/auction?acc_token={}'.format(self.tender_id, owner_token),
{'data': patch_data})
self.assertEqual(response.status, '200 OK')
self.app.authorization = ('Basic', ('broker', ''))
with open('docs/source/tutorial/auction-url.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}'.format(self.tender_id))
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/bidder-participation-url.http', 'w') as self.app.file_obj:
response = self.app.get(
'/tenders/{}/bids/{}?acc_token={}'.format(self.tender_id, bid1_id, bids_access[bid1_id]))
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/bidder2-participation-url.http', 'w') as self.app.file_obj:
response = self.app.get(
'/tenders/{}/bids/{}?acc_token={}'.format(self.tender_id, bid2_id, bids_access[bid2_id]))
self.assertEqual(response.status, '200 OK')
# Confirming qualification
#
self.app.authorization = ('Basic', ('auction', ''))
response = self.app.get('/tenders/{}/auction'.format(self.tender_id))
auction_bids_data = response.json['data']['bids']
response = self.app.post_json('/tenders/{}/auction'.format(self.tender_id),
{'data': {'bids': auction_bids_data}})
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.get('/tenders/{}/awards'.format(self.tender_id))
# get pending award
award_id = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
with open('docs/source/tutorial/confirm-qualification.http', 'w') as self.app.file_obj:
self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(self.tender_id, award_id, owner_token), {"data": {"status": "active"}})
self.assertEqual(response.status, '200 OK')
response = self.app.get('/tenders/{}/contracts'.format(self.tender_id))
self.contract_id = response.json['data'][0]['id']
#### Set contract value
tender = self.db.get(self.tender_id)
for i in tender.get('awards', []):
i['complaintPeriod']['endDate'] = i['complaintPeriod']['startDate']
self.db.save(tender)
with open('docs/source/tutorial/tender-contract-set-contract-value.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/contracts/{}?acc_token={}'.format(
self.tender_id, self.contract_id, owner_token), {"data": {"contractNumber": "contract #13111", "value": {"amount": 238}}})
self.assertEqual(response.status, '200 OK')
self.assertEqual(response.json['data']['value']['amount'], 238)
#### Setting contract signature date
#
with open('docs/source/tutorial/tender-contract-sign-date.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/contracts/{}?acc_token={}'.format(
self.tender_id, self.contract_id, owner_token), {'data': {"dateSigned": get_now().isoformat()} })
self.assertEqual(response.status, '200 OK')
#### Setting contract period
period_dates = {"period": {"startDate": (now).isoformat(), "endDate": (now + timedelta(days=365)).isoformat()}}
with open('docs/source/tutorial/tender-contract-period.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/contracts/{}?acc_token={}'.format(
self.tender_id, self.contract_id, owner_token), {'data': {'period': period_dates["period"]}})
self.assertEqual(response.status, '200 OK')
#### Uploading contract documentation
#
with open('docs/source/tutorial/tender-contract-upload-document.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/contracts/{}/documents?acc_token={}'.format(self.tender_id, self.contract_id, owner_token),
{'data': {
'title': u'contract_first_document.doc',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/msword',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/tutorial/tender-contract-get-documents.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/contracts/{}/documents'.format(
self.tender_id, self.contract_id))
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/tender-contract-upload-second-document.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/contracts/{}/documents?acc_token={}'.format(self.tender_id, self.contract_id, owner_token),
{'data': {
'title': u'contract_second_document.doc',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/msword',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/tutorial/tender-contract-get-documents-again.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/contracts/{}/documents'.format(
self.tender_id, self.contract_id))
self.assertEqual(response.status, '200 OK')
#### Setting contract signature date
#
with open('docs/source/tutorial/tender-contract-sign-date.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/contracts/{}?acc_token={}'.format(
self.tender_id, self.contract_id, owner_token), {'data': {"dateSigned": get_now().isoformat()} })
self.assertEqual(response.status, '200 OK')
#### Contract signing
#
tender = self.db.get(self.tender_id)
for i in tender.get('awards', []):
i['complaintPeriod']['endDate'] = i['complaintPeriod']['startDate']
self.db.save(tender)
with open('docs/source/tutorial/tender-contract-sign.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/contracts/{}?acc_token={}'.format(
self.tender_id, self.contract_id, owner_token), {'data': {'status': 'active'}})
self.assertEqual(response.status, '200 OK')
# Preparing the cancellation request
#
self.set_status('active.awarded')
with open('docs/source/tutorial/prepare-cancellation.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/cancellations?acc_token={}'.format(
self.tender_id, owner_token), cancellation)
self.assertEqual(response.status, '201 Created')
cancellation_id = response.json['data']['id']
# Filling cancellation with protocol and supplementary documentation
#
with open('docs/source/tutorial/upload-cancellation-doc.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/cancellations/{}/documents?acc_token={}'.format(self.tender_id, cancellation_id, owner_token),
{'data': {
'title': u'Notice.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
cancellation_doc_id = response.json['data']['id']
self.assertEqual(response.status, '201 Created')
with open('docs/source/tutorial/patch-cancellation.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/cancellations/{}/documents/{}?acc_token={}'.format(
self.tender_id, cancellation_id, cancellation_doc_id, owner_token), {'data': {"description": 'Changed description'}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/tutorial/update-cancellation-doc.http', 'w') as self.app.file_obj:
response = self.app.put_json('/tenders/{}/cancellations/{}/documents/{}?acc_token={}'.format(self.tender_id, cancellation_id, cancellation_doc_id, owner_token),
{'data': {
'title': u'Notice-2.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '200 OK')
# Activating the request and cancelling tender
#
with open('docs/source/tutorial/active-cancellation.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/cancellations/{}?acc_token={}'.format(
self.tender_id, cancellation_id, owner_token), {"data": {"status": "active"}})
self.assertEqual(response.status, '200 OK')
def test_docs_complaints(self):
###################### Tender Conditions Claims/Complaints ##################
#
#### Claim Submission (with documents)
#
self.create_tender()
with open('docs/source/complaints/complaint-submission.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/complaints'.format(
self.tender_id), test_complaint_data)
self.assertEqual(response.status, '201 Created')
complaint1_id = response.json['data']['id']
complaint1_token = response.json['access']['token']
with open('docs/source/complaints/complaint-submission-upload.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/complaints/{}/documents?acc_token={}'.format(
self.tender_id, complaint1_id, complaint1_token), {'data': {
'title': u'Complaint_Attachement.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/complaints/complaint-claim.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint1_id, complaint1_token), {"data":{"status":"claim"}})
self.assertEqual(response.status, '200 OK')
#### Claim Submission (without documents)
#
test_complaint_data['data']['status'] = 'claim'
with open('docs/source/complaints/complaint-submission-claim.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/complaints'.format(
self.tender_id), test_complaint_data)
self.assertEqual(response.status, '201 Created')
complaint2_id = response.json['data']['id']
complaint2_token = response.json['access']['token']
#### Tender Conditions Claim/Complaint Retrieval
#
with open('docs/source/complaints/complaints-list.http', 'w') as self.app.file_obj:
self.app.authorization = None
response = self.app.get('/tenders/{}/complaints'.format(self.tender_id))
self.assertEqual(response.status, '200 OK')
with open('docs/source/complaints/complaint.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/complaints/{}'.format(self.tender_id, complaint1_id))
self.assertEqual(response.status, '200 OK')
self.app.authorization = ('Basic', ('broker', ''))
#### Claim's Answer
#
with open('docs/source/complaints/complaint-answer.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(self.tender_id, complaint1_id, self.tender_token),
{
"data": {
"status": "answered",
"resolutionType": "resolved",
"tendererAction": "Виправлено неконкурентні умови",
"resolution": "Виправлено неконкурентні умови"
}
}
)
self.assertEqual(response.status, '200 OK')
#### Satisfied Claim
#
with open('docs/source/complaints/complaint-satisfy.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint1_id, complaint1_token), {"data":{"status":"resolved","satisfied":True}})
self.assertEqual(response.status, '200 OK')
#### Satisfied Claim
#
response = self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint2_id, self.tender_token), {"data":{"status":"answered","resolutionType":"resolved","resolution":"Виправлено неконкурентні умови"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/complaints/complaint-escalate.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint2_id, complaint2_token), {"data":{"status":"pending","satisfied":False}})
self.assertEqual(response.status, '200 OK')
#### Rejecting Tender Conditions Complaint
#
self.app.authorization = ('Basic', ('reviewer', ''))
with open('docs/source/complaints/complaint-reject.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/complaints/{}'.format(
self.tender_id, complaint2_id), {"data":{"status":"invalid"}})
self.assertEqual(response.status, '200 OK')
#### Submitting Tender Conditions Complaint Resolution
#
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.post_json('/tenders/{}/complaints'.format(
self.tender_id), test_complaint_data)
self.assertEqual(response.status, '201 Created')
complaint3_id = response.json['data']['id']
complaint3_token = response.json['access']['token']
self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint3_id, self.tender_token), {"data":{"status":"answered","resolutionType":"resolved","resolution":"Виправлено неконкурентні умови"}})
self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint3_id, complaint3_token), {"data":{"status":"pending","satisfied":False}})
response = self.app.post_json('/tenders/{}/complaints'.format(
self.tender_id), test_complaint_data)
self.assertEqual(response.status, '201 Created')
del test_complaint_data['data']['status']
complaint4_id = response.json['data']['id']
complaint4_token = response.json['access']['token']
self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint4_id, self.tender_token), {"data":{"status":"answered","resolutionType":"resolved","resolution":"Виправлено неконкурентні умови"}})
self.app.patch_json('/tenders/{}/complaints/{}?acc_token={}'.format(
self.tender_id, complaint4_id, complaint4_token), {"data":{"status":"pending","satisfied":False}})
self.app.authorization = ('Basic', ('reviewer', ''))
with open('docs/source/complaints/complaint-resolution-upload.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/complaints/{}/documents'.format(
self.tender_id, complaint3_id), {'data': {
'title': u'ComplaintResolution.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/complaints/complaint-resolve.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/complaints/{}'.format(
self.tender_id, complaint3_id), {"data":{"status":"resolved"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/complaints/complaint-decline.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/complaints/{}'.format(
self.tender_id, complaint4_id), {"data":{"status":"declined"}})
self.assertEqual(response.status, '200 OK')
# create bids
self.set_status('active.tendering')
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.post_json('/tenders/{}/bids'.format(self.tender_id),
{'data': {'tenderers': [bid["data"]["tenderers"][0]], "value": {"amount": 450}}})
bid_id = response.json['data']['id']
bid_token = response.json['access']['token']
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.post_json('/tenders/{}/bids'.format(self.tender_id),
{'data': {'tenderers': [bid["data"]["tenderers"][0]], "value": {"amount": 475}}})
# get auction info
self.set_status('active.auction')
self.app.authorization = ('Basic', ('auction', ''))
response = self.app.get('/tenders/{}/auction'.format(self.tender_id))
auction_bids_data = response.json['data']['bids']
# posting auction urls
response = self.app.patch_json('/tenders/{}/auction'.format(self.tender_id),
{
'data': {
'auctionUrl': 'https://tender.auction.url',
'bids': [
{
'id': i['id'],
'participationUrl': 'https://tender.auction.url/for_bid/{}'.format(i['id'])
}
for i in auction_bids_data
]
}
})
# posting auction results
self.app.authorization = ('Basic', ('auction', ''))
response = self.app.post_json('/tenders/{}/auction'.format(self.tender_id),
{'data': {'bids': auction_bids_data}})
# get awards
self.app.authorization = ('Basic', ('broker', ''))
with open('docs/source/qualification/awards-get.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/awards'.format(self.tender_id))
self.assertEqual(response.status, '200 OK')
award_id = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
with open('docs/source/qualification/award-pending-upload.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/documents?acc_token={}'.format(
self.tender_id, award_id, self.tender_token), {'data': {
'title': u'Unsuccessful_Reason.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/qualification/award-pending-unsuccessful.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(
self.tender_id, award_id, self.tender_token), {"data":{"status":"unsuccessful"}})
self.assertEqual(response.status, '200 OK')
response = self.app.get('/tenders/{}/awards'.format(self.tender_id))
award_id2 = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
with open('docs/source/qualification/award-pending-active.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(
self.tender_id, award_id2, self.tender_token), {"data":{"status":"active"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/qualification/award-active-get.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/awards/{}'.format(
self.tender_id, award_id2))
self.assertEqual(response.status, '200 OK')
with open('docs/source/qualification/award-active-cancel.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(
self.tender_id, award_id2, self.tender_token), {"data":{"status":"cancelled"}})
self.assertEqual(response.status, '200 OK')
response = self.app.get('/tenders/{}/awards?acc_token={}'.format(self.tender_id, self.tender_token))
award_id3 = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
with open('docs/source/qualification/award-active-cancel-upload.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/documents?acc_token={}'.format(
self.tender_id, award_id3, self.tender_token), {'data': {
'title': u'Cancellation_Reason.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/qualification/award-active-cancel-disqualify.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(
self.tender_id, award_id3, self.tender_token), {"data":{"status":"unsuccessful"}})
self.assertEqual(response.status, '200 OK')
###################### Tender Award Claims/Complaints ##################
#
#### Tender Award Claim Submission (with documents)
#
with open('docs/source/complaints/award-complaint-submission.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/complaints?acc_token={}'.format(
self.tender_id, award_id, bid_token), test_complaint_data)
self.assertEqual(response.status, '201 Created')
complaint1_id = response.json['data']['id']
complaint1_token = response.json['access']['token']
with open('docs/source/complaints/award-complaint-submission-upload.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/complaints/{}/documents?acc_token={}'.format(
self.tender_id, award_id, complaint1_id, complaint1_token), {'data': {
'title': u'Complaint_Attachement.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/complaints/award-complaint-claim.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint1_id, complaint1_token), {"data":{"status":"claim"}})
self.assertEqual(response.status, '200 OK')
#### Tender Award Claim Submission (without documents)
#
test_complaint_data['data']['status'] = 'claim'
with open('docs/source/complaints/award-complaint-submission-claim.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/complaints?acc_token={}'.format(
self.tender_id, award_id, bid_token), test_complaint_data)
self.assertEqual(response.status, '201 Created')
complaint2_id = response.json['data']['id']
complaint2_token = response.json['access']['token']
#### Tender Award Claim/Complaint Retrieval
#
with open('docs/source/complaints/award-complaints-list.http', 'w') as self.app.file_obj:
self.app.authorization = None
response = self.app.get('/tenders/{}/awards/{}/complaints'.format(self.tender_id, award_id,))
self.assertEqual(response.status, '200 OK')
with open('docs/source/complaints/award-complaint.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/awards/{}/complaints/{}'.format(self.tender_id, award_id, complaint1_id))
self.assertEqual(response.status, '200 OK')
self.app.authorization = ('Basic', ('broker', ''))
#### Claim's Answer
#
with open('docs/source/complaints/award-complaint-answer.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(self.tender_id, award_id, complaint1_id, self.tender_token),
{
"data": {
"status": "answered",
"resolutionType": "resolved",
"tendererAction": "Виправлено неконкурентні умови",
"resolution": "Виправлено неконкурентні умови"
}
}
)
self.assertEqual(response.status, '200 OK')
#### Satisfied Claim
#
with open('docs/source/complaints/award-complaint-satisfy.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint1_id, complaint1_token), {"data":{"status":"resolved","satisfied":True}})
self.assertEqual(response.status, '200 OK')
#### Satisfied Claim
#
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint2_id, self.tender_token), {"data":{"status":"answered","resolutionType":"resolved","resolution":"Виправлено неконкурентні умови"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/complaints/award-complaint-escalate.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint2_id, complaint2_token), {"data":{"status":"pending","satisfied":False}})
self.assertEqual(response.status, '200 OK')
#### Rejecting Tender Award Complaint
#
self.app.authorization = ('Basic', ('reviewer', ''))
with open('docs/source/complaints/award-complaint-reject.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}'.format(
self.tender_id, award_id, complaint2_id), {"data":{"status":"invalid"}})
self.assertEqual(response.status, '200 OK')
#### Submitting Tender Award Complaint Resolution
#
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.post_json('/tenders/{}/awards/{}/complaints?acc_token={}'.format(
self.tender_id, award_id, bid_token), test_complaint_data)
self.assertEqual(response.status, '201 Created')
complaint3_id = response.json['data']['id']
complaint3_token = response.json['access']['token']
self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint3_id, self.tender_token), {"data":{"status":"answered","resolutionType":"resolved","resolution":"Виправлено неконкурентні умови"}})
self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint3_id, complaint3_token), {"data":{"status":"pending","satisfied":False}})
response = self.app.post_json('/tenders/{}/awards/{}/complaints?acc_token={}'.format(
self.tender_id, award_id, bid_token), test_complaint_data)
self.assertEqual(response.status, '201 Created')
complaint4_id = response.json['data']['id']
complaint4_token = response.json['access']['token']
self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint4_id, self.tender_token), {"data":{"status":"answered","resolutionType":"resolved","resolution":"Виправлено неконкурентні умови"}})
self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(
self.tender_id, award_id, complaint4_id, complaint4_token), {"data":{"status":"pending","satisfied":False}})
self.app.authorization = ('Basic', ('reviewer', ''))
with open('docs/source/complaints/award-complaint-resolution-upload.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/complaints/{}/documents'.format(
self.tender_id, award_id, complaint3_id), {'data': {
'title': u'ComplaintResolution.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
}})
self.assertEqual(response.status, '201 Created')
with open('docs/source/complaints/award-complaint-resolve.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}'.format(
self.tender_id, award_id, complaint3_id), {"data":{"status":"resolved"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/complaints/award-complaint-decline.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}'.format(
self.tender_id, award_id, complaint4_id), {"data":{"status":"declined"}})
self.assertEqual(response.status, '200 OK')
self.app.authorization = ('Basic', ('broker', ''))
with open('docs/source/qualification/awards-unsuccessful-get1.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/awards'.format(
self.tender_id, award_id))
self.assertEqual(response.status, '200 OK')
with open('docs/source/qualification/award-unsuccessful-cancel.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(
self.tender_id, award_id, self.tender_token), {"data":{"status":"cancelled"}})
self.assertEqual(response.status, '200 OK')
with open('docs/source/qualification/awards-unsuccessful-get2.http', 'w') as self.app.file_obj:
response = self.app.get('/tenders/{}/awards'.format(
self.tender_id, award_id))
self.assertEqual(response.status, '200 OK')
| 46.60614 | 182 | 0.562591 | 5,642 | 53,131 | 5.174938 | 0.083836 | 0.055382 | 0.043566 | 0.062883 | 0.835394 | 0.820872 | 0.793506 | 0.757544 | 0.741035 | 0.726445 | 0 | 0.017396 | 0.276166 | 53,131 | 1,139 | 183 | 46.647059 | 0.741588 | 0.024016 | 0 | 0.47907 | 0 | 0 | 0.289356 | 0.149714 | 0 | 0 | 0 | 0 | 0.109302 | 1 | 0.006977 | false | 0.002326 | 0.010465 | 0.001163 | 0.025581 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
1e631ad39eebb9049f90ad637d1b70e8c5d8a71b | 136 | py | Python | minibatch_sgd1/data_process/tool/sperate.py | DiracSea/multi_linear_regression | ab047c2c0769e0389c5e01719f1afbc1db70beb0 | [
"MIT"
] | null | null | null | minibatch_sgd1/data_process/tool/sperate.py | DiracSea/multi_linear_regression | ab047c2c0769e0389c5e01719f1afbc1db70beb0 | [
"MIT"
] | null | null | null | minibatch_sgd1/data_process/tool/sperate.py | DiracSea/multi_linear_regression | ab047c2c0769e0389c5e01719f1afbc1db70beb0 | [
"MIT"
] | null | null | null |
def split_num(batchsize):
train_num = int(batchsize*7/10+1/2)
valid_num = batchsize - train_num
return train_num, valid_num | 27.2 | 39 | 0.720588 | 22 | 136 | 4.181818 | 0.545455 | 0.26087 | 0.369565 | 0.434783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.045045 | 0.183824 | 136 | 5 | 40 | 27.2 | 0.783784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
949569495522d0377c31f1c0df798fd26dda3eff | 1,295 | py | Python | tests/core/_utils/test_etherscan.py | corydickson/ethpm-cli | bc25860d6a81d28603d76be06b3a896893324a39 | [
"MIT"
] | 34 | 2019-04-10T17:14:59.000Z | 2022-02-22T11:18:48.000Z | tests/core/_utils/test_etherscan.py | corydickson/ethpm-cli | bc25860d6a81d28603d76be06b3a896893324a39 | [
"MIT"
] | 65 | 2019-04-10T17:41:07.000Z | 2021-04-02T21:47:27.000Z | tests/core/_utils/test_etherscan.py | corydickson/ethpm-cli | bc25860d6a81d28603d76be06b3a896893324a39 | [
"MIT"
] | 9 | 2019-04-25T10:35:06.000Z | 2021-06-02T11:06:18.000Z | import pytest
from ethpm_cli._utils.etherscan import is_etherscan_uri
@pytest.mark.parametrize(
"uri,expected",
(
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:1", True),
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:3", True),
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:4", True),
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:5", True),
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:42", True),
("etherscan://:1", False),
("etherscan://invalid:1", False),
# non-checksummed
("etherscan://0x6b5da3ca4286baa7fbaf64eeee1834c7d430b729:1", False),
# bad path
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729/1", False),
# no chain_id
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729", False),
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:", False),
("etherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:10", False),
("://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:1", False),
("xetherscan://0x6b5DA3cA4286Baa7fBaf64EEEE1834C7d430B729:1", False),
),
)
def test_is_etherscan_uri(uri, expected):
actual = is_etherscan_uri(uri)
assert actual == expected
| 41.774194 | 77 | 0.705019 | 90 | 1,295 | 10.033333 | 0.377778 | 0.564784 | 0.243632 | 0.126246 | 0.180509 | 0 | 0 | 0 | 0 | 0 | 0 | 0.257646 | 0.166795 | 1,295 | 30 | 78 | 43.166667 | 0.57924 | 0.027799 | 0 | 0 | 0 | 0 | 0.565737 | 0.54502 | 0 | 0 | 0.401594 | 0 | 0.041667 | 1 | 0.041667 | false | 0 | 0.083333 | 0 | 0.125 | 0 | 0 | 0 | 1 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
949a7a8a9b2a1ac907b35a948ed6ab4a299db351 | 518 | py | Python | logics/classes/propositional/proof_theories/__init__.py | ariroffe/logics | fb918ae8cf243a452e5b030f0df17add83f47f8b | [
"MIT"
] | 12 | 2021-03-31T08:12:09.000Z | 2022-03-15T21:36:59.000Z | logics/classes/propositional/proof_theories/__init__.py | ariroffe/logics | fb918ae8cf243a452e5b030f0df17add83f47f8b | [
"MIT"
] | null | null | null | logics/classes/propositional/proof_theories/__init__.py | ariroffe/logics | fb918ae8cf243a452e5b030f0df17add83f47f8b | [
"MIT"
] | 1 | 2021-03-31T15:14:26.000Z | 2021-03-31T15:14:26.000Z | from logics.classes.propositional.proof_theories.derivation import Derivation, DerivationStep
from logics.classes.propositional.proof_theories.axiom_system import AxiomSystem
from logics.classes.propositional.proof_theories.natural_deduction import NaturalDeductionRule, NaturalDeductionStep, \
NaturalDeductionSystem
from logics.classes.propositional.proof_theories.sequents import Sequent, SequentNode, SequentCalculus
from logics.classes.propositional.proof_theories.tableaux import TableauxNode, TableauxSystem | 86.333333 | 119 | 0.889961 | 53 | 518 | 8.566038 | 0.45283 | 0.110132 | 0.187225 | 0.330396 | 0.473568 | 0.473568 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057915 | 518 | 6 | 120 | 86.333333 | 0.930328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.833333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
94c6b6f72f836f6c9317d9dfe20d5aeb2cd32739 | 477 | py | Python | optiml/opti/constrained/__init__.py | AF207/optiml | f8860d90d4f5b6d35a3ed0ef3c1d014a2b517a72 | [
"MIT"
] | 1 | 2021-04-06T13:59:03.000Z | 2021-04-06T13:59:03.000Z | optiml/opti/constrained/__init__.py | AF207/optiml | f8860d90d4f5b6d35a3ed0ef3c1d014a2b517a72 | [
"MIT"
] | null | null | null | optiml/opti/constrained/__init__.py | AF207/optiml | f8860d90d4f5b6d35a3ed0ef3c1d014a2b517a72 | [
"MIT"
] | null | null | null | __all__ = ['BoxConstrainedQuadraticOptimizer', 'LagrangianBoxConstrainedQuadratic', 'LagrangianConstrainedQuadratic',
'ProjectedGradient', 'ActiveSet', 'FrankWolfe', 'InteriorPoint']
from ._base import BoxConstrainedQuadraticOptimizer, LagrangianBoxConstrainedQuadratic, LagrangianConstrainedQuadratic
from .projected_gradient import ProjectedGradient
from .active_set import ActiveSet
from .frank_wolfe import FrankWolfe
from .interior_point import InteriorPoint
| 47.7 | 118 | 0.844864 | 34 | 477 | 11.588235 | 0.558824 | 0.329949 | 0.482234 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.092243 | 477 | 9 | 119 | 53 | 0.909931 | 0 | 0 | 0 | 0 | 0 | 0.301887 | 0.199161 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.714286 | 0 | 0.714286 | 0 | 0 | 0 | 1 | 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 | 1 | 0 | 0 | 6 |
94d0bdf08fe7539552a5f44b66438edc12051af6 | 129 | bzl | Python | tools/commons.bzl | davido/bazlets | 46dd9828c5859db0eb3577fce8a043dcef40275e | [
"Apache-2.0"
] | 1 | 2016-12-14T04:50:26.000Z | 2016-12-14T04:50:26.000Z | tools/commons.bzl | davido/bazlets | 46dd9828c5859db0eb3577fce8a043dcef40275e | [
"Apache-2.0"
] | null | null | null | tools/commons.bzl | davido/bazlets | 46dd9828c5859db0eb3577fce8a043dcef40275e | [
"Apache-2.0"
] | null | null | null | PLUGIN_DEPS_NEVERLINK = [
"//external:gerrit-plugin-api-neverlink",
]
PLUGIN_DEPS = [
"//external:gerrit-plugin-api",
]
| 16.125 | 45 | 0.674419 | 14 | 129 | 6 | 0.428571 | 0.238095 | 0.47619 | 0.547619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147287 | 129 | 7 | 46 | 18.428571 | 0.763636 | 0 | 0 | 0 | 0 | 0 | 0.511628 | 0.511628 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
94e5367c37bb09c0fbe5cf346dda102305b4656c | 27,792 | py | Python | networking_generic_switch/devices/corsa_devices/corsavfc.py | ChameleonCloud/networking-generic-switch | 98ddec1f11eab5197f1443207b13a16f364e5f10 | [
"Apache-2.0"
] | null | null | null | networking_generic_switch/devices/corsa_devices/corsavfc.py | ChameleonCloud/networking-generic-switch | 98ddec1f11eab5197f1443207b13a16f364e5f10 | [
"Apache-2.0"
] | 4 | 2018-11-21T17:54:37.000Z | 2021-10-04T14:40:40.000Z | networking_generic_switch/devices/corsa_devices/corsavfc.py | ChameleonCloud/networking-generic-switch | 98ddec1f11eab5197f1443207b13a16f364e5f10 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import json
import re
import requests
from oslo_log import log as logging
LOG = logging.getLogger(__name__)
#
# ENDPOINTS
#
endpoint = "/api/v1"
ep_bridges = endpoint + "/bridges" # Bridge
ep_ports = endpoint + "/ports" # Ports
#
# PORT MODIFY
#
# 204 No content
# 400 Bad Request
# 403 Forbidden
# 404 Not Found
# 409 Conflict
def port_modify_tunnel_mode(headers, url_switch, port_number, tunnel_mode):
url = url_switch + ep_ports + "/" + str(port_number)
data = [
{"op": "replace", "path": "/tunnel-mode", "value": tunnel_mode},
]
try:
r = requests.patch(
url, data=json.dumps(data), headers=headers, verify=False
)
except Exception as e:
raise e
return r
def port_modify_mtu(headers, url_switch, port_number, mtu):
url = url_switch + ep_ports + "/" + str(port_number)
data = [
{"op": "replace", "path": "/mtu", "value": mtu},
]
try:
r = requests.patch(
url, data=json.dumps(data), headers=headers, verify=False
)
except Exception as e:
raise e
return r
def port_modify_descr(headers, url_switch, port_number, descr):
url = url_switch + ep_ports + "/" + str(port_number)
data = [
{"op": "replace", "path": "/ifdescr", "value": descr},
]
try:
r = requests.patch(
url, data=json.dumps(data), headers=headers, verify=False
)
except Exception as e:
raise e
return r
def port_modify_bandwidth(headers, url_switch, port_number, bandwidth):
url = url_switch + ep_ports + "/" + str(port_number)
data = [
{"op": "replace", "path": "/bandwidth", "value": bandwidth},
]
try:
r = requests.patch(
url, data=json.dumps(data), headers=headers, verify=False
)
except Exception as e:
raise e
return r
def port_modify_admin_state(headers, url_switch, port_number, admin_state):
url = url_switch + ep_ports + "/" + str(port_number)
data = [
{"op": "replace", "path": "/admin-state", "value": admin_state},
]
try:
r = requests.patch(
url, data=json.dumps(data), headers=headers, verify=False
)
except Exception as e:
raise e
return r
def bridge_modify_descr(headers, url_switch, bridge, br_descr):
url = url_switch + ep_bridges + "/" + str(bridge)
data = [
{"op": "replace", "path": "/bridge-descr", "value": br_descr},
]
try:
r = requests.patch(
url, data=json.dumps(data), headers=headers, verify=False
)
except Exception as e:
raise e
return r
#
# BRIDGE CREATE
#
# 201 Created
# 400 Bad Request
# 403 Forbidden
# 409 Conflict
def bridge_create(
headers,
url_switch,
br_id,
br_dpid=None,
br_subtype=None,
br_resources=None,
br_traffic_class=None,
br_descr=None,
br_namespace=None,
):
url = url_switch + ep_bridges
data = {
"bridge": br_id,
"subtype": br_subtype,
"resources": br_resources,
"dpid": br_dpid,
"traffic-class": br_traffic_class,
"bridge-descr": br_descr,
"netns": br_namespace,
}
try:
output = requests.post(url, data=data, headers=headers, verify=False)
if output.status_code == 201:
LOG.info(
" Create Bridge: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Success"
)
else:
if output.status_code == 400:
raise Exception(
" Create Bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Bad Request"
)
elif output.status_code == 403:
raise Exception(
" Create Bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Forbidden"
)
elif output.status_code == 409:
raise Exception(
" Create Bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Conflict"
)
else:
raise Exception(
" Create Bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Unknown Error"
)
except Exception as e:
raise e
return output
#
# BRIDGE DELETE
#
# 200 OK PRUTH: I think its actually 204
# 403 Forbidden
# 404 Not found
def bridge_delete(headers, url_switch, br_id):
url = url_switch + ep_bridges + "/" + br_id
try:
output = requests.delete(url, headers=headers, verify=False)
if output.status_code == 204:
LOG.info(
" Delete Bridge: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Success"
)
else:
if output.status_code == 403:
raise Exception(
" Delete Bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Forbidden"
)
elif output.status_code == 404:
raise Exception(
" Delete Bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Not Found"
)
else:
raise Exception(
" Delete Bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Unknown Error"
)
except Exception as e:
raise e
return output
#
# ADD CONTROLLER
#
# 201 Created
# 400 Bad Request
# 403 Forbidden
# 404 Not Found
# 409 Conflict
def bridge_add_controller(
headers, url_switch, br_id, cont_id, cont_ip, cont_port, cont_tls=False
):
url = url_switch + ep_bridges + "/" + br_id + "/controllers"
data = {
"controller": cont_id,
"ip": cont_ip,
"port": cont_port,
"tls": cont_tls,
}
try:
output = requests.post(url, data=data, headers=headers, verify=False)
if output.status_code == 201:
LOG.info(
" Add Controller: url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Success"
)
else:
if output.status_code == 400:
raise Exception(
" Add Controller Failed: url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Bad Request"
)
elif output.status_code == 403:
raise Exception(
" Add Controller Failed: url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Forbidden"
)
elif output.status_code == 404:
raise Exception(
" Add Controller Failed: url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Not Found"
)
else:
raise Exception(
" Add Controller Failed: url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Unknown Error"
)
except Exception as e:
raise e
return output
#
# DETACH CONTROLLER
#
# 204 No Content
# 403 Forbidden
# 404 Not Found
def bridge_detach_controller(headers, url_switch, br_id, cont_id):
url = (
url_switch + ep_bridges + "/" + br_id + "/controllers" + "/" + cont_id
)
try:
output = requests.delete(url, headers=headers, verify=False)
if output.status_code == 204:
LOG.info(
" Add Controller: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Success"
)
else:
if output.status_code == 400:
raise Exception(
" Add Controller Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Bad Request"
)
elif output.status_code == 403:
raise Exception(
" Add Controller Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Forbidden"
)
elif output.status_code == 404:
raise Exception(
" Add Controller Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Not Found"
)
elif output.status_code == 409:
raise Exception(
" Add Controller Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Conflict"
)
else:
raise Exception(
" Add Controller Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Unknown Error"
)
except Exception as e:
raise e
return r
#
# ATTACH TUNNEL - VLAN ID
#
# 201 Created
# 400 Bad Request
# 403 Forbidden
# 404 Not Found
def bridge_attach_tunnel_ctag_vlan(
headers,
url_switch,
br_id,
ofport,
port,
vlan_id,
tc=None,
descr=None,
shaped_rate=None,
):
url = url_switch + ep_bridges + "/" + br_id + "/tunnels"
data = {
"ofport": ofport,
"port": port,
"vlan-id": vlan_id,
"traffic-class": tc,
"ifdescr": descr,
"shaped-rate": shaped_rate,
}
try:
output = requests.post(url, data=data, headers=headers, verify=False)
if output.status_code == 201:
LOG.info(
" Attach ctag vlan port to bridge: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Success"
)
else:
if output.status_code == 400:
raise Exception(
" Attach ctag vlan port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Bad Request"
)
elif output.status_code == 403:
raise Exception(
" Attach ctag vlan port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Forbidden"
)
elif output.status_code == 404:
raise Exception(
" Attach ctag vlan port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Not Found"
)
else:
raise Exception(
" Attach ctag vlan port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Unknown Error"
)
except Exception as e:
reclaim_ofport(headers, url_switch, ofport)
raise e
return output
#
# ATTACH TUNNEL - PASSTHROUGH
#
# 201 Created
# 400 Bad Request
# 403 Forbidden
# 404 Not Found
def bridge_attach_tunnel_passthrough(
headers,
url_switch,
br_id,
port,
ofport=None,
tc=None,
descr=None,
shaped_rate=None,
):
url = url_switch + ep_bridges + "/" + str(br_id) + "/tunnels"
data = {
"ofport": ofport,
"port": port,
"traffic-class": tc,
"ifdescr": descr,
"shaped-rate": shaped_rate,
}
LOG.info(
" Attach passthrough port to bridge: port: "
+ str(port)
+ ", ofport = "
+ str(ofport)
)
try:
output = requests.post(url, data=data, headers=headers, verify=False)
if output.status_code == 201:
LOG.info(
" Attach passthrough port to bridge: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Success"
)
else:
if output.status_code == 400:
raise Exception(
" Attach passthrough port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Bad Request"
)
elif output.status_code == 403:
reclaim_port(headers, url_switch, port)
raise Exception(
" Attach passthrough port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Forbidden"
)
elif output.status_code == 404:
raise Exception(
" Attach passthrough port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Not Found"
)
else:
raise Exception(
" Attach passthrough port to bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Unknown Error"
)
except Exception as e:
raise e
return output
# public facing function that tries to clean up and retry once on failure
# def bridge_attach_tunnel_passthrough(headers,
# url_switch,
# br_id,
# port,
# ofport = None,
# tc = None,
# descr = None,
# shaped_rate = None):
#
# try:
# __bridge_attach_tunnel_passthrough(headers, url_switch, br_id, port, ofport, tc, descr, shaped_rate)
# except Exception as e:
# reclaim_port(headers,url_switch,port)
# __bridge_attach_tunnel_passthrough(headers, url_switch, br_id, port, ofport, tc, descr, shaped_rate)
#
# ATTACH TUNNEL - VLAN RANGE
#
# 201 Created
# 400 Bad Request
# 403 Forbidden
# 404 Not Found
def bridge_attach_tunnel_ctag_vlan_range(
headers,
url_switch,
br_id,
ofport,
port,
vlan_range,
tc=None,
descr=None,
shaped_rate=None,
):
url = url_switch + ep_bridges + "/" + br_id + "/tunnels"
data = {
"ofport": ofport,
"port": port,
"vlan-range": vlan_range,
"traffic-class": tc,
"ifdescr": descr,
"shaped-rate": shaped_rate,
}
try:
r = requests.post(url, data=data, headers=headers, verify=False)
except Exception as e:
raise e
return r
#
# DETACH TUNNEL
#
# 204 No content
# 403 Forbidden
# 404 Not Found
def bridge_detach_tunnel(headers, url_switch, br_id, ofport):
url = (
url_switch
+ ep_bridges
+ "/"
+ str(br_id)
+ "/tunnels"
+ "/"
+ str(ofport)
)
try:
output = requests.delete(url, headers=headers, verify=False)
if output.status_code == 204:
LOG.info(
" Detach port from bridge: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Success"
)
else:
if output.status_code == 400:
raise Exception(
" Detach port from bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Bad Request"
)
elif output.status_code == 403:
raise Exception(
" Detach port from bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Forbidden"
)
elif output.status_code == 404:
raise Exception(
" Detach port from bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Not Found"
)
else:
raise Exception(
" Detach port from bridge Failed: "
+ "url: "
+ str(url)
+ ", "
+ str(output.status_code)
+ " Unknown Error"
)
except Exception as e:
raise e
return output
#
# GET BRIDGES
#
# 200
# 403 Forbidden
def get_bridges(headers, url_switch):
url = url_switch + ep_bridges
try:
r = requests.get(url, headers=headers, verify=False)
except Exception as e:
raise e
return r
#
# GET BRIDGE
#
# 200
# 403 Forbidden
def get_bridge(headers, url_switch, bridge_url):
try:
r = requests.get(bridge_url, headers=headers, verify=False)
except Exception as e:
raise e
return r
#
# GET CONTROLLER
#
# 200
# 403 Forbidden
# 404 Not Found
def get_bridge_controller(
headers, url_switch, bridge_number=None, bridge_url=None
):
if bridge_number and not bridge_url:
url = (
url_switch
+ ep_bridges
+ "/br"
+ str(bridge_number)
+ "/controllers"
)
elif bridge_url and not bridge_number:
url = bridge_url + "/controllers"
else:
return 404
try:
r = requests.get(url, headers=headers, verify=False)
except Exception as e:
raise e
return r
#
# GET TUNNELS ATTACHED TO BRIDGE
#
# 200
# 403 Forbidden
# 404 Not Found
def get_bridge_tunnels(
headers, url_switch, bridge_number=None, bridge_url=None
):
if bridge_number and not bridge_url:
url = url_switch + ep_bridges + "/br" + str(bridge_number) + "/tunnels"
elif bridge_url and not bridge_number:
url = bridge_url + "/tunnels"
else:
return 404
try:
r = requests.get(url, headers=headers, verify=False)
except Exception as e:
raise e
return r
#
# GET INFO
#
# 200
# 403 Forbidden
def get_info(headers, url_switch, info_url):
try:
r = requests.get(info_url, headers=headers, verify=False)
except Exception as e:
raise e
return r
#
#
#
# get_free_bridge_name
#
#
def get_free_bridge(headers, url_switch):
bridges = get_bridges(headers, url_switch)
links = bridges.json()["links"]
for i in range(1, 64):
bridge = "br" + str(i)
if bridge in links.keys():
continue
return bridge
return None
#
#
#
# get_bridge_by_segmentation_id
#
# By convention we are putting the segmentation_id in the "bridge-description" field
#
def get_bridge_by_segmentation_id(headers, url_switch, segmentation_id):
bridges = get_bridges(headers, url_switch)
links = bridges.json()["links"]
for bridge, value in links.items():
url = value["href"]
link = get_bridge(headers, url_switch, url).json()
if "bridge-descr" in link.keys():
bridge_descr = str(link["bridge-descr"])
# Chameleon specific br_descr format: <PROJECT_ID>-<VFC_NAME>-VLAN-<TAG1>-<TAG2>
# Extract VLAN tags
vlan_tags = re.match(r"(.*?)-(.*?)-VLAN-(.*)", bridge_descr, re.I)
LOG.info(
"--- PRUTH: get_bridge_by_segmentation_id - bridge-descr : "
+ bridge_descr
)
LOG.info(
"--- PRUTH: get_bridge_by_segmentation_id - segmentation_id: "
+ str(segmentation_id)
)
if vlan_tags.group(3) and (
vlan_tags.group(3).find(str(segmentation_id)) > -1
):
return bridge
return None
#
#
#
# get_tunnel_by_bridge_and_ofport
#
# find tunnel for a given ofport on a bridge
#
def get_tunnel_by_bridge_and_ofport(headers, url_switch, bridge, ofport):
if str(bridge)[:2] == "br":
bridge_number = str(bridge)[2:]
else:
bridge_number = str(bridge)
tunnels = get_bridge_tunnels(headers, url_switch, bridge_number)
links = tunnels.json()["links"]
for tunnel, value in links.items():
tunnel_url = value["href"]
tunnel_ofport = value["tunnel"]
if int(tunnel_ofport) == int(ofport):
return tunnel_ofport
return None
#
#
#
# get_bridge_by_vfc_name
#
# By convention we are putting the vfc_name in the "bridge-description" field
#
def get_bridge_by_vfc_name(headers, url_switch, vfc_name):
bridges = get_bridges(headers, url_switch)
links = bridges.json()["links"]
for bridge, value in links.items():
url = value["href"]
link = get_bridge(headers, url_switch, url).json()
if "bridge-descr" in link.keys():
bridge_descr = str(link["bridge-descr"])
if bridge_descr.find(vfc_name) > -1:
return bridge
return None
#
# get_bridge_descr
#
def get_bridge_descr(headers, url_switch, br_id):
bridge_url = url_switch + ep_bridges + "/" + str(br_id)
bridge = get_bridge(headers, url_switch, bridge_url)
bridge_descr = bridge.json()["bridge-descr"]
return bridge_descr
#
# reclaim ofport
#
#
def reclaim_ofport(headers, url_switch, ofport):
bridges = get_bridges(headers, url_switch)
links = bridges.json()["links"]
LOG.info("PRUTH: reclaim_ofport - bridges: " + str(links))
for bridge, value in links.items():
# bridge = 'br'+str(i)
# bridgeInfo = get_bridge(headers,url_switch,bridges[bridge])
# link=links[str(bridge)]
LOG.info("PRUTH: bridge: " + str(bridge) + ", value: " + str(value))
url = value["href"]
LOG.info("PRUTH: bridge url: " + str(bridge) + ", href: " + str(url))
bridge_data = get_bridge(headers, url_switch, url)
bridge_tunnels_url = str(
bridge_data.json()["links"]["tunnels"]["href"]
)
LOG.info("PRUTH: bridge tunnels url: " + str(bridge_tunnels_url))
bridge_tunnels = get_info(headers, url_switch, bridge_tunnels_url)
LOG.info("PRUTH: bridge tunnels: " + str(bridge_tunnels.json()))
for tunnel, value in bridge_tunnels.json()["links"].items():
LOG.info(
"PRUTH: bridge tunnel: "
+ str(tunnel)
+ ", value: "
+ str(value)
)
tunnel_url = value["href"]
LOG.info("PRUTH: bridge tunnel_url: " + str(tunnel_url))
tunnel_info = get_info(headers, url_switch, tunnel_url)
LOG.info("PRUTH: bridge tunnel_info: " + str(tunnel_info.json()))
current_port = tunnel_info.json()["port"]
current_ofport = tunnel_info.json()["ofport"]
LOG.info(
"PRUTH: current_port: "
+ str(current_port)
+ ", ofport: "
+ str(ofport)
+ ", current_ofport: "
+ str(current_ofport)
)
if str(current_ofport) == str(ofport):
LOG.info("PRUTH: FOUND PORT. KILL IT. ")
bridge_detach_tunnel(
headers, url_switch, str(bridge), str(current_ofport)
)
return None
#
# reclaim physical port.
# If we try to bind a port to a VFC and get a "forbidden" return code this could mean
# that the port is already bound. In this case we can try to reclaim to port by
# checking all VFCs for the port and then unbinding it if the port is found.
#
def reclaim_port(headers, url_switch, port):
bridges = get_bridges(headers, url_switch)
links = bridges.json()["links"]
LOG.info("PRUTH: bridges: " + str(links))
for bridge, value in links.items():
# bridge = 'br'+str(i)
# bridgeInfo = get_bridge(headers,url_switch,bridges[bridge])
# link=links[str(bridge)]
LOG.info("PRUTH: bridge: " + str(bridge) + ", value: " + str(value))
url = value["href"]
LOG.info("PRUTH: bridge url: " + str(bridge) + ", href: " + str(url))
bridge_data = get_bridge(headers, url_switch, url)
bridge_tunnels_url = str(
bridge_data.json()["links"]["tunnels"]["href"]
)
LOG.info("PRUTH: bridge tunnels url: " + str(bridge_tunnels_url))
bridge_tunnels = get_info(headers, url_switch, bridge_tunnels_url)
LOG.info("PRUTH: bridge tunnels: " + str(bridge_tunnels.json()))
for tunnel, value in bridge_tunnels.json()["links"].items():
LOG.info(
"PRUTH: bridge tunnel: "
+ str(tunnel)
+ ", value: "
+ str(value)
)
tunnel_url = value["href"]
LOG.info("PRUTH: bridge tunnel_url: " + str(tunnel_url))
tunnel_info = get_info(headers, url_switch, tunnel_url)
LOG.info("PRUTH: bridge tunnel_info: " + str(tunnel_info.json()))
current_port = tunnel_info.json()["port"]
current_ofport = tunnel_info.json()["ofport"]
LOG.info(
"PRUTH: current_port: "
+ str(current_port)
+ ", port: "
+ str(port)
+ ", current_ofport: "
+ str(current_ofport)
)
if current_port == port:
LOG.info("PRUTH: FOUND PORT. KILL IT. ")
bridge_detach_tunnel(
headers, url_switch, str(bridge), str(current_ofport)
)
return None
| 27.273798 | 109 | 0.477655 | 2,745 | 27,792 | 4.66776 | 0.069217 | 0.036525 | 0.07867 | 0.032779 | 0.828065 | 0.788262 | 0.748537 | 0.732303 | 0.699914 | 0.678686 | 0 | 0.015226 | 0.418646 | 27,792 | 1,018 | 110 | 27.300589 | 0.777805 | 0.096323 | 0 | 0.748327 | 0 | 0 | 0.124454 | 0.003165 | 0 | 0 | 0 | 0 | 0 | 1 | 0.034806 | false | 0.009371 | 0.005355 | 0 | 0.082999 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
bfa98165372a3d8764884cfdea8b3e4e979dd92e | 3,399 | py | Python | official/vision/beta/evaluation/classification_metrics.py | rehohoho/models | 3577bc5959d7e2a3513ff1c5ec8b42c4f5bedca8 | [
"Apache-2.0"
] | null | null | null | official/vision/beta/evaluation/classification_metrics.py | rehohoho/models | 3577bc5959d7e2a3513ff1c5ec8b42c4f5bedca8 | [
"Apache-2.0"
] | 62 | 2021-06-09T00:47:27.000Z | 2021-09-24T09:06:58.000Z | official/vision/beta/evaluation/classification_metrics.py | whizzmobility/models | 3577bc5959d7e2a3513ff1c5ec8b42c4f5bedca8 | [
"Apache-2.0"
] | null | null | null | """Metrics for classification."""
from absl import logging
import tensorflow as tf
class Precision(tf.keras.metrics.Precision):
"""Computes Precision metric using labels.
Defined as: true_positives / (true_positives + false_positives)
The predictions are accumulated in a confusion matrix, weighted by `sample_weight`
and the metric is then calculated from it. Weights default to 1.
"""
def __init__(self, num_classes, class_id=None, name=None, *args, **kwargs):
"""Initializes `Precision`
Args:
num_classes: The possible number of labels the prediction task can have.
class_id: Class index to calculate precision over.
This value must be provided, since a confusion matrix of dimension =
[num_classes, num_classes] will be allocated.
name: (Optional) string name of the metric instance.
dtype: (Optional) data type of the metric result.
"""
super(Precision, self).__init__(
name=name, class_id=class_id, *args, *kwargs)
self.num_classes = num_classes
def update_state(self, y_true, y_pred, sample_weight=None):
"""Accumulates the confusion matrix statistics.
Args:
y_true: The ground truth values.
y_pred: The predicted values.
sample_weight: Optional weighting of each example. Defaults to 1. Can be a
`Tensor` whose rank is either 0, or the same rank as `y_true`, and must
be broadcastable to `y_true`.
Returns:
Precision per of given class id or overall classes.
"""
y_pred = tf.argmax(y_pred, axis=-1)
y_pred = tf.one_hot(y_pred, self.num_classes, on_value=True, off_value=False)
return super(Precision, self).update_state(
y_true=y_true, y_pred=y_pred, sample_weight=None)
class Recall(tf.keras.metrics.Recall):
"""Computes Recall metric using labels.
Defined as: true_positives / (true_positives + false_negatives)
The predictions are accumulated in a confusion matrix, weighted by `sample_weight`
and the metric is then calculated from it. Weights default to 1.
"""
def __init__(self, num_classes, class_id=None, name=None, *args, **kwargs):
"""Initializes `Recall`
Args:
num_classes: The possible number of labels the prediction task can have.
class_id: Class index to calculate recall over.
This value must be provided, since a confusion matrix of dimension =
[num_classes, num_classes] will be allocated.
name: (Optional) string name of the metric instance.
dtype: (Optional) data type of the metric result.
"""
super(Recall, self).__init__(
name=name, class_id=class_id, *args, *kwargs)
self.num_classes = num_classes
def update_state(self, y_true, y_pred, sample_weight=None):
"""Accumulates the confusion matrix statistics.
Args:
y_true: The ground truth values.
y_pred: The predicted values.
sample_weight: Optional weighting of each example. Defaults to 1. Can be a
`Tensor` whose rank is either 0, or the same rank as `y_true`, and must
be broadcastable to `y_true`.
Returns:
Recall of given class id or overall recall.
"""
y_pred = tf.argmax(y_pred, axis=-1)
y_pred = tf.one_hot(y_pred, self.num_classes, on_value=True, off_value=False)
return super(Recall, self).update_state(
y_true=y_true, y_pred=y_pred, sample_weight=None)
| 37.351648 | 85 | 0.699912 | 492 | 3,399 | 4.652439 | 0.23374 | 0.03495 | 0.036697 | 0.03495 | 0.880734 | 0.880734 | 0.860638 | 0.860638 | 0.860638 | 0.860638 | 0 | 0.003003 | 0.21624 | 3,399 | 90 | 86 | 37.766667 | 0.856231 | 0.599 | 0 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.090909 | 0 | 0.454545 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
bfd2c7b1f381a2dd480df811e4a895b00a6a7742 | 5,769 | py | Python | instagram/parser.py | Tishacy/InstagramSpider | 2665d3772f80cb549609acc21f70527b12b5e5a3 | [
"MIT"
] | null | null | null | instagram/parser.py | Tishacy/InstagramSpider | 2665d3772f80cb549609acc21f70527b12b5e5a3 | [
"MIT"
] | null | null | null | instagram/parser.py | Tishacy/InstagramSpider | 2665d3772f80cb549609acc21f70527b12b5e5a3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Entities used by query.py
# Author: Tishacy
# Date: 2021-03-26
from abc import ABC, abstractmethod
from datetime import datetime
class Parser(ABC):
"""Abstract Parser class
A parser will parse the given data with the given variables.
An explicit parser has to implements the following methods:
parse_data() -> List[Dict]
parse_next_variables() -> Dict
parse_page_info() -> Dict
"""
def __init__(self, data, variables):
self.data = data
self.variables = variables
@abstractmethod
def parse_data(self):
"""Parse the raw data to generate the parsed data."""
pass
@abstractmethod
def parse_next_variables(self):
"""Parse the variables to generate the next variables."""
pass
@abstractmethod
def parse_page_info(self):
"""Parse the raw data to get the page info."""
pass
class PostParser(Parser):
"""A post parser"""
def __init__(self, data, variables):
super().__init__(data, variables)
def parse_data(self):
edges = self.data['data']['user']['edge_owner_to_timeline_media']['edges']
parsed_data = []
for edge in edges:
node_info = self.get_info(edge['node'])
parsed_data.append(node_info)
return parsed_data
def parse_next_variables(self):
next_variable = self.variables.copy()
next_variable['after'] = self.data['data']['user']['edge_owner_to_timeline_media']['page_info']['end_cursor']
return next_variable
def parse_page_info(self):
raw_page_info = self.data['data']['user']['edge_owner_to_timeline_media']['page_info']
page_info = {
'after_post_token': raw_page_info['end_cursor'],
'has_next': raw_page_info['has_next_page']
}
return page_info
@staticmethod
def get_info(node):
return {
'id': node['id'],
'short_code': node['shortcode'],
'text': node['edge_media_to_caption']['edges'][0]['node']['text'] if len(node['edge_media_to_caption']['edges']) > 0 else '',
'display_image_url': node['display_url'],
'is_video': node['is_video'],
'video_url': node['video_url'] if node['is_video'] else '',
'timestamp': node['taken_at_timestamp'],
'formatted-time': datetime.fromtimestamp(int(node['taken_at_timestamp'])).strftime('%Y-%m-%d %H:%M:%S'),
'likes_count': node['edge_media_preview_like']['count'],
'comments_count': node['edge_media_to_comment']['count']
}
class CommentParser(Parser):
"""A comment parser"""
def __init__(self, data, variables):
super().__init__(data, variables)
def parse_data(self):
try:
edges = self.data['data']['shortcode_media']['edge_media_to_parent_comment']['edges']
parsed_data = []
for edge in edges:
node_info = self.get_info(edge['node'])
parsed_data.append(node_info)
return parsed_data
except Exception:
print(self.data)
return []
def parse_next_variables(self):
next_variable = self.variables.copy()
next_variable['after'] = self.data['data']['shortcode_media']['edge_media_to_parent_comment']['page_info']['end_cursor']
return next_variable
def parse_page_info(self):
raw_page_info = self.data['data']['shortcode_media']['edge_media_to_parent_comment']['page_info']
page_info = {
'after_comment_token': raw_page_info['end_cursor'],
'has_next': raw_page_info['has_next_page']
}
return page_info
@staticmethod
def get_info(node):
return {
'id': node['id'],
'timestamp': node['created_at'],
'formatted-time': datetime.fromtimestamp(int(node['created_at'])).strftime('%Y-%m-%d %H:%M:%S'),
'text': node['text'],
'username': node['owner']['username'],
'likes_count': node['edge_liked_by']['count']
}
class TagPostParser(Parser):
"""A tag post parser"""
def __init__(self, data, variables):
super().__init__(data, variables)
def parse_data(self):
edges = self.data['data']['hashtag']['edge_hashtag_to_media']['edges']
parsed_data = []
for edge in edges:
node_info = self.get_info(edge['node'])
parsed_data.append(node_info)
return parsed_data
def parse_next_variables(self):
next_variable = self.variables.copy()
next_variable['after'] = self.data['data']['hashtag']['edge_hashtag_to_media']['page_info']['end_cursor']
return next_variable
def parse_page_info(self):
raw_page_info = self.data['data']['hashtag']['edge_hashtag_to_media']['page_info']
page_info = {
'after_post_token': raw_page_info['end_cursor'],
'has_next': raw_page_info['has_next_page']
}
return page_info
@staticmethod
def get_info(node):
return {
'id': node['id'],
'short_code': node['shortcode'],
'text': node['edge_media_to_caption']['edges'][0]['node']['text'] if len(node['edge_media_to_caption']['edges']) > 0 else '',
'display_image_url': node['display_url'],
'is_video': node['is_video'],
'timestamp': node['taken_at_timestamp'],
'formatted-time': datetime.fromtimestamp(int(node['taken_at_timestamp'])).strftime('%Y-%m-%d %H:%M:%S'),
'likes_count': node['edge_media_preview_like']['count'],
'comments_count': node['edge_media_to_comment']['count']
}
| 35.611111 | 137 | 0.603051 | 700 | 5,769 | 4.647143 | 0.167143 | 0.0664 | 0.036889 | 0.031356 | 0.771288 | 0.74731 | 0.721795 | 0.717492 | 0.711343 | 0.704273 | 0 | 0.003009 | 0.25117 | 5,769 | 161 | 138 | 35.832298 | 0.75 | 0.088404 | 0 | 0.714286 | 0 | 0 | 0.256978 | 0.077575 | 0 | 0 | 0 | 0 | 0 | 1 | 0.159664 | false | 0.02521 | 0.016807 | 0.02521 | 0.319328 | 0.008403 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
449c9bc9eadf35135826838b57cbd3f26e131e07 | 49 | py | Python | aiomatrix/dispatcher/storage/internal_data/models/__init__.py | Forden/aiomatrix | d258076bae8eb776495b92be46ee9f4baec8d9a6 | [
"MIT"
] | 2 | 2021-10-29T18:07:08.000Z | 2021-11-19T00:25:43.000Z | aiomatrix/dispatcher/storage/internal_data/models/__init__.py | Forden/aiomatrix | d258076bae8eb776495b92be46ee9f4baec8d9a6 | [
"MIT"
] | 1 | 2022-03-06T11:17:43.000Z | 2022-03-06T11:17:43.000Z | aiomatrix/dispatcher/storage/internal_data/models/__init__.py | Forden/aiomatrix | d258076bae8eb776495b92be46ee9f4baec8d9a6 | [
"MIT"
] | null | null | null | from .internal_data_pair import InternalDataPair
| 24.5 | 48 | 0.897959 | 6 | 49 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081633 | 49 | 1 | 49 | 49 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
7828c63ef4eb663a865a53e70bccd6d2ae11d4cf | 89 | py | Python | dvc/repo/metrics/add.py | jackwellsxyz/dvc | 6a64f861783f3c2eadfc0364725ab06aa3ebb387 | [
"Apache-2.0"
] | null | null | null | dvc/repo/metrics/add.py | jackwellsxyz/dvc | 6a64f861783f3c2eadfc0364725ab06aa3ebb387 | [
"Apache-2.0"
] | null | null | null | dvc/repo/metrics/add.py | jackwellsxyz/dvc | 6a64f861783f3c2eadfc0364725ab06aa3ebb387 | [
"Apache-2.0"
] | null | null | null | from dvc.repo.metrics.modify import modify
def add(repo, path):
modify(repo, path)
| 14.833333 | 42 | 0.719101 | 14 | 89 | 4.571429 | 0.642857 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.168539 | 89 | 5 | 43 | 17.8 | 0.864865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
78625605bf241e9bdcda1a93b8d9149bfa038850 | 37 | py | Python | Chapter05/my_module/submodule_1.py | JTamarit/Tkinter_libro | 1d0672235d10ad9011d2f7526f9fef363197b8da | [
"MIT"
] | 173 | 2018-07-26T00:46:28.000Z | 2022-03-09T13:54:30.000Z | Chapter05/my_module/submodule_1.py | my01chap/Python-GUI-Programming-with-Tkinter | 1d0672235d10ad9011d2f7526f9fef363197b8da | [
"MIT"
] | 1 | 2021-03-06T12:29:33.000Z | 2021-03-06T15:08:24.000Z | Chapter05/my_module/submodule_1.py | my01chap/Python-GUI-Programming-with-Tkinter | 1d0672235d10ad9011d2f7526f9fef363197b8da | [
"MIT"
] | 105 | 2018-05-15T02:47:48.000Z | 2022-03-17T05:52:08.000Z | from .submodule_2 import submodule_a
| 18.5 | 36 | 0.864865 | 6 | 37 | 5 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.030303 | 0.108108 | 37 | 1 | 37 | 37 | 0.878788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
7879f6fdc929682949a5e1b6afff4137c9179ac8 | 103 | py | Python | simian/token/__init__.py | emilkloeden/simian | b8bd7e54185d2f06f82fc98221f94e2eb005cbdb | [
"MIT"
] | null | null | null | simian/token/__init__.py | emilkloeden/simian | b8bd7e54185d2f06f82fc98221f94e2eb005cbdb | [
"MIT"
] | null | null | null | simian/token/__init__.py | emilkloeden/simian | b8bd7e54185d2f06f82fc98221f94e2eb005cbdb | [
"MIT"
] | null | null | null | from .token import Token, TokenType, lookup_ident
__all__ = ["Token", "TokenType", "lookup_ident"]
| 25.75 | 50 | 0.718447 | 12 | 103 | 5.666667 | 0.583333 | 0.411765 | 0.588235 | 0.735294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145631 | 103 | 3 | 51 | 34.333333 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0.26 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
15451ac2f6b670ee1dc9b4f49a7698b2e8d7a46a | 27 | py | Python | pbcore/chemistry/__init__.py | yoshihikosuzuki/pbcore | 956c45dea8868b5cf7d9b8e9ce98ac8fe8a60150 | [
"BSD-3-Clause"
] | null | null | null | pbcore/chemistry/__init__.py | yoshihikosuzuki/pbcore | 956c45dea8868b5cf7d9b8e9ce98ac8fe8a60150 | [
"BSD-3-Clause"
] | null | null | null | pbcore/chemistry/__init__.py | yoshihikosuzuki/pbcore | 956c45dea8868b5cf7d9b8e9ce98ac8fe8a60150 | [
"BSD-3-Clause"
] | null | null | null |
from .chemistry import *
| 6.75 | 24 | 0.703704 | 3 | 27 | 6.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 27 | 3 | 25 | 9 | 0.904762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
154b8a06472d1045c5cdd8203f8082296ea6dbe5 | 57 | py | Python | src/visualization/visualizer.py | CamiloCJ09/VIP-Clustering | a24da3a436f44ddadf05516e70d537c3795f7d81 | [
"MIT"
] | null | null | null | src/visualization/visualizer.py | CamiloCJ09/VIP-Clustering | a24da3a436f44ddadf05516e70d537c3795f7d81 | [
"MIT"
] | null | null | null | src/visualization/visualizer.py | CamiloCJ09/VIP-Clustering | a24da3a436f44ddadf05516e70d537c3795f7d81 | [
"MIT"
] | null | null | null | import plotly
import plotly.graph_objs as go
import json
| 14.25 | 30 | 0.842105 | 10 | 57 | 4.7 | 0.7 | 0.510638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140351 | 57 | 3 | 31 | 19 | 0.959184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
1557e260b87952087ae19faf505ffe75a906460b | 278 | py | Python | Pipeline/main/Strategy/Open/lib/__init__.py | simonydbutt/b2a | 0bf4a6de8547d73ace22967780442deeaff2d5c6 | [
"MIT"
] | 2 | 2018-07-01T03:36:24.000Z | 2020-02-13T17:22:46.000Z | Pipeline/main/Strategy/Open/lib/__init__.py | simonydbutt/b2a | 0bf4a6de8547d73ace22967780442deeaff2d5c6 | [
"MIT"
] | null | null | null | Pipeline/main/Strategy/Open/lib/__init__.py | simonydbutt/b2a | 0bf4a6de8547d73ace22967780442deeaff2d5c6 | [
"MIT"
] | null | null | null | from Pipeline.main.Strategy.Open.lib.CheapVol import CheapVol
from Pipeline.main.Strategy.Open.lib.OrderBookDepth import OrderBookDepth
from Pipeline.main.Strategy.Open.lib.ERC20TickFade import ERC20TickFade
from Pipeline.main.Strategy.Open.lib.TestingStrat import TestingStrat
| 55.6 | 73 | 0.870504 | 36 | 278 | 6.722222 | 0.305556 | 0.198347 | 0.264463 | 0.396694 | 0.512397 | 0.512397 | 0 | 0 | 0 | 0 | 0 | 0.015267 | 0.057554 | 278 | 4 | 74 | 69.5 | 0.908397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
ec841dcfe71623b49ddcdc9f17485810681c06c4 | 724 | py | Python | tests/test_identify_tps.py | jarrahl/tp-analyzer | c53e1fea44d968159c41607896584aa3ee0e5b4f | [
"MIT"
] | null | null | null | tests/test_identify_tps.py | jarrahl/tp-analyzer | c53e1fea44d968159c41607896584aa3ee0e5b4f | [
"MIT"
] | null | null | null | tests/test_identify_tps.py | jarrahl/tp-analyzer | c53e1fea44d968159c41607896584aa3ee0e5b4f | [
"MIT"
] | null | null | null | import pytest
from tp_analyzer import identify_turning_points
def test_simple_turning_points():
assert identify_turning_points([5, 2, 1, 2, 3, 2, 1, 2, 5], 3) == [2, 4, 6, 8]
# increase 'l' to 4, the middle '3' becomes overshadowed by the '5's
assert identify_turning_points([5, 2, 1, 2, 3, 2, 1, 2, 5], 4) == [2, 8]
def test_peak_is_local_maximum():
# invalid peak 3 due to upcoming 4
assert identify_turning_points([1, 2, 3, 0, 4], 2) == [3, 4]
def test_trough_is_local_minimum():
# invalid trough 4 due to upcoming 3
assert identify_turning_points([1, 6, 5, 4, 6, 3], 2) == [0, 1, 5]
def test_peak_ratio_constraint():
assert identify_turning_points([50, 20, 10, 20, 50, 20, 1, 2, 3], 2) == [2, 4, 6]
| 36.2 | 83 | 0.668508 | 135 | 724 | 3.385185 | 0.318519 | 0.199125 | 0.275711 | 0.295405 | 0.280088 | 0.157549 | 0.157549 | 0.157549 | 0.157549 | 0.157549 | 0 | 0.118044 | 0.180939 | 724 | 19 | 84 | 38.105263 | 0.652614 | 0.185083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.454545 | 1 | 0.363636 | true | 0 | 0.181818 | 0 | 0.545455 | 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 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
ec8582b9d38ef74f7bd7597b758048d55934a82f | 67 | py | Python | finalists/yc14600/PyTorch-Encoding/encoding/transforms/__init__.py | lrzpellegrini/cvpr_clvision_challenge | cc783a9a4f80ab72062ef40368e4eed6b10c7bc9 | [
"CC-BY-4.0"
] | 2,190 | 2018-09-11T11:44:50.000Z | 2022-03-30T15:20:11.000Z | finalists/yc14600/PyTorch-Encoding/encoding/transforms/__init__.py | lrzpellegrini/cvpr_clvision_challenge | cc783a9a4f80ab72062ef40368e4eed6b10c7bc9 | [
"CC-BY-4.0"
] | 374 | 2017-10-05T09:25:08.000Z | 2022-03-11T06:03:53.000Z | finalists/yc14600/PyTorch-Encoding/encoding/transforms/__init__.py | lrzpellegrini/cvpr_clvision_challenge | cc783a9a4f80ab72062ef40368e4eed6b10c7bc9 | [
"CC-BY-4.0"
] | 531 | 2018-09-12T06:46:10.000Z | 2022-03-30T13:14:28.000Z | from .transforms import *
from .get_transform import get_transform
| 22.333333 | 40 | 0.835821 | 9 | 67 | 6 | 0.555556 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.119403 | 67 | 2 | 41 | 33.5 | 0.915254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
ec997a1c5f4ce78adac4d94be31892d138794a02 | 62,040 | py | Python | Client/experience_management/memoryUpdater.py | asarav/MSc-Thesis-Experience-Sharing-Conversational-Agent | 0f122c393768f9093b1990fe7a8b44213893d67a | [
"MIT"
] | null | null | null | Client/experience_management/memoryUpdater.py | asarav/MSc-Thesis-Experience-Sharing-Conversational-Agent | 0f122c393768f9093b1990fe7a8b44213893d67a | [
"MIT"
] | null | null | null | Client/experience_management/memoryUpdater.py | asarav/MSc-Thesis-Experience-Sharing-Conversational-Agent | 0f122c393768f9093b1990fe7a8b44213893d67a | [
"MIT"
] | null | null | null | from os import listdir
from os.path import isfile, join
from data_retrieval.dietItemManager import DietLikes
from data_retrieval.jsonManager import jsonManager
from experience_management.experienceManager import ExperienceManager
import language_tool_python
from experience_management.sentimentDetection import performSentimentAnalysis
tool = language_tool_python.LanguageTool('en-US')
def rewordPhrase(answer):
rewordedPraise = answer
rewordedPraise = rewordedPraise.replace("I'm", "you were")
rewordedPraise = rewordedPraise.replace("I am", "you were")
rewordedPraise = rewordedPraise.replace("I", "You")
rewordedPraise = rewordedPraise.replace(" me ", " you ")
rewordedPraise = rewordedPraise.replace(" me.", "you.")
rewordedPraise = rewordedPraise.replace(" my ", " your ")
rewordedPraise = rewordedPraise.replace("My ", "Your ")
rewordedPraise = rewordedPraise.replace(" my.", " your.")
rewordedPraise = rewordedPraise.replace(" mine ", " yours ")
rewordedPraise = rewordedPraise.replace(" mine.", " yours.")
rewordedPraise = rewordedPraise.replace(" myself.", " yourself.")
rewordedPraise = rewordedPraise.replace(" myself ", " yourself ")
return rewordedPraise
#Look through all memory files
mypath = "../interaction_data"
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
print(onlyfiles)
for file in onlyfiles:
print(file)
if file == "session.json":
continue
manager = jsonManager()
manager.readJSON(mypath + "/" + file)
fileData = manager.data
dietLikeManager = DietLikes()
if "session" in fileData:
if (fileData["session"] is 2) or (fileData["session"] is 3):
#Add diet advice
if "dietLikes" in fileData and fileData["session"] is 2:
dietLike = fileData["dietLikes"]
goal = fileData["goal"]
answer = dietLikeManager.getLikeStatement(dietLike["question"], goal)
fileData["dietLikes"]["answer"] = answer
if "experiences" in fileData:
experiences = fileData["experiences"]
currentSession = fileData["session"]
updatedExperiences = []
# For each memory file, iterate through the individual experiences
for experience in experiences:
# Use spellcheck and generate variations of the sentence to handle any problems with speech recognition.
print(experience)
question = experience["Question"]
answer = experience["Answer"]
praisePhrases = []
criticismPhrases = []
#Do some filtering of words like "oh", "yeah", and other words like "God" and the names of others
stopwords = ['oh', 'yeah', 'God', 'Charlie', 'god']
querywords = answer.split()
resultwords = [word for word in querywords if word.lower() not in stopwords]
filteredAnswer = ' '.join(resultwords)
memoryUpdater = ExperienceManager(question, filteredAnswer)
#Use rake for keyword extraction, because it is better
print("RAKE")
keywords = memoryUpdater.RakeKeywordExtraction()
print(keywords)
#Use spellcheck to get a replacement that can be used as the basis of a rephrased memory.
print("Matches")
correctedAnswer = tool.correct(answer)
answer = correctedAnswer
#Remove keywords that do not contain nouns or adjectives
# Use NLTK for POS tagging, because it is easier to work with
if len(keywords) > 0:
parts = memoryUpdater.NLTKPOSTaggingSpecific(keywords[0])
print("POS")
print(parts)
for part in parts:
if part[1] == 'JJ' or part[1] == "JJR" or part[1] == 'NN' or part[1] == 'NNS':
print("Good")
#For each memory, perform sentiment analysis and keyword extraction for the question and the answer
sentiment = performSentimentAnalysis(answer)
print(sentiment)
sentimentBool = False
if sentiment == "Positive":
sentimentBool = True
# SESSION 1 MEMORIES
#Determine context of experience (just using hardcoded questions)
#Generate sentences that can be used for reuse.
#First generate variants for praise
if question == "Are you feeling excited to start? Nervous? What feelings are you having right now?":
if currentSession is 2:
#Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you how you were feeling before we started. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " Honestly, I think you have nothing to worry about and that it's fine to be more excited, because you are doing great!"
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
#Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked about how you were feeling before starting."
if sentimentBool:
rewordedPraise = rewordedPraise + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts."
else:
rewordedPraise = rewordedPraise + " When you said that, you sounded a bit negative, but as you can see, you have nothing to worry about. You are doing a great job."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
#Praise with only sentiment
sentimentPraise = ""
if sentimentBool:
sentimentPraise = "In our first session, I asked you how you were feeling before you got started, and you sounded optimistic and positive. Keep it up. Your optimism will help you in the long run."
else:
sentimentPraise = "In our first session, I asked you how you were feeling before you got started, and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. You have done well, and I'm sure you will continue to do well."
praisePhrases.append(sentimentPraise)
#Second generate variants for criticism
#Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you how you were feeling before we started. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " Honestly, I think you don't need to worry and doing so would be counterproductive. I think what would help would be to stay optimistic and focus on consistent activity. Stay focused, and I'm sure you will make it."
criticismPhrases.append(keywordCriticism)
#Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when asked about how you were feeling before starting."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts despite the shortcomings you have had in meeting your goal."
else:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded a bit negative, and this may be hurting you in your efforts to reach your goal. Stay motivated, positive and focused, and I'm sure you will reach your goal."
criticismPhrases.append(rewordedCriticism)
#Praise with only sentiment
sentimentCriticism = ""
if sentimentBool:
sentimentCriticism = "In our first session, I asked you how you were feeling before you got started, and you sounded optimistic and positive. Even though you've run into some problems, I don't think this should change. Stay consistent and committed. You will get there."
else:
sentimentCriticism = "In our first session, I asked you how you were feeling before you got started, and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. The fact that you are here shows that you want to work towards your goal. You just need to take the first step."
criticismPhrases.append(sentimentCriticism)
else:
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you how you were feeling before we started. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " Given your ability to meet your milestone, there was nothing to worry about."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked about how you were feeling before starting."
if sentimentBool:
rewordedPraise = rewordedPraise + " You sounded quite optimistic, and I am sure that led you to reach your milestone in the second session."
else:
rewordedPraise = rewordedPraise + " You sounded a bit negative, but it seems that it did not affect you at all, because you managed to reach your milestone in the second session."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Praise with only sentiment
sentimentPraise = ""
if sentimentBool:
sentimentPraise = "In our first session, I asked you how you were feeling before you got started, and you sounded optimistic and positive. It looks like this helped you to reach your milestone."
else:
sentimentPraise = "In our first session, I asked you how you were feeling before you got started, and you sounded a bit pessimistic, but it looks like this did not hold you back at all, because you managed to reach your final milestone."
praisePhrases.append(sentimentPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you how you were feeling before we started. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " It seems that you may have been a bit nervous or worried, because you did not manage to reach your milestone. A more optimistic and focused outlook may have served you better."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when asked about how you were feeling before starting."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " You sounded a bit positive, and despite your shortcoming and inability to meet your milestone, I hope you stayed positive and focused on your goal."
else:
rewordedCriticism = rewordedCriticism + " You sounded a bit negative, and that might have hurt your ability to meet your milestone. A more positive and focused outlook may have worked to your benefit."
criticismPhrases.append(rewordedCriticism)
# Praise with only sentiment
sentimentCriticism = ""
if sentimentBool:
sentimentCriticism = "In our first session, I asked you how you were feeling before you got started, and you sounded optimistic and positive. Even though you did not meet your milestone, I hope this did not change. Staying consistent and committed will surely help you in the long run."
else:
sentimentCriticism = "In our first session, I asked you how you were feeling before you got started, and you sounded a bit pessimistic, but I think if you were a bit more optimistic, you would have had more success. The fact that you are here and you want to work towards your goal already means you are making some progress."
criticismPhrases.append(sentimentCriticism)
elif question == "Why would you like to work on this goal?":
if currentSession is 2:
goal = fileData["goal"]
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you why you would like to work on "
if goal is 0:
keywordPraise = keywordPraise + "calorie restriction."
else:
keywordPraise = keywordPraise + "sugar reduction."
keywordPraise = keywordPraise + " You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " It looks like you had that in the back of your head as you were working towards your goal, because the results so far are very promising. Keep it up."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked about why you would like to work on "
if goal is 0:
rewordedPraise = rewordedPraise + "calorie restriction."
else:
rewordedPraise = rewordedPraise + "sugar reduction."
if sentimentBool:
rewordedPraise = rewordedPraise + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts."
else:
rewordedPraise = rewordedPraise + " When you said that, you sounded a bit negative, but as you can see, you have nothing to worry about. You are doing a great job."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Praise with only sentiment
sentimentPraise = "In our first session, I asked you why you wanted to work on "
if goal is 0:
sentimentPraise = sentimentPraise + "calorie restriction"
else:
sentimentPraise = sentimentPraise + "sugar reduction"
if sentimentBool:
sentimentPraise = sentimentPraise + ", and you sounded optimistic and positive. Keep it up. Your optimism will help you in the long run."
else:
sentimentPraise = sentimentPraise + ", and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. You have done well, and I'm sure you will continue to do well."
praisePhrases.append(sentimentPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you why you would like to work on "
if goal is 0:
keywordCriticism = keywordCriticism + "calorie restriction."
else:
keywordCriticism = keywordCriticism + "sugar reduction."
keywordCriticism = keywordCriticism + " You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " You had some setbacks, but I think if you keep these thoughts in mind and focus, you will reach your goal."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when I asked you why you would like to work on "
if goal is 0:
rewordedCriticism = rewordedCriticism + "calorie restriction."
else:
rewordedCriticism = rewordedCriticism + "sugar reduction."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts despite the shortcomings you have had in meeting your goal."
else:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded a bit negative, and this may be hurting you in your efforts to reach your goal. Stay motivated, positive and focused, and I'm sure you will reach your goal."
criticismPhrases.append(rewordedCriticism)
# Praise with only sentiment
sentimentCriticism = "In our first session, I asked you why you wanted to work on "
if goal is 0:
sentimentCriticism = sentimentCriticism + "calorie restriction"
else:
sentimentCriticism = sentimentCriticism + "sugar reduction"
if sentimentBool:
sentimentCriticism = sentimentCriticism + ", and you sounded optimistic and positive. Even though you've run into some problems, I don't think this should change. Stay consistent and committed. You will get there."
else:
sentimentCriticism = sentimentCriticism + ", and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. The fact that you are here shows that you want to work towards your goal. You just need to take the first step."
criticismPhrases.append(sentimentCriticism)
else:
goal = fileData["goal"]
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you why you would like to work on "
if goal is 0:
keywordPraise = keywordPraise + "calorie restriction."
else:
keywordPraise = keywordPraise + "sugar reduction."
keywordPraise = keywordPraise + " You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " It looks like you had that in the back of your head as you were working towards your goal, because you managed to reach your milestone, and I hope it helped you when you were working towards your final goal as well."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked about why you would like to work on "
if goal is 0:
rewordedPraise = rewordedPraise + "calorie restriction."
else:
rewordedPraise = rewordedPraise + "sugar reduction."
if sentimentBool:
rewordedPraise = rewordedPraise + " When you said that, you sounded positive. I am sure this helped you reach your milestone and I hope you used that positivity in your journey towards your final goal as well."
else:
rewordedPraise = rewordedPraise + " When you said that, you sounded a bit negative, but it seems that there was no need to be negative, because you managed to reach your milestone. I hope you were able to improve on your milestone in your approach towards your final goal."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Praise with only sentiment
sentimentPraise = "In our first session, I asked you why you wanted to work on "
if goal is 0:
sentimentPraise = sentimentPraise + "calorie restriction"
else:
sentimentPraise = sentimentPraise + "sugar reduction"
if sentimentBool:
sentimentPraise = sentimentPraise + ", and you sounded optimistic and positive. I'm sure that helped you in your milestone, and I hope it helped you with your final goal."
else:
sentimentPraise = sentimentPraise + ", and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. You managed to reach your milestone, and I'm sure that a more optimistic outlook will help you in other endeavors as well."
praisePhrases.append(sentimentPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you why you would like to work on "
if goal is 0:
keywordCriticism = keywordCriticism + "calorie restriction."
else:
keywordCriticism = keywordCriticism + "sugar reduction."
keywordCriticism = keywordCriticism + " You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " You may not have met your milestone, but I think if you keep these thoughts in mind and focus, it will help you in future endeavors."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when I asked you why you would like to work on "
if goal is 0:
rewordedCriticism = rewordedCriticism + "calorie restriction."
else:
rewordedCriticism = rewordedCriticism + "sugar reduction."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded positive, and I hope you managed to maintain that level of positivity in your efforts towards your final goal despite the shortcomings you have had in meeting your milestone."
else:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded a bit negative, and this may have hurt you in your efforts to reach your milestone. I hope you managed to stay motivated, positive and focused in your efforts to reach your final goal."
criticismPhrases.append(rewordedCriticism)
# Praise with only sentiment
sentimentCriticism = "In our first session, I asked you why you wanted to work on "
if goal is 0:
sentimentCriticism = sentimentCriticism + "calorie restriction"
else:
sentimentCriticism = sentimentCriticism + "sugar reduction"
if sentimentBool:
sentimentCriticism = sentimentCriticism + ", and you sounded optimistic and positive. Even though you did not meet your milestone, I don't think this should change and I hope you stayed consistent and committed in your efforts towards your final goal."
else:
sentimentCriticism = sentimentCriticism + ", and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. You you may not have met your first milestone, but I'm sure that optimism would have helped you with your final goal."
criticismPhrases.append(sentimentCriticism)
elif question == "If you manage to achieve this goal, how do you think you will feel?":
if currentSession is 2:
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you how you would feel if you managed to achieve your goal. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " It looks like you had that in the back of your head as you were working towards your goal, because the results so far are very promising. Keep it up and those feelings will become reality."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked how you would feel if you managed to achieve your goal."
if sentimentBool:
rewordedPraise = rewordedPraise + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts. Keep it up and those feelings will become reality."
else:
rewordedPraise = rewordedPraise + " When you said that, you sounded a bit negative, but as you can see, you have nothing to worry about. You are doing a great job."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Praise with only sentiment
sentimentPraise = ""
if sentimentBool:
sentimentPraise = "In our first session, I asked you how you would feel when you accomplished your goal, and you sounded optimistic and positive. Keep it up. Your optimism will help you in the long run and those feelings will become reality."
else:
sentimentPraise = "In our first session, I asked you how you would feel when you accomplished your goal, and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. You have done well, and I'm sure you will continue to do well. I believe your goal is worth it and you are worth it."
praisePhrases.append(sentimentPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you how you would feel when you accomplished your goal. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " If you want to experience those feelings and make them a reality, you will need to take the first step. I know you have it in you."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when I asked you how you would feel when you accomplished your goal."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts despite the shortcomings you have had in meeting your goal. I believe that you will one day make those feelings a reality."
else:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded a bit negative, and this may be hurting you in your efforts to reach your goal. Stay motivated, positive and focused, and I'm sure you will reach your goal and make those feelings a reality."
criticismPhrases.append(rewordedCriticism)
# Praise with only sentiment
sentimentCriticism = ""
if sentimentBool:
sentimentCriticism = "In our first session, I asked you how you would feel when you accomplished your goal, and you sounded optimistic and positive. Even though you've run into some problems, I don't think this should change. Stay consistent and committed and those feelings will become a reality."
else:
sentimentCriticism = "In our first session, I asked you how you would feel when you accomplished you goal, and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. The fact that you are here shows that you want to work towards your goal. You just need to take the first step and before you know it, those feelings will be reality."
criticismPhrases.append(sentimentCriticism)
else:
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you how you would feel if you managed to achieve your goal. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " It looks like that was in your mind as you were working towards your milestone, and I hope it helped you in your efforts towards your final goal."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked how you would feel if you managed to achieve your goal."
if sentimentBool:
rewordedPraise = rewordedPraise + " When you said that, you sounded positive, and I hope you maintained that level of positivity when working towards your final goal as well."
else:
rewordedPraise = rewordedPraise + " When you said that, you sounded a bit negative, but as you can see, you managed to meet your milestone. I hope you were able to gain a more optimistic mindset and apply it in your efforts towards your final goal."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Praise with only sentiment
sentimentPraise = ""
if sentimentBool:
sentimentPraise = "In our first session, I asked you how you would feel when you accomplished your goal, and I hope you maintained that level of positivity when working towards your final goal as well."
else:
sentimentPraise = "In our first session, I asked you how you would feel when you accomplished your goal, and you sounded a bit pessimistic, but as you can see, you managed to meet your milestone. I hope you were able to gain a more optimistic mindset and apply it in your efforts towards your final goal."
praisePhrases.append(sentimentPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you how you would feel when you accomplished your goal. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " Although you did not meet your milestone, I hope you kept those feelings in mind when you were working towards your final goal. Making a positive change in your diet is definitely worth it."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when I asked you how you would feel when you accomplished your goal."
rewordedCriticism = rewordedCriticism + " Although you did not meet your milestone, I hope you kept those feelings in mind when you were working towards your final goal. Making a positive change in your diet is definitely worth it."
criticismPhrases.append(rewordedCriticism)
elif question == "What will achieving this goal allow you to do that you could not do before?":
if currentSession is 2:
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you what achieving your goal would allow you to do. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " It looks like you had that in the back of your head as you were working towards your goal, because the results so far are very promising. Keep it up and you will surely be able to do those things one day."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked what achieving your goal would allow you to do."
if sentimentBool:
rewordedPraise = rewordedPraise + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts. Keep it up and one day you will be able to do those things."
else:
rewordedPraise = rewordedPraise + " When you said that, you sounded a bit negative, but as you can see, you have nothing to worry about. You are doing a great job."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Praise with only sentiment
sentimentPraise = ""
if sentimentBool:
sentimentPraise = "In our first session, I asked you what achieving your goal would allow you to do, and you sounded optimistic and positive. Keep it up. Your optimism will help you in the long run and one day you will be able to do those things."
else:
sentimentPraise = "In our first session, I asked you what achieving your goal would allow you to do, and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. You have done well, and I'm sure you will continue to do well. I believe your goal is worth it and you are worth it."
praisePhrases.append(sentimentPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you how you would feel when you accomplished your goal. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " If you want to experience those feelings and make them a reality, you will need to take the first step. I know you have it in you."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when I asked you how you would feel when you accomplished your goal."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded positive, and I hope you maintain that level of positivity in your future efforts despite the shortcomings you have had in meeting your goal. I believe that you will one day make those feelings a reality."
else:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded a bit negative, and this may be hurting you in your efforts to reach your goal. Stay motivated, positive and focused, and I'm sure you will reach your goal and make those feelings a reality."
criticismPhrases.append(rewordedCriticism)
# Praise with only sentiment
sentimentCriticism = ""
if sentimentBool:
sentimentCriticism = "In our first session, I asked you how you would feel when you accomplished your goal, and you sounded optimistic and positive. Even though you've run into some problems, I don't think this should change. Stay consistent and committed and those feelings will become a reality."
else:
sentimentCriticism = "In our first session, I asked you how you would feel when you accomplished you goal, and you sounded a bit pessimistic, but I think it's fine to be a bit more optimistic. The fact that you are here shows that you want to work towards your goal. You just need to take the first step and before you know it, you will be able to do those things."
criticismPhrases.append(sentimentCriticism)
else:
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our first session, I asked you what achieving your goal would allow you to do. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " It looks like you had that in the back of your head as you were working towards your milestone, and I hope you kept it in mind as you worked towards your final goal."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our first session, you said " + rewordedPraise + " when asked what achieving your goal would allow you to do."
if sentimentBool:
rewordedPraise = rewordedPraise + " When you said that, you sounded positive, and I hope you managed to maintain that level of positivity in your efforts towards your final goal. It did help you reach your milestone after all."
else:
rewordedPraise = rewordedPraise + " When you said that, you sounded a bit negative, but as you can see you managed to do a great job with your milestone and staying negative can hold you back. Imagine the possibilities with a more positive outlook."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Praise with only sentiment
sentimentPraise = ""
if sentimentBool:
sentimentPraise = "In our first session, I asked you what achieving your goal would allow you to do, and you sounded optimistic and positive. That is good, and it definitely helped with your milestone. Your optimism will help you in the long run and I hope that it helped you with your final goal."
else:
sentimentPraise = "In our first session, I asked you what achieving your goal would allow you to do, and you sounded a bit pessimistic, but I think it was fine to be a bit more optimistic. You have done well on your milestone, and being more optimistic would have set you up for success not only for your final goal, but for any other goals you might set for yourself in the future."
praisePhrases.append(sentimentPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our first session, I asked you how you would feel when you accomplished your goal. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " Although you did not reach your milestone, those feelings were valid. I hope you kept those feelings in mind as you worked towards your second goal."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our first session, you said " + rewordedCriticism + " when I asked you how you would feel when you accomplished your goal."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded positive, and I hope you maintained that level of positivity in your efforts towards your final goal despite the shortcomings you have had in meeting your milestone. I believe that those feelings are valid and worth remembering."
else:
rewordedCriticism = rewordedCriticism + " When you said that, you sounded a bit negative. This may have not hurt you in your milestone, but and this could have hurt you in your efforts to reach your goal. Stay motivated, positive and focused, and I'm sure feelings will be easier to achieve."
criticismPhrases.append(rewordedCriticism)
# Praise with only sentiment
sentimentCriticism = ""
if sentimentBool:
sentimentCriticism = "In our first session, I asked you how you would feel when you accomplished your goal, and you sounded optimistic and positive. Even though you did not meet your milestone, I don't think this should change. If you wanted to see those feelings will become a reality, I believe and hope that you maintained that mindset."
else:
sentimentCriticism = "In our first session, I asked you how you would feel when you accomplished you goal, and you sounded a bit pessimistic. This may have hurt you when you were working towards your milestone, and I think it's fine to be a bit more optimistic. The fact that you are here shows that you want to work towards your goal, so you've already made some progress."
criticismPhrases.append(sentimentCriticism)
# SESSION 2 MEMORIES
elif question == "Now that you have started, how do you feel about the progress you have made?":
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our second session, I asked you how you felt about the progress you made. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
if sentimentBool:
keywordPraise = keywordPraise + " It sounded like things were looking up for you, and I imagine that helped you reach your final goal."
else:
keywordPraise = keywordPraise + " It sounded like things were not looking up for you, which was unfortunate, but you managed to push through and reach your goal."
keywordPraise = keywordPraise + " Overall, looking back on things and how you managed to meet your final goal, I think it's time to start celebrating."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our second session, you said " + rewordedPraise + " when asked how you felt about the progress you made so far."
if sentimentBool:
rewordedPraise = rewordedPraise + " It sounded like things were looking up for you, and I imagine that helped you reach your final goal."
else:
rewordedPraise = rewordedPraise + " It sounded like things were not looking up for you, which was unfortunate, but you managed to push through and reach your goal."
rewordedPraise = rewordedPraise + " Overall, looking back on things and how you managed to meet your final goal, I think it's time to start celebrating."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our second session, I asked you how you felt about the progress you made. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
if sentimentBool:
keywordCriticism = keywordCriticism + " It sounded like things were looking up for you, which is a bit unfortunate, but it looks like you made some progress regardless of whether you met your goal or not."
else:
keywordCriticism = keywordCriticism + " It sounded like things were not looking up for you, which is a bit unfortunate, but hopefully you at least now know what is involved in working towards a goal, and what habits to follow."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our second session, you said " + rewordedCriticism + " when asked how you felt about the progress you made so far."
if sentimentBool:
rewordedCriticism = rewordedCriticism + " It sounded like things were looking up for you, which is a bit unfortunate, but it looks like you made some progress regardless of whether you met your goal or not."
else:
rewordedCriticism = rewordedCriticism + " It sounded like things were not looking up for you, which is a bit unfortunate, but hopefully you at least now know what is involved in working towards a goal, and what habits to follow."
criticismPhrases.append(rewordedCriticism)
elif question == "What are you struggling with?":
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our second session, I asked what you were struggling with. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
keywordPraise = keywordPraise + " It sounds like you managed to at least partially address some of these struggles, because you did well in meeting your final goal."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our second session, you said " + rewordedPraise + " when asked how you felt about the progress you made so far."
if sentimentBool:
rewordedPraise = rewordedPraise + " It sounded like the struggles that you had were not that difficult to solve to begin with, and you managed to overcome them to ."
else:
rewordedPraise = rewordedPraise + " It sounded like those struggles were quite challenging, but you managed to get past them, so great job!"
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our second session, I asked what you were struggling with. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " It sounded like those things may have still been a problem in your efforts towards your final goal. Although you did not reach your final goal, I hope you at least gained some experience by going through this process and learned a bit about diet along the way."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our second session, you said " + rewordedCriticism + " when asked how you felt about the progress you made so far."
rewordedCriticism = rewordedCriticism + " It sounded like those things may have still been a problem in your efforts towards your final goal. Although you did not reach your final goal, I hope you at least gained some experience by going through this process and learned a bit about diet along the way."
criticismPhrases.append(rewordedCriticism)
elif question == "How do you think your family, friends or coworkers would react if they heard about you reaching your goal?":
# Keyword
keywordPraise = ""
if len(keywords) > 0:
keywordPraise = "In our second session, I asked you how you think your family, friends or coworkers would react if they heard about you reaching your goal. "
keywordPraise = keywordPraise + "You mentioned " + keywords[0] + "."
if sentimentBool:
keywordPraise = keywordPraise + " Well, you've reached your goal, so I imagine you will be able to see their reactions soon, and I hope that you are looking forward to a positive response."
else:
keywordPraise = keywordPraise + " You did not sound too optimistic, but you should realize that you have managed to accomplish a lot, and people will recognize that effort. Great job."
print("KeywordPraise")
print(keywordPraise)
praisePhrases.append(keywordPraise)
# Rewording with sentiment (rewording only does not allow for deeper meaning to be interpretted)
rewordedPraise = rewordPhrase(filteredAnswer)
rewordedPraise = "In our second session, you said " + rewordedPraise + " when asked how you think your family, friends or coworkers would react if they heard about you reaching your goal."
if sentimentBool:
rewordedPraise = rewordedPraise + " Well, you've reached your goal, so I imagine you will be able to see their reactions soon, and I hope that you are looking forward to a positive response."
else:
rewordedPraise = rewordedPraise + " You did not sound too optimistic, but you should realize that you have managed to accomplish a lot, and people will recognize that effort. Great job."
print("Reworded Praise")
print(rewordedPraise)
praisePhrases.append(rewordedPraise)
# Second generate variants for criticism
# Keyword
keywordCriticism = ""
if len(keywords) > 0:
keywordCriticism = "In our second session, I asked you how you think your family, friends or coworkers would react if they heard about you reaching your goal. "
keywordCriticism = keywordCriticism + "You mentioned " + keywords[0] + "."
keywordCriticism = keywordCriticism + " Although you haven't reached your goal, you have made some progress just by going through this process, and I think those in your inner circle will recognize that as well."
criticismPhrases.append(keywordCriticism)
# Rewording with sentiment
rewordedCriticism = rewordPhrase(filteredAnswer)
rewordedCriticism = "In our second session, you said " + rewordedCriticism + " when I asked you how you think your family, friends or coworkers would react if they heard about you reaching your goal."
rewordedCriticism = rewordedCriticism + " Although you haven't reached your goal, you have made some progress just by going through this process, and I think those in your inner circle will recognize that as well."
criticismPhrases.append(rewordedCriticism)
#Add reworded phrases to data
newExperience = experience
newExperience["praise"] = praisePhrases
newExperience["criticism"] = criticismPhrases
updatedExperiences.append(newExperience)
fileData["experiences"] = updatedExperiences
manager.data = fileData
#Use this as a temporary file to test
manager.writeDataToJSON(mypath + "/" + file)
| 80.78125 | 415 | 0.566022 | 6,328 | 62,040 | 5.547882 | 0.069848 | 0.00997 | 0.016521 | 0.028086 | 0.854673 | 0.841086 | 0.820121 | 0.807161 | 0.792548 | 0.779702 | 0 | 0.001875 | 0.389603 | 62,040 | 767 | 416 | 80.886571 | 0.925189 | 0.05195 | 0 | 0.693662 | 0 | 0.179577 | 0.419727 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.001761 | false | 0 | 0.012324 | 0 | 0.015845 | 0.09507 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ec9a058413fedcda21fd85d282e7b67b62fa717a | 97 | py | Python | src/MVIB/training/__init__.py | brmprnk/jointomicscomp | 2074025f6b9847698c21f4c45cdb76cb6c583f4e | [
"MIT"
] | 4 | 2021-07-20T10:20:03.000Z | 2022-02-14T10:51:37.000Z | src/MVIB/training/__init__.py | brmprnk/jointomicscomp | 2074025f6b9847698c21f4c45cdb76cb6c583f4e | [
"MIT"
] | null | null | null | src/MVIB/training/__init__.py | brmprnk/jointomicscomp | 2074025f6b9847698c21f4c45cdb76cb6c583f4e | [
"MIT"
] | null | null | null | from src.MVIB.training.vae import VAETrainer
from src.MVIB.training.omics import OmicsMIBTrainer
| 32.333333 | 51 | 0.85567 | 14 | 97 | 5.928571 | 0.642857 | 0.168675 | 0.26506 | 0.457831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082474 | 97 | 2 | 52 | 48.5 | 0.932584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
ecabd25b14f8a55319069636a4748b26a87ee185 | 35,611 | py | Python | auto_process_ngs/test/qc/test_reporting.py | fls-bioinformatics-core/auto_process_ngs | 1f07a08e14f118e6a61d3f37130515efc6049dd7 | [
"AFL-3.0"
] | 5 | 2017-01-31T21:37:09.000Z | 2022-03-17T19:26:29.000Z | auto_process_ngs/test/qc/test_reporting.py | fls-bioinformatics-core/auto_process_ngs | 1f07a08e14f118e6a61d3f37130515efc6049dd7 | [
"AFL-3.0"
] | 294 | 2015-08-14T09:00:30.000Z | 2022-03-18T10:17:05.000Z | auto_process_ngs/test/qc/test_reporting.py | fls-bioinformatics-core/auto_process_ngs | 1f07a08e14f118e6a61d3f37130515efc6049dd7 | [
"AFL-3.0"
] | 7 | 2017-11-23T07:52:21.000Z | 2020-07-15T10:12:05.000Z | #######################################################################
# Unit tests for qc/reporting.py
#######################################################################
import unittest
import os
import tempfile
import shutil
import zipfile
from auto_process_ngs.mock import MockAnalysisProject
from auto_process_ngs.mock import UpdateAnalysisProject
from auto_process_ngs.mockqc import MockQCOutputs
from auto_process_ngs.analysis import AnalysisProject
from auto_process_ngs.analysis import AnalysisSample
from auto_process_ngs.qc.reporting import QCReporter
from auto_process_ngs.qc.reporting import FastqSet
from auto_process_ngs.qc.reporting import verify
from auto_process_ngs.qc.reporting import report
from auto_process_ngs.qc.reporting import pretty_print_reads
# Set to False to keep test output dirs
REMOVE_TEST_OUTPUTS = True
class TestQCReporter(unittest.TestCase):
def setUp(self):
# Temporary working dir (if needed)
self.wd = None
def tearDown(self):
# Remove temporary working dir
if not REMOVE_TEST_OUTPUTS:
return
if self.wd is not None and os.path.isdir(self.wd):
shutil.rmtree(self.wd)
def _make_working_dir(self):
# Create a temporary working directory
if self.wd is None:
self.wd = tempfile.mkdtemp(suffix='.test_QCReporter')
def _make_analysis_project(self,paired_end=True,fastq_dir=None,
qc_dir="qc",fastq_names=None):
# Create a mock Analysis Project directory
self._make_working_dir()
# Generate names for fastq files to add
if paired_end:
reads = (1,2)
else:
reads = (1,)
sample_names = ('PJB1','PJB2')
if fastq_names is None:
fastq_names = []
for i,sname in enumerate(sample_names,start=1):
for read in reads:
fq = "%s_S%d_R%d_001.fastq.gz" % (sname,i,read)
fastq_names.append(fq)
self.analysis_dir = MockAnalysisProject('PJB',fastq_names)
# Create the mock directory
self.analysis_dir.create(top_dir=self.wd)
# Populate with fake QC products
qc_dir = os.path.join(self.wd,self.analysis_dir.name,qc_dir)
qc_logs = os.path.join(qc_dir,'logs')
os.mkdir(qc_dir)
os.mkdir(qc_logs)
for fq in fastq_names:
# FastQC
MockQCOutputs.fastqc_v0_11_2(fq,qc_dir)
# Fastq_screen
MockQCOutputs.fastq_screen_v0_9_2(fq,qc_dir,'model_organisms')
MockQCOutputs.fastq_screen_v0_9_2(fq,qc_dir,'other_organisms')
MockQCOutputs.fastq_screen_v0_9_2(fq,qc_dir,'rRNA')
return os.path.join(self.wd,self.analysis_dir.name)
def test_qcreporter_single_end(self):
"""QCReporter: single-end data
"""
analysis_dir = self._make_analysis_project(paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
reporter = QCReporter(project)
self.assertTrue(reporter.verify())
reporter.report(filename=os.path.join(self.wd,'report.SE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.wd,'report.SE.html')))
def test_qcreporter_paired_end(self):
"""QCReporter: paired-end data
"""
analysis_dir = self._make_analysis_project(paired_end=True)
project = AnalysisProject('PJB',analysis_dir)
reporter = QCReporter(project)
self.assertTrue(reporter.verify())
reporter.report(filename=os.path.join(self.wd,'report.PE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.wd,'report.PE.html')))
def test_qcreporter_paired_end_with_non_default_fastq_dir(self):
"""QCReporter: paired-end data with non-default fastq dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
fastq_dir="fastqs.non_default")
project = AnalysisProject('PJB',analysis_dir)
reporter = QCReporter(project)
self.assertTrue(reporter.verify())
reporter.report(filename=os.path.join(self.wd,'report.PE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.wd,'report.PE.html')))
def test_qcreporter_paired_end_with_no_fastq_dir(self):
"""QCReporter: paired-end data with no fastq dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
fastq_dir=".")
project = AnalysisProject('PJB',analysis_dir)
reporter = QCReporter(project)
self.assertTrue(reporter.verify())
reporter.report(filename=os.path.join(self.wd,'report.PE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.wd,'report.PE.html')))
def test_qcreporter_paired_end_with_non_default_qc_dir(self):
"""QCReporter: paired-end data with non-default QC dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
qc_dir="qc.non_default")
project = AnalysisProject('PJB',analysis_dir)
reporter = QCReporter(project)
self.assertTrue(reporter.verify(qc_dir="qc.non_default"))
reporter.report(filename=os.path.join(self.wd,'report.PE.html'),
qc_dir="qc.non_default")
self.assertTrue(os.path.exists(
os.path.join(self.wd,'report.PE.html')))
def test_qcreporter_paired_end_with_non_canonical_fastq_names(self):
"""QCReporter: paired-end data with non-canonical fastq names
"""
analysis_dir = self._make_analysis_project(paired_end=True,
fastq_names=
("PJB1_S1_R1_001_paired.fastq.gz",
"PJB1_S1_R2_001_paired.fastq.gz",
"PJB2_S2_R1_001_paired.fastq.gz",
"PJB2_S2_R2_001_paired.fastq.gz",))
project = AnalysisProject('PJB',analysis_dir)
reporter = QCReporter(project)
self.assertTrue(reporter.verify())
reporter.report(filename=os.path.join(self.wd,'report.non_canonical.html'))
self.assertTrue(os.path.exists(
os.path.join(self.wd,'report.non_canonical.html')))
def test_qcreporter_single_end_make_zip_file(self):
"""QCReporter: single-end data: make ZIP file
"""
analysis_dir = self._make_analysis_project(paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
reporter = QCReporter(project)
self.assertTrue(reporter.verify())
reporter.report(filename=os.path.join(self.wd,
'PJB',
'report.SE.html'),
make_zip=True)
self.assertTrue(os.path.exists(
os.path.join(self.wd,'PJB','report.SE.html')))
self.assertTrue(os.path.exists(
os.path.join(self.wd,'PJB','report.SE.PJB.zip')))
contents = zipfile.ZipFile(
os.path.join(self.wd,'PJB',
'report.SE.PJB.zip')).namelist()
print(contents)
expected = (
'report.SE.PJB/report.SE.html',
'report.SE.PJB/qc/PJB1_S1_R1_001_fastqc.html',
'report.SE.PJB/qc/PJB1_S1_R1_001_model_organisms_screen.png',
'report.SE.PJB/qc/PJB1_S1_R1_001_model_organisms_screen.txt',
'report.SE.PJB/qc/PJB1_S1_R1_001_other_organisms_screen.png',
'report.SE.PJB/qc/PJB1_S1_R1_001_other_organisms_screen.txt',
'report.SE.PJB/qc/PJB1_S1_R1_001_rRNA_screen.png',
'report.SE.PJB/qc/PJB1_S1_R1_001_rRNA_screen.txt',
'report.SE.PJB/qc/PJB2_S2_R1_001_fastqc.html',
'report.SE.PJB/qc/PJB2_S2_R1_001_model_organisms_screen.png',
'report.SE.PJB/qc/PJB2_S2_R1_001_model_organisms_screen.txt',
'report.SE.PJB/qc/PJB2_S2_R1_001_other_organisms_screen.png',
'report.SE.PJB/qc/PJB2_S2_R1_001_other_organisms_screen.txt',
'report.SE.PJB/qc/PJB2_S2_R1_001_rRNA_screen.png',
'report.SE.PJB/qc/PJB2_S2_R1_001_rRNA_screen.txt')
for f in expected:
self.assertTrue(f in contents,"%s is missing from ZIP file" % f)
class TestFastqSet(unittest.TestCase):
def test_fastqset_PE(self):
"""FastqSet: handles paired-end data (Fastq pair)
"""
fqset = FastqSet('/data/PB/PB1_ATTAGG_L001_R1_001.fastq',
'/data/PB/PB1_ATTAGG_L001_R2_001.fastq')
# r1/r2 properties
self.assertEqual(fqset.r1,'/data/PB/PB1_ATTAGG_L001_R1_001.fastq')
self.assertEqual(fqset.r2,'/data/PB/PB1_ATTAGG_L001_R2_001.fastq')
# __getitem__ method
self.assertEqual(fqset[0],'/data/PB/PB1_ATTAGG_L001_R1_001.fastq')
self.assertEqual(fqset[1],'/data/PB/PB1_ATTAGG_L001_R2_001.fastq')
# fastqs property
self.assertEqual(fqset.fastqs,
['/data/PB/PB1_ATTAGG_L001_R1_001.fastq',
'/data/PB/PB1_ATTAGG_L001_R2_001.fastq'])
def test_fastqset_SE(self):
"""FastqSet: handles single-end data (single Fastq)
"""
fqset = FastqSet('/data/PB/PB1_ATTAGG_L001_R1_001.fastq')
# r1/r2 properties
self.assertEqual(fqset.r1,'/data/PB/PB1_ATTAGG_L001_R1_001.fastq')
self.assertEqual(fqset.r2,None)
# __getitem__ method
self.assertEqual(fqset[0],'/data/PB/PB1_ATTAGG_L001_R1_001.fastq')
try:
fqset[1]
self.fail("Attempt to access index 1 should raise IndexError")
except IndexError:
pass
except Exception:
self.fail("Attempt to access index 1 should raise IndexError")
# fastqs property
self.assertEqual(fqset.fastqs,
['/data/PB/PB1_ATTAGG_L001_R1_001.fastq'])
class TestVerifyFunction(unittest.TestCase):
def setUp(self):
# Temporary working dir (if needed)
self.wd = None
def tearDown(self):
# Remove temporary working dir
if not REMOVE_TEST_OUTPUTS:
return
if self.wd is not None and os.path.isdir(self.wd):
shutil.rmtree(self.wd)
def _make_working_dir(self):
# Create a temporary working directory
if self.wd is None:
self.wd = tempfile.mkdtemp(suffix='.test_QCReporter')
def _make_analysis_project(self,paired_end=True,fastq_dir=None,
qc_dir="qc",fastq_names=None):
# Create a mock Analysis Project directory
self._make_working_dir()
# Generate names for fastq files to add
if paired_end:
reads = (1,2)
else:
reads = (1,)
sample_names = ('PJB1','PJB2')
if fastq_names is None:
fastq_names = []
for i,sname in enumerate(sample_names,start=1):
for read in reads:
fq = "%s_S%d_R%d_001.fastq.gz" % (sname,i,read)
fastq_names.append(fq)
self.analysis_dir = MockAnalysisProject('PJB',fastq_names)
# Create the mock directory
self.analysis_dir.create(top_dir=self.wd)
# Populate with fake QC products
project_dir = os.path.join(self.wd,self.analysis_dir.name)
UpdateAnalysisProject(AnalysisProject(project_dir)).\
add_qc_outputs(qc_dir=qc_dir,
include_report=False,
include_zip_file=False,
include_multiqc=False)
return project_dir
def test_verify_single_end(self):
"""verify: single-end data
"""
analysis_dir = self._make_analysis_project(paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
self.assertTrue(verify(project))
def test_verify_paired_end(self):
"""verify: paired-end data
"""
analysis_dir = self._make_analysis_project(paired_end=True)
project = AnalysisProject('PJB',analysis_dir)
self.assertTrue(verify(project))
def test_verify_paired_end_with_non_default_fastq_dir(self):
"""verify: paired-end data with non-default fastq dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
fastq_dir="fastqs.non_default")
project = AnalysisProject('PJB',analysis_dir)
self.assertTrue(verify(project))
def test_verify_paired_end_with_no_fastq_dir(self):
"""verify: paired-end data with no fastq dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
fastq_dir=".")
project = AnalysisProject('PJB',analysis_dir)
self.assertTrue(verify(project))
def test_verify_paired_end_with_non_default_qc_dir(self):
"""verify: paired-end data with non-default QC dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
qc_dir="qc.non_default")
project = AnalysisProject('PJB',analysis_dir)
self.assertTrue(verify(project,qc_dir="qc.non_default"))
def test_verify_paired_end_with_non_canonical_fastq_names(self):
"""verify: paired-end data with non-canonical fastq names
"""
analysis_dir = self._make_analysis_project(
paired_end=True,
fastq_names=
("PJB1_S1_R1_001_paired.fastq.gz",
"PJB1_S1_R2_001_paired.fastq.gz",
"PJB2_S2_R1_001_paired.fastq.gz",
"PJB2_S2_R2_001_paired.fastq.gz",))
project = AnalysisProject('PJB',analysis_dir)
self.assertTrue(verify(project))
class TestReportFunction(unittest.TestCase):
def setUp(self):
# Temporary working dir (if needed)
self.wd = None
self.top_dir = None
def tearDown(self):
# Remove temporary working dir
if not REMOVE_TEST_OUTPUTS:
return
if self.wd is not None and os.path.isdir(self.wd):
shutil.rmtree(self.wd)
def _make_working_dir(self):
# Create a temporary working directory
if self.wd is None:
self.wd = tempfile.mkdtemp(suffix='.test_QCReporter')
self.top_dir = os.path.join(self.wd,"Test")
os.mkdir(self.top_dir)
def _make_analysis_project(self,name="PJB",paired_end=True,fastq_dir=None,
qc_dir="qc",sample_names=None,fastq_names=None):
# Create a mock Analysis Project directory
self._make_working_dir()
# Generate names for fastq files to add
if paired_end:
reads = (1,2)
else:
reads = (1,)
if sample_names is None:
sample_names = ('PJB1','PJB2')
if fastq_names is None:
fastq_names = []
for i,sname in enumerate(sample_names,start=1):
for read in reads:
fq = "%s_S%d_R%d_001.fastq.gz" % (sname,i,read)
fastq_names.append(fq)
analysis_project = MockAnalysisProject(name,fastq_names)
# Create the mock directory
analysis_project.create(top_dir=self.top_dir)
# Populate with fake QC products
project_dir = os.path.join(self.top_dir,analysis_project.name)
UpdateAnalysisProject(AnalysisProject(project_dir)).\
add_qc_outputs(qc_dir=qc_dir,
include_report=False,
include_zip_file=False,
include_multiqc=True)
return project_dir
def test_report_single_end(self):
"""report: single-end data
"""
analysis_dir = self._make_analysis_project(paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
report((project,),filename=os.path.join(self.top_dir,
'report.SE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'report.SE.html')))
def test_report_paired_end(self):
"""report: paired-end data
"""
analysis_dir = self._make_analysis_project(paired_end=True)
project = AnalysisProject('PJB',analysis_dir)
report((project,),filename=os.path.join(self.top_dir,
'report.PE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'report.PE.html')))
def test_report_paired_end_with_non_default_fastq_dir(self):
"""report: paired-end data with non-default fastq dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
fastq_dir="fastqs.non_default")
project = AnalysisProject('PJB',analysis_dir)
report((project,),filename=os.path.join(self.top_dir,
'report.PE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'report.PE.html')))
def test_report_paired_end_with_no_fastq_dir(self):
"""report: paired-end data with no fastq dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
fastq_dir=".")
project = AnalysisProject('PJB',analysis_dir)
report((project,),filename=os.path.join(self.top_dir,
'report.PE.html'))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'report.PE.html')))
def test_report_paired_end_with_non_default_qc_dir(self):
"""report: paired-end data with non-default QC dir
"""
analysis_dir = self._make_analysis_project(paired_end=True,
qc_dir="qc.non_default")
project = AnalysisProject('PJB',analysis_dir)
report((project,),filename=os.path.join(self.top_dir,
'report.PE.html'),
qc_dir="qc.non_default")
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'report.PE.html')))
def test_report_paired_end_with_non_canonical_fastq_names(self):
"""report: paired-end data with non-canonical fastq names
"""
analysis_dir = self._make_analysis_project(
paired_end=True,
fastq_names=
("PJB1_S1_R1_001_paired.fastq.gz",
"PJB1_S1_R2_001_paired.fastq.gz",
"PJB2_S2_R1_001_paired.fastq.gz",
"PJB2_S2_R2_001_paired.fastq.gz",))
project = AnalysisProject('PJB',analysis_dir)
report((project,),
filename=os.path.join(self.top_dir,
'report.non_canonical.html'))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'report.non_canonical.html')))
def test_report_single_end_multiple_projects(self):
"""report: single-end data: two projects in one report
"""
analysis_dir = self._make_analysis_project(name="PJB",
paired_end=False)
analysis_dir2 = self._make_analysis_project(name="PJB2",
paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
project2 = AnalysisProject('PJB2',analysis_dir2)
report((project,project2,),
title="QC report: PJB & PJB2",
filename=os.path.join(self.top_dir,
'report.multiple_projects.html'))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'report.multiple_projects.html')))
def test_report_single_end_with_data_dir(self):
"""report: single-end data: use data directory
"""
analysis_dir = self._make_analysis_project(paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
report((project,),
filename=os.path.join(self.top_dir,
'PJB',
'report.SE.html'),
use_data_dir=True)
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB','report.SE.html')))
self.assertTrue(os.path.isdir(
os.path.join(self.top_dir,
'PJB',
'report.SE_data',
'Test_PJB',
'qc')))
self.assertTrue(os.path.isdir(
os.path.join(self.top_dir,'PJB','report.SE_data')))
contents = os.listdir(os.path.join(self.top_dir,
'PJB',
'report.SE_data',
'Test_PJB',
'qc'))
print(contents)
expected = (
'PJB1_S1_R1_001_fastqc.html',
'PJB1_S1_R1_001_model_organisms_screen.png',
'PJB1_S1_R1_001_model_organisms_screen.txt',
'PJB1_S1_R1_001_other_organisms_screen.png',
'PJB1_S1_R1_001_other_organisms_screen.txt',
'PJB1_S1_R1_001_rRNA_screen.png',
'PJB1_S1_R1_001_rRNA_screen.txt',
'PJB2_S2_R1_001_fastqc.html',
'PJB2_S2_R1_001_model_organisms_screen.png',
'PJB2_S2_R1_001_model_organisms_screen.txt',
'PJB2_S2_R1_001_other_organisms_screen.png',
'PJB2_S2_R1_001_other_organisms_screen.txt',
'PJB2_S2_R1_001_rRNA_screen.png',
'PJB2_S2_R1_001_rRNA_screen.txt')
for f in expected:
self.assertTrue(f in contents,"%s is missing from data dir" % f)
self.assertTrue(os.path.exists(os.path.join(self.top_dir,
'PJB',
'report.SE_data',
'Test_PJB',
'multiqc_report.html')),
"Missing multiqc_report.html")
def test_report_single_end_make_zip_file(self):
"""report: single-end data: make ZIP file
"""
analysis_dir = self._make_analysis_project(paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
report((project,),filename=os.path.join(self.top_dir,
'PJB',
'report.SE.html'),
make_zip=True)
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB','report.SE.html')))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB','report.SE.PJB.zip')))
contents = zipfile.ZipFile(
os.path.join(self.top_dir,'PJB',
'report.SE.PJB.zip')).namelist()
print(contents)
expected = (
'report.SE.PJB/report.SE.html',
'report.SE.PJB/multiqc_report.html',
'report.SE.PJB/qc/PJB1_S1_R1_001_fastqc.html',
'report.SE.PJB/qc/PJB1_S1_R1_001_model_organisms_screen.png',
'report.SE.PJB/qc/PJB1_S1_R1_001_model_organisms_screen.txt',
'report.SE.PJB/qc/PJB1_S1_R1_001_other_organisms_screen.png',
'report.SE.PJB/qc/PJB1_S1_R1_001_other_organisms_screen.txt',
'report.SE.PJB/qc/PJB1_S1_R1_001_rRNA_screen.png',
'report.SE.PJB/qc/PJB1_S1_R1_001_rRNA_screen.txt',
'report.SE.PJB/qc/PJB2_S2_R1_001_fastqc.html',
'report.SE.PJB/qc/PJB2_S2_R1_001_model_organisms_screen.png',
'report.SE.PJB/qc/PJB2_S2_R1_001_model_organisms_screen.txt',
'report.SE.PJB/qc/PJB2_S2_R1_001_other_organisms_screen.png',
'report.SE.PJB/qc/PJB2_S2_R1_001_other_organisms_screen.txt',
'report.SE.PJB/qc/PJB2_S2_R1_001_rRNA_screen.png',
'report.SE.PJB/qc/PJB2_S2_R1_001_rRNA_screen.txt')
for f in expected:
self.assertTrue(f in contents,"%s is missing from ZIP file" % f)
def test_report_single_end_make_zip_file_with_data_dir(self):
"""report: single-end data: make ZIP file with data directory
"""
analysis_dir = self._make_analysis_project(paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
report((project,),filename=os.path.join(self.top_dir,
'PJB',
'report.SE.html'),
use_data_dir=True,
make_zip=True)
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB','report.SE.html')))
self.assertTrue(os.path.isdir(
os.path.join(self.top_dir,'PJB','report.SE_data')))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB','report.SE.PJB.zip')))
contents = zipfile.ZipFile(
os.path.join(self.top_dir,'PJB',
'report.SE.PJB.zip')).namelist()
print(contents)
expected = (
'report.SE.PJB/report.SE.html',
'report.SE.PJB/report.SE_data/Test_PJB/multiqc_report.html',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB1_S1_R1_001_fastqc.html',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB1_S1_R1_001_model_organisms_screen.png',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB1_S1_R1_001_model_organisms_screen.txt',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB1_S1_R1_001_other_organisms_screen.png',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB1_S1_R1_001_other_organisms_screen.txt',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB1_S1_R1_001_rRNA_screen.png',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB1_S1_R1_001_rRNA_screen.txt',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB2_S2_R1_001_fastqc.html',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB2_S2_R1_001_model_organisms_screen.png',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB2_S2_R1_001_model_organisms_screen.txt',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB2_S2_R1_001_other_organisms_screen.png',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB2_S2_R1_001_other_organisms_screen.txt',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB2_S2_R1_001_rRNA_screen.png',
'report.SE.PJB/report.SE_data/Test_PJB/qc/PJB2_S2_R1_001_rRNA_screen.txt')
for f in expected:
self.assertTrue(f in contents,"%s is missing from ZIP file" % f)
def test_report_single_end_multiple_projects_with_zip_file_no_data_dir(self):
"""report: single-end data: fails with two projects in one report (ZIP file/no data directory)
"""
analysis_dir = self._make_analysis_project(name="PJB",
sample_names=('PJB1',),
paired_end=False)
analysis_dir2 = self._make_analysis_project(name="PJB2",
sample_names=('PJB2',),
paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
project2 = AnalysisProject('PJB2',analysis_dir2)
self.assertRaises(Exception,
report,
(project,project2,),
title="QC report: PJB & PJB2",
filename=os.path.join(
self.top_dir,
'PJB',
'report.multiple_projects.html'),
make_zip=True)
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB',
'report.multiple_projects.html')))
self.assertFalse(os.path.exists(
os.path.join(self.top_dir,'PJB',
'report.multiple_projects.PJB.zip')))
def test_report_single_end_multiple_projects_with_zip_file_duplicated_names_no_data_dir(self):
"""report: single-end data: fails with two projects in one report (duplicated names/ZIP file/no data directory)
"""
analysis_dir = self._make_analysis_project(name="PJB",
paired_end=False)
analysis_dir2 = self._make_analysis_project(name="PJB2",
paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
project2 = AnalysisProject('PJB2',analysis_dir2)
self.assertRaises(Exception,
report,
(project,project2,),
title="QC report: PJB & PJB2",
filename=os.path.join(
self.top_dir,
'PJB',
'report.multiple_projects.html'),
make_zip=True)
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB',
'report.multiple_projects.html')))
self.assertFalse(os.path.exists(
os.path.join(self.top_dir,'PJB',
'report.multiple_projects.PJB.zip')))
def test_report_single_end_multiple_projects_with_zip_file_duplicated_names_with_data_dir(self):
"""report: single-end data: two projects with duplicated names in one report, with ZIP file, with data directory
"""
analysis_dir = self._make_analysis_project(name="PJB",
paired_end=False)
analysis_dir2 = self._make_analysis_project(name="PJB2",
paired_end=False)
project = AnalysisProject('PJB',analysis_dir)
project2 = AnalysisProject('PJB2',analysis_dir2)
report((project,project2,),
title="QC report: PJB & PJB2",
filename=os.path.join(self.top_dir,'PJB',
'report.multiple_projects.html'),
use_data_dir=True,
make_zip=True)
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB',
'report.multiple_projects.html')))
self.assertTrue(os.path.exists(
os.path.join(self.top_dir,'PJB',
'report.multiple_projects.PJB.zip')))
contents = zipfile.ZipFile(
os.path.join(self.top_dir,'PJB',
'report.multiple_projects.PJB.zip')).namelist()
print(contents)
expected = (
'report.multiple_projects.PJB/report.multiple_projects.html',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/multiqc_report.html',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB1_S1_R1_001_fastqc.html',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB1_S1_R1_001_model_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB1_S1_R1_001_model_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB1_S1_R1_001_other_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB1_S1_R1_001_other_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB1_S1_R1_001_rRNA_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB1_S1_R1_001_rRNA_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB2_S2_R1_001_fastqc.html',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB2_S2_R1_001_model_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB2_S2_R1_001_model_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB2_S2_R1_001_other_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB2_S2_R1_001_other_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB2_S2_R1_001_rRNA_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB/qc/PJB2_S2_R1_001_rRNA_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/multiqc_report.html',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB1_S1_R1_001_fastqc.html',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB1_S1_R1_001_model_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB1_S1_R1_001_model_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB1_S1_R1_001_other_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB1_S1_R1_001_other_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB1_S1_R1_001_rRNA_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB1_S1_R1_001_rRNA_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB2_S2_R1_001_fastqc.html',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB2_S2_R1_001_model_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB2_S2_R1_001_model_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB2_S2_R1_001_other_organisms_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB2_S2_R1_001_other_organisms_screen.txt',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB2_S2_R1_001_rRNA_screen.png',
'report.multiple_projects.PJB/report.multiple_projects_data/Test_PJB2/qc/PJB2_S2_R1_001_rRNA_screen.txt')
for f in expected:
self.assertTrue(f in contents,"%s is missing from ZIP file" % f)
class TestPrettyPrintReadsFunction(unittest.TestCase):
def test_pretty_print_reads(self):
"""pretty_print_reads: handles different inputs
"""
self.assertEqual(pretty_print_reads(1),"1")
self.assertEqual(pretty_print_reads(12),"12")
self.assertEqual(pretty_print_reads(117),"117")
self.assertEqual(pretty_print_reads(1024),"1,024")
self.assertEqual(pretty_print_reads(33385500),"33,385,500")
self.assertEqual(pretty_print_reads(112839902),"112,839,902")
self.assertEqual(pretty_print_reads(10212341927),"10,212,341,927")
| 53.150746 | 128 | 0.610991 | 4,400 | 35,611 | 4.632045 | 0.046364 | 0.024042 | 0.079878 | 0.041215 | 0.939699 | 0.917472 | 0.901575 | 0.879005 | 0.846622 | 0.832589 | 0 | 0.03316 | 0.282722 | 35,611 | 669 | 129 | 53.230194 | 0.76475 | 0.073208 | 0 | 0.676007 | 0 | 0 | 0.284342 | 0.23839 | 0 | 0 | 0 | 0 | 0.115587 | 1 | 0.071804 | false | 0.001751 | 0.02627 | 0 | 0.117338 | 0.024518 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ecae0477078e73f2c92c270cc04c7e8622892841 | 43 | py | Python | test/com/facebook/buck/features/python/testdata/src_zip/file.py | fkorotkov/buck | 4d63790ceda1028281600af9cf75153ccb92a5f5 | [
"Apache-2.0"
] | 2 | 2018-01-27T09:24:32.000Z | 2018-06-19T17:50:41.000Z | test/com/facebook/buck/features/python/testdata/src_zip/file.py | fkorotkov/buck | 4d63790ceda1028281600af9cf75153ccb92a5f5 | [
"Apache-2.0"
] | 1 | 2016-09-24T10:57:40.000Z | 2016-09-24T10:57:40.000Z | test/com/facebook/buck/features/python/testdata/src_zip/file.py | fkorotkov/buck | 4d63790ceda1028281600af9cf75153ccb92a5f5 | [
"Apache-2.0"
] | 1 | 2019-11-22T09:13:00.000Z | 2019-11-22T09:13:00.000Z | print "I'm a file. A lonely, lonely file."
| 21.5 | 42 | 0.674419 | 9 | 43 | 3.222222 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.186047 | 43 | 1 | 43 | 43 | 0.828571 | 0 | 0 | 0 | 0 | 0 | 0.790698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 1 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
01aaa123e4ad0f257637fd160dc485163132df94 | 5,950 | py | Python | tests/asset_data/test_assetDataRequest/test_request_data_download.py | alv2017/Python---YahooFinanceDataLoader | 407076c6262d2935b5331aceaaa02d5a9146183d | [
"MIT"
] | null | null | null | tests/asset_data/test_assetDataRequest/test_request_data_download.py | alv2017/Python---YahooFinanceDataLoader | 407076c6262d2935b5331aceaaa02d5a9146183d | [
"MIT"
] | null | null | null | tests/asset_data/test_assetDataRequest/test_request_data_download.py | alv2017/Python---YahooFinanceDataLoader | 407076c6262d2935b5331aceaaa02d5a9146183d | [
"MIT"
] | null | null | null | import unittest
import requests
from unittest.mock import Mock, patch
from YahooFinanceDataLoader.asset_data.assetDataRequest import AssetDataRequest
class TestClass_AssetDataRequest_request_data_download(unittest.TestCase):
def setUp(self):
self.symbol = 'MSFT'
self.sdate = '2018-01-01'
self.edate = '2018-01-31'
self.interval = '1d'
@patch.object(AssetDataRequest, 'request_download_permission')
def test_return_value_on_download_permission_error_1(self, request_download_permission):
"""Description: Response error on request_download_permission response['error']=1
"""
# mocking a response from request_download_permission
permission_response = {
"error": 1
}
request_download_permission.return_value = permission_response
expected_response_error = -permission_response['error']
# action
asset_data_request = AssetDataRequest(self.symbol, self.sdate,
self.edate, self.interval)
resp = asset_data_request.request_data_download()
# assertion
self.assertEqual(resp["error"], expected_response_error,
"The response error should be equal to {0}".format(expected_response_error))
@patch.object(AssetDataRequest, 'request_download_permission')
def test_return_value_on_download_permission_error_2(self,
request_download_permission):
"""Description: Response error when request_download_permission response['error']=2
"""
# mocking a response from requests_download_permission
permission_response = {
"error": 2
}
request_download_permission.return_value = permission_response
expected_response_error = -permission_response['error']
# action
asset_data_request = AssetDataRequest(self.symbol, self.sdate,
self.edate, self.interval)
resp = asset_data_request.request_data_download()
# assertion
self.assertEqual(resp["error"], expected_response_error,
"The response error should be equal to {0}".format(expected_response_error))
@patch.object(AssetDataRequest, 'request_download_permission')
@patch.object(requests, 'get', side_effect=requests.exceptions.ConnectionError)
def test_return_value_on_connection_error(self, requests_get, request_download_permission):
""" Description: Response error on ConnectionError
"""
expected_response_error = 1
# mocking a response from requests_download_permission
permission_response = {
"cookies": "cookies_placeholder",
"crumb": "crumb_placeholder",
"status_code": 200,
"error": 0
}
request_download_permission.return_value = permission_response
# action
asset_data_request = AssetDataRequest(self.symbol, self.sdate,
self.edate, self.interval)
resp = asset_data_request.request_data_download()
# assertion
self.assertEqual(resp["error"], expected_response_error,
"The response error should be equal to {0}".format(expected_response_error))
@patch.object(AssetDataRequest, 'request_download_permission')
@patch.object(requests, 'get', side_effect=requests.exceptions.Timeout)
def test_return_value_on_timeout_error(self, requests_get, request_download_permission):
"""Description: Response error on Timeout
"""
expected_response_error = 1
# mocking a response from requests_download_permission
permission_response = {
"cookies": "cookies_placeholder",
"crumb": "crumb_placeholder",
"status_code": 200,
"error": 0
}
request_download_permission.return_value = permission_response
# action
asset_data_request = AssetDataRequest(self.symbol, self.sdate,
self.edate, self.interval)
resp = asset_data_request.request_data_download()
# assertion
self.assertEqual(resp["error"], expected_response_error,
"The response error should be equal to {0}".format(expected_response_error))
@patch.object(AssetDataRequest, 'request_download_permission')
@patch.object(requests, 'get')
def test_return_value_on_http_error(self, mock_requests_get, request_download_permission):
"""Description: Response error on HTTPError, i.e. response status code is not equal to 200
"""
status_code = 404
expected_response_error = 2
# mocking response from requests_download_permission
permission_response = {
"cookies": "cookies_placeholder",
"crumb": "crumb_placeholder",
"status_code": 200,
"error": 0
}
request_download_permission.return_value = permission_response
# mocking response from requests
response = Mock()
response.status_code = status_code
response.raise_for_status.side_effect = requests.exceptions.HTTPError
mock_requests_get.return_value = response
# action
asset_data_request = AssetDataRequest(self.symbol, self.sdate,
self.edate, self.interval)
resp = asset_data_request.request_data_download()
# assertion
self.assertEqual(resp["error"], expected_response_error,
"The response error should be equal to {0}".format(expected_response_error))
| 44.074074 | 98 | 0.633277 | 576 | 5,950 | 6.230903 | 0.130208 | 0.112288 | 0.125383 | 0.047367 | 0.831987 | 0.784898 | 0.784898 | 0.745333 | 0.745333 | 0.710226 | 0 | 0.011622 | 0.291429 | 5,950 | 135 | 99 | 44.074074 | 0.839658 | 0.128403 | 0 | 0.636364 | 0 | 0 | 0.11902 | 0.026254 | 0 | 0 | 0 | 0 | 0.056818 | 1 | 0.068182 | false | 0 | 0.045455 | 0 | 0.125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
01bf320a05cdd644b7d4cf988774f4603a1b4586 | 45 | py | Python | tests/test.py | MikaYlitalo/gamefav-bot | d167a50e3798b1cfaaf8fb9521b276f61de394c9 | [
"MIT"
] | null | null | null | tests/test.py | MikaYlitalo/gamefav-bot | d167a50e3798b1cfaaf8fb9521b276f61de394c9 | [
"MIT"
] | null | null | null | tests/test.py | MikaYlitalo/gamefav-bot | d167a50e3798b1cfaaf8fb9521b276f61de394c9 | [
"MIT"
] | null | null | null | print('Skipping test - not yet implemented')
| 22.5 | 44 | 0.755556 | 6 | 45 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 45 | 1 | 45 | 45 | 0.871795 | 0 | 0 | 0 | 0 | 0 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
17340903d1e60890fe6aa9c161339a6d44111fb3 | 159 | py | Python | python/8kyu/filling_an_array.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 3 | 2021-06-08T01:57:13.000Z | 2021-06-26T10:52:47.000Z | python/8kyu/filling_an_array.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | null | null | null | python/8kyu/filling_an_array.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 2 | 2021-06-10T21:20:13.000Z | 2021-06-30T10:13:26.000Z | """Kata url: https://www.codewars.com/kata/571d42206414b103dc0006a1."""
from typing import List
def arr(n: int = 0) -> List[int]:
return list(range(n))
| 19.875 | 71 | 0.679245 | 23 | 159 | 4.695652 | 0.782609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 0.144654 | 159 | 7 | 72 | 22.714286 | 0.647059 | 0.408805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
176c18bc0a89084e5dbedf3b6b6f6d518e92427a | 22 | py | Python | main.py | hotspoons/robot-remote | 9ec0a81d6a37198e975f999f9f563e1ebae72e5f | [
"MIT"
] | null | null | null | main.py | hotspoons/robot-remote | 9ec0a81d6a37198e975f999f9f563e1ebae72e5f | [
"MIT"
] | null | null | null | main.py | hotspoons/robot-remote | 9ec0a81d6a37198e975f999f9f563e1ebae72e5f | [
"MIT"
] | 1 | 2021-03-25T14:54:25.000Z | 2021-03-25T14:54:25.000Z | from control import *
| 11 | 21 | 0.772727 | 3 | 22 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 22 | 1 | 22 | 22 | 0.944444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
179a3e32631795a5b473549380e5a72ae0c30f9b | 95 | py | Python | perception/utils.py | fireattack/perception | 99057309293c32144448e52068665315aacd9561 | [
"Apache-2.0"
] | 123 | 2019-11-04T19:29:46.000Z | 2022-03-18T13:49:12.000Z | perception/utils.py | fireattack/perception | 99057309293c32144448e52068665315aacd9561 | [
"Apache-2.0"
] | 13 | 2019-11-05T06:51:46.000Z | 2022-02-22T04:09:58.000Z | perception/utils.py | fireattack/perception | 99057309293c32144448e52068665315aacd9561 | [
"Apache-2.0"
] | 11 | 2019-11-05T17:47:16.000Z | 2022-01-25T15:27:31.000Z | def flatten(list_of_lists):
return [item for sublist in list_of_lists for item in sublist]
| 31.666667 | 66 | 0.778947 | 17 | 95 | 4.117647 | 0.588235 | 0.171429 | 0.314286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.168421 | 95 | 2 | 67 | 47.5 | 0.886076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
17a184f6a83f8b2be18457541cfa02c06979c4b9 | 178 | py | Python | examples/en/api/blueprints.py | yulix/restful-api-contract | fe1a9364f295b79dd668d3a82f9ff2c7ff1b6618 | [
"MIT"
] | null | null | null | examples/en/api/blueprints.py | yulix/restful-api-contract | fe1a9364f295b79dd668d3a82f9ff2c7ff1b6618 | [
"MIT"
] | null | null | null | examples/en/api/blueprints.py | yulix/restful-api-contract | fe1a9364f295b79dd668d3a82f9ff2c7ff1b6618 | [
"MIT"
] | null | null | null | from .. import app
from .groupA import groupa_api
from .groupB import groupb_api
# Register API buleprint
app.register_blueprint(groupa_api)
app.register_blueprint(groupb_api)
| 19.777778 | 34 | 0.825843 | 26 | 178 | 5.423077 | 0.346154 | 0.12766 | 0.283688 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11236 | 178 | 8 | 35 | 22.25 | 0.892405 | 0.123596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.6 | 0 | 0.6 | 0.4 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
bd6c0644515e501eba39e66437acf8743792462a | 24 | py | Python | pshelf/__init__.py | transhapHigsn/pshelf | 0e7c334d98fa006a15ae3d197bb0cb5be168e4c2 | [
"MIT"
] | null | null | null | pshelf/__init__.py | transhapHigsn/pshelf | 0e7c334d98fa006a15ae3d197bb0cb5be168e4c2 | [
"MIT"
] | null | null | null | pshelf/__init__.py | transhapHigsn/pshelf | 0e7c334d98fa006a15ae3d197bb0cb5be168e4c2 | [
"MIT"
] | null | null | null | from .shell import shelf | 24 | 24 | 0.833333 | 4 | 24 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 24 | 1 | 24 | 24 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
bd6cd36ed1ef399ac524a808a37ada5b141b1af9 | 104 | py | Python | own_practice/one_six.py | Ellis0817/Introduction-to-Programming-Using-Python | 1882a2a846162d5ff56d4d56c3940b638ef408bd | [
"MIT"
] | null | null | null | own_practice/one_six.py | Ellis0817/Introduction-to-Programming-Using-Python | 1882a2a846162d5ff56d4d56c3940b638ef408bd | [
"MIT"
] | 4 | 2019-11-07T12:32:19.000Z | 2020-07-19T14:04:44.000Z | own_practice/one_six.py | Ellis0817/Introduction-to-Programming-Using-Python | 1882a2a846162d5ff56d4d56c3940b638ef408bd | [
"MIT"
] | 5 | 2019-12-04T15:56:55.000Z | 2022-01-14T06:19:18.000Z | """
程式設計練習題 1-6 1-6 數列相加.
請撰寫一程式,顯示 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9的計算結果
"""
print((1 + 9) * 9 / 2)
| 13 | 48 | 0.442308 | 22 | 104 | 2.090909 | 0.681818 | 0.086957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.239437 | 0.317308 | 104 | 7 | 49 | 14.857143 | 0.408451 | 0.682692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
bd8f79e5aae43446818e131c4eaa36fe8d55fb90 | 5,045 | py | Python | resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtGui/QMenu.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | 1 | 2020-04-20T02:27:20.000Z | 2020-04-20T02:27:20.000Z | resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QMenu.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QMenu.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | # encoding: utf-8
# module PySide.QtGui
# from C:\Python27\lib\site-packages\PySide\QtGui.pyd
# by generator 1.147
# no doc
# imports
import PySide.QtCore as __PySide_QtCore
import Shiboken as __Shiboken
from QWidget import QWidget
class QMenu(QWidget):
# no doc
def aboutToHide(self, *args, **kwargs): # real signature unknown
""" Signal """
pass
def aboutToShow(self, *args, **kwargs): # real signature unknown
""" Signal """
pass
def actionAt(self, *args, **kwargs): # real signature unknown
pass
def actionEvent(self, *args, **kwargs): # real signature unknown
pass
def actionGeometry(self, *args, **kwargs): # real signature unknown
pass
def activated(self, *args, **kwargs): # real signature unknown
""" Signal """
pass
def activeAction(self, *args, **kwargs): # real signature unknown
pass
def addAction(self, *args, **kwargs): # real signature unknown
pass
def addMenu(self, *args, **kwargs): # real signature unknown
pass
def addSeparator(self, *args, **kwargs): # real signature unknown
pass
def changeEvent(self, *args, **kwargs): # real signature unknown
pass
def clear(self, *args, **kwargs): # real signature unknown
pass
def columnCount(self, *args, **kwargs): # real signature unknown
pass
def defaultAction(self, *args, **kwargs): # real signature unknown
pass
def enterEvent(self, *args, **kwargs): # real signature unknown
pass
def event(self, *args, **kwargs): # real signature unknown
pass
def exec_(self, *args, **kwargs): # real signature unknown
pass
def focusNextPrevChild(self, *args, **kwargs): # real signature unknown
pass
def hideEvent(self, *args, **kwargs): # real signature unknown
pass
def hideTearOffMenu(self, *args, **kwargs): # real signature unknown
pass
def highlighted(self, *args, **kwargs): # real signature unknown
""" Signal """
pass
def hovered(self, *args, **kwargs): # real signature unknown
""" Signal """
pass
def icon(self, *args, **kwargs): # real signature unknown
pass
def initStyleOption(self, *args, **kwargs): # real signature unknown
pass
def insertMenu(self, *args, **kwargs): # real signature unknown
pass
def insertSeparator(self, *args, **kwargs): # real signature unknown
pass
def isEmpty(self, *args, **kwargs): # real signature unknown
pass
def isTearOffEnabled(self, *args, **kwargs): # real signature unknown
pass
def isTearOffMenuVisible(self, *args, **kwargs): # real signature unknown
pass
def keyPressEvent(self, *args, **kwargs): # real signature unknown
pass
def leaveEvent(self, *args, **kwargs): # real signature unknown
pass
def menuAction(self, *args, **kwargs): # real signature unknown
pass
def mouseMoveEvent(self, *args, **kwargs): # real signature unknown
pass
def mousePressEvent(self, *args, **kwargs): # real signature unknown
pass
def mouseReleaseEvent(self, *args, **kwargs): # real signature unknown
pass
def paintEvent(self, *args, **kwargs): # real signature unknown
pass
def popup(self, *args, **kwargs): # real signature unknown
pass
def separatorsCollapsible(self, *args, **kwargs): # real signature unknown
pass
def setActiveAction(self, *args, **kwargs): # real signature unknown
pass
def setDefaultAction(self, *args, **kwargs): # real signature unknown
pass
def setIcon(self, *args, **kwargs): # real signature unknown
pass
def setSeparatorsCollapsible(self, *args, **kwargs): # real signature unknown
pass
def setTearOffEnabled(self, *args, **kwargs): # real signature unknown
pass
def setTitle(self, *args, **kwargs): # real signature unknown
pass
def sizeHint(self, *args, **kwargs): # real signature unknown
pass
def timerEvent(self, *args, **kwargs): # real signature unknown
pass
def title(self, *args, **kwargs): # real signature unknown
pass
def triggered(self, *args, **kwargs): # real signature unknown
""" Signal """
pass
def wheelEvent(self, *args, **kwargs): # real signature unknown
pass
def __getattribute__(self, name): # real signature unknown; restored from __doc__
""" x.__getattribute__('name') <==> x.name """
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
@staticmethod # known case of __new__
def __new__(S, *more): # real signature unknown; restored from __doc__
""" T.__new__(S, ...) -> a new object with type S, a subtype of T """
pass
staticMetaObject = None # (!) real value is '<PySide.QtCore.QMetaObject object at 0x0000000003FC4C08>'
| 27.418478 | 106 | 0.625768 | 553 | 5,045 | 5.640145 | 0.198915 | 0.216736 | 0.33344 | 0.288554 | 0.690285 | 0.690285 | 0.667842 | 0.655659 | 0.090414 | 0 | 0 | 0.005639 | 0.261843 | 5,045 | 183 | 107 | 27.568306 | 0.831901 | 0.321308 | 0 | 0.472727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.472727 | false | 0.472727 | 0.027273 | 0 | 0.518182 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 6 |
bdaf4388beceb5b2bdda1360a2224c991f7d12b4 | 112 | py | Python | src/pyensae/cli/__init__.py | mohamedelkansouli/Ensae_py2 | e54a05f90c6aa6e2a5065eac9f9ec10aca64b46a | [
"MIT"
] | 28 | 2015-07-19T21:20:51.000Z | 2022-02-16T11:50:53.000Z | src/pyensae/cli/__init__.py | mohamedelkansouli/Ensae_py2 | e54a05f90c6aa6e2a5065eac9f9ec10aca64b46a | [
"MIT"
] | 34 | 2015-06-16T15:38:25.000Z | 2021-12-29T11:04:01.000Z | src/pyensae/cli/__init__.py | mohamedelkansouli/Ensae_py2 | e54a05f90c6aa6e2a5065eac9f9ec10aca64b46a | [
"MIT"
] | 27 | 2015-01-13T08:24:22.000Z | 2022-03-31T14:51:23.000Z | """
@file
@brief Shortcuts to cli.
"""
from .head_cli import file_head_cli
from .tail_cli import file_tail_cli
| 14 | 35 | 0.758929 | 19 | 112 | 4.157895 | 0.473684 | 0.177215 | 0.329114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 112 | 7 | 36 | 16 | 0.822917 | 0.267857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
bdcca2e5237fe7810086980d5fdd72376614047b | 41 | py | Python | lang/Python/topic-variable.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/topic-variable.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/topic-variable.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | 3
3
_*_, _**0.5
(9, 1.7320508075688772)
| 6.833333 | 23 | 0.609756 | 7 | 41 | 3.142857 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.647059 | 0.170732 | 41 | 5 | 24 | 8.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
da4efd62ea361a691d042e50020114971454b0aa | 8,301 | py | Python | tests/str/test_str_len_declaration.py | nikitanovosibirsk/district42 | 0c13248919fc96bde16b9634a8ea468e4882752a | [
"Apache-2.0"
] | 1 | 2016-09-16T04:09:19.000Z | 2016-09-16T04:09:19.000Z | tests/str/test_str_len_declaration.py | nikitanovosibirsk/district42 | 0c13248919fc96bde16b9634a8ea468e4882752a | [
"Apache-2.0"
] | 2 | 2021-06-14T05:53:49.000Z | 2022-02-01T14:26:31.000Z | tests/str/test_str_len_declaration.py | nikitanovosibirsk/district42 | 0c13248919fc96bde16b9634a8ea468e4882752a | [
"Apache-2.0"
] | null | null | null | import pytest
from baby_steps import given, then, when
from pytest import raises
from district42 import schema
from district42.errors import DeclarationError
def test_str_len_declaration():
with given:
length = 10
with when:
sch = schema.str.len(length)
with then:
assert sch.props.len == length
def test_str_len_with_value_declaration():
with given:
value = "banana"
length = 6
with when:
sch = schema.str(value).len(length)
with then:
assert sch.props.value == value
assert sch.props.len == length
def test_str_len_with_value_declaration_error():
with when, raises(Exception) as exception:
schema.str("banana").len(7)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str('banana')` len must be equal to 6, 7 given"
def test_str_invalid_length_type_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(None)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == ("`schema.str` value must be an instance of 'int', "
"instance of 'NoneType' None given")
def test_str_len_already_declared_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(7).len(7)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(7)` is already declared"
def test_str_len_already_declared_min_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(1, ...).len(7)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(1, ...)` is already declared"
def test_str_len_already_declared_max_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(..., 7).len(7)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(..., 7)` is already declared"
def test_str_len_already_declared_min_max_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(1, 7).len(7)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(1, 7)` is already declared"
def test_str_value_already_declared_min_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(7, ...)("banana!")
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(7, ...)` is already declared"
def test_str_value_already_declared_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(7)("banana!")
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(7)` is already declared"
def test_str_min_len_declaration():
with given:
min_length = 10
with when:
sch = schema.str.len(min_length, ...)
with then:
assert sch.props.min_len == min_length
@pytest.mark.parametrize("min_length", [6, 5])
def test_str_min_len_with_value_declaration(min_length):
with given:
value = "banana"
with when:
sch = schema.str(value).len(min_length, ...)
with then:
assert sch.props.value == value
assert sch.props.min_len == min_length
def test_str_min_len_with_value_declaration_error():
with given:
value = "banana"
min_length = 7
with when, raises(Exception) as exception:
schema.str(value).len(min_length, ...)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == ("`schema.str('banana')` min len must be less than or "
"equal to 6, 7 given")
def test_str_invalid_min_length_type_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(None, ...)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == ("`schema.str` value must be an instance of 'int', "
"instance of 'NoneType' None given")
def test_str_min_len_already_declared_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(7).len(1, ...)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(7)` is already declared"
def test_str_max_len_declaration():
with given:
max_length = 10
with when:
sch = schema.str.len(..., max_length)
with then:
assert sch.props.max_len == max_length
@pytest.mark.parametrize("max_length", [6, 7])
def test_str_max_len_with_value_declaration(max_length: int):
with given:
value = "banana"
with when:
sch = schema.str(value).len(..., max_length)
with then:
assert sch.props.value == value
assert sch.props.max_len == max_length
def test_str_max_len_with_value_declaration_error():
with given:
value = "banana"
max_length = 5
with when, raises(Exception) as exception:
schema.str(value).len(..., max_length)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == ("`schema.str('banana')` max len must be greater than or "
"equal to 6, 5 given")
def test_str_invalid_max_length_type_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(..., None)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == ("`schema.str` value must be an instance of 'int', "
"instance of 'NoneType' None given")
def test_str_max_len_already_declared_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(7).len(..., 7)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(7)` is already declared"
def test_str_value_already_declared_max_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(..., 7)("banana!")
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(..., 7)` is already declared"
def test_str_min_max_len_declaration():
with given:
min_length, max_length = 1, 10
with when:
sch = schema.str.len(min_length, max_length)
with then:
assert sch.props.min_len == min_length
assert sch.props.max_len == max_length
def test_str_invalid_min_length_type_with_max_length_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(None, 1)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == ("`schema.str` value must be an instance of 'int', "
"instance of 'NoneType' None given")
def test_str_invalid_max_length_type_with_min_length_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(1, None)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == ("`schema.str` value must be an instance of 'int', "
"instance of 'NoneType' None given")
def test_str_min_max_len_already_declared_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(7).len(1, 7)
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(7)` is already declared"
def test_str_value_already_declared_min_max_len_declaration_error():
with when, raises(Exception) as exception:
schema.str.len(1, 7)("banana!")
with then:
assert exception.type is DeclarationError
assert str(exception.value) == "`schema.str.len(1, 7)` is already declared"
| 29.967509 | 97 | 0.657391 | 1,082 | 8,301 | 4.84658 | 0.051756 | 0.077231 | 0.070938 | 0.083333 | 0.928108 | 0.919336 | 0.907704 | 0.889016 | 0.844775 | 0.794813 | 0 | 0.009995 | 0.240694 | 8,301 | 276 | 98 | 30.076087 | 0.82199 | 0 | 0 | 0.611702 | 0 | 0 | 0.138297 | 0.007951 | 0 | 0 | 0 | 0 | 0.260638 | 1 | 0.138298 | false | 0 | 0.026596 | 0 | 0.164894 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
da5f57d6085ecfcb9b7249a22af17f8b97dcd5da | 161 | py | Python | src/utils/compilation/__init__.py | CheckPointSW/Scour | 2f9391da45803b44181f7973e4e7c93bc2208252 | [
"MIT"
] | 152 | 2018-08-13T05:48:59.000Z | 2022-03-30T15:18:44.000Z | src/utils/compilation/__init__.py | CheckPointSW/Scour | 2f9391da45803b44181f7973e4e7c93bc2208252 | [
"MIT"
] | 7 | 2019-08-29T15:24:41.000Z | 2021-05-04T06:38:49.000Z | src/utils/compilation/__init__.py | CheckPointSW/Scour | 2f9391da45803b44181f7973e4e7c93bc2208252 | [
"MIT"
] | 21 | 2018-08-13T19:11:29.000Z | 2022-02-28T15:25:47.000Z | from .scout_files import *
from .scout_flags import *
from .target_arc import *
from .arc_intel import *
from .arc_arm import *
from .arc_mips import * | 26.833333 | 26 | 0.720497 | 24 | 161 | 4.583333 | 0.416667 | 0.454545 | 0.354545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.204969 | 161 | 6 | 27 | 26.833333 | 0.859375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
da64eb56767d9aec5c588a38fd0a4a67f866e5d1 | 43 | py | Python | libml/eval.py | yanzhicong/mixmatch | 4903dcc10ce73f3afc9c9c1b1392cc6def7f83bc | [
"Apache-2.0"
] | null | null | null | libml/eval.py | yanzhicong/mixmatch | 4903dcc10ce73f3afc9c9c1b1392cc6def7f83bc | [
"Apache-2.0"
] | null | null | null | libml/eval.py | yanzhicong/mixmatch | 4903dcc10ce73f3afc9c9c1b1392cc6def7f83bc | [
"Apache-2.0"
] | null | null | null | import os
import sys
import numpy as np
| 6.142857 | 18 | 0.744186 | 8 | 43 | 4 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.255814 | 43 | 6 | 19 | 7.166667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
da69046b991e6fc50a4539acbbd83cb7ff097266 | 579 | py | Python | build/lib.linux-x86_64-2.7/biograder/KeyGenerator.py | PayneLab/GenericDataAPI | 9469328c4f845fbf8d97b5d80ad2077c9f927022 | [
"MIT"
] | 2 | 2021-04-25T18:36:29.000Z | 2021-05-14T15:34:59.000Z | build/lib.linux-x86_64-2.7/biograder/KeyGenerator.py | PayneLab/GenericDataAPI | 9469328c4f845fbf8d97b5d80ad2077c9f927022 | [
"MIT"
] | null | null | null | build/lib.linux-x86_64-2.7/biograder/KeyGenerator.py | PayneLab/GenericDataAPI | 9469328c4f845fbf8d97b5d80ad2077c9f927022 | [
"MIT"
] | 2 | 2020-11-23T02:09:57.000Z | 2021-08-13T21:57:03.000Z | from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
class KeyGenerator:
def __init__(self):
pass
def generate(self):
private_key = rsa.generate_private_key(
public_exponent=65537,
key_size=2048,
backend=default_backend()
)
return private_key
| 25.173913 | 62 | 0.704663 | 60 | 579 | 6.6 | 0.466667 | 0.20202 | 0.277778 | 0.323232 | 0.434343 | 0.242424 | 0 | 0 | 0 | 0 | 0 | 0.020548 | 0.243523 | 579 | 22 | 63 | 26.318182 | 0.883562 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0.066667 | 0.333333 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
da88232f330a1394da1f89ed752fc9a1f4fddd29 | 260,272 | py | Python | instances/passenger_demand/pas-20210422-1717-int18e/90.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210422-1717-int18e/90.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210422-1717-int18e/90.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 34597
passenger_arriving = (
(9, 4, 6, 7, 12, 3, 2, 3, 4, 1, 1, 2, 0, 11, 5, 3, 7, 2, 8, 5, 2, 3, 1, 2, 2, 0), # 0
(7, 7, 5, 12, 7, 0, 6, 7, 2, 0, 4, 1, 0, 5, 9, 5, 1, 8, 2, 3, 1, 4, 7, 4, 0, 0), # 1
(9, 22, 9, 10, 9, 3, 2, 4, 8, 3, 1, 2, 0, 7, 11, 6, 8, 14, 4, 6, 6, 5, 3, 4, 1, 0), # 2
(13, 14, 9, 11, 11, 5, 6, 4, 4, 3, 0, 0, 0, 13, 9, 6, 4, 12, 9, 3, 4, 3, 3, 0, 0, 0), # 3
(7, 7, 14, 13, 6, 6, 1, 4, 4, 1, 2, 1, 0, 7, 11, 11, 9, 11, 8, 3, 2, 4, 3, 2, 1, 0), # 4
(10, 14, 8, 7, 7, 10, 3, 5, 1, 1, 2, 1, 0, 8, 11, 12, 9, 9, 6, 5, 7, 3, 5, 1, 2, 0), # 5
(13, 8, 12, 10, 11, 4, 1, 1, 8, 3, 2, 1, 0, 15, 4, 11, 6, 2, 10, 6, 4, 2, 7, 1, 1, 0), # 6
(10, 15, 12, 17, 13, 7, 2, 6, 4, 2, 5, 1, 0, 18, 11, 10, 3, 15, 8, 2, 3, 8, 3, 4, 1, 0), # 7
(8, 15, 14, 15, 12, 4, 10, 4, 8, 3, 4, 1, 0, 15, 5, 6, 5, 10, 6, 10, 2, 4, 3, 1, 0, 0), # 8
(16, 16, 6, 10, 14, 7, 8, 5, 4, 2, 3, 3, 0, 15, 18, 9, 5, 14, 13, 7, 4, 7, 4, 2, 1, 0), # 9
(10, 19, 12, 20, 8, 6, 10, 4, 6, 3, 2, 0, 0, 7, 14, 11, 9, 13, 9, 6, 3, 7, 3, 0, 2, 0), # 10
(11, 16, 13, 18, 10, 7, 5, 4, 4, 2, 3, 3, 0, 21, 14, 13, 6, 10, 5, 4, 6, 5, 6, 6, 0, 0), # 11
(17, 10, 23, 21, 17, 2, 5, 7, 2, 6, 1, 1, 0, 25, 14, 13, 9, 13, 6, 6, 3, 8, 5, 2, 1, 0), # 12
(18, 19, 13, 20, 13, 13, 6, 7, 8, 3, 3, 1, 0, 14, 7, 11, 11, 14, 12, 10, 4, 5, 8, 1, 2, 0), # 13
(14, 14, 17, 20, 16, 7, 6, 9, 10, 1, 4, 0, 0, 14, 15, 11, 15, 7, 9, 8, 0, 6, 5, 2, 0, 0), # 14
(14, 16, 18, 11, 7, 7, 9, 7, 12, 3, 2, 0, 0, 14, 9, 16, 5, 8, 6, 9, 5, 4, 6, 3, 0, 0), # 15
(13, 28, 15, 13, 19, 6, 9, 7, 6, 8, 5, 1, 0, 19, 12, 19, 13, 11, 5, 6, 3, 10, 5, 1, 1, 0), # 16
(20, 14, 24, 16, 14, 3, 6, 5, 4, 3, 1, 0, 0, 14, 10, 13, 7, 17, 10, 7, 5, 3, 8, 5, 4, 0), # 17
(19, 9, 18, 17, 24, 4, 2, 5, 9, 1, 1, 2, 0, 29, 17, 15, 13, 14, 7, 9, 2, 5, 8, 1, 1, 0), # 18
(26, 22, 5, 14, 15, 3, 3, 5, 4, 2, 1, 1, 0, 17, 27, 9, 8, 21, 6, 7, 4, 8, 8, 4, 4, 0), # 19
(16, 12, 13, 16, 14, 6, 16, 4, 8, 0, 0, 1, 0, 15, 25, 9, 12, 15, 10, 13, 5, 9, 3, 3, 2, 0), # 20
(19, 14, 18, 27, 17, 11, 6, 12, 5, 4, 2, 1, 0, 17, 14, 11, 9, 14, 12, 9, 5, 6, 9, 1, 4, 0), # 21
(24, 18, 14, 16, 13, 5, 6, 7, 6, 2, 3, 1, 0, 17, 14, 16, 12, 18, 9, 6, 4, 5, 4, 4, 3, 0), # 22
(18, 15, 12, 22, 10, 4, 5, 7, 5, 4, 2, 0, 0, 16, 16, 14, 10, 14, 12, 7, 7, 4, 10, 1, 1, 0), # 23
(20, 19, 19, 14, 22, 9, 5, 10, 8, 0, 1, 3, 0, 21, 19, 23, 12, 13, 14, 5, 4, 3, 5, 1, 0, 0), # 24
(18, 21, 13, 15, 9, 12, 9, 7, 3, 6, 1, 1, 0, 20, 16, 8, 15, 13, 7, 4, 1, 8, 4, 6, 2, 0), # 25
(14, 12, 21, 17, 18, 9, 10, 2, 4, 4, 3, 1, 0, 26, 12, 12, 7, 19, 9, 8, 3, 5, 6, 4, 2, 0), # 26
(21, 16, 13, 22, 10, 4, 6, 6, 12, 1, 3, 1, 0, 20, 20, 6, 14, 10, 9, 5, 4, 9, 6, 3, 2, 0), # 27
(16, 18, 19, 20, 16, 8, 4, 5, 4, 3, 1, 1, 0, 18, 20, 5, 12, 20, 7, 5, 5, 10, 4, 1, 0, 0), # 28
(25, 18, 18, 16, 14, 4, 11, 11, 7, 3, 3, 1, 0, 29, 19, 11, 9, 21, 11, 14, 5, 3, 3, 2, 2, 0), # 29
(23, 15, 18, 18, 9, 6, 9, 5, 5, 6, 4, 0, 0, 16, 18, 7, 13, 15, 16, 6, 4, 10, 8, 5, 0, 0), # 30
(17, 19, 15, 10, 9, 6, 7, 12, 6, 2, 5, 3, 0, 26, 11, 12, 11, 15, 11, 9, 3, 6, 3, 4, 1, 0), # 31
(20, 18, 15, 14, 8, 10, 8, 9, 7, 3, 3, 0, 0, 25, 19, 14, 11, 13, 10, 5, 5, 6, 7, 2, 0, 0), # 32
(24, 17, 10, 16, 17, 6, 9, 8, 8, 2, 2, 0, 0, 13, 16, 13, 10, 18, 10, 9, 9, 4, 5, 3, 2, 0), # 33
(23, 21, 14, 13, 11, 6, 9, 10, 7, 7, 2, 0, 0, 14, 11, 13, 11, 15, 9, 8, 6, 3, 6, 8, 2, 0), # 34
(24, 15, 15, 16, 11, 5, 5, 4, 8, 3, 1, 0, 0, 27, 18, 15, 10, 15, 14, 5, 2, 10, 2, 3, 2, 0), # 35
(22, 21, 17, 17, 16, 15, 7, 5, 7, 3, 3, 1, 0, 22, 14, 16, 12, 21, 8, 6, 2, 2, 8, 1, 1, 0), # 36
(24, 19, 13, 11, 14, 9, 8, 11, 4, 4, 3, 1, 0, 17, 18, 7, 15, 17, 8, 5, 7, 3, 2, 2, 2, 0), # 37
(20, 25, 13, 20, 14, 10, 8, 1, 3, 2, 3, 1, 0, 14, 15, 13, 11, 15, 9, 8, 5, 6, 3, 2, 0, 0), # 38
(9, 22, 15, 17, 16, 3, 7, 5, 7, 5, 2, 1, 0, 18, 15, 16, 7, 11, 15, 6, 5, 7, 2, 6, 2, 0), # 39
(20, 16, 10, 19, 9, 5, 8, 6, 9, 4, 4, 1, 0, 19, 19, 14, 5, 15, 10, 6, 8, 3, 5, 0, 0, 0), # 40
(21, 18, 17, 14, 11, 8, 7, 11, 9, 5, 2, 1, 0, 19, 16, 12, 9, 13, 12, 8, 6, 4, 4, 4, 0, 0), # 41
(18, 20, 16, 18, 9, 4, 6, 5, 6, 5, 5, 2, 0, 5, 21, 7, 15, 24, 5, 5, 9, 7, 9, 3, 1, 0), # 42
(18, 19, 15, 24, 17, 6, 8, 7, 9, 5, 5, 1, 0, 15, 16, 15, 6, 13, 9, 10, 7, 10, 8, 5, 2, 0), # 43
(18, 14, 13, 17, 14, 1, 6, 3, 7, 2, 4, 2, 0, 18, 12, 11, 9, 16, 10, 11, 3, 7, 5, 5, 1, 0), # 44
(18, 17, 15, 21, 14, 10, 8, 4, 5, 6, 3, 1, 0, 18, 24, 12, 9, 18, 13, 10, 3, 8, 4, 2, 0, 0), # 45
(13, 23, 19, 10, 19, 2, 13, 4, 3, 3, 0, 0, 0, 15, 20, 16, 7, 13, 11, 8, 5, 8, 8, 0, 0, 0), # 46
(11, 15, 13, 16, 13, 9, 10, 6, 7, 3, 3, 2, 0, 18, 11, 16, 18, 10, 8, 6, 8, 7, 3, 2, 2, 0), # 47
(22, 23, 14, 17, 12, 8, 6, 13, 8, 3, 1, 2, 0, 21, 22, 13, 8, 12, 8, 9, 3, 8, 2, 6, 2, 0), # 48
(18, 20, 14, 20, 10, 14, 9, 8, 11, 3, 3, 0, 0, 17, 15, 14, 14, 15, 8, 6, 4, 11, 9, 2, 0, 0), # 49
(13, 20, 20, 19, 15, 3, 7, 8, 13, 2, 6, 2, 0, 18, 16, 9, 7, 9, 6, 5, 6, 8, 2, 7, 0, 0), # 50
(19, 16, 16, 11, 13, 6, 6, 7, 11, 6, 2, 3, 0, 19, 22, 10, 11, 17, 8, 4, 4, 6, 10, 3, 0, 0), # 51
(14, 20, 10, 17, 11, 6, 6, 5, 11, 1, 1, 1, 0, 26, 16, 8, 6, 21, 11, 0, 5, 4, 6, 2, 0, 0), # 52
(24, 19, 18, 17, 6, 5, 4, 12, 10, 4, 4, 2, 0, 20, 15, 8, 15, 19, 9, 11, 3, 4, 6, 5, 3, 0), # 53
(23, 12, 14, 19, 14, 10, 6, 9, 6, 2, 3, 1, 0, 13, 12, 11, 12, 11, 7, 3, 5, 6, 2, 5, 1, 0), # 54
(14, 16, 21, 13, 16, 10, 7, 6, 5, 1, 5, 1, 0, 21, 17, 10, 10, 17, 6, 10, 5, 3, 11, 4, 5, 0), # 55
(21, 9, 11, 19, 12, 7, 5, 7, 5, 1, 2, 1, 0, 17, 16, 16, 8, 13, 15, 10, 2, 8, 4, 3, 2, 0), # 56
(22, 17, 15, 21, 10, 9, 10, 7, 4, 5, 3, 0, 0, 17, 24, 15, 10, 7, 6, 4, 4, 12, 5, 3, 1, 0), # 57
(26, 14, 16, 20, 10, 9, 7, 6, 6, 5, 3, 1, 0, 24, 18, 13, 8, 15, 4, 8, 7, 7, 9, 2, 2, 0), # 58
(19, 14, 13, 16, 14, 6, 5, 5, 9, 0, 6, 0, 0, 14, 19, 14, 10, 20, 8, 6, 5, 6, 5, 2, 2, 0), # 59
(26, 17, 13, 9, 11, 3, 10, 4, 11, 1, 2, 2, 0, 21, 5, 12, 8, 16, 13, 4, 5, 4, 5, 3, 1, 0), # 60
(23, 19, 16, 11, 13, 6, 5, 7, 5, 3, 2, 3, 0, 21, 26, 12, 8, 18, 2, 2, 1, 7, 3, 4, 0, 0), # 61
(12, 25, 14, 23, 23, 8, 4, 3, 9, 0, 2, 3, 0, 14, 15, 12, 16, 15, 8, 11, 3, 9, 5, 3, 0, 0), # 62
(19, 22, 16, 15, 13, 6, 5, 10, 5, 2, 3, 0, 0, 21, 10, 15, 16, 21, 9, 7, 8, 5, 6, 2, 2, 0), # 63
(18, 21, 10, 15, 7, 2, 7, 5, 7, 2, 3, 1, 0, 15, 9, 5, 6, 15, 11, 6, 3, 6, 5, 4, 2, 0), # 64
(27, 20, 12, 20, 12, 8, 4, 6, 8, 4, 0, 0, 0, 13, 19, 15, 9, 21, 6, 8, 3, 5, 4, 2, 2, 0), # 65
(16, 17, 16, 20, 7, 5, 8, 5, 7, 1, 1, 2, 0, 23, 14, 14, 3, 24, 6, 8, 3, 12, 6, 2, 1, 0), # 66
(21, 14, 14, 19, 14, 5, 5, 7, 7, 3, 1, 0, 0, 19, 12, 19, 12, 16, 5, 7, 7, 7, 4, 3, 6, 0), # 67
(17, 13, 11, 14, 17, 7, 5, 4, 4, 5, 5, 2, 0, 19, 13, 13, 9, 14, 6, 6, 8, 10, 6, 2, 3, 0), # 68
(16, 7, 11, 18, 14, 5, 9, 4, 2, 5, 2, 1, 0, 14, 10, 13, 9, 16, 5, 9, 7, 10, 7, 2, 0, 0), # 69
(13, 20, 12, 25, 15, 10, 9, 2, 4, 2, 2, 1, 0, 17, 11, 14, 8, 12, 9, 4, 6, 3, 6, 3, 1, 0), # 70
(12, 13, 17, 14, 15, 7, 9, 3, 8, 1, 3, 2, 0, 15, 14, 9, 15, 22, 5, 10, 4, 7, 8, 2, 1, 0), # 71
(17, 15, 16, 26, 18, 7, 7, 3, 6, 2, 4, 0, 0, 14, 6, 16, 8, 12, 14, 3, 7, 6, 6, 1, 2, 0), # 72
(21, 11, 16, 19, 14, 8, 11, 2, 9, 3, 1, 1, 0, 15, 16, 9, 4, 17, 9, 7, 5, 7, 12, 3, 3, 0), # 73
(22, 16, 15, 18, 11, 6, 5, 4, 7, 2, 4, 3, 0, 8, 15, 9, 14, 11, 6, 2, 6, 5, 2, 0, 2, 0), # 74
(18, 20, 14, 13, 15, 1, 8, 3, 8, 2, 4, 0, 0, 18, 14, 12, 15, 19, 4, 4, 3, 3, 3, 3, 2, 0), # 75
(22, 22, 12, 13, 17, 10, 7, 2, 6, 3, 1, 0, 0, 20, 11, 12, 9, 8, 7, 9, 6, 7, 5, 4, 1, 0), # 76
(14, 11, 15, 15, 11, 8, 10, 7, 4, 3, 2, 1, 0, 14, 16, 19, 10, 14, 4, 7, 7, 8, 6, 1, 3, 0), # 77
(13, 18, 11, 19, 6, 11, 9, 4, 5, 1, 0, 1, 0, 14, 19, 10, 8, 12, 3, 10, 4, 5, 4, 3, 1, 0), # 78
(23, 10, 20, 18, 7, 5, 7, 2, 9, 5, 1, 4, 0, 24, 13, 12, 6, 12, 8, 6, 5, 10, 6, 3, 1, 0), # 79
(19, 16, 11, 16, 13, 8, 6, 7, 3, 3, 4, 1, 0, 17, 15, 14, 13, 11, 10, 6, 3, 10, 4, 1, 3, 0), # 80
(14, 17, 12, 10, 12, 5, 4, 6, 6, 4, 2, 0, 0, 15, 13, 14, 9, 13, 8, 9, 3, 6, 4, 2, 2, 0), # 81
(16, 10, 20, 17, 16, 5, 5, 0, 8, 3, 0, 0, 0, 20, 22, 21, 9, 12, 8, 3, 5, 8, 5, 4, 2, 0), # 82
(17, 14, 14, 13, 14, 7, 9, 5, 6, 6, 1, 0, 0, 25, 9, 10, 9, 13, 5, 6, 3, 6, 6, 3, 0, 0), # 83
(15, 15, 17, 15, 15, 6, 6, 3, 9, 1, 0, 1, 0, 16, 23, 10, 11, 10, 7, 8, 5, 9, 5, 1, 0, 0), # 84
(16, 13, 12, 6, 19, 7, 7, 10, 7, 2, 4, 1, 0, 20, 14, 8, 10, 11, 4, 4, 7, 5, 3, 2, 0, 0), # 85
(20, 17, 25, 12, 14, 3, 9, 5, 8, 4, 4, 3, 0, 21, 13, 15, 9, 18, 10, 7, 5, 3, 5, 0, 1, 0), # 86
(26, 15, 12, 20, 15, 8, 6, 1, 7, 0, 3, 0, 0, 18, 13, 8, 6, 9, 7, 6, 4, 7, 6, 4, 1, 0), # 87
(18, 7, 13, 19, 14, 5, 5, 4, 7, 6, 8, 0, 0, 17, 13, 14, 7, 19, 10, 11, 8, 7, 7, 3, 0, 0), # 88
(15, 12, 14, 15, 21, 7, 6, 6, 6, 4, 3, 0, 0, 12, 26, 11, 11, 12, 10, 8, 4, 9, 7, 6, 3, 0), # 89
(11, 7, 16, 17, 15, 9, 3, 5, 7, 4, 5, 0, 0, 16, 16, 9, 10, 13, 5, 4, 7, 8, 12, 3, 1, 0), # 90
(22, 10, 5, 15, 12, 3, 7, 7, 4, 2, 1, 2, 0, 26, 12, 13, 4, 11, 8, 6, 5, 6, 8, 1, 0, 0), # 91
(13, 8, 19, 21, 17, 10, 5, 5, 11, 2, 3, 2, 0, 14, 13, 12, 9, 19, 2, 5, 4, 5, 5, 1, 1, 0), # 92
(14, 10, 13, 13, 18, 8, 7, 3, 7, 3, 1, 1, 0, 14, 13, 9, 6, 18, 11, 3, 2, 7, 2, 3, 1, 0), # 93
(7, 15, 23, 20, 14, 12, 7, 7, 14, 5, 1, 1, 0, 24, 12, 8, 8, 9, 11, 3, 5, 8, 2, 7, 3, 0), # 94
(17, 17, 14, 15, 9, 5, 3, 4, 9, 2, 3, 0, 0, 17, 19, 13, 13, 12, 3, 4, 1, 10, 9, 0, 0, 0), # 95
(18, 18, 16, 14, 11, 6, 5, 9, 10, 3, 5, 0, 0, 21, 11, 10, 7, 11, 5, 6, 3, 3, 6, 3, 1, 0), # 96
(14, 13, 9, 14, 13, 3, 5, 6, 8, 4, 5, 1, 0, 23, 11, 11, 9, 13, 3, 8, 2, 11, 6, 2, 1, 0), # 97
(13, 10, 10, 21, 15, 5, 4, 2, 7, 4, 1, 0, 0, 18, 17, 4, 5, 17, 6, 5, 1, 11, 2, 5, 1, 0), # 98
(17, 11, 8, 23, 18, 3, 3, 5, 7, 2, 4, 1, 0, 22, 11, 11, 13, 14, 15, 5, 5, 7, 3, 2, 3, 0), # 99
(23, 14, 6, 16, 18, 3, 6, 8, 9, 3, 4, 0, 0, 26, 17, 12, 7, 13, 7, 7, 5, 6, 4, 4, 3, 0), # 100
(14, 17, 15, 19, 12, 6, 8, 3, 6, 2, 3, 0, 0, 21, 12, 11, 6, 13, 3, 6, 4, 12, 4, 1, 1, 0), # 101
(16, 10, 10, 8, 6, 8, 6, 3, 6, 4, 2, 2, 0, 19, 7, 9, 9, 14, 10, 7, 7, 5, 8, 3, 0, 0), # 102
(20, 9, 16, 13, 14, 5, 3, 8, 6, 1, 3, 3, 0, 25, 14, 15, 11, 15, 7, 5, 5, 9, 6, 3, 0, 0), # 103
(19, 14, 12, 14, 17, 5, 5, 6, 3, 2, 1, 5, 0, 23, 6, 7, 6, 7, 12, 3, 3, 7, 2, 3, 1, 0), # 104
(20, 19, 8, 14, 10, 8, 5, 2, 7, 3, 2, 1, 0, 18, 11, 15, 11, 13, 7, 6, 6, 5, 6, 0, 1, 0), # 105
(16, 13, 19, 8, 15, 3, 2, 4, 7, 3, 1, 3, 0, 21, 15, 7, 7, 13, 6, 4, 2, 7, 4, 2, 1, 0), # 106
(17, 14, 11, 10, 16, 6, 3, 3, 6, 3, 3, 1, 0, 6, 16, 14, 8, 18, 12, 6, 5, 7, 2, 6, 1, 0), # 107
(18, 16, 14, 15, 10, 9, 9, 7, 7, 1, 1, 0, 0, 14, 15, 12, 5, 11, 8, 11, 7, 10, 2, 3, 5, 0), # 108
(15, 19, 16, 20, 17, 8, 2, 4, 12, 2, 3, 1, 0, 16, 13, 9, 9, 16, 8, 6, 4, 2, 10, 5, 1, 0), # 109
(14, 13, 17, 16, 11, 4, 6, 3, 12, 0, 0, 1, 0, 23, 18, 9, 4, 13, 10, 6, 2, 4, 4, 3, 1, 0), # 110
(18, 8, 18, 19, 18, 4, 8, 7, 8, 4, 2, 0, 0, 24, 13, 8, 10, 10, 4, 8, 4, 7, 6, 1, 4, 0), # 111
(24, 9, 14, 17, 12, 9, 6, 3, 8, 5, 4, 0, 0, 17, 12, 11, 5, 15, 5, 8, 7, 10, 8, 3, 0, 0), # 112
(11, 13, 7, 15, 13, 5, 10, 4, 9, 2, 3, 0, 0, 15, 18, 11, 7, 13, 4, 4, 2, 9, 3, 6, 0, 0), # 113
(14, 18, 14, 9, 11, 5, 4, 4, 7, 4, 4, 1, 0, 20, 8, 17, 7, 11, 6, 6, 2, 10, 7, 4, 2, 0), # 114
(21, 17, 19, 15, 11, 9, 6, 9, 5, 3, 2, 0, 0, 12, 22, 8, 9, 14, 6, 5, 4, 6, 7, 1, 0, 0), # 115
(14, 9, 19, 15, 12, 8, 7, 4, 4, 0, 2, 2, 0, 12, 12, 11, 7, 15, 9, 4, 4, 8, 7, 3, 1, 0), # 116
(17, 16, 12, 18, 12, 5, 6, 4, 7, 3, 3, 2, 0, 18, 15, 8, 11, 20, 8, 7, 7, 4, 8, 0, 0, 0), # 117
(15, 13, 14, 17, 7, 7, 10, 5, 10, 4, 1, 0, 0, 14, 13, 11, 7, 15, 6, 13, 1, 6, 5, 2, 1, 0), # 118
(19, 8, 11, 15, 10, 11, 7, 9, 6, 2, 1, 0, 0, 18, 16, 12, 9, 18, 5, 2, 3, 3, 6, 3, 0, 0), # 119
(15, 7, 13, 17, 15, 3, 4, 6, 7, 0, 0, 2, 0, 14, 11, 10, 11, 6, 4, 5, 4, 7, 4, 2, 1, 0), # 120
(14, 12, 12, 20, 9, 4, 5, 5, 2, 6, 4, 1, 0, 19, 15, 8, 8, 14, 3, 4, 1, 6, 1, 4, 2, 0), # 121
(18, 11, 12, 11, 6, 4, 6, 7, 10, 3, 1, 1, 0, 15, 15, 15, 4, 12, 8, 3, 8, 7, 7, 2, 0, 0), # 122
(14, 13, 12, 19, 15, 8, 5, 3, 4, 1, 0, 1, 0, 16, 11, 5, 6, 9, 7, 2, 5, 3, 4, 2, 1, 0), # 123
(11, 5, 13, 9, 14, 6, 5, 6, 5, 1, 0, 4, 0, 23, 11, 9, 12, 15, 10, 10, 7, 7, 5, 3, 0, 0), # 124
(16, 12, 13, 17, 13, 3, 6, 5, 7, 4, 4, 3, 0, 14, 12, 12, 7, 10, 8, 6, 2, 5, 2, 9, 3, 0), # 125
(13, 16, 9, 12, 15, 10, 5, 5, 6, 1, 1, 1, 0, 18, 16, 15, 8, 13, 9, 8, 4, 4, 4, 2, 1, 0), # 126
(9, 8, 9, 7, 10, 8, 5, 7, 11, 2, 2, 1, 0, 22, 14, 6, 8, 14, 8, 5, 3, 3, 2, 3, 1, 0), # 127
(22, 14, 12, 14, 18, 6, 2, 4, 7, 3, 1, 3, 0, 14, 17, 11, 10, 13, 6, 3, 4, 4, 5, 2, 0, 0), # 128
(17, 12, 22, 18, 12, 4, 3, 0, 9, 2, 0, 2, 0, 13, 10, 7, 4, 15, 6, 6, 3, 11, 6, 2, 1, 0), # 129
(22, 11, 13, 21, 11, 4, 5, 7, 4, 2, 3, 1, 0, 19, 14, 8, 5, 12, 9, 6, 6, 7, 1, 0, 1, 0), # 130
(17, 8, 10, 13, 10, 5, 2, 1, 4, 3, 1, 0, 0, 18, 13, 11, 9, 7, 5, 5, 3, 7, 3, 4, 1, 0), # 131
(16, 14, 15, 13, 11, 8, 8, 6, 5, 3, 2, 1, 0, 7, 10, 4, 9, 16, 5, 6, 8, 7, 5, 2, 0, 0), # 132
(14, 14, 10, 15, 15, 6, 6, 4, 5, 0, 0, 0, 0, 17, 6, 12, 8, 12, 6, 1, 8, 8, 6, 3, 0, 0), # 133
(19, 13, 13, 13, 11, 7, 4, 2, 9, 2, 1, 1, 0, 11, 9, 13, 4, 17, 12, 6, 4, 11, 4, 2, 2, 0), # 134
(25, 12, 12, 20, 10, 4, 0, 4, 3, 2, 2, 1, 0, 19, 11, 9, 9, 21, 4, 5, 3, 5, 6, 2, 0, 0), # 135
(21, 8, 20, 19, 11, 12, 6, 2, 9, 2, 4, 2, 0, 21, 8, 7, 8, 9, 3, 7, 5, 9, 4, 0, 1, 0), # 136
(11, 12, 17, 20, 12, 10, 2, 1, 7, 2, 3, 2, 0, 12, 20, 7, 8, 14, 5, 4, 5, 11, 6, 1, 1, 0), # 137
(18, 14, 8, 15, 11, 1, 2, 2, 6, 1, 1, 1, 0, 16, 8, 13, 9, 11, 5, 7, 2, 5, 10, 2, 1, 0), # 138
(11, 13, 14, 24, 24, 7, 4, 1, 7, 4, 4, 0, 0, 16, 11, 10, 5, 13, 10, 4, 4, 10, 5, 2, 1, 0), # 139
(10, 13, 6, 10, 16, 7, 2, 3, 4, 5, 1, 1, 0, 28, 12, 8, 11, 12, 12, 2, 2, 3, 6, 3, 1, 0), # 140
(18, 11, 13, 17, 21, 3, 9, 2, 6, 4, 1, 1, 0, 20, 11, 6, 5, 13, 5, 3, 1, 6, 3, 0, 2, 0), # 141
(11, 9, 10, 14, 11, 6, 5, 5, 5, 4, 1, 4, 0, 14, 7, 9, 8, 7, 6, 2, 5, 8, 6, 5, 0, 0), # 142
(9, 9, 14, 16, 10, 7, 4, 2, 2, 4, 3, 1, 0, 18, 16, 9, 11, 8, 9, 3, 5, 6, 4, 2, 0, 0), # 143
(13, 14, 10, 22, 12, 3, 9, 7, 5, 4, 1, 1, 0, 12, 20, 8, 6, 10, 9, 4, 5, 9, 3, 3, 0, 0), # 144
(13, 7, 16, 15, 12, 3, 3, 7, 3, 3, 1, 2, 0, 21, 16, 11, 5, 14, 5, 4, 8, 9, 5, 0, 2, 0), # 145
(16, 12, 12, 7, 8, 5, 6, 3, 7, 3, 1, 1, 0, 10, 17, 9, 11, 11, 5, 7, 3, 13, 5, 1, 1, 0), # 146
(8, 11, 10, 11, 9, 5, 7, 4, 10, 4, 1, 1, 0, 13, 11, 8, 5, 10, 10, 6, 1, 6, 4, 2, 0, 0), # 147
(16, 9, 14, 13, 13, 12, 5, 4, 4, 1, 2, 3, 0, 13, 14, 7, 7, 13, 7, 4, 3, 6, 4, 4, 2, 0), # 148
(12, 10, 12, 14, 14, 7, 6, 5, 9, 1, 1, 3, 0, 12, 14, 9, 5, 13, 6, 5, 1, 5, 3, 2, 0, 0), # 149
(13, 11, 18, 12, 9, 5, 7, 3, 6, 3, 3, 2, 0, 23, 12, 16, 9, 13, 5, 2, 5, 7, 4, 1, 1, 0), # 150
(19, 8, 12, 10, 11, 5, 3, 1, 7, 1, 2, 1, 0, 11, 14, 11, 10, 8, 7, 8, 4, 1, 4, 4, 0, 0), # 151
(15, 5, 7, 15, 10, 5, 3, 4, 8, 4, 1, 0, 0, 14, 10, 9, 7, 16, 8, 4, 1, 8, 1, 1, 0, 0), # 152
(11, 7, 13, 10, 14, 4, 5, 3, 4, 0, 4, 2, 0, 14, 9, 5, 10, 15, 5, 4, 6, 6, 3, 0, 1, 0), # 153
(12, 12, 18, 12, 15, 7, 5, 4, 5, 2, 2, 0, 0, 13, 14, 5, 3, 18, 5, 4, 7, 5, 3, 0, 0, 0), # 154
(16, 10, 10, 12, 10, 5, 5, 6, 4, 3, 2, 1, 0, 21, 16, 17, 4, 13, 5, 5, 1, 6, 4, 2, 1, 0), # 155
(9, 6, 6, 12, 11, 5, 6, 3, 4, 4, 1, 0, 0, 16, 10, 5, 10, 14, 4, 5, 6, 8, 0, 4, 1, 0), # 156
(14, 10, 19, 5, 2, 4, 3, 4, 4, 4, 2, 1, 0, 11, 19, 7, 6, 15, 9, 3, 5, 9, 3, 3, 2, 0), # 157
(8, 11, 10, 16, 16, 8, 1, 5, 7, 4, 1, 1, 0, 8, 11, 8, 6, 5, 4, 3, 4, 4, 5, 2, 4, 0), # 158
(13, 10, 17, 7, 10, 4, 9, 7, 6, 2, 1, 2, 0, 5, 16, 8, 5, 12, 6, 6, 4, 4, 4, 0, 1, 0), # 159
(11, 16, 13, 6, 16, 6, 3, 2, 6, 1, 0, 0, 0, 9, 4, 11, 5, 8, 7, 5, 6, 2, 4, 0, 0, 0), # 160
(12, 6, 6, 16, 14, 5, 0, 5, 3, 1, 3, 1, 0, 13, 13, 4, 11, 12, 3, 1, 2, 4, 4, 4, 1, 0), # 161
(14, 8, 13, 11, 7, 5, 1, 4, 4, 1, 1, 1, 0, 15, 7, 7, 5, 13, 6, 4, 4, 10, 4, 0, 0, 0), # 162
(9, 7, 14, 9, 15, 7, 3, 1, 7, 2, 2, 4, 0, 9, 10, 7, 4, 20, 6, 10, 4, 11, 4, 3, 1, 0), # 163
(16, 12, 8, 7, 15, 1, 1, 2, 5, 2, 2, 1, 0, 13, 16, 11, 5, 10, 4, 7, 1, 2, 4, 3, 0, 0), # 164
(12, 12, 9, 12, 8, 2, 2, 4, 5, 1, 1, 1, 0, 14, 8, 6, 4, 12, 6, 6, 4, 2, 3, 2, 2, 0), # 165
(12, 5, 10, 9, 9, 5, 2, 9, 9, 1, 1, 0, 0, 11, 5, 4, 9, 11, 5, 3, 4, 5, 3, 3, 0, 0), # 166
(5, 7, 11, 9, 14, 9, 4, 1, 4, 3, 4, 3, 0, 16, 8, 4, 5, 8, 4, 3, 3, 5, 6, 2, 0, 0), # 167
(10, 5, 8, 14, 7, 2, 3, 2, 4, 4, 1, 0, 0, 13, 9, 8, 6, 14, 3, 7, 4, 5, 4, 3, 0, 0), # 168
(10, 11, 12, 9, 8, 3, 4, 7, 5, 1, 2, 4, 0, 7, 11, 10, 4, 12, 2, 3, 4, 5, 1, 2, 0, 0), # 169
(11, 9, 13, 5, 10, 4, 1, 6, 1, 4, 1, 2, 0, 12, 15, 13, 3, 7, 1, 3, 3, 5, 3, 3, 1, 0), # 170
(9, 10, 11, 13, 14, 2, 1, 5, 4, 1, 1, 0, 0, 12, 5, 6, 5, 3, 3, 3, 1, 8, 1, 2, 0, 0), # 171
(12, 7, 10, 10, 6, 4, 6, 2, 3, 1, 1, 0, 0, 6, 9, 6, 4, 8, 4, 3, 3, 14, 1, 1, 1, 0), # 172
(5, 5, 15, 6, 8, 2, 3, 0, 5, 1, 1, 1, 0, 8, 9, 4, 2, 4, 9, 0, 2, 5, 4, 0, 0, 0), # 173
(4, 8, 7, 10, 9, 5, 2, 1, 4, 2, 1, 1, 0, 9, 10, 7, 7, 7, 6, 0, 0, 2, 3, 2, 1, 0), # 174
(6, 4, 8, 6, 8, 5, 2, 1, 5, 1, 2, 1, 0, 13, 6, 4, 6, 3, 4, 4, 0, 2, 0, 1, 1, 0), # 175
(8, 3, 8, 12, 5, 4, 2, 1, 3, 1, 2, 1, 0, 9, 8, 6, 2, 3, 2, 1, 3, 2, 4, 4, 2, 0), # 176
(9, 3, 6, 7, 7, 4, 5, 4, 3, 2, 2, 0, 0, 7, 7, 4, 4, 6, 3, 5, 5, 5, 3, 0, 0, 0), # 177
(8, 5, 4, 10, 7, 2, 2, 2, 3, 2, 1, 0, 0, 7, 3, 3, 5, 14, 3, 1, 4, 5, 1, 1, 0, 0), # 178
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 179
)
station_arriving_intensity = (
(9.037558041069182, 9.9455194074477, 9.380309813302512, 11.18640199295418, 9.998434093697302, 5.64957887766721, 7.462864107673047, 8.375717111362961, 10.962178311902413, 7.124427027940266, 7.569477294994085, 8.816247140951113, 9.150984382641052), # 0
(9.637788873635953, 10.602109249460566, 9.999623864394273, 11.925259655897909, 10.660482607453627, 6.0227704512766005, 7.955044094274649, 8.927124701230275, 11.686041587399236, 7.59416524609887, 8.069573044721038, 9.398189989465838, 9.755624965391739), # 1
(10.236101416163518, 11.256093307603763, 10.616476113985344, 12.66117786839663, 11.320133352749538, 6.3944732061224006, 8.445273314329269, 9.476325446227955, 12.407016252379588, 8.062044795036982, 8.567681667797364, 9.9778187736955, 10.357856690777442), # 2
(10.830164027663812, 11.904876903485604, 11.228419564775738, 13.391237533557733, 11.974791016803424, 6.763213120653203, 8.93160655496632, 10.021142083490112, 13.122243289657968, 8.526208857167125, 9.061827141289289, 10.55283423287483, 10.955291051257605), # 3
(11.417645067148767, 12.545865358714394, 11.833007219465467, 14.112519554488625, 12.621860286833686, 7.127516173317602, 9.412098603315226, 10.559397350150848, 13.828863682048873, 8.984800614901822, 9.550033442263036, 11.120937106238575, 11.54553953929167), # 4
(11.996212893630318, 13.176463994898459, 12.427792080754532, 14.822104834296708, 13.258745850058704, 7.485908342564186, 9.884804246505404, 11.088913983344266, 14.524018412366805, 9.435963250653593, 10.030324547784838, 11.679828133021466, 12.126213647339089), # 5
(12.5635358661204, 13.794078133646101, 13.010327151342958, 15.517074276089375, 13.882852393696878, 7.836915606841555, 10.347778271666273, 11.60751472020448, 15.204848463426268, 9.877839946834966, 10.500724434920908, 12.227208052458254, 12.694924867859292), # 6
(13.117282343630944, 14.396113096565637, 13.578165433930742, 16.194508782974033, 14.491584604966597, 8.179063944598298, 10.799075465927253, 12.113022297865593, 15.868494818041759, 10.308573885858456, 10.959257080737483, 12.760777603783673, 13.249284693311735), # 7
(13.655120685173882, 14.979974205265378, 14.128859931217914, 16.85148925805807, 15.082347171086255, 8.510879334283002, 11.236750616417757, 12.603259453461705, 16.512098459027772, 10.726308250136594, 11.403946462300778, 13.278237526232465, 13.786904616155851), # 8
(14.174719249761154, 15.543066781353641, 14.659963645904467, 17.485096604448906, 15.652544779274237, 8.830887754344271, 11.658858510267216, 13.076048924126933, 17.132800369198815, 11.129186222081895, 11.83281655667702, 13.777288559039365, 14.305396128851092), # 9
(14.673746396404677, 16.082796146438728, 15.169029580690424, 18.092411725253918, 16.199582116748942, 9.137615183230693, 12.063453934605038, 13.52921344699538, 17.727741531369386, 11.515350984106886, 12.243891340932432, 14.255631441439114, 14.802370723856898), # 10
(15.149870484116411, 16.596567622128973, 15.653610738275788, 18.670515523580516, 16.72086387072876, 9.429587599390864, 12.44859167656065, 13.960575759201147, 18.294062928353988, 11.882945718624095, 12.635194792133248, 14.710966912666459, 15.2754398936327), # 11
(15.600759871908263, 17.081786530032655, 16.111260121360573, 19.216488902536103, 17.21379472843208, 9.705330981273365, 12.812326523263462, 14.367958597878339, 18.82890554296712, 12.23011360804603, 13.004750887345683, 15.140995711956123, 15.722215130637963), # 12
(16.02408291879218, 17.535858191758116, 16.539530732644792, 19.727412765228078, 17.675779377077284, 9.963371307326803, 13.152713261842901, 14.749184700161067, 19.329410358023278, 12.554997834785228, 13.350583603635965, 15.543418578542857, 16.140307927332124), # 13
(16.41750798378009, 17.95618792891366, 16.935975574828465, 20.20036801476383, 18.10422250388278, 10.202234555999762, 13.46780667942839, 15.102076803183444, 19.79271835633696, 12.855741581254202, 13.670716918070312, 15.915936251661408, 16.527329776174614), # 14
(16.77870342588394, 18.34018106310759, 17.298147650611575, 20.632435554250776, 18.496528796066954, 10.420446705740842, 13.755661563149326, 15.424457644079562, 20.215970520722674, 13.130488029865482, 13.963174807714955, 16.256249470546507, 16.880892169624886), # 15
(17.10533760411564, 18.685242915948237, 17.623599962694165, 21.02069628679629, 18.8501029408482, 10.616533734998628, 14.014332700135158, 15.71414995998353, 20.596307833994917, 13.377380363031593, 14.225981249636122, 16.56205897443289, 17.198606600142384), # 16
(17.395078877487137, 18.988778809043904, 17.909885513776235, 21.362231115507804, 19.162349625444907, 10.789021622221714, 14.24187487751528, 15.968976488029472, 20.930871278968173, 13.594561763165041, 14.457160220900038, 16.8310655025553, 17.47808456018655), # 17
(17.645595605010367, 19.248194064002895, 18.154557306557784, 21.654120943492703, 19.43067353707546, 10.936436345858706, 14.436342882419133, 16.18675996535147, 21.216801838456973, 13.780175412678366, 14.654735698572916, 17.060969794148487, 17.716937542216822), # 18
(17.85455614569726, 19.46089400243354, 18.355168343738843, 21.893446673858367, 19.65247936295826, 11.057303884358175, 14.59579150197611, 16.36532312908364, 21.4512404952758, 13.93236449398409, 14.81673165972098, 17.249472588447173, 17.912777038692653), # 19
(18.01962885855975, 19.624283945944132, 18.509271628019405, 22.077289209712237, 19.8251717903117, 11.150150216168733, 14.718275523315652, 16.50248871636009, 21.631328232239156, 14.049272189494726, 14.94117208141047, 17.394274624686105, 18.063214542073485), # 20
(18.13848210260976, 19.735769216143005, 18.614420162099496, 22.202729454161673, 19.94615550635416, 11.213501319738963, 14.801849733567167, 16.596079464314922, 21.754206032161537, 14.1290416816228, 15.026080940707608, 17.49307664210003, 18.165861544818743), # 21
(18.20878423685924, 19.792755134638462, 18.668166948679115, 22.266848310314106, 20.012835198304035, 11.245883173517461, 14.844568919860079, 16.643918110082247, 21.81701487785745, 14.169816152780836, 15.069482214678613, 17.54357937992368, 18.218329539387888), # 22
(18.23470805401675, 19.799502469135803, 18.674861728395065, 22.274875462962967, 20.029917700858675, 11.25, 14.84964720406681, 16.64908888888889, 21.824867222222224, 14.17462609053498, 15.074924466891131, 17.549815637860082, 18.225), # 23
(18.253822343461476, 19.79556666666667, 18.673766666666666, 22.273887500000004, 20.039593704506736, 11.25, 14.8468568627451, 16.6419, 21.823815, 14.17167111111111, 15.074324242424245, 17.548355555555556, 18.225), # 24
(18.272533014380844, 19.78780864197531, 18.671604938271606, 22.27193287037037, 20.049056902070106, 11.25, 14.841358024691358, 16.62777777777778, 21.82173611111111, 14.16585390946502, 15.073134118967452, 17.545473251028806, 18.225), # 25
(18.290838634286462, 19.776346913580248, 18.668406172839507, 22.269033796296295, 20.05830696315799, 11.25, 14.833236092955698, 16.60698888888889, 21.81865722222222, 14.157271275720165, 15.07136487093154, 17.54120823045268, 18.225), # 26
(18.308737770689945, 19.7613, 18.6642, 22.265212499999997, 20.067343557379587, 11.25, 14.822576470588237, 16.579800000000002, 21.814605, 14.146019999999998, 15.069027272727272, 17.535600000000002, 18.225), # 27
(18.3262289911029, 19.742786419753084, 18.659016049382718, 22.260491203703705, 20.076166354344124, 11.25, 14.809464560639071, 16.54647777777778, 21.809606111111112, 14.132196872427985, 15.066132098765433, 17.528688065843625, 18.225), # 28
(18.34331086303695, 19.720924691358025, 18.652883950617287, 22.25489212962963, 20.084775023660796, 11.25, 14.793985766158318, 16.507288888888887, 21.803687222222223, 14.115898683127574, 15.06269012345679, 17.520511934156378, 18.225), # 29
(18.359981954003697, 19.695833333333333, 18.645833333333332, 22.2484375, 20.093169234938827, 11.25, 14.776225490196078, 16.4625, 21.796875, 14.097222222222223, 15.058712121212121, 17.51111111111111, 18.225), # 30
(18.376240831514746, 19.667630864197534, 18.637893827160497, 22.241149537037035, 20.101348657787415, 11.25, 14.756269135802471, 16.412377777777778, 21.78919611111111, 14.07626427983539, 15.054208866442199, 17.500525102880662, 18.225), # 31
(18.392086063081717, 19.636435802469137, 18.629095061728393, 22.233050462962964, 20.10931296181577, 11.25, 14.734202106027599, 16.357188888888892, 21.780677222222224, 14.053121646090535, 15.0491911335578, 17.48879341563786, 18.225), # 32
(18.407516216216216, 19.602366666666665, 18.619466666666668, 22.2241625, 20.117061816633115, 11.25, 14.710109803921569, 16.2972, 21.771345, 14.027891111111112, 15.043669696969696, 17.475955555555554, 18.225), # 33
(18.422529858429858, 19.56554197530864, 18.609038271604938, 22.21450787037037, 20.12459489184864, 11.25, 14.684077632534496, 16.232677777777777, 21.761226111111114, 14.000669465020577, 15.037655331088663, 17.462051028806584, 18.225), # 34
(18.437125557234253, 19.52608024691358, 18.597839506172843, 22.204108796296293, 20.131911857071568, 11.25, 14.656190994916486, 16.163888888888888, 21.750347222222224, 13.971553497942386, 15.031158810325476, 17.447119341563788, 18.225), # 35
(18.45130188014101, 19.484099999999998, 18.5859, 22.192987499999997, 20.139012381911105, 11.25, 14.626535294117646, 16.0911, 21.738735, 13.94064, 15.024190909090908, 17.431200000000004, 18.225), # 36
(18.46505739466174, 19.43971975308642, 18.57324938271605, 22.181166203703704, 20.145896135976457, 11.25, 14.595195933188089, 16.014577777777777, 21.72641611111111, 13.908025761316873, 15.016762401795738, 17.414332510288066, 18.225), # 37
(18.47839066830806, 19.39305802469136, 18.559917283950615, 22.168667129629632, 20.152562788876843, 11.25, 14.562258315177923, 15.934588888888891, 21.713417222222223, 13.873807572016462, 15.00888406285073, 17.396556378600824, 18.225), # 38
(18.491300268591576, 19.34423333333333, 18.545933333333334, 22.1555125, 20.159012010221467, 11.25, 14.527807843137257, 15.8514, 21.699765000000003, 13.838082222222223, 15.000566666666668, 17.37791111111111, 18.225), # 39
(18.503784763023894, 19.293364197530863, 18.531327160493827, 22.14172453703704, 20.165243469619533, 11.25, 14.491929920116196, 15.765277777777781, 21.685486111111114, 13.800946502057615, 14.99182098765432, 17.358436213991773, 18.225), # 40
(18.51584271911663, 19.24056913580247, 18.51612839506173, 22.127325462962965, 20.171256836680264, 11.25, 14.454709949164851, 15.67648888888889, 21.67060722222222, 13.76249720164609, 14.982657800224468, 17.338171193415636, 18.225), # 41
(18.527472704381402, 19.18596666666667, 18.500366666666668, 22.112337500000002, 20.177051781012857, 11.25, 14.416233333333333, 15.5853, 21.655155000000004, 13.72283111111111, 14.97308787878788, 17.317155555555555, 18.225), # 42
(18.538673286329807, 19.12967530864198, 18.484071604938272, 22.096782870370372, 20.182627972226527, 11.25, 14.37658547567175, 15.491977777777779, 21.63915611111111, 13.682045020576133, 14.96312199775533, 17.295428806584365, 18.225), # 43
(18.54944303247347, 19.071813580246914, 18.467272839506176, 22.0806837962963, 20.18798507993048, 11.25, 14.335851779230211, 15.396788888888892, 21.62263722222222, 13.64023572016461, 14.952770931537597, 17.2730304526749, 18.225), # 44
(18.55978051032399, 19.0125, 18.45, 22.064062500000002, 20.193122773733933, 11.25, 14.294117647058824, 15.3, 21.605625, 13.597500000000002, 14.942045454545454, 17.25, 18.225), # 45
(18.569684287392985, 18.951853086419753, 18.432282716049382, 22.046941203703703, 20.198040723246088, 11.25, 14.251468482207699, 15.20187777777778, 21.588146111111108, 13.553934650205761, 14.930956341189674, 17.226376954732512, 18.225), # 46
(18.579152931192063, 18.88999135802469, 18.41415061728395, 22.02934212962963, 20.202738598076163, 11.25, 14.207989687726945, 15.102688888888888, 21.570227222222226, 13.50963646090535, 14.919514365881032, 17.20220082304527, 18.225), # 47
(18.588185009232834, 18.827033333333333, 18.395633333333333, 22.0112875, 20.20721606783336, 11.25, 14.163766666666668, 15.0027, 21.551895000000002, 13.464702222222222, 14.907730303030302, 17.177511111111112, 18.225), # 48
(18.596779089026917, 18.763097530864197, 18.376760493827163, 21.99279953703704, 20.211472802126895, 11.25, 14.118884822076978, 14.902177777777778, 21.53317611111111, 13.419228724279836, 14.895614927048262, 17.152347325102884, 18.225), # 49
(18.604933738085908, 18.698302469135808, 18.357561728395066, 21.973900462962963, 20.21550847056597, 11.25, 14.073429557007989, 14.801388888888889, 21.514097222222222, 13.373312757201646, 14.883179012345678, 17.126748971193418, 18.225), # 50
(18.61264752392144, 18.63276666666667, 18.338066666666666, 21.9546125, 20.219322742759797, 11.25, 14.027486274509805, 14.7006, 21.494685000000004, 13.32705111111111, 14.870433333333335, 17.10075555555556, 18.225), # 51
(18.619919014045102, 18.56660864197531, 18.318304938271606, 21.934957870370372, 20.222915288317584, 11.25, 13.981140377632535, 14.600077777777777, 21.47496611111111, 13.280540576131688, 14.857388664421999, 17.074406584362144, 18.225), # 52
(18.626746775968517, 18.49994691358025, 18.29830617283951, 21.914958796296297, 20.226285776848552, 11.25, 13.93447726942629, 14.50008888888889, 21.454967222222226, 13.233877942386831, 14.844055780022448, 17.04774156378601, 18.225), # 53
(18.63312937720329, 18.432900000000004, 18.2781, 21.8946375, 20.229433877961906, 11.25, 13.887582352941177, 14.400899999999998, 21.434715, 13.18716, 14.830445454545453, 17.0208, 18.225), # 54
(18.63906538526104, 18.365586419753086, 18.25771604938272, 21.874016203703704, 20.232359261266843, 11.25, 13.840541031227307, 14.302777777777777, 21.414236111111112, 13.140483539094651, 14.816568462401795, 16.993621399176956, 18.225), # 55
(18.64455336765337, 18.298124691358026, 18.237183950617286, 21.85311712962963, 20.235061596372585, 11.25, 13.793438707334786, 14.20598888888889, 21.393557222222224, 13.09394534979424, 14.802435578002246, 16.96624526748971, 18.225), # 56
(18.649591891891887, 18.230633333333333, 18.216533333333334, 21.8319625, 20.23754055288834, 11.25, 13.746360784313726, 14.110800000000001, 21.372705, 13.047642222222223, 14.788057575757577, 16.93871111111111, 18.225), # 57
(18.654179525488225, 18.163230864197534, 18.195793827160493, 21.810574537037034, 20.239795800423316, 11.25, 13.699392665214235, 14.017477777777778, 21.35170611111111, 13.001670946502058, 14.773445230078567, 16.91105843621399, 18.225), # 58
(18.658314835953966, 18.096035802469135, 18.174995061728396, 21.788975462962963, 20.24182700858672, 11.25, 13.65261975308642, 13.92628888888889, 21.330587222222224, 12.956128312757203, 14.758609315375981, 16.883326748971193, 18.225), # 59
(18.661996390800738, 18.02916666666667, 18.154166666666665, 21.767187500000002, 20.243633846987766, 11.25, 13.606127450980392, 13.8375, 21.309375000000003, 12.911111111111111, 14.743560606060607, 16.855555555555558, 18.225), # 60
(18.665222757540146, 17.962741975308646, 18.13333827160494, 21.74523287037037, 20.24521598523566, 11.25, 13.560001161946259, 13.751377777777778, 21.288096111111113, 12.866716131687244, 14.728309876543209, 16.82778436213992, 18.225), # 61
(18.66799250368381, 17.89688024691358, 18.112539506172844, 21.7231337962963, 20.246573092939624, 11.25, 13.514326289034132, 13.66818888888889, 21.266777222222224, 12.823040164609054, 14.712867901234567, 16.80005267489712, 18.225), # 62
(18.670304196743327, 17.831699999999998, 18.0918, 21.7009125, 20.24770483970884, 11.25, 13.469188235294117, 13.5882, 21.245445, 12.78018, 14.697245454545456, 16.7724, 18.225), # 63
(18.672156404230314, 17.767319753086422, 18.071149382716047, 21.678591203703704, 20.24861089515255, 11.25, 13.424672403776325, 13.511677777777779, 21.22412611111111, 12.738232427983538, 14.681453310886642, 16.7448658436214, 18.225), # 64
(18.67354769365639, 17.703858024691357, 18.05061728395062, 21.65619212962963, 20.24929092887994, 11.25, 13.380864197530865, 13.438888888888888, 21.202847222222225, 12.697294238683126, 14.665502244668913, 16.717489711934153, 18.225), # 65
(18.674476632533153, 17.641433333333335, 18.030233333333335, 21.6337375, 20.249744610500233, 11.25, 13.337849019607843, 13.3701, 21.181635000000004, 12.657462222222222, 14.649403030303029, 16.690311111111114, 18.225), # 66
(18.674941788372227, 17.580164197530863, 18.010027160493827, 21.611249537037036, 20.249971609622634, 11.25, 13.29571227305737, 13.30557777777778, 21.16051611111111, 12.618833168724281, 14.633166442199778, 16.6633695473251, 18.225), # 67
(18.674624906065485, 17.519847550776582, 17.989930709876543, 21.588555132850242, 20.249780319535223, 11.24979122085048, 13.254327350693364, 13.245018930041153, 21.13935812757202, 12.5813167949649, 14.616514779372677, 16.636554039419536, 18.22477527006173), # 68
(18.671655072463768, 17.458641935483872, 17.969379166666666, 21.564510326086953, 20.248039215686273, 11.248140740740741, 13.212482726423904, 13.185177777777778, 21.11723611111111, 12.543851503267971, 14.597753110047847, 16.608994152046783, 18.222994791666668), # 69
(18.665794417606012, 17.39626642771804, 17.948283179012343, 21.538956823671498, 20.244598765432098, 11.244890260631001, 13.169988242210465, 13.125514403292183, 21.09402520576132, 12.506255144032922, 14.576667995746943, 16.580560970327056, 18.219478202160495), # 70
(18.657125389157272, 17.332758303464754, 17.92665015432099, 21.51193230676329, 20.239502541757446, 11.240092455418381, 13.12686298717018, 13.066048559670783, 21.06975997942387, 12.46852864681675, 14.553337267410951, 16.551275286982886, 18.21427179783951), # 71
(18.64573043478261, 17.268154838709677, 17.9044875, 21.48347445652174, 20.23279411764706, 11.2338, 13.083126050420168, 13.0068, 21.044475000000002, 12.43067294117647, 14.527838755980863, 16.52115789473684, 18.207421875), # 72
(18.631692002147076, 17.20249330943847, 17.88180262345679, 21.45362095410628, 20.224517066085692, 11.226065569272976, 13.038796521077565, 12.947788477366256, 21.01820483539095, 12.392688956669087, 14.50025029239766, 16.490229586311454, 18.198974729938275), # 73
(18.61509253891573, 17.1358109916368, 17.858602932098762, 21.42240948067633, 20.214714960058096, 11.216941838134431, 12.9938934882595, 12.889033744855967, 20.990984053497943, 12.354577622851611, 14.470649707602341, 16.45851115442928, 18.18897665895062), # 74
(18.59601449275362, 17.06814516129032, 17.83489583333333, 21.389877717391304, 20.203431372549023, 11.206481481481482, 12.9484360410831, 12.830555555555556, 20.96284722222222, 12.316339869281046, 14.439114832535884, 16.426023391812866, 18.177473958333334), # 75
(18.57454031132582, 16.99953309438471, 17.8106887345679, 21.35606334541063, 20.19070987654321, 11.19473717421125, 12.902443268665492, 12.772373662551441, 20.93382890946502, 12.277976625514404, 14.405723498139285, 16.392787091184747, 18.164512924382716), # 76
(18.55075244229737, 16.93001206690562, 17.785989043209874, 21.32100404589372, 20.176594045025414, 11.18176159122085, 12.855934260123803, 12.714507818930043, 20.90396368312757, 12.239488821108692, 14.370553535353537, 16.358823045267492, 18.150139853395064), # 77
(18.524733333333334, 16.859619354838713, 17.760804166666667, 21.2847375, 20.16112745098039, 11.167607407407406, 12.808928104575164, 12.65697777777778, 20.87328611111111, 12.200877385620915, 14.333682775119618, 16.324152046783627, 18.134401041666667), # 78
(18.496565432098766, 16.788392234169656, 17.735141512345677, 21.24730138888889, 20.144353667392885, 11.152327297668037, 12.761443891136702, 12.59980329218107, 20.84183076131687, 12.162143248608086, 14.29518904837852, 16.28879488845571, 18.117342785493825), # 79
(18.466331186258724, 16.71636798088411, 17.70900848765432, 21.208733393719807, 20.126316267247642, 11.135973936899862, 12.713500708925546, 12.543004115226339, 20.809632201646092, 12.123287339627208, 14.255150186071239, 16.252772363006283, 18.09901138117284), # 80
(18.434113043478263, 16.643583870967742, 17.682412499999998, 21.169071195652176, 20.10705882352941, 11.118599999999999, 12.665117647058823, 12.486600000000001, 20.776725, 12.084310588235295, 14.213644019138757, 16.216105263157896, 18.079453124999997), # 81
(18.399993451422436, 16.570077180406216, 17.655360956790126, 21.12835247584541, 20.086624909222948, 11.10025816186557, 12.616313794653665, 12.430610699588478, 20.743143724279836, 12.045213923989348, 14.170748378522063, 16.178814381633096, 18.058714313271608), # 82
(18.364054857756308, 16.495885185185184, 17.6278612654321, 21.086614915458934, 20.065058097313, 11.08100109739369, 12.567108240827196, 12.37505596707819, 20.70892294238683, 12.00599827644638, 14.12654109516215, 16.14092051115443, 18.036841242283952), # 83
(18.326379710144927, 16.421045161290323, 17.599920833333332, 21.043896195652174, 20.042401960784314, 11.060881481481482, 12.517520074696545, 12.319955555555556, 20.674097222222223, 11.9666645751634, 14.0811, 16.102444444444444, 18.013880208333333), # 84
(18.287050456253354, 16.345594384707287, 17.571547067901232, 21.000233997584544, 20.01870007262164, 11.039951989026063, 12.467568385378843, 12.265329218106997, 20.63870113168724, 11.92721374969741, 14.034502923976609, 16.06340697422569, 17.989877507716052), # 85
(18.246149543746643, 16.269570131421744, 17.54274737654321, 20.955666002415462, 19.99399600580973, 11.018265294924555, 12.417272261991217, 12.21119670781893, 20.60276923868313, 11.887646729605423, 13.986827698032961, 16.02382889322071, 17.964879436728395), # 86
(18.203759420289852, 16.193009677419354, 17.513529166666665, 20.910229891304347, 19.968333333333337, 10.995874074074074, 12.366650793650793, 12.157577777777778, 20.566336111111116, 11.847964444444443, 13.938152153110048, 15.983730994152046, 17.938932291666667), # 87
(18.159962533548043, 16.11595029868578, 17.483899845679012, 20.86396334541063, 19.941755628177198, 10.972831001371743, 12.315723069474704, 12.104492181069958, 20.52943631687243, 11.808167823771482, 13.888554120148857, 15.943134069742257, 17.912082368827164), # 88
(18.11484133118626, 16.03842927120669, 17.453866820987656, 20.81690404589372, 19.91430646332607, 10.94918875171468, 12.264508178580074, 12.051959670781894, 20.492104423868312, 11.76825779714355, 13.838111430090379, 15.902058912713883, 17.884375964506173), # 89
(18.068478260869565, 15.960483870967742, 17.423437500000002, 20.769089673913047, 19.886029411764707, 10.925, 12.213025210084034, 12.0, 20.454375000000002, 11.728235294117647, 13.786901913875598, 15.860526315789475, 17.855859375), # 90
(18.020955770263015, 15.8821513739546, 17.392619290123456, 20.720557910628024, 19.85696804647785, 10.900317421124829, 12.161293253103711, 11.9486329218107, 20.41628261316873, 11.688101244250786, 13.735003402445509, 15.818557071691574, 17.826578896604936), # 91
(17.97235630703167, 15.80346905615293, 17.361419598765433, 20.671346437198068, 19.827165940450254, 10.875193689986283, 12.109331396756236, 11.897878189300412, 20.377861831275723, 11.647856577099976, 13.682493726741095, 15.776171973142736, 17.796580825617283), # 92
(17.92276231884058, 15.724474193548389, 17.329845833333334, 20.621492934782612, 19.796666666666667, 10.84968148148148, 12.057158730158731, 11.847755555555556, 20.339147222222223, 11.607502222222221, 13.62945071770335, 15.733391812865497, 17.76591145833333), # 93
(17.872256253354806, 15.645204062126643, 17.29790540123457, 20.571035084541062, 19.765513798111837, 10.823833470507545, 12.00479434242833, 11.798284773662553, 20.300173353909464, 11.567039109174534, 13.575952206273259, 15.690237383582414, 17.734617091049383), # 94
(17.820920558239397, 15.56569593787336, 17.265605709876546, 20.52001056763285, 19.733750907770517, 10.797702331961592, 11.95225732268216, 11.749485596707821, 20.260974794238685, 11.526468167513919, 13.522076023391813, 15.646729478016026, 17.70274402006173), # 95
(17.76883768115942, 15.485987096774197, 17.23295416666667, 20.468457065217393, 19.701421568627453, 10.77134074074074, 11.899566760037347, 11.701377777777779, 20.221586111111108, 11.485790326797385, 13.4679, 15.602888888888891, 17.67033854166667), # 96
(17.716090069779927, 15.406114814814819, 17.199958179012345, 20.416412258454105, 19.668569353667394, 10.744801371742112, 11.846741743611025, 11.65398106995885, 20.182041872427984, 11.445006516581941, 13.413501967038808, 15.558736408923545, 17.637446952160495), # 97
(17.66276017176597, 15.326116367980884, 17.166625154320986, 20.363913828502415, 19.635237835875095, 10.718136899862827, 11.793801362520316, 11.607315226337448, 20.142376646090533, 11.404117666424595, 13.35895975544923, 15.514292830842535, 17.604115547839505), # 98
(17.608930434782607, 15.246029032258065, 17.1329625, 20.31099945652174, 19.601470588235298, 10.6914, 11.740764705882354, 11.5614, 20.102625, 11.363124705882353, 13.304351196172249, 15.469578947368422, 17.570390625), # 99
(17.5546833064949, 15.165890083632016, 17.09897762345679, 20.257706823671498, 19.567311183732752, 10.664643347050754, 11.687650862814262, 11.516255144032922, 20.062821502057616, 11.322028564512225, 13.249754120148857, 15.42461555122374, 17.536318479938274), # 100
(17.500101234567904, 15.085736798088412, 17.064677932098768, 20.204073611111113, 19.532803195352216, 10.637919615912208, 11.634478922433171, 11.471900411522633, 20.02300072016461, 11.280830171871218, 13.195246358320043, 15.379423435131034, 17.501945408950615), # 101
(17.44526666666667, 15.005606451612904, 17.030070833333333, 20.1501375, 19.497990196078433, 10.611281481481482, 11.58126797385621, 11.428355555555555, 19.98319722222222, 11.239530457516341, 13.140905741626794, 15.334023391812867, 17.467317708333336), # 102
(17.390262050456254, 14.92553632019116, 16.9951637345679, 20.095936171497584, 19.462915758896152, 10.584781618655693, 11.528037106200506, 11.385640329218107, 19.943445576131687, 11.1981303510046, 13.086810101010101, 15.28843621399177, 17.432481674382714), # 103
(17.335169833601718, 14.845563679808842, 16.959964043209876, 20.041507306763286, 19.427623456790123, 10.558472702331962, 11.474805408583187, 11.343774485596708, 19.90378034979424, 11.156630781893005, 13.03303726741095, 15.242682694390297, 17.397483603395063), # 104
(17.280072463768114, 14.765725806451613, 16.924479166666668, 19.98688858695652, 19.392156862745097, 10.532407407407408, 11.421591970121383, 11.302777777777779, 19.86423611111111, 11.115032679738563, 12.979665071770334, 15.196783625730996, 17.362369791666666), # 105
(17.225052388620504, 14.686059976105138, 16.888716512345678, 19.932117693236716, 19.356559549745825, 10.50663840877915, 11.36841587993222, 11.262669958847736, 19.82484742798354, 11.07333697409828, 12.92677134502924, 15.15075980073641, 17.327186535493826), # 106
(17.17019205582394, 14.606603464755079, 16.852683487654325, 19.877232306763286, 19.32087509077705, 10.48121838134431, 11.31529622713283, 11.223470781893006, 19.78564886831276, 11.03154459452917, 12.874433918128654, 15.104632012129088, 17.29198013117284), # 107
(17.11557391304348, 14.5273935483871, 16.8163875, 19.822270108695655, 19.28514705882353, 10.4562, 11.262252100840335, 11.185200000000002, 19.746675000000003, 10.989656470588237, 12.82273062200957, 15.05842105263158, 17.256796875000003), # 108
(17.061280407944178, 14.448467502986858, 16.779835956790127, 19.767268780193234, 19.249419026870008, 10.431635939643346, 11.209302590171871, 11.147877366255145, 19.707960390946504, 10.947673531832486, 12.771739287612972, 15.012147714966428, 17.221683063271605), # 109
(17.007393988191087, 14.369862604540026, 16.743036265432103, 19.71226600241546, 19.213734567901238, 10.407578875171467, 11.15646678424456, 11.111522633744855, 19.669539609053498, 10.90559670781893, 12.72153774587985, 14.965832791856185, 17.18668499228395), # 110
(16.953997101449275, 14.29161612903226, 16.705995833333336, 19.65729945652174, 19.178137254901962, 10.384081481481482, 11.103763772175537, 11.076155555555555, 19.631447222222224, 10.863426928104575, 12.672203827751195, 14.919497076023394, 17.151848958333336), # 111
(16.90117219538379, 14.213765352449222, 16.66872206790124, 19.602406823671497, 19.142670660856936, 10.361196433470509, 11.051212643081925, 11.041795884773663, 19.593717798353907, 10.821165122246429, 12.623815364167996, 14.873161360190599, 17.11722125771605), # 112
(16.84890760266548, 14.136477513814715, 16.631312090853726, 19.547700988485673, 19.10731622431267, 10.338965584586125, 10.998946734582185, 11.00853462380509, 19.556483060265517, 10.778948525902914, 12.57646303107516, 14.826947285707972, 17.0827990215178), # 113
(16.796665616220118, 14.060514930345965, 16.594282215038913, 19.493620958299207, 19.071708038219388, 10.317338295353823, 10.947632775139043, 10.976780267109216, 19.52031426428351, 10.73756730224301, 12.530239806803754, 14.781441909803354, 17.048295745488062), # 114
(16.744292825407193, 13.985904957629483, 16.55765447887317, 19.440152109327204, 19.035733820199482, 10.296258322497776, 10.89730737034481, 10.946524777701677, 19.485224961603823, 10.697085590378538, 12.485078120568769, 14.736667648605932, 17.013611936988678), # 115
(16.691723771827743, 13.912538906325063, 16.521357941970972, 19.38719907047953, 18.999339347490803, 10.275675979116777, 10.847888671550209, 10.917684563218188, 19.451126410610094, 10.657428045209185, 12.440890676288666, 14.692541755477222, 16.978693067560602), # 116
(16.63889299708279, 13.840308087092497, 16.485321663946774, 19.33466647066604, 18.9624703973312, 10.255541578309604, 10.799294830105955, 10.890176031294454, 19.417929869685967, 10.618519321634633, 12.39759017788191, 14.64898148377875, 16.943484608744804), # 117
(16.58573504277338, 13.769103810591583, 16.44947470441506, 19.2824589387966, 18.925072746958516, 10.235805433175049, 10.751443997362767, 10.863915589566174, 19.385546597215082, 10.580284074554568, 12.355089329266963, 14.60590408687203, 16.907932032082243), # 118
(16.532184450500534, 13.698817387482112, 16.413746122990304, 19.23048110378107, 18.887092173610597, 10.2164178568119, 10.70425432467136, 10.838819645669062, 19.353887851581078, 10.54264695886867, 12.31330083436229, 14.563226818118581, 16.87198080911388), # 119
(16.47817576186529, 13.629340128423884, 16.37806497928697, 19.17863759452931, 18.848474454525295, 10.197329162318939, 10.657643963382455, 10.814804607238818, 19.322864891167605, 10.50553262947663, 12.272137397086349, 14.520866930879935, 16.835576411380675), # 120
(16.423643518468683, 13.560563344076693, 16.342360332919537, 19.12683303995118, 18.809165366940455, 10.178489662794956, 10.611531064846766, 10.791786881911152, 19.2923889743583, 10.468865741278133, 12.23151172135761, 14.4787416785176, 16.79866431042359), # 121
(16.36852226191174, 13.49237834510033, 16.30656124350248, 19.07497206895654, 18.76911068809392, 10.159849671338735, 10.565833780415012, 10.769682877321769, 19.2623713595368, 10.43257094917286, 12.191336511094532, 14.436768314393102, 16.761189977783587), # 122
(16.312746533795494, 13.424676442154594, 16.270596770650265, 19.02295931045525, 18.728256195223544, 10.141359501049065, 10.52047026143791, 10.74840900110637, 19.232723305086758, 10.396572908060497, 12.151524470215579, 14.394864091867959, 16.72309888500163), # 123
(16.256250875720976, 13.357348945899277, 16.234395973977367, 18.970699393357176, 18.68654766556717, 10.12296946502473, 10.475358659266176, 10.727881660900668, 19.20335606939181, 10.36079627284073, 12.111988302639215, 14.352946264303695, 16.68433650361868), # 124
(16.198969829289226, 13.290287166994178, 16.197887913098263, 18.91809694657217, 18.643930876362642, 10.104629876364521, 10.43041712525053, 10.708017264340365, 19.174180910835588, 10.32516569841324, 12.072640712283903, 14.310932085061827, 16.644848305175692), # 125
(16.14083793610127, 13.22338241609909, 16.16100164762742, 18.8650565990101, 18.60035160484781, 10.086291048167222, 10.385563810741687, 10.688732219061166, 19.145109087801753, 10.289605839677717, 12.033394403068103, 14.268738807503881, 16.604579761213643), # 126
(16.08178973775815, 13.156526003873804, 16.123666237179307, 18.81148297958082, 18.555755628260517, 10.067903293531618, 10.34071686709037, 10.669942932698781, 19.116051858673934, 10.254041351533843, 11.994162078910282, 14.226283684991369, 16.56347634327348), # 127
(16.021759775860883, 13.089609240978122, 16.08581074136841, 18.7572807171942, 18.51008872383862, 10.0494169255565, 10.295794445647289, 10.651565812888913, 19.086920481835772, 10.218396888881303, 11.954856443728904, 14.183483970885819, 16.521483522896165), # 128
(15.960682592010507, 13.022523438071834, 16.047364219809193, 18.702354440760086, 18.46329666881996, 10.03078225734065, 10.250714697763163, 10.633517267267269, 19.057626215670915, 10.182597106619781, 11.915390201442428, 14.140256918548745, 16.478546771622668), # 129
(15.89849272780806, 12.955159905814739, 16.008255732116123, 18.646608779188355, 18.415325240442385, 10.011949601982854, 10.205395774788713, 10.61571370346955, 19.028080318563003, 10.146566659648963, 11.87567605596932, 14.096519781341675, 16.434611560993947), # 130
(15.83512472485457, 12.887409954866628, 15.968414337903685, 18.589948361388856, 18.36612021594374, 9.992869272581904, 10.159755828074656, 10.59807152913147, 18.998194048895677, 10.110230202868534, 11.835626711228041, 14.052189812626125, 16.38962336255096), # 131
(15.770513124751067, 12.8191648958873, 15.927769096786342, 18.532277816271456, 18.315627372561877, 9.973491582236585, 10.113713008971706, 10.580507151888732, 18.967878665052577, 10.073512391178177, 11.795154871137056, 14.007184265763614, 16.343527647834676), # 132
(15.704592469098595, 12.750316039536544, 15.88624906837857, 18.473501772746012, 18.263792487534637, 9.95376684404568, 10.06718546883058, 10.562936979377039, 18.93704542541735, 10.036337879477578, 11.754173239614829, 13.961420394115667, 16.296269888386057), # 133
(15.63729729949817, 12.68075469647416, 15.843783312294848, 18.413524859722386, 18.210561338099865, 9.933645371107978, 10.020091359002002, 10.545277419232098, 18.905605588373632, 9.998631322666423, 11.712594520579822, 13.914815451043799, 16.24779555574605), # 134
(15.568562157550836, 12.610372177359944, 15.800300888149636, 18.352251706110444, 18.15587970149542, 9.913077476522266, 9.972348830836681, 10.527444879089616, 18.873470412305064, 9.960317375644397, 11.670331417950496, 13.867286689909534, 16.198050121455637), # 135
(15.498321584857623, 12.539059792853687, 15.755730855557415, 18.28958694082003, 18.09969335495913, 9.892013473387332, 9.923876035685343, 10.509355766585298, 18.840551155595293, 9.92132069331118, 11.627296635645319, 13.818751364074394, 16.146979057055766), # 136
(15.426510123019561, 12.466708853615184, 15.710002274132659, 18.225435192761026, 18.04194807572886, 9.870403674801956, 9.8745911248987, 10.490926489354854, 18.80675907662796, 9.881565930566463, 11.583402877582751, 13.769126726899895, 16.094527834087398), # 137
(15.353062313637686, 12.393210670304235, 15.66304420348983, 18.159701090843274, 17.982589641042455, 9.848198393864935, 9.824412249827468, 10.472073455033982, 18.772005433786706, 9.840977742309924, 11.538562847681254, 13.718330031747561, 16.040641924091503), # 138
(15.277912698313022, 12.31845655358063, 15.614785703243411, 18.092289263976646, 17.921563828137746, 9.825347943675048, 9.773257561822367, 10.452713071258394, 18.73620148545517, 9.799480783441254, 11.492689249859293, 13.66627853197891, 15.985266798609034), # 139
(15.200995818646616, 12.242337814104165, 15.565155833007877, 18.023104341071, 17.858816414252605, 9.801802637331082, 9.721045212234115, 10.432761745663793, 18.699258490016998, 9.756999708860134, 11.445694788035329, 13.612889480955465, 15.928347929180966), # 140
(15.122246216239494, 12.164745762534638, 15.514083652397689, 17.952050951036195, 17.794293176624855, 9.777512787931828, 9.667693352413432, 10.412135885885887, 18.661087705855824, 9.713459173466253, 11.39749216612783, 13.558080132038745, 15.869830787348244), # 141
(15.041598432692682, 12.08557170953184, 15.461498221027327, 17.879033722782097, 17.727939892492355, 9.752428708576069, 9.613120133711027, 10.39075189956038, 18.621600391355297, 9.66878383215929, 11.347994088055255, 13.50176773859027, 15.80966084465184), # 142
(14.958987009607215, 12.004706965755565, 15.407328598511267, 17.803957285218555, 17.659702339092952, 9.726500712362592, 9.557243707477623, 10.368526194322978, 18.580707804899063, 9.622898339838935, 11.297113257736068, 13.443869553971561, 15.747783572632711), # 143
(14.874346488584132, 11.922042841865615, 15.35150384446397, 17.72672626725544, 17.58952629366449, 9.699679112390184, 9.499982225063938, 10.34537517780939, 18.53832120487076, 9.575727351404868, 11.244762379088732, 13.384302831544138, 15.684144442831826), # 144
(14.787611411224459, 11.837470648521778, 15.29395301849992, 17.64724529780261, 17.51735753344482, 9.671914221757634, 9.441253837820689, 10.321215257655316, 18.494351849654016, 9.527195521756779, 11.190854156031712, 13.322984824669524, 15.618688926790139), # 145
(14.69871631912923, 11.750881696383855, 15.23460518023359, 17.565419005769925, 17.443141835671785, 9.643156353563725, 9.380976697098594, 10.295962841496468, 18.448710997632492, 9.477227505794348, 11.135301292483467, 13.259832786709236, 15.551362496048613), # 146
(14.607595753899481, 11.662167296111635, 15.173389389279437, 17.481152020067245, 17.36682497758323, 9.613355820907245, 9.319068954248365, 10.269534336968547, 18.401309907189823, 9.425747958417263, 11.078016492362465, 13.194763971024798, 15.482110622148213), # 147
(14.51418425713624, 11.571218758364918, 15.11023470525195, 17.394348969604433, 17.28835273641701, 9.582462936886982, 9.255448760620729, 10.241846151707264, 18.352059836709653, 9.372681534525205, 11.018912459587169, 13.127695630977726, 15.410878776629895), # 148
(14.418416370440541, 11.477927393803494, 15.045070187765598, 17.304914483291345, 17.207670889410966, 9.550428014601719, 9.190034267566393, 10.21281469334832, 18.30087204457561, 9.317952889017864, 10.957901898076038, 13.058545019929545, 15.337612431034628), # 149
(14.320226635413416, 11.382184513087163, 14.97782489643485, 17.212753190037848, 17.124725213802947, 9.517201367150248, 9.122743626436081, 10.182356369527422, 18.247657789171353, 9.261486676794918, 10.894897511747537, 12.987229391241772, 15.262257056903364), # 150
(14.219549593655895, 11.283881426875716, 14.908427890874176, 17.117769718753795, 17.0394614868308, 9.48273330763135, 9.05349498858051, 10.150387587880278, 18.19232832888052, 9.20320755275606, 10.829812004520129, 12.91366599827593, 15.184758125777073), # 151
(14.116319786769019, 11.182909445828951, 14.836808230698063, 17.019868698349054, 16.951825485732364, 9.446974149143815, 8.982206505350396, 10.116824756042595, 18.134794922086748, 9.143040171800969, 10.762558080312278, 12.837772094393538, 15.105061109196717), # 152
(14.010471756353809, 11.079159880606662, 14.762894975520963, 16.91895475773348, 16.8617629877455, 9.409874204786428, 8.908796328096455, 10.081584281650072, 18.07496882717368, 9.080909188829333, 10.693048443042448, 12.759464932956115, 15.02311147870325), # 153
(13.901940044011312, 10.972524041868644, 14.686617184957365, 16.81493252581694, 16.769219770108045, 9.371383787657978, 8.83318260816941, 10.044582572338422, 18.01276130252496, 9.016739258740834, 10.6211957966291, 12.678661767325185, 14.938854705837642), # 154
(13.790659191342543, 10.86289324027469, 14.607903918621735, 16.707706631509282, 16.674141610057855, 9.331453210857248, 8.75528349691997, 10.005736035743345, 17.948083606524232, 8.950455036435159, 10.5469128449907, 12.595279850862267, 14.852236262140847), # 155
(13.676563739948545, 10.750158786484597, 14.526684236128547, 16.597181703720377, 16.576474284832766, 9.29003278748303, 8.67501714569886, 9.964961079500554, 17.88084699755513, 8.88198117681199, 10.470112292045709, 12.50923643692888, 14.763201619153833), # 156
(13.559588231430352, 10.634211991158162, 14.442887197092272, 16.483262371360087, 16.476163571670632, 9.247072830634105, 8.592301705856794, 9.922174111245749, 17.8109627340013, 8.811242334771014, 10.39070684171259, 12.420448778886547, 14.671696248417557), # 157
(13.43642570352943, 10.512815617390064, 14.352465517024239, 16.36158524697224, 16.368625990567796, 9.199844057370798, 8.505192097670143, 9.87443451422887, 17.732991764878374, 8.73605864932406, 10.306072354570096, 12.32567921554981, 14.573674546947622), # 158
(13.288116180561124, 10.37351757527906, 14.232128073125379, 16.207158885819215, 16.22734435760693, 9.132641366412786, 8.40278297409429, 9.804984358975888, 17.61556907019986, 8.644105789377742, 10.20135048411419, 12.206452542629595, 14.445769764456351), # 159
(13.112769770827757, 10.215174111373285, 14.0794577243206, 16.017439518735948, 16.04955623642423, 9.043814332885832, 8.284038747090811, 9.712078541149223, 17.455365409011574, 8.534170173353209, 10.075067115497172, 12.060903507998123, 14.285557096008445), # 160
(12.911799698254727, 10.038817562544844, 13.896084549438555, 15.79423050676211, 15.837107623707803, 8.934439034826566, 8.149826602812377, 9.596880959597605, 17.254493580598233, 8.407184747707687, 9.928334978279473, 11.890381444033627, 14.094673280674375), # 161
(12.686619186767443, 9.84548026566583, 13.683638627307893, 15.539335210937388, 15.591844516145768, 8.80559155027162, 8.001013727411657, 9.460555513169764, 17.015066384244545, 8.264082458898416, 9.762266802021516, 11.696235683114327, 13.874755057524599), # 162
(12.438641460291295, 9.636194557608343, 13.443750036757264, 15.254556992301481, 15.315612910426239, 8.65834795725763, 7.838467307041322, 9.304266100714425, 16.73919661923523, 8.105796253382625, 9.577975316283736, 11.479815557618458, 13.627439165629584), # 163
(12.16927974275169, 9.411992775244478, 13.178048856615318, 14.941699211894072, 15.01025880323734, 8.493784333821234, 7.663054527854039, 9.129176621080324, 16.428997084855002, 7.933259077617543, 9.376573250626553, 11.242470399924246, 13.35436234405979), # 164
(11.879947258074031, 9.173907255446338, 12.888165165710705, 14.602565230754854, 14.677628191267182, 8.312976757999055, 7.475642576002479, 8.936450973116184, 16.086580580388564, 7.747403878060404, 9.1591733346104, 10.985549542409915, 13.057161331885686), # 165
(11.572057230183715, 8.922970335086019, 12.57572904287207, 14.238958409923503, 14.319567071203886, 8.117001307827735, 7.277098637639315, 8.727253055670738, 15.714059905120632, 7.549163601168441, 8.926888297795703, 10.710402317453703, 12.737472868177733), # 166
(11.24702288300614, 8.660214351035616, 12.242370566928068, 13.852682110439718, 13.937921439735565, 7.906934061343905, 7.0682898989172145, 8.502746767592717, 15.31354785833592, 7.339471193398886, 8.680830869742888, 10.418378057433825, 12.396933692006392), # 167
(10.906257440466712, 8.386671640167231, 11.889719816707347, 13.445539693343184, 13.534537293550335, 7.683851096584198, 6.850083545988848, 8.264096007730847, 14.887157239319139, 7.11925960120897, 8.422113780012385, 10.11082609472852, 12.037180542442131), # 168
(10.551174126490828, 8.103374539352963, 11.519406871038555, 13.019334519673588, 13.111260629336316, 7.4488284915852505, 6.623346765006885, 8.012464674933861, 14.437000847355009, 6.889461771055926, 8.151849758164623, 9.78909576171601, 11.659850158555415), # 169
(10.18318616500389, 7.811355385464907, 11.133061808750343, 12.575869950470615, 12.66993744378162, 7.2029423243836925, 6.388946742123995, 7.749016668050485, 13.96519148172823, 6.6510106493969845, 7.871151533760029, 9.454536390774527, 11.2665792794167), # 170
(9.8037067799313, 7.511646515375161, 10.73231470867136, 12.116949346773964, 12.21241373357437, 6.947268673016157, 6.147750663492849, 7.47491588592945, 13.47384194172352, 6.404839182689379, 7.581131836359027, 9.108497314282296, 10.859004644096458), # 171
(9.414149195198457, 7.205280265955825, 10.318795649630257, 11.644376069623315, 11.740535495402677, 6.682883615519281, 5.900625715266118, 7.191326227419487, 12.965065026625595, 6.151880317390344, 7.282903395522049, 8.752327864617548, 10.438762991665145), # 172
(9.015926634730764, 6.893288974078996, 9.894134710455681, 11.159953480058356, 11.256148725954663, 6.410863229929695, 5.64843908359647, 6.899411591369322, 12.440973535719161, 5.893066999957107, 6.97757894080952, 8.387377374158506, 10.007491061193234), # 173
(8.610452322453618, 6.576704976616772, 9.459961969976282, 10.665484939118773, 10.76109942191844, 6.132283594284034, 5.3920579546365754, 6.600335876627689, 11.903680268288936, 5.629332176846904, 6.66627120178187, 8.014995175283403, 9.566825591751181), # 174
(8.19913948229242, 6.256560610441251, 9.017907507020714, 10.162773807844262, 10.257233579982124, 5.848220786618931, 5.132349514539104, 6.295262982043313, 11.35529802361963, 5.361608794516964, 6.3500929079995245, 7.636530600370466, 9.118403322409455), # 175
(7.783401338172574, 5.933888212424531, 8.569601400417621, 9.653623447274505, 9.746397196833835, 5.55975088497102, 4.870180949456727, 5.985356806464928, 10.797939600995955, 5.090829799424521, 6.0301567890229135, 7.253332981797922, 8.663860992238513), # 176
(7.364651114019479, 5.6097201194387125, 8.116673728995655, 9.13983721844919, 9.230436269161691, 5.267949967376934, 4.606419445542112, 5.671781248741259, 10.233717799702626, 4.817928138026804, 5.7075755744124645, 6.866751651944002, 8.204835340308824), # 177
(6.944302033758534, 5.285088668355891, 7.660754571583465, 8.623218482408008, 8.711196793653805, 4.973894111873309, 4.341932188947932, 5.355700207721038, 9.664745419024355, 4.54383675678105, 5.383461993728603, 6.478135943186929, 7.742963105690853), # 178
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 179
)
passenger_arriving_acc = (
(9, 4, 6, 7, 12, 3, 2, 3, 4, 1, 1, 2, 0, 11, 5, 3, 7, 2, 8, 5, 2, 3, 1, 2, 2, 0), # 0
(16, 11, 11, 19, 19, 3, 8, 10, 6, 1, 5, 3, 0, 16, 14, 8, 8, 10, 10, 8, 3, 7, 8, 6, 2, 0), # 1
(25, 33, 20, 29, 28, 6, 10, 14, 14, 4, 6, 5, 0, 23, 25, 14, 16, 24, 14, 14, 9, 12, 11, 10, 3, 0), # 2
(38, 47, 29, 40, 39, 11, 16, 18, 18, 7, 6, 5, 0, 36, 34, 20, 20, 36, 23, 17, 13, 15, 14, 10, 3, 0), # 3
(45, 54, 43, 53, 45, 17, 17, 22, 22, 8, 8, 6, 0, 43, 45, 31, 29, 47, 31, 20, 15, 19, 17, 12, 4, 0), # 4
(55, 68, 51, 60, 52, 27, 20, 27, 23, 9, 10, 7, 0, 51, 56, 43, 38, 56, 37, 25, 22, 22, 22, 13, 6, 0), # 5
(68, 76, 63, 70, 63, 31, 21, 28, 31, 12, 12, 8, 0, 66, 60, 54, 44, 58, 47, 31, 26, 24, 29, 14, 7, 0), # 6
(78, 91, 75, 87, 76, 38, 23, 34, 35, 14, 17, 9, 0, 84, 71, 64, 47, 73, 55, 33, 29, 32, 32, 18, 8, 0), # 7
(86, 106, 89, 102, 88, 42, 33, 38, 43, 17, 21, 10, 0, 99, 76, 70, 52, 83, 61, 43, 31, 36, 35, 19, 8, 0), # 8
(102, 122, 95, 112, 102, 49, 41, 43, 47, 19, 24, 13, 0, 114, 94, 79, 57, 97, 74, 50, 35, 43, 39, 21, 9, 0), # 9
(112, 141, 107, 132, 110, 55, 51, 47, 53, 22, 26, 13, 0, 121, 108, 90, 66, 110, 83, 56, 38, 50, 42, 21, 11, 0), # 10
(123, 157, 120, 150, 120, 62, 56, 51, 57, 24, 29, 16, 0, 142, 122, 103, 72, 120, 88, 60, 44, 55, 48, 27, 11, 0), # 11
(140, 167, 143, 171, 137, 64, 61, 58, 59, 30, 30, 17, 0, 167, 136, 116, 81, 133, 94, 66, 47, 63, 53, 29, 12, 0), # 12
(158, 186, 156, 191, 150, 77, 67, 65, 67, 33, 33, 18, 0, 181, 143, 127, 92, 147, 106, 76, 51, 68, 61, 30, 14, 0), # 13
(172, 200, 173, 211, 166, 84, 73, 74, 77, 34, 37, 18, 0, 195, 158, 138, 107, 154, 115, 84, 51, 74, 66, 32, 14, 0), # 14
(186, 216, 191, 222, 173, 91, 82, 81, 89, 37, 39, 18, 0, 209, 167, 154, 112, 162, 121, 93, 56, 78, 72, 35, 14, 0), # 15
(199, 244, 206, 235, 192, 97, 91, 88, 95, 45, 44, 19, 0, 228, 179, 173, 125, 173, 126, 99, 59, 88, 77, 36, 15, 0), # 16
(219, 258, 230, 251, 206, 100, 97, 93, 99, 48, 45, 19, 0, 242, 189, 186, 132, 190, 136, 106, 64, 91, 85, 41, 19, 0), # 17
(238, 267, 248, 268, 230, 104, 99, 98, 108, 49, 46, 21, 0, 271, 206, 201, 145, 204, 143, 115, 66, 96, 93, 42, 20, 0), # 18
(264, 289, 253, 282, 245, 107, 102, 103, 112, 51, 47, 22, 0, 288, 233, 210, 153, 225, 149, 122, 70, 104, 101, 46, 24, 0), # 19
(280, 301, 266, 298, 259, 113, 118, 107, 120, 51, 47, 23, 0, 303, 258, 219, 165, 240, 159, 135, 75, 113, 104, 49, 26, 0), # 20
(299, 315, 284, 325, 276, 124, 124, 119, 125, 55, 49, 24, 0, 320, 272, 230, 174, 254, 171, 144, 80, 119, 113, 50, 30, 0), # 21
(323, 333, 298, 341, 289, 129, 130, 126, 131, 57, 52, 25, 0, 337, 286, 246, 186, 272, 180, 150, 84, 124, 117, 54, 33, 0), # 22
(341, 348, 310, 363, 299, 133, 135, 133, 136, 61, 54, 25, 0, 353, 302, 260, 196, 286, 192, 157, 91, 128, 127, 55, 34, 0), # 23
(361, 367, 329, 377, 321, 142, 140, 143, 144, 61, 55, 28, 0, 374, 321, 283, 208, 299, 206, 162, 95, 131, 132, 56, 34, 0), # 24
(379, 388, 342, 392, 330, 154, 149, 150, 147, 67, 56, 29, 0, 394, 337, 291, 223, 312, 213, 166, 96, 139, 136, 62, 36, 0), # 25
(393, 400, 363, 409, 348, 163, 159, 152, 151, 71, 59, 30, 0, 420, 349, 303, 230, 331, 222, 174, 99, 144, 142, 66, 38, 0), # 26
(414, 416, 376, 431, 358, 167, 165, 158, 163, 72, 62, 31, 0, 440, 369, 309, 244, 341, 231, 179, 103, 153, 148, 69, 40, 0), # 27
(430, 434, 395, 451, 374, 175, 169, 163, 167, 75, 63, 32, 0, 458, 389, 314, 256, 361, 238, 184, 108, 163, 152, 70, 40, 0), # 28
(455, 452, 413, 467, 388, 179, 180, 174, 174, 78, 66, 33, 0, 487, 408, 325, 265, 382, 249, 198, 113, 166, 155, 72, 42, 0), # 29
(478, 467, 431, 485, 397, 185, 189, 179, 179, 84, 70, 33, 0, 503, 426, 332, 278, 397, 265, 204, 117, 176, 163, 77, 42, 0), # 30
(495, 486, 446, 495, 406, 191, 196, 191, 185, 86, 75, 36, 0, 529, 437, 344, 289, 412, 276, 213, 120, 182, 166, 81, 43, 0), # 31
(515, 504, 461, 509, 414, 201, 204, 200, 192, 89, 78, 36, 0, 554, 456, 358, 300, 425, 286, 218, 125, 188, 173, 83, 43, 0), # 32
(539, 521, 471, 525, 431, 207, 213, 208, 200, 91, 80, 36, 0, 567, 472, 371, 310, 443, 296, 227, 134, 192, 178, 86, 45, 0), # 33
(562, 542, 485, 538, 442, 213, 222, 218, 207, 98, 82, 36, 0, 581, 483, 384, 321, 458, 305, 235, 140, 195, 184, 94, 47, 0), # 34
(586, 557, 500, 554, 453, 218, 227, 222, 215, 101, 83, 36, 0, 608, 501, 399, 331, 473, 319, 240, 142, 205, 186, 97, 49, 0), # 35
(608, 578, 517, 571, 469, 233, 234, 227, 222, 104, 86, 37, 0, 630, 515, 415, 343, 494, 327, 246, 144, 207, 194, 98, 50, 0), # 36
(632, 597, 530, 582, 483, 242, 242, 238, 226, 108, 89, 38, 0, 647, 533, 422, 358, 511, 335, 251, 151, 210, 196, 100, 52, 0), # 37
(652, 622, 543, 602, 497, 252, 250, 239, 229, 110, 92, 39, 0, 661, 548, 435, 369, 526, 344, 259, 156, 216, 199, 102, 52, 0), # 38
(661, 644, 558, 619, 513, 255, 257, 244, 236, 115, 94, 40, 0, 679, 563, 451, 376, 537, 359, 265, 161, 223, 201, 108, 54, 0), # 39
(681, 660, 568, 638, 522, 260, 265, 250, 245, 119, 98, 41, 0, 698, 582, 465, 381, 552, 369, 271, 169, 226, 206, 108, 54, 0), # 40
(702, 678, 585, 652, 533, 268, 272, 261, 254, 124, 100, 42, 0, 717, 598, 477, 390, 565, 381, 279, 175, 230, 210, 112, 54, 0), # 41
(720, 698, 601, 670, 542, 272, 278, 266, 260, 129, 105, 44, 0, 722, 619, 484, 405, 589, 386, 284, 184, 237, 219, 115, 55, 0), # 42
(738, 717, 616, 694, 559, 278, 286, 273, 269, 134, 110, 45, 0, 737, 635, 499, 411, 602, 395, 294, 191, 247, 227, 120, 57, 0), # 43
(756, 731, 629, 711, 573, 279, 292, 276, 276, 136, 114, 47, 0, 755, 647, 510, 420, 618, 405, 305, 194, 254, 232, 125, 58, 0), # 44
(774, 748, 644, 732, 587, 289, 300, 280, 281, 142, 117, 48, 0, 773, 671, 522, 429, 636, 418, 315, 197, 262, 236, 127, 58, 0), # 45
(787, 771, 663, 742, 606, 291, 313, 284, 284, 145, 117, 48, 0, 788, 691, 538, 436, 649, 429, 323, 202, 270, 244, 127, 58, 0), # 46
(798, 786, 676, 758, 619, 300, 323, 290, 291, 148, 120, 50, 0, 806, 702, 554, 454, 659, 437, 329, 210, 277, 247, 129, 60, 0), # 47
(820, 809, 690, 775, 631, 308, 329, 303, 299, 151, 121, 52, 0, 827, 724, 567, 462, 671, 445, 338, 213, 285, 249, 135, 62, 0), # 48
(838, 829, 704, 795, 641, 322, 338, 311, 310, 154, 124, 52, 0, 844, 739, 581, 476, 686, 453, 344, 217, 296, 258, 137, 62, 0), # 49
(851, 849, 724, 814, 656, 325, 345, 319, 323, 156, 130, 54, 0, 862, 755, 590, 483, 695, 459, 349, 223, 304, 260, 144, 62, 0), # 50
(870, 865, 740, 825, 669, 331, 351, 326, 334, 162, 132, 57, 0, 881, 777, 600, 494, 712, 467, 353, 227, 310, 270, 147, 62, 0), # 51
(884, 885, 750, 842, 680, 337, 357, 331, 345, 163, 133, 58, 0, 907, 793, 608, 500, 733, 478, 353, 232, 314, 276, 149, 62, 0), # 52
(908, 904, 768, 859, 686, 342, 361, 343, 355, 167, 137, 60, 0, 927, 808, 616, 515, 752, 487, 364, 235, 318, 282, 154, 65, 0), # 53
(931, 916, 782, 878, 700, 352, 367, 352, 361, 169, 140, 61, 0, 940, 820, 627, 527, 763, 494, 367, 240, 324, 284, 159, 66, 0), # 54
(945, 932, 803, 891, 716, 362, 374, 358, 366, 170, 145, 62, 0, 961, 837, 637, 537, 780, 500, 377, 245, 327, 295, 163, 71, 0), # 55
(966, 941, 814, 910, 728, 369, 379, 365, 371, 171, 147, 63, 0, 978, 853, 653, 545, 793, 515, 387, 247, 335, 299, 166, 73, 0), # 56
(988, 958, 829, 931, 738, 378, 389, 372, 375, 176, 150, 63, 0, 995, 877, 668, 555, 800, 521, 391, 251, 347, 304, 169, 74, 0), # 57
(1014, 972, 845, 951, 748, 387, 396, 378, 381, 181, 153, 64, 0, 1019, 895, 681, 563, 815, 525, 399, 258, 354, 313, 171, 76, 0), # 58
(1033, 986, 858, 967, 762, 393, 401, 383, 390, 181, 159, 64, 0, 1033, 914, 695, 573, 835, 533, 405, 263, 360, 318, 173, 78, 0), # 59
(1059, 1003, 871, 976, 773, 396, 411, 387, 401, 182, 161, 66, 0, 1054, 919, 707, 581, 851, 546, 409, 268, 364, 323, 176, 79, 0), # 60
(1082, 1022, 887, 987, 786, 402, 416, 394, 406, 185, 163, 69, 0, 1075, 945, 719, 589, 869, 548, 411, 269, 371, 326, 180, 79, 0), # 61
(1094, 1047, 901, 1010, 809, 410, 420, 397, 415, 185, 165, 72, 0, 1089, 960, 731, 605, 884, 556, 422, 272, 380, 331, 183, 79, 0), # 62
(1113, 1069, 917, 1025, 822, 416, 425, 407, 420, 187, 168, 72, 0, 1110, 970, 746, 621, 905, 565, 429, 280, 385, 337, 185, 81, 0), # 63
(1131, 1090, 927, 1040, 829, 418, 432, 412, 427, 189, 171, 73, 0, 1125, 979, 751, 627, 920, 576, 435, 283, 391, 342, 189, 83, 0), # 64
(1158, 1110, 939, 1060, 841, 426, 436, 418, 435, 193, 171, 73, 0, 1138, 998, 766, 636, 941, 582, 443, 286, 396, 346, 191, 85, 0), # 65
(1174, 1127, 955, 1080, 848, 431, 444, 423, 442, 194, 172, 75, 0, 1161, 1012, 780, 639, 965, 588, 451, 289, 408, 352, 193, 86, 0), # 66
(1195, 1141, 969, 1099, 862, 436, 449, 430, 449, 197, 173, 75, 0, 1180, 1024, 799, 651, 981, 593, 458, 296, 415, 356, 196, 92, 0), # 67
(1212, 1154, 980, 1113, 879, 443, 454, 434, 453, 202, 178, 77, 0, 1199, 1037, 812, 660, 995, 599, 464, 304, 425, 362, 198, 95, 0), # 68
(1228, 1161, 991, 1131, 893, 448, 463, 438, 455, 207, 180, 78, 0, 1213, 1047, 825, 669, 1011, 604, 473, 311, 435, 369, 200, 95, 0), # 69
(1241, 1181, 1003, 1156, 908, 458, 472, 440, 459, 209, 182, 79, 0, 1230, 1058, 839, 677, 1023, 613, 477, 317, 438, 375, 203, 96, 0), # 70
(1253, 1194, 1020, 1170, 923, 465, 481, 443, 467, 210, 185, 81, 0, 1245, 1072, 848, 692, 1045, 618, 487, 321, 445, 383, 205, 97, 0), # 71
(1270, 1209, 1036, 1196, 941, 472, 488, 446, 473, 212, 189, 81, 0, 1259, 1078, 864, 700, 1057, 632, 490, 328, 451, 389, 206, 99, 0), # 72
(1291, 1220, 1052, 1215, 955, 480, 499, 448, 482, 215, 190, 82, 0, 1274, 1094, 873, 704, 1074, 641, 497, 333, 458, 401, 209, 102, 0), # 73
(1313, 1236, 1067, 1233, 966, 486, 504, 452, 489, 217, 194, 85, 0, 1282, 1109, 882, 718, 1085, 647, 499, 339, 463, 403, 209, 104, 0), # 74
(1331, 1256, 1081, 1246, 981, 487, 512, 455, 497, 219, 198, 85, 0, 1300, 1123, 894, 733, 1104, 651, 503, 342, 466, 406, 212, 106, 0), # 75
(1353, 1278, 1093, 1259, 998, 497, 519, 457, 503, 222, 199, 85, 0, 1320, 1134, 906, 742, 1112, 658, 512, 348, 473, 411, 216, 107, 0), # 76
(1367, 1289, 1108, 1274, 1009, 505, 529, 464, 507, 225, 201, 86, 0, 1334, 1150, 925, 752, 1126, 662, 519, 355, 481, 417, 217, 110, 0), # 77
(1380, 1307, 1119, 1293, 1015, 516, 538, 468, 512, 226, 201, 87, 0, 1348, 1169, 935, 760, 1138, 665, 529, 359, 486, 421, 220, 111, 0), # 78
(1403, 1317, 1139, 1311, 1022, 521, 545, 470, 521, 231, 202, 91, 0, 1372, 1182, 947, 766, 1150, 673, 535, 364, 496, 427, 223, 112, 0), # 79
(1422, 1333, 1150, 1327, 1035, 529, 551, 477, 524, 234, 206, 92, 0, 1389, 1197, 961, 779, 1161, 683, 541, 367, 506, 431, 224, 115, 0), # 80
(1436, 1350, 1162, 1337, 1047, 534, 555, 483, 530, 238, 208, 92, 0, 1404, 1210, 975, 788, 1174, 691, 550, 370, 512, 435, 226, 117, 0), # 81
(1452, 1360, 1182, 1354, 1063, 539, 560, 483, 538, 241, 208, 92, 0, 1424, 1232, 996, 797, 1186, 699, 553, 375, 520, 440, 230, 119, 0), # 82
(1469, 1374, 1196, 1367, 1077, 546, 569, 488, 544, 247, 209, 92, 0, 1449, 1241, 1006, 806, 1199, 704, 559, 378, 526, 446, 233, 119, 0), # 83
(1484, 1389, 1213, 1382, 1092, 552, 575, 491, 553, 248, 209, 93, 0, 1465, 1264, 1016, 817, 1209, 711, 567, 383, 535, 451, 234, 119, 0), # 84
(1500, 1402, 1225, 1388, 1111, 559, 582, 501, 560, 250, 213, 94, 0, 1485, 1278, 1024, 827, 1220, 715, 571, 390, 540, 454, 236, 119, 0), # 85
(1520, 1419, 1250, 1400, 1125, 562, 591, 506, 568, 254, 217, 97, 0, 1506, 1291, 1039, 836, 1238, 725, 578, 395, 543, 459, 236, 120, 0), # 86
(1546, 1434, 1262, 1420, 1140, 570, 597, 507, 575, 254, 220, 97, 0, 1524, 1304, 1047, 842, 1247, 732, 584, 399, 550, 465, 240, 121, 0), # 87
(1564, 1441, 1275, 1439, 1154, 575, 602, 511, 582, 260, 228, 97, 0, 1541, 1317, 1061, 849, 1266, 742, 595, 407, 557, 472, 243, 121, 0), # 88
(1579, 1453, 1289, 1454, 1175, 582, 608, 517, 588, 264, 231, 97, 0, 1553, 1343, 1072, 860, 1278, 752, 603, 411, 566, 479, 249, 124, 0), # 89
(1590, 1460, 1305, 1471, 1190, 591, 611, 522, 595, 268, 236, 97, 0, 1569, 1359, 1081, 870, 1291, 757, 607, 418, 574, 491, 252, 125, 0), # 90
(1612, 1470, 1310, 1486, 1202, 594, 618, 529, 599, 270, 237, 99, 0, 1595, 1371, 1094, 874, 1302, 765, 613, 423, 580, 499, 253, 125, 0), # 91
(1625, 1478, 1329, 1507, 1219, 604, 623, 534, 610, 272, 240, 101, 0, 1609, 1384, 1106, 883, 1321, 767, 618, 427, 585, 504, 254, 126, 0), # 92
(1639, 1488, 1342, 1520, 1237, 612, 630, 537, 617, 275, 241, 102, 0, 1623, 1397, 1115, 889, 1339, 778, 621, 429, 592, 506, 257, 127, 0), # 93
(1646, 1503, 1365, 1540, 1251, 624, 637, 544, 631, 280, 242, 103, 0, 1647, 1409, 1123, 897, 1348, 789, 624, 434, 600, 508, 264, 130, 0), # 94
(1663, 1520, 1379, 1555, 1260, 629, 640, 548, 640, 282, 245, 103, 0, 1664, 1428, 1136, 910, 1360, 792, 628, 435, 610, 517, 264, 130, 0), # 95
(1681, 1538, 1395, 1569, 1271, 635, 645, 557, 650, 285, 250, 103, 0, 1685, 1439, 1146, 917, 1371, 797, 634, 438, 613, 523, 267, 131, 0), # 96
(1695, 1551, 1404, 1583, 1284, 638, 650, 563, 658, 289, 255, 104, 0, 1708, 1450, 1157, 926, 1384, 800, 642, 440, 624, 529, 269, 132, 0), # 97
(1708, 1561, 1414, 1604, 1299, 643, 654, 565, 665, 293, 256, 104, 0, 1726, 1467, 1161, 931, 1401, 806, 647, 441, 635, 531, 274, 133, 0), # 98
(1725, 1572, 1422, 1627, 1317, 646, 657, 570, 672, 295, 260, 105, 0, 1748, 1478, 1172, 944, 1415, 821, 652, 446, 642, 534, 276, 136, 0), # 99
(1748, 1586, 1428, 1643, 1335, 649, 663, 578, 681, 298, 264, 105, 0, 1774, 1495, 1184, 951, 1428, 828, 659, 451, 648, 538, 280, 139, 0), # 100
(1762, 1603, 1443, 1662, 1347, 655, 671, 581, 687, 300, 267, 105, 0, 1795, 1507, 1195, 957, 1441, 831, 665, 455, 660, 542, 281, 140, 0), # 101
(1778, 1613, 1453, 1670, 1353, 663, 677, 584, 693, 304, 269, 107, 0, 1814, 1514, 1204, 966, 1455, 841, 672, 462, 665, 550, 284, 140, 0), # 102
(1798, 1622, 1469, 1683, 1367, 668, 680, 592, 699, 305, 272, 110, 0, 1839, 1528, 1219, 977, 1470, 848, 677, 467, 674, 556, 287, 140, 0), # 103
(1817, 1636, 1481, 1697, 1384, 673, 685, 598, 702, 307, 273, 115, 0, 1862, 1534, 1226, 983, 1477, 860, 680, 470, 681, 558, 290, 141, 0), # 104
(1837, 1655, 1489, 1711, 1394, 681, 690, 600, 709, 310, 275, 116, 0, 1880, 1545, 1241, 994, 1490, 867, 686, 476, 686, 564, 290, 142, 0), # 105
(1853, 1668, 1508, 1719, 1409, 684, 692, 604, 716, 313, 276, 119, 0, 1901, 1560, 1248, 1001, 1503, 873, 690, 478, 693, 568, 292, 143, 0), # 106
(1870, 1682, 1519, 1729, 1425, 690, 695, 607, 722, 316, 279, 120, 0, 1907, 1576, 1262, 1009, 1521, 885, 696, 483, 700, 570, 298, 144, 0), # 107
(1888, 1698, 1533, 1744, 1435, 699, 704, 614, 729, 317, 280, 120, 0, 1921, 1591, 1274, 1014, 1532, 893, 707, 490, 710, 572, 301, 149, 0), # 108
(1903, 1717, 1549, 1764, 1452, 707, 706, 618, 741, 319, 283, 121, 0, 1937, 1604, 1283, 1023, 1548, 901, 713, 494, 712, 582, 306, 150, 0), # 109
(1917, 1730, 1566, 1780, 1463, 711, 712, 621, 753, 319, 283, 122, 0, 1960, 1622, 1292, 1027, 1561, 911, 719, 496, 716, 586, 309, 151, 0), # 110
(1935, 1738, 1584, 1799, 1481, 715, 720, 628, 761, 323, 285, 122, 0, 1984, 1635, 1300, 1037, 1571, 915, 727, 500, 723, 592, 310, 155, 0), # 111
(1959, 1747, 1598, 1816, 1493, 724, 726, 631, 769, 328, 289, 122, 0, 2001, 1647, 1311, 1042, 1586, 920, 735, 507, 733, 600, 313, 155, 0), # 112
(1970, 1760, 1605, 1831, 1506, 729, 736, 635, 778, 330, 292, 122, 0, 2016, 1665, 1322, 1049, 1599, 924, 739, 509, 742, 603, 319, 155, 0), # 113
(1984, 1778, 1619, 1840, 1517, 734, 740, 639, 785, 334, 296, 123, 0, 2036, 1673, 1339, 1056, 1610, 930, 745, 511, 752, 610, 323, 157, 0), # 114
(2005, 1795, 1638, 1855, 1528, 743, 746, 648, 790, 337, 298, 123, 0, 2048, 1695, 1347, 1065, 1624, 936, 750, 515, 758, 617, 324, 157, 0), # 115
(2019, 1804, 1657, 1870, 1540, 751, 753, 652, 794, 337, 300, 125, 0, 2060, 1707, 1358, 1072, 1639, 945, 754, 519, 766, 624, 327, 158, 0), # 116
(2036, 1820, 1669, 1888, 1552, 756, 759, 656, 801, 340, 303, 127, 0, 2078, 1722, 1366, 1083, 1659, 953, 761, 526, 770, 632, 327, 158, 0), # 117
(2051, 1833, 1683, 1905, 1559, 763, 769, 661, 811, 344, 304, 127, 0, 2092, 1735, 1377, 1090, 1674, 959, 774, 527, 776, 637, 329, 159, 0), # 118
(2070, 1841, 1694, 1920, 1569, 774, 776, 670, 817, 346, 305, 127, 0, 2110, 1751, 1389, 1099, 1692, 964, 776, 530, 779, 643, 332, 159, 0), # 119
(2085, 1848, 1707, 1937, 1584, 777, 780, 676, 824, 346, 305, 129, 0, 2124, 1762, 1399, 1110, 1698, 968, 781, 534, 786, 647, 334, 160, 0), # 120
(2099, 1860, 1719, 1957, 1593, 781, 785, 681, 826, 352, 309, 130, 0, 2143, 1777, 1407, 1118, 1712, 971, 785, 535, 792, 648, 338, 162, 0), # 121
(2117, 1871, 1731, 1968, 1599, 785, 791, 688, 836, 355, 310, 131, 0, 2158, 1792, 1422, 1122, 1724, 979, 788, 543, 799, 655, 340, 162, 0), # 122
(2131, 1884, 1743, 1987, 1614, 793, 796, 691, 840, 356, 310, 132, 0, 2174, 1803, 1427, 1128, 1733, 986, 790, 548, 802, 659, 342, 163, 0), # 123
(2142, 1889, 1756, 1996, 1628, 799, 801, 697, 845, 357, 310, 136, 0, 2197, 1814, 1436, 1140, 1748, 996, 800, 555, 809, 664, 345, 163, 0), # 124
(2158, 1901, 1769, 2013, 1641, 802, 807, 702, 852, 361, 314, 139, 0, 2211, 1826, 1448, 1147, 1758, 1004, 806, 557, 814, 666, 354, 166, 0), # 125
(2171, 1917, 1778, 2025, 1656, 812, 812, 707, 858, 362, 315, 140, 0, 2229, 1842, 1463, 1155, 1771, 1013, 814, 561, 818, 670, 356, 167, 0), # 126
(2180, 1925, 1787, 2032, 1666, 820, 817, 714, 869, 364, 317, 141, 0, 2251, 1856, 1469, 1163, 1785, 1021, 819, 564, 821, 672, 359, 168, 0), # 127
(2202, 1939, 1799, 2046, 1684, 826, 819, 718, 876, 367, 318, 144, 0, 2265, 1873, 1480, 1173, 1798, 1027, 822, 568, 825, 677, 361, 168, 0), # 128
(2219, 1951, 1821, 2064, 1696, 830, 822, 718, 885, 369, 318, 146, 0, 2278, 1883, 1487, 1177, 1813, 1033, 828, 571, 836, 683, 363, 169, 0), # 129
(2241, 1962, 1834, 2085, 1707, 834, 827, 725, 889, 371, 321, 147, 0, 2297, 1897, 1495, 1182, 1825, 1042, 834, 577, 843, 684, 363, 170, 0), # 130
(2258, 1970, 1844, 2098, 1717, 839, 829, 726, 893, 374, 322, 147, 0, 2315, 1910, 1506, 1191, 1832, 1047, 839, 580, 850, 687, 367, 171, 0), # 131
(2274, 1984, 1859, 2111, 1728, 847, 837, 732, 898, 377, 324, 148, 0, 2322, 1920, 1510, 1200, 1848, 1052, 845, 588, 857, 692, 369, 171, 0), # 132
(2288, 1998, 1869, 2126, 1743, 853, 843, 736, 903, 377, 324, 148, 0, 2339, 1926, 1522, 1208, 1860, 1058, 846, 596, 865, 698, 372, 171, 0), # 133
(2307, 2011, 1882, 2139, 1754, 860, 847, 738, 912, 379, 325, 149, 0, 2350, 1935, 1535, 1212, 1877, 1070, 852, 600, 876, 702, 374, 173, 0), # 134
(2332, 2023, 1894, 2159, 1764, 864, 847, 742, 915, 381, 327, 150, 0, 2369, 1946, 1544, 1221, 1898, 1074, 857, 603, 881, 708, 376, 173, 0), # 135
(2353, 2031, 1914, 2178, 1775, 876, 853, 744, 924, 383, 331, 152, 0, 2390, 1954, 1551, 1229, 1907, 1077, 864, 608, 890, 712, 376, 174, 0), # 136
(2364, 2043, 1931, 2198, 1787, 886, 855, 745, 931, 385, 334, 154, 0, 2402, 1974, 1558, 1237, 1921, 1082, 868, 613, 901, 718, 377, 175, 0), # 137
(2382, 2057, 1939, 2213, 1798, 887, 857, 747, 937, 386, 335, 155, 0, 2418, 1982, 1571, 1246, 1932, 1087, 875, 615, 906, 728, 379, 176, 0), # 138
(2393, 2070, 1953, 2237, 1822, 894, 861, 748, 944, 390, 339, 155, 0, 2434, 1993, 1581, 1251, 1945, 1097, 879, 619, 916, 733, 381, 177, 0), # 139
(2403, 2083, 1959, 2247, 1838, 901, 863, 751, 948, 395, 340, 156, 0, 2462, 2005, 1589, 1262, 1957, 1109, 881, 621, 919, 739, 384, 178, 0), # 140
(2421, 2094, 1972, 2264, 1859, 904, 872, 753, 954, 399, 341, 157, 0, 2482, 2016, 1595, 1267, 1970, 1114, 884, 622, 925, 742, 384, 180, 0), # 141
(2432, 2103, 1982, 2278, 1870, 910, 877, 758, 959, 403, 342, 161, 0, 2496, 2023, 1604, 1275, 1977, 1120, 886, 627, 933, 748, 389, 180, 0), # 142
(2441, 2112, 1996, 2294, 1880, 917, 881, 760, 961, 407, 345, 162, 0, 2514, 2039, 1613, 1286, 1985, 1129, 889, 632, 939, 752, 391, 180, 0), # 143
(2454, 2126, 2006, 2316, 1892, 920, 890, 767, 966, 411, 346, 163, 0, 2526, 2059, 1621, 1292, 1995, 1138, 893, 637, 948, 755, 394, 180, 0), # 144
(2467, 2133, 2022, 2331, 1904, 923, 893, 774, 969, 414, 347, 165, 0, 2547, 2075, 1632, 1297, 2009, 1143, 897, 645, 957, 760, 394, 182, 0), # 145
(2483, 2145, 2034, 2338, 1912, 928, 899, 777, 976, 417, 348, 166, 0, 2557, 2092, 1641, 1308, 2020, 1148, 904, 648, 970, 765, 395, 183, 0), # 146
(2491, 2156, 2044, 2349, 1921, 933, 906, 781, 986, 421, 349, 167, 0, 2570, 2103, 1649, 1313, 2030, 1158, 910, 649, 976, 769, 397, 183, 0), # 147
(2507, 2165, 2058, 2362, 1934, 945, 911, 785, 990, 422, 351, 170, 0, 2583, 2117, 1656, 1320, 2043, 1165, 914, 652, 982, 773, 401, 185, 0), # 148
(2519, 2175, 2070, 2376, 1948, 952, 917, 790, 999, 423, 352, 173, 0, 2595, 2131, 1665, 1325, 2056, 1171, 919, 653, 987, 776, 403, 185, 0), # 149
(2532, 2186, 2088, 2388, 1957, 957, 924, 793, 1005, 426, 355, 175, 0, 2618, 2143, 1681, 1334, 2069, 1176, 921, 658, 994, 780, 404, 186, 0), # 150
(2551, 2194, 2100, 2398, 1968, 962, 927, 794, 1012, 427, 357, 176, 0, 2629, 2157, 1692, 1344, 2077, 1183, 929, 662, 995, 784, 408, 186, 0), # 151
(2566, 2199, 2107, 2413, 1978, 967, 930, 798, 1020, 431, 358, 176, 0, 2643, 2167, 1701, 1351, 2093, 1191, 933, 663, 1003, 785, 409, 186, 0), # 152
(2577, 2206, 2120, 2423, 1992, 971, 935, 801, 1024, 431, 362, 178, 0, 2657, 2176, 1706, 1361, 2108, 1196, 937, 669, 1009, 788, 409, 187, 0), # 153
(2589, 2218, 2138, 2435, 2007, 978, 940, 805, 1029, 433, 364, 178, 0, 2670, 2190, 1711, 1364, 2126, 1201, 941, 676, 1014, 791, 409, 187, 0), # 154
(2605, 2228, 2148, 2447, 2017, 983, 945, 811, 1033, 436, 366, 179, 0, 2691, 2206, 1728, 1368, 2139, 1206, 946, 677, 1020, 795, 411, 188, 0), # 155
(2614, 2234, 2154, 2459, 2028, 988, 951, 814, 1037, 440, 367, 179, 0, 2707, 2216, 1733, 1378, 2153, 1210, 951, 683, 1028, 795, 415, 189, 0), # 156
(2628, 2244, 2173, 2464, 2030, 992, 954, 818, 1041, 444, 369, 180, 0, 2718, 2235, 1740, 1384, 2168, 1219, 954, 688, 1037, 798, 418, 191, 0), # 157
(2636, 2255, 2183, 2480, 2046, 1000, 955, 823, 1048, 448, 370, 181, 0, 2726, 2246, 1748, 1390, 2173, 1223, 957, 692, 1041, 803, 420, 195, 0), # 158
(2649, 2265, 2200, 2487, 2056, 1004, 964, 830, 1054, 450, 371, 183, 0, 2731, 2262, 1756, 1395, 2185, 1229, 963, 696, 1045, 807, 420, 196, 0), # 159
(2660, 2281, 2213, 2493, 2072, 1010, 967, 832, 1060, 451, 371, 183, 0, 2740, 2266, 1767, 1400, 2193, 1236, 968, 702, 1047, 811, 420, 196, 0), # 160
(2672, 2287, 2219, 2509, 2086, 1015, 967, 837, 1063, 452, 374, 184, 0, 2753, 2279, 1771, 1411, 2205, 1239, 969, 704, 1051, 815, 424, 197, 0), # 161
(2686, 2295, 2232, 2520, 2093, 1020, 968, 841, 1067, 453, 375, 185, 0, 2768, 2286, 1778, 1416, 2218, 1245, 973, 708, 1061, 819, 424, 197, 0), # 162
(2695, 2302, 2246, 2529, 2108, 1027, 971, 842, 1074, 455, 377, 189, 0, 2777, 2296, 1785, 1420, 2238, 1251, 983, 712, 1072, 823, 427, 198, 0), # 163
(2711, 2314, 2254, 2536, 2123, 1028, 972, 844, 1079, 457, 379, 190, 0, 2790, 2312, 1796, 1425, 2248, 1255, 990, 713, 1074, 827, 430, 198, 0), # 164
(2723, 2326, 2263, 2548, 2131, 1030, 974, 848, 1084, 458, 380, 191, 0, 2804, 2320, 1802, 1429, 2260, 1261, 996, 717, 1076, 830, 432, 200, 0), # 165
(2735, 2331, 2273, 2557, 2140, 1035, 976, 857, 1093, 459, 381, 191, 0, 2815, 2325, 1806, 1438, 2271, 1266, 999, 721, 1081, 833, 435, 200, 0), # 166
(2740, 2338, 2284, 2566, 2154, 1044, 980, 858, 1097, 462, 385, 194, 0, 2831, 2333, 1810, 1443, 2279, 1270, 1002, 724, 1086, 839, 437, 200, 0), # 167
(2750, 2343, 2292, 2580, 2161, 1046, 983, 860, 1101, 466, 386, 194, 0, 2844, 2342, 1818, 1449, 2293, 1273, 1009, 728, 1091, 843, 440, 200, 0), # 168
(2760, 2354, 2304, 2589, 2169, 1049, 987, 867, 1106, 467, 388, 198, 0, 2851, 2353, 1828, 1453, 2305, 1275, 1012, 732, 1096, 844, 442, 200, 0), # 169
(2771, 2363, 2317, 2594, 2179, 1053, 988, 873, 1107, 471, 389, 200, 0, 2863, 2368, 1841, 1456, 2312, 1276, 1015, 735, 1101, 847, 445, 201, 0), # 170
(2780, 2373, 2328, 2607, 2193, 1055, 989, 878, 1111, 472, 390, 200, 0, 2875, 2373, 1847, 1461, 2315, 1279, 1018, 736, 1109, 848, 447, 201, 0), # 171
(2792, 2380, 2338, 2617, 2199, 1059, 995, 880, 1114, 473, 391, 200, 0, 2881, 2382, 1853, 1465, 2323, 1283, 1021, 739, 1123, 849, 448, 202, 0), # 172
(2797, 2385, 2353, 2623, 2207, 1061, 998, 880, 1119, 474, 392, 201, 0, 2889, 2391, 1857, 1467, 2327, 1292, 1021, 741, 1128, 853, 448, 202, 0), # 173
(2801, 2393, 2360, 2633, 2216, 1066, 1000, 881, 1123, 476, 393, 202, 0, 2898, 2401, 1864, 1474, 2334, 1298, 1021, 741, 1130, 856, 450, 203, 0), # 174
(2807, 2397, 2368, 2639, 2224, 1071, 1002, 882, 1128, 477, 395, 203, 0, 2911, 2407, 1868, 1480, 2337, 1302, 1025, 741, 1132, 856, 451, 204, 0), # 175
(2815, 2400, 2376, 2651, 2229, 1075, 1004, 883, 1131, 478, 397, 204, 0, 2920, 2415, 1874, 1482, 2340, 1304, 1026, 744, 1134, 860, 455, 206, 0), # 176
(2824, 2403, 2382, 2658, 2236, 1079, 1009, 887, 1134, 480, 399, 204, 0, 2927, 2422, 1878, 1486, 2346, 1307, 1031, 749, 1139, 863, 455, 206, 0), # 177
(2832, 2408, 2386, 2668, 2243, 1081, 1011, 889, 1137, 482, 400, 204, 0, 2934, 2425, 1881, 1491, 2360, 1310, 1032, 753, 1144, 864, 456, 206, 0), # 178
(2832, 2408, 2386, 2668, 2243, 1081, 1011, 889, 1137, 482, 400, 204, 0, 2934, 2425, 1881, 1491, 2360, 1310, 1032, 753, 1144, 864, 456, 206, 0), # 179
)
passenger_arriving_rate = (
(9.037558041069182, 9.116726123493724, 7.81692484441876, 8.389801494715634, 6.665622729131535, 3.295587678639206, 3.7314320538365235, 3.4898821297345672, 3.654059437300804, 1.781106756985067, 1.261579549165681, 0.7346872617459261, 0.0, 9.150984382641052, 8.081559879205185, 6.307897745828405, 5.3433202709552, 7.308118874601608, 4.885834981628395, 3.7314320538365235, 2.3539911990280045, 3.3328113645657673, 2.7966004982385453, 1.5633849688837522, 0.828793283953975, 0.0), # 0
(9.637788873635953, 9.718600145338852, 8.333019886995228, 8.943944741923431, 7.106988404969084, 3.5132827632446837, 3.9775220471373247, 3.7196352921792815, 3.8953471957997454, 1.8985413115247178, 1.3449288407868398, 0.7831824991221532, 0.0, 9.755624965391739, 8.615007490343684, 6.724644203934198, 5.695623934574153, 7.790694391599491, 5.207489409050994, 3.9775220471373247, 2.509487688031917, 3.553494202484542, 2.9813149139744777, 1.6666039773990458, 0.883509104121714, 0.0), # 1
(10.236101416163518, 10.318085531970116, 8.847063428321121, 9.495883401297473, 7.546755568499692, 3.7301093702380674, 4.222636657164634, 3.948468935928315, 4.135672084126529, 2.015511198759246, 1.4279469446328943, 0.8314848978079584, 0.0, 10.357856690777442, 9.14633387588754, 7.13973472316447, 6.046533596277737, 8.271344168253059, 5.527856510299641, 4.222636657164634, 2.6643638358843336, 3.773377784249846, 3.1652944670991583, 1.7694126856642243, 0.938007775633647, 0.0), # 2
(10.830164027663812, 10.912803828195138, 9.357016303979782, 10.0434281501683, 7.983194011202283, 3.9452076537143688, 4.46580327748316, 4.175475868120881, 4.374081096552656, 2.1315522142917818, 1.5103045235482149, 0.8794028527395692, 0.0, 10.955291051257605, 9.67343138013526, 7.551522617741075, 6.3946566428753435, 8.748162193105312, 5.845666215369232, 4.46580327748316, 2.818005466938835, 3.9915970056011414, 3.3478093833894342, 1.8714032607959565, 0.9920730752904672, 0.0), # 3
(11.417645067148767, 11.500376578821527, 9.860839349554556, 10.584389665866468, 8.41457352455579, 4.1577177677686015, 4.706049301657613, 4.399748895896186, 4.609621227349624, 2.246200153725456, 1.5916722403771728, 0.9267447588532147, 0.0, 11.54553953929167, 10.19419234738536, 7.958361201885864, 6.738600461176366, 9.219242454699248, 6.159648454254661, 4.706049301657613, 2.969798405549001, 4.207286762277895, 3.528129888622157, 1.9721678699109113, 1.0454887798928663, 0.0), # 4
(11.996212893630318, 12.07842532865692, 10.356493400628777, 11.11657862572253, 8.839163900039136, 4.366779866495776, 4.942402123252702, 4.620380826393444, 4.841339470788935, 2.3589908126633987, 1.67172075796414, 0.9733190110851223, 0.0, 12.126213647339089, 10.706509121936344, 8.358603789820698, 7.076972437990195, 9.68267894157787, 6.468533156950822, 4.942402123252702, 3.119128476068411, 4.419581950019568, 3.705526208574178, 2.071298680125756, 1.0980386662415385, 0.0), # 5
(12.5635358661204, 12.644571622508925, 10.8419392927858, 11.63780570706703, 9.255234929131252, 4.571534103990907, 5.173889135833137, 4.836464466751867, 5.068282821142089, 2.469459986708742, 1.750120739153485, 1.0189340043715214, 0.0, 12.694924867859292, 11.208274048086732, 8.750603695767424, 7.408379960126224, 10.136565642284179, 6.771050253452613, 5.173889135833137, 3.265381502850648, 4.627617464565626, 3.8792685690223445, 2.16838785855716, 1.1495065111371752, 0.0), # 6
(13.117282343630944, 13.196437005185167, 11.315137861608953, 12.145881587230525, 9.661056403311065, 4.771120634349007, 5.399537732963626, 5.047092624110664, 5.289498272680586, 2.5771434714646144, 1.8265428467895808, 1.0633981336486396, 0.0, 13.249284693311735, 11.697379470135033, 9.132714233947903, 7.7314304143938415, 10.578996545361171, 7.06592967375493, 5.399537732963626, 3.4079433102492906, 4.830528201655532, 4.048627195743509, 2.2630275723217905, 1.1996760913804698, 0.0), # 7
(13.655120685173882, 13.731643021493262, 11.774049942681595, 12.638616943543553, 10.054898114057503, 4.964679611665085, 5.618375308208878, 5.251358105609044, 5.504032819675924, 2.681577062534149, 1.9006577437167966, 1.1065197938527056, 0.0, 13.786904616155851, 12.171717732379758, 9.503288718583983, 8.044731187602444, 11.008065639351848, 7.351901347852662, 5.618375308208878, 3.5461997226179176, 5.027449057028751, 4.212872314514518, 2.3548099885363194, 1.248331183772115, 0.0), # 8
(14.174719249761154, 14.247811216240837, 12.216636371587056, 13.11382245333668, 10.43502985284949, 5.151351190034158, 5.829429255133608, 5.4483537183862225, 5.710933456399605, 2.782296555520474, 1.9721360927795035, 1.1481073799199473, 0.0, 14.305396128851092, 12.629181179119417, 9.860680463897518, 8.34688966656142, 11.42186691279921, 7.627695205740712, 5.829429255133608, 3.679536564310113, 5.217514926424745, 4.371274151112227, 2.4433272743174115, 1.2952555651128035, 0.0), # 9
(14.673746396404677, 14.7425631342355, 12.640857983908687, 13.569308793940438, 10.799721411165962, 5.330275523551238, 6.031726967302519, 5.637172269581408, 5.909247177123128, 2.878837746026722, 2.0406485568220725, 1.187969286786593, 0.0, 14.802370723856898, 13.06766215465252, 10.20324278411036, 8.636513238080164, 11.818494354246257, 7.892041177413972, 6.031726967302519, 3.8073396596794558, 5.399860705582981, 4.52310293131348, 2.5281715967817378, 1.3402330122032275, 0.0), # 10
(15.149870484116411, 15.213520320284891, 13.044675615229824, 14.002886642685386, 11.14724258048584, 5.500592766311337, 6.224295838280325, 5.816906566333811, 6.098020976117995, 2.970736429656024, 2.105865798688875, 1.2259139093888718, 0.0, 15.2754398936327, 13.485053003277587, 10.529328993444373, 8.912209288968072, 12.19604195223599, 8.143669192867335, 6.224295838280325, 3.9289948330795266, 5.57362129024292, 4.66762888089513, 2.6089351230459648, 1.3830473018440812, 0.0), # 11
(15.600759871908263, 15.6583043191966, 13.42605010113381, 14.412366676902078, 11.475863152288053, 5.6614430724094635, 6.406163261631731, 5.986649415782641, 6.276301847655707, 3.0575284020115086, 2.1674584812242808, 1.2617496426630104, 0.0, 15.722215130637963, 13.879246069293112, 10.837292406121403, 9.172585206034523, 12.552603695311413, 8.381309182095698, 6.406163261631731, 4.043887908863902, 5.737931576144026, 4.804122225634027, 2.6852100202267626, 1.4234822108360548, 0.0), # 12
(16.02408291879218, 16.074536675778273, 13.782942277203993, 14.795559573921057, 11.783852918051522, 5.8119665959406355, 6.576356630921451, 6.145493625067111, 6.443136786007759, 3.138749458696308, 2.225097267272661, 1.2952848815452382, 0.0, 16.140307927332124, 14.248133696997618, 11.125486336363304, 9.416248376088921, 12.886273572015519, 8.603691075093955, 6.576356630921451, 4.151404711386168, 5.891926459025761, 4.93185319130702, 2.756588455440799, 1.4613215159798432, 0.0), # 13
(16.41750798378009, 16.45983893483752, 14.113312979023721, 15.150276011072872, 12.069481669255186, 5.9513034909998614, 6.733903339714195, 6.292532001326435, 6.597572785445653, 3.2139353953135514, 2.2784528196783858, 1.3263280209717843, 0.0, 16.527329776174614, 14.589608230689624, 11.392264098391927, 9.641806185940652, 13.195145570891306, 8.80954480185701, 6.733903339714195, 4.250931064999901, 6.034740834627593, 5.050092003690958, 2.8226625958047444, 1.4963489940761385, 0.0), # 14
(16.77870342588394, 16.811832641181958, 14.415123042176313, 15.474326665688082, 12.33101919737797, 6.078593911682158, 6.877830781574663, 6.426857351699818, 6.738656840240891, 3.2826220074663714, 2.3271958012858263, 1.3546874558788757, 0.0, 16.880892169624886, 14.90156201466763, 11.63597900642913, 9.847866022399112, 13.477313680481782, 8.997600292379746, 6.877830781574663, 4.341852794058684, 6.165509598688985, 5.158108888562695, 2.883024608435263, 1.5283484219256327, 0.0), # 15
(17.10533760411564, 17.128139339619217, 14.686333302245139, 15.765522215097217, 12.566735293898798, 6.192978012082533, 7.007166350067579, 6.547562483326471, 6.865435944664972, 3.344345090757899, 2.370996874939354, 1.380171581202741, 0.0, 17.198606600142384, 15.181887393230149, 11.85498437469677, 10.033035272273695, 13.730871889329944, 9.16658747665706, 7.007166350067579, 4.423555722916095, 6.283367646949399, 5.255174071699074, 2.9372666604490276, 1.55710357632902, 0.0), # 16
(17.395078877487137, 17.406380574956913, 14.92490459481353, 16.021673336630855, 12.774899750296605, 6.2935959462960005, 7.12093743875764, 6.653740203345614, 6.976957092989391, 3.398640440791261, 2.40952670348334, 1.4025887918796085, 0.0, 17.47808456018655, 15.428476710675692, 12.047633517416699, 10.195921322373781, 13.953914185978782, 9.31523628468386, 7.12093743875764, 4.4954256759257145, 6.387449875148302, 5.340557778876952, 2.984980918962706, 1.5823982340869922, 0.0), # 17
(17.645595605010367, 17.644177892002652, 15.12879775546482, 16.24059070761953, 12.953782358050306, 6.379587868417579, 7.2181714412095666, 6.744483318896446, 7.072267279485658, 3.4450438531695924, 2.4424559497621527, 1.4217474828457075, 0.0, 17.716937542216822, 15.63922231130278, 12.212279748810763, 10.335131559508774, 14.144534558971316, 9.442276646455024, 7.2181714412095666, 4.556848477441128, 6.476891179025153, 5.413530235873177, 3.0257595510929645, 1.6040161720002415, 0.0), # 18
(17.85455614569726, 17.83915283556408, 15.29597361978237, 16.420085005393776, 13.10165290863884, 6.450093932542269, 7.297895750988055, 6.818884637118185, 7.150413498425267, 3.4830911234960236, 2.4694552766201636, 1.4374560490372645, 0.0, 17.912777038692653, 15.812016539409907, 12.347276383100818, 10.449273370488068, 14.300826996850533, 9.546438491965459, 7.297895750988055, 4.607209951815906, 6.55082645431942, 5.473361668464593, 3.059194723956474, 1.621741166869462, 0.0), # 19
(18.01962885855975, 17.988926950448786, 15.424393023349506, 16.55796690728418, 13.216781193541133, 6.504254292765094, 7.359137761657826, 6.876036965150038, 7.210442744079718, 3.5123180473736824, 2.490195346901745, 1.4495228853905089, 0.0, 18.063214542073485, 15.944751739295596, 12.450976734508725, 10.536954142121044, 14.420885488159437, 9.626451751210054, 7.359137761657826, 4.645895923403639, 6.608390596770566, 5.51932230242806, 3.084878604669901, 1.6353569954953444, 0.0), # 20
(18.13848210260976, 18.09112178146442, 15.51201680174958, 16.652047090621256, 13.297437004236105, 6.541209103181062, 7.400924866783583, 6.915033110131218, 7.251402010720512, 3.532260420405701, 2.5043468234512685, 1.4577563868416692, 0.0, 18.165861544818743, 16.03532025525836, 12.52173411725634, 10.5967812612171, 14.502804021441024, 9.681046354183705, 7.400924866783583, 4.672292216557902, 6.648718502118053, 5.550682363540419, 3.1024033603499164, 1.644647434678584, 0.0), # 21
(18.20878423685924, 18.143358873418588, 15.55680579056593, 16.70013623273558, 13.341890132202689, 6.560098517885186, 7.422284459930039, 6.934965879200936, 7.27233829261915, 3.54245403819521, 2.5115803691131027, 1.4619649483269737, 0.0, 18.218329539387888, 16.08161443159671, 12.557901845565512, 10.627362114585626, 14.5446765852383, 9.70895223088131, 7.422284459930039, 4.6857846556322755, 6.6709450661013445, 5.5667120775785275, 3.111361158113186, 1.649396261219872, 0.0), # 22
(18.23470805401675, 18.14954393004115, 15.562384773662554, 16.706156597222225, 13.353278467239116, 6.5625, 7.424823602033405, 6.937120370370371, 7.274955740740741, 3.543656522633746, 2.512487411148522, 1.4624846364883404, 0.0, 18.225, 16.08733100137174, 12.56243705574261, 10.630969567901236, 14.549911481481482, 9.71196851851852, 7.424823602033405, 4.6875, 6.676639233619558, 5.568718865740743, 3.1124769547325113, 1.6499585390946503, 0.0), # 23
(18.253822343461476, 18.145936111111112, 15.561472222222221, 16.705415625000004, 13.359729136337823, 6.5625, 7.42342843137255, 6.934125, 7.274604999999999, 3.5429177777777783, 2.5123873737373743, 1.462362962962963, 0.0, 18.225, 16.085992592592593, 12.561936868686871, 10.628753333333332, 14.549209999999999, 9.707775, 7.42342843137255, 4.6875, 6.679864568168911, 5.568471875000002, 3.1122944444444447, 1.649630555555556, 0.0), # 24
(18.272533014380844, 18.138824588477366, 15.559670781893006, 16.70394965277778, 13.366037934713404, 6.5625, 7.420679012345679, 6.928240740740742, 7.273912037037037, 3.541463477366256, 2.512189019827909, 1.4621227709190674, 0.0, 18.225, 16.08335048010974, 12.560945099139545, 10.624390432098766, 14.547824074074073, 9.69953703703704, 7.420679012345679, 4.6875, 6.683018967356702, 5.567983217592594, 3.1119341563786014, 1.6489840534979427, 0.0), # 25
(18.290838634286462, 18.128318004115226, 15.557005144032923, 16.70177534722222, 13.372204642105325, 6.5625, 7.416618046477849, 6.919578703703704, 7.27288574074074, 3.539317818930042, 2.511894145155257, 1.4617673525377233, 0.0, 18.225, 16.079440877914955, 12.559470725776283, 10.617953456790124, 14.54577148148148, 9.687410185185186, 7.416618046477849, 4.6875, 6.686102321052663, 5.567258449074075, 3.111401028806585, 1.648028909465021, 0.0), # 26
(18.308737770689945, 18.114524999999997, 15.553500000000001, 16.698909375, 13.378229038253057, 6.5625, 7.411288235294118, 6.908250000000002, 7.271535, 3.5365050000000005, 2.5115045454545455, 1.4613000000000003, 0.0, 18.225, 16.0743, 12.557522727272728, 10.609514999999998, 14.54307, 9.671550000000002, 7.411288235294118, 4.6875, 6.689114519126528, 5.566303125, 3.1107000000000005, 1.646775, 0.0), # 27
(18.3262289911029, 18.097554218106993, 15.549180041152265, 16.695368402777778, 13.384110902896083, 6.5625, 7.404732280319536, 6.894365740740742, 7.269868703703704, 3.533049218106997, 2.5110220164609056, 1.4607240054869688, 0.0, 18.225, 16.067964060356655, 12.555110082304529, 10.599147654320989, 14.539737407407408, 9.652112037037039, 7.404732280319536, 4.6875, 6.6920554514480415, 5.565122800925927, 3.1098360082304533, 1.6452322016460905, 0.0), # 28
(18.34331086303695, 18.077514300411522, 15.54406995884774, 16.69116909722222, 13.389850015773863, 6.5625, 7.396992883079159, 6.8780370370370365, 7.267895740740741, 3.5289746707818943, 2.510448353909465, 1.4600426611796984, 0.0, 18.225, 16.06046927297668, 12.552241769547326, 10.58692401234568, 14.535791481481482, 9.629251851851851, 7.396992883079159, 4.6875, 6.694925007886932, 5.563723032407409, 3.1088139917695483, 1.6434103909465023, 0.0), # 29
(18.359981954003697, 18.054513888888888, 15.538194444444445, 16.686328125000003, 13.395446156625884, 6.5625, 7.388112745098039, 6.859375, 7.265625, 3.5243055555555567, 2.509785353535354, 1.4592592592592593, 0.0, 18.225, 16.05185185185185, 12.548926767676768, 10.572916666666668, 14.53125, 9.603125, 7.388112745098039, 4.6875, 6.697723078312942, 5.562109375000001, 3.107638888888889, 1.6413194444444446, 0.0), # 30
(18.376240831514746, 18.028661625514406, 15.531578189300415, 16.680862152777777, 13.400899105191609, 6.5625, 7.378134567901236, 6.838490740740741, 7.26306537037037, 3.5190660699588485, 2.5090348110737, 1.458377091906722, 0.0, 18.225, 16.04214801097394, 12.5451740553685, 10.557198209876542, 14.52613074074074, 9.573887037037037, 7.378134567901236, 4.6875, 6.7004495525958045, 5.56028738425926, 3.106315637860083, 1.638969238683128, 0.0), # 31
(18.392086063081717, 18.000066152263376, 15.524245884773661, 16.674787847222223, 13.406208641210513, 6.5625, 7.3671010530137995, 6.815495370370372, 7.260225740740741, 3.5132804115226346, 2.5081985222596335, 1.4573994513031552, 0.0, 18.225, 16.031393964334704, 12.540992611298167, 10.539841234567902, 14.520451481481482, 9.541693518518521, 7.3671010530137995, 4.6875, 6.703104320605257, 5.558262615740742, 3.1048491769547324, 1.6363696502057616, 0.0), # 32
(18.407516216216216, 17.96883611111111, 15.516222222222224, 16.668121874999997, 13.411374544422076, 6.5625, 7.355054901960784, 6.790500000000001, 7.257115, 3.506972777777779, 2.507278282828283, 1.4563296296296298, 0.0, 18.225, 16.019625925925926, 12.536391414141413, 10.520918333333334, 14.51423, 9.5067, 7.355054901960784, 4.6875, 6.705687272211038, 5.5560406250000005, 3.103244444444445, 1.6335305555555555, 0.0), # 33
(18.422529858429858, 17.93508014403292, 15.507531893004115, 16.660880902777777, 13.41639659456576, 6.5625, 7.342038816267248, 6.7636157407407405, 7.253742037037037, 3.500167366255145, 2.5062758885147773, 1.4551709190672155, 0.0, 18.225, 16.006880109739367, 12.531379442573886, 10.500502098765432, 14.507484074074075, 9.469062037037038, 7.342038816267248, 4.6875, 6.70819829728288, 5.553626967592593, 3.1015063786008232, 1.6304618312757202, 0.0), # 34
(18.437125557234253, 17.898906893004114, 15.49819958847737, 16.65308159722222, 13.421274571381044, 6.5625, 7.328095497458243, 6.734953703703703, 7.250115740740741, 3.4928883744855974, 2.5051931350542462, 1.4539266117969825, 0.0, 18.225, 15.993192729766804, 12.52596567527123, 10.47866512345679, 14.500231481481482, 9.428935185185185, 7.328095497458243, 4.6875, 6.710637285690522, 5.551027199074074, 3.099639917695474, 1.627173353909465, 0.0), # 35
(18.45130188014101, 17.860424999999996, 15.488249999999999, 16.644740624999997, 13.426008254607403, 6.5625, 7.313267647058823, 6.704625000000001, 7.246244999999999, 3.485160000000001, 2.504031818181818, 1.4526000000000006, 0.0, 18.225, 15.978600000000004, 12.520159090909091, 10.45548, 14.492489999999998, 9.386475, 7.313267647058823, 4.6875, 6.7130041273037016, 5.548246875, 3.0976500000000002, 1.623675, 0.0), # 36
(18.46505739466174, 17.819743106995883, 15.477707818930043, 16.63587465277778, 13.430597423984304, 6.5625, 7.2975979665940445, 6.672740740740741, 7.242138703703703, 3.477006440329219, 2.502793733632623, 1.451194375857339, 0.0, 18.225, 15.963138134430727, 12.513968668163116, 10.431019320987655, 14.484277407407406, 9.341837037037038, 7.2975979665940445, 4.6875, 6.715298711992152, 5.545291550925927, 3.0955415637860084, 1.619976646090535, 0.0), # 37
(18.47839066830806, 17.776969855967078, 15.466597736625513, 16.626500347222226, 13.435041859251228, 6.5625, 7.281129157588961, 6.639412037037038, 7.237805740740741, 3.4684518930041164, 2.5014806771417883, 1.4497130315500688, 0.0, 18.225, 15.946843347050754, 12.507403385708942, 10.405355679012347, 14.475611481481481, 9.295176851851854, 7.281129157588961, 4.6875, 6.717520929625614, 5.542166782407409, 3.0933195473251027, 1.61608816872428, 0.0), # 38
(18.491300268591576, 17.732213888888886, 15.454944444444445, 16.616634375, 13.439341340147644, 6.5625, 7.2639039215686285, 6.60475, 7.233255000000001, 3.4595205555555566, 2.500094444444445, 1.4481592592592594, 0.0, 18.225, 15.92975185185185, 12.500472222222223, 10.378561666666666, 14.466510000000001, 9.24665, 7.2639039215686285, 4.6875, 6.719670670073822, 5.538878125000001, 3.0909888888888895, 1.6120194444444444, 0.0), # 39
(18.503784763023894, 17.685583847736623, 15.442772633744857, 16.60629340277778, 13.443495646413021, 6.5625, 7.245964960058098, 6.568865740740742, 7.228495370370371, 3.4502366255144046, 2.49863683127572, 1.4465363511659812, 0.0, 18.225, 15.911899862825791, 12.4931841563786, 10.350709876543212, 14.456990740740743, 9.196412037037039, 7.245964960058098, 4.6875, 6.721747823206511, 5.535431134259261, 3.0885545267489714, 1.6077803497942387, 0.0), # 40
(18.51584271911663, 17.637188374485596, 15.430106995884776, 16.595494097222222, 13.447504557786843, 6.5625, 7.2273549745824255, 6.531870370370371, 7.22353574074074, 3.4406243004115233, 2.4971096333707448, 1.4448475994513033, 0.0, 18.225, 15.893323593964332, 12.485548166853723, 10.321872901234567, 14.44707148148148, 9.14461851851852, 7.2273549745824255, 4.6875, 6.723752278893421, 5.531831365740742, 3.0860213991769556, 1.6033807613168727, 0.0), # 41
(18.527472704381402, 17.587136111111114, 15.416972222222224, 16.584253125000004, 13.45136785400857, 6.5625, 7.208116666666666, 6.493875, 7.218385000000001, 3.4307077777777786, 2.4955146464646467, 1.4430962962962963, 0.0, 18.225, 15.874059259259258, 12.477573232323234, 10.292123333333333, 14.436770000000003, 9.091425000000001, 7.208116666666666, 4.6875, 6.725683927004285, 5.5280843750000015, 3.083394444444445, 1.598830555555556, 0.0), # 42
(18.538673286329807, 17.53553569958848, 15.403393004115227, 16.57258715277778, 13.455085314817683, 6.5625, 7.188292737835875, 6.454990740740741, 7.213052037037036, 3.420511255144034, 2.4938536662925554, 1.4412857338820306, 0.0, 18.225, 15.854143072702334, 12.469268331462775, 10.2615337654321, 14.426104074074072, 9.036987037037038, 7.188292737835875, 4.6875, 6.727542657408842, 5.524195717592594, 3.080678600823046, 1.5941396090534983, 0.0), # 43
(18.54944303247347, 17.482495781893004, 15.389394032921814, 16.560512847222224, 13.458656719953654, 6.5625, 7.1679258896151055, 6.415328703703706, 7.2075457407407395, 3.4100589300411532, 2.4921284885895996, 1.439419204389575, 0.0, 18.225, 15.833611248285322, 12.460642442947998, 10.230176790123457, 14.415091481481479, 8.981460185185188, 7.1679258896151055, 4.6875, 6.729328359976827, 5.520170949074076, 3.077878806584363, 1.5893177983539097, 0.0), # 44
(18.55978051032399, 17.428124999999998, 15.375, 16.548046875, 13.462081849155954, 6.5625, 7.147058823529412, 6.375000000000001, 7.201874999999999, 3.3993750000000014, 2.4903409090909094, 1.4375000000000002, 0.0, 18.225, 15.8125, 12.451704545454545, 10.198125000000001, 14.403749999999999, 8.925, 7.147058823529412, 4.6875, 6.731040924577977, 5.516015625000001, 3.075, 1.584375, 0.0), # 45
(18.569684287392985, 17.372531995884774, 15.360235596707819, 16.535205902777776, 13.465360482164058, 6.5625, 7.125734241103849, 6.334115740740741, 7.196048703703703, 3.388483662551441, 2.4884927235316128, 1.4355314128943761, 0.0, 18.225, 15.790845541838134, 12.442463617658062, 10.16545098765432, 14.392097407407405, 8.86776203703704, 7.125734241103849, 4.6875, 6.732680241082029, 5.511735300925927, 3.072047119341564, 1.5793210905349795, 0.0), # 46
(18.579152931192063, 17.31582541152263, 15.345125514403293, 16.522006597222223, 13.46849239871744, 6.5625, 7.103994843863473, 6.292787037037037, 7.190075740740742, 3.3774091152263384, 2.486585727646839, 1.4335167352537728, 0.0, 18.225, 15.768684087791497, 12.432928638234193, 10.132227345679013, 14.380151481481484, 8.809901851851851, 7.103994843863473, 4.6875, 6.73424619935872, 5.507335532407408, 3.069025102880659, 1.5741659465020577, 0.0), # 47
(18.588185009232834, 17.258113888888886, 15.329694444444444, 16.508465625, 13.471477378555573, 6.5625, 7.081883333333334, 6.251125000000001, 7.183965000000001, 3.3661755555555564, 2.4846217171717173, 1.4314592592592594, 0.0, 18.225, 15.746051851851853, 12.423108585858586, 10.098526666666666, 14.367930000000001, 8.751575, 7.081883333333334, 4.6875, 6.735738689277786, 5.502821875000001, 3.065938888888889, 1.5689194444444445, 0.0), # 48
(18.596779089026917, 17.199506069958847, 15.313967078189304, 16.49459965277778, 13.47431520141793, 6.5625, 7.059442411038489, 6.209240740740741, 7.17772537037037, 3.35480718106996, 2.4826024878413775, 1.4293622770919072, 0.0, 18.225, 15.722985048010976, 12.413012439206886, 10.064421543209878, 14.35545074074074, 8.692937037037037, 7.059442411038489, 4.6875, 6.737157600708965, 5.498199884259261, 3.0627934156378607, 1.5635914609053498, 0.0), # 49
(18.604933738085908, 17.140110596707824, 15.297968106995889, 16.480425347222223, 13.477005647043978, 6.5625, 7.0367147785039945, 6.16724537037037, 7.1713657407407405, 3.3433281893004123, 2.480529835390947, 1.427229080932785, 0.0, 18.225, 15.699519890260632, 12.402649176954732, 10.029984567901234, 14.342731481481481, 8.634143518518519, 7.0367147785039945, 4.6875, 6.738502823521989, 5.4934751157407415, 3.059593621399178, 1.5581918724279842, 0.0), # 50
(18.61264752392144, 17.080036111111113, 15.281722222222223, 16.465959375, 13.479548495173198, 6.5625, 7.013743137254902, 6.12525, 7.164895000000001, 3.3317627777777785, 2.478405555555556, 1.4250629629629634, 0.0, 18.225, 15.675692592592595, 12.392027777777779, 9.995288333333333, 14.329790000000003, 8.57535, 7.013743137254902, 4.6875, 6.739774247586599, 5.488653125000001, 3.0563444444444445, 1.552730555555556, 0.0), # 51
(18.619919014045102, 17.019391255144033, 15.26525411522634, 16.45121840277778, 13.481943525545056, 6.5625, 6.9905701888162675, 6.08336574074074, 7.158322037037037, 3.320135144032923, 2.4762314440703332, 1.4228672153635122, 0.0, 18.225, 15.651539368998632, 12.381157220351666, 9.960405432098767, 14.316644074074073, 8.516712037037037, 6.9905701888162675, 4.6875, 6.740971762772528, 5.483739467592594, 3.0530508230452678, 1.547217386831276, 0.0), # 52
(18.626746775968517, 16.958284670781893, 15.248588477366258, 16.43621909722222, 13.484190517899034, 6.5625, 6.967238634713145, 6.041703703703704, 7.1516557407407415, 3.3084694855967087, 2.4740092966704084, 1.4206451303155008, 0.0, 18.225, 15.627096433470507, 12.37004648335204, 9.925408456790123, 14.303311481481483, 8.458385185185186, 6.967238634713145, 4.6875, 6.742095258949517, 5.478739699074075, 3.049717695473252, 1.5416622427983542, 0.0), # 53
(18.63312937720329, 16.896825000000003, 15.23175, 16.420978125, 13.486289251974604, 6.5625, 6.943791176470588, 6.000374999999999, 7.144905, 3.296790000000001, 2.4717409090909093, 1.4184000000000003, 0.0, 18.225, 15.602400000000001, 12.358704545454545, 9.89037, 14.28981, 8.400525, 6.943791176470588, 4.6875, 6.743144625987302, 5.473659375000001, 3.04635, 1.5360750000000005, 0.0), # 54
(18.63906538526104, 16.835120884773662, 15.2147633744856, 16.405512152777778, 13.488239507511228, 6.5625, 6.9202705156136535, 5.9594907407407405, 7.1380787037037035, 3.2851208847736637, 2.4694280770669663, 1.4161351165980798, 0.0, 18.225, 15.577486282578874, 12.34714038533483, 9.855362654320988, 14.276157407407407, 8.343287037037037, 6.9202705156136535, 4.6875, 6.744119753755614, 5.468504050925927, 3.04295267489712, 1.530465534979424, 0.0), # 55
(18.64455336765337, 16.77328096707819, 15.197653292181073, 16.389837847222225, 13.49004106424839, 6.5625, 6.896719353667393, 5.9191620370370375, 7.131185740740741, 3.2734863374485608, 2.467072596333708, 1.4138537722908093, 0.0, 18.225, 15.5523914951989, 12.335362981668538, 9.82045901234568, 14.262371481481482, 8.286826851851853, 6.896719353667393, 4.6875, 6.745020532124195, 5.463279282407409, 3.0395306584362145, 1.5248437242798356, 0.0), # 56
(18.649591891891887, 16.711413888888888, 15.180444444444445, 16.373971875, 13.49169370192556, 6.5625, 6.873180392156863, 5.879500000000001, 7.124235, 3.2619105555555565, 2.4646762626262633, 1.4115592592592594, 0.0, 18.225, 15.527151851851851, 12.323381313131314, 9.785731666666667, 14.24847, 8.231300000000001, 6.873180392156863, 4.6875, 6.74584685096278, 5.457990625000001, 3.0360888888888895, 1.5192194444444447, 0.0), # 57
(18.654179525488225, 16.64962829218107, 15.163161522633745, 16.357930902777774, 13.49319720028221, 6.5625, 6.849696332607118, 5.840615740740741, 7.11723537037037, 3.2504177366255154, 2.4622408716797612, 1.4092548696844995, 0.0, 18.225, 15.501803566529492, 12.311204358398806, 9.751253209876543, 14.23447074074074, 8.176862037037038, 6.849696332607118, 4.6875, 6.746598600141105, 5.4526436342592595, 3.032632304526749, 1.5136025720164612, 0.0), # 58
(18.658314835953966, 16.58803281893004, 15.145829218106996, 16.34173159722222, 13.494551339057814, 6.5625, 6.82630987654321, 5.802620370370371, 7.110195740740741, 3.2390320781893016, 2.4597682192293306, 1.4069438957475995, 0.0, 18.225, 15.476382853223592, 12.298841096146651, 9.717096234567903, 14.220391481481482, 8.12366851851852, 6.82630987654321, 4.6875, 6.747275669528907, 5.447243865740742, 3.0291658436213997, 1.5080029835390947, 0.0), # 59
(18.661996390800738, 16.526736111111113, 15.128472222222221, 16.325390625, 13.495755897991843, 6.5625, 6.803063725490196, 5.765625, 7.103125, 3.2277777777777787, 2.4572601010101014, 1.40462962962963, 0.0, 18.225, 15.450925925925928, 12.286300505050505, 9.683333333333334, 14.20625, 8.071875, 6.803063725490196, 4.6875, 6.747877948995922, 5.441796875000001, 3.0256944444444445, 1.502430555555556, 0.0), # 60
(18.665222757540146, 16.465846810699592, 15.111115226337452, 16.308924652777776, 13.496810656823772, 6.5625, 6.780000580973129, 5.729740740740741, 7.0960320370370376, 3.216679032921812, 2.4547183127572016, 1.40231536351166, 0.0, 18.225, 15.425468998628258, 12.273591563786008, 9.650037098765434, 14.192064074074075, 8.021637037037038, 6.780000580973129, 4.6875, 6.748405328411886, 5.436308217592593, 3.0222230452674905, 1.496895164609054, 0.0), # 61
(18.66799250368381, 16.40547355967078, 15.093782921810703, 16.292350347222225, 13.497715395293081, 6.5625, 6.757163144517066, 5.695078703703705, 7.088925740740741, 3.2057600411522644, 2.4521446502057613, 1.4000043895747603, 0.0, 18.225, 15.40004828532236, 12.260723251028807, 9.61728012345679, 14.177851481481483, 7.973110185185186, 6.757163144517066, 4.6875, 6.748857697646541, 5.430783449074076, 3.018756584362141, 1.4914066872427985, 0.0), # 62
(18.670304196743327, 16.345724999999998, 15.0765, 16.275684375, 13.498469893139227, 6.5625, 6.734594117647059, 5.6617500000000005, 7.081815, 3.195045000000001, 2.4495409090909095, 1.3977000000000002, 0.0, 18.225, 15.3747, 12.247704545454548, 9.585135, 14.16363, 7.926450000000001, 6.734594117647059, 4.6875, 6.749234946569613, 5.425228125000001, 3.0153000000000003, 1.485975, 0.0), # 63
(18.672156404230314, 16.286709773662555, 15.059291152263373, 16.258943402777778, 13.499073930101698, 6.5625, 6.712336201888163, 5.629865740740741, 7.0747087037037035, 3.1845581069958855, 2.446908885147774, 1.3954054869684502, 0.0, 18.225, 15.34946035665295, 12.23454442573887, 9.553674320987653, 14.149417407407407, 7.881812037037038, 6.712336201888163, 4.6875, 6.749536965050849, 5.419647800925927, 3.011858230452675, 1.4806099794238687, 0.0), # 64
(18.67354769365639, 16.228536522633743, 15.042181069958849, 16.242144097222223, 13.49952728591996, 6.5625, 6.690432098765433, 5.599537037037037, 7.067615740740742, 3.1743235596707824, 2.4442503741114856, 1.3931241426611796, 0.0, 18.225, 15.324365569272972, 12.221251870557428, 9.522970679012344, 14.135231481481483, 7.839351851851852, 6.690432098765433, 4.6875, 6.74976364295998, 5.4140480324074085, 3.00843621399177, 1.4753215020576131, 0.0), # 65
(18.674476632533153, 16.17131388888889, 15.025194444444447, 16.225303125, 13.499829740333489, 6.5625, 6.668924509803921, 5.570875000000001, 7.060545000000001, 3.1643655555555563, 2.4415671717171716, 1.3908592592592597, 0.0, 18.225, 15.299451851851854, 12.207835858585858, 9.493096666666666, 14.121090000000002, 7.799225000000001, 6.668924509803921, 4.6875, 6.749914870166744, 5.408434375000001, 3.0050388888888895, 1.4701194444444448, 0.0), # 66
(18.674941788372227, 16.11515051440329, 15.00835596707819, 16.208437152777776, 13.499981073081756, 6.5625, 6.647856136528685, 5.543990740740742, 7.05350537037037, 3.154708292181071, 2.438861073699963, 1.3886141289437586, 0.0, 18.225, 15.274755418381341, 12.194305368499816, 9.464124876543211, 14.10701074074074, 7.761587037037039, 6.647856136528685, 4.6875, 6.749990536540878, 5.40281238425926, 3.001671193415638, 1.465013683127572, 0.0), # 67
(18.674624906065485, 16.059860254878533, 14.99160892489712, 16.19141634963768, 13.499853546356814, 6.56237821216278, 6.627163675346682, 5.518757887517148, 7.046452709190673, 3.145329198741226, 2.436085796562113, 1.3863795032849615, 0.0, 18.22477527006173, 15.250174536134574, 12.180428982810565, 9.435987596223676, 14.092905418381346, 7.726261042524007, 6.627163675346682, 4.6874130086877, 6.749926773178407, 5.3971387832125615, 2.998321784979424, 1.4599872958980487, 0.0), # 68
(18.671655072463768, 16.00375510752688, 14.974482638888889, 16.173382744565217, 13.498692810457515, 6.561415432098766, 6.606241363211952, 5.493824074074074, 7.039078703703703, 3.1359628758169937, 2.4329588516746417, 1.3840828460038987, 0.0, 18.222994791666668, 15.224911306042884, 12.164794258373206, 9.407888627450978, 14.078157407407407, 7.6913537037037045, 6.606241363211952, 4.686725308641976, 6.749346405228757, 5.391127581521739, 2.994896527777778, 1.4548868279569895, 0.0), # 69
(18.665794417606012, 15.946577558741536, 14.956902649176953, 16.154217617753623, 13.496399176954732, 6.559519318701418, 6.5849941211052325, 5.468964334705077, 7.031341735253773, 3.1265637860082314, 2.429444665957824, 1.3817134141939216, 0.0, 18.219478202160495, 15.198847556133135, 12.147223329789119, 9.379691358024692, 14.062683470507546, 7.656550068587107, 6.5849941211052325, 4.685370941929584, 6.748199588477366, 5.384739205917875, 2.9913805298353906, 1.4496888689765035, 0.0), # 70
(18.657125389157272, 15.888361778176023, 14.938875128600824, 16.133949230072467, 13.493001694504963, 6.556720598994056, 6.56343149358509, 5.444186899862826, 7.023253326474624, 3.1171321617041885, 2.425556211235159, 1.3792729405819073, 0.0, 18.21427179783951, 15.172002346400978, 12.127781056175793, 9.351396485112563, 14.046506652949247, 7.621861659807958, 6.56343149358509, 4.683371856424325, 6.746500847252482, 5.377983076690823, 2.987775025720165, 1.4443965252887296, 0.0), # 71
(18.64573043478261, 15.82914193548387, 14.92040625, 16.112605842391304, 13.488529411764706, 6.553050000000001, 6.541563025210084, 5.4195, 7.014825, 3.1076682352941183, 2.421306459330144, 1.376763157894737, 0.0, 18.207421875, 15.144394736842104, 12.10653229665072, 9.323004705882353, 14.02965, 7.587300000000001, 6.541563025210084, 4.680750000000001, 6.744264705882353, 5.370868614130436, 2.98408125, 1.4390129032258066, 0.0), # 72
(18.631692002147076, 15.768952200318596, 14.90150218621399, 16.09021571557971, 13.483011377390461, 6.548538248742569, 6.519398260538782, 5.394911865569274, 7.006068278463649, 3.0981722391672726, 2.4167083820662767, 1.374185798859288, 0.0, 18.198974729938275, 15.116043787452165, 12.083541910331384, 9.294516717501814, 14.012136556927299, 7.552876611796983, 6.519398260538782, 4.677527320530407, 6.741505688695231, 5.363405238526571, 2.9803004372427986, 1.4335411091198726, 0.0), # 73
(18.61509253891573, 15.707826742333731, 14.882169110082302, 16.06680711050725, 13.47647664003873, 6.543216072245086, 6.49694674412975, 5.37043072702332, 6.996994684499314, 3.0886444057129037, 2.411774951267057, 1.3715425962024403, 0.0, 18.18897665895062, 15.086968558226841, 12.058874756335285, 9.26593321713871, 13.993989368998628, 7.518603017832648, 6.49694674412975, 4.673725765889347, 6.738238320019365, 5.355602370169083, 2.976433822016461, 1.4279842493030668, 0.0), # 74
(18.59601449275362, 15.645799731182793, 14.862413194444443, 16.04240828804348, 13.468954248366014, 6.537114197530865, 6.47421802054155, 5.346064814814815, 6.98761574074074, 3.0790849673202625, 2.406519138755981, 1.3688352826510723, 0.0, 18.177473958333334, 15.057188109161793, 12.032595693779903, 9.237254901960785, 13.97523148148148, 7.484490740740742, 6.47421802054155, 4.669367283950618, 6.734477124183007, 5.347469429347827, 2.9724826388888888, 1.422345430107527, 0.0), # 75
(18.57454031132582, 15.582905336519316, 14.842240612139918, 16.01704750905797, 13.460473251028805, 6.53026335162323, 6.451221634332746, 5.321822359396434, 6.977942969821673, 3.069494156378602, 2.400953916356548, 1.3660655909320625, 0.0, 18.164512924382716, 15.026721500252684, 12.004769581782737, 9.208482469135802, 13.955885939643347, 7.450551303155008, 6.451221634332746, 4.664473822588021, 6.730236625514403, 5.339015836352658, 2.9684481224279837, 1.4166277578653925, 0.0), # 76
(18.55075244229737, 15.519177727996816, 14.821657536008228, 15.99075303442029, 13.451062696683609, 6.522694261545496, 6.4279671300619015, 5.2977115912208514, 6.967987894375857, 3.059872205277174, 2.3950922558922563, 1.3632352537722912, 0.0, 18.150139853395064, 14.9955877914952, 11.975461279461282, 9.179616615831518, 13.935975788751714, 7.416796227709193, 6.4279671300619015, 4.659067329675354, 6.725531348341804, 5.330251011473431, 2.964331507201646, 1.4108343389088016, 0.0), # 77
(18.524733333333334, 15.45465107526882, 14.80067013888889, 15.963553124999999, 13.440751633986928, 6.514437654320987, 6.404464052287582, 5.273740740740742, 6.957762037037036, 3.0502193464052296, 2.388947129186603, 1.3603460038986357, 0.0, 18.134401041666667, 14.963806042884991, 11.944735645933015, 9.150658039215687, 13.915524074074073, 7.383237037037039, 6.404464052287582, 4.653169753086419, 6.720375816993464, 5.3211843750000005, 2.960134027777778, 1.404968279569893, 0.0), # 78
(18.496565432098766, 15.389359547988851, 14.779284593621398, 15.935476041666668, 13.429569111595256, 6.505524256973022, 6.380721945568351, 5.249918038408779, 6.947276920438957, 3.0405358121520223, 2.382531508063087, 1.3573995740379758, 0.0, 18.117342785493825, 14.931395314417731, 11.912657540315433, 9.121607436456063, 13.894553840877913, 7.349885253772292, 6.380721945568351, 4.646803040695016, 6.714784555797628, 5.311825347222223, 2.95585691872428, 1.399032686180805, 0.0), # 79
(18.466331186258724, 15.323337315810434, 14.757507073045266, 15.906550045289855, 13.417544178165095, 6.49598479652492, 6.356750354462773, 5.226251714677641, 6.9365440672153635, 3.030821834906803, 2.375858364345207, 1.3543976969171905, 0.0, 18.09901138117284, 14.898374666089092, 11.879291821726033, 9.092465504720405, 13.873088134430727, 7.316752400548698, 6.356750354462773, 4.639989140374943, 6.708772089082547, 5.302183348429953, 2.9515014146090537, 1.3930306650736761, 0.0), # 80
(18.434113043478263, 15.256618548387095, 14.735343749999998, 15.876803396739131, 13.404705882352939, 6.48585, 6.3325588235294115, 5.202750000000001, 6.925574999999999, 3.0210776470588248, 2.36894066985646, 1.3513421052631582, 0.0, 18.079453124999997, 14.864763157894737, 11.844703349282298, 9.063232941176471, 13.851149999999999, 7.283850000000001, 6.3325588235294115, 4.63275, 6.7023529411764695, 5.292267798913045, 2.94706875, 1.3869653225806453, 0.0), # 81
(18.399993451422436, 15.189237415372364, 14.712800797325105, 15.846264356884058, 13.391083272815298, 6.475150594421583, 6.308156897326833, 5.179421124828533, 6.914381241426612, 3.011303480997338, 2.3617913964203443, 1.3482345318027582, 0.0, 18.058714313271608, 14.830579849830338, 11.80895698210172, 9.03391044299201, 13.828762482853223, 7.2511895747599455, 6.308156897326833, 4.625107567443988, 6.695541636407649, 5.2820881189613536, 2.9425601594650215, 1.3808397650338515, 0.0), # 82
(18.364054857756308, 15.121228086419752, 14.689884387860083, 15.8149611865942, 13.376705398208665, 6.463917306812986, 6.283554120413598, 5.156273319615913, 6.902974314128944, 3.001499569111596, 2.3544235158603586, 1.3450767092628693, 0.0, 18.036841242283952, 14.79584380189156, 11.772117579301792, 9.004498707334786, 13.805948628257887, 7.218782647462278, 6.283554120413598, 4.617083790580704, 6.688352699104333, 5.2716537288647345, 2.9379768775720168, 1.374657098765432, 0.0), # 83
(18.326379710144927, 15.052624731182796, 14.666600694444444, 15.78292214673913, 13.361601307189542, 6.452180864197532, 6.258760037348273, 5.133314814814815, 6.89136574074074, 2.9916661437908503, 2.3468500000000003, 1.3418703703703705, 0.0, 18.013880208333333, 14.760574074074073, 11.73425, 8.97499843137255, 13.78273148148148, 7.186640740740741, 6.258760037348273, 4.608700617283951, 6.680800653594771, 5.260974048913044, 2.933320138888889, 1.3684204301075271, 0.0), # 84
(18.287050456253354, 14.983461519315012, 14.642955889917694, 15.750175498188408, 13.345800048414427, 6.439971993598538, 6.233784192689422, 5.110553840877915, 6.879567043895747, 2.981803437424353, 2.3390838206627684, 1.338617247852141, 0.0, 17.989877507716052, 14.724789726373547, 11.69541910331384, 8.945410312273058, 13.759134087791494, 7.154775377229082, 6.233784192689422, 4.5999799954275264, 6.672900024207213, 5.250058499396137, 2.928591177983539, 1.362132865392274, 0.0), # 85
(18.246149543746643, 14.913772620469931, 14.618956147119343, 15.716749501811597, 13.32933067053982, 6.427321422039324, 6.208636130995608, 5.087998628257887, 6.86758974622771, 2.9719116824013563, 2.3311379496721605, 1.3353190744350594, 0.0, 17.964879436728395, 14.68850981878565, 11.655689748360802, 8.915735047204068, 13.73517949245542, 7.123198079561043, 6.208636130995608, 4.590943872885232, 6.66466533526991, 5.2389165006038665, 2.923791229423869, 1.3557975109518121, 0.0), # 86
(18.203759420289852, 14.843592204301075, 14.594607638888888, 15.68267241847826, 13.312222222222225, 6.41425987654321, 6.1833253968253965, 5.065657407407408, 6.855445370370372, 2.9619911111111112, 2.323025358851675, 1.3319775828460039, 0.0, 17.938932291666667, 14.651753411306041, 11.615126794258373, 8.885973333333332, 13.710890740740744, 7.091920370370371, 6.1833253968253965, 4.581614197530865, 6.656111111111112, 5.227557472826088, 2.9189215277777776, 1.3494174731182798, 0.0), # 87
(18.159962533548043, 14.772954440461966, 14.569916538065844, 15.647972509057974, 13.294503752118132, 6.400818084133517, 6.157861534737352, 5.043538408779149, 6.843145438957476, 2.952041955942871, 2.31475902002481, 1.328594505811855, 0.0, 17.912082368827164, 14.614539563930402, 11.573795100124048, 8.856125867828611, 13.686290877914953, 7.06095377229081, 6.157861534737352, 4.572012917238227, 6.647251876059066, 5.215990836352659, 2.913983307613169, 1.3429958582238153, 0.0), # 88
(18.11484133118626, 14.701893498606132, 14.544889017489714, 15.612678034420288, 13.276204308884047, 6.387026771833563, 6.132254089290037, 5.0216498628257895, 6.830701474622771, 2.942064449285888, 2.3063519050150636, 1.3251715760594904, 0.0, 17.884375964506173, 14.576887336654393, 11.531759525075316, 8.826193347857663, 13.661402949245542, 7.0303098079561055, 6.132254089290037, 4.562161979881116, 6.638102154442024, 5.2042260114734304, 2.908977803497943, 1.3365357726005578, 0.0), # 89
(18.068478260869565, 14.630443548387097, 14.519531250000002, 15.576817255434786, 13.257352941176471, 6.372916666666668, 6.106512605042017, 5.0, 6.818125, 2.9320588235294123, 2.2978169856459334, 1.3217105263157898, 0.0, 17.855859375, 14.538815789473684, 11.489084928229666, 8.796176470588236, 13.63625, 7.0, 6.106512605042017, 4.552083333333334, 6.6286764705882355, 5.192272418478263, 2.903906250000001, 1.3300403225806454, 0.0), # 90
(18.020955770263015, 14.558638759458383, 14.493849408436214, 15.540418432971018, 13.237978697651899, 6.35851849565615, 6.0806466265518555, 4.978597050754459, 6.80542753772291, 2.922025311062697, 2.2891672337409186, 1.3182130893076314, 0.0, 17.826578896604936, 14.500343982383942, 11.445836168704592, 8.76607593318809, 13.61085507544582, 6.9700358710562424, 6.0806466265518555, 4.541798925468679, 6.6189893488259495, 5.180139477657007, 2.898769881687243, 1.3235126144962168, 0.0), # 91
(17.97235630703167, 14.486513301473519, 14.467849665637862, 15.50350982789855, 13.218110626966835, 6.343862985825332, 6.054665698378118, 4.957449245541839, 6.7926206104252405, 2.9119641442749944, 2.2804156211235163, 1.3146809977618947, 0.0, 17.796580825617283, 14.46149097538084, 11.40207810561758, 8.735892432824983, 13.585241220850481, 6.940428943758574, 6.054665698378118, 4.531330704160951, 6.609055313483418, 5.167836609299518, 2.8935699331275724, 1.3169557546794108, 0.0), # 92
(17.92276231884058, 14.414101344086022, 14.441538194444446, 15.46611970108696, 13.197777777777777, 6.328980864197531, 6.0285793650793655, 4.936564814814815, 6.779715740740741, 2.9018755555555558, 2.2715751196172254, 1.3111159844054583, 0.0, 17.76591145833333, 14.422275828460037, 11.357875598086125, 8.705626666666666, 13.559431481481482, 6.911190740740742, 6.0285793650793655, 4.520700617283951, 6.598888888888888, 5.155373233695654, 2.888307638888889, 1.3103728494623659, 0.0), # 93
(17.872256253354806, 14.341437056949422, 14.414921167695475, 15.428276313405796, 13.177009198741224, 6.313902857796068, 6.002397171214165, 4.915951989026064, 6.766724451303155, 2.891759777293634, 2.2626587010455435, 1.3075197819652014, 0.0, 17.734617091049383, 14.382717601617212, 11.313293505227715, 8.675279331880901, 13.53344890260631, 6.88233278463649, 6.002397171214165, 4.509930612711477, 6.588504599370612, 5.1427587711352665, 2.882984233539095, 1.3037670051772203, 0.0), # 94
(17.820920558239397, 14.268554609717246, 14.388004758230455, 15.390007925724635, 13.155833938513677, 6.298659693644262, 5.97612866134108, 4.895618998628259, 6.753658264746228, 2.88161704187848, 2.253679337231969, 1.3038941231680024, 0.0, 17.70274402006173, 14.342835354848022, 11.268396686159845, 8.644851125635439, 13.507316529492456, 6.853866598079563, 5.97612866134108, 4.49904263831733, 6.577916969256838, 5.130002641908213, 2.8776009516460914, 1.2971413281561135, 0.0), # 95
(17.76883768115942, 14.195488172043014, 14.360795138888891, 15.351342798913045, 13.134281045751635, 6.283282098765432, 5.9497833800186735, 4.875574074074075, 6.740528703703703, 2.8714475816993468, 2.2446500000000005, 1.300240740740741, 0.0, 17.67033854166667, 14.30264814814815, 11.22325, 8.614342745098039, 13.481057407407405, 6.825803703703705, 5.9497833800186735, 4.488058641975309, 6.5671405228758175, 5.117114266304349, 2.8721590277777787, 1.2904989247311833, 0.0), # 96
(17.716090069779927, 14.12227191358025, 14.333298482510289, 15.31230919384058, 13.112379569111596, 6.267800800182899, 5.9233708718055125, 4.855825445816188, 6.727347290809328, 2.8612516291454857, 2.235583661173135, 1.2965613674102956, 0.0, 17.637446952160495, 14.262175041513249, 11.177918305865674, 8.583754887436456, 13.454694581618655, 6.798155624142662, 5.9233708718055125, 4.477000571559214, 6.556189784555798, 5.104103064613527, 2.8666596965020577, 1.2838429012345685, 0.0), # 97
(17.66276017176597, 14.048940003982477, 14.305520961934155, 15.27293537137681, 13.090158557250064, 6.252246524919983, 5.896900681260158, 4.83638134430727, 6.714125548696844, 2.851029416606149, 2.226493292574872, 1.2928577359035447, 0.0, 17.604115547839505, 14.22143509493899, 11.13246646287436, 8.553088249818446, 13.428251097393687, 6.770933882030178, 5.896900681260158, 4.465890374942845, 6.545079278625032, 5.090978457125605, 2.8611041923868314, 1.277176363998407, 0.0), # 98
(17.608930434782607, 13.975526612903225, 14.277468750000002, 15.233249592391303, 13.067647058823532, 6.23665, 5.870382352941177, 4.8172500000000005, 6.700875, 2.8407811764705886, 2.2173918660287084, 1.2891315789473687, 0.0, 17.570390625, 14.180447368421053, 11.086959330143541, 8.522343529411764, 13.40175, 6.744150000000001, 5.870382352941177, 4.45475, 6.533823529411766, 5.0777498641304355, 2.8554937500000004, 1.2705024193548389, 0.0), # 99
(17.5546833064949, 13.902065909996015, 14.249148019547325, 15.193280117753623, 13.044874122488501, 6.2210419524462734, 5.843825431407131, 4.798439643347051, 6.687607167352539, 2.8305071411280567, 2.2082923533581433, 1.285384629268645, 0.0, 17.536318479938274, 14.139230921955095, 11.041461766790714, 8.49152142338417, 13.375214334705078, 6.717815500685871, 5.843825431407131, 4.443601394604481, 6.522437061244251, 5.064426705917875, 2.8498296039094653, 1.2638241736360014, 0.0), # 100
(17.500101234567904, 13.828592064914377, 14.22056494341564, 15.153055208333335, 13.021868796901476, 6.205453109282122, 5.817239461216586, 4.7799585048010975, 6.674333573388203, 2.820207542967805, 2.1992077263866743, 1.281618619594253, 0.0, 17.501945408950615, 14.097804815536781, 10.99603863193337, 8.460622628903414, 13.348667146776407, 6.691941906721536, 5.817239461216586, 4.432466506630087, 6.510934398450738, 5.051018402777779, 2.8441129886831282, 1.2571447331740344, 0.0), # 101
(17.44526666666667, 13.755139247311828, 14.191725694444445, 15.112603125, 12.998660130718955, 6.189914197530865, 5.790633986928105, 4.761814814814815, 6.66106574074074, 2.809882614379086, 2.1901509569377993, 1.2778352826510724, 0.0, 17.467317708333336, 14.056188109161795, 10.950754784688995, 8.429647843137257, 13.32213148148148, 6.666540740740741, 5.790633986928105, 4.421367283950618, 6.499330065359477, 5.037534375000001, 2.838345138888889, 1.2504672043010754, 0.0), # 102
(17.390262050456254, 13.681741626841896, 14.16263644547325, 15.071952128623188, 12.975277172597433, 6.174455944215821, 5.764018553100253, 4.7440168038408785, 6.647815192043895, 2.7995325877511505, 2.181135016835017, 1.2740363511659811, 0.0, 17.432481674382714, 14.014399862825789, 10.905675084175085, 8.39859776325345, 13.29563038408779, 6.64162352537723, 5.764018553100253, 4.410325674439872, 6.487638586298717, 5.023984042874397, 2.8325272890946502, 1.2437946933492634, 0.0), # 103
(17.335169833601718, 13.608433373158105, 14.133303369341563, 15.031130480072465, 12.951748971193414, 6.159109076360311, 5.737402704291593, 4.7265727023319615, 6.634593449931413, 2.7891576954732518, 2.1721728779018252, 1.2702235578658583, 0.0, 17.397483603395063, 13.972459136524439, 10.860864389509127, 8.367473086419754, 13.269186899862826, 6.617201783264746, 5.737402704291593, 4.399363625971651, 6.475874485596707, 5.010376826690822, 2.826660673868313, 1.237130306650737, 0.0), # 104
(17.280072463768114, 13.535248655913978, 14.103732638888891, 14.99016644021739, 12.928104575163397, 6.143904320987655, 5.710795985060692, 4.709490740740741, 6.621412037037037, 2.7787581699346413, 2.1632775119617227, 1.2663986354775831, 0.0, 17.362369791666666, 13.930384990253412, 10.816387559808613, 8.336274509803923, 13.242824074074074, 6.5932870370370384, 5.710795985060692, 4.388503086419754, 6.464052287581699, 4.996722146739131, 2.820746527777778, 1.2304771505376346, 0.0), # 105
(17.225052388620504, 13.462221644763043, 14.073930426954732, 14.949088269927536, 12.904373033163882, 6.128872405121171, 5.68420793996611, 4.6927791495198905, 6.608282475994512, 2.7683342435245706, 2.1544618908382067, 1.2625633167280343, 0.0, 17.327186535493826, 13.888196484008375, 10.772309454191033, 8.30500273057371, 13.216564951989024, 6.5698908093278465, 5.68420793996611, 4.377766003657979, 6.452186516581941, 4.98302942330918, 2.8147860853909465, 1.223838331342095, 0.0), # 106
(17.17019205582394, 13.389386509358822, 14.043902906378605, 14.907924230072464, 12.880583393851367, 6.114044055784181, 5.657648113566415, 4.6764461591220865, 6.595216289437586, 2.7578861486322928, 2.145738986354776, 1.2587193343440908, 0.0, 17.29198013117284, 13.845912677784996, 10.728694931773878, 8.273658445896878, 13.190432578875171, 6.547024622770921, 5.657648113566415, 4.367174325560129, 6.440291696925684, 4.969308076690822, 2.808780581275721, 1.2172169553962566, 0.0), # 107
(17.11557391304348, 13.31677741935484, 14.013656250000002, 14.866702581521741, 12.856764705882352, 6.099450000000001, 5.631126050420168, 4.660500000000001, 6.582225000000001, 2.7474141176470597, 2.1371217703349283, 1.2548684210526317, 0.0, 17.256796875000003, 13.803552631578947, 10.685608851674642, 8.242242352941178, 13.164450000000002, 6.524700000000001, 5.631126050420168, 4.356750000000001, 6.428382352941176, 4.955567527173915, 2.8027312500000003, 1.2106161290322583, 0.0), # 108
(17.061280407944178, 13.24442854440462, 13.983196630658439, 14.825451585144926, 12.832946017913338, 6.085120964791952, 5.604651295085936, 4.644948902606311, 6.569320130315501, 2.736918382958122, 2.1286232146021624, 1.2510123095805359, 0.0, 17.221683063271605, 13.761135405385891, 10.64311607301081, 8.210755148874364, 13.138640260631002, 6.502928463648835, 5.604651295085936, 4.346514974851394, 6.416473008956669, 4.941817195048309, 2.796639326131688, 1.2040389585822384, 0.0), # 109
(17.007393988191087, 13.17237405416169, 13.95253022119342, 14.784199501811596, 12.809156378600825, 6.071087677183356, 5.57823339212228, 4.62980109739369, 6.556513203017833, 2.726399176954733, 2.120256290979975, 1.2471527326546823, 0.0, 17.18668499228395, 13.718680059201501, 10.601281454899876, 8.179197530864197, 13.113026406035665, 6.4817215363511655, 5.57823339212228, 4.336491197988112, 6.404578189300413, 4.928066500603866, 2.790506044238684, 1.1974885503783357, 0.0), # 110
(16.953997101449275, 13.10064811827957, 13.921663194444447, 14.742974592391306, 12.785424836601308, 6.0573808641975315, 5.551881886087768, 4.615064814814815, 6.543815740740741, 2.715856732026144, 2.1120339712918663, 1.2432914230019496, 0.0, 17.151848958333336, 13.676205653021444, 10.56016985645933, 8.147570196078432, 13.087631481481482, 6.461090740740741, 5.551881886087768, 4.326700617283951, 6.392712418300654, 4.914324864130436, 2.78433263888889, 1.1909680107526885, 0.0), # 111
(16.90117219538379, 13.029284906411787, 13.890601723251033, 14.701805117753622, 12.76178044057129, 6.044031252857797, 5.5256063215409625, 4.60074828532236, 6.531239266117969, 2.7052912805616076, 2.103969227361333, 1.2394301133492167, 0.0, 17.11722125771605, 13.633731246841382, 10.519846136806663, 8.115873841684822, 13.062478532235938, 6.441047599451304, 5.5256063215409625, 4.3171651806127125, 6.380890220285645, 4.900601705917875, 2.778120344650207, 1.1844804460374354, 0.0), # 112
(16.84890760266548, 12.958437720996821, 13.859426742378105, 14.660775741364255, 12.738210816208445, 6.03106325767524, 5.499473367291093, 4.586889426585454, 6.518827686755172, 2.694737131475729, 2.0960771718458604, 1.2355789404756645, 0.0, 17.0827990215178, 13.591368345232306, 10.480385859229301, 8.084211394427186, 13.037655373510344, 6.421645197219636, 5.499473367291093, 4.307902326910885, 6.369105408104223, 4.886925247121419, 2.7718853484756214, 1.178039792817893, 0.0), # 113
(16.796665616220118, 12.888805352817133, 13.828568512532428, 14.620215718724406, 12.71447202547959, 6.018447338956397, 5.473816387569522, 4.57365844462884, 6.506771421427836, 2.684391825560753, 2.0883733011339594, 1.2317868258169462, 0.0, 17.048295745488062, 13.549655083986407, 10.441866505669795, 8.053175476682258, 13.013542842855673, 6.403121822480377, 5.473816387569522, 4.298890956397426, 6.357236012739795, 4.873405239574803, 2.7657137025064857, 1.1717095775288306, 0.0), # 114
(16.744292825407193, 12.820412877827026, 13.798045399060976, 14.580114081995404, 12.690489213466321, 6.006150688123703, 5.448653685172405, 4.561051990709032, 6.495074987201274, 2.674271397594635, 2.0808463534281283, 1.2280556373838278, 0.0, 17.013611936988678, 13.508612011222104, 10.404231767140642, 8.022814192783905, 12.990149974402549, 6.385472786992645, 5.448653685172405, 4.290107634374073, 6.345244606733161, 4.860038027331802, 2.7596090798121957, 1.165492079802457, 0.0), # 115
(16.691723771827743, 12.753160664131308, 13.767798284975811, 14.540399302859647, 12.666226231660534, 5.994144321151453, 5.423944335775104, 4.549035234674245, 6.483708803536698, 2.6643570113022967, 2.0734817793814444, 1.224378479623102, 0.0, 16.978693067560602, 13.46816327585412, 10.367408896907222, 7.9930710339068884, 12.967417607073395, 6.368649328543944, 5.423944335775104, 4.281531657965324, 6.333113115830267, 4.846799767619883, 2.7535596569951624, 1.1593782421937553, 0.0), # 116
(16.63889299708279, 12.686949079834788, 13.73776805328898, 14.50099985299953, 12.641646931554131, 5.982399254013936, 5.399647415052978, 4.537573346372689, 6.472643289895322, 2.6546298304086586, 2.0662650296469853, 1.2207484569815625, 0.0, 16.943484608744804, 13.428233026797187, 10.331325148234924, 7.963889491225975, 12.945286579790643, 6.352602684921765, 5.399647415052978, 4.2731423242956685, 6.320823465777066, 4.833666617666511, 2.747553610657796, 1.1533590072577082, 0.0), # 117
(16.58573504277338, 12.621678493042284, 13.707895587012551, 14.461844204097451, 12.616715164639011, 5.970886502685445, 5.375721998681383, 4.526631495652572, 6.461848865738361, 2.6450710186386424, 2.0591815548778274, 1.2171586739060027, 0.0, 16.907932032082243, 13.388745412966028, 10.295907774389137, 7.935213055915925, 12.923697731476722, 6.337284093913602, 5.375721998681383, 4.264918930489604, 6.3083575823195055, 4.820614734699151, 2.74157911740251, 1.1474253175492988, 0.0), # 118
(16.532184450500534, 12.557249271858602, 13.678121769158587, 14.422860827835802, 12.591394782407065, 5.9595770831402755, 5.35212716233568, 4.516174852362109, 6.451295950527026, 2.6356617397171678, 2.0522168057270487, 1.2136022348432152, 0.0, 16.87198080911388, 13.349624583275366, 10.261084028635242, 7.906985219151502, 12.902591901054052, 6.322644793306953, 5.35212716233568, 4.256840773671625, 6.295697391203532, 4.807620275945268, 2.7356243538317178, 1.1415681156235096, 0.0), # 119
(16.47817576186529, 12.49356178438856, 13.648387482739144, 14.383978195896983, 12.565649636350196, 5.948442011352714, 5.3288219816912274, 4.506168586349507, 6.440954963722534, 2.626383157369158, 2.045356232847725, 1.2100722442399947, 0.0, 16.835576411380675, 13.31079468663994, 10.226781164238623, 7.879149472107472, 12.881909927445069, 6.308636020889311, 5.3288219816912274, 4.248887150966224, 6.282824818175098, 4.794659398632328, 2.7296774965478288, 1.1357783440353237, 0.0), # 120
(16.423643518468683, 12.430516398736968, 13.618633610766281, 14.345124779963385, 12.539443577960302, 5.937452303297058, 5.305765532423383, 4.49657786746298, 6.430796324786099, 2.6172164353195337, 2.038585286892935, 1.2065618065431336, 0.0, 16.79866431042359, 13.272179871974467, 10.192926434464676, 7.8516493059586, 12.861592649572199, 6.295209014448172, 5.305765532423383, 4.2410373594978985, 6.269721788980151, 4.781708259987796, 2.7237267221532564, 1.1300469453397246, 0.0), # 121
(16.36852226191174, 12.368013483008635, 13.588801036252066, 14.306229051717406, 12.51274045872928, 5.926578974947596, 5.282916890207506, 4.487367865550737, 6.420790453178933, 2.6081427372932153, 2.0318894185157554, 1.2030640261994254, 0.0, 16.761189977783587, 13.233704288193676, 10.159447092578777, 7.824428211879645, 12.841580906357866, 6.282315011771032, 5.282916890207506, 4.2332706963911395, 6.25637022936464, 4.768743017239136, 2.7177602072504135, 1.1243648620916942, 0.0), # 122
(16.312746533795494, 12.305953405308378, 13.558830642208555, 14.267219482841437, 12.485504130149028, 5.915793042278621, 5.260235130718955, 4.478503750460988, 6.410907768362252, 2.5991432270151247, 2.0252540783692634, 1.1995720076556633, 0.0, 16.72309888500163, 13.195292084212294, 10.126270391846315, 7.797429681045372, 12.821815536724504, 6.269905250645383, 5.260235130718955, 4.225566458770444, 6.242752065074514, 4.755739827613813, 2.711766128441711, 1.1187230368462162, 0.0), # 123
(16.256250875720976, 12.244236533741004, 13.528663311647806, 14.228024545017881, 12.457698443711445, 5.905065521264426, 5.237679329633088, 4.469950692041945, 6.401118689797269, 2.590199068210183, 2.018664717106536, 1.1960788553586414, 0.0, 16.68433650361868, 13.156867408945052, 10.09332358553268, 7.770597204630548, 12.802237379594539, 6.257930968858723, 5.237679329633088, 4.217903943760304, 6.2288492218557225, 4.742674848339295, 2.7057326623295617, 1.1131124121582732, 0.0), # 124
(16.198969829289226, 12.18276323641133, 13.498239927581887, 14.188572709929128, 12.429287250908427, 5.894367427879304, 5.215208562625265, 4.461673860141818, 6.391393636945196, 2.5812914246033105, 2.012106785380651, 1.1925776737551523, 0.0, 16.644848305175692, 13.118354411306674, 10.060533926903252, 7.74387427380993, 12.782787273890392, 6.246343404198546, 5.215208562625265, 4.210262448485217, 6.2146436254542134, 4.7295242366430434, 2.6996479855163775, 1.1075239305828484, 0.0), # 125
(16.14083793610127, 12.121433881424165, 13.46750137302285, 14.148792449257574, 12.400234403231872, 5.883669778097547, 5.192781905370843, 4.453638424608819, 6.381703029267251, 2.57240145991943, 2.005565733844684, 1.1890615672919902, 0.0, 16.604579761213643, 13.079677240211891, 10.02782866922342, 7.717204379758288, 12.763406058534501, 6.235093794452347, 5.192781905370843, 4.202621270069677, 6.200117201615936, 4.716264149752526, 2.69350027460457, 1.1019485346749243, 0.0), # 126
(16.08178973775815, 12.06014883688432, 13.436388530982757, 14.108612234685616, 12.370503752173677, 5.872943587893444, 5.170358433545185, 4.445809555291159, 6.3720172862246445, 2.563510337883461, 1.9990270131517138, 1.1855236404159475, 0.0, 16.56347634327348, 13.040760044575421, 9.99513506575857, 7.690531013650382, 12.744034572449289, 6.224133377407623, 5.170358433545185, 4.194959705638174, 6.185251876086839, 4.702870744895206, 2.6872777061965514, 1.0963771669894837, 0.0), # 127
(16.021759775860883, 11.998808470896611, 13.404842284473675, 14.06796053789565, 12.340059149225747, 5.862159873241292, 5.147897222823644, 4.438152422037048, 6.362306827278591, 2.554599222220326, 1.9924760739548175, 1.1819569975738184, 0.0, 16.521483522896165, 13.001526973312, 9.962380369774086, 7.663797666660978, 12.724613654557182, 6.2134133908518665, 5.147897222823644, 4.187257052315209, 6.170029574612873, 4.689320179298551, 2.680968456894735, 1.0908007700815103, 0.0), # 128
(15.960682592010507, 11.937313151565847, 13.37280351650766, 14.026765830570064, 12.308864445879973, 5.85128965011538, 5.125357348881582, 4.430632194694696, 6.352542071890305, 2.5456492766549457, 1.9858983669070716, 1.1783547432123955, 0.0, 16.478546771622668, 12.96190217533635, 9.929491834535357, 7.636947829964836, 12.70508414378061, 6.202885072572574, 5.125357348881582, 4.179492607225272, 6.154432222939986, 4.675588610190022, 2.6745607033015326, 1.0852102865059863, 0.0), # 129
(15.89849272780806, 11.875563246996844, 13.34021311009677, 13.984956584391266, 12.276883493628256, 5.840303934489999, 5.102697887394356, 4.423214043112313, 6.342693439521001, 2.536641664912241, 1.9792793426615536, 1.174709981778473, 0.0, 16.434611560993947, 12.921809799563201, 9.896396713307768, 7.609924994736723, 12.685386879042001, 6.192499660357238, 5.102697887394356, 4.171645667492856, 6.138441746814128, 4.66165219479709, 2.668042622019354, 1.0795966588178951, 0.0), # 130
(15.83512472485457, 11.81345912529441, 13.307011948253072, 13.942461271041642, 12.244080143962494, 5.829173742339445, 5.079877914037328, 4.415863137138113, 6.332731349631892, 2.527557550717134, 1.9726044518713404, 1.1710158177188439, 0.0, 16.38962336255096, 12.88117399490728, 9.863022259356702, 7.5826726521514, 12.665462699263784, 6.182208391993358, 5.079877914037328, 4.16369553024246, 6.122040071981247, 4.647487090347215, 2.6614023896506143, 1.073950829572219, 0.0), # 131
(15.770513124751067, 11.750901154563357, 13.27314091398862, 13.899208362203591, 12.210418248374584, 5.817870089638008, 5.056856504485853, 4.408544646620305, 6.322626221684192, 2.5183780977945447, 1.9658591451895095, 1.1672653554803014, 0.0, 16.343527647834676, 12.839918910283313, 9.829295725947548, 7.555134293383633, 12.645252443368385, 6.171962505268427, 5.056856504485853, 4.155621492598577, 6.105209124187292, 4.633069454067865, 2.654628182797724, 1.0682637413239418, 0.0), # 132
(15.704592469098595, 11.687789702908498, 13.238540890315475, 13.855126329559509, 12.175861658356425, 5.80636399235998, 5.03359273441529, 4.4012237414071, 6.312348475139116, 2.509084469869395, 1.9590288732691383, 1.1634516995096391, 0.0, 16.296269888386057, 12.797968694606027, 9.795144366345692, 7.527253409608184, 12.624696950278231, 6.1617132379699395, 5.03359273441529, 4.1474028516857, 6.087930829178212, 4.618375443186504, 2.647708178063095, 1.0625263366280455, 0.0), # 133
(15.63729729949817, 11.624025138434646, 13.203152760245707, 13.81014364479179, 12.14037422539991, 5.794626466479654, 5.010045679501001, 4.3938655913467075, 6.301868529457877, 2.499657830666606, 1.952099086763304, 1.1595679542536501, 0.0, 16.24779555574605, 12.755247496790147, 9.76049543381652, 7.498973491999817, 12.603737058915755, 6.151411827885391, 5.010045679501001, 4.139018904628324, 6.070187112699955, 4.6033812149305975, 2.6406305520491418, 1.0567295580395135, 0.0), # 134
(15.568562157550836, 11.559507829246614, 13.166917406791363, 13.764188779582833, 12.103919800996945, 5.7826285279713225, 4.986174415418341, 4.3864353662873405, 6.291156804101687, 2.4900793439110998, 1.945055236325083, 1.155607224159128, 0.0, 16.198050121455637, 12.711679465750406, 9.725276181625414, 7.470238031733298, 12.582313608203375, 6.141009512802277, 4.986174415418341, 4.130448948550945, 6.051959900498472, 4.588062926527612, 2.633383481358273, 1.0508643481133288, 0.0), # 135
(15.498321584857623, 11.494138143449213, 13.129775712964513, 13.717190205615022, 12.066462236639419, 5.770341192809277, 4.961938017842671, 4.378898236077208, 6.280183718531764, 2.4803301733277956, 1.9378827726075534, 1.1515626136728663, 0.0, 16.146979057055766, 12.667188750401527, 9.689413863037766, 7.4409905199833855, 12.560367437063528, 6.130457530508091, 4.961938017842671, 4.121672280578055, 6.033231118319709, 4.572396735205008, 2.6259551425929026, 1.044921649404474, 0.0), # 136
(15.426510123019561, 11.427816449147253, 13.091668561777217, 13.66907639457077, 12.02796538381924, 5.757735476967808, 4.93729556244935, 4.371219370564522, 6.2689196922093195, 2.4703914826416162, 1.930567146263792, 1.1474272272416581, 0.0, 16.094527834087398, 12.621699499658236, 9.652835731318959, 7.411174447924847, 12.537839384418639, 6.119707118790331, 4.93729556244935, 4.112668197834148, 6.01398269190962, 4.556358798190257, 2.6183337123554433, 1.0388924044679322, 0.0), # 137
(15.353062313637686, 11.360443114445548, 13.052536836241526, 13.619775818132457, 11.988393094028304, 5.744782396421213, 4.912206124913734, 4.363363939597493, 6.257335144595569, 2.4602444355774815, 1.9230938079468758, 1.143194169312297, 0.0, 16.040641924091503, 12.575135862435264, 9.615469039734378, 7.380733306732443, 12.514670289191137, 6.10870951543649, 4.912206124913734, 4.103415997443723, 5.994196547014152, 4.5399252727108195, 2.6105073672483052, 1.0327675558586864, 0.0), # 138
(15.277912698313022, 11.29191850744891, 13.01232141936951, 13.569216947982484, 11.947709218758497, 5.731452967143778, 4.886628780911184, 4.355297113024331, 6.245400495151722, 2.449870195860314, 1.9154482083098823, 1.1388565443315761, 0.0, 15.985266798609034, 12.527421987647335, 9.577241041549412, 7.3496105875809405, 12.490800990303445, 6.0974159582340635, 4.886628780911184, 4.093894976531271, 5.973854609379249, 4.523072315994162, 2.602464283873902, 1.0265380461317193, 0.0), # 139
(15.200995818646616, 11.22214299626215, 12.970963194173232, 13.51732825580325, 11.905877609501736, 5.717718205109798, 4.860522606117057, 4.346984060693248, 6.233086163338999, 2.439249927215034, 1.9076157980058883, 1.134407456746289, 0.0, 15.928347929180966, 12.478482024209175, 9.538078990029442, 7.3177497816451, 12.466172326677999, 6.085777684970546, 4.860522606117057, 4.084084432221284, 5.952938804750868, 4.505776085267751, 2.5941926388346466, 1.020194817842014, 0.0), # 140
(15.122246216239494, 11.151016948990085, 12.92840304366474, 13.464038213277146, 11.862862117749902, 5.7035491262935665, 4.833846676206716, 4.338389952452453, 6.220362568618608, 2.4283647933665637, 1.8995820276879718, 1.129840011003229, 0.0, 15.869830787348244, 12.428240121035515, 9.497910138439858, 7.2850943800996895, 12.440725137237216, 6.073745933433434, 4.833846676206716, 4.0739636616382615, 5.931431058874951, 4.48801273775905, 2.5856806087329485, 1.0137288135445532, 0.0), # 141
(15.041598432692682, 11.07844073373752, 12.884581850856106, 13.409275292086573, 11.818626594994903, 5.688916746669374, 4.806560066855513, 4.329479958150158, 6.207200130451765, 2.417195958039823, 1.8913323480092095, 1.1251473115491895, 0.0, 15.80966084465184, 12.37662042704108, 9.456661740046046, 7.251587874119467, 12.41440026090353, 6.061271941410222, 4.806560066855513, 4.063511961906696, 5.909313297497452, 4.469758430695525, 2.5769163701712214, 1.00713097579432, 0.0), # 142
(14.958987009607215, 11.004314718609267, 12.839440498759389, 13.352967963913915, 11.773134892728635, 5.673792082211512, 4.778621853738811, 4.320219247634575, 6.1935692682996875, 2.405724584959734, 1.8828522096226783, 1.1203224628309636, 0.0, 15.747783572632711, 12.323547091140597, 9.41426104811339, 7.217173754879202, 12.387138536599375, 6.048306946688404, 4.778621853738811, 4.05270863015108, 5.886567446364317, 4.45098932130464, 2.5678880997518783, 1.0003922471462972, 0.0), # 143
(14.874346488584132, 10.928539271710147, 12.792919870386642, 13.29504470044158, 11.726350862442994, 5.658146148894274, 4.749991112531969, 4.310572990753912, 6.1794404016235855, 2.3939318378512175, 1.8741270631814555, 1.115358569295345, 0.0, 15.684144442831826, 12.268944262248793, 9.370635315907277, 7.181795513553651, 12.358880803247171, 6.034802187055478, 4.749991112531969, 4.04153296349591, 5.863175431221497, 4.431681566813861, 2.5585839740773286, 0.993503570155468, 0.0), # 144
(14.787611411224459, 10.851014761144963, 12.744960848749933, 13.235433973351956, 11.67823835562988, 5.641949962691953, 4.7206269189103445, 4.300506357356382, 6.164783949884672, 2.381798880439195, 1.865142359338619, 1.110248735389127, 0.0, 15.618688926790139, 12.212736089280396, 9.325711796693094, 7.145396641317584, 12.329567899769344, 6.020708900298935, 4.7206269189103445, 4.029964259065681, 5.83911917781494, 4.411811324450653, 2.548992169749987, 0.986455887376815, 0.0), # 145
(14.69871631912923, 10.771641555018533, 12.695504316861326, 13.174064254327444, 11.62876122378119, 5.62517453957884, 4.690488348549297, 4.289984517290195, 6.1495703325441635, 2.3693068764485874, 1.8558835487472447, 1.104986065559103, 0.0, 15.551362496048613, 12.154846721150133, 9.279417743736223, 7.107920629345761, 12.299140665088327, 6.005978324206273, 4.690488348549297, 4.0179818139848855, 5.814380611890595, 4.391354751442482, 2.539100863372265, 0.9792401413653213, 0.0), # 146
(14.607595753899481, 10.690320021435666, 12.644491157732865, 13.110864015050435, 11.577883318388821, 5.607790895529226, 4.659534477124183, 4.278972640403562, 6.133769969063274, 2.3564369896043162, 1.846336082060411, 1.0995636642520668, 0.0, 15.482110622148213, 12.095200306772732, 9.231680410302054, 7.069310968812948, 12.267539938126548, 5.990561696564987, 4.659534477124183, 4.005564925378019, 5.7889416591944105, 4.370288005016812, 2.5288982315465733, 0.9718472746759697, 0.0), # 147
(14.51418425713624, 10.606950528501175, 12.591862254376625, 13.045761727203324, 11.525568490944673, 5.5897700465174065, 4.627724380310364, 4.2674358965446935, 6.1173532789032175, 2.3431703836313016, 1.836485409931195, 1.0939746359148106, 0.0, 15.410878776629895, 12.033720995062914, 9.182427049655974, 7.029511150893903, 12.234706557806435, 5.974410255162571, 4.627724380310364, 3.9926928903695758, 5.762784245472337, 4.348587242401109, 2.5183724508753254, 0.9642682298637433, 0.0), # 148
(14.418416370440541, 10.52143344431987, 12.537558489804665, 12.97868586246851, 11.471780592940643, 5.57108300851767, 4.595017133783196, 4.255339455561801, 6.100290681525203, 2.3294882222544664, 1.8263169830126733, 1.0882120849941288, 0.0, 15.337612431034628, 11.970332934935415, 9.131584915063366, 6.988464666763398, 12.200581363050405, 5.957475237786521, 4.595017133783196, 3.9793450060840496, 5.735890296470322, 4.326228620822837, 2.507511697960933, 0.9564939494836247, 0.0), # 149
(14.320226635413416, 10.433669136996565, 12.481520747029043, 12.909564892528387, 11.416483475868631, 5.551700797504312, 4.561371813218041, 4.242648487303093, 6.0825525963904505, 2.31537166919873, 1.815816251957923, 1.0822691159368145, 0.0, 15.262257056903364, 11.904960275304958, 9.079081259789614, 6.946115007596189, 12.165105192780901, 5.93970788222433, 4.561371813218041, 3.9655005696459367, 5.7082417379343156, 4.303188297509463, 2.4963041494058085, 0.948515376090597, 0.0), # 150
(14.219549593655895, 10.343557974636072, 12.423689909061814, 12.838327289065347, 11.359640991220532, 5.531594429451621, 4.526747494290255, 4.229328161616783, 6.064109442960174, 2.3008018881890155, 1.8049686674200216, 1.0761388331896609, 0.0, 15.184758125777073, 11.837527165086268, 9.024843337100108, 6.902405664567045, 12.128218885920347, 5.921059426263496, 4.526747494290255, 3.951138878179729, 5.679820495610266, 4.27944242968845, 2.484737981812363, 0.9403234522396431, 0.0), # 151
(14.116319786769019, 10.251000325343204, 12.364006858915053, 12.76490152376179, 11.301216990488243, 5.510734920333892, 4.491103252675198, 4.215343648351081, 6.044931640695582, 2.2857600429502427, 1.7937596800520466, 1.0698143411994616, 0.0, 15.105061109196717, 11.767957753194075, 8.968798400260232, 6.857280128850727, 12.089863281391164, 5.901481107691514, 4.491103252675198, 3.936239228809923, 5.650608495244121, 4.254967174587264, 2.4728013717830106, 0.931909120485746, 0.0), # 152
(14.010471756353809, 10.155896557222773, 12.302412479600802, 12.68921606830011, 11.241175325163667, 5.489093286125417, 4.454398164048228, 4.200660117354197, 6.024989609057894, 2.2702272972073336, 1.782174740507075, 1.0632887444130097, 0.0, 15.02311147870325, 11.696176188543106, 8.910873702535374, 6.810681891622, 12.049979218115787, 5.880924164295876, 4.454398164048228, 3.920780918661012, 5.620587662581833, 4.229738689433371, 2.4604824959201608, 0.9232633233838886, 0.0), # 153
(13.901940044011312, 10.05814703837959, 12.238847654131138, 12.611199394362703, 11.179479846738696, 5.466640542800487, 4.416591304084705, 4.185242738474343, 6.00425376750832, 2.254184814685209, 1.7701992994381837, 1.0565551472770989, 0.0, 14.938854705837642, 11.622106620048086, 8.850996497190918, 6.762554444055626, 12.00850753501664, 5.85933983386408, 4.416591304084705, 3.904743244857491, 5.589739923369348, 4.203733131454236, 2.447769530826228, 0.9143770034890537, 0.0), # 154
(13.790659191342543, 9.957652136918465, 12.173253265518113, 12.530779973631962, 11.116094406705237, 5.443347706333395, 4.377641748459985, 4.169056681559727, 5.982694535508077, 2.23761375910879, 1.7578188074984502, 1.0496066542385225, 0.0, 14.852236262140847, 11.545673196623744, 8.789094037492251, 6.712841277326369, 11.965389071016155, 5.836679354183619, 4.377641748459985, 3.8881055045238533, 5.5580472033526185, 4.176926657877321, 2.4346506531036227, 0.9052411033562243, 0.0), # 155
(13.676563739948545, 9.854312220944214, 12.10557019677379, 12.447886277790282, 11.050982856555176, 5.419185792698435, 4.33750857284943, 4.152067116458564, 5.960282332518376, 2.220495294202998, 1.7450187153409518, 1.0424363697440735, 0.0, 14.763201619153833, 11.466800067184806, 8.725093576704758, 6.661485882608993, 11.920564665036752, 5.81289396304199, 4.33750857284943, 3.870846994784596, 5.525491428277588, 4.149295425930095, 2.4211140393547583, 0.8958465655403832, 0.0), # 156
(13.559588231430352, 9.748027658561648, 12.035739330910227, 12.362446778520066, 10.984109047780422, 5.394125817869895, 4.296150852928397, 4.134239213019062, 5.9369875780004335, 2.202810583692754, 1.731784473618765, 1.0350373982405456, 0.0, 14.671696248417557, 11.385411380646001, 8.658922368093824, 6.60843175107826, 11.873975156000867, 5.787934898226687, 4.296150852928397, 3.8529470127642105, 5.492054523890211, 4.120815592840023, 2.407147866182046, 0.8861843325965136, 0.0), # 157
(13.43642570352943, 9.636747649274225, 11.960387930853534, 12.27118893522918, 10.912417327045198, 5.366575700132966, 4.252596048835072, 4.1143477142620295, 5.910997254959458, 2.1840146623310153, 1.717678725761683, 1.027139934629151, 0.0, 14.573674546947622, 11.298539280920659, 8.588393628808413, 6.552043986993045, 11.821994509918916, 5.7600867999668415, 4.252596048835072, 3.833268357237833, 5.456208663522599, 4.090396311743061, 2.3920775861707066, 0.8760679681158388, 0.0), # 158
(13.288116180561124, 9.509057777339137, 11.860106727604483, 12.155369164364412, 10.818229571737954, 5.327374130407459, 4.201391487047145, 4.085410149573287, 5.871856356733287, 2.161026447344436, 1.7002250806856987, 1.0172043785524665, 0.0, 14.445769764456351, 11.189248164077128, 8.501125403428492, 6.483079342033307, 11.743712713466573, 5.719574209402602, 4.201391487047145, 3.8052672360053275, 5.409114785868977, 4.051789721454805, 2.372021345520897, 0.8644597979399218, 0.0), # 159
(13.112769770827757, 9.363909602092178, 11.732881436933834, 12.013079639051961, 10.699704157616154, 5.275558360850069, 4.142019373545406, 4.04669939214551, 5.818455136337191, 2.1335425433383026, 1.6791778525828622, 1.0050752923331772, 0.0, 14.285557096008445, 11.055828215664945, 8.39588926291431, 6.400627630014906, 11.636910272674381, 5.665379149003714, 4.142019373545406, 3.7682559720357633, 5.349852078808077, 4.004359879683988, 2.346576287386767, 0.8512645092811072, 0.0), # 160
(12.911799698254727, 9.202249432332774, 11.580070457865464, 11.845672880071582, 10.558071749138534, 5.21175610364883, 4.0749133014061885, 3.9987003998323356, 5.751497860199411, 2.101796186926922, 1.6547224963799123, 0.9908651203361357, 0.0, 14.094673280674375, 10.899516323697492, 8.273612481899562, 6.305388560780765, 11.502995720398822, 5.59818055976527, 4.0749133014061885, 3.722682931177736, 5.279035874569267, 3.9485576266905285, 2.3160140915730927, 0.8365681302120704, 0.0), # 161
(12.686619186767443, 9.025023576860344, 11.403032189423245, 11.654501408203041, 10.394563010763845, 5.1365950709917785, 4.000506863705828, 3.941898130487402, 5.6716887947481816, 2.0660206147246045, 1.6270444670035862, 0.9746863069261941, 0.0, 13.874755057524599, 10.721549376188133, 8.13522233501793, 6.198061844173813, 11.343377589496363, 5.518657382682362, 4.000506863705828, 3.668996479279842, 5.197281505381922, 3.884833802734348, 2.280606437884649, 0.8204566888054858, 0.0), # 162
(12.438641460291295, 8.833178344474314, 11.203125030631053, 11.44091774422611, 10.210408606950825, 5.050702975066952, 3.919233653520661, 3.876777541964344, 5.579732206411743, 2.0264490633456567, 1.5963292193806227, 0.956651296468205, 0.0, 13.627439165629584, 10.523164261150253, 7.9816460969031136, 6.079347190036969, 11.159464412823485, 5.427488558750082, 3.919233653520661, 3.6076449821906795, 5.105204303475412, 3.813639248075371, 2.2406250061262107, 0.8030162131340287, 0.0), # 163
(12.16927974275169, 8.627660043974105, 10.981707380512765, 11.206274408920553, 10.006839202158226, 4.954707528062387, 3.8315272639270197, 3.8038235921168018, 5.476332361618334, 1.9833147694043862, 1.562762208437759, 0.9368725333270206, 0.0, 13.35436234405979, 10.305597866597225, 7.813811042188794, 5.949944308213158, 10.952664723236667, 5.325353028963523, 3.8315272639270197, 3.5390768057588473, 5.003419601079113, 3.735424802973519, 2.1963414761025533, 0.7843327312703733, 0.0), # 164
(11.879947258074031, 8.409414984159142, 10.740137638092254, 10.95192392306614, 9.785085460844787, 4.849236442166116, 3.7378212880012396, 3.7235212387984102, 5.3621935267961875, 1.9368509695151015, 1.5265288891017337, 0.915462461867493, 0.0, 13.057161331885686, 10.070087080542422, 7.632644445508667, 5.810552908545303, 10.724387053592375, 5.2129297343177745, 3.7378212880012396, 3.4637403158329394, 4.892542730422393, 3.6506413076887143, 2.148027527618451, 0.7644922712871949, 0.0), # 165
(11.572057230183715, 8.17938947382885, 10.479774202393392, 10.679218807442627, 9.546378047469258, 4.734917429566179, 3.6385493188196576, 3.636355439862808, 5.2380199683735436, 1.8872909002921108, 1.4878147162992839, 0.8925335264544754, 0.0, 12.737472868177733, 9.817868790999228, 7.4390735814964195, 5.661872700876331, 10.476039936747087, 5.090897615807931, 3.6385493188196576, 3.3820838782615565, 4.773189023734629, 3.5597396024808767, 2.0959548404786785, 0.7435808612571683, 0.0), # 166
(11.24702288300614, 7.938529821782648, 10.201975472440058, 10.389511582829789, 9.291947626490376, 4.6123782024506115, 3.5341449494586072, 3.542811153163632, 5.104515952778639, 1.834867798349722, 1.4468051449571482, 0.8681981714528189, 0.0, 12.396933692006392, 9.550179885981006, 7.23402572478574, 5.504603395049164, 10.209031905557278, 4.959935614429085, 3.5341449494586072, 3.2945558588932937, 4.645973813245188, 3.4631705276099303, 2.040395094488012, 0.7216845292529681, 0.0), # 167
(10.906257440466712, 7.687782336819962, 9.908099847256123, 10.084154770007387, 9.023024862366888, 4.482246473007449, 3.425041772994424, 3.44337333655452, 4.962385746439713, 1.779814900302243, 1.4036856300020644, 0.8425688412273767, 0.0, 12.037180542442131, 9.268257253501142, 7.018428150010321, 5.339444700906728, 9.924771492879426, 4.820722671176328, 3.425041772994424, 3.2016046235767495, 4.511512431183444, 3.361384923335797, 1.9816199694512246, 0.6988893033472693, 0.0), # 168
(10.551174126490828, 7.428093327740216, 9.599505725865463, 9.76450088975519, 8.740840419557543, 4.3451499534247295, 3.3116733825034426, 3.338526947889109, 4.812333615785002, 1.7223654427639818, 1.3586416263607706, 0.8157579801430009, 0.0, 11.659850158555415, 8.97333778157301, 6.793208131803853, 5.167096328291944, 9.624667231570005, 4.673937727044753, 3.3116733825034426, 3.103678538160521, 4.370420209778771, 3.254833629918398, 1.9199011451730927, 0.675281211612747, 0.0), # 169
(10.18318616500389, 7.160409103342831, 9.277551507291953, 9.43190246285296, 8.44662496252108, 4.201716355890488, 3.1944733710619975, 3.228756945021036, 4.655063827242743, 1.6627526623492466, 1.311858588960005, 0.7878780325645439, 0.0, 11.2665792794167, 8.666658358209983, 6.559292944800025, 4.988257987047739, 9.310127654485486, 4.52025972302945, 3.1944733710619975, 3.0012259684932054, 4.22331248126054, 3.1439674876176547, 1.8555103014583907, 0.6509462821220756, 0.0), # 170
(9.8037067799313, 6.88567597242723, 8.943595590559468, 9.087712010080473, 8.141609155716246, 4.052573392592758, 3.0738753317464247, 3.1145482858039375, 4.491280647241173, 1.6012097956723452, 1.2635219727265048, 0.759041442856858, 0.0, 10.859004644096458, 8.349455871425437, 6.317609863632523, 4.803629387017034, 8.982561294482347, 4.360367600125513, 3.0738753317464247, 2.8946952804233987, 4.070804577858123, 3.029237336693492, 1.7887191181118935, 0.6259705429479302, 0.0), # 171
(9.414149195198457, 6.604840243792839, 8.59899637469188, 8.733282052217486, 7.827023663601784, 3.898348775719581, 2.950312857633059, 2.996385928091453, 4.321688342208532, 1.5379700793475863, 1.2138172325870082, 0.7293606553847958, 0.0, 10.438762991665145, 8.022967209232752, 6.069086162935041, 4.613910238042758, 8.643376684417063, 4.194940299328034, 2.950312857633059, 2.7845348397997007, 3.913511831800892, 2.911094017405829, 1.7197992749383764, 0.6004400221629854, 0.0), # 172
(9.015926634730764, 6.31884822623908, 8.245112258713068, 8.369965110043767, 7.504099150636442, 3.739670217458989, 2.824219541798235, 2.874754829737218, 4.146991178573053, 1.4732667499892769, 1.1629298234682535, 0.6989481145132089, 0.0, 10.007491061193234, 7.6884292596452966, 5.8146491173412675, 4.41980024996783, 8.293982357146106, 4.024656761632105, 2.824219541798235, 2.6711930124707064, 3.752049575318221, 2.7899883700145893, 1.6490224517426137, 0.5744407478399164, 0.0), # 173
(8.610452322453618, 6.028646228565374, 7.883301641646902, 7.99911370433908, 7.174066281278959, 3.57716542999902, 2.6960289773182877, 2.7501399485948705, 3.9678934227629785, 1.4073330442117262, 1.1110452002969786, 0.6679162646069503, 0.0, 9.566825591751181, 7.347078910676452, 5.555226001484892, 4.221999132635178, 7.935786845525957, 3.850195928032819, 2.6960289773182877, 2.5551181642850143, 3.5870331406394795, 2.6663712347796937, 1.5766603283293805, 0.5480587480513978, 0.0), # 174
(8.19913948229242, 5.7351805595711465, 7.514922922517262, 7.622080355883197, 6.838155719988082, 3.41146212552771, 2.566174757269552, 2.623026242518047, 3.7850993412065432, 1.3404021986292411, 1.058348817999921, 0.6363775500308723, 0.0, 9.118403322409455, 7.000153050339593, 5.291744089999604, 4.021206595887723, 7.5701986824130865, 3.6722367395252657, 2.566174757269552, 2.4367586610912215, 3.419077859994041, 2.540693451961066, 1.5029845845034526, 0.5213800508701043, 0.0), # 175
(7.783401338172574, 5.43939752805582, 7.141334500348018, 7.240217585455879, 6.497598131222556, 3.2431880162330953, 2.4350904747283635, 2.493898669360387, 3.5993132003319848, 1.2727074498561304, 1.0050261315038191, 0.6044444151498269, 0.0, 8.663860992238513, 6.648888566648095, 5.025130657519095, 3.8181223495683905, 7.1986264006639695, 3.4914581371045417, 2.4350904747283635, 2.3165628687379254, 3.248799065611278, 2.4134058618186267, 1.4282669000696038, 0.49449068436871096, 0.0), # 176
(7.364651114019479, 5.1422434428188195, 6.763894774163046, 6.8548779138368925, 6.1536241794411275, 3.0729708143032117, 2.303209722771056, 2.3632421869755245, 3.411239266567542, 1.2044820345067013, 0.9512625957354108, 0.5722293043286669, 0.0, 8.204835340308824, 6.2945223476153345, 4.756312978677054, 3.6134461035201033, 6.822478533135084, 3.3085390617657344, 2.303209722771056, 2.1949791530737226, 3.0768120897205637, 2.284959304612298, 1.3527789548326095, 0.4674766766198928, 0.0), # 177
(6.944302033758534, 4.8446646126595665, 6.383962142986221, 6.467413861806007, 5.807464529102536, 2.901438231926097, 2.170966094473966, 2.2315417532170994, 3.2215818063414514, 1.1359591891952627, 0.897243665621434, 0.5398446619322442, 0.0, 7.742963105690853, 5.938291281254685, 4.486218328107169, 3.4078775675857873, 6.443163612682903, 3.1241584545039394, 2.170966094473966, 2.072455879947212, 2.903732264551268, 2.1558046206020025, 1.2767924285972443, 0.44042405569632426, 0.0), # 178
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 179
)
passenger_allighting_rate = (
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 0
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 1
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 2
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 3
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 4
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 5
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 6
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 7
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 8
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 9
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 10
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 11
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 12
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 13
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 14
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 15
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 16
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 17
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 18
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 19
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 20
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 21
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 22
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 23
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 24
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 25
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 26
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 27
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 28
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 29
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 30
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 31
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 32
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 33
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 34
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 35
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 36
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 37
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 38
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 39
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 40
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 41
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 42
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 43
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 44
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 45
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 46
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 47
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 48
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 49
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 50
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 51
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 52
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 53
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 54
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 55
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 56
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 57
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 58
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 59
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 60
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 61
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 62
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 63
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 64
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 65
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 66
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 67
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 68
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 69
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 70
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 71
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 72
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 73
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 74
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 75
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 76
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 77
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 78
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 79
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 80
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 81
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 82
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 83
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 84
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 85
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 86
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 87
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 88
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 89
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 90
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 91
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 92
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 93
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 94
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 95
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 96
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 97
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 98
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 99
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 100
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 101
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 102
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 103
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 104
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 105
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 106
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 107
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 108
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 109
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 110
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 111
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 112
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 113
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 114
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 115
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 116
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 117
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 118
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 119
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 120
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 121
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 122
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 123
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 124
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 125
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 126
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 127
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 128
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 129
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 130
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 131
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 132
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 133
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 134
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 135
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 136
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 137
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 138
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 139
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 140
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 141
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 142
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 143
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 144
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 145
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 146
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 147
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 148
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 149
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 150
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 151
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 152
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 153
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 154
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 155
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 156
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 157
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 158
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 159
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 160
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 161
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 162
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 163
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 164
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 165
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 166
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 167
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 168
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 169
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 170
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 171
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 172
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 173
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 174
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 175
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 176
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 177
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 178
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 179
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 8991598675325360468762009371570610170
#index for seed sequence child
child_seed_index = (
1, # 0
89, # 1
)
| 278.365775 | 490 | 0.771301 | 32,987 | 260,272 | 6.085337 | 0.23488 | 0.355091 | 0.340744 | 0.645621 | 0.36632 | 0.361558 | 0.360661 | 0.360591 | 0.360591 | 0.360591 | 0 | 0.851064 | 0.095031 | 260,272 | 934 | 491 | 278.663812 | 0.001185 | 0.015411 | 0 | 0.200873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.005459 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e50bdde5e34a37084301c6821af09933b4726da4 | 1,319 | py | Python | dash/tests/test_tilemap.py | defgsus/thegame | 38a627d9108f1418b94b08831fd640dd87fbba83 | [
"MIT"
] | 1 | 2021-11-05T11:49:26.000Z | 2021-11-05T11:49:26.000Z | dash/tests/test_tilemap.py | defgsus/thegame | 38a627d9108f1418b94b08831fd640dd87fbba83 | [
"MIT"
] | null | null | null | dash/tests/test_tilemap.py | defgsus/thegame | 38a627d9108f1418b94b08831fd640dd87fbba83 | [
"MIT"
] | null | null | null | import unittest
from dash.map import TileMap
class TestTilemap(unittest.TestCase):
def test_window(self):
map = TileMap((4, 3))
map.fill(1)
self.assertEqual(
[[1, 1, 1, 1, 0, 0, 0, 0],
[1, 1, 1, 1, 0, 0, 0, 0],
[1, 1, 1, 1, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0]],
map.get_window(0, 0, 8, 8)[:, :, 0].tolist()
)
self.assertEqual(
[[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 1, 1, 1, 1, 0, 0, 0],
[0, 1, 1, 1, 1, 0, 0, 0],
[0, 1, 1, 1, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0]],
map.get_window(-1, -2, 8, 8)[:, :, 0].tolist()
)
self.assertEqual(
[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 1, 1, 1],
[0, 1, 1, 1]],
map.get_window(-1, -2, 4, 4)[:, :, 0].tolist()
)
self.assertEqual(
[[1, 1],
[1, 1]],
map.get_window(1, 1, 2, 2)[:, :, 0].tolist()
)
| 28.673913 | 58 | 0.312358 | 214 | 1,319 | 1.901869 | 0.107477 | 0.520885 | 0.714988 | 0.874693 | 0.683047 | 0.675676 | 0.599509 | 0.520885 | 0.520885 | 0.520885 | 0 | 0.242553 | 0.465504 | 1,319 | 45 | 59 | 29.311111 | 0.334752 | 0 | 0 | 0.45 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 1 | 0.025 | false | 0 | 0.05 | 0 | 0.1 | 0 | 0 | 0 | 1 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e50f9a463aa811aa71329d27d310105b70f7593e | 117 | py | Python | authentication/models.py | griffinskudder/spero-backend | 57e69f030c618d7a7670b7453d3d6f230d71c639 | [
"MIT"
] | null | null | null | authentication/models.py | griffinskudder/spero-backend | 57e69f030c618d7a7670b7453d3d6f230d71c639 | [
"MIT"
] | 3 | 2020-02-11T23:37:13.000Z | 2021-06-10T21:08:43.000Z | authentication/models.py | griffinskudder/spero-backend | 57e69f030c618d7a7670b7453d3d6f230d71c639 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
# Create your models here.
class User(AbstractUser):
pass
| 14.625 | 51 | 0.769231 | 15 | 117 | 6 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.162393 | 117 | 7 | 52 | 16.714286 | 0.918367 | 0.205128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.